LoRa ad hoc network communication forwarding node selection method

By calculating the optimal transmission path based on signal strength and battery power factor, the LoRa MESH protocol solves the connection instability problem in the field environment, thus improving network stability and efficiency.

CN119052880BActive Publication Date: 2026-02-13YUNNAN GUANGXI RAILWAY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411184082.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2026-02-13
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

The existing LoRa MESH protocol is prone to connection instability and transmission timeouts in outdoor environments, affecting the stability of wireless local area networks.

Method used

The optimal transmission path is calculated using signal strength weights and battery power factors. Data packets are sent and parsed one by one to select the optimal communication path and establish a routing table to optimize the selection of forwarding nodes.

Benefits of technology

It improves the stability and efficiency of wireless LANs, reduces node power consumption, and decreases the number of route discovery attempts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052880B_ABST
    Figure CN119052880B_ABST
Patent Text Reader

Abstract

The application discloses a kind of LoRa self-organizing network communication forwarding node selection methods, comprising the following steps: S1, initialization LoRa gateway and all LoRa nodes in local area network;S2, data packet is sent to target node;S3, the data packet of target node is acquired;S4, signal strength weight is calculated;S5, battery power factor is calculated;S6, energy weight is calculated;S7, output routing table.In the application, LoRa wireless local area network uses on-demand driven routing protocol, and when each node forwards routing discovery request, node address, uplink and downlink signal strength, battery power and other parameters are added to data packet, and after being sent to target node, the optimal path is selected by the node according to energy weight parameter.The method of the application reduces the number of routing discovery after the original communication path is disconnected, reduces the battery power consumption of each node in the network, and improves the working efficiency of wireless local area network.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of wireless data transmission, in particular to a LoRa ad hoc network communication forwarding node selection method. BACKGROUND

[0002] With the rapid development of wireless communication technology, more and more devices can realize remote control and data transmission through wireless data transmission technology. When there are a large number of data terminals that need to be connected in a range of 1 to 3 kilometers, such as each terminal using 4G / 5G cellular network communication technology, the energy consumption of each data terminal will be increased, and the cost of the communication module and the network service fee will also be increased; using WiFi, Bluetooth and other communication technologies to collect data and then sending data through cellular network will be limited by the transmission distance and cannot meet the demand, so a low-power, long-distance and low-cost communication method is needed.

[0003] LoRa is a low-power wide-area wireless communication technology, which has the characteristics of long transmission distance, low power consumption and low data rate. Its wireless transmission distance can exceed 1km, it does not need to use licensed frequency bands, and it can build a wireless local area network by itself. Compared with NB-IoT technology, it can reduce the network fees of operators and reduce the port occupancy of cloud servers, and improve the transmission efficiency of data. In actual work, in order to increase the number of nodes that a single LoRa gateway can cover and increase the communication area of the local area network, the network topology is generally a mixed arrangement of star topology and mesh topology, as shown in FIG. 1. In the figure, the nodes within the circular dashed line can be directly connected to the gateway, and then the data is transmitted to the server through cellular wireless communication. The LoRa nodes outside the circle need to be forwarded through the nodes inside the circle using the LoRa MESH protocol, and then the data is transmitted to the gateway. Figure 1

[0004] However, the currently used MESH protocol mainly forwards data through the shortest path, which can easily cause connection instability, transmission timeout and other problems in the field environment, seriously affecting the stability of the wireless local area network connection. SUMMARY

[0005] In order to solve the problems existing in the prior art, the present application provides a LoRa ad hoc network communication forwarding node selection method which is fast, efficient and stable in reception and transmission.

[0006] To this end, the present application adopts the following technical solutions:

[0007] A LoRa ad hoc network communication forwarding node selection method comprises the following steps:

[0008] ​S1, initializing the LoRa gateway and all LoRa nodes in the local area network, setting the number of each LoRa node in the local area network and the corresponding LoRa network address;

[0009] S2, sending a data packet to the target node:

[0010] The LoRa gateway sends the data packet to the LoRa node as the target node one by one according to the number of the LoRa node and the corresponding LoRa network address;

[0011] The communication path of the data packet is composed of the link of the LoRa gateway, the target node and 0-n forwarding nodes connected two by two between them; the data packet includes the target node address and the signal strength of the link containing the gateway;

[0012] In the process of transmitting the data packet through each forwarding node, each forwarding node analyzes the information in the data packet, if the current forwarding node finds that the target node address is the same as the current forwarding node address, it stops forwarding and executes step S3; otherwise, the current forwarding node traverses the forwarding situation in the data packet, if the current forwarding node finds that the data packet contains the address of the current forwarding node, it discards the data packet and stops forwarding, otherwise it forwards;

[0013] In forwarding, the current LoRa node is taken as the forwarding node, and the address of the forwarding node, the forwarding node power and the signal strength of the link containing the forwarding node are added to the data packet;

[0014] The signal strength of the link includes the transmission power of the transmission end of the link and the reception power of the reception end of the link;

[0015] S3, obtaining the data packet of the target node:

[0016] Waiting for h minutes to obtain all the data packets arriving at the target node, and analyzing to obtain the signal strength of the link contained in the communication path of all LoRa nodes and the forwarding node power;

[0017] S4, calculating the signal strength weight:

[0018] The signal strength weight W of the communication path j is calculated by the following formula j :

[0019]

[0020] Wherein, n is the total number of links in the communication path j, P Ri is the reception power of link i obtained in S3, P TiS3, obtaining the transmission power of the link i for S3; the communication path j is the number of the communication path included by the current target node;

[0021] S5, calculating the battery power factor:

[0022] The battery power factor B of the communication path j is calculated by the following formula j :

[0023]

[0024] Wherein, m is the number of forwarding nodes in the communication path j, BL p is the current battery power percentage value of the forwarding node p, BA j is the average value of the battery power percentage of all forwarding nodes in the communication path j, and p is the number of the forwarding node;

[0025] S6, calculating the energy weight:

[0026] The energy weight F is calculated by the following formula j :

[0027]

[0028] After the energy weight of all the communication paths included by the current target node is calculated, the communication path with the largest energy weight value is selected as the optimal transmission path of the gateway to the current target node;

[0029] The optimal transmission path of all target nodes is calculated using the method of step S6;

[0030] S7, outputting the routing table: the response data obtained from step S6 is sent reversely to establish a reverse path, and the routing table of the uplink and downlink is established at each forwarding node according to the current routing relationship.

[0031] Preferably, the following steps are further included:

[0032] S8, using the forwarding nodes to record the number of times of receiving and sending data, when the number of times of sending of any forwarding node exceeds the threshold value, the routing table is emptied through the LoRa gateway, and steps S2-S7 are performed again to obtain a new routing table.

[0033] When the target node has no feedback after 1-3 minutes, the current communication path of the target node is deleted, and the routing table of the target node is re-established using steps S2-S7.

[0034] Preferably, the threshold value in S8 is 3000.

[0035] The signal strength weight is used for judging the signal strength of the communication path, and the higher the signal strength weight value is, the smaller the overall signal energy transmission loss of the communication path is, and the stronger the signal transmission stability and anti-interference are.

[0036] Preferably, h in S3 is 1-3.

[0037] Preferably, n in S2 is greater than or equal to 1.

[0038] The selection method of the application provides a complete LoRa wireless local area network building, route discovery and route maintenance method.

[0039] Compared with the prior art, the application has the following beneficial effects:

[0040] 1. The application provides an optimal forwarding path selection model based on energy weight, which contains signal strength weight and battery power factor in the model, and solves the problems of poor network stability caused by poor signal strength and large difference in survival time of different nodes.

[0041] 2. The method of the application reduces the number of times of re-performing route discovery after the communication path is disconnected, reduces the battery power consumption of each node in the network, and improves the working efficiency of the wireless local area network. BRIEF DESCRIPTION OF DRAWINGS

[0042] Figure 1 The LoRa wireless network topology structure used in the application is shown in the figure;

[0043] Figure 2 The route discovery request and response diagram of the application is shown in the figure;

[0044] Figure 3 The flowchart of establishing a routing table in steps S1-S7 in the application is shown in the figure;

[0045] Figure 4 The maintenance process flowchart of step S8 in the application is shown in the figure. DETAILED DESCRIPTION

[0046] The technical solutions of the application will be further described below with reference to the accompanying drawings.

[0047] The LoRa ad hoc network communication forwarding node selection method of the application comprises the following steps:

[0048] S1, initializing the LoRa gateway and all LoRa nodes in the local area network; using the upper computer to send instructions to the LoRa gateway to set the number and corresponding LoRa network address of each LoRa node in the local area network.

[0049] S2, sending a data packet to the target node:

[0050] Turning on LoRa communication function, the LoRa gateway sends a route discovery request in the form of a data packet to all LoRa nodes as target nodes, and makes the LoRa nodes analyze the information in the received data packet; the data packet includes a target node address and a signal strength of a link containing the gateway.

[0051] The communication path through which the data packet passes is composed of links formed by the LoRa gateway, the target node, and 0-n forwarding nodes connected two by two between the two; the data packet includes a target node address and a signal strength of a link containing the gateway.

[0052] In the process of transmitting the data packet via each forwarding node, each forwarding node analyzes the information in the data packet, and if the current LoRa node finds that the target node address is the same as the current LoRa node address, it stops forwarding; otherwise, the current node traverses the forwarding situation in the data packet, and if the current LoRa node finds that the data packet contains the current LoRa node address, it discards the data packet and stops forwarding.

[0053] In forwarding, the current LoRa node is taken as a forwarding node, and the current forwarding node address, the forwarding node power, and the signal strength of a link containing the forwarding node are added to the data packet.

[0054] The signal strength of the link includes the transmission power of the transmission end of the link and the reception power of the reception end of the link.

[0055] S3, obtaining the data packet of the target node:

[0056] Waiting for 1 minute to obtain all data packets arriving at the target node, and analyzing to obtain the signal strength of the link contained in the communication path of all LoRa nodes and the power of the forwarding node.

[0057] S4, calculating the signal strength weight:

[0058] The signal strength weight of the link i in the communication path j is calculated by the following formula:

[0059]

[0060] wherein, P Ri is the reception power of the reception end of the link i obtained by S3, P Ti is the transmission power of the transmission end of the link i obtained by S3; and the j is the number of the communication path contained by the current target node.

[0061] In practical application, the transmission power P Ti may be adjusted by AT instruction, and the power is added to the data packet when transmitting the route discovery request; the reception power P RiThe measurement can be performed by using an SX1262 chip, and the measurement result is obtained by AT instruction and added in the data packet.

[0062] The signal strength weight W of the communication path j is calculated by the following formula j :

[0063]

[0064] Wherein, n represents the total number of links in the communication path j;

[0065] In practical application, the higher the signal strength weight value is, the smaller the overall signal energy transmission loss of the communication path is, and the stronger the stability and anti-interference of the link signal transmission are.

[0066] S5, calculating the battery power factor:

[0067] After the signal strength weight of each communication path is calculated, the average value of the battery power percentage of the nodes used by each communication path is calculated by the target node, and the average value is used as the evaluation benchmark of the battery power factor; when the battery power factor is calculated, only the forwarding nodes are calculated, and the battery power of the gateway and the target node does not affect the value of the battery power factor.

[0068] The battery power factor BP of the forwarding node p in the communication path j is calculated by the following formula p :

[0069]

[0070] Wherein, BL p is the percentage value of the current battery power of the forwarding node p, BA j is the average value of the percentage of the battery power of all forwarding nodes in the communication path j, and p is the number of the forwarding node;

[0071] The battery power factor B of the communication path j is calculated by the following formula j :

[0072]

[0073] Wherein, m is the total number of forwarding nodes in the communication path j;

[0074] S6, calculating the energy weight:

[0075] The battery power factor is added to the signal strength weight of S4 to obtain the energy weight F j of the communication path j, and the energy weight F j is used to comprehensively evaluate the signal strength of the current communication path and the battery power state of each forwarding node therein.

[0076] The energy weight F is calculated by the following formula j :

[0077] F j = B j × W j ;

[0078] Further integration can obtain the following formula:

[0079]

[0080] After the energy weight of all the communication paths included in the current target node is calculated, the communication path with the optimal energy weight, i.e., the maximum energy weight value, is selected as the optimal transmission path of the gateway to the target node.

[0081] The optimal transmission path of all the target nodes is calculated using step S6.

[0082] S7, the response data is sent in the reverse direction of the optimal transmission path obtained in S6, the establishment of the reverse path is completed, and the uplink and downlink bidirectional routing table is established at each forwarding node according to the current routing relationship.

[0083] In some embodiments of the present application, a maintenance process is further included, specifically comprising the following steps:

[0084] S8, in the data transmission process, the routing discovery operation is no longer performed, the routing table obtained in S7 is relied on to forward data, and each forwarding node in the network automatically records the number of times of sending when receiving or sending data, and when the number of times of sending of any forwarding node exceeds a threshold value (3000 times), a message is automatically sent to the gateway, the gateway clears the routing table of all nodes, and steps S2-S7 are performed again to obtain a new routing table.

[0085] When the routing table is normal, if there is a target node that cannot be connected, the gateway automatically repeatedly connects the target node, and if the target node still has no feedback after 1-3 minutes, the communication path is abandoned, the routing information of each forwarding node in the communication path for the communication path is deleted, and the routing discovery of steps S2-S7 is performed again for the target node.

[0086] Embodiment 1

[0087] The present application is based on a complete set of LoRa local area network devices, which mainly include a server, one LoRa gateway, and multiple LoRa nodes. The LoRa gateway can be connected to the cloud server through a 4G wireless network, the distance between each device should be less than the limit communication distance, and each device is connected with a LoRa antenna, and the LoRa gateway is connected with a 4G communication antenna.

[0088] For example Figure 1As shown, the LoRa wireless local area network adopts a mixed arrangement of star topology and mesh topology, the LoRa gateway is located in the center, the circular dotted line represents the communication range of LoRa, which is generally 1-2km in actual application, the nodes within the circle can directly communicate with the gateway to form a star topology structure. The LoRa nodes outside the circle are limited by long distance, which may cause poor LoRa communication signal quality or occasional disconnection, so signal forwarding is used by the remaining nodes, and the structure is similar to mesh topology. This arrangement scheme can effectively expand the radiation range of a single LoRa gateway and improve the stability of signal transmission.

[0089] As shown in Figure 2 As shown, after the route discovery request in step S2 is sent, it is transmitted to the target node D through the left communication path 2 and the right communication path 1. When the node selection method of the application is used, the communication path 1 has more forwarding times but the signal strength of each link is strong. In the case where the battery power factor difference is not significant, the communication path 1 is preferentially selected.

[0090] Embodiment 2

[0091] The local area network according to the application uses LoRa technology for communication between nodes, and data is finally collected to the gateway and transmitted to the cloud server through the public network through 4G / 5G cellular network technology.

[0092] Among them, the LoRa wireless local area network includes at least one LoRa gateway, the number of LoRa nodes should be less than 255, the LoRa gateway is built-in 4G / 5G communication module, can communicate through LoRa and cellular network, LoRa node only has LoRa communication function. The host computer sends instructions to the LoRa gateway through the UART serial port.

[0093] The LoRa gateway and the LoRa node both use the SX1262 radio transceiver produced by Smetech Company, each LoRa node has a unique LoRa network address, and the built-in microcontroller uses an STM32F4 series chip to receive, process the signals received by the LoRa chip, and control the transmission of data. The LoRa network uses multi-hop communication technology to expand the communication range, and uses on-demand driven routing protocol. The LoRa gateway and the LoRa node both have low power consumption and sleep function, when the device has not sent or received data for a long time, the microcontroller in the device enters low power consumption state, the 4G communication module and the receiving function of the LoRa chip enter low power consumption state, and can quickly wake up and normally receive corresponding data and instructions after receiving the request sent by the server or other devices. Each device is connected with a LoRa antenna, and the LoRa gateway is connected with a 4G communication antenna.

Claims

1. A method for selecting a forwarding node in a LoRa ad hoc network, characterized in that, Includes the following steps: S1, Initialize the LoRa gateway and all LoRa nodes in the local area network, and set the number and corresponding LoRa network address of each LoRa node in the local area network; S2, send data packets to the target node: The LoRa gateway identifies each LoRa node as a target node and sends data packets to it one by one according to the LoRa node's number and corresponding LoRa network address. The communication path traversed by the data packet consists of the LoRa gateway, the target node, and links formed by 0 to n forwarding nodes connecting each other; the data packet includes the target node address and the signal strength of the link containing the gateway; During the transmission of the data packet through each forwarding node, each forwarding node parses the information in the data packet. If the current forwarding node finds that the target node address is the same as the current forwarding node address, it stops forwarding and executes step S3; otherwise, the current forwarding node traverses the forwarding status in the data packet. If the current forwarding node finds that the data packet contains the current forwarding node address, it discards the data packet and stops forwarding; otherwise, it proceeds with forwarding. During forwarding, the current LoRa node is used as the forwarding node, and the address of the forwarding node, the power of the forwarding node, and the signal strength of the link containing the forwarding node are added to the data packet. The signal strength of the link includes the transmit power at the transmitter end of the link and the receive power at the receiver end of the link. S3, retrieve data packets from the target node: Wait h minutes to obtain all data packets arriving at the target node, and parse the signal strength of the links contained in the communication path of all LoRa nodes and the power of the forwarding nodes; S4, Calculate the signal strength weights: The signal strength weight W of communication path j is calculated using the following formula. j : Where n is the total number of links in communication path j, P Ri P is the received power of link i obtained by S3. Ti The transmit power of link i obtained by S3; the communication path j is the number of the communication path included by the current target node; S5, calculate battery capacity factor: The battery power factor B of communication path j is calculated using the following formula. j : Where m is the number of forwarding nodes in communication path j, BL p BA represents the current battery percentage value of forwarding node p. j is the average battery percentage of all forwarding nodes in communication path j, and p is the number of the forwarding node; S6, Calculate energy weights: The energy weight F is calculated using the following formula. j : F j =B j ×W j ; After calculating the energy weights of all communication paths included in the current target node, the communication path with the largest energy weight value is selected as the optimal transmission path from the gateway to the current target node. The optimal transmission path for all target nodes is calculated using the method in step S6. S7, Output routing table: Based on the optimal transmission path obtained in S6, send response data in reverse to establish a reverse path, and establish uplink and downlink routing tables at each forwarding node according to the current routing relationship.

2. The method for selecting a LoRa self-organizing network communication forwarding node according to claim 1, characterized in that, It also includes the following steps: S8, the forwarding node records the number of times it receives or sends data. When the number of times any forwarding node sends data exceeds the threshold, the routing table is cleared through the LoRa gateway, and steps S2-S7 are repeated to obtain a new routing table.

3. The method for selecting a LoRa self-organizing network communication forwarding node according to claim 1 or 2, characterized in that: If the target node does not respond after 1 to 3 minutes, the current communication path of the target node is deleted, and the routing table of the target node is re-established using steps S2-S7.

4. The method for selecting a LoRa self-organizing network communication forwarding node according to claim 2, characterized in that: The threshold in S8 is 3000.

5. The method for selecting a LoRa self-organizing network communication forwarding node according to claim 1, characterized in that: The signal strength weight is used to determine the signal strength of the communication path. The higher the signal strength weight value, the smaller the overall signal energy transmission loss of the communication path, and the stronger its signal transmission stability and anti-interference ability.

6. The method for selecting forwarding nodes in LoRa self-organizing network communication according to claim 1, characterized in that: The h = 1 to 3 mentioned in S3.

7. The method for selecting a LoRa self-organizing network communication forwarding node according to claim 1, characterized in that: In S2, n≥1.

Citation Information

Patent Citations

  • Wireless relay self-networking method with anti-jamming performance

    CN107770832A

  • Power deep foundation pit terminal service data transmission method and system based on reliability

    CN116261199A