Route selection method and device for planar wireless mesh network, equipment and medium
By setting up bidirectional dual paths in a flat wireless grid network and selecting paths to transmit routing requests according to the transmission direction, the problems of deadlock, live lock and starvation in the prior art are solved, and efficient and reliable transmission of routing requests is achieved.
Patent Information
- Application Number
- CN202510090002.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-03-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The routing method of existing two-dimensional wireless mesh topology has problems such as deadlock, live lock and starvation, resulting in network performance degradation and blockage.
In a planar wireless grid network, a bidirectional dual path is set, and a suitable path is selected according to the transmission direction of the routing request to transmit the routing request to avoid the formation of a ring lock loop.
It effectively avoids deadlocks, live locks and starvation, ensures that routing requests are always transmitted along the shortest path, and improves network performance and reliability.
Smart Images

Figure CN119561888A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of on-chip network technology, and in particular to a routing selection method, device, computer equipment and storage medium for a planar wireless mesh network. Background Art
[0002] Since the on-chip network has only been around for a few decades, it is still in the theoretical research stage. Overall, the research on the on-chip network is still in its infancy, and the relevant theories and technologies are not very mature. However, following the development trend from single machines to networks, it is believed that the on-chip network will become a key technology and be widely used in the near future, so it is still necessary to conduct relevant research on it.
[0003] In the existing two-dimensional wireless mesh network-on-chip topology, routers are used to arbitrate the flow of data and determine the transmission path of data packets within the routing network; resource nodes can send and receive data, and the links between routers and between routers and resource nodes are formed by bidirectional connection lines, that is, full-duplex. Each router uses a link to connect a resource node. Routing nodes and resource nodes, and routing nodes and routing nodes are connected by two independent and unidirectional links.
[0004] In an actual network, the number of routing nodes N can be arbitrarily large, as long as each routing node is connected to a resource node. However, as the network increases, the diameter and scale of the network also increase, which will have a great impact on the network's latency, power consumption and other performance. Due to the simple composition of the structure, it has been widely used in small-scale network environments. And because of the existence of a "closed loop", deadlock may occur. The XY routing method can avoid deadlock, but for any routing request, there is only one path using the XY routing method, which can easily cause blocking. Of course, there is also an odd-even sorting method (Odd-Even Sort), but for any routing request, there are more paths than the XY routing method, but it is also easy to block.
[0005] Routing methods generally refer to the transmission of data between routers R, so we will only consider the transmission of data between routers R in the following. Routing methods are one of the key research contents of NoC researchers. When the network topology is determined, the routing method determines the transmission path of the message packet in the network. It selects the intermediate nodes that need to be routed according to the source node and the target node. Therefore, the routing method is to select the intermediate nodes and transmit the small cells to the target node on the premise of selecting the appropriate nodes. The purpose of this is to make the network delay of the data packet, the power consumption required in the delivery process, the data throughput rate and the reliability meet the set indicators. A good routing selection method can achieve the best performance of the chip, on the contrary, a bad routing selection method will greatly reduce the performance of the chip. At the same time, a good routing selection method can effectively avoid deadlock, livelock and starvation, which reduce the performance of the chip.
[0006] For a two-dimensional wireless mesh topology network on chip, each router has a coordinate (x, y) that uniquely corresponds to it. However, the current routing selection methods for two-dimensional wireless mesh topology have problems such as deadlock, livelock and starvation. Summary of the invention
[0007] Based on this, it is necessary to provide a routing selection method, device, computer equipment and storage medium for a planar wireless mesh network to address the technical problems of deadlock, livelock and starvation in the current routing selection method of a two-dimensional wireless mesh topology structure, which can avoid deadlock, livelock and starvation, prevent congestion and improve chip performance.
[0008] In one aspect, a routing selection method for a planar wireless mesh network is provided, the method comprising: Acquire a planar wireless mesh network, wherein the planar wireless mesh network includes a plurality of routing nodes arranged in an array, and the routing nodes are arranged along an X-axis direction or a Y-axis direction; Setting a bidirectional dual path between all routing nodes in the planar wireless mesh network, wherein the bidirectional dual path includes a positive path and a negative path along the X-axis direction or along the Y-axis direction; In response to a routing request between the source routing node and the target routing node, obtaining the coordinates of the target routing node of the routing request and the coordinates of the routing node where the routing request is currently located, and obtaining the first transmission direction of the routing request; Detect the angle between the first transmission direction and the X-axis and the Y-axis. When the angle is 0° or 90°, select a path that is the same as the first transmission direction from the paths set along the X-axis direction or the Y-axis direction to transmit the routing request; otherwise, select a path that is less than 90° from the paths set along the X-axis direction and the Y-axis direction to transmit the routing request.
[0009] In one embodiment, the routing selection method further includes: When the routing request is transmitted to the next routing node, the coordinates of the routing node where the routing request is currently located are updated, and the transmission path of the routing request in the current routing node is continued to be controlled.
[0010] In one embodiment, the step of setting a bidirectional dual path between all routing nodes in the planar wireless mesh network, wherein the bidirectional dual path includes a positive path and a negative path along an X-axis direction or along a Y-axis direction comprises: The bidirectional two-way connection paths between two adjacent routing nodes along the X-axis direction and the Y-axis direction are set as a first forward path, a second forward path, a first reverse path, and a second reverse path, and all the first forward paths, first reverse paths, second reverse paths, and second forward paths are respectively set with a first mark, a second mark, a third mark, and a fourth mark.
[0011] In one embodiment, in response to a routing request between a source routing node and a target routing node, obtaining the coordinates of the target routing node of the routing request and the coordinates of the routing node where the routing request is currently located, the step of obtaining the first transmission direction of the routing request includes: In response to a routing request between the source routing node and the target routing node, the target routing node coordinates of the routing request and the routing node coordinates where the routing request is currently located are obtained, and the difference between the X-axis value of the target routing node coordinates and the X-axis value of the routing node coordinates where the routing request is currently located is used as the real-time coordinate difference ΔX, and the difference between the Y-axis value of the target routing node coordinates and the Y-axis value of the routing node coordinates where the routing request is currently located is used as the real-time coordinate difference ΔY; When ΔX>0, it is determined that the routing request is transmitted in the positive direction of the X-axis; when ΔX<0, it is determined that the routing request is transmitted in the negative direction of the X-axis; when ΔX=0, it is determined that the routing request is not transmitted along the X-axis; when ΔY>0, it is determined that the routing request is transmitted in the positive direction of the Y-axis; when ΔY<0, it is determined that the routing request is transmitted in the negative direction of the Y-axis; when ΔY=0, it is determined that the routing request is not transmitted along the Y-axis.
[0012] In one of the embodiments, in response to a routing request between a source routing node and a target routing node, obtaining the target routing node coordinates of the routing request and the routing node coordinates where the routing request is currently located, taking the difference between the X-axis value of the target routing node coordinates and the X-axis value of the routing node coordinates where the routing request is currently located as the real-time coordinate difference ΔX, and taking the difference between the Y-axis value of the target routing node coordinates and the Y-axis value of the routing node coordinates where the routing request is currently located as the real-time coordinate difference ΔY, the step includes: In response to a routing request between the source routing node and the target routing node, the coordinates (xD ,y D ), get the coordinates of the routing node where the routing request is currently located (x now ,y now ); By the formula ΔX=x D -x now and ΔY=y D -y now Calculate the real-time coordinate difference (ΔX, ΔY).
[0013] In one embodiment, the step of selecting a path in the same direction as the first transmission direction from among the paths arranged along the X-axis direction or the Y-axis direction to transmit the routing request comprises: When ΔX=0, ΔY>0, the current routing node transmits the routing request along the Y axis in the positive direction through the path with the first mark or the fourth mark set until ΔY=0, and the routing ends; When ΔX=0, ΔY<0, the current routing node transmits the routing request along the negative direction of the Y axis through the path with the first mark or the fourth mark set until ΔY=0, and the routing ends; When ΔY=0, and ΔX>0, the routing request is transmitted along the X-axis in the current routing node through the path with the second mark or the third mark set, until ΔX=0, and the routing ends; When ΔY=0 and ΔX<0, the routing request is transmitted along the negative direction of the X-axis through the path with the second mark or the third mark set at the current routing node until ΔX=0, and the routing ends.
[0014] In one embodiment, the step of selecting a path arranged along the X-axis direction and the Y-axis direction and having an angle less than 90° with the first transmission direction to transmit the routing request comprises: When ΔX>0, ΔY>0, the routing request is transmitted through the path with the first mark set at the current routing node; when ΔX<0, ΔY<0, the routing request is transmitted through the path with the second mark set at the current routing node; when ΔX<0, ΔY>0, the routing request is transmitted through the path with the third mark set at the current routing node; when ΔX>0, ΔY<0, the routing request is transmitted through the path with the fourth mark set at the current routing node.
[0015] In one of the embodiments, the steps of setting the bidirectional two-way connection paths between two adjacent routing nodes along the X-axis direction and along the Y-axis direction in the planar wireless mesh network as a first forward path, a second forward path, a first reverse path, and a second reverse path, and setting a first mark, a second mark, a third mark, and a fourth mark respectively for all the first forward paths, the first reverse paths, the second reverse paths, and the second forward paths include: Acquire forward dual-path links and reverse dual-path links between all adjacent routing nodes in the planar wireless mesh network along the X-axis direction, and set them as a first forward path, a second forward path, a first reverse path, and a second reverse path, respectively; Acquire forward dual-path links and reverse dual-path links between all adjacent routing nodes in the planar wireless mesh network along the Y-axis direction, and set them as a first forward path, a second forward path, a first reverse path, and a second reverse path, respectively; A first mark, a second mark, a third mark and a fourth mark are respectively correspondingly set for all first forward paths, first reverse paths, second reverse paths and second forward paths in the planar wireless mesh network.
[0016] In one embodiment, the step of setting a first mark, a second mark, a third mark, and a fourth mark respectively corresponding to all first forward paths, first reverse paths, second reverse paths, and second forward paths in the planar wireless mesh network includes: The first mark, the second mark, the third mark, and the fourth mark are set to be the first value, the second value, the third value, and the fourth value respectively.
[0017] In one embodiment, the routing selection method further includes: When a routing request is transmitted from the current routing node to the next routing node, one of the two paths consistent with the direction of the transmitted routing request is selected to transmit the routing request; when the waiting time on the path is longer than a first threshold, whether the other path is idle is detected; if so, the routing request is controlled to be transmitted through the other path.
[0018] In one of the embodiments, when a routing request is transmitted from a current routing node to a next routing node, one of two paths in the same direction as the routing request is selected to transmit the routing request; when the waiting time on the path is longer than a first threshold, detecting whether another path is idle; if so, controlling the routing request to be transmitted through another path comprises: When ΔX>0, the routing request is determined to be transmitted in the positive direction of the X-axis; when ΔX<0, the routing request is determined to be transmitted in the negative direction of the X-axis; when ΔY>0, the routing request is determined to be transmitted in the positive direction of the Y-axis; when ΔY<0, the routing request is determined to be transmitted in the negative direction of the Y-axis.
[0019] In one of the embodiments, when a routing request is transmitted from a current routing node to a next routing node, one of two paths in the same direction as the routing request is selected to transmit the routing request; when the waiting time on the path is longer than a first threshold, detecting whether another path is idle; if so, controlling the routing request to be transmitted through another path comprises: When ΔX>0, ΔY>0, in the process of transmitting the routing request through the path with the first mark set by the current routing node, when the waiting time of the path with the first mark set by the current routing node in response to the routing request is longer than the first threshold, detecting whether the path with the fourth mark set by the current routing node is idle; If so, the routing request is controlled to be transmitted through the path with the fourth mark set at the current routing node, and after the routing request transmission is completed, the current routing node is reset to transmit the routing request through the path with the first mark set at the current routing node when ΔX>0 and ΔY>0.
[0020] In one of the embodiments, when a routing request is transmitted from a current routing node to a next routing node, one of two paths in the same direction as the routing request is selected to transmit the routing request; when the waiting time on the path is longer than a first threshold, detecting whether another path is idle; if so, controlling the routing request to be transmitted through another path comprises: When ΔX<0, ΔY<0, in the process of transmitting the routing request through the path with the second mark set by the current routing node, when the waiting time of the path with the second mark set by the current routing node in response to the routing request is longer than the first threshold, detecting whether the path with the third mark set by the current routing node is idle; If so, the routing request is controlled to be transmitted through the path with the third mark set at the current routing node, and after the routing request transmission is completed, the current routing node is reset to transmit the routing request through the path with the second mark set at the current routing node when ΔX>0 and ΔY>0.
[0021] In one of the embodiments, when a routing request is transmitted from a current routing node to a next routing node, one of two paths in the same direction as the routing request is selected to transmit the routing request; when the waiting time on the path is longer than a first threshold, detecting whether another path is idle; if so, controlling the routing request to be transmitted through another path comprises: When ΔX<0, ΔY>0, in the process of transmitting the routing request through the path with the third mark set by the current routing node, when the waiting time of the routing request on the path with the third mark set by the current routing node is greater than the first threshold, detecting whether the path with the second mark set by the current routing node is idle; If so, the routing request is controlled to be transmitted through the path with the second mark set at the current routing node, and after the routing request transmission is completed, the current routing node is reset to transmit the routing request through the path with the third mark set at the current routing node when ΔX>0 and ΔY>0.
[0022] In one of the embodiments, when a routing request is transmitted from a current routing node to a next routing node, one of two paths in the same direction as the routing request is selected to transmit the routing request; when the waiting time on the path is longer than a first threshold, detecting whether another path is idle; if so, controlling the routing request to be transmitted through another path comprises: When ΔX>0, ΔY<0, in the process of transmitting the routing request through the path with the fourth mark set by the current routing node, in response to the waiting time length of the routing request on the path with the fourth mark set by the current routing node being greater than the first threshold, detecting whether the path with the first mark set by the current routing node is idle; If so, the routing request is controlled to be transmitted through the path with the first mark set at the current routing node, and after the routing request transmission is completed, the current routing node is reset to transmit the routing request through the path with the fourth mark set at the current routing node when ΔX>0 and ΔY>0.
[0023] On the other hand, a routing selection device for a planar wireless mesh network is provided, the device comprising: A planar wireless mesh network acquisition module is used to acquire a planar wireless mesh network, wherein the planar wireless mesh network includes a plurality of routing nodes arranged in an array, and the routing nodes are arranged along an X-axis direction or a Y-axis direction; A path setting module, used to set a bidirectional dual path between all routing nodes in the planar wireless mesh network, wherein the bidirectional dual path includes a positive path and a negative path along the X-axis direction or along the Y-axis direction; A transmission direction acquisition module, configured to, in response to a routing request between a source routing node and a target routing node, acquire the coordinates of the target routing node of the routing request and the coordinates of the routing node where the routing request is currently located, acquire a first transmission direction of the routing request, and detect an angle between the first transmission direction and the X-axis and the Y-axis; The transmission path control module is used to select a path that is the same as the first transmission direction from the paths set along the X-axis direction or the Y-axis direction to transmit the routing request when the angle is 0° or 90°; otherwise, select a path that is less than 90° from the paths set along the X-axis direction and the Y-axis direction to transmit the routing request.
[0024] In another aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented: Acquire a planar wireless mesh network, wherein the planar wireless mesh network includes a plurality of routing nodes arranged in an array, and the routing nodes are arranged along an X-axis direction or a Y-axis direction; Setting a bidirectional dual path between all routing nodes in the planar wireless mesh network, wherein the bidirectional dual path includes a positive path and a negative path along the X-axis direction or along the Y-axis direction; In response to a routing request between the source routing node and the target routing node, obtaining the coordinates of the target routing node of the routing request and the coordinates of the routing node where the routing request is currently located, and obtaining the first transmission direction of the routing request; Detect the angle between the first transmission direction and the X-axis and the Y-axis. When the angle is 0° or 90°, select a path that is the same as the first transmission direction from the paths set along the X-axis direction or the Y-axis direction to transmit the routing request; otherwise, select a path that is less than 90° from the paths set along the X-axis direction and the Y-axis direction to transmit the routing request.
[0025] In another aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: Acquire a planar wireless mesh network, wherein the planar wireless mesh network includes a plurality of routing nodes arranged in an array, and the routing nodes are arranged along an X-axis direction or a Y-axis direction; Setting a bidirectional dual path between all routing nodes in the planar wireless mesh network, wherein the bidirectional dual path includes a positive path and a negative path along the X-axis direction or along the Y-axis direction; In response to a routing request between the source routing node and the target routing node, obtaining the coordinates of the target routing node of the routing request and the coordinates of the routing node where the routing request is currently located, and obtaining the first transmission direction of the routing request; Detect the angle between the first transmission direction and the X-axis and the Y-axis. When the angle is 0° or 90°, select a path that is the same as the first transmission direction from the paths set along the X-axis direction or the Y-axis direction to transmit the routing request; otherwise, select a path that is less than 90° from the paths set along the X-axis direction and the Y-axis direction to transmit the routing request.
[0026] The routing selection method, device, computer equipment and storage medium of the planar wireless mesh network increase the number of routing paths by setting the connection paths for all routing nodes to transmit routing requests according to the transmission direction of the routing requests when transmitting routing requests between the source routing node and the target routing node, avoiding the formation of a circular deadlock loop in four adjacent routing nodes, ensuring that the routing is performed in the direction of the destination node on the X-axis and the Y-axis, and there is no routing that deviates from the destination node, that is, the shortest path is always followed, and the routing request is always transmitted toward the target routing node, thereby forming the shortest routing path, so there is no livelock phenomenon; and the routing requests of all routing nodes are equal in status during the transmission process, and starvation will not occur; the present application can not only solve the problems of deadlock, livelock and starvation, but also try to maintain the diversity of paths and reduce congestion. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0028] Figure 1 This is an application environment diagram of a routing selection method for a planar wireless mesh network in one embodiment of the present application; Figure 2 A schematic diagram of a flow chart of a routing selection method for a planar wireless mesh network in one embodiment of the present application; Figure 3 A schematic diagram of a routing selection method for a planar wireless mesh network in one embodiment of the present application; Figure 4 A structural block diagram of a two-dimensional coordinate system constructed in one embodiment of the present application; Figure 5 A schematic diagram of the structure of path markings between nodes in the horizontal direction in one embodiment of the present application; Figure 6 A schematic diagram of the structure of path markings between nodes in the vertical direction in one embodiment of the present application; Figure 7 A schematic diagram of a ring topology structure listed in an embodiment of the present application; Figure 8 A schematic diagram of a clockwise deadlock in a ring topology structure listed in one embodiment of the present application; Fig. 9 A schematic diagram of a counterclockwise deadlock generated by a ring topology structure listed in one embodiment of the present application; Fig.10A schematic diagram of a planar wireless mesh network without deadlock in a clockwise direction in one embodiment of the present application; Fig.11 A schematic diagram of a planar wireless mesh network without counterclockwise deadlock in one embodiment of the present application; Fig.12 A schematic diagram of a routing path from a planar wireless mesh network routing node (0, 2) to a routing node (2, 0) in one embodiment of the present application; Fig.13 A schematic diagram of a routing path from a planar wireless mesh network routing node (2, 2) to a routing node (0, 0) in one embodiment of the present application; Fig.14 This is a structural block diagram of a routing selection device for a planar wireless mesh network in one embodiment of the present application; Fig.15 This is a diagram of the internal structure of a computer device in one embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0030] As described in the background technology, for a two-dimensional grid topology network on chip, each router has a coordinate (x, y) that uniquely corresponds to it. XY routing is a classic deterministic routing method. First, the message packet will compare the X-axis coordinate of the source node where it is located with the X-axis target of the destination node. If the X-axis coordinate of the source node is smaller than the X-axis coordinate of the destination node, it will be routed to the east. If the X-axis coordinate of the source node is larger than the X-axis coordinate of the destination node, it will be routed to the west. When the message packet is routed to the same X-axis coordinate as the destination node, it will be transmitted to the Y axis. At this time, if the Y-axis coordinate of the message packet is smaller than the Y-axis coordinate of the target node, the message packet will choose to continue to be transmitted to the north. If the Y-axis coordinate of the message packet is larger than the Y-axis coordinate of the destination node, the message packet will choose to be transmitted to the south. This routing method has low latency and can prevent possible problems such as deadlock, livelock and starvation.
[0031] Therefore, the routing nodes of the traditional wireless mesh network (mesh network) structure are connected by two independent and unidirectional links. The commonly used routing selection method is the XY routing method, which is prone to blockage, but due to its simple structure, it has been widely used in small-scale network environments. However, the XY routing method still has problems of deadlock, livelock and starvation.
[0032] To solve the above problems, the present invention creatively proposes a routing selection method for a planar wireless mesh network in an embodiment, which improves the traditional wireless mesh network (mesh network) structure. Routing nodes are connected by four independent links, two in each direction, so that the link ports between routing nodes are bidirectional and dual-path. Compared with the original structure, the diversity of paths is increased, and the deadlock problem is solved on the basis of ensuring the diversity of paths as much as possible.
[0033] The routing selection method of the planar wireless mesh network provided in this application can be applied to Figure 1 In the application environment shown. Figure 1 R stands for router, which arbitrates the direction of data flow and determines the transmission path of data packets in the routing network; IP stands for resource node, which can send and receive data. The links between routers and between routers and resource nodes are formed by two-way two-way connection lines, that is, the round-trip direction is full-duplex. Each router uses a link to connect a resource node. Routing nodes and resource nodes, and between routing nodes are connected through four unidirectional links, so that the link ports between routing nodes are all two-way two-way.
[0034] exist Figure 1 The figure shows a 4×4 two-dimensional wireless mesh network topology. In an actual network, the number of routing nodes N can be arbitrarily large, as long as each routing node is connected to a resource node. Figure 2 As shown, the corresponding Figure 1 The coordinates of each routing node in the two-dimensional wireless mesh network (mesh network) topology structure shown, each router has a coordinate (x, y).
[0035] In one embodiment, see Figure 2 , Figure 3 A routing selection method for a planar wireless mesh network is provided. Figure 1 The two-dimensional wireless mesh network topology structure in FIG. 1 is taken as an example to illustrate, and the following steps are included: Step S1, obtaining a planar wireless mesh network, wherein the planar wireless mesh network includes a plurality of routing nodes arranged in an array, and the routing nodes are arranged along an X-axis direction or a Y-axis direction; Step S2, setting a bidirectional dual path between all routing nodes in the planar wireless mesh network, wherein the bidirectional dual path includes a positive path and a negative path along the X-axis direction or along the Y-axis direction; Step S3, in response to a routing request between the source routing node and the target routing node, obtaining the coordinates of the target routing node of the routing request and the coordinates of the routing node where the routing request is currently located, and obtaining the first transmission direction of the routing request; Step S4, detecting the angle between the first transmission direction and the X-axis and the Y-axis. When the angle is 0° or 90°, selecting a path that is the same as the first transmission direction from the paths set along the X-axis direction or the Y-axis direction to transmit the routing request; otherwise, selecting a path that is less than 90° from the paths set along the X-axis direction and the Y-axis direction to transmit the routing request.
[0036] In this embodiment, the routing selection method further includes: When the routing request is transmitted to the next routing node, the coordinates of the routing node where the routing request is currently located are updated, and the transmission path of the routing request in the current routing node is continued to be controlled.
[0037] In step S1, the two-dimensional coordinate system is constructed as follows: Figure 4 shown.
[0038] In this embodiment, before acquiring the planar wireless mesh network, it also includes constructing a two-dimensional coordinate system for the planar wireless mesh network, specifically including: Obtain an array arrangement of each routing node in the planar wireless mesh network to form multiple rows of routing nodes arranged along a first direction and multiple columns of routing nodes arranged along a second direction, set the first direction to the X-axis, and set the second direction to the Y-axis to form a two-dimensional coordinate system corresponding to the planar wireless mesh network.
[0039] In one embodiment, the step of setting a bidirectional dual path between all routing nodes in the planar wireless mesh network, wherein the bidirectional dual path includes a positive path and a negative path along an X-axis direction or along a Y-axis direction comprises: The bidirectional two-way connection paths between two adjacent routing nodes along the X-axis direction and the Y-axis direction are set as a first forward path, a second forward path, a first reverse path, and a second reverse path, and all the first forward paths, first reverse paths, second reverse paths, and second forward paths are respectively set with a first mark, a second mark, a third mark, and a fourth mark.
[0040] In one embodiment, in response to a routing request between a source routing node and a target routing node, obtaining the coordinates of the target routing node of the routing request and the coordinates of the routing node where the routing request is currently located, the step of obtaining the first transmission direction of the routing request includes: In response to a routing request between the source routing node and the target routing node, the target routing node coordinates of the routing request and the routing node coordinates where the routing request is currently located are obtained, and the difference between the X-axis value of the target routing node coordinates and the X-axis value of the routing node coordinates where the routing request is currently located is used as the real-time coordinate difference ΔX, and the difference between the Y-axis value of the target routing node coordinates and the Y-axis value of the routing node coordinates where the routing request is currently located is used as the real-time coordinate difference ΔY; When ΔX>0, it is determined that the routing request is transmitted in the positive direction of the X-axis; when ΔX<0, it is determined that the routing request is transmitted in the negative direction of the X-axis; when ΔX=0, it is determined that the routing request is not transmitted along the X-axis; when ΔY>0, it is determined that the routing request is transmitted in the positive direction of the Y-axis; when ΔY<0, it is determined that the routing request is transmitted in the negative direction of the Y-axis; when ΔY=0, it is determined that the routing request is not transmitted along the Y-axis.
[0041] In one of the embodiments, in response to a routing request between a source routing node and a target routing node, obtaining the target routing node coordinates of the routing request and the routing node coordinates where the routing request is currently located, taking the difference between the X-axis value of the target routing node coordinates and the X-axis value of the routing node coordinates where the routing request is currently located as the real-time coordinate difference ΔX, and taking the difference between the Y-axis value of the target routing node coordinates and the Y-axis value of the routing node coordinates where the routing request is currently located as the real-time coordinate difference ΔY, the step includes: In response to a routing request between the source routing node and the target routing node, the coordinates (x D ,y D ), get the coordinates of the routing node where the routing request is currently located (x now ,y now ); By the formula ΔX=x D -x now and ΔY=y D -y now Calculate the real-time coordinate difference (ΔX, ΔY).
[0042] It is understood that the present application is based on the formula ΔX=x D -x now and ΔY=y D -y now The size of ΔX and ΔY in the calculated real-time coordinate difference (ΔX, ΔY) is used to limit the transmission path (i.e., link) of the routing request to ensure that the routing is always directed toward the destination node in both the X-axis and the Y-axis, and there is no route that deviates from the destination node, that is, the shortest path is always followed. However, this will increase the transmission delay, so the following temporary borrowing of the same-direction dual-path method is used to improve routing efficiency. After the routing request transmission is completed, the current routing node is reset to ensure that the transmission path of the original limited routing request remains unchanged.
[0043] In one embodiment, the step of selecting a path in the same direction as the first transmission direction from among the paths arranged along the X-axis direction or the Y-axis direction to transmit the routing request comprises: When ΔX=0, ΔY>0, the current routing node transmits the routing request along the Y axis in the positive direction through the path with the first mark or the fourth mark set until ΔY=0, and the routing ends; When ΔX=0, ΔY<0, the current routing node transmits the routing request along the negative direction of the Y axis through the path with the first mark or the fourth mark set until ΔY=0, and the routing ends; When ΔY=0, and ΔX>0, the routing request is transmitted along the X-axis in the current routing node through the path with the second mark or the third mark set, until ΔX=0, and the routing ends; When ΔY=0 and ΔX<0, the routing request is transmitted along the negative direction of the X-axis through the path with the second mark or the third mark set at the current routing node until ΔX=0, and the routing ends.
[0044] In one embodiment, the step of selecting a path arranged along the X-axis direction and the Y-axis direction and having an angle less than 90° with the first transmission direction to transmit the routing request comprises: When ΔX>0, ΔY>0, the routing request is transmitted through the path with the first mark set at the current routing node; when ΔX<0, ΔY<0, the routing request is transmitted through the path with the second mark set at the current routing node; when ΔX<0, ΔY>0, the routing request is transmitted through the path with the third mark set at the current routing node; when ΔX>0, ΔY<0, the routing request is transmitted through the path with the fourth mark set at the current routing node.
[0045] In this embodiment, the steps of setting the bidirectional two-way connection paths between two adjacent routing nodes along the X-axis direction and along the Y-axis direction in the planar wireless mesh network to a first forward path, a second forward path, a first reverse path, and a second reverse path, and setting a first mark, a second mark, a third mark, and a fourth mark respectively for all the first forward paths, the first reverse paths, the second reverse paths, and the second forward paths include: Acquire forward dual-path links and reverse dual-path links between all adjacent routing nodes in the planar wireless mesh network along the X-axis direction, and set them as a first forward path, a second forward path, a first reverse path, and a second reverse path, respectively; Acquire forward dual-path links and reverse dual-path links between all adjacent routing nodes in the planar wireless mesh network along the Y-axis direction, and set them as a first forward path, a second forward path, a first reverse path, and a second reverse path, respectively; A first mark, a second mark, a third mark and a fourth mark are respectively correspondingly set for all first forward paths, first reverse paths, second reverse paths and second forward paths in the planar wireless mesh network.
[0046] In this embodiment, the step of setting a first mark, a second mark, a third mark, and a fourth mark respectively corresponding to all first forward paths, first reverse paths, second reverse paths, and second forward paths in the planar wireless mesh network includes: The first mark, the second mark, the third mark, and the fourth mark are set to be the first value, the second value, the third value, and the fourth value respectively.
[0047] Preferably, the first value, the second value, the third value, and the fourth value are 0, 1, 2, and 3, respectively.
[0048] Among them, in step S2, when the first mark, the second mark, the third mark, and the fourth mark are set to be the first value, the second value, the third value, and the fourth value respectively, the structure of the path mark between the horizontal nodes is as follows: Figure 5 As shown, the structure of the path marking between the vertical nodes is as follows Figure 6 shown.
[0049] like Figure 2 As shown, in this embodiment, the routing selection method further includes: Step S5, when the routing request is transmitted from the current routing node to the next routing node, one of the two paths consistent with the direction of the transmission of the routing request is selected to transmit the routing request; when the waiting time on the path is greater than the first threshold, whether the other path is idle is detected; if so, the routing request is controlled to be transmitted through the other path.
[0050] Specifically, in this embodiment, step S5 includes: When ΔX>0, ΔY>0, in the process of transmitting the routing request through the path with the first mark set by the current routing node, when the waiting time of the path with the first mark set by the current routing node in response to the routing request is longer than the first threshold, detecting whether the path with the fourth mark set by the current routing node is idle; If so, the routing request is controlled to be transmitted through the path with the fourth mark set at the current routing node, and after the routing request transmission is completed, the current routing node is reset to transmit the routing request through the path with the first mark set at the current routing node when ΔX>0 and ΔY>0.
[0051] It is understandable that when the routing request is transmitted from the current routing node to the next routing node, the step of selecting one of the two paths consistent with the direction of transmitting the routing request to transmit the routing request includes: It is determined whether the two paths that are consistent with the direction of the transmission route request are idle. If so, the idle path is selected to transmit the route request. Otherwise, one of the two paths is selected to transmit the route request.
[0052] In this embodiment, step S5 includes: When ΔX<0, ΔY<0, in the process of transmitting the routing request through the path with the second mark set by the current routing node, when the waiting time of the path with the second mark set by the current routing node in response to the routing request is longer than the first threshold, detecting whether the path with the third mark set by the current routing node is idle; If so, the routing request is controlled to be transmitted through the path with the third mark set at the current routing node, and after the routing request transmission is completed, the current routing node is reset to transmit the routing request through the path with the second mark set at the current routing node when ΔX>0 and ΔY>0.
[0053] In this embodiment, step S5 includes: When ΔX<0, ΔY>0, in the process of transmitting the routing request through the path with the third mark set by the current routing node, when the waiting time of the routing request on the path with the third mark set by the current routing node is greater than the first threshold, detecting whether the path with the second mark set by the current routing node is idle; If so, the routing request is controlled to be transmitted through the path with the second mark set at the current routing node, and after the routing request transmission is completed, the current routing node is reset to transmit the routing request through the path with the third mark set at the current routing node when ΔX>0 and ΔY>0.
[0054] In this embodiment, step S5 includes: When ΔX>0, ΔY<0, in the process of transmitting the routing request through the path with the fourth mark set by the current routing node, in response to the waiting time length of the routing request on the path with the fourth mark set by the current routing node being greater than the first threshold, detecting whether the path with the first mark set by the current routing node is idle; If so, the routing request is controlled to be transmitted through the path with the first mark set at the current routing node, and after the routing request transmission is completed, the current routing node is reset to transmit the routing request through the path with the fourth mark set at the current routing node when ΔX>0 and ΔY>0.
[0055] For ease of understanding, combined Figure 4 , this application provides specific explanations with examples.
[0056] Convention 1: When ΔX>0, the X-axis direction can only go east, and vice versa when ΔX<0, the X-axis direction can only go west; when ΔY>0, the Y-axis direction can only go north, and vice versa when ΔY<0, the Y-axis direction can only go south; this convention is to ensure that no matter on the X-axis or Y-axis, the route is always directed towards the destination node, and there is no route that deviates from the destination node, that is, always follow the shortest path; In order to avoid deadlock, further constraints need to be placed on the routing path: Convention 2: 2.1. When ΔX>0, ΔY>0, the X-axis direction can only be routed to the east, and the Y-axis direction can only be routed to the north; regardless of the X-axis direction or the Y-axis direction, at the current routing node, the X-axis direction and the Y-axis direction can only take the path marked as "0"; 2.2. When ΔX<0, ΔY<0, the X-axis direction can only be routed westward, and the Y-axis direction can only be routed southward; regardless of the X-axis direction or the Y-axis direction, at the current routing node, the X-axis direction and the Y-axis direction can only take the path marked as "1"; 2.3. When ΔX<0, ΔY>0, the X-axis direction can only be routed to the west, and the Y-axis direction can only be routed to the north; regardless of the X-axis direction or the Y-axis direction, at the current routing node, the X-axis direction and the Y-axis direction can only take the path marked as "2"; 2.4. When ΔX>0, ΔY<0, the X-axis direction can only be routed to the east, and the Y-axis direction can only be routed to the south; regardless of the X-axis direction or the Y-axis direction, at the current routing node, the X-axis direction and the Y-axis direction can only take the path marked as "3"; Convention 3: When ΔX=0, any path marked on the Y axis can be taken; when ΔY=0, any path marked on the X axis can be taken.
[0057] The routing method proposed by the present invention can avoid deadlock. Figure 7 As shown, a ring in a planar wireless mesh network is taken to illustrate the generation of deadlock.
[0058] Let's take an example to illustrate how convention 2 avoids deadlock: For a two-dimensional mesh network with a ring topology, deadlock is easy to occur. For example, suppose there are four routing requests at the same time: Request 1: routing node (2, 2) to routing node (3, 3); Request 2: routing node (2, 3) to routing node (3, 2); Request 3: routing node (3, 3) to routing node (2, 2); Request 4: routing node (3, 2) to routing node (2, 3). When these four routing requests need to pass through a routing node and all choose clockwise routing, and all have occupied the middle routing node, a deadlock occurs. Figure 8 On the contrary, if both choose counterclockwise routing and both have occupied the middle routing node, a deadlock will also occur, such as Fig. 9 .exist Fig.10 and Fig.11 The solid line indicates the currently occupied channel, and the dotted line indicates the requested channel.
[0059] If we follow convention 2, then no matter it is clockwise or counterclockwise, there is a kind of routing that is impossible to occur, and a closed loop cannot be formed, that is, a deadlock cannot be formed, such as Fig.10 , Fig.11 .
[0060] An example is given to illustrate the increase in path diversity of the present invention: Assume that there is a routing request at the same time: routing node (0, 2) to routing node (2, 0). If the routing selection method of the present invention is used, ΔX>0, ΔY<0, according to convention 2, under the premise of satisfying convention 1, the X direction can only be routed to the east, and the Y direction can only be routed to the south; regardless of the X direction or the Y direction, at the current routing node, the X direction and the Y direction can only take the path marked as "3"; the routing path is as follows Fig.12 As shown, the paths are diverse.
[0061] Assume that there is a routing request at the same time: routing node (2, 2) to routing node (0, 0). If the traditional XY routing method is used, if the routing selection method of the present invention is used, ΔX<0, ΔY<0, according to convention 3, under the premise of satisfying convention 1, the X direction can only be routed to the west, and the Y direction can only be routed to the south; regardless of the X direction or the Y direction, at the current routing node, the X direction and the Y direction can only take the path marked as "1"; the routing path is as follows Fig.13 As shown, the paths are diverse.
[0062] Therefore, the routing selection method for the planar wireless mesh network proposed in the present invention is an adaptive XY routing method, and the specific implementation steps are as follows: Step 1: Set a coordinate (x, y) for each router in the XY coordinate system, such as Figure 4 As shown; Step 2: For each routing request, the coordinates of the routing node where the message packet is currently located (xnow, ynow) are compared with the coordinates of the destination node (xD, yD), and the difference (ΔX, ΔY) is calculated, where ΔX=xD-xnow, ΔY=yD-ynow; when ΔX>0, ΔY>0, go to step 3; when ΔX<0, ΔY<0, go to step 4; when ΔX<0, ΔY>0, go to step 5; when ΔX>0, ΔY<0, go to step 6; when ΔX=0 or ΔY=0, go to step 8; Step 3: ΔX>0, ΔY>0. At the current routing node, the X direction can only be routed eastward, and the Y direction can only be routed northward. Regardless of the X direction or the Y direction, at the current routing node, only the path marked as "0" can be taken. Step 4: ΔX<0, ΔY<0. At the current routing node, the X direction can only be routed westwards, and the Y direction can only be routed southwards. At the current routing node, the X and Y directions can only take the path marked as "1". Step 5: ΔX<0, ΔY>0. At the current routing node, the X direction can only be routed westwards; the Y direction can only be routed northwards. At the current routing node, the X and Y directions can only take the path marked as "2". Step 6: ΔX>0, ΔY<0. At the current routing node, the X direction can be routed eastward, and the Y direction can be routed southward. At the current routing node, the X direction and the Y direction can only take the path marked as "3". Step 7: Update the routing node coordinates (xnow, ynow) where the message packet is currently located, and continue with step 2; Step 8: When ΔX=0, ΔY>0, route northward from any path until ΔY=0, and the routing ends; when ΔX=0, ΔY<0, route southward from any path until ΔY=0, and the routing ends; when ΔY=0, when ΔX>0, route eastward from any path until ΔX=0, and the routing ends; when ΔY=0, ΔX<0, route westward from any path until ΔX=0, and the routing ends.
[0063] In the above-mentioned routing selection method for a planar wireless mesh network, when transmitting a routing request between a source routing node and a target routing node, a connection path for transmitting a routing request by all routing nodes is set according to the transmission direction of the routing request, thereby increasing the number of routing paths, avoiding the formation of a circular deadlock loop in four adjacent routing nodes, ensuring that routing is performed in the direction of the destination node on both the X-axis and the Y-axis, and there is no routing that deviates from the destination node, that is, the shortest path is always followed, and the routing request is always transmitted toward the target routing node, thereby forming the shortest routing path, and therefore there is no livelock phenomenon; and the routing requests of all routing nodes are of equal status during the transmission process, and starvation will not occur; the present application can not only solve the problems of deadlock, livelock and starvation, but also try to maintain the diversity of paths and reduce blocking.
[0064] In one embodiment, Fig.14 As shown, a planar wireless mesh network routing selection device 10 is provided, comprising: a planar wireless mesh network acquisition module 1, a path setting module 2, a transmission direction acquisition module 3, and a transmission path control module 4.
[0065] The planar wireless mesh network acquisition module 1 is used to acquire a planar wireless mesh network, wherein the planar wireless mesh network includes a plurality of routing nodes arranged in an array, and the routing nodes are arranged along an X-axis direction or a Y-axis direction.
[0066] The path setting module 2 is used to set a bidirectional dual path between all routing nodes in the planar wireless mesh network, and the bidirectional dual path includes a positive path and a negative path along the X-axis direction or along the Y-axis direction.
[0067] The transmission direction acquisition module 3 is used to obtain the coordinates of the target routing node of the routing request and the coordinates of the routing node where the routing request is currently located in response to a routing request between the source routing node and the target routing node, and obtain the first transmission direction of the routing request.
[0068] The single-direction transmission path control module 4 is used to detect the angle between the first transmission direction and the X-axis and the Y-axis. When the angle is 0° or 90°, a path with the same path as the first transmission direction is selected from the paths set along the X-axis direction or the Y-axis direction to transmit the routing request; otherwise, a path with an angle less than 90° with the first transmission direction is selected from the paths set along the X-axis direction and the Y-axis direction to transmit the routing request.
[0069] like Fig.14 As shown, in this embodiment, the planar wireless mesh network routing selection device 10 further includes: a module 5 for updating the coordinates of the routing request.
[0070] The module 5 for updating the coordinates of the routing request is used to update the coordinates of the routing node where the routing request is currently located after the routing request is transmitted to the next routing node, and continue to control the transmission path of the routing request at the current routing node.
[0071] In one embodiment, the step of setting a bidirectional dual path between all routing nodes in the planar wireless mesh network, wherein the bidirectional dual path includes a positive path and a negative path along an X-axis direction or along a Y-axis direction comprises: The bidirectional two-way connection paths between two adjacent routing nodes along the X-axis direction and the Y-axis direction are set as a first forward path, a second forward path, a first reverse path, and a second reverse path, and all the first forward paths, first reverse paths, second reverse paths, and second forward paths are respectively set with a first mark, a second mark, a third mark, and a fourth mark.
[0072] In one embodiment, in response to a routing request between a source routing node and a target routing node, obtaining the coordinates of the target routing node of the routing request and the coordinates of the routing node where the routing request is currently located, the step of obtaining the first transmission direction of the routing request includes: In response to a routing request between the source routing node and the target routing node, the target routing node coordinates of the routing request and the routing node coordinates where the routing request is currently located are obtained, and the difference between the X-axis value of the target routing node coordinates and the X-axis value of the routing node coordinates where the routing request is currently located is used as the real-time coordinate difference ΔX, and the difference between the Y-axis value of the target routing node coordinates and the Y-axis value of the routing node coordinates where the routing request is currently located is used as the real-time coordinate difference ΔY; When ΔX>0, it is determined that the routing request is transmitted in the positive direction of the X-axis; when ΔX<0, it is determined that the routing request is transmitted in the negative direction of the X-axis; when ΔX=0, it is determined that the routing request is not transmitted along the X-axis; when ΔY>0, it is determined that the routing request is transmitted in the positive direction of the Y-axis; when ΔY<0, it is determined that the routing request is transmitted in the negative direction of the Y-axis; when ΔY=0, it is determined that the routing request is not transmitted along the Y-axis.
[0073] In one of the embodiments, in response to a routing request between a source routing node and a target routing node, obtaining the target routing node coordinates of the routing request and the routing node coordinates where the routing request is currently located, taking the difference between the X-axis value of the target routing node coordinates and the X-axis value of the routing node coordinates where the routing request is currently located as the real-time coordinate difference ΔX, and taking the difference between the Y-axis value of the target routing node coordinates and the Y-axis value of the routing node coordinates where the routing request is currently located as the real-time coordinate difference ΔY, the step includes: In response to a routing request between the source routing node and the target routing node, the coordinates (x D ,y D ), get the coordinates of the routing node where the routing request is currently located (x now ,y now ); By the formula ΔX=x D -x now and ΔY=y D -y now Calculate the real-time coordinate difference (ΔX, ΔY).
[0074] In one embodiment, the step of selecting a path in the same direction as the first transmission direction from among the paths arranged along the X-axis direction or the Y-axis direction to transmit the routing request comprises: When ΔX=0, ΔY>0, the current routing node transmits the routing request along the Y axis in the positive direction through the path with the first mark or the fourth mark set until ΔY=0, and the routing ends; When ΔX=0, ΔY<0, the current routing node transmits the routing request along the negative direction of the Y axis through the path with the first mark or the fourth mark set until ΔY=0, and the routing ends; When ΔY=0, and ΔX>0, the routing request is transmitted along the X-axis in the current routing node through the path with the second mark or the third mark set, until ΔX=0, and the routing ends; When ΔY=0 and ΔX<0, the routing request is transmitted along the negative direction of the X-axis through the path with the second mark or the third mark set at the current routing node until ΔX=0, and the routing ends.
[0075] In one embodiment, the step of selecting a path arranged along the X-axis direction and the Y-axis direction and having an angle less than 90° with the first transmission direction to transmit the routing request comprises: When ΔX>0, ΔY>0, the routing request is transmitted through the path with the first mark set at the current routing node; when ΔX<0, ΔY<0, the routing request is transmitted through the path with the second mark set at the current routing node; when ΔX<0, ΔY>0, the routing request is transmitted through the path with the third mark set at the current routing node; when ΔX>0, ΔY<0, the routing request is transmitted through the path with the fourth mark set at the current routing node.
[0076] In one of the embodiments, the steps of setting the bidirectional two-way connection paths between two adjacent routing nodes along the X-axis direction and along the Y-axis direction in the planar wireless mesh network as a first forward path, a second forward path, a first reverse path, and a second reverse path, and setting a first mark, a second mark, a third mark, and a fourth mark respectively for all the first forward paths, the first reverse paths, the second reverse paths, and the second forward paths include: Acquire forward dual-path links and reverse dual-path links between all adjacent routing nodes in the planar wireless mesh network along the X-axis direction, and set them as a first forward path, a second forward path, a first reverse path, and a second reverse path, respectively; Acquire forward dual-path links and reverse dual-path links between all adjacent routing nodes in the planar wireless mesh network along the Y-axis direction, and set them as a first forward path, a second forward path, a first reverse path, and a second reverse path, respectively; A first mark, a second mark, a third mark and a fourth mark are respectively correspondingly set for all first forward paths, first reverse paths, second reverse paths and second forward paths in the planar wireless mesh network.
[0077] In one embodiment, the step of setting a first mark, a second mark, a third mark, and a fourth mark respectively corresponding to all first forward paths, first reverse paths, second reverse paths, and second forward paths in the planar wireless mesh network includes: The first mark, the second mark, the third mark, and the fourth mark are set to be the first value, the second value, the third value, and the fourth value respectively.
[0078] like Fig.14 As shown, in this embodiment, the routing selection device 10 of the planar wireless mesh network further includes: a temporary path switching module 6. The temporary path switching module 6 is used to select one of the two paths consistent with the direction of transmitting the routing request to transmit the routing request when the routing request is transmitted from the current routing node to the next routing node; when the waiting time length of the path is greater than the first threshold, detect whether the other path is idle; if so, control the routing request to be transmitted through the other path.
[0079] In this embodiment, the temporary path switching module 6 is used to detect whether the path with the fourth mark set by the current routing node is idle in response to the waiting time of the routing request on the path with the first mark set by the current routing node being greater than the first threshold when ΔX>0 and ΔY>0, during the process of the current routing node transmitting the routing request through the path with the first mark set by the current routing node; if so, control the routing request to be transmitted through the path with the fourth mark set by the current routing node, and reset the current routing node to transmit the routing request through the path with the first mark set by the current routing node when ΔX>0 and ΔY>0 after the routing request transmission is completed.
[0080] In this embodiment, the temporary path switching module 6 is also used for, when ΔX<0, ΔY<0, in the process of transmitting the routing request through the path with the second mark set at the current routing node, in response to the waiting time of the routing request on the path with the second mark set at the current routing node being greater than the first threshold, detecting whether the path with the third mark set at the current routing node is idle; if so, controlling the routing request to be transmitted through the path with the third mark set at the current routing node, and resetting the current routing node to transmit the routing request through the path with the second mark set at the current routing node when ΔX>0 and ΔY>0 after the routing request transmission is completed.
[0081] In this embodiment, the temporary path switching module 6 is also used for, when ΔX<0, ΔY>0, in the process of transmitting the routing request through the path with the third mark set at the current routing node, in response to the waiting time of the routing request on the path with the third mark set at the current routing node being greater than the first threshold, detecting whether the path with the second mark set at the current routing node is idle; if so, controlling the routing request to be transmitted through the path with the second mark set at the current routing node, and resetting the current routing node to transmit the routing request through the path with the third mark set at the current routing node when ΔX>0 and ΔY>0 after the routing request transmission is completed.
[0082] In this embodiment, the temporary path switching module 6 is also used for, when ΔX>0, ΔY<0, in the process of the current routing node transmitting the routing request through the path with the fourth mark set, in response to the waiting time of the routing request on the path with the fourth mark set by the current routing node being greater than the first threshold, detecting whether the path with the first mark set by the current routing node is idle; if so, controlling the routing request to be transmitted through the path with the first mark set by the current routing node, and resetting the current routing node to transmit the routing request through the path with the fourth mark set at the current routing node when ΔX>0 and ΔY>0 after the routing request transmission is completed.
[0083] In the routing selection device of the planar wireless mesh network, when transmitting the routing request between the source routing node and the target routing node, the connection path for all routing nodes to transmit the routing request is set according to the transmission direction of the routing request, thereby increasing the number of routing paths, avoiding the formation of a circular deadlock loop in four adjacent routing nodes, ensuring that the routing is performed in the direction of the destination node on the X-axis and the Y-axis, and there is no routing that deviates from the destination node, that is, the shortest path is always followed, and the routing request is always transmitted toward the target routing node, thereby forming the shortest routing path, so there is no livelock phenomenon; and the routing requests of all routing nodes are equal in status during the transmission process, and starvation will not occur; the present application can not only solve the problems of deadlock, livelock and starvation, but also try to maintain the diversity of paths and reduce blocking.
[0084] The specific definition of the routing selection device of the planar wireless mesh network can be found in the definition of the routing selection method of the planar wireless mesh network in the above text, and will not be repeated here. Each module in the above-mentioned routing selection device of the planar wireless mesh network can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0085] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.15As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store routing data of a planar wireless mesh network. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a routing selection method for a planar wireless mesh network is implemented.
[0086] Those skilled in the art will understand that Fig.15 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0087] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: Acquire a planar wireless mesh network, wherein the planar wireless mesh network includes a plurality of routing nodes arranged in an array, and the routing nodes are arranged along an X-axis direction or a Y-axis direction; Setting a bidirectional dual path between all routing nodes in the planar wireless mesh network, wherein the bidirectional dual path includes a positive path and a negative path along the X-axis direction or along the Y-axis direction; In response to a routing request between the source routing node and the target routing node, obtaining the coordinates of the target routing node of the routing request and the coordinates of the routing node where the routing request is currently located, and obtaining the first transmission direction of the routing request; Detect the angle between the first transmission direction and the X-axis and the Y-axis. When the angle is 0° or 90°, select a path that is the same as the first transmission direction from the paths set along the X-axis direction or the Y-axis direction to transmit the routing request; otherwise, select a path that is less than 90° from the paths set along the X-axis direction and the Y-axis direction to transmit the routing request.
[0088] For specific limitations on the steps implemented when the processor executes the computer program, please refer to the above limitations on the routing selection method for the planar wireless mesh network, which will not be repeated here.
[0089] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: Acquire a planar wireless mesh network, wherein the planar wireless mesh network includes a plurality of routing nodes arranged in an array, and the routing nodes are arranged along an X-axis direction or a Y-axis direction; Setting a bidirectional dual path between all routing nodes in the planar wireless mesh network, wherein the bidirectional dual path includes a positive path and a negative path along the X-axis direction or along the Y-axis direction; In response to a routing request between the source routing node and the target routing node, obtaining the coordinates of the target routing node of the routing request and the coordinates of the routing node where the routing request is currently located, and obtaining the first transmission direction of the routing request; Detect the angle between the first transmission direction and the X-axis and the Y-axis. When the angle is 0° or 90°, select a path that is the same as the first transmission direction from the paths set along the X-axis direction or the Y-axis direction to transmit the routing request; otherwise, select a path that is less than 90° from the paths set along the X-axis direction and the Y-axis direction to transmit the routing request.
[0090] For specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the above limitations on the routing selection method for the planar wireless mesh network, which will not be repeated here.
[0091] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0092] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0093] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A routing selection method for a planar wireless mesh network, characterized in that: include: Acquire a planar wireless mesh network, wherein the planar wireless mesh network includes a plurality of routing nodes arranged in an array, and the routing nodes are arranged along an X-axis direction or a Y-axis direction; Setting a bidirectional dual path between all routing nodes in the planar wireless mesh network, wherein the bidirectional dual path includes a positive path and a negative path along the X-axis direction or along the Y-axis direction; In response to a routing request between the source routing node and the target routing node, obtaining the coordinates of the target routing node of the routing request and the coordinates of the routing node where the routing request is currently located, and obtaining the first transmission direction of the routing request; Detect the angle between the first transmission direction and the X-axis and the Y-axis. When the angle is 0° or 90°, select a path that is the same as the first transmission direction from the paths set along the X-axis direction or the Y-axis direction to transmit the routing request; otherwise, select a path that is less than 90° from the paths set along the X-axis direction and the Y-axis direction to transmit the routing request.
2. The routing selection method of a planar wireless mesh network according to claim 1, characterized in that: The routing method further comprises: When the routing request is transmitted to the next routing node, the coordinates of the routing node where the routing request is currently located are updated, and the transmission path of the routing request in the current routing node is continued to be controlled.
3. The routing selection method of a planar wireless mesh network according to claim 1, characterized in that: The step of setting a bidirectional dual path between all routing nodes in the planar wireless mesh network, wherein the bidirectional dual path includes a positive path and a negative path along the X-axis direction or along the Y-axis direction comprises: The bidirectional two-way connection paths between two adjacent routing nodes along the X-axis direction and the Y-axis direction are set as a first forward path, a second forward path, a first reverse path, and a second reverse path, and all the first forward paths, first reverse paths, second reverse paths, and second forward paths are respectively set with a first mark, a second mark, a third mark, and a fourth mark.
4. The routing selection method of a planar wireless mesh network according to claim 3, characterized in that: In response to a routing request between a source routing node and a target routing node, obtaining the coordinates of the target routing node of the routing request and the coordinates of the routing node where the routing request is currently located, and obtaining the first transmission direction of the routing request comprises: In response to a routing request between the source routing node and the target routing node, the target routing node coordinates of the routing request and the routing node coordinates where the routing request is currently located are obtained, and the difference between the X-axis value of the target routing node coordinates and the X-axis value of the routing node coordinates where the routing request is currently located is used as the real-time coordinate difference ΔX, and the difference between the Y-axis value of the target routing node coordinates and the Y-axis value of the routing node coordinates where the routing request is currently located is used as the real-time coordinate difference ΔY; When ΔX>0, it is determined that the routing request is transmitted in the positive direction of the X-axis; when ΔX<0, it is determined that the routing request is transmitted in the negative direction of the X-axis; when ΔX=0, it is determined that the routing request is not transmitted along the X-axis; when ΔY>0, it is determined that the routing request is transmitted in the positive direction of the Y-axis; when ΔY<0, it is determined that the routing request is transmitted in the negative direction of the Y-axis; when ΔY=0, it is determined that the routing request is not transmitted along the Y-axis.
5. The routing selection method of a planar wireless mesh network according to claim 4, characterized in that: The step of obtaining the coordinates of the target routing node of the routing request and the coordinates of the routing node where the routing request is currently located, taking the difference between the X-axis value of the coordinates of the target routing node and the X-axis value of the coordinates of the routing node where the routing request is currently located as the real-time coordinate difference ΔX, and taking the difference between the Y-axis value of the coordinates of the target routing node and the Y-axis value of the coordinates of the routing node where the routing request is currently located as the real-time coordinate difference ΔY comprises: In response to a routing request between the source routing node and the target routing node, the coordinates (x D ,y D ), get the coordinates of the routing node where the routing request is currently located (x now ,y now ); By the formula ΔX=x D -x now and ΔY=y D -y now Calculate the real-time coordinate difference (ΔX, ΔY).
6. The routing selection method of a planar wireless mesh network according to claim 4, characterized in that: The step of selecting a path in the same direction as the first transmission direction from among the paths arranged along the X-axis direction or the Y-axis direction to transmit the route request comprises: When ΔX=0, ΔY>0, the current routing node transmits the routing request along the Y axis in the positive direction through the path with the first mark or the fourth mark set until ΔY=0, and the routing ends; When ΔX=0, ΔY<0, the current routing node transmits the routing request along the negative direction of the Y axis through the path with the first mark or the fourth mark set until ΔY=0, and the routing ends; When ΔY=0, and ΔX>0, the routing request is transmitted along the X-axis in the current routing node through the path with the second mark or the third mark set, until ΔX=0, and the routing ends; When ΔY=0 and ΔX<0, the routing request is transmitted along the negative direction of the X-axis through the path with the second mark or the third mark set at the current routing node until ΔX=0, and the routing ends.
7. The routing selection method of a planar wireless mesh network according to claim 4, characterized in that: The step of selecting a path arranged along the X-axis direction and the Y-axis direction and having an angle less than 90° with the first transmission direction to transmit the route request comprises: When ΔX>0, ΔY>0, the routing request is transmitted through the path with the first mark set at the current routing node; when ΔX<0, ΔY<0, the routing request is transmitted through the path with the second mark set at the current routing node; when ΔX<0, ΔY>0, the routing request is transmitted through the path with the third mark set at the current routing node; when ΔX>0, ΔY<0, the routing request is transmitted through the path with the fourth mark set at the current routing node.
8. The routing selection method of a planar wireless mesh network according to claim 3, characterized in that: The steps of setting the bidirectional two-way connection paths between two adjacent routing nodes along the X-axis direction and the Y-axis direction in the planar wireless mesh network as a first forward path, a second forward path, a first reverse path, and a second reverse path, and setting a first mark, a second mark, a third mark, and a fourth mark respectively for all the first forward paths, the first reverse paths, the second reverse paths, and the second forward paths include: Acquire forward dual-path links and reverse dual-path links between all adjacent routing nodes in the planar wireless mesh network along the X-axis direction, and set them as a first forward path, a second forward path, a first reverse path, and a second reverse path, respectively; Acquire forward dual-path links and reverse dual-path links between all adjacent routing nodes in the planar wireless mesh network along the Y-axis direction, and set them as a first forward path, a second forward path, a first reverse path, and a second reverse path, respectively; A first mark, a second mark, a third mark and a fourth mark are respectively correspondingly set for all first forward paths, first reverse paths, second reverse paths and second forward paths in the planar wireless mesh network.
9. The routing selection method of a planar wireless mesh network according to claim 3, characterized in that: The step of setting a first mark, a second mark, a third mark, and a fourth mark respectively corresponding to all the first forward paths, the first reverse paths, the second reverse paths, and the second forward paths in the planar wireless mesh network comprises: The first mark, the second mark, the third mark, and the fourth mark are set to be the first value, the second value, the third value, and the fourth value respectively.
10. The routing selection method of a planar wireless mesh network according to claim 3, characterized in that: The routing method further comprises: When a routing request is transmitted from the current routing node to the next routing node, one of the two paths consistent with the direction of the transmitted routing request is selected to transmit the routing request; when the waiting time on the path is longer than a first threshold, whether the other path is idle is detected; if so, the routing request is controlled to be transmitted through the other path.
11. The routing selection method of a planar wireless mesh network according to claim 10, characterized in that: When the routing request is transmitted from the current routing node to the next routing node, one of the two paths consistent with the direction of transmitting the routing request is selected to transmit the routing request; When the waiting time on the path is longer than the first threshold, detecting whether another path is idle; if so, controlling the routing request to be transmitted through another path comprises: When ΔX<0, ΔY<0, in the process of transmitting the routing request through the path with the second mark set by the current routing node, when the waiting time of the path with the second mark set by the current routing node in response to the routing request is longer than the first threshold, detecting whether the path with the third mark set by the current routing node is idle; If so, the routing request is controlled to be transmitted through the path with the third mark set at the current routing node, and after the routing request transmission is completed, the current routing node is reset to transmit the routing request through the path with the second mark set at the current routing node when ΔX>0 and ΔY>0.
12. The routing selection method of a planar wireless mesh network according to claim 10, characterized in that: When the routing request is transmitted from the current routing node to the next routing node, one of the two paths consistent with the direction of transmitting the routing request is selected to transmit the routing request; When the waiting time on the path is longer than the first threshold, detecting whether another path is idle; if so, controlling the routing request to be transmitted through another path comprises: When ΔX<0, ΔY>0, in the process of transmitting the routing request through the path with the third mark set by the current routing node, when the waiting time of the routing request on the path with the third mark set by the current routing node is greater than the first threshold, detecting whether the path with the second mark set by the current routing node is idle; If so, the routing request is controlled to be transmitted through the path with the second mark set at the current routing node, and after the routing request transmission is completed, the current routing node is reset to transmit the routing request through the path with the third mark set at the current routing node when ΔX>0 and ΔY>0.
13. The routing selection method of a planar wireless mesh network according to claim 10, characterized in that: When the routing request is transmitted from the current routing node to the next routing node, one of the two paths consistent with the direction of transmitting the routing request is selected to transmit the routing request; When the waiting time on the path is longer than the first threshold, detecting whether another path is idle; if so, controlling the routing request to be transmitted through another path comprises: When ΔX>0, ΔY<0, in the process of transmitting the routing request through the path with the fourth mark set by the current routing node, in response to the waiting time length of the routing request on the path with the fourth mark set by the current routing node being greater than the first threshold, detecting whether the path with the first mark set by the current routing node is idle; If so, the routing request is controlled to be transmitted through the path with the first mark set at the current routing node, and after the routing request transmission is completed, the current routing node is reset to transmit the routing request through the path with the fourth mark set at the current routing node when ΔX>0 and ΔY>0.
14. A routing selection device for a planar wireless mesh network, characterized in that: The device comprises: A planar wireless mesh network acquisition module is used to acquire a planar wireless mesh network, wherein the planar wireless mesh network includes a plurality of routing nodes arranged in an array, and the routing nodes are arranged along an X-axis direction or a Y-axis direction; A path setting module, used to set a bidirectional dual path between all routing nodes in the planar wireless mesh network, wherein the bidirectional dual path includes a positive path and a negative path along the X-axis direction or along the Y-axis direction; A transmission direction acquisition module, configured to, in response to a routing request between a source routing node and a target routing node, acquire the coordinates of the target routing node of the routing request and the coordinates of the routing node where the routing request is currently located, and acquire a first transmission direction of the routing request; a transmission path control module, configured to detect an angle between the first transmission direction and the X-axis and the Y-axis; when the angle is 0° or 90°, select a path that is the same as the first transmission direction from among the paths arranged along the X-axis direction or the Y-axis direction to transmit the routing request; otherwise, select a path that is less than 90° from among the paths arranged along the X-axis direction and the Y-axis direction to transmit the routing request.
15. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
Citation Information
Patent Citations
PLC and wireless heterogeneous network networking method
CN115225564A
Routing method and device for dual-path wireless mesh network, equipment and storage medium
CN117395746A
Routing method and device of dual-path three-dimensional hypercube network, equipment and medium
CN117811996A
Routing direction determination method and device, storage medium and electronic equipment
CN118264605A
Single-path wireless mesh network and routing method, device, equipment and medium thereof
CN118590957A