[go: up one dir, main page]

WO2018176946A1 - Route selection method and apparatus - Google Patents

Route selection method and apparatus Download PDF

Info

Publication number
WO2018176946A1
WO2018176946A1 PCT/CN2017/119050 CN2017119050W WO2018176946A1 WO 2018176946 A1 WO2018176946 A1 WO 2018176946A1 CN 2017119050 W CN2017119050 W CN 2017119050W WO 2018176946 A1 WO2018176946 A1 WO 2018176946A1
Authority
WO
WIPO (PCT)
Prior art keywords
route
intermediate node
nmc
score
routes
Prior art date
Application number
PCT/CN2017/119050
Other languages
French (fr)
Chinese (zh)
Inventor
林栋�
邓榤生
韩泽宇
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2018176946A1 publication Critical patent/WO2018176946A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/04Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/12Communication route or path selection, e.g. power-based or shortest path routing based on transmission quality or channel quality

Definitions

  • the present application relates to the field of communications, and in particular, to a routing method and apparatus.
  • Wireless Mesh network also known as wireless mesh network or wireless mesh network, combines the advantages of Wireless Local Area Network (WLAN) technology and AdHoc network. It is a network with large capacity, high speed and wide coverage.
  • Wireless Mesh networks are low-power multi-hop multihop systems that process messages by passing packets from one node to another until the packet reaches its destination.
  • the nodes of each wireless Mesh network can serve as access terminals, and can also have routing and information forwarding functions, and have extremely high networking degrees of freedom.
  • a wireless mesh network provides multiple redundant routes from a source node to a destination node. If a node on a route stops working due to hardware failure or interference, the mesh automatically changes the routing of the packets and passes them through an alternate route.
  • the route from the source node to the target node can be selected through Open Shortest Path First (OSPF).
  • OSPF Open Shortest Path First
  • the source node has five routes to the target node, and the route with the shortest path is selected from the five routes as the target route, and the source node and the target node communicate through the target route.
  • the embodiment of the present application provides a routing method and device, which are used to select a target route in combination with the ability of a route to resist failure, thereby improving communication reliability.
  • the embodiment of the present application provides a routing method, including acquiring at least two routes from a source node to a target node, and acquiring a micro-structure count NMC score of an intermediate node in at least two routes; wherein, the intermediate node The NMC score is obtained according to the number of polygons constructed by the intermediate node; wherein the intermediate node is a vertex of the polygon constructed by the intermediate node; according to the NMC score of the intermediate node in at least two routes, from at least two A destination route is selected in the route.
  • the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node, and the intermediate node is a vertex of the polygon constructed by the intermediate node, that is, an NMC score of an intermediate node.
  • the number of polygons that the intermediate node participates in constructing may be reflected. Since the polygon is closed and the intermediate node is a vertex of the polygon, the number of polygons constructed by the intermediate node may reflect that the link of the intermediate node is faulty.
  • the fault repairing capability of the intermediate node, and the target route is selected from the source node to the target node according to the NMC score of the intermediate node in the at least two routes in the embodiment of the present application, that is, the implementation of the present application
  • the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
  • the first route and the second route are equivalent to the at least two routes; wherein the first route and the second route are any two routes of the at least two routes; the first route and the second route meet the following content Any one of the following: the hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route; the transmission delay of the first route is the same as the transmission delay included in the second route; the first route The sum of the weights of the included links is the same as the sum of the weights of the links included in the second route; the sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route; the first route The sum of the weight of the included link and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node.
  • the target route selected in the embodiment of the present application considers the route repair capability of each intermediate node on the route, and thus the reliability of the route can be improved. Further, for the two equal-cost routes, the advantages of the method in the present application can be further improved. In this embodiment, the fault repair capability of the route in the two equal-cost routes is determined to be higher.
  • the NMC score of the intermediate node is obtained according to the number of M-type polygons constructed by the intermediate node; wherein, M is an integer greater than or equal to 1, and if M is greater than or equal to 2, any two of the M-type polygons Class polygons have different numbers of sides.
  • M is an integer greater than or equal to 1
  • M is greater than or equal to 2
  • any two of the M-type polygons Class polygons have different numbers of sides.
  • the NMC score of the intermediate node is: performing weighting calculation on the number of each type of polygon in the M-type polygon constructed by the intermediate node according to the weight corresponding to each type of polygon in the M-type polygon; wherein The NMC score of the intermediate node is used to indicate: the fault repair capability of the intermediate node.
  • the weights of each type of polygon in the M-type polygon can be set according to actual conditions, for example, the weight of each type of polygon is the same, both are 1; or the polygons with more edges may have a larger routing delay after repairing, Therefore, the polygons with more edges may have smaller weights, etc., so that the NMC score is balanced between the fault repair capability of the intermediate node and the delay of the repaired route.
  • selecting a target route from the at least two routes according to the NMC score of the intermediate node in the at least two routes including: determining, according to the NMC score of the intermediate node in the at least two routes, at least two The NMC score of the route in the route; wherein the NMC score of the route is used to indicate the fault repair capability of the route; according to the NMC score of the route in at least two routes, the route with the strongest fault repair capability indicated The route corresponding to the NMC score is determined as the target route.
  • determining, according to the NMC score of the intermediate node in the at least two routes, the NMC score of the route in the at least two routes including the following manner: repairing the fault indicated in the route in the at least two routes.
  • the NMC score of the weakest intermediate node is determined as the NMC score of the route; the intermediate node NMC score in the route of at least two routes is mathematically calculated, and the result of the mathematical calculation is determined as the NMC score of the route.
  • the NMC scores of the intermediate nodes in the at least two routes are obtained, and the NMC scores reported by each of the at least two routes are obtained by using a flooding or periodic information exchange mechanism.
  • the NMC score of the intermediate node may be obtained by receiving the NMC score reported by each of the at least two routes, or calculating the route of each of the at least two routes by directly calculating. The NMC score for each intermediate node in .
  • obtaining at least two routes from the source node to the target node, and acquiring NMC scores of the intermediate nodes in the at least two routes including: a broadcast routing request; wherein the routing request includes an identifier of the target node; and receiving the target The route response corresponding to the route request returned by the node, where the route response includes: at least two routes from the source node to the target node, and an NMC score of the intermediate node in the at least two routes.
  • the scheme can be performed by a routing device disposed on the source node.
  • the embodiment of the present application provides a routing method, including: performing, for an intermediate node of at least two routes from a source node to a target node, determining, according to network topology information of the intermediate node, a polygon constructed by the intermediate node. The number of the vertices of the polygon constructed by the intermediate node; determining the NMC score of the microstructure of the intermediate node according to the number of polygons constructed by the intermediate node; reporting the NMC score of the intermediate node; The NMC score of the intermediate node in the at least two routes is used to: select a target route from the at least two routes according to the NMC score of the intermediate node in the at least two routes.
  • the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
  • the first route and the second route are equivalent to the at least two routes; wherein the first route and the second route are any two routes of the at least two routes; the first route and the second route meet the following content Any one of the following: the hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route; the transmission delay of the first route is the same as the transmission delay included in the second route; the first route The sum of the weights of the included links is the same as the sum of the weights of the links included in the second route; the sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route; the first route The sum of the weight of the included link and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node.
  • the target route selected in the embodiment of the present application considers the route repair capability of each intermediate node on the route, and thus the reliability of the route can be improved. Further, for the two equal-cost routes, the advantages of the method in the present application can be further improved. In this embodiment, the fault repair capability of the route in the two equal-cost routes is determined to be higher.
  • determining the number of polygons constructed by the intermediate node according to the network topology information of the intermediate node including: determining, according to network topology information of the intermediate node, the number of M types of polygons constructed by the intermediate node; wherein, M is greater than An integer equal to 1, and if M is greater than or equal to 2, the number of sides of any two types of polygons in the M-type polygon is different; determining the NMC score of the intermediate node according to the number of polygons constructed by the intermediate node, including: according to the middle The number of M-type polygons constructed by the node determines the NMC score of the intermediate node. In this way, the M-type polygon can be reasonably set according to the actual situation and the specific application scenario, so that the NMC score more accurately reflects the fault repair capability of the intermediate node.
  • determining the NMC score of the intermediate node according to the number of M types of polygons constructed by the intermediate node includes: determining a weight corresponding to each type of polygon in the M type polygon; and according to weights corresponding to each type of polygon in the M type polygon, Weighting the number of each type of polygon in the M-type polygon constructed by the intermediate node; determining the result of weighting the number of each type of polygon in the M-type polygon constructed by the intermediate node as the NMC score of the intermediate node .
  • the weights of each type of polygon in the M-type polygon can be set according to actual conditions, for example, the weight of each type of polygon is the same, both are 1; or the polygons with more edges may have a larger routing delay after repairing, Therefore, the polygons with more edges may have smaller weights, etc., so that the NMC score is balanced between the fault repair capability of the intermediate node and the delay of the repaired route.
  • the NMC scores of the intermediate nodes in the at least two routes are obtained, and the NMC scores reported by each of the at least two routes are obtained by using a flooding or periodic information exchange mechanism.
  • the NMC score of the intermediate node may be obtained by receiving the NMC score reported by each of the at least two routes, or calculating the route of each of the at least two routes by directly calculating. The NMC score for each intermediate node in .
  • the reporting the NMC score of the intermediate node includes: receiving a routing request; wherein the routing request includes an identifier of the target node; and determining, according to the identifier of the routing request, the identifier of the intermediate node after determining that the routing request is received for the first time
  • the NMC score is added to the routing record of the routing request, and the routing request with the identifier of the intermediate node and the NMC score is forwarded.
  • the scheme can be performed by a routing device disposed on the intermediate node.
  • the embodiment of the present application provides a routing device, where the routing device includes a memory, a transceiver, and a processor, where: the memory is used to store program instructions; the processor is configured to execute and send and receive according to program instructions for executing memory storage.
  • the device performs signal reception and signal transmission, and when the processor executes the program instruction stored in the memory, the routing device is configured to perform the method of any of the above first aspect or the first aspect.
  • an embodiment of the present application provides a routing device, where the routing device includes a memory, a transceiver, and a processor, where: the memory is used to store program instructions; the processor is configured to execute, according to a program instruction for executing the memory, and control the sending and receiving.
  • the device performs signal reception and signal transmission, and when the processor executes the program instruction stored in the memory, the routing device is configured to perform the method of any of the above second aspect or the second aspect.
  • the embodiment of the present application provides a routing device, which is used to implement any one of the foregoing first aspect or the first aspect, and includes a corresponding functional module, which is used to implement the steps in the foregoing method.
  • the embodiment of the present application provides a routing apparatus, which is used to implement the method of any one of the foregoing second aspect or the second aspect, and includes a corresponding functional module, which is used to implement the steps in the foregoing method.
  • an embodiment of the present application provides a computer storage medium, where a computer storage medium stores program instructions, when executed on a computer, causing the computer to perform the first aspect or any possible implementation manner of the first aspect. method.
  • an embodiment of the present application provides a computer storage medium, where a computer storage medium stores program instructions, and when executed on a computer, causes the computer to perform the second aspect or any possible implementation manner of the second aspect. method.
  • the embodiment of the present application provides a computer program product comprising program instructions, when executed on a computer, causing the computer to perform the method in the first aspect or any possible implementation manner of the first aspect.
  • the embodiment of the present application provides a computer program product comprising program instructions, when executed on a computer, causing the computer to perform the method in any of the possible implementations of the second aspect or the second aspect.
  • the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node, and the intermediate node is a vertex of the polygon constructed by the intermediate node, that is, an NMC score of an intermediate node.
  • the number of polygons that the intermediate node participates in constructing may be reflected. Since the polygon is closed and the intermediate node is a vertex of the polygon, the number of polygons constructed by the intermediate node may reflect that the link of the intermediate node is faulty.
  • the fault repairing capability of the intermediate node, and the target route is selected from the source node to the target node according to the NMC score of the intermediate node in the at least two routes in the embodiment of the present application, that is, the implementation of the present application
  • the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
  • FIG. 1 is a schematic structural diagram of a communication system to which an embodiment of the present application is applied;
  • 1a is a schematic structural diagram of another communication system to which the embodiment of the present application is applied;
  • FIG. 2 is a schematic flowchart of a routing method according to an embodiment of the present application.
  • FIG. 2a is a schematic diagram of two phase transitions of path expansion in a route repair process according to an embodiment of the present application
  • 2b is a schematic structural diagram of a system of routing according to an embodiment of the present application.
  • 2c is a schematic structural view of a triangle constructed by the intermediate node 122 of FIG. 2b;
  • 2d is a schematic structural view of a quadrangle constructed by the intermediate node 122 of FIG. 2b;
  • 2 e is a schematic flowchart of a method for enabling a first routing device to acquire an NMC score of each intermediate node according to an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of a routing apparatus according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of a routing apparatus according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of a routing apparatus according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of a routing apparatus according to an embodiment of the present disclosure.
  • the embodiments of the present application are applicable to wired or wireless networks, such as wireless Mesh networks that combine the advantages of WLAN and AdHoc networks.
  • Wireless Mesh networks are low-power multi-level hopping systems that process messages by passing packets from one node to another until the packet reaches its destination.
  • the nodes of each wireless Mesh network can serve as access terminals, and can also have routing and information forwarding functions, and have extremely high networking degrees of freedom.
  • the source node, the target node, and the intermediate node in the embodiment of the present application are all nodes in the network to which the embodiment of the present application applies, and each of the source node, the target node, and the intermediate node has a routing and information forwarding function.
  • two parties of data transmission are respectively referred to as a source node and a target node, and a node through which a route between the source node and the target node passes is referred to as an intermediate node.
  • the solution in the embodiment of the present application provides a routing scheme between the source node and the target node, and the source node may send data to the target node by using the selected route, and accordingly, the target node may also send the route to the source node by using the selected route. data.
  • the source node and the target node defined in the embodiment of the present application may also become intermediate nodes in other data transmission schemes, and the intermediate node may also become a source node or a target node in other data transmission schemes.
  • FIG. 1 is a schematic diagram showing a structure of a communication system to which the embodiment of the present application is applied.
  • the source node 101 and the target node 102 are connected by a route including an intermediate node 111, an intermediate node 112, and Intermediate node 113.
  • the routing device provided in the embodiment of the present application may include two parts, which may be respectively referred to as a first routing device and a second routing device, and the first routing device is configured to count the microstructures of each intermediate node according to the route ( The Node Motif Count (NMC) scores the target routing.
  • the second routing device can be used to calculate the NMC score of each intermediate node, and report the calculated NMC score to the first routing device.
  • NMC Node Motif Count
  • an alternative deployment scenario is to deploy the first routing device on the source node 101 and the second routing device on each intermediate node.
  • Another alternative deployment scenario is to deploy the first routing device on the target node 102 and the second routing device on each intermediate node.
  • the first routing device and the second routing device are deployed on each of the source node, the target node, and the intermediate node, and the first route on the source node 101 and the target node 102 is routed.
  • the selection means executes, which is performed by the second routing means on each intermediate node when calculating the NMC score for each intermediate node.
  • FIG. 1a is a schematic diagram showing another architecture of a communication system to which the embodiment of the present application is applied.
  • the source node 101 and the target node 102 are connected by a route, and the route includes an intermediate node 111 and an intermediate node 112. And intermediate node 113.
  • the source node 101, the target node 102, and each intermediate node are all connected to the routing device 141.
  • the routing device 141 calculates the NMC score of each intermediate node, and then selects the destination route according to the NMC score, and sends the target route to the destination route.
  • Source node 101 and target node 102 are calculated by the NMC score of each intermediate node, and then selects the destination route according to the NMC score, and sends the target route to the destination route.
  • the solution provided by the embodiment of the present application is performed by the routing device, and the routing device may be the routing device 141 shown in FIG. 1a, or may be the device including the first routing device and the second routing device in FIG. .
  • the following description is separately described by the first routing device and the second routing device, but any of the following method steps may be performed by any one of the first routing device and the second routing device, the first routing device And the second routing device may be respectively deployed on different nodes or different devices, or may be integrated on one device, for example, the first routing device and the second routing device are integrated on the routing device 141 shown in FIG. 1a. .
  • the source node 101 and the target node 102 may have multiple redundant routes. If a route stops working due to hardware failure or interference, the network automatically changes the routing of the packets, passing them through an alternate path.
  • the embodiment of the present application provides a solution for selecting a route with high reliability and strong resistance against faults from multiple redundant routes of a source node and a target node.
  • FIG. 2 is a schematic flowchart diagram of a routing method provided by an embodiment of the present application.
  • a routing method implemented by the routing apparatus provided by the embodiment of the present application is provided. As shown in Figure 2, the method includes:
  • Step 201 The routing device acquires at least two routes from the source node to the target node, and obtains an NMC score of the intermediate node in the at least two routes.
  • the NMC score of the intermediate node is a polygon constructed according to the intermediate node. The number obtained; wherein the intermediate node is a vertex of a polygon constructed by the intermediate node;
  • Step 202 The routing device selects a target route from the at least two routes according to the NMC score of the intermediate node in the at least two routes.
  • the routing device in the foregoing steps 201 and 202 may be the routing device 141 in the foregoing FIG. 1a, or may be the first routing device and the second routing device in the foregoing content.
  • the routing device determines, according to the network topology information of the intermediate node, the intermediate node in the at least two routes from the source node to the target node.
  • the number of polygons constructed by the node determining the NMC score of the intermediate node according to the number of polygons constructed according to the intermediate node; selecting one of the at least two routes according to the NMC score of the intermediate node in the at least two routes Target routing.
  • the second routing device is configured for the intermediate node of the at least two routes from the source node to the target node, according to the intermediate node.
  • the network topology information determines the number of polygons constructed by the intermediate node; determines the NMC score of the intermediate node according to the number of polygons constructed by the intermediate node; reports the NMC score of the intermediate node; wherein the intermediate node is the The vertices of the polygons constructed by the intermediate nodes; the NMC scores of the intermediate nodes in the at least two routes are used to: select a target route from the at least two routes according to the NMC score of the intermediate nodes in the at least two routes.
  • the first routing device acquires at least two routes from the source node to the target node, and obtains an NMC score of the intermediate node in the at least two routes; wherein the NMC score of the intermediate node is constructed according to the intermediate node The number of polygons obtained; wherein the intermediate node is a vertex of the polygon constructed by the intermediate node; the first routing device selects one of the at least two routes according to the NMC score of the intermediate node in the at least two routes Target routing.
  • any of the above method steps may be performed by the first routing device or the second routing device, and the above merely exemplarily shows a division scheme of the first routing device and the second routing device.
  • the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node, and the intermediate node is a vertex of the polygon constructed by the intermediate node, that is, an NMC score of an intermediate node.
  • the number of polygons that the intermediate node participates in constructing may be reflected. Since the polygon is closed and the intermediate node is a vertex of the polygon, the number of polygons constructed by the intermediate node may reflect that the link of the intermediate node is faulty.
  • the fault repairing capability of the intermediate node, and the target route is selected from the source node to the target node according to the NMC score of the intermediate node in the at least two routes in the embodiment of the present application, that is, the implementation of the present application
  • the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
  • the polygon defined in the embodiment of the present application may include a closed figure having more sides than two sides, such as a triangle, a quadrangle, a pentagon, a hexagon, and the like.
  • a node (such as an intermediate node) participates in a constructed polygon, and a link between two nodes connected by wireless or wired is referred to as an edge in a polygon, and each node is referred to as a vertex in the polygon.
  • route rerouting exposure path expansion
  • D new refers to the path length (or routing cost) of the repaired new route
  • D old refers to the path length (or routing cost) of the old route before the repair.
  • FIG. 2a is a schematic diagram showing two phase transitions of path expansion in a route repair process provided by an embodiment of the present application.
  • curves under different topology types are slightly different, but both are worn. After saturation, it quickly saturates "two phase transitions. In a random network, this phenomenon can be mathematically proven.
  • the horizontal axis "reroute path expansion hop count” relative to the vertical axis "route repair (reroute) successful cumulative probability” diagram, you can clearly see the two times after the penetration quickly saturated Phase change. Its physical interpretation and significance is that in such a network, if there is an open circuit, there is a great possibility to implement an end-to-end route repair given a small number of expanded route hops.
  • the embodiment of the present application can evaluate the repair capability of the node after the fault according to the number of polygons that the node constructs in a small range. Therefore, the number of sides of the polygon may not be too large, such as a fifteen-sided shape.
  • the polygon in the embodiment of the present application for example, a triangle or a quadrilateral, can satisfy the requirement.
  • the intermediate node calculates the NMC score.
  • the complexity of the value also increases the rate at which the NMC score is calculated.
  • the embodiment of the present application also considers a scheme of repairing a route in a small range as much as possible, and avoids the problem that the repaired route delay is too long after the repaired route is excessively bypassed, that is, the route repairing capability of the selected target route is adopted. A comprehensive consideration has been made between the delay of the repaired route and the delay.
  • the embodiment of the present application further includes a repair count value, for each intermediate node in the target route, if the intermediate node determines a route fault between the intermediate node and the next hop intermediate node in the target route, and When it is determined that the repair count value is not greater than the threshold, a route repair is performed and the repair count value is incremented by one.
  • Performing a route repair specifically means that the intermediate node selects another alternate path to reach the next hop intermediate node of the target route. If the intermediate node determines a route fault between the intermediate node and the next hop intermediate node in the target route, and determines that the repair count count value is greater than the threshold, the route repair is not performed.
  • the repair count value and the route may be attached to the packet header portion of the data packet, forwarded along the routing path, and modified along the way when modification is required.
  • the combination of route and forwarding can be implemented. In the case of a link-level route interruption, the forwarding is not interrupted, and the route at the service level is not interrupted.
  • the target route selected in the embodiment of the present application considers the route repair capability of each intermediate node on the route, and thus the reliability of the route can be improved. Further, for the two equal-cost routes, the advantages of the method in the present application can be further improved. In the embodiment of the present application, it can be determined that the fault repair capability of the route in the two equal-cost routes is higher.
  • the first route and the second route are equivalent to the at least two routes, where the first route and the second route are any two routes of the at least two routes; the first route and the second route are equivalently specific
  • the first route and the second route may meet the preset condition, and the preset condition may include multiple types, such as the following first case to the fifth case:
  • the number of hops between nodes included in the first route is the same as the number of hops between nodes included in the second route.
  • the number of hops between nodes included in the route refers specifically to the number of hops in the route that the data needs to jump between the nodes.
  • the number of hops between nodes included in the route may be the same as the number of intermediate nodes included in the route. For example, if the route includes three intermediate nodes, the route may include 4 hops, but may also include 5 hops, 6 Jump and so on.
  • the first route and the second route are equivalently the same.
  • the number of intermediate nodes included in the first route is the same as the number of intermediate nodes included in the second route.
  • the transmission delay of the first route is the same as the transmission delay included in the second route.
  • the transmission delay of the first route specifically refers to the time required for data to be transmitted from the source node to the destination node along the first route; or the time required for data to be transmitted from the target node to the source node along the first route.
  • the transmission delay of the second route specifically refers to the time required for data to be transmitted from the source node to the destination node along the second route; or the time required for data to be transmitted from the target node to the source node along the second route.
  • the number of hops between the nodes included in the first route may be different or the same as the number of hops between the nodes included in the second route.
  • a scheme is provided optionally for calculating the transmission delay of a route, each router maintains a distance vector (usually a delay is a variable) table, and then advertises the distance by a distance vector between adjacent nodes.
  • the update of the vector table may be advertised between nodes by periodic or event-triggered forms, such as delay between the node and the neighboring node, link state information, and the like.
  • the distance vector table may include a delay between nodes, and the delay of a route may be calculated based on the distance vector table.
  • the sum of the weights of the links included in the first route is the same as the sum of the weights of the links included in the second route.
  • the link included in each of the first route and the second route specifically refers to a link between any two nodes on the first route, and each link corresponds to one weight.
  • the weight of the link may be related to delay, maximum bandwidth, delay jitter, unit bandwidth price, and so on.
  • the sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route.
  • Each intermediate node included in each of the first route and the second route corresponds to one weight.
  • the weight corresponding to the intermediate node may be related to the maximum processing power of the intermediate node, the current load level, and the like.
  • the intermediate node can be a router.
  • the sum of the weight of the link included in the first route and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node.
  • FIG. 2b is a schematic diagram showing a system architecture of a route provided by an embodiment of the present application.
  • the source node 101 and the target node 102 include multiple redundant routes, such as:
  • Route A source node 101, intermediate node 111, intermediate node 112, intermediate node 113, and target node 102;
  • Route B source node 101, intermediate node 121, intermediate node 122, intermediate node 123, and target node 102;
  • Route C source node 101, intermediate node 131, intermediate node 132, and target node 102.
  • the source node 101 and the target node 102 further include other routes, such as the route D, including: the source node 101, the intermediate node 121, the intermediate node 151, the intermediate node 122, the intermediate node 123, and the target node 102;
  • the route E includes: the source node 101, the intermediate node including the intermediate node 121, the intermediate node 152, the intermediate node 123, and the target node 102.
  • the route that can connect the source node 101 to the target node 102 also includes others, and details are not described herein again.
  • the route-equivalent preset condition in the embodiment of the present application is the foregoing second case, and if the transmission delays of the route A and the route B are the same, and the transmission delays of the route A and the route B are It is the two routes with the smallest transmission delay among all the routes between the source node 101 and the target node 102.
  • the route with the smallest transmission delay can be selected as the target route, and the route with the strong transmission delay can be selected as the target route in the route with the smallest transmission delay.
  • the embodiment of the present application is applicable to multiple networks, such as a random network and a power rate network, where the network topology in the WMN belongs to a typical random network, and the topology in the inter-domain routing scenario belongs to a typical power rate network.
  • some polygons for calculating the NMC score may be predefined, and the polygons used by each intermediate node to calculate the NMC score are specifically notified, and may be notified by broadcast or one-by-one notification.
  • Each of the nodes in the network in the embodiment of the present application includes an intermediate node, a source node, and a target node.
  • the method for calculating the NMC score is the same for each node.
  • an intermediate node calculates the NMC score as The example is introduced.
  • the number of polygons constructed by the intermediate nodes is determined according to the network topology information, and the intermediate nodes are the vertices of the polygons constructed by the intermediate nodes.
  • the description is based on FIG. 2b, taking the intermediate node 122 in FIG. 2b as an example.
  • FIG. 2c exemplarily shows the structural diagram of the triangle formed by the intermediate node 122 in FIG. 2b
  • FIG. 2d exemplarily shows the figure. Schematic diagram of the quadrilateral constructed by the intermediate node 122 in 2b.
  • the intermediate node 122 constructs four triangles, which are a triangle composed of an intermediate node 122, an intermediate node 121, and an intermediate node 151; and an intermediate node 122, an intermediate node 151, and an intermediate node 123.
  • the intermediate node 122 constructs four quadrilaterals, which are a quadrangle composed of an intermediate node 122, an intermediate node 152, an intermediate node 121, and an intermediate node 151; an intermediate node 122, an intermediate node 152, an intermediate node 123, and an intermediate node.
  • a node (such as an intermediate node) participates in a constructed polygon, and a link between two nodes connected by wireless or wired is referred to as an edge in a polygon, and each node is referred to as a vertex in the polygon.
  • the number of triangles and quadrilaterals constructed by the intermediate node 122 is calculated in the above, with four triangles and four quadrilaterals.
  • the trigonometry and the quadrilateral constructed by the intermediate node 121 are respectively: a triangle formed by the intermediate node 121, the intermediate node 151, and the intermediate node 122; the intermediate node 121, the intermediate node 152, and the intermediate node 122 A triangle formed by the intermediate node 121, the intermediate node 152, the intermediate node 122, and the intermediate node 151. It can be seen that the intermediate node 121 constructs two triangles and one quad.
  • N is an integer, and N is greater than or equal to half the number of sides of a type of polygon having the largest number of sides in the defined polygon. For example, if the type of polygon with the largest number of edges in the M-type polygon is a hexagon, then N can be 3, that is, the network topology within the three-hop range of the intermediate node can be known.
  • the solution for obtaining the network topology of the intermediate node is obtained by broadcasting, for example, by knowing, by the intermediate node itself, flooding the N-hop topology of the neighboring area, and notifying the second routing device, if the second routing device is used. If the second routing device is directly deployed on the intermediate node, the second routing device can also query the N-hop topology around the intermediate node deployed by itself.
  • the predefined polygons may include M-type polygons, and any two types of polygons in the M-type polygon have different numbers of sides.
  • the M-type polygon includes only one type of polygon with the same number of sides, such as a triangle; when M is two, the M-type polygon may include two types of polygons with different sides, such as a triangle and a quadrangle.
  • the NMC score of the intermediate node is obtained according to the number of M-type polygons constructed by the intermediate node; if M is an integer greater than or equal to 1, and if M is greater than or equal to 2, any two of the M-type polygons The number of sides of the polygon is different. In this way, the M-type polygon can be reasonably set according to the actual situation and the specific application scenario, so that the NMC score more accurately reflects the fault repair capability of the intermediate node.
  • determining the number of polygons constructed by the intermediate node according to the network topology information of the intermediate node, the second routing device determining, according to the network topology information of the intermediate node, the M class constructed by the intermediate node The number of polygons; where M is an integer greater than or equal to 1, and if M is greater than or equal to 2, the number of sides of any two types of polygons in the M-type polygon is different; and the number of polygons constructed by the second routing device according to the intermediate node, Determining the NMC score of the intermediate node includes: determining an NMC score of the intermediate node according to the number of M-type polygons constructed by the intermediate node.
  • this embodiment can also be implemented by a first routing device.
  • the NMC score of the intermediate node is determined by various calculation schemes, such as directly taking the sum of the number of M types of polygons as the NMC score of the intermediate node, or presetting some formulas, such as by a formula (log (NMC triangle + NMC quadrilateral ))
  • the NMC score of the intermediate node is calculated, wherein the NMC triangle is the number of triangles constructed by the intermediate node, and the NMC quadrilateral is the number of quadrilaterals constructed by the intermediate node.
  • the NMC score of the intermediate node is: performing weighting calculation on the number of each type of polygon in the M-type polygon constructed by the intermediate node according to the weight corresponding to each type of polygon in the M-type polygon; wherein The NMC score of the intermediate node is used to indicate: the fault repair capability of the intermediate node.
  • determining the NMC score of the intermediate node according to the number of M-type polygons constructed by the intermediate node includes: determining, by the second routing device, a weight corresponding to each type of polygon in the M-type polygon; The routing device performs weighting calculation on the number of each type of polygon in the M-type polygon constructed by the intermediate node according to the weight corresponding to each type of polygon in the M-type polygon; the second routing device constructs the M-type polygon in the intermediate node The result of the weighted calculation of each type of polygon is determined as the NMC score of the intermediate node.
  • this embodiment can also be implemented by a first routing device.
  • the weights of each type of polygon in the M-type polygon can be set according to actual conditions, for example, the weight of each type of polygon is the same, both are 1; or the polygons with more edges may have a larger routing delay after repairing, Therefore, the polygons with more edges may have smaller weights, etc., so that the NMC score is balanced between the fault repair capability of the intermediate node and the delay of the repaired route.
  • the weighting calculation in the above solution specifically refers to mathematically calculating the number of each type of polygon constructed by the intermediate node according to a preset formula and a weight corresponding to each type of polygon in the M-type polygon.
  • weights corresponding to each type of polygon in the M-type polygon are multiplied by the number of such polygons, and the obtained M products are added, multiplied or subtracted, or other mathematical operations are performed.
  • the result obtained is the NMC score of the intermediate node.
  • the number of each type of polygon in the M-type polygon is reciprocal and then summed, and the obtained result is the NMC score of the intermediate node.
  • the result is the NMC score of the intermediate node.
  • the minimum value of the number of M-type polygons is taken, and the minimum number of polygons is used as the NMC score of the intermediate node.
  • other M-1 classes other than the smallest type of polygons may be used.
  • the weight corresponding to the number of polygons is set to zero, and the weight of the number of polygons corresponding to the smallest number is set to 1.
  • the NMC score of the route is used to indicate the fault repair capability of the route.
  • the NMC score of the intermediate node is obtained by adding the number of polygons constructed by the intermediate node, or weighted and added, and the intermediate node is obtained. The higher the NMC score is, the stronger the fault repair capability of the intermediate node is; or the NMC score of the intermediate node is obtained by adding the reciprocal of the number of polygons constructed by the intermediate node, and the NMC score of the intermediate node is higher.
  • the fault repair capability of the intermediate node is weaker.
  • selecting a target route from the at least two routes according to the NMC score of the intermediate node in the at least two routes including: the first routing device according to the NMC score of the intermediate node in the at least two routes Determining the NMC score of the route in the at least two routes; wherein the NMC score of the route is used to indicate the fault repair capability of the route; the first routing device according to the NMC score of the route in the at least two routes, The route corresponding to the NMC score of the indicated route with the strongest fault repair capability is determined as the target route.
  • this embodiment can also be implemented by a second routing device.
  • determining, according to the NMC score of the intermediate node in the at least two routes, the NMC score of the route in the at least two routes including multiple manners.
  • the first method and the second method in the following content.
  • the first routing device determines, as the NMC score of the route, the NMC score of the intermediate node with the weakest fault repair capability indicated in the route in the at least two routes. For example, if the NMC score is larger, the fault repair capability is stronger; if the NMC score is smaller, the fault repair capability is weaker. Then, the NMC score of the smallest intermediate node in each route is determined as the NMC score of the route.
  • the first routing device determines the route corresponding to the NMC score of the route with the strongest fault repair capability as the target route according to the NMC score of the route in the at least two routes.
  • the scores of the intermediate nodes on the two routes are (route F: 3, 5, 6, 3, 2, 1), (route G: 2, 2, 2, 3, 2, 2).
  • the NMC score on route F is the lowest, and the NMC score on route G is the lowest. Therefore, the route of route F has an NMC score of 1, and the route of route G has an NMC score of 2, because route G is routed.
  • the NMC score is greater than the NMC score of the route of the route F.
  • the larger the NMC score of the route is the stronger the fault repair capability of the route is. Therefore, the route G is selected as the target route.
  • This equal-cost routing strategy can make "in the case of any link failure, more than 98% of end-to-end routes can be recovered, and the cost is less than 2 hops.
  • the first routing device performs a mathematical calculation on the intermediate node NMC in the route of at least two routes, and determines the result of the mathematical calculation as the NMC score of the route.
  • an average value of the NMC scores of the intermediate nodes of each route is calculated, and then mathematical calculation is performed, and the average value of the intermediate node NMC scores on the route is determined as the NMC score of the route.
  • the first routing device determines the route corresponding to the NMC score of the route with the strongest fault repair capability as the target route according to the NMC score of the route in the at least two routes.
  • the scores of the intermediate nodes on the two routes are (routes H: 0.61, 0.67, 0.65, 0.7, 0.6, 0.8), respectively (routes I: 0.65, 0.67, 0.7, 0.8, 0.65, 0.65).
  • the NMC score of the route on the route H is the average of the NMC scores of the intermediate nodes, which is 0.6717.
  • the NMC score on the route I is the average value of the NMC scores of the intermediate nodes, which is 0.6867.
  • the NMC score of the route is greater than the NMC score of the route of route H.
  • route I is selected as the target route.
  • the experimental results show that this equal-cost routing strategy can make "in the case of any link failure, more than 90% of end-to-end routes can be recovered, and the cost is less than 3 hops.
  • the first routing device if the first routing device is deployed at the source node, the second routing device is deployed at the intermediate node; or the first routing device is deployed in the routing device 141 as shown in FIG. 1a, Selecting the NMC scores of the intermediate nodes in the at least two routes, including: the first routing device acquires the NMC reported by each intermediate node in each of the at least two routes by using a flooding or periodic information exchange mechanism. Score. That is, in one embodiment, the NMC score for each intermediate node can be calculated by each intermediate node and then reported to the first routing device. Or the NMC score of each intermediate node may also be calculated by the first routing device or the second routing device or the routing device 141 as shown in Figure 1a.
  • the NMC score reported by each intermediate node in each of the at least two routes is obtained by flooding.
  • Flooding does not require maintaining the topology of the network and related routing calculations. It only requires that the node receiving the information forwards the packet in a broadcast manner.
  • the source node wants to send a piece of data to the target node.
  • the source node first transmits a copy of the data to each of its neighbor nodes over the network, and each neighbor node transmits the data to the respective node other than the node from which the data was sent. This continues until the data is transferred to the target node or the data set lifetime (TTL) is zero. It can be seen that the NMC score of each intermediate node can be obtained through the scheme.
  • the NMC score reported by each intermediate node in each of the at least two routes is obtained by using a periodic information exchange mechanism.
  • the periodic information exchange mechanism can periodically broadcast its own NMC scores for the intermediate nodes, and so on.
  • FIG. 2e exemplarily shows a schematic flowchart of a method for the first routing device to obtain the NMC score of each intermediate node, as shown in FIG. 2 e.
  • the method includes:
  • Step 251 The first routing device broadcasts a routing request.
  • the routing request includes an identifier of the target node.
  • the first routing device can be deployed to the source node, and the source node can first broadcast a "Route Request" message to its node.
  • the message may include a field of "route record”, a field of "identity of route request", and the like.
  • the “Route Record” field is used to record the identifier of the intermediate node included in the route from the source node to the target node.
  • the identifier of the intermediate node may also be the address of the intermediate node, and the intermediate node can be uniquely found.
  • Step 252 the second routing device receives the routing request.
  • the routing request includes an identifier of the target node.
  • the second routing device is deployed on the intermediate node.
  • Step 253 After determining that the routing request is received for the first time, the second routing device adds the identifier of the intermediate node and the NMC score to the routing record of the routing request according to the identifier of the routing request, and forwards and adds the identifier of the intermediate node. Routing request for NMC scores. Specifically, the forwarding increases the identifier of the intermediate node and the routing request of the NMC score, and the routing request that adds the identifier of the intermediate node and the NMC score can be broadcasted in a broadcast manner.
  • the second routing device determines, after receiving the routing request, whether there is a plurality of determining manners for receiving the routing request for the first time, for example, the method is: the intermediate node maintains a sequence pair list, where The source node identifier of the route request in the sequence pair list, the identifier of the route request>, when the route request is received, if the ⁇ source node identifier of the route request, the identifier of the route request> does not exist in the sequence pair list of the intermediate node , indicating that the routing request is received for the first time, and the routing request ⁇ source node identifier, the identifier of the routing request> is saved in the sequence pair list of the intermediate node; if the source node identifier of the routing request, the routing request The identifier> exists in the sequence pair list of the intermediate node, indicating that the route request has been received before, and this time it is not processed.
  • Another optional method for judging whether the route request is received for the first time is: determining whether the identifier of the intermediate node is included in the “Route Record” field in the route request, and if not, determining that it is received for the first time, and The identifier of the intermediate node and the NMC score are added to the field of the route record of the route request; if it is included, it indicates that the route request has been received before, and this time it is not processed.
  • the target node receives the routing request and returns a routing response to the source node.
  • the route response includes: at least two routes from the source node to the target node, and NMC scores of the intermediate nodes in the at least two routes.
  • the sequence of the identifiers of the intermediate nodes in the route record in the route request constitutes a route
  • the target node attaches the route to the route response, and sends the route to the source node, and the NMC of each intermediate node in the route. Score.
  • the target node may receive multiple routing requests, and there are different routes included in at least two routing requests.
  • the target node attaches at least the two routes to two routing responses or is attached to one route.
  • the response is returned to the source node.
  • the target node replies with a route response for each received route request, where each route response includes a route included in the route request.
  • the target node may invert the sequence of the identifier of the intermediate node in the route record, that is, a route from the target node to the source node, and the target node may return a route response to the source node along the route.
  • the channel is asymmetric, and the target node needs to initiate a routing request process to the source node, and at the same time, the routing response message is carried in the new routing request.
  • Step 255 The first routing device receives the routing response corresponding to the routing request returned by the target node, where the routing response includes: at least two routes from the source node to the target node, and NMC points of the intermediate nodes in the at least two routes. value.
  • the first routing device is deployed on the source node, and after receiving the routing response, the first routing device reverses the sequence of the identifier of the intermediate node included in the routing response, that is, the source node to the target is obtained.
  • the route of the node After receiving the at least two routes, the source node selects the destination route according to the foregoing solution, and details are not described herein.
  • the calculation scheme is simple, the complexity is fast, and the route calculation speed is fast; and each node, such as an intermediate node, needs less state information to be maintained, for example, only It is sufficient to maintain the NMC score of the user.
  • the information exchanged between the nodes in the embodiment of the present application is less, and the information exchanged between each node and the first routing device and the second routing device is less.
  • the network load is alleviated; in the fourth aspect, the target route selected by the solution provided by the embodiment of the present application has strong ability to resist failure, fast self-healing speed, and low cost.
  • the solution provided by the embodiment of the present application is not only applicable to the WMN network, but also effective for the large-scale dynamic network robust routing problem, but the microstructure selection and routing formula in different networks may be different, and may be combined with specific After the scenario is analyzed offline, the relevant conclusions are obtained and then the specific configuration is performed.
  • FIG. 3 exemplarily shows a schematic structural diagram of a routing apparatus provided by the present application.
  • the routing device 300 may include the first routing device in the above content, or may include the first routing device and the second routing device in the above content, or may be the routing device 141 in FIG. 1a in the above content. That is, the routing device 300 may be configured to perform any of the foregoing methods, that is, perform any one of the foregoing methods performed by the first routing device or the second routing device, or execute the first routing device. And any one of the schemes performed by the second routing device, or any of the schemes performed by the routing device 141 described above.
  • the routing device 300 includes a processor 301, a transceiver 302, a memory 303, and a communication interface 304; wherein the processor 301, the transceiver 302, the memory 303, and the communication interface 304 are connected to one another via a bus 305.
  • the bus 305 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 3, but it does not mean that there is only one bus or one type of bus.
  • the memory 303 may include a volatile memory such as a random-access memory (RAM); the memory may also include a non-volatile memory such as a flash memory.
  • RAM random-access memory
  • non-volatile memory such as a flash memory.
  • HDD hard disk drive
  • SSD solid-state drive
  • the memory 303 may also include a combination of the above types of memories.
  • the communication interface 304 can be a wired communication access port, a wireless communication interface, or a combination thereof, wherein the wired communication interface can be, for example, an Ethernet interface.
  • the Ethernet interface can be an optical interface, an electrical interface, or a combination thereof.
  • the wireless communication interface can be a WLAN interface.
  • the processor 301 can be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP.
  • the processor 301 may further include a hardware chip.
  • the hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.
  • the PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL), or any combination thereof.
  • the memory 303 can also be used to store program instructions, and the processor 301 calls the program instructions stored in the memory 303 to perform one or more steps in the embodiment shown in FIG. 2 to FIG. 2e, or alternatively
  • the embodiment enables the routing device 300 to implement the functions of the first routing device and/or the second routing device in the above method, and to cause the routing device 300 to implement the functions of the routing device 141 in the above method.
  • the processor 301 is configured to control the transceiver 302 to perform signal reception and signal transmission according to the instruction for executing the memory storage.
  • the routing device is configured to: acquire at least two of the source node to the target node. And routing the NMC scores of the intermediate nodes of the at least two routes; and selecting a destination route from the at least two routes according to the NMC score of the intermediate nodes in the at least two routes; wherein, the middle The NMC score of the node is obtained according to the number of polygons constructed by the intermediate node; wherein the intermediate node is the vertex of the polygon constructed by the intermediate node.
  • the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node, and the intermediate node is a vertex of the polygon constructed by the intermediate node, that is, an NMC score of an intermediate node.
  • the number of polygons that the intermediate node participates in constructing may be reflected. Since the polygon is closed and the intermediate node is a vertex of the polygon, the number of polygons constructed by the intermediate node may reflect that the link of the intermediate node is faulty.
  • the fault repairing capability of the intermediate node, and the target route is selected from the source node to the target node according to the NMC score of the intermediate node in the at least two routes in the embodiment of the present application, that is, the implementation of the present application
  • the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
  • the first route and the second route are equivalent to the at least two routes; wherein the first route and the second route are any two routes of the at least two routes; the first route and the second route meet the following content Any one of the following: the hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route; the transmission delay of the first route is the same as the transmission delay included in the second route; the first route The sum of the weights of the included links is the same as the sum of the weights of the links included in the second route; the sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route; the first route The sum of the weight of the included link and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node.
  • the target route selected in the embodiment of the present application considers the route repair capability of each intermediate node on the route, and thus the reliability of the route can be improved. Further, for the two equal-cost routes, the advantages of the method in the present application can be further improved. In this embodiment, the fault repair capability of the route in the two equal-cost routes is determined to be higher.
  • the NMC score of the intermediate node is obtained according to the number of M-type polygons constructed by the intermediate node; wherein, M is an integer greater than or equal to 1, and if M is greater than or equal to 2, any two of the M-type polygons Class polygons have different numbers of sides.
  • M is an integer greater than or equal to 1
  • M is greater than or equal to 2
  • any two of the M-type polygons Class polygons have different numbers of sides.
  • the NMC score of the intermediate node is: performing weighting calculation on the number of each type of polygon in the M-type polygon constructed by the intermediate node according to the weight corresponding to each type of polygon in the M-type polygon; wherein The NMC score of the intermediate node is used to indicate: the fault repair capability of the intermediate node.
  • the weights of each type of polygon in the M-type polygon can be set according to actual conditions, for example, the weight of each type of polygon is the same, both are 1; or the polygons with more edges may have a larger routing delay after repairing, Therefore, the polygons with more edges may have smaller weights, etc., so that the NMC score is balanced between the fault repair capability of the intermediate node and the delay of the repaired route.
  • the processor 301 is configured to determine, according to an NMC score of the intermediate node in the at least two routes, an NMC score of the route in the at least two routes, where the NMC score of the route is used to indicate the The fault repairing capability of the route is determined by the NMC score of the route of the at least two routes, and the route corresponding to the NMC score of the route with the strongest fault repair capability is determined as the target route.
  • the processor 301 is configured to determine, by using any one of the following methods, the NMC score of the route in the at least two routes: the NMC score of the intermediate node that has the weakest fault repair capability indicated in the route in the at least two routes.
  • the NMC score is determined as a route; the intermediate node NMC score in the route of at least two routes is mathematically calculated, and the result of the mathematical calculation is determined as the NMC score of the route.
  • the transceiver 302 is further configured to: obtain, by using a flooding or periodic information exchange mechanism, an NMC score reported by each of the at least two routes.
  • the processor 301 obtains the NMC score of the intermediate node, and the control transceiver 302 receives the NMC score reported by each of the at least two routes, and may also calculate at least two by the processor 301.
  • the NMC score of each intermediate node in each route in the route is further configured to: obtain, by using a flooding or periodic information exchange mechanism, an NMC score reported by each of the at least two routes.
  • the processor 301 obtains the NMC score of the intermediate node
  • the control transceiver 302 receives the NMC score reported by each of the at least two routes, and may also calculate at least two by the processor 301.
  • the NMC score of each intermediate node in each route in the route may also calculate at least two by the processor 301.
  • the transceiver 302 is configured to: broadcast a routing request; where the routing request includes an identifier of the target node; and receive a routing response corresponding to the routing request returned by the target node; where the routing response includes: the source node to the target node At least two routes, and NMC scores of intermediate nodes in at least two routes.
  • routing device 300 can be integrated on the source node.
  • FIG. 4 exemplarily shows a schematic structural diagram of a routing apparatus provided by the present application.
  • the routing device 400 may include the second routing device in the above content, or may include the first routing device and the second routing device in the above content, or may be the routing device 141 in FIG. 1a in the above content. That is, the routing device 400 can be configured to perform any of the foregoing methods, that is, perform any one of the foregoing methods performed by the first routing device or the second routing device, and execute the routing device 141. Any of the programs implemented.
  • the routing device 400 includes a processor 401, a transceiver 402, a memory 403, and a communication interface 404; wherein the processor 401, the transceiver 402, the memory 403, and the communication interface 404 are connected to one another via a bus 405.
  • the bus 405 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 4, but it does not mean that there is only one bus or one type of bus.
  • the memory 403 may include a volatile memory such as a random-access memory (RAM); the memory may also include a non-volatile memory such as a flash memory.
  • RAM random-access memory
  • the memory may also include a non-volatile memory such as a flash memory.
  • a hard disk drive (HDD) or a solid-state drive (SSD); the memory 403 may also include a combination of the above types of memories.
  • the communication interface 404 can be a wired communication access port, a wireless communication interface, or a combination thereof, wherein the wired communication interface can be, for example, an Ethernet interface.
  • the Ethernet interface can be an optical interface, an electrical interface, or a combination thereof.
  • the wireless communication interface can be a WLAN interface.
  • the processor 401 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP.
  • the processor 401 may further include a hardware chip.
  • the hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.
  • the PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL), or any combination thereof.
  • the memory 403 can also be used to store program instructions, and the processor 401 calls the program instructions stored in the memory 403, and can perform one or more steps in the embodiment shown in FIG. 2 to FIG. 2e, or
  • the embodiment enables the routing device 400 to implement the functions of the first routing device and/or the second routing device in the above method, or to cause the routing device 400 to implement the functions of the routing device 141 in the above method.
  • the processor 401 is configured to control the transceiver 402 to perform signal reception and signal transmission according to the instruction for executing the memory storage.
  • the routing device is configured to: at least two for the source node to the target node.
  • An intermediate node in the routing performing: determining, according to network topology information of the intermediate node, a number of polygons constructed by the intermediate node; wherein the intermediate node is a vertex of a polygon constructed by the intermediate node; and a polygon constructed according to the intermediate node
  • the NMC score of the intermediate node is determined by the quantity; the NMC score of the intermediate node is reported; wherein the NMC score of the intermediate node in the at least two routes is used: according to the intermediate node of the at least two routes
  • the NMC score selects a destination route from at least two routes.
  • the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node, and the intermediate node is a vertex of the polygon constructed by the intermediate node, that is, an NMC score of an intermediate node.
  • the number of polygons that the intermediate node participates in constructing may be reflected. Since the polygon is closed and the intermediate node is a vertex of the polygon, the number of polygons constructed by the intermediate node may reflect that the link of the intermediate node is faulty.
  • the fault repairing capability of the intermediate node, and the target route is selected from the source node to the target node according to the NMC score of the intermediate node in the at least two routes in the embodiment of the present application, that is, the implementation of the present application
  • the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
  • the first route and the second route are equivalent to the at least two routes; wherein the first route and the second route are any two routes of the at least two routes; the first route and the second route meet the following content Any one of the following: the hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route; the transmission delay of the first route is the same as the transmission delay included in the second route; the first route The sum of the weights of the included links is the same as the sum of the weights of the links included in the second route; the sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route; the first route The sum of the weight of the included link and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node.
  • the target route selected in the embodiment of the present application considers the route repair capability of each intermediate node on the route, and thus the reliability of the route can be improved. Further, for the two equal-cost routes, the advantages of the present application can be further improved. In this embodiment, the fault repair capability of the route in the two equal-cost routes is determined to be higher.
  • the processor 401 is configured to determine, according to network topology information of the intermediate node, the number of M types of polygons constructed by the intermediate node, where M is an integer greater than or equal to 1, and if M is greater than or equal to 2, The number of sides of any two types of polygons in the M-type polygon is different; according to the number of M-type polygons constructed by the intermediate node, the NMC score of the intermediate node is determined.
  • the M-type polygon can be reasonably set according to the actual situation and the specific application scenario, so that the NMC score more accurately reflects the fault repair capability of the intermediate node.
  • the processor 401 is configured to: determine a weight corresponding to each type of polygon in the M-type polygon; and, according to the weight corresponding to each type of polygon in the M-type polygon, each type of polygon in the M-type polygon constructed by the intermediate node The number is weighted; the result of weighting the number of each type of polygon in the M-type polygon constructed by the intermediate node is determined as the NMC score of the intermediate node.
  • the weights of each type of polygon in the M-type polygon can be set according to actual conditions, for example, the weight of each type of polygon is the same, both are 1; or the polygons with more edges may have a larger routing delay after repairing, Therefore, the polygons with more edges may have smaller weights, etc., so that the NMC score is balanced between the fault repair capability of the intermediate node and the delay of the repaired route.
  • the transceiver 402 is further configured to: obtain, by using a flooding or periodic information exchange mechanism, an NMC score reported by each of the at least two routes.
  • the NMC score reported by each of the at least two routes may be received by the transceiver 402, and each of the at least two routes may be calculated by the processor 401.
  • the NMC score of the node may be obtained by using a flooding or periodic information exchange mechanism.
  • the transceiver 402 is configured to: receive a routing request, where the routing request includes an identifier of the target node; and after determining that the routing request is received for the first time, the identifier of the intermediate node and the NMC score are determined according to the identifier of the routing request. Add to the routing record of the routing request, and forward the routing request with the identifier of the intermediate node and the NMC score.
  • routing device 300 can be integrated on the intermediate node.
  • FIG. 5 is a schematic structural diagram of a routing apparatus provided by an embodiment of the present application.
  • the routing device 500 may include the first routing device in the above content, or may include the first routing device and the second routing device in the above content, or may be the routing device 141 in FIG. 1a in the above content. That is, the routing device 500 can be used to perform any of the above methods. As shown in FIG. 5, the routing device 500 includes a receiving unit 501, a processing unit 502, and a transmitting unit 503.
  • the processing unit 502 is configured to: obtain at least two routes from the source node to the target node, and obtain a micro structure count NMC score of the intermediate node in the at least two routes; according to the NMC score of the intermediate node in the at least two routes, A target route is selected from at least two routes; wherein the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node; wherein the intermediate node is a vertex of the polygon constructed by the intermediate node.
  • the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node, and the intermediate node is a vertex of the polygon constructed by the intermediate node, that is, an NMC score of an intermediate node.
  • the number of polygons that the intermediate node participates in constructing may be reflected. Since the polygon is closed and the intermediate node is a vertex of the polygon, the number of polygons constructed by the intermediate node may reflect that the link of the intermediate node is faulty.
  • the fault repairing capability of the intermediate node, and the target route is selected from the source node to the target node according to the NMC score of the intermediate node in the at least two routes in the embodiment of the present application, that is, the implementation of the present application
  • the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
  • the first route and the second route are equivalent to the at least two routes; wherein the first route and the second route are any two routes of the at least two routes; the first route and the second route meet the following content Any one of the following: the hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route; the transmission delay of the first route is the same as the transmission delay included in the second route; the first route The sum of the weights of the included links is the same as the sum of the weights of the links included in the second route; the sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route; the first route The sum of the weight of the included link and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node.
  • the target route selected in the embodiment of the present application considers the route repair capability of each intermediate node on the route, and thus the reliability of the route can be improved. Further, for the two equal-cost routes, the advantages of the method in the present application can be further improved. In this embodiment, the fault repair capability of the route in the two equal-cost routes is determined to be higher.
  • the NMC score of the intermediate node is obtained according to the number of M-type polygons constructed by the intermediate node; wherein, M is an integer greater than or equal to 1, and if M is greater than or equal to 2, any two of the M-type polygons Class polygons have different numbers of sides.
  • M is an integer greater than or equal to 1
  • M is greater than or equal to 2
  • any two of the M-type polygons Class polygons have different numbers of sides.
  • the NMC score of the intermediate node is: performing weighting calculation on the number of each type of polygon in the M-type polygon constructed by the intermediate node according to the weight corresponding to each type of polygon in the M-type polygon; wherein The NMC score of the intermediate node is used to indicate: the fault repair capability of the intermediate node.
  • the weights of each type of polygon in the M-type polygon can be set according to actual conditions, for example, the weight of each type of polygon is the same, both are 1; or the polygons with more edges may have a larger routing delay after repairing, Therefore, the polygons with more edges may have smaller weights, etc., so that the NMC score is balanced between the fault repair capability of the intermediate node and the delay of the repaired route.
  • the processing unit 502 is configured to determine, according to an NMC score of the intermediate node in the at least two routes, an NMC score of the route in the at least two routes, where the NMC score of the route is used to indicate the The fault repairing capability of the route is determined by the NMC score of the route of the at least two routes, and the route corresponding to the NMC score of the route with the strongest fault repair capability is determined as the target route.
  • the processing unit 502 is configured to determine, by using any one of the following methods, the NMC score of the route in the at least two routes: the NMC score of the intermediate node that has the weakest fault repair capability indicated in the route in the at least two routes.
  • the NMC score is determined as a route; the intermediate node NMC score in the route of at least two routes is mathematically calculated, and the result of the mathematical calculation is determined as the NMC score of the route.
  • the receiving unit 501 is further configured to: obtain, by using a flooding or periodic information exchange mechanism, an NMC score reported by each intermediate node in each of the at least two routes.
  • the processing unit obtains the NMC score of the intermediate node, and the control receiving unit receives the NMC score reported by each of the at least two routes in the at least two routes; or the at least two routes are calculated by the processing unit.
  • the sending unit 503 is configured to: broadcast a routing request, where the routing request includes an identifier of the target node, and the receiving unit 501 is configured to receive a routing response corresponding to the routing request returned by the target node, where the routing response includes: At least two routes from the source node to the destination node, and NMC scores of intermediate nodes in at least two routes.
  • routing device 500 can be integrated on the source node.
  • routing device 300 can include a processor 301, a transceiver 302, and a memory 303.
  • the memory 303 can be used to store the code when the processor 301 executes the solution, and the code can be a program/code pre-installed by the routing device 300 at the factory.
  • FIG. 6 is a schematic structural diagram of a routing apparatus provided by an embodiment of the present application.
  • the routing device 600 may include the second routing device in the above content, or may include the first routing device and the second routing device in the above content, or may be the routing device 141 in FIG. 1a in the above content. That is, the routing device 600 can be used to perform any of the above methods. As shown in FIG. 6, the routing device 600 includes a receiving unit 601, a processing unit 602, and a transmitting unit 603.
  • the processing unit 602 is configured to: determine, according to the network topology information of the intermediate node, the number of polygons constructed by the intermediate node, where the intermediate node is the intermediate node, and the intermediate node of the at least two routes of the source node to the target node The vertices of the constructed polygons; determining the NMC score of the microstructure of the intermediate node according to the number of polygons constructed by the intermediate node; reporting the NMC score of the intermediate node; wherein, the NMC points of the intermediate nodes in at least two routes The value is used to: select a target route from at least two routes according to an NMC score of an intermediate node in at least two routes.
  • the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node, and the intermediate node is a vertex of the polygon constructed by the intermediate node, that is, an NMC score of an intermediate node.
  • the number of polygons that the intermediate node participates in constructing may be reflected. Since the polygon is closed and the intermediate node is a vertex of the polygon, the number of polygons constructed by the intermediate node may reflect that the link of the intermediate node is faulty.
  • the fault repairing capability of the intermediate node, and the target route is selected from the source node to the target node according to the NMC score of the intermediate node in the at least two routes in the embodiment of the present application, that is, the implementation of the present application
  • the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
  • the first route and the second route are equivalent to the at least two routes; wherein the first route and the second route are any two routes of the at least two routes; the first route and the second route meet the following content Any one of the following: the hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route; the transmission delay of the first route is the same as the transmission delay included in the second route; the first route The sum of the weights of the included links is the same as the sum of the weights of the links included in the second route; the sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route; the first route The sum of the weight of the included link and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node.
  • the target route selected in the embodiment of the present application considers the route repair capability of each intermediate node on the route, and thus the reliability of the route can be improved. Further, for the two equal-cost routes, the advantages of the method in the present application can be further improved. In this embodiment, the fault repair capability of the route in the two equal-cost routes is determined to be higher.
  • the processing unit 602 is configured to: determine, according to network topology information of the intermediate node, the number of M types of polygons constructed by the intermediate node; where M is an integer greater than or equal to 1, and if M is greater than or equal to 2, The number of sides of any two types of polygons in the M-type polygon is different; according to the number of M-type polygons constructed by the intermediate node, the NMC score of the intermediate node is determined.
  • M-type polygon can be reasonably set according to the actual situation and the specific application scenario, so that the NMC score more accurately reflects the fault repair capability of the intermediate node.
  • the processing unit 602 is configured to: determine weights corresponding to each type of polygon in the M type polygon; and perform weights of each type of polygon in the M type polygon constructed by the intermediate node according to weights corresponding to each type of polygon in the M type polygon The number is weighted; the result of weighting the number of each type of polygon in the M-type polygon constructed by the intermediate node is determined as the NMC score of the intermediate node.
  • the weights of each type of polygon in the M-type polygon can be set according to actual conditions, for example, the weight of each type of polygon is the same, both are 1; or the polygons with more edges may have a larger routing delay after repairing, Therefore, the polygons with more edges may have smaller weights, etc., so that the NMC score is balanced between the fault repair capability of the intermediate node and the delay of the repaired route.
  • the receiving unit 601 is further configured to: obtain, by using a flooding or periodic information exchange mechanism, an NMC score reported by each of the at least two routes.
  • the receiving unit 601 can receive the NMC score reported by each of the at least two routes, and the processing unit 602 can calculate each middle of each of the at least two routes. The NMC score of the node.
  • the receiving unit 601 is configured to: receive a routing request, where the routing request includes an identifier of the target node, and the processing unit 602 is configured to: after determining that the routing request is received for the first time, the intermediate node is determined according to the identifier of the routing request The identifier and the NMC score are added to the routing record of the routing request, and the routing request that adds the identity of the intermediate node and the NMC score is forwarded by the sending unit 603.
  • routing device 600 can be integrated on the intermediate node.
  • routing device 400 can include a processor 401, a transceiver 402, and a memory 403.
  • the memory 403 can be used to store the code when the processor 401 executes the solution, and the code can be a program/code pre-installed by the routing device 400 at the factory.
  • the embodiment of the present application provides a computer storage medium for storing computer program instructions used by the routing device 300, including a program for executing the above routing method.
  • the computer storage medium can be any available media or data storage device accessible by the computer, including but not limited to magnetic memory (eg, floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical storage (eg, CD, DVD, BD, HVD, etc.), and semiconductor memories (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state hard disk (SSD)).
  • magnetic memory eg, floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.
  • optical storage eg, CD, DVD, BD, HVD, etc.
  • semiconductor memories such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state hard disk (SSD)).
  • the embodiment of the present application further provides another computer storage medium for storing computer program instructions used by the routing device 400, including a program for executing the routing method described above.
  • the computer storage medium can be any available media or data storage device accessible by the computer, including but not limited to magnetic memory (eg, floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical storage (eg, CD, DVD, BD, HVD, etc.), and semiconductor memories (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state hard disk (SSD)).
  • magnetic memory eg, floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.
  • optical storage eg, CD, DVD, BD, HVD, etc.
  • semiconductor memories such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state hard disk (SSD)).
  • embodiments of the present application can be provided as a method, system, or computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A route selection method and apparatus, which select a target route by means of combining a fault resistance capability of the route, thereby improving communication reliability. In the embodiments of the present application, an NMC value of a middle node is obtained according to the number of polygons constructed by the middle node, and the middle node serves as a vertex of the polygon constructed by the middle node, that is to say, an NMC value of one middle node can reflect the number of polygons, the construction of which the middle node participates in. Since the polygon is closed, and the middle node is the vertex of the polygon, the number of polygons constructed by the middle node may reflect a fault resistance capability of the middle node after a chain of the middle node fails, such that a target route selected based on the fault resistance capability of the middle node in the embodiments of the present application improves the communication reliability.

Description

一种路由选择方法和装置Routing method and device
本申请要求于2017年03月29日提交中国专利局、申请号为201710197733.2、申请名称为“一种路由选择方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims the priority of the Chinese Patent Application, which is filed on March 29, 2017, filed on Jan. 29,,,,,,,,,,,,,,,,,,,,,, .
技术领域Technical field
本申请涉及通信领域,尤其涉及一种路由选择方法和装置。The present application relates to the field of communications, and in particular, to a routing method and apparatus.
背景技术Background technique
无线Mesh网络又称无线网状网或无线网格网,它融合了无线局域网(Wireless Local Area Network,WLAN)技术和AdHoc网络的优势,是一种大容量、高速率、覆盖范围广的网络。无线Mesh网是低功率的多级跳点(multihop)系统,它们处理消息的方式是把信息包从一个节点传递到另一个节点,直到信息包到达目的地。每个无线Mesh网络的节点可以作为接入终端,也可具有路由和信息转发功能,具有极高的组网自由度。Wireless Mesh network, also known as wireless mesh network or wireless mesh network, combines the advantages of Wireless Local Area Network (WLAN) technology and AdHoc network. It is a network with large capacity, high speed and wide coverage. Wireless Mesh networks are low-power multi-hop multihop systems that process messages by passing packets from one node to another until the packet reaches its destination. The nodes of each wireless Mesh network can serve as access terminals, and can also have routing and information forwarding functions, and have extremely high networking degrees of freedom.
无线Mesh网络可提供从源节点到目标节点多条冗余路由。如果一条路由上的节点由于硬件故障或干扰而停止工作,网状网会自动改变信息包的路由,使它们穿过一条替代路由。现有技术中可通过最短路径优先协议(Open Shortest Path First,OSPF)进行源节点到目标节点的路由的选择。举个例子,源节点到目标节点有5条路由,从该5条路由中选择出最短路径的路由作为目标路由,并使源节点和目标节点通过目标路由进行通讯。A wireless mesh network provides multiple redundant routes from a source node to a destination node. If a node on a route stops working due to hardware failure or interference, the mesh automatically changes the routing of the packets and passes them through an alternate route. In the prior art, the route from the source node to the target node can be selected through Open Shortest Path First (OSPF). For example, the source node has five routes to the target node, and the route with the shortest path is selected from the five routes as the target route, and the source node and the target node communicate through the target route.
在上述方案中,仅仅考虑到了路由的长短,但是在实际通讯过程中,路由中的节点会经常出现故障,可见,将路径最短作为选择目标路由的唯一因素并不能提高通讯的可靠性。In the above solution, only the length of the route is considered, but in the actual communication process, the nodes in the route often fail. It can be seen that the shortest path as the only factor for selecting the target route does not improve the reliability of the communication.
发明内容Summary of the invention
本申请实施例提供一种路由选择方法和装置,用以结合路由抵抗故障的能力选择目标路由,从而提高通讯的可靠性。The embodiment of the present application provides a routing method and device, which are used to select a target route in combination with the ability of a route to resist failure, thereby improving communication reliability.
第一方面,本申请实施例提供一种路由选择方法,包括获取源节点到目标节点的至少两条路由,并获取至少两条路由中的中间节点的微结构计数NMC分值;其中,中间节点的NMC分值是根据该中间节点构建的多边形的数量得到的;其中,该中间节点为该中间节点构建的多边形的顶点;根据至少两条路由中的中间节点的NMC分值,从至少两条路由中选择出一条目标路由。In a first aspect, the embodiment of the present application provides a routing method, including acquiring at least two routes from a source node to a target node, and acquiring a micro-structure count NMC score of an intermediate node in at least two routes; wherein, the intermediate node The NMC score is obtained according to the number of polygons constructed by the intermediate node; wherein the intermediate node is a vertex of the polygon constructed by the intermediate node; according to the NMC score of the intermediate node in at least two routes, from at least two A destination route is selected in the route.
本申请实施例中,中间节点的NMC分值是根据该中间节点构建的多边形的数量得到的,且该中间节点为该中间节点构建的多边形的顶点,也就是说,一个中间节点的NMC分值可以反映出该中间节点参与构建的多边形的数量,由于多边形是封闭的,且该中间节点为该多边形的顶点,因此该中间节点构建多边形的数量可以反映出该中间节点的链路出现故障后该中间节点的故障修复能力,又由于本申请实施例中根据至少两条路由中的中间节点的NMC分值从源节点到目标节点的至少两条路由中选择目标路由,也就是说,本申请实施例中是基于中间节点的故障修复能力选择的目标路由,因此本申请实施例所提供的方案可提高目标路由抵抗故障的能力,从而提高通讯的可靠性。In the embodiment of the present application, the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node, and the intermediate node is a vertex of the polygon constructed by the intermediate node, that is, an NMC score of an intermediate node. The number of polygons that the intermediate node participates in constructing may be reflected. Since the polygon is closed and the intermediate node is a vertex of the polygon, the number of polygons constructed by the intermediate node may reflect that the link of the intermediate node is faulty. The fault repairing capability of the intermediate node, and the target route is selected from the source node to the target node according to the NMC score of the intermediate node in the at least two routes in the embodiment of the present application, that is, the implementation of the present application In the example, the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
可选地,至少两条路由中第一路由和第二路由等价;其中,第一路由和第二路由为至少两条路由中的任两条路由;第一路由和第二路由满足以下内容中的任一项:第一路由包 括的节点间的跳数与第二路由包括的节点间的跳数相同;第一路由的传输时延与第二路由包括的传输时延相同;第一路由包括的链路的权重的和与第二路由包括的链路的权重的和相同;第一路由包括的中间节点的权重的和与第二路由包括的中间节点的权重的和相同;第一路由包括的链路的权重和中间节点的权重的和与第二路由包括的链路的权重和中间节点的权重的和相同。通过上述论述可见,本申请实施例中选择出的目标路由是考虑了路由上各个中间节点的路由修复能力的,因此可提高路由的可靠性。进一步,针对两条等价的路由,本申请实施例中可以更加显出优势,本申请实施例中可以确定出两条等价的路由中那条路由的故障修复能力更高。Optionally, the first route and the second route are equivalent to the at least two routes; wherein the first route and the second route are any two routes of the at least two routes; the first route and the second route meet the following content Any one of the following: the hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route; the transmission delay of the first route is the same as the transmission delay included in the second route; the first route The sum of the weights of the included links is the same as the sum of the weights of the links included in the second route; the sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route; the first route The sum of the weight of the included link and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node. It can be seen from the above that the target route selected in the embodiment of the present application considers the route repair capability of each intermediate node on the route, and thus the reliability of the route can be improved. Further, for the two equal-cost routes, the advantages of the method in the present application can be further improved. In this embodiment, the fault repair capability of the route in the two equal-cost routes is determined to be higher.
可选地,中间节点的NMC分值是:根据该中间节点构建的M类多边形的数量得到的;其中,M为大于等于1的整数,且若M大于等于2时,M类多边形中任两类多边形的边数不同。如此,可以根据实际情况以及具体的应用场景合理设置M类多边形,从而使NMC分值更加准确的反映该中间节点的故障修复能力。Optionally, the NMC score of the intermediate node is obtained according to the number of M-type polygons constructed by the intermediate node; wherein, M is an integer greater than or equal to 1, and if M is greater than or equal to 2, any two of the M-type polygons Class polygons have different numbers of sides. In this way, the M-type polygon can be reasonably set according to the actual situation and the specific application scenario, so that the NMC score more accurately reflects the fault repair capability of the intermediate node.
可选地,中间节点的NMC分值是:将根据M类多边形中每类多边形对应的权重,将该中间节点构建的M类多边形中的每类多边形的数量进行加权计算得到的;其中,该中间节点的NMC分值用于指示:该中间节点的故障修复能力。如此,M类多边形中每类多边形对应的权重可以根据实际情况设定,比如每类多边形的权重都相同,都为1;或者由于边数越多的多边形可能修复后的路由时延较大,因此边数越多的多边形的权重可能越小等等,从而使NMC分值在该中间节点的故障修复能力以及修复后路由的时延之间进行平衡。Optionally, the NMC score of the intermediate node is: performing weighting calculation on the number of each type of polygon in the M-type polygon constructed by the intermediate node according to the weight corresponding to each type of polygon in the M-type polygon; wherein The NMC score of the intermediate node is used to indicate: the fault repair capability of the intermediate node. Thus, the weights of each type of polygon in the M-type polygon can be set according to actual conditions, for example, the weight of each type of polygon is the same, both are 1; or the polygons with more edges may have a larger routing delay after repairing, Therefore, the polygons with more edges may have smaller weights, etc., so that the NMC score is balanced between the fault repair capability of the intermediate node and the delay of the repaired route.
可选地,根据至少两条路由中的中间节点的NMC分值,从至少两条路由中选择出一条目标路由,包括:根据至少两条路由中的中间节点的NMC分值,确定出至少两条路由中路由的NMC分值;其中,该路由的NMC分值用于指示该路由的故障修复能力;根据至少两条路由中路由的NMC分值,将指示的故障修复能力最强的路由的NMC分值对应的路由确定为目标路由。Optionally, selecting a target route from the at least two routes according to the NMC score of the intermediate node in the at least two routes, including: determining, according to the NMC score of the intermediate node in the at least two routes, at least two The NMC score of the route in the route; wherein the NMC score of the route is used to indicate the fault repair capability of the route; according to the NMC score of the route in at least two routes, the route with the strongest fault repair capability indicated The route corresponding to the NMC score is determined as the target route.
可选地,根据至少两条路由中的中间节点的NMC分值,确定出至少两条路由中路由的NMC分值,包括以下任一种方式:将至少两条路由中路由中指示的故障修复能力最弱的中间节点的NMC分值确定为路由的NMC分值;将至少两条路由中路由中的中间节点NMC分值进行数学计算,并将数学计算的结果确定为路由的NMC分值。Optionally, determining, according to the NMC score of the intermediate node in the at least two routes, the NMC score of the route in the at least two routes, including the following manner: repairing the fault indicated in the route in the at least two routes The NMC score of the weakest intermediate node is determined as the NMC score of the route; the intermediate node NMC score in the route of at least two routes is mathematically calculated, and the result of the mathematical calculation is determined as the NMC score of the route.
可选地,获取至少两条路由中的中间节点的NMC分值,包括:通过洪泛或周期性信息交换机制获取至少两条路由中每条路由中的每个中间节点上报的NMC分值。可选地,获取中间节点的NMC分值可通过接收至少两条路由中每条路由中的每个中间节点上报的NMC分值,也可通过直接计算的方式计算至少两条路由中每条路由中的每个中间节点的NMC分值。Optionally, the NMC scores of the intermediate nodes in the at least two routes are obtained, and the NMC scores reported by each of the at least two routes are obtained by using a flooding or periodic information exchange mechanism. Optionally, the NMC score of the intermediate node may be obtained by receiving the NMC score reported by each of the at least two routes, or calculating the route of each of the at least two routes by directly calculating. The NMC score for each intermediate node in .
可选地,获取源节点到目标节点的至少两条路由,并获取至少两条路由中的中间节点的NMC分值,包括:广播路由请求;其中,路由请求中包括目标节点的标识;接收目标节点返回的路由请求对应的路由响应;其中,路由响应中包括:源节点到目标节点的至少两条路由,以及至少两条路由中的中间节点的NMC分值。可选地,为了兼容现有技术,该方案可由设置于源节点上的路由选择装置执行。Optionally, obtaining at least two routes from the source node to the target node, and acquiring NMC scores of the intermediate nodes in the at least two routes, including: a broadcast routing request; wherein the routing request includes an identifier of the target node; and receiving the target The route response corresponding to the route request returned by the node, where the route response includes: at least two routes from the source node to the target node, and an NMC score of the intermediate node in the at least two routes. Alternatively, to be compatible with the prior art, the scheme can be performed by a routing device disposed on the source node.
第二方面,本申请实施例提供一种路由选择方法,包括:针对源节点到目标节点的至少两条路由中的中间节点,执行:根据该中间节点的网络拓扑信息确定该中间节点构建的多边形的数量;其中,该中间节点为该中间节点构建的多边形的顶点;据该中间节点构建 的多边形的数量,确定该中间节点的微结构计数NMC分值;上报该中间节点的NMC分值;其中,至少两条路由中的中间节点的NMC分值用于:根据至少两条路由中的中间节点的NMC分值,从至少两条路由中选择出一条目标路由。本申请实施例中是基于中间节点的故障修复能力选择的目标路由,因此本申请实施例所提供的方案可提高目标路由抵抗故障的能力,从而提高通讯的可靠性。In a second aspect, the embodiment of the present application provides a routing method, including: performing, for an intermediate node of at least two routes from a source node to a target node, determining, according to network topology information of the intermediate node, a polygon constructed by the intermediate node. The number of the vertices of the polygon constructed by the intermediate node; determining the NMC score of the microstructure of the intermediate node according to the number of polygons constructed by the intermediate node; reporting the NMC score of the intermediate node; The NMC score of the intermediate node in the at least two routes is used to: select a target route from the at least two routes according to the NMC score of the intermediate node in the at least two routes. In the embodiment of the present application, the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
可选地,至少两条路由中第一路由和第二路由等价;其中,第一路由和第二路由为至少两条路由中的任两条路由;第一路由和第二路由满足以下内容中的任一项:第一路由包括的节点间的跳数与第二路由包括的节点间的跳数相同;第一路由的传输时延与第二路由包括的传输时延相同;第一路由包括的链路的权重的和与第二路由包括的链路的权重的和相同;第一路由包括的中间节点的权重的和与第二路由包括的中间节点的权重的和相同;第一路由包括的链路的权重和中间节点的权重的和与第二路由包括的链路的权重和中间节点的权重的和相同。通过上述论述可见,本申请实施例中选择出的目标路由是考虑了路由上各个中间节点的路由修复能力的,因此可提高路由的可靠性。进一步,针对两条等价的路由,本申请实施例中可以更加显出优势,本申请实施例中可以确定出两条等价的路由中那条路由的故障修复能力更高。Optionally, the first route and the second route are equivalent to the at least two routes; wherein the first route and the second route are any two routes of the at least two routes; the first route and the second route meet the following content Any one of the following: the hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route; the transmission delay of the first route is the same as the transmission delay included in the second route; the first route The sum of the weights of the included links is the same as the sum of the weights of the links included in the second route; the sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route; the first route The sum of the weight of the included link and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node. It can be seen from the above that the target route selected in the embodiment of the present application considers the route repair capability of each intermediate node on the route, and thus the reliability of the route can be improved. Further, for the two equal-cost routes, the advantages of the method in the present application can be further improved. In this embodiment, the fault repair capability of the route in the two equal-cost routes is determined to be higher.
可选地,根据该中间节点的网络拓扑信息确定该中间节点构建的多边形的数量,包括:根据该中间节点的网络拓扑信息,确定该中间节点构建的M类多边形的数量;其中,M为大于等于1的整数,且若M大于等于2时,M类多边形中任两类多边形的边数不同;据该中间节点构建的多边形的数量,确定该中间节点的NMC分值,包括:根据该中间节点构建的M类多边形的数量,确定该中间节点的NMC分值。如此,可以根据实际情况以及具体的应用场景合理设置M类多边形,从而使NMC分值更加准确的反映该中间节点的故障修复能力。Optionally, determining the number of polygons constructed by the intermediate node according to the network topology information of the intermediate node, including: determining, according to network topology information of the intermediate node, the number of M types of polygons constructed by the intermediate node; wherein, M is greater than An integer equal to 1, and if M is greater than or equal to 2, the number of sides of any two types of polygons in the M-type polygon is different; determining the NMC score of the intermediate node according to the number of polygons constructed by the intermediate node, including: according to the middle The number of M-type polygons constructed by the node determines the NMC score of the intermediate node. In this way, the M-type polygon can be reasonably set according to the actual situation and the specific application scenario, so that the NMC score more accurately reflects the fault repair capability of the intermediate node.
可选地,根据该中间节点构建的M类多边形的数量,确定该中间节点的NMC分值包括:确定M类多边形中每类多边形对应的权重;根据M类多边形中每类多边形对应的权重,将该中间节点构建的M类多边形中的每类多边形的数量进行加权计算;将该中间节点构建的M类多边形中的每类多边形的数量加权计算后的结果确定为该中间节点的NMC分值。如此,M类多边形中每类多边形对应的权重可以根据实际情况设定,比如每类多边形的权重都相同,都为1;或者由于边数越多的多边形可能修复后的路由时延较大,因此边数越多的多边形的权重可能越小等等,从而使NMC分值在该中间节点的故障修复能力以及修复后路由的时延之间进行平衡。Optionally, determining the NMC score of the intermediate node according to the number of M types of polygons constructed by the intermediate node includes: determining a weight corresponding to each type of polygon in the M type polygon; and according to weights corresponding to each type of polygon in the M type polygon, Weighting the number of each type of polygon in the M-type polygon constructed by the intermediate node; determining the result of weighting the number of each type of polygon in the M-type polygon constructed by the intermediate node as the NMC score of the intermediate node . Thus, the weights of each type of polygon in the M-type polygon can be set according to actual conditions, for example, the weight of each type of polygon is the same, both are 1; or the polygons with more edges may have a larger routing delay after repairing, Therefore, the polygons with more edges may have smaller weights, etc., so that the NMC score is balanced between the fault repair capability of the intermediate node and the delay of the repaired route.
可选地,获取至少两条路由中的中间节点的NMC分值,包括:通过洪泛或周期性信息交换机制获取至少两条路由中每条路由中的每个中间节点上报的NMC分值。可选地,获取中间节点的NMC分值可通过接收至少两条路由中每条路由中的每个中间节点上报的NMC分值,也可通过直接计算的方式计算至少两条路由中每条路由中的每个中间节点的NMC分值。Optionally, the NMC scores of the intermediate nodes in the at least two routes are obtained, and the NMC scores reported by each of the at least two routes are obtained by using a flooding or periodic information exchange mechanism. Optionally, the NMC score of the intermediate node may be obtained by receiving the NMC score reported by each of the at least two routes, or calculating the route of each of the at least two routes by directly calculating. The NMC score for each intermediate node in .
可选地,上报该中间节点的NMC分值,包括:接收路由请求;其中,路由请求中包括目标节点的标识;根据路由请求的标识在确定为首次接收到路由请求后,将中间节点的标识和NMC分值添加至路由请求的路由记录中,并转发增加了中间节点的标识和NMC分值的路由请求。可选地,为了兼容现有技术,该方案可由设置于中间节点上的路由选择装置执行。Optionally, the reporting the NMC score of the intermediate node includes: receiving a routing request; wherein the routing request includes an identifier of the target node; and determining, according to the identifier of the routing request, the identifier of the intermediate node after determining that the routing request is received for the first time The NMC score is added to the routing record of the routing request, and the routing request with the identifier of the intermediate node and the NMC score is forwarded. Alternatively, to be compatible with the prior art, the scheme can be performed by a routing device disposed on the intermediate node.
第三方面,本申请实施例提供一种路由选择装置,路由选择装置包括存储器、收发器和处理器,其中:存储器用于存储程序指令;处理器用于根据执行存储器存储的程序指令,并控制收发器进行信号接收和信号发送,当处理器执行存储器存储的程序指令时,路由选择装置用于执行上述第一方面或第一方面中任一种方法。In a third aspect, the embodiment of the present application provides a routing device, where the routing device includes a memory, a transceiver, and a processor, where: the memory is used to store program instructions; the processor is configured to execute and send and receive according to program instructions for executing memory storage. The device performs signal reception and signal transmission, and when the processor executes the program instruction stored in the memory, the routing device is configured to perform the method of any of the above first aspect or the first aspect.
第四方面,本申请实施例提供一种路由选择装置,路由选择装置包括存储器、收发器和处理器,其中:存储器用于存储程序指令;处理器用于根据执行存储器存储的程序指令,并控制收发器进行信号接收和信号发送,当处理器执行存储器存储的程序指令时,路由选择装置用于执行上述第二方面或第二方面中任一种方法。In a fourth aspect, an embodiment of the present application provides a routing device, where the routing device includes a memory, a transceiver, and a processor, where: the memory is used to store program instructions; the processor is configured to execute, according to a program instruction for executing the memory, and control the sending and receiving. The device performs signal reception and signal transmission, and when the processor executes the program instruction stored in the memory, the routing device is configured to perform the method of any of the above second aspect or the second aspect.
第五方面,本申请实施例提供一种路由选择装置,用于实现上述第一方面或第一方面中的任意一种方法,包括相应的功能模块,分别用于实现以上方法中的步骤。In a fifth aspect, the embodiment of the present application provides a routing device, which is used to implement any one of the foregoing first aspect or the first aspect, and includes a corresponding functional module, which is used to implement the steps in the foregoing method.
第六方面,本申请实施例提供一种路由选择装置,用于实现上述第二方面或第二方面中的任意一种的方法,包括相应的功能模块,分别用于实现以上方法中的步骤。In a sixth aspect, the embodiment of the present application provides a routing apparatus, which is used to implement the method of any one of the foregoing second aspect or the second aspect, and includes a corresponding functional module, which is used to implement the steps in the foregoing method.
第七方面,本申请实施例提供一种计算机存储介质,计算机存储介质中存储有程序指令,当其在计算机上运行时,使得计算机执行第一方面或第一方面的任意可能的实现方式中的方法。In a seventh aspect, an embodiment of the present application provides a computer storage medium, where a computer storage medium stores program instructions, when executed on a computer, causing the computer to perform the first aspect or any possible implementation manner of the first aspect. method.
第八方面,本申请实施例提供一种计算机存储介质,计算机存储介质中存储有程序指令,当其在计算机上运行时,使得计算机执行第二方面或第二方面的任意可能的实现方式中的方法。In an eighth aspect, an embodiment of the present application provides a computer storage medium, where a computer storage medium stores program instructions, and when executed on a computer, causes the computer to perform the second aspect or any possible implementation manner of the second aspect. method.
第九方面,本申请实施例提供一种包含程序指令的计算机程序产品,当其在计算机上运行时,使得计算机执行第一方面或第一方面的任意可能的实现方式中的方法。In a ninth aspect, the embodiment of the present application provides a computer program product comprising program instructions, when executed on a computer, causing the computer to perform the method in the first aspect or any possible implementation manner of the first aspect.
第十方面,本申请实施例提供一种包含程序指令的计算机程序产品,当其在计算机上运行时,使得计算机执行第二方面或第二方面的任意可能的实现方式中的方法。In a tenth aspect, the embodiment of the present application provides a computer program product comprising program instructions, when executed on a computer, causing the computer to perform the method in any of the possible implementations of the second aspect or the second aspect.
本申请实施例中,中间节点的NMC分值是根据该中间节点构建的多边形的数量得到的,且该中间节点为该中间节点构建的多边形的顶点,也就是说,一个中间节点的NMC分值可以反映出该中间节点参与构建的多边形的数量,由于多边形是封闭的,且该中间节点为该多边形的顶点,因此该中间节点构建多边形的数量可以反映出该中间节点的链路出现故障后该中间节点的故障修复能力,又由于本申请实施例中根据至少两条路由中的中间节点的NMC分值从源节点到目标节点的至少两条路由中选择目标路由,也就是说,本申请实施例中是基于中间节点的故障修复能力选择的目标路由,因此本申请实施例所提供的方案可提高目标路由抵抗故障的能力,从而提高通讯的可靠性。In the embodiment of the present application, the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node, and the intermediate node is a vertex of the polygon constructed by the intermediate node, that is, an NMC score of an intermediate node. The number of polygons that the intermediate node participates in constructing may be reflected. Since the polygon is closed and the intermediate node is a vertex of the polygon, the number of polygons constructed by the intermediate node may reflect that the link of the intermediate node is faulty. The fault repairing capability of the intermediate node, and the target route is selected from the source node to the target node according to the NMC score of the intermediate node in the at least two routes in the embodiment of the present application, that is, the implementation of the present application In the example, the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
附图说明DRAWINGS
图1为本申请实施例适用的一种通信系统架构示意图;1 is a schematic structural diagram of a communication system to which an embodiment of the present application is applied;
图1a为本申请实施例适用的另一种通信系统架构示意图;1a is a schematic structural diagram of another communication system to which the embodiment of the present application is applied;
图2为本申请实施例提供的一种路由选择方法流程示意图;2 is a schematic flowchart of a routing method according to an embodiment of the present application;
图2a为本申请实施例提供的一种路由修复过程中路径膨胀的两次相变的示意图;2a is a schematic diagram of two phase transitions of path expansion in a route repair process according to an embodiment of the present application;
图2b为本申请实施例提供的一种路由的系统架构示意图;2b is a schematic structural diagram of a system of routing according to an embodiment of the present application;
图2c为图2b中中间节点122所构建的三边形的结构示意图;2c is a schematic structural view of a triangle constructed by the intermediate node 122 of FIG. 2b;
图2d为图2b中中间节点122所构建的四边形的结构示意图;2d is a schematic structural view of a quadrangle constructed by the intermediate node 122 of FIG. 2b;
图2e为本申请实施例提供一种用于使第一路由选择装置获取每个中间节点的NMC分 值的方法流程示意图;2 e is a schematic flowchart of a method for enabling a first routing device to acquire an NMC score of each intermediate node according to an embodiment of the present application;
图3为本申请实施例提供的一种路由选择装置的结构示意图;FIG. 3 is a schematic structural diagram of a routing apparatus according to an embodiment of the present disclosure;
图4为本申请实施例提供的一种路由选择装置的结构示意图;FIG. 4 is a schematic structural diagram of a routing apparatus according to an embodiment of the present disclosure;
图5为本申请实施例提供的一种路由选择装置的结构示意图;FIG. 5 is a schematic structural diagram of a routing apparatus according to an embodiment of the present disclosure;
图6为本申请实施例提供的一种路由选择装置的结构示意图。FIG. 6 is a schematic structural diagram of a routing apparatus according to an embodiment of the present disclosure.
具体实施方式detailed description
本申请实施例适用于有线或无线网络中,比如融合了WLAN和AdHoc网络的优势的无线Mesh网络。无线Mesh网是低功率的多级跳点系统,它们处理消息的方式是把信息包从一个节点传递到另一个节点,直到信息包到达目的地。每个无线Mesh网络的节点可以作为接入终端,也可具有路由和信息转发功能,具有极高的组网自由度。本申请实施例中的源节点、目标节点和中间节点均为本申请实施例适用的网络中的节点,源节点、目标节点和中间节点中的每个节点均具有路由和信息转发功能。The embodiments of the present application are applicable to wired or wireless networks, such as wireless Mesh networks that combine the advantages of WLAN and AdHoc networks. Wireless Mesh networks are low-power multi-level hopping systems that process messages by passing packets from one node to another until the packet reaches its destination. The nodes of each wireless Mesh network can serve as access terminals, and can also have routing and information forwarding functions, and have extremely high networking degrees of freedom. The source node, the target node, and the intermediate node in the embodiment of the present application are all nodes in the network to which the embodiment of the present application applies, and each of the source node, the target node, and the intermediate node has a routing and information forwarding function.
本申请实施例中将数据传输的两方分别称为源节点和目标节点,将源节点和目标节点之间的路由经过的节点称为中间节点。本申请实施例中的方案提供源节点和目标节点之间的路由选择方案,源节点可以通过选择出的路由向目标节点发送数据,相应地,目标节点也可通过选择出的路由向源节点发送数据。需要注意的是,本申请实施例中所定义的源节点和目标节点在其它数据传输方案中也可能成为中间节点,而中间节点也可能在其它数据传输方案中成为源节点或目标节点。In the embodiment of the present application, two parties of data transmission are respectively referred to as a source node and a target node, and a node through which a route between the source node and the target node passes is referred to as an intermediate node. The solution in the embodiment of the present application provides a routing scheme between the source node and the target node, and the source node may send data to the target node by using the selected route, and accordingly, the target node may also send the route to the source node by using the selected route. data. It should be noted that the source node and the target node defined in the embodiment of the present application may also become intermediate nodes in other data transmission schemes, and the intermediate node may also become a source node or a target node in other data transmission schemes.
图1示例性示出了本申请实施例适用的一种通信系统架构示意图,如图1所示,源节点101和目标节点102通过一条路由连接,该路由上包括中间节点111、中间节点112和中间节点113。本申请实施例中所提供的路由选择装置可以包括两部分,可分别称为第一路由选择装置和第二路由选择装置,第一路由选择装置用于根据路由的各个中间节点的微结构计数(Node Motif Count,NMC)分值选择目标路由,第二路由选择装置可用于计算各个中间节点的NMC分值,并将计算出的NMC分值上报给第一路由选择装置。FIG. 1 is a schematic diagram showing a structure of a communication system to which the embodiment of the present application is applied. As shown in FIG. 1, the source node 101 and the target node 102 are connected by a route including an intermediate node 111, an intermediate node 112, and Intermediate node 113. The routing device provided in the embodiment of the present application may include two parts, which may be respectively referred to as a first routing device and a second routing device, and the first routing device is configured to count the microstructures of each intermediate node according to the route ( The Node Motif Count (NMC) scores the target routing. The second routing device can be used to calculate the NMC score of each intermediate node, and report the calculated NMC score to the first routing device.
基于图1所示的系统架构,一种可选地的部署方案为,将第一路由选择装置部署于源节点101上,将第二路由选择装置部署在每个中间节点上。另一种可选地部署方案为,将第一路由选择装置部署于目标节点102上,将第二路由选择装置部署在每个中间节点上。可选地,在源节点、目标节点和中间节点中的每个节点上均部署第一路由选择装置和第二路由选择装置,在路由选择的由源节点101和目标节点102上的第一路由选择装置执行,在计算各个中间节点的NMC分值时由各个中间节点上的第二路由选择装置执行。Based on the system architecture shown in FIG. 1, an alternative deployment scenario is to deploy the first routing device on the source node 101 and the second routing device on each intermediate node. Another alternative deployment scenario is to deploy the first routing device on the target node 102 and the second routing device on each intermediate node. Optionally, the first routing device and the second routing device are deployed on each of the source node, the target node, and the intermediate node, and the first route on the source node 101 and the target node 102 is routed. The selection means executes, which is performed by the second routing means on each intermediate node when calculating the NMC score for each intermediate node.
图1a示例性示出了本申请实施例适用的另一种通信系统架构示意图,如图1a所示,源节点101和目标节点102通过一条路由连接,该路由上包括中间节点111、中间节点112和中间节点113。源节点101、目标节点102以及各个中间节点均与路由选择装置141连接,路由选择装置141计算出各个中间节点的NMC分值,之后根据NMC分值选择出目标路由,并将目标路由下发给源节点101和目标节点102。FIG. 1a is a schematic diagram showing another architecture of a communication system to which the embodiment of the present application is applied. As shown in FIG. 1a, the source node 101 and the target node 102 are connected by a route, and the route includes an intermediate node 111 and an intermediate node 112. And intermediate node 113. The source node 101, the target node 102, and each intermediate node are all connected to the routing device 141. The routing device 141 calculates the NMC score of each intermediate node, and then selects the destination route according to the NMC score, and sends the target route to the destination route. Source node 101 and target node 102.
本申请实施例所提供的方案由路由选择装置执行,路由选择装置可以为图1a所示的路由选择装置141,也可以为包括图1中的第一路由选择装置和第二路由选择装置的装置。以下内容中以第一路由选择装置和第二路由选择装置分开进行描述,但是以下任一个方法步骤均可由第一路由选择装置和第二路由选择装置中的任一个装置执行,第一路由选择装 置和第二路由选择装置可以分别部署在不同节点或不同的装置上,也可以集成在一个装置上,比如第一路由选择装置和第二路由选择装置集成在图1a所示的路由选择装置141上。The solution provided by the embodiment of the present application is performed by the routing device, and the routing device may be the routing device 141 shown in FIG. 1a, or may be the device including the first routing device and the second routing device in FIG. . The following description is separately described by the first routing device and the second routing device, but any of the following method steps may be performed by any one of the first routing device and the second routing device, the first routing device And the second routing device may be respectively deployed on different nodes or different devices, or may be integrated on one device, for example, the first routing device and the second routing device are integrated on the routing device 141 shown in FIG. 1a. .
图1和图1a所示的源节点101和目标节点102之间仅画了一条路由,但在实际应用中,源节点101和目标节点102会存在多条冗余路由。如果一条路由由于硬件故障或干扰而停止工作,网络会自动改变信息包的路由,使它们穿过一条替代路径。本申请实施例提供一种方案用于从源节点和目标节点的多条冗余路由中选择出一条可靠性较高,抵抗故障能力较强的路由。Only one route is drawn between the source node 101 and the target node 102 shown in FIG. 1 and FIG. 1a, but in practical applications, the source node 101 and the target node 102 may have multiple redundant routes. If a route stops working due to hardware failure or interference, the network automatically changes the routing of the packets, passing them through an alternate path. The embodiment of the present application provides a solution for selecting a route with high reliability and strong resistance against faults from multiple redundant routes of a source node and a target node.
图2示例性示出了本申请实施例提供的一种路由选择方法流程示意图。FIG. 2 is a schematic flowchart diagram of a routing method provided by an embodiment of the present application.
基于图1和图1a所示的系统架构,本申请实施例提供的可有路由选择装置实现的一种路由选择方法。如图2所示,该方法包括:Based on the system architecture shown in FIG. 1 and FIG. 1a, a routing method implemented by the routing apparatus provided by the embodiment of the present application is provided. As shown in Figure 2, the method includes:
步骤201,路由选择装置获取源节点到目标节点的至少两条路由,并获取至少两条路由中的中间节点的NMC分值;其中,中间节点的NMC分值是根据该中间节点构建的多边形的数量得到的;其中,该中间节点为该中间节点构建的多边形的顶点;Step 201: The routing device acquires at least two routes from the source node to the target node, and obtains an NMC score of the intermediate node in the at least two routes. The NMC score of the intermediate node is a polygon constructed according to the intermediate node. The number obtained; wherein the intermediate node is a vertex of a polygon constructed by the intermediate node;
步骤202,路由选择装置根据至少两条路由中的中间节点的NMC分值,从至少两条路由中选择出一条目标路由。Step 202: The routing device selects a target route from the at least two routes according to the NMC score of the intermediate node in the at least two routes.
可选地,上述步骤201和步骤202中的路由选择装置可为上述图1a中的路由选择装置141,也可为上述内容中的第一路由选择装置和第二路由选择装置。Optionally, the routing device in the foregoing steps 201 and 202 may be the routing device 141 in the foregoing FIG. 1a, or may be the first routing device and the second routing device in the foregoing content.
可选地,本申请实施例若适用上述图1a所示通信系统架构,则路由选择装置针对源节点到目标节点的至少两条路由中的中间节点,根据该中间节点的网络拓扑信息确定该中间节点构建的多边形的数量;根据据该中间节点构建的多边形的数量,确定该中间节点的NMC分值;根据至少两条路由中的中间节点的NMC分值,从至少两条路由中选择出一条目标路由。Optionally, in the embodiment of the present application, if the communication system architecture shown in FIG. 1a is applied, the routing device determines, according to the network topology information of the intermediate node, the intermediate node in the at least two routes from the source node to the target node. The number of polygons constructed by the node; determining the NMC score of the intermediate node according to the number of polygons constructed according to the intermediate node; selecting one of the at least two routes according to the NMC score of the intermediate node in the at least two routes Target routing.
若路由选择装置包括第一路由选择装置和第二路由选择装置,则上述方法中可选地,第二路由选择装置针对源节点到目标节点的至少两条路由中的中间节点,根据该中间节点的网络拓扑信息确定该中间节点构建的多边形的数量;根据据该中间节点构建的多边形的数量,确定该中间节点的NMC分值;上报该中间节点的NMC分值;其中,该中间节点为该中间节点构建的多边形的顶点;至少两条路由中的中间节点的NMC分值用于:根据至少两条路由中的中间节点的NMC分值,从至少两条路由中选择出一条目标路由。If the routing device includes the first routing device and the second routing device, optionally, the second routing device is configured for the intermediate node of the at least two routes from the source node to the target node, according to the intermediate node. The network topology information determines the number of polygons constructed by the intermediate node; determines the NMC score of the intermediate node according to the number of polygons constructed by the intermediate node; reports the NMC score of the intermediate node; wherein the intermediate node is the The vertices of the polygons constructed by the intermediate nodes; the NMC scores of the intermediate nodes in the at least two routes are used to: select a target route from the at least two routes according to the NMC score of the intermediate nodes in the at least two routes.
相对应地,第一路由选择装置获取源节点到目标节点的至少两条路由,并获取至少两条路由中的中间节点的NMC分值;其中,中间节点的NMC分值是根据该中间节点构建的多边形的数量得到的;其中,该中间节点为该中间节点构建的多边形的顶点;第一路由选择装置根据至少两条路由中的中间节点的NMC分值,从至少两条路由中选择出一条目标路由。可选地,上述任一个方法步骤可由第一路由选择装置或第二路由选择装置执行,上述仅仅示例性示出了一种第一路由选择装置和第二路由选择装置的分工方案。Correspondingly, the first routing device acquires at least two routes from the source node to the target node, and obtains an NMC score of the intermediate node in the at least two routes; wherein the NMC score of the intermediate node is constructed according to the intermediate node The number of polygons obtained; wherein the intermediate node is a vertex of the polygon constructed by the intermediate node; the first routing device selects one of the at least two routes according to the NMC score of the intermediate node in the at least two routes Target routing. Alternatively, any of the above method steps may be performed by the first routing device or the second routing device, and the above merely exemplarily shows a division scheme of the first routing device and the second routing device.
本申请实施例中,中间节点的NMC分值是根据该中间节点构建的多边形的数量得到的,且该中间节点为该中间节点构建的多边形的顶点,也就是说,一个中间节点的NMC分值可以反映出该中间节点参与构建的多边形的数量,由于多边形是封闭的,且该中间节点为该多边形的顶点,因此该中间节点构建多边形的数量可以反映出该中间节点的链路出现故障后该中间节点的故障修复能力,又由于本申请实施例中根据至少两条路由中的中间节点的NMC分值从源节点到目标节点的至少两条路由中选择目标路由,也就是说,本申 请实施例中是基于中间节点的故障修复能力选择的目标路由,因此本申请实施例所提供的方案可提高目标路由抵抗故障的能力,从而提高通讯的可靠性。In the embodiment of the present application, the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node, and the intermediate node is a vertex of the polygon constructed by the intermediate node, that is, an NMC score of an intermediate node. The number of polygons that the intermediate node participates in constructing may be reflected. Since the polygon is closed and the intermediate node is a vertex of the polygon, the number of polygons constructed by the intermediate node may reflect that the link of the intermediate node is faulty. The fault repairing capability of the intermediate node, and the target route is selected from the source node to the target node according to the NMC score of the intermediate node in the at least two routes in the embodiment of the present application, that is, the implementation of the present application In the example, the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
本申请实施例中所定义的多边形可包括边数大于两条边的封闭图形,比如三边形、四边形、五边形以及六边形等等。本申请实施例中节点(比如中间节点)参与构建的多边形中,将两个通过无线或有线连接的节点之间的链路称为多边形中的一个边,将各个节点称为多边形中的顶点。The polygon defined in the embodiment of the present application may include a closed figure having more sides than two sides, such as a triangle, a quadrangle, a pentagon, a hexagon, and the like. In the embodiment of the present application, a node (such as an intermediate node) participates in a constructed polygon, and a link between two nodes connected by wireless or wired is referred to as an edge in a polygon, and each node is referred to as a vertex in the polygon.
基于仿真和数学推导,在不同类型、规模的网络拓扑中,在路由修复(reroute)的过程中路径膨胀会存在两次相变过程,所谓路由修复(reroute)路径膨胀,具体是指给定一个路由,如果任意段路由中断,以最短路径修复断点,该路由路径长度膨胀的的数学期望(D new-D old)。其中,D new是指修复后的新路由的路径长度(或路由代价);D old是指修复前的旧路由的路径长度(或路由代价)。 Based on simulation and mathematical derivation, in different types and scales of network topology, there are two phase transitions in path expansion in the process of route rerouting. The so-called route rerouting (exposure) path expansion, specifically refers to a given one. Routing, if any segment of the route is interrupted, the breakpoint is fixed with the shortest path, and the mathematical expectation of the length of the route path is expanded (D new -D old ). Where D new refers to the path length (or routing cost) of the repaired new route; D old refers to the path length (or routing cost) of the old route before the repair.
图2a示例性示出了本申请实施例提供的一种路由修复过程中路径膨胀的两次相变的示意图,如图2a所示,不同拓扑类型下的曲线稍有不同,但都存在“穿透后迅速饱和”两次相变。随机网络中,这种现象可被数学证明。如图2a所示,横轴“路由修复(reroute)路径膨胀跳数”相对于纵轴“路由修复(reroute)成功累积概率”的关系图,可以清楚看到穿透后迅速饱和这样的两次相变。其物理解释与意义在于:在这样的网络中,如果出现断路,存在很大的可能,在给定很小的膨胀路由跳数的情况下,实现一个端到端路由的修复。相对地,如果小范围的兜路也无法修复断点,此时即使允许去一个更大范围内去找可能的修复路径,修复的概率也很低。基于此,可选地,本申请实施例可根据节点在小范围内构建的多边形的数量评价该节点故障后的修复能力。因此多边形的边数可不必过大,比如十五边形,相对应地,本申请实施例中的多边形比如为三边形或四边形即可满足要求,如此,一方面降低了中间节点计算NMC分值的复杂性,另一方面也提高了NMC分值计算的速率。第三方面,本申请实施例也考虑到尽量采取小范围内修复路由的方案,避免修复后的路由过度绕远所造成修复后路由时延过长的问题,即所选择的目标路由在路由修复能力和修复后路由的时延之间进行了综合考虑。FIG. 2a is a schematic diagram showing two phase transitions of path expansion in a route repair process provided by an embodiment of the present application. As shown in FIG. 2a, curves under different topology types are slightly different, but both are worn. After saturation, it quickly saturates "two phase transitions. In a random network, this phenomenon can be mathematically proven. As shown in Fig. 2a, the horizontal axis "reroute path expansion hop count" relative to the vertical axis "route repair (reroute) successful cumulative probability" diagram, you can clearly see the two times after the penetration quickly saturated Phase change. Its physical interpretation and significance is that in such a network, if there is an open circuit, there is a great possibility to implement an end-to-end route repair given a small number of expanded route hops. In contrast, if a small range of laps cannot fix the breakpoint, the probability of repair is low even if a larger range is allowed to find a possible repair path. Based on this, optionally, the embodiment of the present application can evaluate the repair capability of the node after the fault according to the number of polygons that the node constructs in a small range. Therefore, the number of sides of the polygon may not be too large, such as a fifteen-sided shape. Correspondingly, the polygon in the embodiment of the present application, for example, a triangle or a quadrilateral, can satisfy the requirement. Thus, on the one hand, the intermediate node calculates the NMC score. The complexity of the value, on the other hand, also increases the rate at which the NMC score is calculated. In the third aspect, the embodiment of the present application also considers a scheme of repairing a route in a small range as much as possible, and avoids the problem that the repaired route delay is too long after the repaired route is excessively bypassed, that is, the route repairing capability of the selected target route is adopted. A comprehensive consideration has been made between the delay of the repaired route and the delay.
可选地,为了避免环路与广播风暴,本申请实施例中还提供一种方案,设置修复次数计数值,路由每修复一次,该修复次数计数值则加1,当修复次数计数值超过修复次数阈值后,即使再次遇到路由断路的情况下,也不再进行路由修复,此时路由中断。也就是说,本申请实施例中还包括修复次数计数值,针对目标路由中的每个中间节点,若该中间节点确定目标路由中该中间节点与下一跳中间节点之间的路由故障,且确定修复次数计数值不大于阈值时,执行一次路由修复,并将修复次数计数值加1。执行一次路由修复具体来说是该中间节点选择另外一条备选路径到达目标路由的下一跳中间节点。若该中间节点确定目标路由中该中间节点与下一跳中间节点之间的路由故障,且确定修复次数计数值大于阈值时,不执行路由修复。Optionally, in order to avoid loops and broadcast storms, a solution is provided in the embodiment of the present application, and the count value of the repair times is set. When the route is repaired once, the count value of the repair times is increased by 1, and when the repair count count exceeds the repair value. After the threshold is reached, even if the route is broken again, the route repair is no longer performed, and the route is interrupted. That is, the embodiment of the present application further includes a repair count value, for each intermediate node in the target route, if the intermediate node determines a route fault between the intermediate node and the next hop intermediate node in the target route, and When it is determined that the repair count value is not greater than the threshold, a route repair is performed and the repair count value is incremented by one. Performing a route repair specifically means that the intermediate node selects another alternate path to reach the next hop intermediate node of the target route. If the intermediate node determines a route fault between the intermediate node and the next hop intermediate node in the target route, and determines that the repair count count value is greater than the threshold, the route repair is not performed.
可选地,可将修复次数计数值和路由附着在数据包的数据包头部分,沿路由路转发,并在需要修改时沿路修改。基于该技术可以实现路由转发的结合,实现在链路层面路由中断情况下,转发不中断,进而达到业务层面的路由不中断。Optionally, the repair count value and the route may be attached to the packet header portion of the data packet, forwarded along the routing path, and modified along the way when modification is required. Based on the technology, the combination of route and forwarding can be implemented. In the case of a link-level route interruption, the forwarding is not interrupted, and the route at the service level is not interrupted.
通过上述论述可见,本申请实施例中选择出的目标路由是考虑了路由上各个中间节点的路由修复能力的,因此可提高路由的可靠性。进一步,针对两条等价的路由,本申请实施例中可以更加显出优势,本申请实施例中可以确定出两条等价的路由中那条路由的故障 修复能力更高。It can be seen from the above that the target route selected in the embodiment of the present application considers the route repair capability of each intermediate node on the route, and thus the reliability of the route can be improved. Further, for the two equal-cost routes, the advantages of the method in the present application can be further improved. In the embodiment of the present application, it can be determined that the fault repair capability of the route in the two equal-cost routes is higher.
可选地,至少两条路由中第一路由和第二路由等价;其中,第一路由和第二路由为至少两条路由中的任两条路由;第一路由和第二路由等价具体可指第一路由和第二路由满足预设的条件,该预设的条件可包括多种类型,比如以下第一种情况至第五种情况:Optionally, the first route and the second route are equivalent to the at least two routes, where the first route and the second route are any two routes of the at least two routes; the first route and the second route are equivalently specific The first route and the second route may meet the preset condition, and the preset condition may include multiple types, such as the following first case to the fifth case:
第一种情况,第一路由包括的节点间的跳数与第二路由包括的节点间的跳数相同。路由中包括的节点间的跳数具体是指该路由中数据需要在各个节点间跳的数量。某些情况下,路由中包括的节点间的跳数可能与路由中包括的中间节点的数量相同,比如路由包括三个中间节点,则该路由可能包括4跳,但是也可能包括5跳、6跳等等。某些情况下,第一路由和第二路由等价也可以是第一路由包括的中间节点的数量与第二路由包括的中间节点的数量相同。In the first case, the number of hops between nodes included in the first route is the same as the number of hops between nodes included in the second route. The number of hops between nodes included in the route refers specifically to the number of hops in the route that the data needs to jump between the nodes. In some cases, the number of hops between nodes included in the route may be the same as the number of intermediate nodes included in the route. For example, if the route includes three intermediate nodes, the route may include 4 hops, but may also include 5 hops, 6 Jump and so on. In some cases, the first route and the second route are equivalently the same. The number of intermediate nodes included in the first route is the same as the number of intermediate nodes included in the second route.
第二种情况,第一路由的传输时延与第二路由包括的传输时延相同。第一路由的传输时延具体是指数据从源节点沿第一路由传输至目标节点所需要的时间;或者是指数据从目标节点沿第一路由传输至源节点所需要的时间。第二路由的传输时延具体是指数据从源节点沿第二路由传输至目标节点所需要的时间;或者是指数据从目标节点沿第二路由传输至源节点所需要的时间。在该种情况下,第一路由中包括的节点间的跳数可能与第二路由包括的节点间的跳数不相同或相同。In the second case, the transmission delay of the first route is the same as the transmission delay included in the second route. The transmission delay of the first route specifically refers to the time required for data to be transmitted from the source node to the destination node along the first route; or the time required for data to be transmitted from the target node to the source node along the first route. The transmission delay of the second route specifically refers to the time required for data to be transmitted from the source node to the destination node along the second route; or the time required for data to be transmitted from the target node to the source node along the second route. In this case, the number of hops between the nodes included in the first route may be different or the same as the number of hops between the nodes included in the second route.
提供一种可选地用于计算路由的传输时延的方案,每个路由器维护一个距离向量(通常是以时延是作变量的)表,然后通过相邻节点之间的距离向量通告进行距离向量表的更新,比如可通过周期性或者事件触发的形式在节点间通告一些信息,比如本节点与邻节点之间的时延、链路状态信息等等。距离向量表中可以包括节点之间的时延,可基于距离向量表计算出一条路由的时延。A scheme is provided optionally for calculating the transmission delay of a route, each router maintains a distance vector (usually a delay is a variable) table, and then advertises the distance by a distance vector between adjacent nodes. The update of the vector table, for example, may be advertised between nodes by periodic or event-triggered forms, such as delay between the node and the neighboring node, link state information, and the like. The distance vector table may include a delay between nodes, and the delay of a route may be calculated based on the distance vector table.
第三种情况,第一路由包括的链路的权重的和与第二路由包括的链路的权重的和相同。第一路由和第二路由中的每个路由所包括的链路具体是指第一路由上任两个节点之间的链路,每个链路会对应一个权重。链路对应的权重可能与延迟、最大带宽、延迟抖动、单位带宽价格等等因素有关。In the third case, the sum of the weights of the links included in the first route is the same as the sum of the weights of the links included in the second route. The link included in each of the first route and the second route specifically refers to a link between any two nodes on the first route, and each link corresponds to one weight. The weight of the link may be related to delay, maximum bandwidth, delay jitter, unit bandwidth price, and so on.
第四种情况,第一路由包括的中间节点的权重的和与第二路由包括的中间节点的权重的和相同。第一路由和第二路由中的每个路由所包括的每个中间节点对应一个权重。中间节点对应的权重可能与该中间节点的最大处理能力、当前负载水平等等因素有关。中间节点可以为路由器。In the fourth case, the sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route. Each intermediate node included in each of the first route and the second route corresponds to one weight. The weight corresponding to the intermediate node may be related to the maximum processing power of the intermediate node, the current load level, and the like. The intermediate node can be a router.
第五种情况,第一路由包括的链路的权重和中间节点的权重的和与第二路由包括的链路的权重和中间节点的权重的和相同。In the fifth case, the sum of the weight of the link included in the first route and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node.
图2b示例性示出本申请实施例提供的一种路由的系统架构示意图,如图2b所示,源节点101和目标节点102之间包括多条冗余路由,比如:FIG. 2b is a schematic diagram showing a system architecture of a route provided by an embodiment of the present application. As shown in FIG. 2b, the source node 101 and the target node 102 include multiple redundant routes, such as:
路由A:源节点101、中间节点111、中间节点112、中间节点113和目标节点102;Route A: source node 101, intermediate node 111, intermediate node 112, intermediate node 113, and target node 102;
路由B:源节点101、中间节点121、中间节点122、中间节点123和目标节点102;Route B: source node 101, intermediate node 121, intermediate node 122, intermediate node 123, and target node 102;
路由C:源节点101、中间节点131、中间节点132和目标节点102。Route C: source node 101, intermediate node 131, intermediate node 132, and target node 102.
从图2b可以看出,源节点101和目标节点102之间还包括其它路由,比如路由D包括:源节点101、中间节点121、中间节点151、中间节点122、中间节点123和目标节点102;再比如路由E包括:源节点101、中间节点包括中间节点121、中间节点152、中间节点123和目标节点102。能连通源节点101与目标节点102的路由还包括其它,在此不 再一一赘述。As can be seen from FIG. 2b, the source node 101 and the target node 102 further include other routes, such as the route D, including: the source node 101, the intermediate node 121, the intermediate node 151, the intermediate node 122, the intermediate node 123, and the target node 102; For example, the route E includes: the source node 101, the intermediate node including the intermediate node 121, the intermediate node 152, the intermediate node 123, and the target node 102. The route that can connect the source node 101 to the target node 102 also includes others, and details are not described herein again.
如图2b所示,若本申请实施例中路由等价的预设条件为上述第二种情况,且若上述路由A和路由B的传输时延相同,且路由A和路由B的传输时延是源节点101和目标节点102之间的所有路由中传输时延最小的两条路由。则本申请实施例中一方面可以选择出传输时延最小的路由作为目标路由,另一方面也可以在传输时延最小的路由里面选择出一条修复能力较强的路由作为目标路由。As shown in FIG. 2b, if the route-equivalent preset condition in the embodiment of the present application is the foregoing second case, and if the transmission delays of the route A and the route B are the same, and the transmission delays of the route A and the route B are It is the two routes with the smallest transmission delay among all the routes between the source node 101 and the target node 102. On the one hand, in the embodiment of the present application, the route with the smallest transmission delay can be selected as the target route, and the route with the strong transmission delay can be selected as the target route in the route with the smallest transmission delay.
可选地,本申请实施例适用于多种网络,比如随机网络和幂率网络,其中WMN中的网络拓扑属于典型的随机网络,域间路由场景下的拓扑属于典型的幂率网络。Optionally, the embodiment of the present application is applicable to multiple networks, such as a random network and a power rate network, where the network topology in the WMN belongs to a typical random network, and the topology in the inter-domain routing scenario belongs to a typical power rate network.
本申请实施例中可预定义一些用于计算NMC分值的多边形,并通知各个中间节点用于计算NMC分值的多边形具体是什么,可选地,可通过广播或者一一通知的方式通知。In the embodiment of the present application, some polygons for calculating the NMC score may be predefined, and the polygons used by each intermediate node to calculate the NMC score are specifically notified, and may be notified by broadcast or one-by-one notification.
本申请实施例中网络中的每个节点,包括中间节点、源节点和目标节点,每个节点计算NMC分值的方法是相同的,本申请实施例中以一个中间节点计算NMC分值的为例进行介绍。Each of the nodes in the network in the embodiment of the present application includes an intermediate node, a source node, and a target node. The method for calculating the NMC score is the same for each node. In the embodiment of the present application, an intermediate node calculates the NMC score as The example is introduced.
首先根据网络拓扑信息确定中间节点所构建的多边形的数量,该中间节点为该中间节点构建的多边形的顶点。基于图2b进行介绍,以图2b中的中间节点122为例进行说明,图2c示例性示出了图2b中中间节点122所构建的三边形的结构示意图,图2d示例性示出了图2b中中间节点122所构建的四边形的结构示意图。First, the number of polygons constructed by the intermediate nodes is determined according to the network topology information, and the intermediate nodes are the vertices of the polygons constructed by the intermediate nodes. The description is based on FIG. 2b, taking the intermediate node 122 in FIG. 2b as an example. FIG. 2c exemplarily shows the structural diagram of the triangle formed by the intermediate node 122 in FIG. 2b, and FIG. 2d exemplarily shows the figure. Schematic diagram of the quadrilateral constructed by the intermediate node 122 in 2b.
如图2c所示,中间节点122构建了四个三边形,分别为中间节点122、中间节点121和中间节点151组成的三边形;中间节点122、中间节点151和中间节点123组成的三边形;中间节点122、中间节点121和中间节点152组成的三边形;中间节点122、中间节点123和中间节点152组成的三边形。As shown in FIG. 2c, the intermediate node 122 constructs four triangles, which are a triangle composed of an intermediate node 122, an intermediate node 121, and an intermediate node 151; and an intermediate node 122, an intermediate node 151, and an intermediate node 123. A triangle formed by an intermediate node 122, an intermediate node 121, and an intermediate node 152; a triangulation composed of an intermediate node 122, an intermediate node 123, and an intermediate node 152.
如图2d所示,中间节点122构建了四个四边形,分别为中间节点122、中间节点152、中间节点121和中间节点151组成的四边形;中间节点122、中间节点152、中间节点123和中间节点151组成的四边形;中间节点122、中间节点121、中间节点151和中间节点123组成的四边形;中间节点122、中间节点121、中间节点152和中间节点123组成的四边形。本申请实施例中节点(比如中间节点)参与构建的多边形中,将两个通过无线或有线连接的节点之间的链路称为多边形中的一个边,将各个节点称为多边形中的顶点。As shown in FIG. 2d, the intermediate node 122 constructs four quadrilaterals, which are a quadrangle composed of an intermediate node 122, an intermediate node 152, an intermediate node 121, and an intermediate node 151; an intermediate node 122, an intermediate node 152, an intermediate node 123, and an intermediate node. A quadrangle composed of 151; a quadrangle composed of an intermediate node 122, an intermediate node 121, an intermediate node 151, and an intermediate node 123; a quadrangle formed by the intermediate node 122, the intermediate node 121, the intermediate node 152, and the intermediate node 123. In the embodiment of the present application, a node (such as an intermediate node) participates in a constructed polygon, and a link between two nodes connected by wireless or wired is referred to as an edge in a polygon, and each node is referred to as a vertex in the polygon.
上述内容中计算了中间节点122所构建的三边形和四边形的数量,三边形为四个,四边形为四个。如图2b所示,中间节点121所构建的三边形和四边形分别为:中间节点121、中间节点151和中间节点122构成的三边形;中间节点121、中间节点152和中间节点122构成的三边形;中间节点121、中间节点152、中间节点122和中间节点151构成的四边形。可见中间节点121所构建的三边形为两个,四边形为一个。The number of triangles and quadrilaterals constructed by the intermediate node 122 is calculated in the above, with four triangles and four quadrilaterals. As shown in FIG. 2b, the trigonometry and the quadrilateral constructed by the intermediate node 121 are respectively: a triangle formed by the intermediate node 121, the intermediate node 151, and the intermediate node 122; the intermediate node 121, the intermediate node 152, and the intermediate node 122 A triangle formed by the intermediate node 121, the intermediate node 152, the intermediate node 122, and the intermediate node 151. It can be seen that the intermediate node 121 constructs two triangles and one quad.
在计算每个中间节点所构建的多边形的数量时,需要知道该中间节点周边N跳网络拓扑信息,N跳网络拓扑信息覆盖M类多边形即可。N为整数,N大于等于所定义的多边形中边数最多的一类多边形的边数的一半即可。比如M类多边形中边数最多的一类多边形为六边形,则N可为3,即该知道中间节点三跳范围内的网络拓扑即可。具体来说,获取中间节点的网络拓扑的方案由多种,比如通过广播获知,获知通过中间节点自己洪泛查询自己周边的N跳拓扑,并通知第二路由选择装置,若第二路由选择装置直接部署于中间节点上,则第二路由选择装置也可通过洪泛查询自己所部署的中间节点周边的N跳拓扑。When calculating the number of polygons constructed by each intermediate node, it is necessary to know the N-hop network topology information of the intermediate node, and the N-hop network topology information can cover the M-type polygon. N is an integer, and N is greater than or equal to half the number of sides of a type of polygon having the largest number of sides in the defined polygon. For example, if the type of polygon with the largest number of edges in the M-type polygon is a hexagon, then N can be 3, that is, the network topology within the three-hop range of the intermediate node can be known. Specifically, the solution for obtaining the network topology of the intermediate node is obtained by broadcasting, for example, by knowing, by the intermediate node itself, flooding the N-hop topology of the neighboring area, and notifying the second routing device, if the second routing device is used. If the second routing device is directly deployed on the intermediate node, the second routing device can also query the N-hop topology around the intermediate node deployed by itself.
可选地,预定义的多边形可以包括M类多边形,M类多边形中的任两类多边形的边 数不同。具体来说,M为一时,M类多边形仅包括一类边数相同的多边形,比如三边形;M为二时,M类多边形可包括两类边数不同的多边形,比如三边形和四边形。可选地,中间节点的NMC分值是:根据该中间节点构建的M类多边形的数量得到的;若M为大于等于1的整数,且若M大于等于2时,M类多边形中任两类多边形的边数不同。如此,可以根据实际情况以及具体的应用场景合理设置M类多边形,从而使NMC分值更加准确的反映该中间节点的故障修复能力。Alternatively, the predefined polygons may include M-type polygons, and any two types of polygons in the M-type polygon have different numbers of sides. Specifically, when M is one, the M-type polygon includes only one type of polygon with the same number of sides, such as a triangle; when M is two, the M-type polygon may include two types of polygons with different sides, such as a triangle and a quadrangle. . Optionally, the NMC score of the intermediate node is obtained according to the number of M-type polygons constructed by the intermediate node; if M is an integer greater than or equal to 1, and if M is greater than or equal to 2, any two of the M-type polygons The number of sides of the polygon is different. In this way, the M-type polygon can be reasonably set according to the actual situation and the specific application scenario, so that the NMC score more accurately reflects the fault repair capability of the intermediate node.
一种可能的实施方案中,根据该中间节点的网络拓扑信息确定该中间节点构建的多边形的数量,包括:第二路由选择装置根据该中间节点的网络拓扑信息,确定该中间节点构建的M类多边形的数量;其中,M为大于等于1的整数,且若M大于等于2时,M类多边形中任两类多边形的边数不同;第二路由选择装置据该中间节点构建的多边形的数量,确定该中间节点的NMC分值,包括:根据该中间节点构建的M类多边形的数量,确定该中间节点的NMC分值。可选地,该实施方案也可由第一路由选择装置来实现。In a possible implementation, determining the number of polygons constructed by the intermediate node according to the network topology information of the intermediate node, the second routing device determining, according to the network topology information of the intermediate node, the M class constructed by the intermediate node The number of polygons; where M is an integer greater than or equal to 1, and if M is greater than or equal to 2, the number of sides of any two types of polygons in the M-type polygon is different; and the number of polygons constructed by the second routing device according to the intermediate node, Determining the NMC score of the intermediate node includes: determining an NMC score of the intermediate node according to the number of M-type polygons constructed by the intermediate node. Alternatively, this embodiment can also be implemented by a first routing device.
中间节点的NMC分值由多种计算方案,比如直接将M类多边形的数量的和作为该中间节点的NMC分值,或者预设一些公式,比如通过公式(log(NMC 三角形+NMC 四边形))计算得到该中间节点的NMC分值,其中,NMC 三角形为该中间节点所构建三边形的数量,NMC 四边形为该中间节点所构建四边形的数量。 The NMC score of the intermediate node is determined by various calculation schemes, such as directly taking the sum of the number of M types of polygons as the NMC score of the intermediate node, or presetting some formulas, such as by a formula (log (NMC triangle + NMC quadrilateral )) The NMC score of the intermediate node is calculated, wherein the NMC triangle is the number of triangles constructed by the intermediate node, and the NMC quadrilateral is the number of quadrilaterals constructed by the intermediate node.
可选地,中间节点的NMC分值是:将根据M类多边形中每类多边形对应的权重,将该中间节点构建的M类多边形中的每类多边形的数量进行加权计算得到的;其中,该中间节点的NMC分值用于指示:该中间节点的故障修复能力。Optionally, the NMC score of the intermediate node is: performing weighting calculation on the number of each type of polygon in the M-type polygon constructed by the intermediate node according to the weight corresponding to each type of polygon in the M-type polygon; wherein The NMC score of the intermediate node is used to indicate: the fault repair capability of the intermediate node.
一种可能的实施方案中,,根据该中间节点构建的M类多边形的数量,确定该中间节点的NMC分值包括:第二路由选择装置确定M类多边形中每类多边形对应的权重;第二路由选择装置根据M类多边形中每类多边形对应的权重,将该中间节点构建的M类多边形中的每类多边形的数量进行加权计算;第二路由选择装置将该中间节点构建的M类多边形中的每类多边形的数量加权计算后的结果确定为该中间节点的NMC分值。可选地,该实施方案也可由第一路由选择装置来实现。如此,M类多边形中每类多边形对应的权重可以根据实际情况设定,比如每类多边形的权重都相同,都为1;或者由于边数越多的多边形可能修复后的路由时延较大,因此边数越多的多边形的权重可能越小等等,从而使NMC分值在该中间节点的故障修复能力以及修复后路由的时延之间进行平衡。In a possible implementation, determining the NMC score of the intermediate node according to the number of M-type polygons constructed by the intermediate node includes: determining, by the second routing device, a weight corresponding to each type of polygon in the M-type polygon; The routing device performs weighting calculation on the number of each type of polygon in the M-type polygon constructed by the intermediate node according to the weight corresponding to each type of polygon in the M-type polygon; the second routing device constructs the M-type polygon in the intermediate node The result of the weighted calculation of each type of polygon is determined as the NMC score of the intermediate node. Alternatively, this embodiment can also be implemented by a first routing device. Thus, the weights of each type of polygon in the M-type polygon can be set according to actual conditions, for example, the weight of each type of polygon is the same, both are 1; or the polygons with more edges may have a larger routing delay after repairing, Therefore, the polygons with more edges may have smaller weights, etc., so that the NMC score is balanced between the fault repair capability of the intermediate node and the delay of the repaired route.
上述方案中的加权计算具体是指根据预设的公式和M类多边形中每类多边形对应的权重对该中间节点构建的每类多边形的数量进行数学计算。加权计算种类较多,比如,将M类多边形中每类多边形对应的权重于该类多边形的数量相乘,将得到的M个乘积相加、相乘或相减,或者进行其它数学运算等等,所得的结果即为该中间节点的NMC分值。再比如,将M类多边形中每类多边形的数量分别取倒数之后求和,所得的结果即为该中间节点的NMC分值。再比如取M类多边形的数量的平均值,所得的结果即为该中间节点的NMC分值。再比如取M类多边形的数量中的最小值,将多边形的最小的数量作为该中间节点的NMC分值,该示例中可将除最小的数量对应的一类多边形之外的其它M-1类多边形的数量对应的权重设置为零,将最小的数量对应的一类多边形的数量的权重设置为1。The weighting calculation in the above solution specifically refers to mathematically calculating the number of each type of polygon constructed by the intermediate node according to a preset formula and a weight corresponding to each type of polygon in the M-type polygon. There are many types of weighting calculations. For example, the weights corresponding to each type of polygon in the M-type polygon are multiplied by the number of such polygons, and the obtained M products are added, multiplied or subtracted, or other mathematical operations are performed. The result obtained is the NMC score of the intermediate node. For another example, the number of each type of polygon in the M-type polygon is reciprocal and then summed, and the obtained result is the NMC score of the intermediate node. For example, taking the average of the number of M-type polygons, the result is the NMC score of the intermediate node. For example, the minimum value of the number of M-type polygons is taken, and the minimum number of polygons is used as the NMC score of the intermediate node. In this example, other M-1 classes other than the smallest type of polygons may be used. The weight corresponding to the number of polygons is set to zero, and the weight of the number of polygons corresponding to the smallest number is set to 1.
该路由的NMC分值用于指示该路由的故障修复能力,比如,中间节点的NMC分值是将该中间节点所构建的多边形的数量相加得到的,或者加权相加得到的,中间节点的NMC分值越高,该中间节点的故障修复能力越强;或者中间节点的NMC分值是将该中间 节点所构建的多边形的数量的倒数相加得到的,中间节点的NMC分值越高,该中间节点的故障修复能力越弱。The NMC score of the route is used to indicate the fault repair capability of the route. For example, the NMC score of the intermediate node is obtained by adding the number of polygons constructed by the intermediate node, or weighted and added, and the intermediate node is obtained. The higher the NMC score is, the stronger the fault repair capability of the intermediate node is; or the NMC score of the intermediate node is obtained by adding the reciprocal of the number of polygons constructed by the intermediate node, and the NMC score of the intermediate node is higher. The fault repair capability of the intermediate node is weaker.
可选地,根据至少两条路由中的中间节点的NMC分值,从至少两条路由中选择出一条目标路由,包括:第一路由选择装置根据至少两条路由中的中间节点的NMC分值,确定出至少两条路由中路由的NMC分值;其中,该路由的NMC分值用于指示该路由的故障修复能力;第一路由选择装置根据至少两条路由中路由的NMC分值,将指示的故障修复能力最强的路由的NMC分值对应的路由确定为目标路由。可选地,该实施方案也可由第二路由选择装置来实现。Optionally, selecting a target route from the at least two routes according to the NMC score of the intermediate node in the at least two routes, including: the first routing device according to the NMC score of the intermediate node in the at least two routes Determining the NMC score of the route in the at least two routes; wherein the NMC score of the route is used to indicate the fault repair capability of the route; the first routing device according to the NMC score of the route in the at least two routes, The route corresponding to the NMC score of the indicated route with the strongest fault repair capability is determined as the target route. Alternatively, this embodiment can also be implemented by a second routing device.
可选地,根据至少两条路由中的中间节点的NMC分值,确定出至少两条路由中路由的NMC分值,包括多种方式。比如以下内容中的方式一和方式二。Optionally, determining, according to the NMC score of the intermediate node in the at least two routes, the NMC score of the route in the at least two routes, including multiple manners. For example, the first method and the second method in the following content.
方式一,第一路由选择装置将至少两条路由中路由中指示的故障修复能力最弱的中间节点的NMC分值确定为路由的NMC分值。比如,若NMC分值越大,故障修复能力越强;若NMC分值越小,故障修复能力越弱。则将每条路由中最小的中间节点的NMC分值确定为路由的NMC分值。In a first manner, the first routing device determines, as the NMC score of the route, the NMC score of the intermediate node with the weakest fault repair capability indicated in the route in the at least two routes. For example, if the NMC score is larger, the fault repair capability is stronger; if the NMC score is smaller, the fault repair capability is weaker. Then, the NMC score of the smallest intermediate node in each route is determined as the NMC score of the route.
基于方式一第一路由选择装置根据至少两条路由中路由的NMC分值,将指示的故障修复能力最强的路由的NMC分值对应的路由确定为目标路由。举个例子,两条路由上各中间节点的分值分别为(路由F:3、5、6、3、2、1),(路由G:2、2、2、3、2、2)。此时路由F上NMC分值最低为1,路由G上NMC分值最低为2,因此路由F的路由的NMC分值为1,路由G的路由的NMC分值为2,由于路由G的路由的NMC分值大于路由F的路由的NMC分值,又由于路由的NMC分值越大,指示该路由的故障修复能力越强,因此选择路由G作为目标路由。实验结果显示,这种等价路由选择策略可以使得“任意一个链路故障的情况下,大于98%端到端路由可恢复,代价小于2跳。The first routing device determines the route corresponding to the NMC score of the route with the strongest fault repair capability as the target route according to the NMC score of the route in the at least two routes. For example, the scores of the intermediate nodes on the two routes are (route F: 3, 5, 6, 3, 2, 1), (route G: 2, 2, 2, 3, 2, 2). In this case, the NMC score on route F is the lowest, and the NMC score on route G is the lowest. Therefore, the route of route F has an NMC score of 1, and the route of route G has an NMC score of 2, because route G is routed. The NMC score is greater than the NMC score of the route of the route F. The larger the NMC score of the route is, the stronger the fault repair capability of the route is. Therefore, the route G is selected as the target route. The experimental results show that this equal-cost routing strategy can make "in the case of any link failure, more than 98% of end-to-end routes can be recovered, and the cost is less than 2 hops.
方式二,第一路由选择装置将至少两条路由中路由中的中间节点NMC分值进行数学计算,并将数学计算的结果确定为路由的NMC分值。In the second manner, the first routing device performs a mathematical calculation on the intermediate node NMC in the route of at least two routes, and determines the result of the mathematical calculation as the NMC score of the route.
上述方式二中,比如计算每条路由的中间节点NMC分值的平均值,之后进行数学计算,并将该条路由上的中间节点NMC分值的平均值确定为路由的NMC分值。In the foregoing mode 2, for example, an average value of the NMC scores of the intermediate nodes of each route is calculated, and then mathematical calculation is performed, and the average value of the intermediate node NMC scores on the route is determined as the NMC score of the route.
基于方式二第一路由选择装置根据至少两条路由中路由的NMC分值,将指示的故障修复能力最强的路由的NMC分值对应的路由确定为目标路由。举个例子,两条路由上各中间节点的分值分别为(路由H:0.61、0.67、0.65、0.7、0.6、0.8),(路由I:0.65、0.67、0.7、0.8、0.65、0.65)。此时路由H上路由的NMC分值为各个中间节点的NMC分值的平均值,为0.6717,路由I上NMC分值为各个中间节点的NMC分值的平均值,为0.6867,由于路由I的路由的NMC分值大于路由H的路由的NMC分值,又由于路由的NMC分值越大,指示该路由的故障修复能力越强,因此选择路由I作为目标路由。实验结果显示,这种等价路由选择策略可以使得“任意一个链路故障的情况下,大于90%端到端路由可恢复,代价小于3跳。The first routing device determines the route corresponding to the NMC score of the route with the strongest fault repair capability as the target route according to the NMC score of the route in the at least two routes. For example, the scores of the intermediate nodes on the two routes are (routes H: 0.61, 0.67, 0.65, 0.7, 0.6, 0.8), respectively (routes I: 0.65, 0.67, 0.7, 0.8, 0.65, 0.65). The NMC score of the route on the route H is the average of the NMC scores of the intermediate nodes, which is 0.6717. The NMC score on the route I is the average value of the NMC scores of the intermediate nodes, which is 0.6867. The NMC score of the route is greater than the NMC score of the route of route H. The larger the NMC score of the route is, the stronger the fault repair capability of the route is. Therefore, route I is selected as the target route. The experimental results show that this equal-cost routing strategy can make "in the case of any link failure, more than 90% of end-to-end routes can be recovered, and the cost is less than 3 hops.
上述方案中,若将第一路由选择装置部署在源节点,将第二路由选择装置部署在中间节点;或者将第一路由选择装置部署在如图1a所示的路由选择装置141中,则可选地获取至少两条路由中的中间节点的NMC分值,包括:第一路由选择装置通过洪泛或周期性信息交换机制获取至少两条路由中每条路由中的每个中间节点上报的NMC分值。也就是说,一种实施方案中,每个中间节点的NMC分值可由每个中间节点进行计算,之后上报给第 一路由选择装置。或者每个中间节点的NMC分值也可由第一路由选择装置或者第二路由选择装置或者如图1a所示的路由选择装置141进行计算。In the above solution, if the first routing device is deployed at the source node, the second routing device is deployed at the intermediate node; or the first routing device is deployed in the routing device 141 as shown in FIG. 1a, Selecting the NMC scores of the intermediate nodes in the at least two routes, including: the first routing device acquires the NMC reported by each intermediate node in each of the at least two routes by using a flooding or periodic information exchange mechanism. Score. That is, in one embodiment, the NMC score for each intermediate node can be calculated by each intermediate node and then reported to the first routing device. Or the NMC score of each intermediate node may also be calculated by the first routing device or the second routing device or the routing device 141 as shown in Figure 1a.
可选地,通过洪泛获取至少两条路由中每条路由中的每个中间节点上报的NMC分值。洪泛不要求维护网络的拓扑结构和相关的路由计算,仅要求接收到信息的节点以广播方式转发数据包。例如,源节点希望发送一段数据给目标节点。源节点首先通过网络将数据副本传送给它的每个邻居节点,每个邻居节点再将数据传送给各自的除发送数据来的节点之外的其他。如此继续下去,直到数据传送至目标节点或者数据设定的生存期限(Time To Live,TTL)为0为止。可见,通过该方案可以获取每个中间节点的NMC分值。Optionally, the NMC score reported by each intermediate node in each of the at least two routes is obtained by flooding. Flooding does not require maintaining the topology of the network and related routing calculations. It only requires that the node receiving the information forwards the packet in a broadcast manner. For example, the source node wants to send a piece of data to the target node. The source node first transmits a copy of the data to each of its neighbor nodes over the network, and each neighbor node transmits the data to the respective node other than the node from which the data was sent. This continues until the data is transferred to the target node or the data set lifetime (TTL) is zero. It can be seen that the NMC score of each intermediate node can be obtained through the scheme.
可选地,通过周期性信息交换机制获取至少两条路由中每条路由中的每个中间节点上报的NMC分值。周期性信息交换机制比如可为中间节点周期性的广播自己的NMC分值等等。Optionally, the NMC score reported by each intermediate node in each of the at least two routes is obtained by using a periodic information exchange mechanism. The periodic information exchange mechanism can periodically broadcast its own NMC scores for the intermediate nodes, and so on.
为了与现有技术兼容,本申请实施例提供一种用于使第一路由选择装置获取每个中间节点的NMC分值的方案,可选地,第一路由选择装置部署于源节点,第二路由选择装置部署于中间节点,图2e示例性示出了本申请实施例提供一种用于使第一路由选择装置获取每个中间节点的NMC分值的方法流程示意图,如图2e所示,该方法包括:In order to be compatible with the prior art, the embodiment of the present application provides a solution for the first routing device to obtain the NMC score of each intermediate node. Optionally, the first routing device is deployed at the source node, and the second The routing device is deployed in the intermediate node. FIG. 2e exemplarily shows a schematic flowchart of a method for the first routing device to obtain the NMC score of each intermediate node, as shown in FIG. 2 e. The method includes:
步骤251,第一路由选择装置广播路由请求。其中,路由请求中包括目标节点的标识。Step 251: The first routing device broadcasts a routing request. The routing request includes an identifier of the target node.
第一路由选择装置可部署于源节点,源节点可首先向其节点广播“路由请求(Route Request)”报文。报文中除包括目标节点的标识外,还可包括“路由记录”的字段、“路由请求的标识”的字段等等。其中“路由记录”字段用于记录从源节点到目标节点的路由所包括的中间节点的标识,中间节点的标识也可为中间节点的地址,能够唯一找到该中间节点即可。The first routing device can be deployed to the source node, and the source node can first broadcast a "Route Request" message to its node. In addition to the identifier of the target node, the message may include a field of "route record", a field of "identity of route request", and the like. The “Route Record” field is used to record the identifier of the intermediate node included in the route from the source node to the target node. The identifier of the intermediate node may also be the address of the intermediate node, and the intermediate node can be uniquely found.
步骤252,第二路由选择装置接收路由请求。其中,路由请求中包括目标节点的标识。可选地,第二路由选择装置部署在中间节点上。 Step 252, the second routing device receives the routing request. The routing request includes an identifier of the target node. Optionally, the second routing device is deployed on the intermediate node.
步骤253,第二路由选择装置根据路由请求的标识在确定为首次接收到路由请求后,将中间节点的标识和NMC分值添加至路由请求的路由记录中,并转发增加了中间节点的标识和NMC分值的路由请求。具体来说,转发增加了中间节点的标识和NMC分值的路由请求,可通过广播的形式广播该增加了中间节点的标识和NMC分值的路由请求。Step 253: After determining that the routing request is received for the first time, the second routing device adds the identifier of the intermediate node and the NMC score to the routing record of the routing request according to the identifier of the routing request, and forwards and adds the identifier of the intermediate node. Routing request for NMC scores. Specifically, the forwarding increases the identifier of the intermediate node and the routing request of the NMC score, and the routing request that adds the identifier of the intermediate node and the NMC score can be broadcasted in a broadcast manner.
在步骤253中,可选地,第二路由选择装置在收到路由请求后,判断是否是首次收到路由请求有多种确定方式,比如一种方式为:中间节点维护一个序列对列表,该序列对列表中存储路由请求的<源节点标识,路由请求的标识>,接收到路由请求时,若路由请求的<源节点标识,路由请求的标识>不存在于本中间节点的序列对列表中,则表明是第一次收到该路由请求,将该路由请求<源节点标识,路由请求的标识>保存在本中间节点的序列对列表中;若路由请求的<源节点标识,路由请求的标识>存在于本中间节点的序列对列表中,则表明此路由请求之前已经收到过,此次不处理。In step 253, the second routing device determines, after receiving the routing request, whether there is a plurality of determining manners for receiving the routing request for the first time, for example, the method is: the intermediate node maintains a sequence pair list, where The source node identifier of the route request in the sequence pair list, the identifier of the route request>, when the route request is received, if the <source node identifier of the route request, the identifier of the route request> does not exist in the sequence pair list of the intermediate node , indicating that the routing request is received for the first time, and the routing request <source node identifier, the identifier of the routing request> is saved in the sequence pair list of the intermediate node; if the source node identifier of the routing request, the routing request The identifier> exists in the sequence pair list of the intermediate node, indicating that the route request has been received before, and this time it is not processed.
另外一种可选地判断是否是首次收到路由请求的方案为,判断路由请求中的“路由记录”字段中是否包括该中间节点的标识,如果不包括,则确定为首次收到,并将中间节点的标识和NMC分值添加至路由请求的路由记录的字段中;如果包括,则表明此路由请求之前已经收到过,此次不处理。Another optional method for judging whether the route request is received for the first time is: determining whether the identifier of the intermediate node is included in the “Route Record” field in the route request, and if not, determining that it is received for the first time, and The identifier of the intermediate node and the NMC score are added to the field of the route record of the route request; if it is included, it indicates that the route request has been received before, and this time it is not processed.
步骤254,目标节点接收到该路由请求,并向源节点返回路由响应。路由响应中包括:源节点到目标节点的至少两条路由,以及至少两条路由中的中间节点的NMC分值。In step 254, the target node receives the routing request and returns a routing response to the source node. The route response includes: at least two routes from the source node to the target node, and NMC scores of the intermediate nodes in the at least two routes.
具体来说,路由请求中的路由记录中的中间节点的标识的序列构成了路由,目标节点将该路由附加到路由响应中,并向源节点发送该路由,以及路由中每个中间节点的NMC分值。Specifically, the sequence of the identifiers of the intermediate nodes in the route record in the route request constitutes a route, the target node attaches the route to the route response, and sends the route to the source node, and the NMC of each intermediate node in the route. Score.
具体来说,目标节点可收到多条路由请求,存在至少两条路由请求中包括的路由不同,可选地,目标节点至少将该两条路由附加在两个路由响应中或者附加在一个路由响应中返回给源节点。或者,目标节点针对接收到的每条路由请求均回复一个路由响应,其中,每个路由响应中包括该路由请求中包括的路由。Specifically, the target node may receive multiple routing requests, and there are different routes included in at least two routing requests. Optionally, the target node attaches at least the two routes to two routing responses or is attached to one route. The response is returned to the source node. Alternatively, the target node replies with a route response for each received route request, where each route response includes a route included in the route request.
可选地,目标节点可以将路由记录中的中间节点的标识的序列进行反转,即为从目标节点通向源节点的路由,目标节点可沿该路由向源节点返回路由响应。也可能信道是非对称的,目标节点需要发起到源节点的路由请求过程,同时将路由响应报文捎带在新的路由请求中。Optionally, the target node may invert the sequence of the identifier of the intermediate node in the route record, that is, a route from the target node to the source node, and the target node may return a route response to the source node along the route. It is also possible that the channel is asymmetric, and the target node needs to initiate a routing request process to the source node, and at the same time, the routing response message is carried in the new routing request.
步骤255,第一路由选择装置接收目标节点返回的路由请求对应的路由响应;其中,路由响应中包括:源节点到目标节点的至少两条路由,以及至少两条路由中的中间节点的NMC分值。Step 255: The first routing device receives the routing response corresponding to the routing request returned by the target node, where the routing response includes: at least two routes from the source node to the target node, and NMC points of the intermediate nodes in the at least two routes. value.
可选地,第一路由选择装置部署于源节点上,第一路由选择装置接收到路由响应后,将路由响应中包括的中间节点的标识的序列进行反转,即得到了从源节点到目标节点的路由。源节点接收到至少两条路由后根据上述方案选择出目标路由,在此不再赘述。Optionally, the first routing device is deployed on the source node, and after receiving the routing response, the first routing device reverses the sequence of the identifier of the intermediate node included in the routing response, that is, the source node to the target is obtained. The route of the node. After receiving the at least two routes, the source node selects the destination route according to the foregoing solution, and details are not described herein.
本申请实施例中,选择目标路由时仅仅计算路由的NMC分值即可,计算方案简单,复杂度地,路由计算速度快;且各个节点,比如中间节点需要维护的状态信息少,比如可仅仅维护自身的NMC分值即可;第三方面,本申请实施例中各个节点间交互的信息较少,且各个节点与第一路由选择装置和第二路由选择装置之间交互的信息也少,减轻了网络负荷;第四方面,本申请实施例提供的方案所选择的目标路由抵抗故障的能力较强、自愈速度快且代价低。进一步,本申请实施例所提供的方案不仅仅适用于WMN网络,且对于大规模动态网络鲁棒路由问题都有效,但是不同网络中的微结构选择与选路公式可能会有不同,可结合具体场景离线分析后得到相关结论后再进行具体配置。In the embodiment of the present application, only the NMC score of the route is calculated when the target route is selected, the calculation scheme is simple, the complexity is fast, and the route calculation speed is fast; and each node, such as an intermediate node, needs less state information to be maintained, for example, only It is sufficient to maintain the NMC score of the user. In the third embodiment, the information exchanged between the nodes in the embodiment of the present application is less, and the information exchanged between each node and the first routing device and the second routing device is less. The network load is alleviated; in the fourth aspect, the target route selected by the solution provided by the embodiment of the present application has strong ability to resist failure, fast self-healing speed, and low cost. Further, the solution provided by the embodiment of the present application is not only applicable to the WMN network, but also effective for the large-scale dynamic network robust routing problem, but the microstructure selection and routing formula in different networks may be different, and may be combined with specific After the scenario is analyzed offline, the relevant conclusions are obtained and then the specific configuration is performed.
图3示例性示出了本申请提供的一种路由选择装置的结构示意图。FIG. 3 exemplarily shows a schematic structural diagram of a routing apparatus provided by the present application.
基于相同构思,本申请提供一种路由选择装置300,用于执行上述方法流程。路由选择装置300可以包括上述内容中的第一路由选择装置,或者包括上述内容中第一路由选择装置和第二路由选择装置,也可为上述内容中图1a中的路由选择装置141。也就是说路由选择装置300可以用于执行上述方法中的任一个方案,即可执行上述内容中第一路由选择装置或第二路由选择装置所执行的任一个方案,或者执行第一路由选择装置和第二路由选择装置所执行的任一个方案,或者执行上述路由选择装置141所执行的任一个方案。Based on the same concept, the present application provides a routing device 300 for performing the above method flow. The routing device 300 may include the first routing device in the above content, or may include the first routing device and the second routing device in the above content, or may be the routing device 141 in FIG. 1a in the above content. That is, the routing device 300 may be configured to perform any of the foregoing methods, that is, perform any one of the foregoing methods performed by the first routing device or the second routing device, or execute the first routing device. And any one of the schemes performed by the second routing device, or any of the schemes performed by the routing device 141 described above.
如图3所示,路由选择装置300包括处理器301、收发器302、存储器303和通信接口304;其中,处理器301、收发器302、存储器303和通信接口304通过总线305相互连接。As shown in FIG. 3, the routing device 300 includes a processor 301, a transceiver 302, a memory 303, and a communication interface 304; wherein the processor 301, the transceiver 302, the memory 303, and the communication interface 304 are connected to one another via a bus 305.
总线305可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图3中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 305 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 3, but it does not mean that there is only one bus or one type of bus.
存储器303可以包括易失性存储器(volatile memory),例如随机存取存储器 (random-access memory,RAM);存储器也可以包括非易失性存储器(non-volatile memory),例如快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器303还可以包括上述种类的存储器的组合。The memory 303 may include a volatile memory such as a random-access memory (RAM); the memory may also include a non-volatile memory such as a flash memory. A hard disk drive (HDD) or a solid-state drive (SSD); the memory 303 may also include a combination of the above types of memories.
通信接口304可以为有线通信接入口,无线通信接口或其组合,其中,有线通信接口例如可以为以太网接口。以太网接口可以是光接口,电接口或其组合。无线通信接口可以为WLAN接口。The communication interface 304 can be a wired communication access port, a wireless communication interface, or a combination thereof, wherein the wired communication interface can be, for example, an Ethernet interface. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface can be a WLAN interface.
处理器301可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP)或者CPU和NP的组合。处理器301还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。The processor 301 can be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor 301 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL), or any combination thereof.
可选地,存储器303还可以用于存储程序指令,处理器301调用该存储器303中存储的程序指令,可以执行图2至图2e所示实施例中的一个或多个步骤,或其中可选的实施方式,使得路由选择装置300实现上述方法中第一路由选择装置和/或第二路由选择装置的功能,以及使得路由选择装置300实现上述方法中路由选择装置141的功能。Optionally, the memory 303 can also be used to store program instructions, and the processor 301 calls the program instructions stored in the memory 303 to perform one or more steps in the embodiment shown in FIG. 2 to FIG. 2e, or alternatively The embodiment enables the routing device 300 to implement the functions of the first routing device and/or the second routing device in the above method, and to cause the routing device 300 to implement the functions of the routing device 141 in the above method.
处理器301用于根据执行存储器存储的指令,并控制收发器302进行信号接收和信号发送,当处理器301执行存储器存储的指令时,路由选择装置用于:获取源节点到目标节点的至少两条路由,并获取至少两条路由中的中间节点的微结构计数NMC分值;根据至少两条路由中的中间节点的NMC分值,从至少两条路由中选择出一条目标路由;其中,中间节点的NMC分值是根据该中间节点构建的多边形的数量得到的;其中,该中间节点为该中间节点构建的多边形的顶点。The processor 301 is configured to control the transceiver 302 to perform signal reception and signal transmission according to the instruction for executing the memory storage. When the processor 301 executes the memory storage instruction, the routing device is configured to: acquire at least two of the source node to the target node. And routing the NMC scores of the intermediate nodes of the at least two routes; and selecting a destination route from the at least two routes according to the NMC score of the intermediate nodes in the at least two routes; wherein, the middle The NMC score of the node is obtained according to the number of polygons constructed by the intermediate node; wherein the intermediate node is the vertex of the polygon constructed by the intermediate node.
本申请实施例中,中间节点的NMC分值是根据该中间节点构建的多边形的数量得到的,且该中间节点为该中间节点构建的多边形的顶点,也就是说,一个中间节点的NMC分值可以反映出该中间节点参与构建的多边形的数量,由于多边形是封闭的,且该中间节点为该多边形的顶点,因此该中间节点构建多边形的数量可以反映出该中间节点的链路出现故障后该中间节点的故障修复能力,又由于本申请实施例中根据至少两条路由中的中间节点的NMC分值从源节点到目标节点的至少两条路由中选择目标路由,也就是说,本申请实施例中是基于中间节点的故障修复能力选择的目标路由,因此本申请实施例所提供的方案可提高目标路由抵抗故障的能力,从而提高通讯的可靠性。In the embodiment of the present application, the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node, and the intermediate node is a vertex of the polygon constructed by the intermediate node, that is, an NMC score of an intermediate node. The number of polygons that the intermediate node participates in constructing may be reflected. Since the polygon is closed and the intermediate node is a vertex of the polygon, the number of polygons constructed by the intermediate node may reflect that the link of the intermediate node is faulty. The fault repairing capability of the intermediate node, and the target route is selected from the source node to the target node according to the NMC score of the intermediate node in the at least two routes in the embodiment of the present application, that is, the implementation of the present application In the example, the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
可选地,至少两条路由中第一路由和第二路由等价;其中,第一路由和第二路由为至少两条路由中的任两条路由;第一路由和第二路由满足以下内容中的任一项:第一路由包括的节点间的跳数与第二路由包括的节点间的跳数相同;第一路由的传输时延与第二路由包括的传输时延相同;第一路由包括的链路的权重的和与第二路由包括的链路的权重的和相同;第一路由包括的中间节点的权重的和与第二路由包括的中间节点的权重的和相同;第一路由包括的链路的权重和中间节点的权重的和与第二路由包括的链路的权重和中间节点的权重的和相同。通过上述论述可见,本申请实施例中选择出的目标路由是考虑了路由上各个中间节点的路由修复能力的,因此可提高路由的可靠性。进一步,针对两条等价的路由,本申请实施例中可以更加显出优势,本申请实施例中可以确定出两条等价的路由中那条路由的故障修复能力更高。Optionally, the first route and the second route are equivalent to the at least two routes; wherein the first route and the second route are any two routes of the at least two routes; the first route and the second route meet the following content Any one of the following: the hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route; the transmission delay of the first route is the same as the transmission delay included in the second route; the first route The sum of the weights of the included links is the same as the sum of the weights of the links included in the second route; the sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route; the first route The sum of the weight of the included link and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node. It can be seen from the above that the target route selected in the embodiment of the present application considers the route repair capability of each intermediate node on the route, and thus the reliability of the route can be improved. Further, for the two equal-cost routes, the advantages of the method in the present application can be further improved. In this embodiment, the fault repair capability of the route in the two equal-cost routes is determined to be higher.
可选地,中间节点的NMC分值是:根据该中间节点构建的M类多边形的数量得到的;其中,M为大于等于1的整数,且若M大于等于2时,M类多边形中任两类多边形的边数不同。如此,可以根据实际情况以及具体的应用场景合理设置M类多边形,从而使NMC分值更加准确的反映该中间节点的故障修复能力。Optionally, the NMC score of the intermediate node is obtained according to the number of M-type polygons constructed by the intermediate node; wherein, M is an integer greater than or equal to 1, and if M is greater than or equal to 2, any two of the M-type polygons Class polygons have different numbers of sides. In this way, the M-type polygon can be reasonably set according to the actual situation and the specific application scenario, so that the NMC score more accurately reflects the fault repair capability of the intermediate node.
可选地,中间节点的NMC分值是:将根据M类多边形中每类多边形对应的权重,将该中间节点构建的M类多边形中的每类多边形的数量进行加权计算得到的;其中,该中间节点的NMC分值用于指示:该中间节点的故障修复能力。如此,M类多边形中每类多边形对应的权重可以根据实际情况设定,比如每类多边形的权重都相同,都为1;或者由于边数越多的多边形可能修复后的路由时延较大,因此边数越多的多边形的权重可能越小等等,从而使NMC分值在该中间节点的故障修复能力以及修复后路由的时延之间进行平衡。Optionally, the NMC score of the intermediate node is: performing weighting calculation on the number of each type of polygon in the M-type polygon constructed by the intermediate node according to the weight corresponding to each type of polygon in the M-type polygon; wherein The NMC score of the intermediate node is used to indicate: the fault repair capability of the intermediate node. Thus, the weights of each type of polygon in the M-type polygon can be set according to actual conditions, for example, the weight of each type of polygon is the same, both are 1; or the polygons with more edges may have a larger routing delay after repairing, Therefore, the polygons with more edges may have smaller weights, etc., so that the NMC score is balanced between the fault repair capability of the intermediate node and the delay of the repaired route.
可选地,处理器301,用于:根据至少两条路由中的中间节点的NMC分值,确定出至少两条路由中路由的NMC分值;其中,该路由的NMC分值用于指示该路由的故障修复能力;根据至少两条路由中路由的NMC分值,将指示的故障修复能力最强的路由的NMC分值对应的路由确定为目标路由。Optionally, the processor 301 is configured to determine, according to an NMC score of the intermediate node in the at least two routes, an NMC score of the route in the at least two routes, where the NMC score of the route is used to indicate the The fault repairing capability of the route is determined by the NMC score of the route of the at least two routes, and the route corresponding to the NMC score of the route with the strongest fault repair capability is determined as the target route.
可选地,处理器301,用于通过以下任一方式确定出至少两条路由中路由的NMC分值:将至少两条路由中路由中指示的故障修复能力最弱的中间节点的NMC分值确定为路由的NMC分值;将至少两条路由中路由中的中间节点NMC分值进行数学计算,并将数学计算的结果确定为路由的NMC分值。Optionally, the processor 301 is configured to determine, by using any one of the following methods, the NMC score of the route in the at least two routes: the NMC score of the intermediate node that has the weakest fault repair capability indicated in the route in the at least two routes. The NMC score is determined as a route; the intermediate node NMC score in the route of at least two routes is mathematically calculated, and the result of the mathematical calculation is determined as the NMC score of the route.
可选地,收发器302,还用于:通过洪泛或周期性信息交换机制获取至少两条路由中每条路由中的每个中间节点上报的NMC分值。可选地,处理器301获取中间节点的NMC分值可通过控制收发器302接收至少两条路由中每条路由中的每个中间节点上报的NMC分值,也可通过处理器301计算至少两条路由中每条路由中的每个中间节点的NMC分值。Optionally, the transceiver 302 is further configured to: obtain, by using a flooding or periodic information exchange mechanism, an NMC score reported by each of the at least two routes. Optionally, the processor 301 obtains the NMC score of the intermediate node, and the control transceiver 302 receives the NMC score reported by each of the at least two routes, and may also calculate at least two by the processor 301. The NMC score of each intermediate node in each route in the route.
可选地,收发器302,用于:广播路由请求;其中,路由请求中包括目标节点的标识;接收目标节点返回的路由请求对应的路由响应;其中,路由响应中包括:源节点到目标节点的至少两条路由,以及至少两条路由中的中间节点的NMC分值。该示例中,路由选择装置300可以集成于源节点上。Optionally, the transceiver 302 is configured to: broadcast a routing request; where the routing request includes an identifier of the target node; and receive a routing response corresponding to the routing request returned by the target node; where the routing response includes: the source node to the target node At least two routes, and NMC scores of intermediate nodes in at least two routes. In this example, routing device 300 can be integrated on the source node.
图4示例性示出了本申请提供的一种路由选择装置的结构示意图。FIG. 4 exemplarily shows a schematic structural diagram of a routing apparatus provided by the present application.
基于相同构思,本申请提供一种路由选择装置400,用于执行上述方法流程。路由选择装置400可以包括上述内容中的第二路由选择装置,或者包括上述内容中第一路由选择装置和第二路由选择装置,也可为上述内容中图1a中的路由选择装置141。也就是说路由选择装置400可以用于执行上述方法中的任一个方案,即可执行上述内容中第一路由选择装置或第二路由选择装置所执行的任一个方案以及执行上述路由选择装置141所执行的任一个方案。Based on the same concept, the present application provides a routing device 400 for performing the above method flow. The routing device 400 may include the second routing device in the above content, or may include the first routing device and the second routing device in the above content, or may be the routing device 141 in FIG. 1a in the above content. That is, the routing device 400 can be configured to perform any of the foregoing methods, that is, perform any one of the foregoing methods performed by the first routing device or the second routing device, and execute the routing device 141. Any of the programs implemented.
如图4所示,路由选择装置400包括处理器401、收发器402、存储器403和通信接口404;其中,处理器401、收发器402、存储器403和通信接口404通过总线405相互连接。As shown in FIG. 4, the routing device 400 includes a processor 401, a transceiver 402, a memory 403, and a communication interface 404; wherein the processor 401, the transceiver 402, the memory 403, and the communication interface 404 are connected to one another via a bus 405.
总线405可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图4中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 405 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 4, but it does not mean that there is only one bus or one type of bus.
存储器403可以包括易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器也可以包括非易失性存储器(non-volatile memory),例如快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器403还可以包括上述种类的存储器的组合。The memory 403 may include a volatile memory such as a random-access memory (RAM); the memory may also include a non-volatile memory such as a flash memory. A hard disk drive (HDD) or a solid-state drive (SSD); the memory 403 may also include a combination of the above types of memories.
通信接口404可以为有线通信接入口,无线通信接口或其组合,其中,有线通信接口例如可以为以太网接口。以太网接口可以是光接口,电接口或其组合。无线通信接口可以为WLAN接口。The communication interface 404 can be a wired communication access port, a wireless communication interface, or a combination thereof, wherein the wired communication interface can be, for example, an Ethernet interface. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface can be a WLAN interface.
处理器401可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP)或者CPU和NP的组合。处理器401还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。The processor 401 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor 401 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL), or any combination thereof.
可选地,存储器403还可以用于存储程序指令,处理器401调用该存储器403中存储的程序指令,可以执行图2至图2e所示实施例中的一个或多个步骤,或其中可选的实施方式,使得路由选择装置400实现上述方法中第一路由选择装置和/或第二路由选择装置的功能,或者使得路由选择装置400实现上述方法中路由选择装置141的功能。Optionally, the memory 403 can also be used to store program instructions, and the processor 401 calls the program instructions stored in the memory 403, and can perform one or more steps in the embodiment shown in FIG. 2 to FIG. 2e, or The embodiment enables the routing device 400 to implement the functions of the first routing device and/or the second routing device in the above method, or to cause the routing device 400 to implement the functions of the routing device 141 in the above method.
处理器401用于根据执行存储器存储的指令,并控制收发器402进行信号接收和信号发送,当处理器401执行存储器存储的指令时,路由选择装置用于:针对源节点到目标节点的至少两条路由中的中间节点,执行:根据该中间节点的网络拓扑信息确定该中间节点构建的多边形的数量;其中,该中间节点为该中间节点构建的多边形的顶点;据该中间节点构建的多边形的数量,确定该中间节点的微结构计数NMC分值;上报该中间节点的NMC分值;其中,至少两条路由中的中间节点的NMC分值用于:根据至少两条路由中的中间节点的NMC分值,从至少两条路由中选择出一条目标路由。The processor 401 is configured to control the transceiver 402 to perform signal reception and signal transmission according to the instruction for executing the memory storage. When the processor 401 executes the memory storage instruction, the routing device is configured to: at least two for the source node to the target node. An intermediate node in the routing, performing: determining, according to network topology information of the intermediate node, a number of polygons constructed by the intermediate node; wherein the intermediate node is a vertex of a polygon constructed by the intermediate node; and a polygon constructed according to the intermediate node The NMC score of the intermediate node is determined by the quantity; the NMC score of the intermediate node is reported; wherein the NMC score of the intermediate node in the at least two routes is used: according to the intermediate node of the at least two routes The NMC score selects a destination route from at least two routes.
本申请实施例中,中间节点的NMC分值是根据该中间节点构建的多边形的数量得到的,且该中间节点为该中间节点构建的多边形的顶点,也就是说,一个中间节点的NMC分值可以反映出该中间节点参与构建的多边形的数量,由于多边形是封闭的,且该中间节点为该多边形的顶点,因此该中间节点构建多边形的数量可以反映出该中间节点的链路出现故障后该中间节点的故障修复能力,又由于本申请实施例中根据至少两条路由中的中间节点的NMC分值从源节点到目标节点的至少两条路由中选择目标路由,也就是说,本申请实施例中是基于中间节点的故障修复能力选择的目标路由,因此本申请实施例所提供的方案可提高目标路由抵抗故障的能力,从而提高通讯的可靠性。In the embodiment of the present application, the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node, and the intermediate node is a vertex of the polygon constructed by the intermediate node, that is, an NMC score of an intermediate node. The number of polygons that the intermediate node participates in constructing may be reflected. Since the polygon is closed and the intermediate node is a vertex of the polygon, the number of polygons constructed by the intermediate node may reflect that the link of the intermediate node is faulty. The fault repairing capability of the intermediate node, and the target route is selected from the source node to the target node according to the NMC score of the intermediate node in the at least two routes in the embodiment of the present application, that is, the implementation of the present application In the example, the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
可选地,至少两条路由中第一路由和第二路由等价;其中,第一路由和第二路由为至少两条路由中的任两条路由;第一路由和第二路由满足以下内容中的任一项:第一路由包括的节点间的跳数与第二路由包括的节点间的跳数相同;第一路由的传输时延与第二路由包括的传输时延相同;第一路由包括的链路的权重的和与第二路由包括的链路的权重的和相同;第一路由包括的中间节点的权重的和与第二路由包括的中间节点的权重的和相同;第一路由包括的链路的权重和中间节点的权重的和与第二路由包括的链路的权重和中间节点的权重的和相同。通过上述论述可见,本申请实施例中选择出的目标路由是考虑了路由上各个中间节点的路由修复能力的,因此可提高路由的可靠性。进一步,针对两条等价 的路由,本申请实施例中可以更加显出优势,本申请实施例中可以确定出两条等价的路由中那条路由的故障修复能力更高。Optionally, the first route and the second route are equivalent to the at least two routes; wherein the first route and the second route are any two routes of the at least two routes; the first route and the second route meet the following content Any one of the following: the hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route; the transmission delay of the first route is the same as the transmission delay included in the second route; the first route The sum of the weights of the included links is the same as the sum of the weights of the links included in the second route; the sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route; the first route The sum of the weight of the included link and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node. It can be seen from the above that the target route selected in the embodiment of the present application considers the route repair capability of each intermediate node on the route, and thus the reliability of the route can be improved. Further, for the two equal-cost routes, the advantages of the present application can be further improved. In this embodiment, the fault repair capability of the route in the two equal-cost routes is determined to be higher.
可选地,处理器401,用于:根据该中间节点的网络拓扑信息,确定该中间节点构建的M类多边形的数量;其中,M为大于等于1的整数,且若M大于等于2时,M类多边形中任两类多边形的边数不同;根据该中间节点构建的M类多边形的数量,确定该中间节点的NMC分值。如此,可以根据实际情况以及具体的应用场景合理设置M类多边形,从而使NMC分值更加准确的反映该中间节点的故障修复能力。Optionally, the processor 401 is configured to determine, according to network topology information of the intermediate node, the number of M types of polygons constructed by the intermediate node, where M is an integer greater than or equal to 1, and if M is greater than or equal to 2, The number of sides of any two types of polygons in the M-type polygon is different; according to the number of M-type polygons constructed by the intermediate node, the NMC score of the intermediate node is determined. In this way, the M-type polygon can be reasonably set according to the actual situation and the specific application scenario, so that the NMC score more accurately reflects the fault repair capability of the intermediate node.
可选地,处理器401,用于:确定M类多边形中每类多边形对应的权重;根据M类多边形中每类多边形对应的权重,将该中间节点构建的M类多边形中的每类多边形的数量进行加权计算;将该中间节点构建的M类多边形中的每类多边形的数量加权计算后的结果确定为该中间节点的NMC分值。如此,M类多边形中每类多边形对应的权重可以根据实际情况设定,比如每类多边形的权重都相同,都为1;或者由于边数越多的多边形可能修复后的路由时延较大,因此边数越多的多边形的权重可能越小等等,从而使NMC分值在该中间节点的故障修复能力以及修复后路由的时延之间进行平衡。Optionally, the processor 401 is configured to: determine a weight corresponding to each type of polygon in the M-type polygon; and, according to the weight corresponding to each type of polygon in the M-type polygon, each type of polygon in the M-type polygon constructed by the intermediate node The number is weighted; the result of weighting the number of each type of polygon in the M-type polygon constructed by the intermediate node is determined as the NMC score of the intermediate node. Thus, the weights of each type of polygon in the M-type polygon can be set according to actual conditions, for example, the weight of each type of polygon is the same, both are 1; or the polygons with more edges may have a larger routing delay after repairing, Therefore, the polygons with more edges may have smaller weights, etc., so that the NMC score is balanced between the fault repair capability of the intermediate node and the delay of the repaired route.
可选地,收发器402,还用于:通过洪泛或周期性信息交换机制获取至少两条路由中每条路由中的每个中间节点上报的NMC分值。可选地,可通过收发器402接收至少两条路由中每条路由中的每个中间节点上报的NMC分值,也可通过处理器401计算至少两条路由中每条路由中的每个中间节点的NMC分值。Optionally, the transceiver 402 is further configured to: obtain, by using a flooding or periodic information exchange mechanism, an NMC score reported by each of the at least two routes. Optionally, the NMC score reported by each of the at least two routes may be received by the transceiver 402, and each of the at least two routes may be calculated by the processor 401. The NMC score of the node.
可选地,收发器402,用于:接收路由请求;其中,路由请求中包括目标节点的标识;根据路由请求的标识在确定为首次接收到路由请求后,将中间节点的标识和NMC分值添加至路由请求的路由记录中,并转发增加了中间节点的标识和NMC分值的路由请求。该示例中,路由选择装置300可以集成于中间节点上。Optionally, the transceiver 402 is configured to: receive a routing request, where the routing request includes an identifier of the target node; and after determining that the routing request is received for the first time, the identifier of the intermediate node and the NMC score are determined according to the identifier of the routing request. Add to the routing record of the routing request, and forward the routing request with the identifier of the intermediate node and the NMC score. In this example, routing device 300 can be integrated on the intermediate node.
图5示例性示出了本申请实施例提供的一种路由选择装置的结构示意图。FIG. 5 is a schematic structural diagram of a routing apparatus provided by an embodiment of the present application.
基于相同构思,本申请实施例提供一种路由选择装置,用于执行上述方法流程。路由选择装置500可以包括上述内容中的第一路由选择装置,或者包括上述内容中第一路由选择装置和第二路由选择装置,也可为上述内容中图1a中的路由选择装置141。也就是说路由选择装置500可以用于执行上述方法中的任一个方案。如图5所示,路由选择装置500包括接收单元501、处理单元502和发送单元503。Based on the same concept, the embodiment of the present application provides a routing device for performing the foregoing method flow. The routing device 500 may include the first routing device in the above content, or may include the first routing device and the second routing device in the above content, or may be the routing device 141 in FIG. 1a in the above content. That is, the routing device 500 can be used to perform any of the above methods. As shown in FIG. 5, the routing device 500 includes a receiving unit 501, a processing unit 502, and a transmitting unit 503.
处理单元502用于:获取源节点到目标节点的至少两条路由,并获取至少两条路由中的中间节点的微结构计数NMC分值;根据至少两条路由中的中间节点的NMC分值,从至少两条路由中选择出一条目标路由;其中,中间节点的NMC分值是根据该中间节点构建的多边形的数量得到的;其中,该中间节点为该中间节点构建的多边形的顶点。The processing unit 502 is configured to: obtain at least two routes from the source node to the target node, and obtain a micro structure count NMC score of the intermediate node in the at least two routes; according to the NMC score of the intermediate node in the at least two routes, A target route is selected from at least two routes; wherein the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node; wherein the intermediate node is a vertex of the polygon constructed by the intermediate node.
本申请实施例中,中间节点的NMC分值是根据该中间节点构建的多边形的数量得到的,且该中间节点为该中间节点构建的多边形的顶点,也就是说,一个中间节点的NMC分值可以反映出该中间节点参与构建的多边形的数量,由于多边形是封闭的,且该中间节点为该多边形的顶点,因此该中间节点构建多边形的数量可以反映出该中间节点的链路出现故障后该中间节点的故障修复能力,又由于本申请实施例中根据至少两条路由中的中间节点的NMC分值从源节点到目标节点的至少两条路由中选择目标路由,也就是说,本申请实施例中是基于中间节点的故障修复能力选择的目标路由,因此本申请实施例所提供的方案可提高目标路由抵抗故障的能力,从而提高通讯的可靠性。In the embodiment of the present application, the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node, and the intermediate node is a vertex of the polygon constructed by the intermediate node, that is, an NMC score of an intermediate node. The number of polygons that the intermediate node participates in constructing may be reflected. Since the polygon is closed and the intermediate node is a vertex of the polygon, the number of polygons constructed by the intermediate node may reflect that the link of the intermediate node is faulty. The fault repairing capability of the intermediate node, and the target route is selected from the source node to the target node according to the NMC score of the intermediate node in the at least two routes in the embodiment of the present application, that is, the implementation of the present application In the example, the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
可选地,至少两条路由中第一路由和第二路由等价;其中,第一路由和第二路由为至少两条路由中的任两条路由;第一路由和第二路由满足以下内容中的任一项:第一路由包括的节点间的跳数与第二路由包括的节点间的跳数相同;第一路由的传输时延与第二路由包括的传输时延相同;第一路由包括的链路的权重的和与第二路由包括的链路的权重的和相同;第一路由包括的中间节点的权重的和与第二路由包括的中间节点的权重的和相同;第一路由包括的链路的权重和中间节点的权重的和与第二路由包括的链路的权重和中间节点的权重的和相同。通过上述论述可见,本申请实施例中选择出的目标路由是考虑了路由上各个中间节点的路由修复能力的,因此可提高路由的可靠性。进一步,针对两条等价的路由,本申请实施例中可以更加显出优势,本申请实施例中可以确定出两条等价的路由中那条路由的故障修复能力更高。Optionally, the first route and the second route are equivalent to the at least two routes; wherein the first route and the second route are any two routes of the at least two routes; the first route and the second route meet the following content Any one of the following: the hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route; the transmission delay of the first route is the same as the transmission delay included in the second route; the first route The sum of the weights of the included links is the same as the sum of the weights of the links included in the second route; the sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route; the first route The sum of the weight of the included link and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node. It can be seen from the above that the target route selected in the embodiment of the present application considers the route repair capability of each intermediate node on the route, and thus the reliability of the route can be improved. Further, for the two equal-cost routes, the advantages of the method in the present application can be further improved. In this embodiment, the fault repair capability of the route in the two equal-cost routes is determined to be higher.
可选地,中间节点的NMC分值是:根据该中间节点构建的M类多边形的数量得到的;其中,M为大于等于1的整数,且若M大于等于2时,M类多边形中任两类多边形的边数不同。如此,可以根据实际情况以及具体的应用场景合理设置M类多边形,从而使NMC分值更加准确的反映该中间节点的故障修复能力。Optionally, the NMC score of the intermediate node is obtained according to the number of M-type polygons constructed by the intermediate node; wherein, M is an integer greater than or equal to 1, and if M is greater than or equal to 2, any two of the M-type polygons Class polygons have different numbers of sides. In this way, the M-type polygon can be reasonably set according to the actual situation and the specific application scenario, so that the NMC score more accurately reflects the fault repair capability of the intermediate node.
可选地,中间节点的NMC分值是:将根据M类多边形中每类多边形对应的权重,将该中间节点构建的M类多边形中的每类多边形的数量进行加权计算得到的;其中,该中间节点的NMC分值用于指示:该中间节点的故障修复能力。如此,M类多边形中每类多边形对应的权重可以根据实际情况设定,比如每类多边形的权重都相同,都为1;或者由于边数越多的多边形可能修复后的路由时延较大,因此边数越多的多边形的权重可能越小等等,从而使NMC分值在该中间节点的故障修复能力以及修复后路由的时延之间进行平衡。Optionally, the NMC score of the intermediate node is: performing weighting calculation on the number of each type of polygon in the M-type polygon constructed by the intermediate node according to the weight corresponding to each type of polygon in the M-type polygon; wherein The NMC score of the intermediate node is used to indicate: the fault repair capability of the intermediate node. Thus, the weights of each type of polygon in the M-type polygon can be set according to actual conditions, for example, the weight of each type of polygon is the same, both are 1; or the polygons with more edges may have a larger routing delay after repairing, Therefore, the polygons with more edges may have smaller weights, etc., so that the NMC score is balanced between the fault repair capability of the intermediate node and the delay of the repaired route.
可选地,处理单元502,用于:根据至少两条路由中的中间节点的NMC分值,确定出至少两条路由中路由的NMC分值;其中,该路由的NMC分值用于指示该路由的故障修复能力;根据至少两条路由中路由的NMC分值,将指示的故障修复能力最强的路由的NMC分值对应的路由确定为目标路由。Optionally, the processing unit 502 is configured to determine, according to an NMC score of the intermediate node in the at least two routes, an NMC score of the route in the at least two routes, where the NMC score of the route is used to indicate the The fault repairing capability of the route is determined by the NMC score of the route of the at least two routes, and the route corresponding to the NMC score of the route with the strongest fault repair capability is determined as the target route.
可选地,处理单元502,用于通过以下任一方式确定出至少两条路由中路由的NMC分值:将至少两条路由中路由中指示的故障修复能力最弱的中间节点的NMC分值确定为路由的NMC分值;将至少两条路由中路由中的中间节点NMC分值进行数学计算,并将数学计算的结果确定为路由的NMC分值。Optionally, the processing unit 502 is configured to determine, by using any one of the following methods, the NMC score of the route in the at least two routes: the NMC score of the intermediate node that has the weakest fault repair capability indicated in the route in the at least two routes. The NMC score is determined as a route; the intermediate node NMC score in the route of at least two routes is mathematically calculated, and the result of the mathematical calculation is determined as the NMC score of the route.
可选地,接收单元501,还用于:通过洪泛或周期性信息交换机制获取至少两条路由中每条路由中的每个中间节点上报的NMC分值。可选地,处理单元获取中间节点的NMC分值可通过控制接收单元接收至少两条路由中每条路由中的每个中间节点上报的NMC分值;也可通过处理单元计算至少两条路由中每条路由中的每个中间节点的NMC分值。Optionally, the receiving unit 501 is further configured to: obtain, by using a flooding or periodic information exchange mechanism, an NMC score reported by each intermediate node in each of the at least two routes. Optionally, the processing unit obtains the NMC score of the intermediate node, and the control receiving unit receives the NMC score reported by each of the at least two routes in the at least two routes; or the at least two routes are calculated by the processing unit. The NMC score for each intermediate node in each route.
可选地,发送单元503,用于:广播路由请求;其中,路由请求中包括目标节点的标识;接收单元501用于接收目标节点返回的路由请求对应的路由响应;其中,路由响应中包括:源节点到目标节点的至少两条路由,以及至少两条路由中的中间节点的NMC分值。该示例中,路由选择装置500可以集成于源节点上。Optionally, the sending unit 503 is configured to: broadcast a routing request, where the routing request includes an identifier of the target node, and the receiving unit 501 is configured to receive a routing response corresponding to the routing request returned by the target node, where the routing response includes: At least two routes from the source node to the destination node, and NMC scores of intermediate nodes in at least two routes. In this example, routing device 500 can be integrated on the source node.
应理解,以上各个单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。本申请实施例中,接收单元501和发送单元503可以由收发器302实现,处理单元502可以由处理器301实现。如图3所示,路由选择装置300可以包括处理器301、收发器302和存储器303。其中,存储器303可以用 于存储处理器301执行方案时的代码,该代码可为路由选择装置300出厂时预装的程序/代码。It should be understood that the division of each unit above is only a division of a logical function, and the actual implementation may be integrated into one physical entity in whole or in part, or may be physically separated. In the embodiment of the present application, the receiving unit 501 and the sending unit 503 may be implemented by the transceiver 302, and the processing unit 502 may be implemented by the processor 301. As shown in FIG. 3, routing device 300 can include a processor 301, a transceiver 302, and a memory 303. The memory 303 can be used to store the code when the processor 301 executes the solution, and the code can be a program/code pre-installed by the routing device 300 at the factory.
图6示例性示出了本申请实施例提供的一种路由选择装置的结构示意图。FIG. 6 is a schematic structural diagram of a routing apparatus provided by an embodiment of the present application.
基于相同构思,本申请实施例提供一种路由选择装置,用于执行上述方法流程。路由选择装置600可以包括上述内容中的第二路由选择装置,或者包括上述内容中第一路由选择装置和第二路由选择装置,也可为上述内容中图1a中的路由选择装置141。也就是说路由选择装置600可以用于执行上述方法中的任一个方案。如图6所示,路由选择装置600包括接收单元601、处理单元602和发送单元603。Based on the same concept, the embodiment of the present application provides a routing device for performing the foregoing method flow. The routing device 600 may include the second routing device in the above content, or may include the first routing device and the second routing device in the above content, or may be the routing device 141 in FIG. 1a in the above content. That is, the routing device 600 can be used to perform any of the above methods. As shown in FIG. 6, the routing device 600 includes a receiving unit 601, a processing unit 602, and a transmitting unit 603.
处理单元602用于针对源节点到目标节点的至少两条路由中的中间节点,执行:根据该中间节点的网络拓扑信息确定该中间节点构建的多边形的数量;其中,该中间节点为该中间节点构建的多边形的顶点;据该中间节点构建的多边形的数量,确定该中间节点的微结构计数NMC分值;上报该中间节点的NMC分值;其中,至少两条路由中的中间节点的NMC分值用于:根据至少两条路由中的中间节点的NMC分值,从至少两条路由中选择出一条目标路由。The processing unit 602 is configured to: determine, according to the network topology information of the intermediate node, the number of polygons constructed by the intermediate node, where the intermediate node is the intermediate node, and the intermediate node of the at least two routes of the source node to the target node The vertices of the constructed polygons; determining the NMC score of the microstructure of the intermediate node according to the number of polygons constructed by the intermediate node; reporting the NMC score of the intermediate node; wherein, the NMC points of the intermediate nodes in at least two routes The value is used to: select a target route from at least two routes according to an NMC score of an intermediate node in at least two routes.
本申请实施例中,中间节点的NMC分值是根据该中间节点构建的多边形的数量得到的,且该中间节点为该中间节点构建的多边形的顶点,也就是说,一个中间节点的NMC分值可以反映出该中间节点参与构建的多边形的数量,由于多边形是封闭的,且该中间节点为该多边形的顶点,因此该中间节点构建多边形的数量可以反映出该中间节点的链路出现故障后该中间节点的故障修复能力,又由于本申请实施例中根据至少两条路由中的中间节点的NMC分值从源节点到目标节点的至少两条路由中选择目标路由,也就是说,本申请实施例中是基于中间节点的故障修复能力选择的目标路由,因此本申请实施例所提供的方案可提高目标路由抵抗故障的能力,从而提高通讯的可靠性。In the embodiment of the present application, the NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node, and the intermediate node is a vertex of the polygon constructed by the intermediate node, that is, an NMC score of an intermediate node. The number of polygons that the intermediate node participates in constructing may be reflected. Since the polygon is closed and the intermediate node is a vertex of the polygon, the number of polygons constructed by the intermediate node may reflect that the link of the intermediate node is faulty. The fault repairing capability of the intermediate node, and the target route is selected from the source node to the target node according to the NMC score of the intermediate node in the at least two routes in the embodiment of the present application, that is, the implementation of the present application In the example, the target route is selected based on the fault repair capability of the intermediate node. Therefore, the solution provided by the embodiment of the present application can improve the capability of the target route to resist the fault, thereby improving the reliability of the communication.
可选地,至少两条路由中第一路由和第二路由等价;其中,第一路由和第二路由为至少两条路由中的任两条路由;第一路由和第二路由满足以下内容中的任一项:第一路由包括的节点间的跳数与第二路由包括的节点间的跳数相同;第一路由的传输时延与第二路由包括的传输时延相同;第一路由包括的链路的权重的和与第二路由包括的链路的权重的和相同;第一路由包括的中间节点的权重的和与第二路由包括的中间节点的权重的和相同;第一路由包括的链路的权重和中间节点的权重的和与第二路由包括的链路的权重和中间节点的权重的和相同。通过上述论述可见,本申请实施例中选择出的目标路由是考虑了路由上各个中间节点的路由修复能力的,因此可提高路由的可靠性。进一步,针对两条等价的路由,本申请实施例中可以更加显出优势,本申请实施例中可以确定出两条等价的路由中那条路由的故障修复能力更高。Optionally, the first route and the second route are equivalent to the at least two routes; wherein the first route and the second route are any two routes of the at least two routes; the first route and the second route meet the following content Any one of the following: the hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route; the transmission delay of the first route is the same as the transmission delay included in the second route; the first route The sum of the weights of the included links is the same as the sum of the weights of the links included in the second route; the sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route; the first route The sum of the weight of the included link and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node. It can be seen from the above that the target route selected in the embodiment of the present application considers the route repair capability of each intermediate node on the route, and thus the reliability of the route can be improved. Further, for the two equal-cost routes, the advantages of the method in the present application can be further improved. In this embodiment, the fault repair capability of the route in the two equal-cost routes is determined to be higher.
可选地,处理单元602,用于:根据该中间节点的网络拓扑信息,确定该中间节点构建的M类多边形的数量;其中,M为大于等于1的整数,且若M大于等于2时,M类多边形中任两类多边形的边数不同;根据该中间节点构建的M类多边形的数量,确定该中间节点的NMC分值。如此,可以根据实际情况以及具体的应用场景合理设置M类多边形,从而使NMC分值更加准确的反映该中间节点的故障修复能力。Optionally, the processing unit 602 is configured to: determine, according to network topology information of the intermediate node, the number of M types of polygons constructed by the intermediate node; where M is an integer greater than or equal to 1, and if M is greater than or equal to 2, The number of sides of any two types of polygons in the M-type polygon is different; according to the number of M-type polygons constructed by the intermediate node, the NMC score of the intermediate node is determined. In this way, the M-type polygon can be reasonably set according to the actual situation and the specific application scenario, so that the NMC score more accurately reflects the fault repair capability of the intermediate node.
可选地,处理单元602,用于:确定M类多边形中每类多边形对应的权重;根据M类多边形中每类多边形对应的权重,将该中间节点构建的M类多边形中的每类多边形的数量进行加权计算;将该中间节点构建的M类多边形中的每类多边形的数量加权计算后的结果 确定为该中间节点的NMC分值。如此,M类多边形中每类多边形对应的权重可以根据实际情况设定,比如每类多边形的权重都相同,都为1;或者由于边数越多的多边形可能修复后的路由时延较大,因此边数越多的多边形的权重可能越小等等,从而使NMC分值在该中间节点的故障修复能力以及修复后路由的时延之间进行平衡。Optionally, the processing unit 602 is configured to: determine weights corresponding to each type of polygon in the M type polygon; and perform weights of each type of polygon in the M type polygon constructed by the intermediate node according to weights corresponding to each type of polygon in the M type polygon The number is weighted; the result of weighting the number of each type of polygon in the M-type polygon constructed by the intermediate node is determined as the NMC score of the intermediate node. Thus, the weights of each type of polygon in the M-type polygon can be set according to actual conditions, for example, the weight of each type of polygon is the same, both are 1; or the polygons with more edges may have a larger routing delay after repairing, Therefore, the polygons with more edges may have smaller weights, etc., so that the NMC score is balanced between the fault repair capability of the intermediate node and the delay of the repaired route.
可选地,接收单元601,还用于:通过洪泛或周期性信息交换机制获取至少两条路由中每条路由中的每个中间节点上报的NMC分值。可选地,可通过接收单元601接收至少两条路由中每条路由中的每个中间节点上报的NMC分值,也可通过处理单元602计算至少两条路由中每条路由中的每个中间节点的NMC分值。Optionally, the receiving unit 601 is further configured to: obtain, by using a flooding or periodic information exchange mechanism, an NMC score reported by each of the at least two routes. Optionally, the receiving unit 601 can receive the NMC score reported by each of the at least two routes, and the processing unit 602 can calculate each middle of each of the at least two routes. The NMC score of the node.
可选地,接收单元601,用于:接收路由请求;其中,路由请求中包括目标节点的标识;处理单元602用于根据路由请求的标识在确定为首次接收到路由请求后,将中间节点的标识和NMC分值添加至路由请求的路由记录中,并通过发送单元603转发增加了中间节点的标识和NMC分值的路由请求。该示例中,路由选择装置600可以集成于中间节点上。Optionally, the receiving unit 601 is configured to: receive a routing request, where the routing request includes an identifier of the target node, and the processing unit 602 is configured to: after determining that the routing request is received for the first time, the intermediate node is determined according to the identifier of the routing request The identifier and the NMC score are added to the routing record of the routing request, and the routing request that adds the identity of the intermediate node and the NMC score is forwarded by the sending unit 603. In this example, routing device 600 can be integrated on the intermediate node.
应理解,以上各个单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。本申请实施例中,接收单元601和发送单元603可以由收发器402实现,处理单元602可以由处理器401实现。如图4所示,路由选择装置400可以包括处理器401、收发器402和存储器403。其中,存储器403可以用于存储处理器401执行方案时的代码,该代码可为路由选择装置400出厂时预装的程序/代码。It should be understood that the division of each unit above is only a division of a logical function, and the actual implementation may be integrated into one physical entity in whole or in part, or may be physically separated. In the embodiment of the present application, the receiving unit 601 and the sending unit 603 may be implemented by the transceiver 402, and the processing unit 602 may be implemented by the processor 401. As shown in FIG. 4, routing device 400 can include a processor 401, a transceiver 402, and a memory 403. The memory 403 can be used to store the code when the processor 401 executes the solution, and the code can be a program/code pre-installed by the routing device 400 at the factory.
本申请实施例提供了一种计算机存储介质,用于储存为上述路由选择装置300所用的计算机程序指令,其包含用于执行上述路由选择方法的程序。The embodiment of the present application provides a computer storage medium for storing computer program instructions used by the routing device 300, including a program for executing the above routing method.
计算机存储介质可以是计算机能够存取的任何可用介质或数据存储设备,包括但不限于磁性存储器(例如软盘、硬盘、磁带、磁光盘(MO)等)、光学存储器(例如CD、DVD、BD、HVD等)、以及半导体存储器(例如ROM、EPROM、EEPROM、非易失性存储器(NAND FLASH)、固态硬盘(SSD))等。The computer storage medium can be any available media or data storage device accessible by the computer, including but not limited to magnetic memory (eg, floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical storage (eg, CD, DVD, BD, HVD, etc.), and semiconductor memories (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state hard disk (SSD)).
本申请实施例还提供了另一种计算机存储介质,用于储存为上述路由选择装置400所用的计算机程序指令,其包含用于执行上述路由选择方法的程序。The embodiment of the present application further provides another computer storage medium for storing computer program instructions used by the routing device 400, including a program for executing the routing method described above.
计算机存储介质可以是计算机能够存取的任何可用介质或数据存储设备,包括但不限于磁性存储器(例如软盘、硬盘、磁带、磁光盘(MO)等)、光学存储器(例如CD、DVD、BD、HVD等)、以及半导体存储器(例如ROM、EPROM、EEPROM、非易失性存储器(NAND FLASH)、固态硬盘(SSD))等。The computer storage medium can be any available media or data storage device accessible by the computer, including but not limited to magnetic memory (eg, floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical storage (eg, CD, DVD, BD, HVD, etc.), and semiconductor memories (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state hard disk (SSD)).
本领域内的技术人员应明白,本申请实施例可提供为方法、系统、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system, or computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本申请实施例是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的 处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
显然,本领域的技术人员可以对本申请实施例进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请实施例的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。It is apparent that those skilled in the art can make various modifications and variations to the embodiments of the present application without departing from the spirit and scope of the application. Thus, it is intended that the present invention cover the modifications and variations of the embodiments of the present invention.

Claims (30)

  1. 一种路由选择方法,其特征在于,包括:A routing method, comprising:
    获取源节点到目标节点的至少两条路由,并获取所述至少两条路由中的中间节点的微结构计数NMC分值;其中,中间节点的NMC分值是根据该中间节点构建的多边形的数量得到的;其中,该中间节点为该中间节点构建的多边形的顶点;Obtaining at least two routes from the source node to the target node, and acquiring a microstructure count NMC score of the intermediate node in the at least two routes; wherein, the NMC score of the intermediate node is the number of polygons constructed according to the intermediate node Obtained; wherein the intermediate node is a vertex of a polygon constructed by the intermediate node;
    根据所述至少两条路由中的中间节点的NMC分值,从所述至少两条路由中选择出一条目标路由。And selecting a target route from the at least two routes according to an NMC score of the intermediate node in the at least two routes.
  2. 如权利要求1所述的方法,其特征在于,所述至少两条路由中第一路由和第二路由等价;其中,所述第一路由和所述第二路由为所述至少两条路由中的任两条路由;The method according to claim 1, wherein the first route and the second route are equivalent to the at least two routes; wherein the first route and the second route are the at least two routes Any two routes in ;
    所述第一路由和所述第二路由满足以下内容中的任一项:The first route and the second route satisfy any of the following:
    所述第一路由包括的节点间的跳数与所述第二路由包括的节点间的跳数相同;The hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route;
    所述第一路由的传输时延与所述第二路由包括的传输时延相同;The transmission delay of the first route is the same as the transmission delay of the second route;
    所述第一路由包括的链路的权重的和与所述第二路由包括的链路的权重的和相同;The sum of the weights of the links included in the first route is the same as the sum of the weights of the links included in the second route;
    所述第一路由包括的中间节点的权重的和与所述第二路由包括的中间节点的权重的和相同;The sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route;
    所述第一路由包括的链路的权重和中间节点的权重的和与所述第二路由包括的链路的权重和中间节点的权重的和相同。The sum of the weight of the link included in the first route and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node.
  3. 如权利要求1或2所述的方法,其特征在于,所述中间节点的NMC分值是:根据该中间节点构建的M类多边形的数量得到的;The method according to claim 1 or 2, wherein the NMC score of the intermediate node is obtained according to the number of M-type polygons constructed by the intermediate node;
    其中,所述M为大于等于1的整数,且若M大于等于2时,所述M类多边形中任两类多边形的边数不同。Wherein, M is an integer greater than or equal to 1, and if M is greater than or equal to 2, the number of sides of any two types of polygons in the M-type polygon is different.
  4. 如权利要求3所述的方法,其特征在于,所述中间节点的NMC分值是:将根据所述M类多边形中每类多边形对应的权重,将该中间节点构建的M类多边形中的每类多边形的数量进行加权计算得到的;The method according to claim 3, wherein the NMC score of the intermediate node is: each of the M-type polygons to be constructed by the intermediate node according to the weight corresponding to each type of polygon in the M-type polygon The number of polygons is weighted and calculated;
    其中,该中间节点的NMC分值用于指示:该中间节点的故障修复能力。The NMC score of the intermediate node is used to indicate: the fault repair capability of the intermediate node.
  5. 如权利要求1至4任一权利要求所述的方法,其特征在于,所述根据所述至少两条路由中的中间节点的NMC分值,从所述至少两条路由中选择出一条目标路由,包括:The method according to any one of claims 1 to 4, wherein the selecting a destination route from the at least two routes according to an NMC score of an intermediate node of the at least two routes ,include:
    根据所述至少两条路由中的中间节点的NMC分值,确定出所述至少两条路由中路由的NMC分值;其中,该路由的NMC分值用于指示该路由的故障修复能力;Determining, according to the NMC score of the intermediate node of the at least two routes, an NMC score of the route in the at least two routes, where the NMC score of the route is used to indicate the fault repair capability of the route;
    根据所述至少两条路由中路由的NMC分值,将指示的故障修复能力最强的路由的NMC分值对应的路由确定为所述目标路由。And determining, according to the NMC score of the route in the at least two routes, a route corresponding to the NMC score of the route with the strongest fault repair capability, as the target route.
  6. 如权利要求5所述的方法,其特征在于,所述根据所述至少两条路由中的中间节点的NMC分值,确定出所述至少两条路由中路由的NMC分值,包括以下任一种方式:The method according to claim 5, wherein the determining, according to the NMC score of the intermediate node of the at least two routes, the NMC score of the route in the at least two routes, including any of the following Ways:
    将所述至少两条路由中路由中指示的故障修复能力最弱的中间节点的NMC分值确定为路由的NMC分值;Determining, by the NMC score of the intermediate node with the weakest fault repair capability indicated in the route in the at least two routes as the NMC score of the route;
    将所述至少两条路由中路由中的中间节点NMC分值进行数学计算,并将数学计算的结果确定为路由的NMC分值。The intermediate node NMC in the at least two routes is scored for mathematical calculation, and the result of the mathematical calculation is determined as the NMC score of the route.
  7. 如权利要求1至6任一权利要求所述的方法,其特征在于,所述获取所述至少两条路由中的中间节点的NMC分值,包括:The method according to any one of claims 1 to 6, wherein the acquiring the NMC score of the intermediate node in the at least two routes comprises:
    通过洪泛或周期性信息交换机制获取所述至少两条路由中每条路由中的每个中间节点上报的NMC分值。The NMC score reported by each of the at least two routes is obtained by a flooding or periodic information exchange mechanism.
  8. 如权利要求1至7任一权利要求所述的方法,其特征在于,所述获取源节点到目标节点的至少两条路由,并获取所述至少两条路由中的中间节点的NMC分值,包括:The method according to any one of claims 1 to 7, wherein the obtaining at least two routes from the source node to the target node, and acquiring the NMC scores of the intermediate nodes in the at least two routes, include:
    广播路由请求;其中,所述路由请求中包括目标节点的标识;Broadcasting a routing request; wherein the routing request includes an identifier of the target node;
    接收所述目标节点返回的所述路由请求对应的路由响应;其中,所述路由响应中包括:所述源节点到目标节点的所述至少两条路由,以及所述至少两条路由中的中间节点的NMC分值。And receiving, by the target node, a routing response corresponding to the routing request, where the routing response includes: the at least two routes from the source node to the target node, and the middle of the at least two routes The NMC score of the node.
  9. 一种路由选择方法,其特征在于,包括:A routing method, comprising:
    针对源节点到目标节点的至少两条路由中的中间节点,执行:For the intermediate nodes in the at least two routes from the source node to the destination node, perform:
    根据该中间节点的网络拓扑信息确定该中间节点构建的多边形的数量;其中,该中间节点为该中间节点构建的多边形的顶点;Determining, according to network topology information of the intermediate node, a number of polygons constructed by the intermediate node; wherein the intermediate node is a vertex of a polygon constructed by the intermediate node;
    据该中间节点构建的多边形的数量,确定该中间节点的微结构计数NMC分值;Determining the microstructure count NMC score of the intermediate node according to the number of polygons constructed by the intermediate node;
    上报该中间节点的NMC分值;其中,所述至少两条路由中的中间节点的NMC分值用于:根据所述至少两条路由中的中间节点的NMC分值,从所述至少两条路由中选择出一条目标路由。And reporting an NMC score of the intermediate node, where the NMC score of the intermediate node in the at least two routes is used to: according to the NMC score of the intermediate node in the at least two routes, from the at least two A destination route is selected in the route.
  10. 如权利要求9所述的方法,其特征在于,所述至少两条路由中第一路由和第二路由等价;其中,所述第一路由和所述第二路由为所述至少两条路由中的任两条路由;The method according to claim 9, wherein the first route and the second route are equivalent to the at least two routes; wherein the first route and the second route are the at least two routes Any two routes in ;
    所述第一路由和所述第二路由满足以下内容中的任一项:The first route and the second route satisfy any of the following:
    所述第一路由包括的节点间的跳数与所述第二路由包括的节点间的跳数相同;The hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route;
    所述第一路由的传输时延与所述第二路由包括的传输时延相同;The transmission delay of the first route is the same as the transmission delay of the second route;
    所述第一路由包括的链路的权重的和与所述第二路由包括的链路的权重的和相同;The sum of the weights of the links included in the first route is the same as the sum of the weights of the links included in the second route;
    所述第一路由包括的中间节点的权重的和与所述第二路由包括的中间节点的权重的和相同;The sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route;
    所述第一路由包括的链路的权重和中间节点的权重的和与所述第二路由包括的链路的权重和中间节点的权重的和相同。The sum of the weight of the link included in the first route and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node.
  11. 如权利要求9或10所述的方法,其特征在于,所述根据该中间节点的网络拓扑信息确定该中间节点构建的多边形的数量,包括:The method according to claim 9 or 10, wherein the determining the number of polygons constructed by the intermediate node according to the network topology information of the intermediate node comprises:
    根据该中间节点的网络拓扑信息,确定该中间节点构建的M类多边形的数量;其中,所述M为大于等于1的整数,且若M大于等于2时,所述M类多边形中任两类多边形的边数不同;Determining, according to the network topology information of the intermediate node, the number of M-type polygons constructed by the intermediate node; wherein, M is an integer greater than or equal to 1, and if M is greater than or equal to 2, any two of the M-type polygons The number of sides of the polygon is different;
    所述据该中间节点构建的多边形的数量,确定该中间节点的NMC分值,包括:Determining the NMC score of the intermediate node according to the number of polygons constructed by the intermediate node, including:
    根据该中间节点构建的M类多边形的数量,确定该中间节点的NMC分值。The NMC score of the intermediate node is determined according to the number of M-type polygons constructed by the intermediate node.
  12. 如权利要求11所述的方法,其特征在于,所述根据该中间节点构建的M类多边形的数量,确定该中间节点的NMC分值包括:The method according to claim 11, wherein the determining the NMC score of the intermediate node according to the number of M-type polygons constructed by the intermediate node comprises:
    确定所述M类多边形中每类多边形对应的权重;Determining a weight corresponding to each type of polygon in the M type polygon;
    根据所述M类多边形中每类多边形对应的权重,将该中间节点构建的M类多边形中的每类多边形的数量进行加权计算;And weighting the number of each type of polygon in the M-type polygon constructed by the intermediate node according to the weight corresponding to each type of polygon in the M-type polygon;
    将该中间节点构建的M类多边形中的每类多边形的数量加权计算后的结果确定为该中间节点的NMC分值。The result of weighting the number of each type of polygon in the M-type polygon constructed by the intermediate node is determined as the NMC score of the intermediate node.
  13. 如权利要求9至12任一权利要求所述的方法,其特征在于,所述获取所述至少两条路由中的中间节点的NMC分值,包括:The method according to any one of claims 9 to 12, wherein the acquiring the NMC score of the intermediate node of the at least two routes comprises:
    通过洪泛或周期性信息交换机制获取所述至少两条路由中每条路由中的每个中间节点上报的NMC分值。The NMC score reported by each of the at least two routes is obtained by a flooding or periodic information exchange mechanism.
  14. 如权利要求9至13任一权利要求所述的方法,其特征在于,所述上报该中间节点的NMC分值,包括:The method according to any one of claims 9 to 13, wherein the reporting the NMC score of the intermediate node comprises:
    接收路由请求;其中,所述路由请求中包括目标节点的标识;Receiving a routing request; wherein the routing request includes an identifier of the target node;
    根据所述路由请求的标识在确定为首次接收到所述路由请求后,将中间节点的标识和NMC分值添加至所述路由请求的路由记录中,并转发增加了所述中间节点的标识和NMC分值的路由请求。And after determining that the routing request is received for the first time, adding the identifier of the intermediate node and the NMC score to the routing record of the routing request, and forwarding, adding the identifier of the intermediate node and Routing request for NMC scores.
  15. 一种路由选择装置,其特征在于,所述路由选择装置包括处理器、收发器和存储器;A routing device, characterized in that the routing device comprises a processor, a transceiver and a memory;
    所述存储器用于存储程序指令,所述处理器用于根据执行所述存储器存储的指令,并控制所述收发器进行信号接收和信号发送,当所述处理器执行所述存储器存储的指令时,所述路由选择装置用于:获取源节点到目标节点的至少两条路由,并获取所述至少两条路由中的中间节点的微结构计数NMC分值;根据所述至少两条路由中的中间节点的NMC分值,从所述至少两条路由中选择出一条目标路由;The memory is configured to store program instructions, the processor is configured to control the transceiver to perform signal reception and signal transmission according to an instruction to execute the memory, and when the processor executes the instruction stored in the memory, The routing device is configured to: obtain at least two routes from the source node to the target node, and obtain a micro-structure count NMC score of the intermediate node in the at least two routes; according to the middle of the at least two routes An NMC score of the node, and selecting a target route from the at least two routes;
    其中,中间节点的NMC分值是根据该中间节点构建的多边形的数量得到的;其中,该中间节点为该中间节点构建的多边形的顶点。The NMC score of the intermediate node is obtained according to the number of polygons constructed by the intermediate node; wherein the intermediate node is a vertex of the polygon constructed by the intermediate node.
  16. 如权利要求15所述的装置,其特征在于,所述至少两条路由中第一路由和第二路由等价;其中,所述第一路由和所述第二路由为所述至少两条路由中的任两条路由;The apparatus according to claim 15, wherein the first route and the second route are equivalent in the at least two routes; wherein the first route and the second route are the at least two routes Any two routes in ;
    所述第一路由和所述第二路由满足以下内容中的任一项:The first route and the second route satisfy any of the following:
    所述第一路由包括的节点间的跳数与所述第二路由包括的节点间的跳数相同;The hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route;
    所述第一路由的传输时延与所述第二路由包括的传输时延相同;The transmission delay of the first route is the same as the transmission delay of the second route;
    所述第一路由包括的链路的权重的和与所述第二路由包括的链路的权重的和相同;The sum of the weights of the links included in the first route is the same as the sum of the weights of the links included in the second route;
    所述第一路由包括的中间节点的权重的和与所述第二路由包括的中间节点的权重的和相同;The sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route;
    所述第一路由包括的链路的权重和中间节点的权重的和与所述第二路由包括的链路的权重和中间节点的权重的和相同。The sum of the weight of the link included in the first route and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node.
  17. 如权利要求15或16所述的装置,其特征在于,所述中间节点的NMC分值是:根据该中间节点构建的M类多边形的数量得到的;The apparatus according to claim 15 or 16, wherein the NMC score of the intermediate node is obtained according to the number of M-type polygons constructed by the intermediate node;
    其中,所述M为大于等于1的整数,且若M大于等于2时,所述M类多边形中任两类多边形的边数不同。Wherein, M is an integer greater than or equal to 1, and if M is greater than or equal to 2, the number of sides of any two types of polygons in the M-type polygon is different.
  18. 如权利要求17所述的装置,其特征在于,所述中间节点的NMC分值是:将根据所述M类多边形中每类多边形对应的权重,将该中间节点构建的M类多边形中的每类多边形的数量进行加权计算得到的;The apparatus according to claim 17, wherein the NMC score of the intermediate node is: each of the M-type polygons to be constructed by the intermediate node according to the weight corresponding to each type of polygon in the M-type polygon The number of polygons is weighted and calculated;
    其中,该中间节点的NMC分值用于指示:该中间节点的故障修复能力。The NMC score of the intermediate node is used to indicate: the fault repair capability of the intermediate node.
  19. 如权利要求15至18任一权利要求所述的装置,其特征在于,所述处理器,用于:The device according to any one of claims 15 to 18, wherein the processor is configured to:
    根据所述至少两条路由中的中间节点的NMC分值,确定出所述至少两条路由中路由的NMC分值;其中,该路由的NMC分值用于指示该路由的故障修复能力;Determining, according to the NMC score of the intermediate node of the at least two routes, an NMC score of the route in the at least two routes, where the NMC score of the route is used to indicate the fault repair capability of the route;
    根据所述至少两条路由中路由的NMC分值,将指示的故障修复能力最强的路由的NMC分值对应的路由确定为所述目标路由。And determining, according to the NMC score of the route in the at least two routes, a route corresponding to the NMC score of the route with the strongest fault repair capability, as the target route.
  20. 如权利要求19所述的装置,其特征在于,所述处理器,用于通过以下任一方式确定出所述至少两条路由中路由的NMC分值:The apparatus according to claim 19, wherein the processor is configured to determine an NMC score of the route in the at least two routes by any of the following methods:
    将所述至少两条路由中路由中指示的故障修复能力最弱的中间节点的NMC分值确定为路由的NMC分值;Determining, by the NMC score of the intermediate node with the weakest fault repair capability indicated in the route in the at least two routes as the NMC score of the route;
    将所述至少两条路由中路由中的中间节点NMC分值进行数学计算,并将数学计算的结果确定为路由的NMC分值。The intermediate node NMC in the at least two routes is scored for mathematical calculation, and the result of the mathematical calculation is determined as the NMC score of the route.
  21. 如权利要求15至20任一权利要求所述的装置,其特征在于,所述收发器,还用于:The device according to any one of claims 15 to 20, wherein the transceiver is further configured to:
    通过在洪泛或周期性信息交换机制获取所述至少两条路由中每条路由中的每个中间节点上报的NMC分值。Obtaining an NMC score reported by each of the at least two routes in the flooding or periodic information exchange mechanism.
  22. 如权利要求15至21任一权利要求所述的装置,其特征在于,所述收发器,用于:The device according to any one of claims 15 to 21, wherein the transceiver is configured to:
    广播路由请求;其中,所述路由请求中包括目标节点的标识;Broadcasting a routing request; wherein the routing request includes an identifier of the target node;
    接收所述目标节点返回的所述路由请求对应的路由响应;其中,所述路由响应中包括:所述源节点到目标节点的所述至少两条路由,以及所述至少两条路由中的中间节点的NMC分值。And receiving, by the target node, a routing response corresponding to the routing request, where the routing response includes: the at least two routes from the source node to the target node, and the middle of the at least two routes The NMC score of the node.
  23. 一种路由选择装置,其特征在于,所述路由选择装置包括处理器、收发器和存储器;A routing device, characterized in that the routing device comprises a processor, a transceiver and a memory;
    所述存储器用于存储程序指令,所述处理器用于根据执行所述存储器存储的指令,并控制所述收发器进行信号接收和信号发送,当所述处理器执行所述存储器存储的指令时,所述路由选择装置用于:针对源节点到目标节点的至少两条路由中的中间节点,执行:根据该中间节点的网络拓扑信息确定该中间节点构建的多边形的数量;其中,该中间节点为该中间节点构建的多边形的顶点;据该中间节点构建的多边形的数量,确定该中间节点的微结构计数NMC分值;上报该中间节点的NMC分值;The memory is configured to store program instructions, the processor is configured to control the transceiver to perform signal reception and signal transmission according to an instruction to execute the memory, and when the processor executes the instruction stored in the memory, The routing device is configured to: determine, according to the network topology information of the intermediate node, the number of polygons constructed by the intermediate node, where the intermediate node is the intermediate node of the at least two routes from the source node to the target node; wherein the intermediate node is The vertices of the polygons constructed by the intermediate node; determining the microstructure count NMC score of the intermediate node according to the number of polygons constructed by the intermediate node; reporting the NMC score of the intermediate node;
    其中,所述至少两条路由中的中间节点的NMC分值用于:根据所述至少两条路由中的中间节点的NMC分值,从所述至少两条路由中选择出一条目标路由。The NMC score of the intermediate node in the at least two routes is used to: select a target route from the at least two routes according to an NMC score of the intermediate node in the at least two routes.
  24. 如权利要求23所述的装置,其特征在于,所述至少两条路由中第一路由和第二路由等价;其中,所述第一路由和所述第二路由为所述至少两条路由中的任两条路由;The apparatus according to claim 23, wherein the first route and the second route are equivalent in the at least two routes; wherein the first route and the second route are the at least two routes Any two routes in ;
    所述第一路由和所述第二路由满足以下内容中的任一项:The first route and the second route satisfy any of the following:
    所述第一路由包括的节点间的跳数与所述第二路由包括的节点间的跳数相同;The hop count between the nodes included in the first route is the same as the hop count between the nodes included in the second route;
    所述第一路由的传输时延与所述第二路由包括的传输时延相同;The transmission delay of the first route is the same as the transmission delay of the second route;
    所述第一路由包括的链路的权重的和与所述第二路由包括的链路的权重的和相同;The sum of the weights of the links included in the first route is the same as the sum of the weights of the links included in the second route;
    所述第一路由包括的中间节点的权重的和与所述第二路由包括的中间节点的权重的和相同;The sum of the weights of the intermediate nodes included in the first route is the same as the sum of the weights of the intermediate nodes included in the second route;
    所述第一路由包括的链路的权重和中间节点的权重的和与所述第二路由包括的链路的权重和中间节点的权重的和相同。The sum of the weight of the link included in the first route and the weight of the intermediate node is the same as the sum of the weight of the link included in the second route and the weight of the intermediate node.
  25. 如权利要求23或24所述的装置,其特征在于,所述处理器,用于:The device according to claim 23 or 24, wherein the processor is configured to:
    根据该中间节点的网络拓扑信息,确定该中间节点构建的M类多边形的数量;其中,所述M为大于等于1的整数,且若M大于等于2时,所述M类多边形中任两类多边形的 边数不同;Determining, according to the network topology information of the intermediate node, the number of M-type polygons constructed by the intermediate node; wherein, M is an integer greater than or equal to 1, and if M is greater than or equal to 2, any two of the M-type polygons The number of sides of the polygon is different;
    根据该中间节点构建的M类多边形的数量,确定该中间节点的NMC分值。The NMC score of the intermediate node is determined according to the number of M-type polygons constructed by the intermediate node.
  26. 如权利要求25所述的装置,其特征在于,所述处理器,用于:The device according to claim 25, wherein said processor is configured to:
    确定所述M类多边形中每类多边形对应的权重;Determining a weight corresponding to each type of polygon in the M type polygon;
    根据所述M类多边形中每类多边形对应的权重,将该中间节点构建的M类多边形中的每类多边形的数量进行加权计算;And weighting the number of each type of polygon in the M-type polygon constructed by the intermediate node according to the weight corresponding to each type of polygon in the M-type polygon;
    将该中间节点构建的M类多边形中的每类多边形的数量加权计算后的结果确定为该中间节点的NMC分值。The result of weighting the number of each type of polygon in the M-type polygon constructed by the intermediate node is determined as the NMC score of the intermediate node.
  27. 如权利要求23至26任一权利要求所述的装置,其特征在于,所述收发器,还用于:The device according to any one of claims 23 to 26, wherein the transceiver is further configured to:
    通过洪泛或周期性信息交换机制下获取所述至少两条路由中每条路由中的每个中间节点上报的NMC分值。The NMC scores reported by each of the at least two routes are obtained by using a flooding or periodic information exchange mechanism.
  28. 如权利要求23至27任一权利要求所述的装置,其特征在于,所述收发器,用于:The device according to any one of claims 23 to 27, wherein the transceiver is configured to:
    接收路由请求;其中,所述路由请求中包括目标节点的标识;Receiving a routing request; wherein the routing request includes an identifier of the target node;
    根据所述路由请求的标识在确定为首次接收到所述路由请求后,将中间节点的标识和NMC分值添加至所述路由请求的路由记录中,并转发增加了所述中间节点的标识和NMC分值的路由请求。And after determining that the routing request is received for the first time, adding the identifier of the intermediate node and the NMC score to the routing record of the routing request, and forwarding, adding the identifier of the intermediate node and Routing request for NMC scores.
  29. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机可执行指令,所述计算机可执行指令用于使所述计算机执行权利要求1至8任一权利要求所述的方法。A computer storage medium, characterized in that the computer storage medium stores computer executable instructions for causing the computer to perform the method of any of claims 1-8.
  30. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机可执行指令,所述计算机可执行指令用于使所述计算机执行权利要求9至14任一权利要求所述的方法。A computer storage medium, characterized in that the computer storage medium stores computer executable instructions for causing the computer to perform the method of any of claims 9 to 14.
PCT/CN2017/119050 2017-03-29 2017-12-27 Route selection method and apparatus WO2018176946A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710197733.2A CN108668334B (en) 2017-03-29 2017-03-29 Routing method and device
CN201710197733.2 2017-03-29

Publications (1)

Publication Number Publication Date
WO2018176946A1 true WO2018176946A1 (en) 2018-10-04

Family

ID=63674132

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/119050 WO2018176946A1 (en) 2017-03-29 2017-12-27 Route selection method and apparatus

Country Status (2)

Country Link
CN (1) CN108668334B (en)
WO (1) WO2018176946A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101437305A (en) * 2008-12-09 2009-05-20 重庆邮电大学 Method for double communications and communication route optimization of wireless sensor network
CN101742529A (en) * 2009-12-10 2010-06-16 上海交通大学 Relay allocation and cooperation maintenance method in wireless cooperative network
US9077817B2 (en) * 2005-05-27 2015-07-07 Telecommunication Systems, Inc. Voice over internet protocol (VoIP) E911 metro street address guide (MSAG) validation
CN105103619A (en) * 2013-03-15 2015-11-25 波音公司 Secure routing based on the physical locations of routers

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9077817B2 (en) * 2005-05-27 2015-07-07 Telecommunication Systems, Inc. Voice over internet protocol (VoIP) E911 metro street address guide (MSAG) validation
CN101437305A (en) * 2008-12-09 2009-05-20 重庆邮电大学 Method for double communications and communication route optimization of wireless sensor network
CN101742529A (en) * 2009-12-10 2010-06-16 上海交通大学 Relay allocation and cooperation maintenance method in wireless cooperative network
CN105103619A (en) * 2013-03-15 2015-11-25 波音公司 Secure routing based on the physical locations of routers

Also Published As

Publication number Publication date
CN108668334A (en) 2018-10-16
CN108668334B (en) 2020-06-16

Similar Documents

Publication Publication Date Title
US10310944B2 (en) Phased network formation for power restoration
CN107852362B (en) Grid network system and method
EP2548341B1 (en) Alternate down paths for directed acyclic graph (dag) routing
US10439880B2 (en) Loop-free convergence in communication networks
US7567577B2 (en) Link state advertisements specifying dynamic routing metrics and associated variation metrics and selective distribution thereof
CN115769549B (en) Distributing information in a communication network
Le Multipath routing design for wireless mesh networks
Yamada et al. Cooperative MPR selection to reduce topology control packets in OLSR
Sharma et al. Improving the QOS in MANET by Enhancing the Routing Technique of AOMDV Protocol
WO2018176946A1 (en) Route selection method and apparatus
Doghri et al. On The Recovery Performance of Single-and Multipath OLSR in Wireless Multi-Hop Networks
Rao et al. Performance analysis of MANET routing protocols-dsdv DSR AODV AOMDV using NS-2
Pramod et al. Characterization of wireless mesh network performance in an experimental test bed
Latiff et al. Load distributed routing protocol for wireless mesh networks
CN114430387B (en) A node configuration method, controller and node
Pathak et al. A performance study of hybrid protocols for opportunistic communications
Saleh et al. Impact of Route Selection Metrics on the Performance of DSR Protocol for MANETs
Chang et al. On multipath routing in wireless mesh networks with multiple gateways
Kampen et al. Reconnection strategies in WSN running RPL
Abdou et al. NICE-MRP: A near-optimal radio-interference aware multi-path routing protocol for MANETs
Sundararajan et al. Security and Scalability of MANET Routing Protocols in Homogeneous & Heterogeneous Networks
Manjunath et al. Stipulated Region Based Routing (SRR) algorithm for Mobile Ad Hoc Network
Pham et al. A radio load based load balancing scheme with admission control
Rajput et al. Real Time Traffic Reduced Implying LBA in Mobile Ad Hoc Network
Ong et al. Effect of Nodes Mobility on Density-Based Probabilistic Routing Algorithm in Ad-hoc Networks

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17904100

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17904100

Country of ref document: EP

Kind code of ref document: A1