Single-path wireless mesh network and routing method, device, equipment and medium thereof
By constructing a two-dimensional coordinate system in a single-path wireless mesh network and determining the transmission direction and path of routing requests, the deadlock, livelock and starvation problems in the two-dimensional wireless mesh topology are solved, and the shortest routing path and Diversified transmission improves chip performance.
Patent Information
- Application Number
- CN202410685868.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-03
AI Technical Summary
The routing method of the two-dimensional wireless mesh topology has deadlock, livelock and starvation problems, and there are few transmission paths, which affects chip performance.
Construct a two-dimensional coordinate system in a single-path wireless mesh network, determine the transmission direction and path by calculating the coordinate difference between the target of the routing request and the current node in real time, and ensure that the routing request is directed toward the destination node along the X-axis and Y-axis. transmission to avoid ring lock loops and ensure equal-position transmission of routing requests.
It effectively avoids deadlock, livelock and starvation phenomena, increases the diversity of transmission paths, reduces congestion, and improves chip performance.
Smart Images

Figure CN118590957A
Abstract
Description
Technical Field
[0001] The present application relates to the field of on-chip network technology, and in particular to a single-path wireless mesh network and a routing method, device, computer equipment and storage medium thereof. 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] 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 will select 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 method can achieve the best performance of the chip, on the contrary, a bad routing method will greatly reduce the performance of the chip. At the same time, a good routing method can effectively avoid deadlock, livelock and starvation, which reduce the performance of the chip.
[0004] For a two-dimensional wireless mesh 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 in the Y-axis direction. At this time, if the Y-axis coordinate of the message packet is smaller than the Y-axis coordinate of the destination 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 algorithm has a small delay and can prevent possible problems such as deadlock, livelock and starvation. However, the current routing method of the two-dimensional wireless mesh topology still has the problems of deadlock, livelock and starvation, and there are few transmission paths. Summary of the invention
[0005] Based on this, it is necessary to provide a single-path wireless mesh network and its routing method, device, computer equipment and storage medium to address the technical problems of deadlock, livelock and starvation in the current routing method of the two-dimensional wireless mesh topology structure and the few transmission paths, which can avoid deadlock, livelock and starvation, increase transmission paths, prevent congestion and improve chip performance.
[0006] In one aspect, a routing method for a single-path wireless mesh network is provided, the method comprising: Constructing a two-dimensional coordinate system for the single-path wireless mesh network, and setting a coordinate for each routing node in the single-path wireless mesh network in the two-dimensional coordinate system; In response to the existence of a routing request, 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 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; Determine the transmission direction of the routing request along the X-axis and along the Y-axis according to the values of ΔX and ΔY; Determine a transmission path of the routing request between each routing node in the two-dimensional coordinate system according to the values of ΔX and ΔY; The routing request is transmitted according to the determined transmission path.
[0007] In one embodiment, the step of constructing a two-dimensional coordinate system for a single-path wireless mesh network includes: Acquire an array arrangement of each routing node in a single-path wireless mesh network to form a plurality of rows of routing nodes arranged along a first direction and a plurality of columns of routing nodes arranged along a second direction; The frequencies of sending and receiving routing requests between four routing nodes located at the edge corners are obtained, and the positions of the four routing nodes in the coordinate system are determined according to the frequencies of sending and receiving routing requests to form a two-dimensional coordinate system corresponding to the single-path wireless mesh network.
[0008] In one embodiment, the step of obtaining the frequency of sending and receiving routing requests between four routing nodes located at the edge corners, determining the positions of the four routing nodes in the coordinate system according to the frequency of sending and receiving routing requests, and forming a two-dimensional coordinate system corresponding to the single-path wireless mesh network includes: Obtain the frequencies of sending and receiving routing requests between four routing nodes located at the edge corners, and set the two routing nodes with the highest frequencies of sending and receiving routing requests at the origin and in the first quadrant respectively; The X-axis and the Y-axis are determined according to the positions of the origin and the first quadrant to form a two-dimensional coordinate system corresponding to the single-path wireless mesh network.
[0009] In one embodiment, the step of determining the transmission direction of the routing request along the X-axis and along the Y-axis according to the values of ΔX and ΔY comprises: When ΔX>0, the routing request is controlled to be transmitted in the positive direction along the X-axis; when ΔX<0, the routing request is controlled to be transmitted in the negative direction along the X-axis; when ΔY>0, the routing request is controlled to be transmitted in the positive direction along the Y-axis; when ΔY<0, the routing request is controlled to be transmitted in the negative direction along the Y-axis.
[0010] In one embodiment, determining the transmission path of the routing request between the routing nodes in the two-dimensional coordinate system according to the values of ΔX and ΔY includes: When ΔX*ΔY<0, the values of ΔX and ΔY are obtained, and when ΔX<0 and ΔY>0, the routing request is controlled to be transmitted in a first path mode, and when ΔY<0 and ΔX>0, the routing request is controlled to be transmitted in a second path mode; wherein the first path mode is different from the second path mode.
[0011] In one embodiment, the first path mode is to control the routing request to be transmitted along the X-axis direction first and then along the Y-axis direction, and the second path mode is to control the routing request to be transmitted along the Y-axis direction first and then along the X-axis direction; or the first path mode is to control the routing request to be transmitted along the Y-axis direction first and then along the X-axis direction, and the second path mode is to control the routing request to be transmitted along the X-axis direction first and then along the Y-axis direction.
[0012] In one embodiment, when ΔX<0 and ΔY>0, the routing request is controlled to be transmitted along the negative direction of the X axis to the routing node where ΔX=0 first, and then transmitted along the positive direction of the Y axis to the routing node where ΔY=0; When ΔX>0 and ΔY<0, the routing request is controlled to be transmitted along the negative direction of the Y axis to the routing node where ΔY=0 first, and then transmitted along the positive direction of the X axis to the routing node where ΔX=0.
[0013] In one embodiment, determining the transmission path of the routing request between the routing nodes in the two-dimensional coordinate system according to the values of ΔX and ΔY includes: When ΔX*ΔY=0, the routing request is controlled to be transmitted along the X-axis or along the Y-axis direction; when ΔX=0, the routing request is controlled to be transmitted along the Y-axis direction according to the ΔY value; when ΔY=0, the routing request is controlled to be transmitted along the X-axis direction according to the ΔX value.
[0014] In one embodiment, when ΔX=0, the step of controlling the routing request to be transmitted along the Y-axis direction according to the ΔY value comprises: When ΔX=0 and ΔY>0, the routing request is controlled to be transmitted in the positive direction along the Y axis until ΔY=0, and the routing ends; When ΔX=0 and ΔY<0, the routing request is controlled to be transmitted in the negative direction along the Y axis until ΔY=0, and the routing ends.
[0015] In one embodiment, when ΔY=0, the step of controlling the routing request to be transmitted along the X-axis direction according to the ΔX value comprises: When ΔY=0 and ΔX>0, the routing request is controlled to be transmitted in the forward direction along the X-axis until ΔX=0, and the routing ends; When ΔY=0 and ΔX<0, the routing request is controlled to be transmitted in the negative direction along the X-axis until ΔX=0, and the routing ends.
[0016] In one embodiment, determining the transmission path of the routing request between the routing nodes in the two-dimensional coordinate system according to the values of ΔX and ΔY includes: When ΔX*ΔY>0, the routing request is controlled to be transmitted along the X-axis or along the Y-axis according to the occupancy of the path of the current routing node.
[0017] In one embodiment, when ΔX*ΔY>0, the step of controlling the routing request to be transmitted along the X-axis or along the Y-axis according to the occupancy of the path of the current routing node comprises: When ΔX>0, determine whether the positive path of the X axis of the current routing node where the routing request is located is occupied; when ΔY>0, determine whether the positive path of the Y axis of the current routing node where the routing request is located is occupied; when ΔX<0, determine whether the negative path of the X axis of the current routing node where the routing request is located is occupied; when ΔY<0, determine whether the negative path of the Y axis of the current routing node where the routing request is located is occupied; When ΔX>0 and ΔY>0 or when ΔX<0 and ΔY<0, select an unoccupied path to transmit the routing request; if both the X-axis forward path and the Y-axis forward path of the current routing node where the routing request is located are occupied, wait for the first period of time and then make a new judgment.
[0018] In one embodiment, when ΔX>0 and ΔY>0 or when ΔX<0 and ΔY<0, the step of selecting an unoccupied path to transmit the route request comprises: When ΔX>0 and ΔY>0, if the X-axis forward path of the current routing node where the routing request is located and the Y-axis forward path of the current routing node where the routing request is located are both unoccupied, the X-axis forward path is selected to transmit the routing request.
[0019] In one embodiment, when ΔX>0 and ΔY>0 or when ΔX<0 and ΔY<0, the step of selecting an unoccupied path to transmit the route request comprises: When ΔX<0 and ΔY<0, if the X-axis negative path of the current routing node where the routing request is located and the Y-axis negative path of the current routing node where the routing request is located are both unoccupied, the X-axis negative path is selected to transmit the routing request.
[0020] In one embodiment, the routing 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.
[0021] On the other hand, a single-path wireless mesh is provided, which uses the above-mentioned single-path wireless mesh network routing method to control the transmission direction and transmission path of the routing request.
[0022] In another aspect, a routing device for a single-path wireless mesh network is provided, the device comprising: A two-dimensional coordinate system construction module is used to construct a two-dimensional coordinate system for a single-path wireless mesh network, in which a coordinate is set for each routing node in the single-path wireless mesh network; A real-time coordinate difference calculation module is used to obtain the target routing node coordinates of the routing request and the routing node coordinates where the routing request is currently located in response to the existence of the routing request, and use 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 use 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; A transmission direction control module, used to determine the transmission direction of the routing request along the X axis and along the Y axis according to the values of ΔX and ΔY; a routing node routing path control module, used to determine the transmission path of the routing request between each routing node in the two-dimensional coordinate system according to the values of ΔX and ΔY; The transmission control module is used to transmit the routing request according to the determined transmission path.
[0023] 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: Constructing a two-dimensional coordinate system for the single-path wireless mesh network, and setting a coordinate for each routing node in the single-path wireless mesh network in the two-dimensional coordinate system; In response to the existence of a routing request, 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 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; Determine the transmission direction of the routing request along the X-axis and along the Y-axis according to the values of ΔX and ΔY; Determine a transmission path of the routing request between each routing node in the two-dimensional coordinate system according to the values of ΔX and ΔY; The routing request is transmitted according to the determined transmission path.
[0024] 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: Constructing a two-dimensional coordinate system for the single-path wireless mesh network, and setting a coordinate for each routing node in the single-path wireless mesh network in the two-dimensional coordinate system; In response to the existence of a routing request, 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 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; Determine the transmission direction of the routing request along the X-axis and along the Y-axis according to the values of ΔX and ΔY; Determine a transmission path of the routing request between each routing node in the two-dimensional coordinate system according to the values of ΔX and ΔY; The routing request is transmitted according to the determined transmission path.
[0025] The above-mentioned single-path wireless mesh network and its routing method, device, computer equipment and storage medium, when all routing nodes in the two-dimensional coordinate system transmit routing requests, control the direction of transmitting routing requests according to the transmission direction of routing requests, set the transmission path of routing requests to be non-closed loop, avoid forming a circular dead-end loop in four adjacent routing nodes, ensure that 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, always follow the shortest path, realize that routing requests are 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 equal in status during the transmission process, and starvation phenomenon 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
[0026] 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.
[0027] Figure 1 This is an application environment diagram of a routing method for a single-path wireless mesh network in one embodiment of the present application; Figure 2 A structural block diagram of a two-dimensional coordinate system constructed in one embodiment of the present application; Figure 3 A schematic diagram of a flow chart of a routing method for a single-path wireless mesh network in one embodiment of the present application; Figure 4 A schematic diagram of a flow chart of steps for constructing a two-dimensional coordinate system for a single-path wireless mesh network in one embodiment of the present application; Figure 5 This is a flowchart of a step of controlling the routing request to select transmission along the X-axis or along the Y-axis direction according to the occupancy of the path of the current routing node when ΔX*ΔY>0 in one embodiment of the present application; Figure 6 A schematic diagram of a routing path from routing node (3, 2) to routing node (1, 3) in one embodiment of the present application; Figure 7 A schematic diagram of a routing path from routing node (1, 3) to routing node (3, 2) in one 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.10 A schematic diagram of a single-path wireless mesh network without deadlock in clockwise direction in one embodiment of the present application; Fig.11 A schematic diagram of a single-path wireless mesh network without counterclockwise deadlock in one embodiment of the present application; Fig.12 A schematic diagram of a routing path from routing node (0, 0) to routing node (2, 2) in a traditional XY routing method; Fig.13 A schematic diagram of a routing path from routing node (0, 0) to routing node (2, 2) of a routing method in one embodiment of the present application; Fig.14 A schematic diagram of a routing path from routing node (2, 2) to routing node (0, 0) in a traditional XY routing method; Fig.15 A schematic diagram of a routing path from routing node (2, 2) to routing node (0, 0) of a routing method in one embodiment of the present application; Fig.16 A schematic diagram of constructing a two-dimensional coordinate system to set the placement of routing nodes in one embodiment of the present application; Fig.17 This is a structural block diagram of a routing device of a single-path wireless mesh network in one embodiment of the present application; Fig.18 This is a diagram of the internal structure of a computer device in one embodiment of the present application. DETAILED DESCRIPTION
[0028] 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.
[0029] 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 less 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 greater 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 in the Y-axis direction. At this time, if the Y-axis coordinate of the message packet is less than the Y-axis coordinate of the target node, the message packet chooses to continue to be transmitted to the north. If the Y-axis coordinate of the message packet is greater than the Y-axis coordinate of the destination node, the message packet chooses to be transmitted to the south. This routing method has a small delay and can prevent possible problems such as deadlock, livelock and starvation.
[0030] 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 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.
[0031] To solve the above problems, the embodiment of the present invention creatively proposes a routing method for a single-path wireless mesh network, 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.
[0032] The single-path wireless mesh network routing method 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.
[0033] 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 are shown, and each router has a coordinate (x, y).
[0034] In one embodiment, Figure 3 As shown, a routing method for a single-path wireless mesh network is provided, and the method is applied to Figure 2 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, constructing a two-dimensional coordinate system for the single-path wireless mesh network, and setting a coordinate for each routing node in the single-path wireless mesh network in the two-dimensional coordinate system; Step S2, in response to the existence of a routing request, 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 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; Step S3, determining the transmission direction of the routing request along the X axis and along the Y axis according to the values of ΔX and ΔY; Step S4, determining a transmission path of the routing request between each routing node in the two-dimensional coordinate system according to the values of ΔX and ΔY; Step S5: transmitting the routing request according to the determined transmission path.
[0035] like Figure 4 As shown, in this embodiment, the step of constructing a two-dimensional coordinate system for a single-path wireless mesh network includes: step S11, obtaining an array arrangement of each routing node in the single-path wireless mesh network, forming a plurality of rows of routing nodes arranged along a first direction and a plurality of columns of routing nodes arranged along a second direction; Step S12, obtaining the frequency of sending and receiving routing requests between four routing nodes located at the edge corners, determining the positions of the four routing nodes in the coordinate system according to the frequency of sending and receiving routing requests, and forming a two-dimensional coordinate system corresponding to the single-path wireless mesh network.
[0036] Further, the step of obtaining the frequency of sending and receiving routing requests between four routing nodes located at the edge corners, determining the positions of the four routing nodes in the coordinate system according to the frequency of sending and receiving routing requests, and forming a two-dimensional coordinate system corresponding to the single-path wireless mesh network includes: Obtain the frequencies of sending and receiving routing requests between the four routing nodes located at the edge corners, and set the two routing nodes with the highest frequencies of sending and receiving routing requests at the origin and in the first quadrant respectively; that is, set one routing node that frequently sends and receives routing requests as the origin, and set another routing node that frequently sends and receives routing requests in the first quadrant; The X-axis and the Y-axis are determined according to the positions of the origin and the first quadrant to form a two-dimensional coordinate system corresponding to the single-path wireless mesh network.
[0037] In step S1, the two-dimensional coordinate system of the constructed single-path wireless mesh network is as follows: Figure 2 shown.
[0038] In this embodiment, in response to the existence of a routing request, 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 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. The steps include: In response to a routing request, the target routing node coordinates (x D ,yD ), 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).
[0039] 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.
[0040] 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 time, so the following temporary borrowing of the same-direction dual-path path is adopted to improve the 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.
[0041] In this embodiment, the step of determining the transmission direction of the routing request along the X-axis and along the Y-axis according to the values of ΔX and ΔY includes: When ΔX>0, the routing request is controlled to be transmitted in the positive direction along the X-axis; when ΔX<0, the routing request is controlled to be transmitted in the negative direction along the X-axis; when ΔY>0, the routing request is controlled to be transmitted in the positive direction along the Y-axis; when ΔY<0, the routing request is controlled to be transmitted in the negative direction along the Y-axis.
[0042] like Figure 5 As shown, in this embodiment, determining the transmission path of the routing request between each routing node in the two-dimensional coordinate system according to the values of ΔX and ΔY includes: Step S41, when ΔX*ΔY<0, obtain the values of ΔX and ΔY, when ΔX<0 and ΔY>0, control the routing request to be transmitted in a first path mode, and when ΔY<0 and ΔX>0, control the routing request to be transmitted in a second path mode; wherein the first path mode is different from the second path mode.
[0043] In this embodiment, the first path mode is to control the routing request to be transmitted along the X-axis direction first and then along the Y-axis direction, and the second path mode is to control the routing request to be transmitted along the Y-axis direction first and then along the X-axis direction; or the first path mode is to control the routing request to be transmitted along the Y-axis direction first and then along the X-axis direction, and the second path mode is to control the routing request to be transmitted along the X-axis direction first and then along the Y-axis direction.
[0044] In this embodiment, when ΔX<0 and ΔY>0, the routing request is controlled to be first transmitted along the negative direction of the X axis to the routing node where ΔX=0, and then transmitted along the positive direction of the Y axis to the routing node where ΔY=0; When ΔX>0 and ΔY<0, the routing request is controlled to be transmitted along the negative direction of the Y axis to the routing node where ΔY=0 first, and then transmitted along the positive direction of the X axis to the routing node where ΔX=0.
[0045] like Figure 5 As shown, in this embodiment, determining the transmission path of the routing request between each routing node in the two-dimensional coordinate system according to the values of ΔX and ΔY includes: Step S42, when ΔX*ΔY=0, control the routing request to be transmitted along the X-axis or along the Y-axis direction; when ΔX=0, control the routing request to be transmitted along the Y-axis direction according to the ΔY value; when ΔY=0, control the routing request to be transmitted along the X-axis direction according to the ΔX value.
[0046] In this embodiment, when ΔX=0, the step of controlling the routing request to be transmitted along the Y-axis direction according to the ΔY value includes: When ΔX=0 and ΔY>0, the routing request is controlled to be transmitted in the positive direction along the Y axis until ΔY=0, and the routing ends; When ΔX=0 and ΔY<0, the routing request is controlled to be transmitted in the negative direction along the Y axis until ΔY=0, and the routing ends.
[0047] In this embodiment, when ΔY=0, the step of controlling the routing request to be transmitted along the X-axis direction according to the ΔX value includes: When ΔY=0 and ΔX>0, the routing request is controlled to be transmitted in the forward direction along the X-axis until ΔX=0, and the routing ends; When ΔY=0 and ΔX<0, the routing request is controlled to be transmitted in the negative direction along the X-axis until ΔX=0, and the routing ends.
[0048] like Figure 5 As shown, in this embodiment, determining the transmission path of the routing request between each routing node in the two-dimensional coordinate system according to the values of ΔX and ΔY includes: Step S43: when ΔX*ΔY>0, the routing request is controlled to be transmitted along the X-axis or along the Y-axis according to the occupied condition of the path of the current routing node.
[0049] In this embodiment, when ΔX*ΔY>0, the step of controlling the routing request to select transmission along the X-axis or along the Y-axis according to the occupancy of the path of the current routing node includes: When ΔX>0, determine whether the positive path of the X axis of the current routing node where the routing request is located is occupied; when ΔY>0, determine whether the positive path of the Y axis of the current routing node where the routing request is located is occupied; when ΔX<0, determine whether the negative path of the X axis of the current routing node where the routing request is located is occupied; when ΔY<0, determine whether the negative path of the Y axis of the current routing node where the routing request is located is occupied; When ΔX>0 and ΔY>0 or when ΔX<0 and ΔY<0, select an unoccupied path to transmit the routing request; if both the X-axis forward path and the Y-axis forward path of the current routing node where the routing request is located are occupied, wait for the first period of time and then make a new judgment.
[0050] In this embodiment, when ΔX>0 and ΔY>0 or when ΔX<0 and ΔY<0, the step of selecting an unoccupied path to transmit the routing request includes: When ΔX>0 and ΔY>0, if the X-axis forward path of the current routing node where the routing request is located and the Y-axis forward path of the current routing node where the routing request is located are both unoccupied, the X-axis forward path is selected to transmit the routing request; When ΔX<0 and ΔY<0, if the X-axis negative path of the current routing node where the routing request is located and the Y-axis negative path of the current routing node where the routing request is located are both unoccupied, the X-axis negative path is selected to transmit the routing request.
[0051] like Figure 3 As shown, in this embodiment, the routing method further includes: Step S5, after 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 at the current routing node is continued to be controlled.
[0052] For ease of understanding, combined Figure 2 , this application provides specific explanations with examples.
[0053] 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 both the X-axis and the Y-axis are routed toward the destination node, and there is no route that deviates from the destination node, that is, always follow the shortest path.
[0054] In order to avoid deadlock, further constraints need to be placed on the routing path: Convention 2: When ΔX*ΔY>0, under the premise of satisfying convention 1, if ΔX<0 and ΔY>0, the route can only be completed in the X-axis direction before the Y-axis direction, that is, the traditional XY routing algorithm is still used; if ΔX>0 and ΔY<0, the route can only be completed in the Y-axis direction before the X-axis direction, that is, the YX routing algorithm is used.
[0055] For example: Assume that the coordinates of the routing node where the message packet is currently located are (x now ,y now )=(3,2) and the coordinates of the destination node (x D ,y D )=(1,3), the difference (ΔX, ΔY)=(1-3,3-2)=(-2,1) is calculated. At this time, ΔX<0 and ΔY>0. According to convention 2, the route can only be completed along the X axis first and then along the Y axis. The routing result is as follows Figure 6 shown.
[0056] Assume that the coordinates of the routing node where the message packet is currently located are (x now ,y now )=(1,3) and the coordinates of the destination node (x D ,y D )=(3,2), the difference (ΔX, ΔY)=(3-1,2-3)=(2,-1) is calculated. At this time, ΔX>0 and ΔY<0. According to convention 2, the route can only be completed along the Y axis before the X axis. The routing result is as follows Figure 7 shown.
[0057] 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 8On the contrary, if both choose counterclockwise routing and both have occupied the middle routing node, a deadlock will also occur, such as Fig. 9 In the figure, the solid lines represent the channels that are currently occupied, and the dotted lines represent the channels that are being requested.
[0058] 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 .
[0059] Convention 3: In order to increase the diversity of the path, when ΔX*ΔY>0, as long as convention 1 is met, you can choose to go in the X-axis direction or the Y-axis direction according to the situation of the current routing node; if convention 3 is met, when ΔX*ΔY>0, the diversity of the routing path is greatly increased.
[0060] Let's take an example to illustrate how convention 3 increases path diversity: Assume there is a routing request from routing node (0,0) to routing node (2,2). If the traditional XY routing algorithm is used, the routing path is as follows: Fig.12 As shown, fixed and unique.
[0061] If the routing algorithm of the present invention is used, ΔX*ΔY=(2-0)(2-0)=4, according to convention 3, on the premise of satisfying convention 1, the X-axis direction or the Y-axis direction can be selected according to the situation of the current routing node. The routing path is as follows Fig.13 As shown, the paths are more diverse compared with the traditional XY algorithm.
[0062] 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 algorithm is used, the routing path is as follows: Fig.14 As shown, fixed and unique.
[0063] If the routing algorithm of the present invention is used, ΔX*ΔY=(0-2)(0-2)=4, according to convention 3, on the premise of satisfying convention 1, the X-axis direction or the Y-axis direction can be selected according to the situation of the current routing node. The routing path is as follows Fig.15 As shown, the paths are more diverse compared with the traditional XY algorithm.
[0064] According to Agreement 3, Fig.16 The routing nodes are placed in the scenario shown in the figure to better utilize the improved algorithm of the present invention: (1) The X-coordinate and Y-coordinate of the routing nodes that frequently send and receive data packets should be as large or as small as possible, that is, such routing nodes should be located in the lower left corner or upper right corner of the XY coordinate system; (2) The routing nodes that do not frequently send and receive data packets should be located in the upper left corner or lower right corner of the XY coordinate system.
[0065] When the output port in the X-axis direction is not occupied, the X-axis direction is preferred, that is, the XY routing algorithm is followed; When the output port in the X-axis direction is occupied, the Y-direction is chosen under the premise of following convention 1.
[0066] Convention 4: When ΔX*ΔY=0, routing is performed in the X-axis direction or the Y-axis direction on the premise that convention 1 is met.
[0067] The present application makes improvements on the XY routing algorithm and proposes an adaptive XY routing algorithm, which improves the uniqueness of the XY routing path, can effectively avoid deadlock and has simple hardware implementation of the algorithm.
[0068] Step 1: Set a coordinate (x, y) for each router in the XY two-dimensional coordinate system, such as Figure 2 As shown; Step 2: For each routing request, assume that the coordinates of the routing node where the message packet is currently located are (x now ,y now ) and the coordinates of the destination node (x D ,y D ) and calculate the difference (ΔX, ΔY); when ΔX*ΔY<0, proceed to the third step; when ΔX*ΔY>0, proceed to the fourth step; when ΔX*ΔY=0, proceed to the fifth step; Step 3: ΔX*ΔY<0, execute convention 2; that is, use the traditional XY routing algorithm. Under the premise of meeting convention 1, you can only complete the X-axis direction first and then the Y-axis direction; Step 4: ΔX*ΔY>0, execute convention 3; however, for whether to go in the X-axis direction or the Y-axis direction, select the output port according to the situation of the output port of the current routing node: when the output port in the X-axis direction is not occupied, the X-axis direction is preferred, that is, the XY routing algorithm is followed; when the output port in the X-axis direction is occupied, the Y-axis direction is selected under the premise of following convention 1; Step 5: ΔX*ΔY=0, execute convention 4; Step 6: Update the coordinates of the routing node where the message packet is currently located.
[0069] In the above-mentioned routing method of the single-path wireless mesh network, when all routing nodes in the two-dimensional coordinate system transmit routing requests, the direction of transmitting routing requests is controlled according to the transmission direction of the routing requests, and the transmission path of the routing requests is set to be non-closed loop, thereby avoiding the formation of a circular deadlock loop in the four adjacent routing nodes, ensuring that the X-axis and the Y-axis are routed in the direction of the destination node, and there is no route 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.
[0070] In one embodiment, Fig.17 As shown, a routing device 10 for a single-path wireless mesh network is provided, comprising: a two-dimensional coordinate system construction module 1, a real-time coordinate difference calculation module 2, a transmission direction control module 3, a routing node routing path control module 4 and a transmission control module 5.
[0071] The two-dimensional coordinate system building module 1 is used to build a two-dimensional coordinate system for a single-path wireless mesh network, and a coordinate is set for each routing node in the single-path wireless mesh network in the two-dimensional coordinate system.
[0072] The real-time coordinate difference calculation module 2 is used to obtain the target routing node coordinates of the routing request and the routing node coordinates where the routing request is currently located in response to the existence of a routing request, and use 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 use 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.
[0073] The transmission direction control module 3 is used to determine the transmission direction of the routing request along the X axis and along the Y axis according to the values of ΔX and ΔY.
[0074] The routing node routing path control module 4 is used to determine the transmission path of the routing request between each routing node in the two-dimensional coordinate system according to the values of ΔX and ΔY; The transmission control module 5 is used to transmit the routing request according to the determined transmission path.
[0075] In this embodiment, the two-dimensional coordinate system building module 1 is used to build a two-dimensional coordinate system for a single-path wireless mesh network, including the following steps: Acquire an array arrangement of each routing node in a single-path wireless mesh network to form a plurality of rows of routing nodes arranged along a first direction and a plurality of columns of routing nodes arranged along a second direction; The frequencies of sending and receiving routing requests between four routing nodes located at the edge corners are obtained, and the positions of the four routing nodes in the coordinate system are determined according to the frequencies of sending and receiving routing requests to form a two-dimensional coordinate system corresponding to the single-path wireless mesh network.
[0076] Further, the step of obtaining the frequency of sending and receiving routing requests between four routing nodes located at the edge corners, determining the positions of the four routing nodes in the coordinate system according to the frequency of sending and receiving routing requests, and forming a two-dimensional coordinate system corresponding to the single-path wireless mesh network includes: Obtain the frequencies of sending and receiving routing requests between four routing nodes located at the edge corners, and set the two routing nodes with the highest frequencies of sending and receiving routing requests at the origin and in the first quadrant respectively; The X-axis and the Y-axis are determined according to the positions of the origin and the first quadrant to form a two-dimensional coordinate system corresponding to the single-path wireless mesh network.
[0077] In this embodiment, the real-time coordinate difference calculation module 2 is used to obtain the target routing node coordinates of the routing request and the routing node coordinates where the routing request is currently located in response to the existence of the routing request, 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. The steps include: In response to a routing request, the target routing node 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).
[0078] In one embodiment, the step of determining the transmission direction of the routing request along the X-axis and along the Y-axis according to the values of ΔX and ΔY comprises: When ΔX>0, the routing request is controlled to be transmitted in the positive direction along the X-axis; when ΔX<0, the routing request is controlled to be transmitted in the negative direction along the X-axis; when ΔY>0, the routing request is controlled to be transmitted in the positive direction along the Y-axis; when ΔY<0, the routing request is controlled to be transmitted in the negative direction along the Y-axis.
[0079] In one embodiment, determining the transmission path of the routing request between the routing nodes in the two-dimensional coordinate system according to the values of ΔX and ΔY includes: When ΔX*ΔY<0, the values of ΔX and ΔY are obtained, and when ΔX<0 and ΔY>0, the routing request is controlled to be transmitted in a first path mode, and when ΔY<0 and ΔX>0, the routing request is controlled to be transmitted in a second path mode; wherein the first path mode is different from the second path mode.
[0080] In one embodiment, the first path mode is to control the routing request to be transmitted along the X-axis direction first and then along the Y-axis direction, and the second path mode is to control the routing request to be transmitted along the Y-axis direction first and then along the X-axis direction; or the first path mode is to control the routing request to be transmitted along the Y-axis direction first and then along the X-axis direction, and the second path mode is to control the routing request to be transmitted along the X-axis direction first and then along the Y-axis direction.
[0081] In this embodiment, when ΔX<0 and ΔY>0, the routing request is controlled to be first transmitted along the negative direction of the X axis to the routing node where ΔX=0, and then transmitted along the positive direction of the Y axis to the routing node where ΔY=0; When ΔX>0 and ΔY<0, the routing request is controlled to be transmitted along the negative direction of the Y axis to the routing node where ΔY=0 first, and then transmitted along the positive direction of the X axis to the routing node where ΔX=0.
[0082] In this embodiment, the routing node routing path control module 4 is also used to control the routing request to be transmitted along the X-axis or along the Y-axis when ΔX*ΔY=0; to control the routing request to be transmitted along the Y-axis according to the ΔY value when ΔX=0; and to control the routing request to be transmitted along the X-axis according to the ΔX value when ΔY=0.
[0083] In this embodiment, when ΔX=0, the step of controlling the routing request to be transmitted along the Y-axis direction according to the ΔY value includes: When ΔX=0 and ΔY>0, the routing request is controlled to be transmitted in the positive direction along the Y axis until ΔY=0, and the routing ends; When ΔX=0 and ΔY<0, the routing request is controlled to be transmitted in the negative direction along the Y axis until ΔY=0, and the routing ends.
[0084] In this embodiment, when ΔY=0, the step of controlling the routing request to be transmitted along the X-axis direction according to the ΔX value includes: When ΔY=0 and ΔX>0, the routing request is controlled to be transmitted in the forward direction along the X-axis until ΔX=0, and the routing ends; When ΔY=0 and ΔX<0, the routing request is controlled to be transmitted in the negative direction along the X-axis until ΔX=0, and the routing ends.
[0085] In this embodiment, the routing node routing path control module 4 is further used to control the routing request to be transmitted along the X-axis or along the Y-axis direction according to the occupancy status of the path of the current routing node when ΔX*ΔY>0.
[0086] In this embodiment, when ΔX*ΔY>0, the step of controlling the routing request to select transmission along the X-axis or along the Y-axis according to the occupancy of the path of the current routing node includes: When ΔX>0, determine whether the positive path of the X axis of the current routing node where the routing request is located is occupied; when ΔY>0, determine whether the positive path of the Y axis of the current routing node where the routing request is located is occupied; when ΔX<0, determine whether the negative path of the X axis of the current routing node where the routing request is located is occupied; when ΔY<0, determine whether the negative path of the Y axis of the current routing node where the routing request is located is occupied; When ΔX>0 and ΔY>0 or when ΔX<0 and ΔY<0, select an unoccupied path to transmit the routing request; if both the X-axis forward path and the Y-axis forward path of the current routing node where the routing request is located are occupied, wait for the first period of time and then make a new judgment.
[0087] In this embodiment, when ΔX>0 and ΔY>0 or when ΔX<0 and ΔY<0, the step of selecting an unoccupied path to transmit the routing request includes: When ΔX>0 and ΔY>0, if the X-axis forward path of the current routing node where the routing request is located and the Y-axis forward path of the current routing node where the routing request is located are both unoccupied, the X-axis forward path is selected to transmit the routing request; When ΔX<0 and ΔY<0, if the X-axis negative path of the current routing node where the routing request is located and the Y-axis negative path of the current routing node where the routing request is located are both unoccupied, the X-axis negative path is selected to transmit the routing request.
[0088] like Fig.17 As shown, in this embodiment, the routing device 10 of the single-path wireless mesh network further includes: a module 6 for updating the coordinates of the routing request.
[0089] The module 6 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.
[0090] In the above-mentioned routing device of the single-path wireless mesh network, when all routing nodes in the two-dimensional coordinate system transmit routing requests, the direction of transmitting routing requests is controlled according to the transmission direction of the routing requests, and the transmission path of the routing requests is set to be non-closed loop, thereby avoiding the formation of a circular deadlock loop in the four adjacent routing nodes, ensuring that the X-axis and the Y-axis are routed in the direction of the destination node, and there is no route 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.
[0091] For the specific definition of the routing device of the single-path wireless mesh network, please refer to the definition of the routing method of the single-path wireless mesh network mentioned above, which will not be repeated here. Each module in the above-mentioned routing device of the single-path 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.
[0092] In one embodiment, a single-path wireless mesh is provided, which uses the above-mentioned single-path wireless mesh network routing method to control the transmission direction and transmission path of the routing request.
[0093] 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.18 As 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 single-path 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 method for a single-path wireless mesh network is implemented.
[0094] Those skilled in the art will understand that Fig.18The 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.
[0095] 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: Constructing a two-dimensional coordinate system for the single-path wireless mesh network, and setting a coordinate for each routing node in the single-path wireless mesh network in the two-dimensional coordinate system; In response to the existence of a routing request, 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 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; Determine the transmission direction of the routing request along the X-axis and along the Y-axis according to the values of ΔX and ΔY; Determine a transmission path of the routing request between each routing node in the two-dimensional coordinate system according to the values of ΔX and ΔY; The routing request is transmitted according to the determined transmission path.
[0096] For specific limitations on the steps implemented when the processor executes the computer program, please refer to the above limitations on the routing method of the single-path wireless mesh network, which will not be repeated here.
[0097] 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: Constructing a two-dimensional coordinate system for the single-path wireless mesh network, and setting a coordinate for each routing node in the single-path wireless mesh network in the two-dimensional coordinate system; In response to the existence of a routing request, 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 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; Determine the transmission direction of the routing request along the X-axis and along the Y-axis according to the values of ΔX and ΔY; Determine a transmission path of the routing request between each routing node in the two-dimensional coordinate system according to the values of ΔX and ΔY; The routing request is transmitted according to the determined transmission path.
[0098] For specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the above limitations on the method for routing a single-path wireless mesh network, which will not be repeated here.
[0099] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed 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 can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an 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).
[0100] 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.
[0101] 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 method for a single-path wireless mesh network, characterized in that: include: Constructing a two-dimensional coordinate system for the single-path wireless mesh network, and setting a coordinate for each routing node in the single-path wireless mesh network in the two-dimensional coordinate system; In response to the existence of a routing request, 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 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; Determine the transmission direction of the routing request along the X-axis and along the Y-axis according to the values of ΔX and ΔY; The transmission path of the routing request between the routing nodes in the two-dimensional coordinate system is determined according to the values of ΔX and ΔY; and the routing request is transmitted according to the determined transmission path.
2. The routing method of a single-path wireless mesh network according to claim 1, characterized in that: The step of constructing a two-dimensional coordinate system for a single-path wireless mesh network includes: Acquire an array arrangement of each routing node in a single-path wireless mesh network to form a plurality of rows of routing nodes arranged along a first direction and a plurality of columns of routing nodes arranged along a second direction; The frequencies of sending and receiving routing requests between four routing nodes located at the edge corners are obtained, and the positions of the four routing nodes in the coordinate system are determined according to the frequencies of sending and receiving routing requests to form a two-dimensional coordinate system corresponding to the single-path wireless mesh network.
3. The routing method of a single-path wireless mesh network according to claim 2, characterized in that: The step of obtaining the frequencies of sending and receiving routing requests between four routing nodes located at the edge corners, determining the positions of the four routing nodes in the coordinate system according to the frequencies of sending and receiving routing requests, and forming a two-dimensional coordinate system corresponding to the single-path wireless mesh network comprises: Obtain the frequencies of sending and receiving routing requests between four routing nodes located at the edge corners, and set the two routing nodes with the highest frequencies of sending and receiving routing requests at the origin and in the first quadrant respectively; The X-axis and the Y-axis are determined according to the positions of the origin and the first quadrant to form a two-dimensional coordinate system corresponding to the single-path wireless mesh network.
4. The routing method of a single-path wireless mesh network according to claim 1, characterized in that: The step of determining the transmission direction of the routing request along the X-axis and along the Y-axis according to the values of ΔX and ΔY comprises: When ΔX>0, the routing request is controlled to be transmitted in the positive direction along the X-axis; when ΔX<0, the routing request is controlled to be transmitted in the negative direction along the X-axis; when ΔY>0, the routing request is controlled to be transmitted in the positive direction along the Y-axis; when ΔY<0, the routing request is controlled to be transmitted in the negative direction along the Y-axis.
5. The routing method of a single-path wireless mesh network according to claim 1, characterized in that: Determining the transmission path of the routing request between the routing nodes in the two-dimensional coordinate system according to the values of ΔX and ΔY includes: When ΔX*ΔY<0, the values of ΔX and ΔY are obtained, and when ΔX<0 and ΔY>0, the routing request is controlled to be transmitted in a first path mode, and when ΔY<0 and ΔX>0, the routing request is controlled to be transmitted in a second path mode; wherein the first path mode is different from the second path mode.
6. The routing method of a single-path wireless mesh network according to claim 5, characterized in that: The first path mode is to control the routing request to be transmitted along the X-axis direction first and then along the Y-axis direction, and the second path mode is to control the routing request to be transmitted along the Y-axis direction first and then along the X-axis direction; or the first path mode is to control the routing request to be transmitted along the Y-axis direction first and then along the X-axis direction, and the second path mode is to control the routing request to be transmitted along the X-axis direction first and then along the Y-axis direction.
7. The routing method of a single-path wireless mesh network according to claim 5 or 6, characterized in that: When ΔX<0 and ΔY>0, the routing request is controlled to be transmitted along the negative direction of the X axis to the routing node where ΔX=0 first, and then transmitted along the positive direction of the Y axis to the routing node where ΔY=0; When ΔX>0 and ΔY<0, the routing request is controlled to be transmitted along the negative direction of the Y axis to the routing node where ΔY=0 first, and then transmitted along the positive direction of the X axis to the routing node where ΔX=0.
8. The routing method of a single-path wireless mesh network according to claim 5 or 6, characterized in that: When ΔX<0 and ΔY>0, the routing request is controlled to be transmitted along the positive direction of the Y axis to the routing node where ΔY=0 first, and then transmitted along the negative direction of the X axis to the routing node where ΔX=0; When ΔX>0 and ΔY<0, the routing request is controlled to be transmitted along the positive direction of the X axis to the routing node where ΔX=0 first, and then transmitted along the negative direction of the Y axis to the routing node where ΔY=0.
9. The routing method of a single-path wireless mesh network according to claim 1, characterized in that: Determining the transmission path of the routing request between the routing nodes in the two-dimensional coordinate system according to the values of ΔX and ΔY includes: When ΔX*ΔY=0, the routing request is controlled to be transmitted along the X-axis or along the Y-axis direction; when ΔX=0, the routing request is controlled to be transmitted along the Y-axis direction according to the ΔY value; when ΔY=0, the routing request is controlled to be transmitted along the X-axis direction according to the ΔX value.
10. The routing method of a single-path wireless mesh network according to claim 9, characterized in that: The step of controlling the routing request to be transmitted along the Y-axis direction according to the ΔY value when ΔX=0 comprises: When ΔX=0 and ΔY>0, the routing request is controlled to be transmitted in the positive direction along the Y axis until ΔY=0, and the routing ends; When ΔX=0 and ΔY<0, the routing request is controlled to be transmitted in the negative direction along the Y axis until ΔY=0, and the routing ends.
11. The routing method of a single-path wireless mesh network according to claim 9, characterized in that: The step of controlling the routing request to be transmitted along the X-axis direction according to the ΔX value when ΔY=0 comprises: When ΔY=0 and ΔX>0, the routing request is controlled to be transmitted in the forward direction along the X-axis until ΔX=0, and the routing ends; When ΔY=0 and ΔX<0, the routing request is controlled to be transmitted in the negative direction along the X-axis until ΔX=0, and the routing ends.
12. The routing method of a single-path wireless mesh network according to claim 1, characterized in that: Determining the transmission path of the routing request between the routing nodes in the two-dimensional coordinate system according to the values of ΔX and ΔY includes: When ΔX*ΔY>0, the routing request is controlled to be transmitted along the X-axis or along the Y-axis according to the occupancy of the path of the current routing node.
13. The routing method of a single-path wireless mesh network according to claim 12, characterized in that: When ΔX*ΔY>0, the step of controlling the routing request to select transmission along the X-axis or along the Y-axis direction according to the path occupancy of the current routing node comprises: When ΔX>0, determine whether the positive path of the X axis of the current routing node where the routing request is located is occupied; when ΔY>0, determine whether the positive path of the Y axis of the current routing node where the routing request is located is occupied; when ΔX<0, determine whether the negative path of the X axis of the current routing node where the routing request is located is occupied; when ΔY<0, determine whether the negative path of the Y axis of the current routing node where the routing request is located is occupied; When ΔX>0 and ΔY>0 or when ΔX<0 and ΔY<0, select an unoccupied path to transmit the routing request; if both the X-axis forward path and the Y-axis forward path of the current routing node where the routing request is located are occupied, wait for the first period of time and then make a new judgment.
14. The routing method of a single-path wireless mesh network according to claim 13, characterized in that: The step of selecting an unoccupied path to transmit the routing request when ΔX>0 and ΔY>0 or when ΔX<0 and ΔY<0 includes: when ΔX>0 and ΔY>0, if the X-axis forward path of the current routing node where the routing request is located and the Y-axis forward path of the current routing node where the routing request is located are both unoccupied, selecting the X-axis forward path to transmit the routing request.
15. The routing method of a single-path wireless mesh network according to claim 13, characterized in that: The step of selecting an unoccupied path to transmit the routing request when ΔX>0 and ΔY>0 or when ΔX<0 and ΔY<0 includes: when ΔX<0 and ΔY<0, if the X-axis negative path of the current routing node where the routing request is located and the Y-axis negative path of the current routing node where the routing request is located are both unoccupied, selecting the X-axis negative path to transmit the routing request.
16. The routing method of a single-path 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.
17. A single-path wireless mesh, characterized in that: The routing method of a single-path wireless mesh network as described in any one of claims 1 to 16 is used to control the transmission direction and transmission path of a routing request.
18. A routing device for a single-path wireless mesh network, characterized in that: The device comprises: A two-dimensional coordinate system construction module is used to construct a two-dimensional coordinate system for a single-path wireless mesh network, in which a coordinate is set for each routing node in the single-path wireless mesh network; A real-time coordinate difference calculation module is used to obtain the target routing node coordinates of the routing request and the routing node coordinates where the routing request is currently located in response to the existence of the routing request, and use 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 use 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; A transmission direction control module, used to determine the transmission direction of the routing request along the X axis and along the Y axis according to the values of ΔX and ΔY; A routing node routing path control module, used to determine the transmission path of the routing request between each routing node in the two-dimensional coordinate system according to the values of ΔX and ΔY; The transmission control module is used to transmit the routing request according to the determined transmission path.
19. 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 16 are implemented.
20. 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 16 are implemented.
Citation Information
Cited By
Route selection method and device for planar wireless mesh network, equipment and medium
CN119561888A
