AODV routing protocol optimization method and device for LoRa sensor network

By optimizing the AODV routing protocol of the LoRa sensor network, combining routing overhead, energy balance and rate adaptive algorithms, the problems of low packet delivery rate and short node battery life in complex environments are solved, improving network performance and coverage, and extending node life.

CN115580913BActive Publication Date: 2025-08-12WUHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211148413.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-20
Publication Date
2025-08-12
Estimated Expiration
2042-09-20

AI Technical Summary

Technical Problem

In scenarios with high network coverage requirements such as large farms, ranches, forests, and mountains, the existing LoRa sensor network has a low packet delivery rate, and the AODV routing protocol cannot establish the most suitable path, resulting in limited network performance and routing overhead increases with the increase in the number of nodes, affecting network performance and node battery life.

Method used

By optimizing the AODV routing protocol, routing overhead optimization strategy, energy balance strategy and rate adaptive algorithm are adopted to adjust the forwarding probability, path delay and node energy consumption of RREQ messages, establish the shortest path delay routing, reduce routing overhead and extend node life.

Benefits of technology

It improves the performance of large-scale LoRa sensor networks, extends the life of battery-powered LoRa sensor networks, improves network coverage and data transmission efficiency, and provides guarantees for the practicality of LoRa technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115580913B_ABST
    Figure CN115580913B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for optimizing the AODV routing protocol for LoRa sensor networks. The method comprises steps 1 to 7. The AODV routing protocol optimization method of the present invention has high execution efficiency, can improve the performance of large-scale LoRa sensor networks, establish routes with lower path delays based on the shortest path delay as the path selection principle, extend the life of battery-powered LoRa sensor networks, and provide strong support for promoting the practical application of LoRa technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of LoRa sensor networks, and in particular to an AODV routing protocol optimization method and device for a LoRa sensor network. Background Art

[0002] In recent years, with the development and widespread adoption of IoT technology, the number of smart devices connected to the network has increased dramatically, creating a massive market. Many countries have included the IoT in their national development strategies. Currently, most LoRa sensor networks use the LoRaWAN architecture's single-hop, star-shaped networking. However, when deployed in scenarios requiring high network coverage, such as large farms and pastures, vast forests, and mountainous areas, or in urban, indoor, and underground environments that are not wirelessly friendly, packet delivery rates at some nodes can be severely reduced, or even impossible to upload. Multi-hop networking is often used, with intermediate nodes forwarding packets to indirectly enable these nodes to upload data, improving network performance. Therefore, to enhance the deployment flexibility and coverage of LoRa sensor networks, research on multi-hop LoRa networking has become a hot topic. The AODV routing protocol is a widely used routing protocol for narrowband ad hoc networks, based on single-path routing based on the shortest path. Large-scale LoRa sensor networks have a large number of nodes, and nodes typically have multiple paths for uploading data to the gateway. AODV, with a single path, cannot establish the most appropriate path, limiting network performance. Furthermore, as the number of nodes increases, AODV's routing overhead increases, necessitating control of routing overhead. Therefore, to improve the performance of large-scale LoRa sensor networks, targeted research and optimization of the AODV protocol is of practical significance and has become a pressing technical issue in this field. Summary of the Invention

[0003] In view of the above problems existing in the prior art, the embodiments of the present invention provide a method and device for optimizing the AODV routing protocol of a LoRa sensor network.

[0004] In a first aspect, an embodiment of the present invention provides an AODV routing protocol optimization method for a LoRa sensor network, comprising: step 1, performing parameter initialization settings; step 2, counting the number of neighbor nodes N of the source node n The distance between the source node and the neighbor node is greater than d min The number of neighbor nodes N d The source node performs probability P on the forwarding probability field in the RREQ message based on the routing cost optimization strategy. rb Assignment, the source node according to the probability P rbBroadcast RREQ; Step 3, the intermediate node receives RREQ, first based on the energy balance strategy according to the node's remaining energy E to determine whether the node participates in forwarding RREQ, if it cannot forward, the node discards the RREQ, otherwise calculates the parameter single-hop transmission delay Tpacket; Step 4, the intermediate node determines whether it has received RREQ with the same RREQ_ID, if not, the node responds to RREQ, otherwise the AODV routing protocol is not used to directly discard the RREQ, but to respond to the RREQ with a shorter path delay; Step 5, determine whether the node is the destination node, if so, jump to step 7, otherwise update the probability P based on the routing cost optimization strategy and energy balance strategy. rb And according to the probability P rb Forward the broadcast RREQ; Step 6, repeat steps 3 to 5 for other intermediate nodes; Step 7, reply with the routing response RREP and establish a reverse route.

[0005] Based on the content of the above method embodiment, the AODV routing protocol optimization method for the LoRa sensor network provided in the embodiment of the present invention specifically includes: step 1.1, the SF of all LoRa nodes is set to 9 by default, the CR is 4 / 5, the BW is 125KHz, and the local record path hop count hops_local and path delay Tpath_local are added, and the initial value is 0; step 1.2, according to the formula Calculate the LoRa communication distance d corresponding to different spreading factors within the line of sight and without electromagnetic interference, where P t is the transmitting power of the transmitter, P r is the receiving sensitivity of the receiving end, G t is the antenna gain at the transmitter, G r is the antenna gain at the receiving end, f is the operating frequency, L c is the feeder insertion loss of the transmitting antenna, L0 is the air propagation loss caused by the environment, and the receiving sensitivity P r It takes different values according to different spreading factors SF; Step 1.3, let d min =k×d SF=6 , where d SF=6 is the communication distance of LoRa when SF=6, Step 1.4: Add the forwarding probability field P to the RREQ message. rb and path delay field Tpath and are both set to 0.

[0006] Based on the content of the above method embodiment, the AODV routing protocol optimization method of the LoRa sensor network provided in the embodiment of the present invention, step 2 specifically includes: step 2.1, if N n ≤4, then there are few neighbor nodes, let the probability P rb=1, all neighboring nodes of the source node broadcast RREQ; Step 2.2, if N n >4 and N d ≤4, let The number of forwarding nodes is 4, where the source node is connected to all neighboring nodes whose distance is greater than d. min Neighbor nodes broadcast RREQ to 4-N d Other neighbor nodes broadcast RREQ; Step 2.3, if 4 <N d ≤N th , then it has many neighbor nodes, which reduces the forwarding probability, and let P rb =P2, where P2 is 0.7, N th Take 12, the source node pair <N d ×P rb >The distance between the neighbor nodes is greater than d min Neighbor nodes broadcast RREQ; Step 2.4, if N d >N th , indicating that there are many neighbor nodes, which reduces the forwarding probability. Let P rb =P min , P min Take 0.3 to ensure that all LoRa nodes still have forwarding function in the network and will not become dead nodes; the source node <N d ×P rb >The distance between the neighbor nodes is greater than d min The neighboring nodes broadcast RREQ, where the symbol <> represents the rounding-up operation.

[0007] Based on the content of the above method embodiment, the AODV routing protocol optimization method of the LoRa sensor network provided in the embodiment of the present invention, step 3 specifically includes: step 3.1, if E <E th2 The remaining energy of the node is low, and being an intermediate node will increase the energy consumption of the node, so the RREQ is discarded and the process goes to step 6, where E th2 =E max ×0.5, E max is the full-scale energy of the battery; Step 3.2, if E>E th2Then, obtain the demodulation signal-to-noise ratio SNR of the LoRa node, and determine the optimal SF for the communication between the previous-hop node and itself according to the demodulation signal-to-noise ratio threshold of LoRa. If -5dB ≤ SNR, then SF = 6; if -5 < SNR ≤ -7.5dB, then SF = 7; if -7.5 < SNR ≤ -10dB, then SF = 8; if -10 < SNR ≤ -12.5dB, then SF = 9; if -12.5 < SNR ≤ -15dB, then SF = 10; if -15 < SNR ≤ -17.5dB, then SF = 11; if -17.5 < SNR ≤ -20dB, then SF = 12; Step 3.3: Calculate the single-hop transmission delay Tpacket at this SF, where LoRa symbol rate N payload is the payload length, N preamble is the preamble length.

[0008] Based on the content of the above method embodiment, the method for optimizing the AODV routing protocol of the LoRa sensor network provided in the embodiment of the present invention, Step 4 specifically includes: Step 4.1: If the intermediate node has not received a RREQ with the same RREQ_ID, extract the path hop count field hops and the path delay field Tpath in the RREQ, and calculate according to the formula T path = T path + T packet and hops = hops + 1 to update the path hop count field hops and the path delay field Tpath in the RREQ, and record the path hop count and the path delay locally as hops_local and Tpath_local respectively, and then jump to Step 5; Step 4.2: If the intermediate node has received a RREQ with the same RREQ_ID, extract the path hop count field hops and the path delay field Tpath in the RREQ, and calculate the updated Tpath and hops of the new RREQ according to the formula T path = T path + T packet and hops = hops + 1; Step 4.3: If hops > hops_local, then discard this RREQ and jump to Step 6; Step 4.4: Otherwise, if T path ≥ T path _local, then discard this RREQ and jump to Step 6; Step 4.5: Otherwise, update the path hop count field hops and the path delay field Tpath in the RREQ, and record the path hop count and the path delay locally as hops_local and Tpath_local respectively.

[0009] Based on the content of the above method embodiment, the AODV routing protocol optimization method of the LoRa sensor network provided in the embodiment of the present invention, step 5 specifically includes: step 5.1, based on the routing cost optimization strategy, according to the number of its neighbor nodes Nn and the distance between the intermediate node and the neighbor node greater than d min The number of neighbor nodes N d According to the formula Calculate the probability P of the intermediate node forwarding the broadcast RREQ rb ; Step 5.2, based on the energy balance strategy, according to the formula Calculate the probability P of the intermediate node forwarding the broadcast RREQ rb ,in E th1 =E max ×a, a is 0.8; Step 5.3, if N n ≤4, then the intermediate nodes follow the probability P rb Forward broadcast RREQ; if N n >4 and N d ≤4, the intermediate node has a distance greater than d from all neighboring nodes min Neighbor nodes forward the broadcast RREQ to 4-N d broadcast RREQ to other neighbor nodes; otherwise <N d ×P rb >The distance between the neighbor nodes is greater than d min Neighbor nodes forward the broadcast RREQ.

[0010] In the second aspect, an embodiment of the present invention provides an AODV routing protocol optimization device for a LoRa sensor network, comprising: a first main module for implementing step 1, performing parameter initialization settings; step 2, counting the number of neighbor nodes N of the source node n The distance between the source node and the neighbor node is greater than d min The number of neighbor nodes N d The source node performs probability P on the forwarding probability field in the RREQ message based on the routing cost optimization strategy. rb Assignment, the source node according to the probability P rbBroadcast RREQ; The second main module is used to implement step 3. When the intermediate node receives the RREQ, it first determines whether the node participates in forwarding the RREQ based on the remaining energy E of the node based on the energy balancing strategy. If it cannot be forwarded, the node discards the RREQ, otherwise it calculates the parameter single-hop transmission delay Tpacket; The third main module is used to implement step 4. The intermediate node determines whether it has received the RREQ with the same RREQ_ID. If it has not received it, the node responds to the RREQ. Otherwise, the AODV routing protocol is not used to directly discard the RREQ, but to respond to the RREQ with a shorter path delay; The fourth main module is used to implement step 5. Determine whether the node is the destination node. If so, jump to step 7. Otherwise, update the probability P based on the routing cost optimization strategy and the energy balancing strategy. rb And according to the probability P rb Forward the broadcast RREQ; Step 6, repeat steps 3 to 5 for other intermediate nodes; Step 7, reply with the routing response RREP and establish a reverse route.

[0011] In a third aspect, an embodiment of the present invention provides an electronic device, including:

[0012] at least one processor; and

[0013] at least one memory communicatively coupled to the processor, wherein:

[0014] The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the AODV routing protocol optimization method for the LoRa sensor network provided by any one of the various implementation methods of the first aspect.

[0015] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute the AODV routing protocol optimization method for the LoRa sensor network provided by any one of the various implementation methods of the first aspect.

[0016] The embodiments of the present invention provide an AODV routing protocol optimization method and device for a LoRa sensor network. The AODV routing protocol optimization execution efficiency is high, which can improve the performance of large-scale LoRa sensor networks. The shortest path delay is used as the path selection principle to establish routes with lower path delays, extend the life of battery-powered LoRa sensor networks, and provide a strong guarantee for promoting the practical application of LoRa technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 Flowchart of the AODV routing protocol optimization method for the LoRa sensor network provided by an embodiment of the present invention;

[0019] Figure 2 A schematic diagram of the structure of an AODV routing protocol optimization device for a LoRa sensor network provided by an embodiment of the present invention;

[0020] Figure 3 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention;

[0021] Figure 4 A schematic diagram of the LoRa data packet structure provided by an embodiment of the present invention;

[0022] Figure 5 This is a schematic diagram of a communication parameter diagram corresponding to SF provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be arbitrarily combined with each other to form a feasible technical solution. This combination is not restricted by the sequence of steps and / or structural composition mode, but must be based on the ability of ordinary technicians in this field to implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0024] The embodiment of the present invention provides an AODV routing protocol optimization method for a LoRa sensor network, see Figure 1 The method includes: step 1, initializing parameters; step 2, counting the number of neighbor nodes N of the source node n The distance between the source node and the neighbor node is greater than d min The number of neighbor nodes N dThe source node performs probability P on the forwarding probability field in the RREQ message based on the routing cost optimization strategy. rb Assignment, the source node according to the probability P rb Broadcast RREQ; Step 3, the intermediate node receives RREQ, first based on the energy balance strategy according to the node's remaining energy E to determine whether the node participates in forwarding RREQ, if it cannot forward, the node discards the RREQ, otherwise calculates the parameter single-hop transmission delay Tpacket; Step 4, the intermediate node determines whether it has received RREQ with the same RREQ_ID, if not, the node responds to RREQ, otherwise the AODV routing protocol is not used to directly discard the RREQ, but to respond to the RREQ with a shorter path delay; Step 5, determine whether the node is the destination node, if so, jump to step 7, otherwise update the probability P based on the routing cost optimization strategy and energy balance strategy. rb And according to the probability P rb Forward the broadcast RREQ; Step 6, repeat steps 3 to 5 for other intermediate nodes; Step 7, reply with the routing response RREP and establish a reverse route.

[0025] Based on the content of the above method embodiment, as an optional embodiment, the AODV routing protocol optimization method for the LoRa sensor network provided in the embodiment of the present invention specifically includes: step 1.1, the SF of all LoRa nodes is set to 9 by default, the CR is 4 / 5, the BW is 125KHz, and the local record path hop count hops_local and path delay Tpath_local are added, and the initial value is 0; step 1.2, according to the formula Calculate the LoRa communication distance d corresponding to different spreading factors within the line of sight and without electromagnetic interference, where P t is the transmitting power of the transmitter, P r is the receiving sensitivity of the receiving end, G t is the antenna gain at the transmitter, G r is the antenna gain at the receiving end, f is the operating frequency, L c is the feeder insertion loss of the transmitting antenna, L0 is the air propagation loss caused by the environment, and the receiving sensitivity P r It takes different values according to different spreading factors SF; Step 1.3, let d min =k×d SF=6 , where d SF=6 is the communication distance of LoRa when SF=6, Step 1.4: Add the forwarding probability field P to the RREQ message. rb and path delay field Tpath and are both set to 0.

[0026] Based on the content of the above method embodiment, as an optional embodiment, the AODV routing protocol optimization method of the LoRa sensor network provided in the embodiment of the present invention, step 2 specifically includes: step 2.1, if N n ≤4, then there are few neighbor nodes, let the probability P rb =1, all neighboring nodes of the source node broadcast RREQ; Step 2.2, if N n >4 and N d ≤4, let The number of forwarding nodes is 4, where the source node is connected to all neighboring nodes whose distance is greater than d. min Neighbor nodes broadcast RREQ to 4-N d Other neighbor nodes broadcast RREQ; Step 2.3, if 4 <N d ≤N th , then it has many neighbor nodes, which reduces the forwarding probability, and let P rb =P2, where P2 is 0.7, N th Take 12, the source node pair <N d ×P rb >The distance between the neighbor nodes is greater than d min Neighbor nodes broadcast RREQ; Step 2.4, if N d >N th , indicating that there are many neighbor nodes, which reduces the forwarding probability. Let P rb =P min , P min Take 0.3 to ensure that all LoRa nodes still have forwarding function in the network and will not become dead nodes; the source node <N d ×P rb >The distance between the neighbor nodes is greater than d min The neighboring nodes broadcast RREQ, where the symbol <> represents the rounding-up operation.

[0027] Based on the content of the above method embodiment, as an optional embodiment, the AODV routing protocol optimization method of the LoRa sensor network provided in the embodiment of the present invention, step 3 specifically includes: step 3.1, if E <E th2 The remaining energy of the node is low, and being an intermediate node will increase the energy consumption of the node, so the RREQ is discarded and the process goes to step 6, where E th2 =E max ×0.5, E max is the full-scale energy of the battery; Step 3.2, if E>E th2Then, obtain the demodulation signal-to-noise ratio SNR of the LoRa node, and determine the best SF for the communication between the previous-hop node and itself according to the demodulation signal-to-noise ratio threshold of LoRa. If -5dB ≤ SNR, then SF = 6; if -5 < SNR ≤ -7.5dB, then SF = 7; if -7.5 < SNR ≤ -10dB, then SF = 8; if -10 < SNR ≤ -12.5dB, then SF = 9; if -12.5 < SNR ≤ -15dB, then SF = 10; if -15 < SNR ≤ -17.5dB, then SF = 11; if -17.5 < SNR ≤ -20dB, then SF = 12; Step 3.3: Calculate the single-hop transmission delay Tpacket at this SF, where LoRa symbol rate N payload is the payload length, N preamble is the preamble length.

[0028] Based on the content of the above method embodiment, as an optional embodiment, the method for optimizing the AODV routing protocol of the LoRa sensor network provided in the embodiment of the present invention, Step 4 specifically includes: Step 4.1: The intermediate node has not received an RREQ with the same RREQ_ID. Extract the path hop number field hops and the path delay field Tpath in the RREQ, and according to the formula T path = T path + T packet and hops = hops + 1 to update the path hop number field hops and the path delay field Tpath in the RREQ, and record the path hop number and the path delay locally as hops_local and Tpath_local respectively, and jump to Step 5; Step 4.2: The intermediate node has received an RREQ with the same RREQ_ID. Extract the path hop number field hops and the path delay field Tpath in the RREQ, and calculate the updated Tpath and hops of the new RREQ according to the formula T path = T path + T packet and hops = hops + 1; Step 4.3: If hops > hops_local, then discard this RREQ and jump to Step 6; Step 4.4: Otherwise, if T path ≥ T path _local, then discard this RREQ and jump to Step 6; Step 4.5: Otherwise, update the path hop number field hops and the path delay field Tpath in the RREQ, and record the path hop number and the path delay locally as hops_local and Tpath_local respectively.

[0029] Based on the content of the above method embodiment, as an optional embodiment, the AODV routing protocol optimization method of the LoRa sensor network provided in the embodiment of the present invention, step 5 specifically includes: step 5.1, based on the routing cost optimization strategy, according to the number of its neighbor nodes Nn and the distance between the intermediate node and the neighbor node greater than d min The number of neighbor nodes N d According to the formula Calculate the probability P of the intermediate node forwarding the broadcast RREQ rb ; Step 5.2, based on the energy balance strategy, according to the formula Calculate the probability P of the intermediate node forwarding the broadcast RREQ rb ,in E th1 =E max ×a, a is 0.8; Step 5.3, if N n ≤4, then the intermediate nodes follow the probability P rb Forward broadcast RREQ; if N n >4 and N d ≤4, the intermediate node has a distance greater than d from all neighboring nodes min Neighbor nodes forward the broadcast RREQ to 4-N d broadcast RREQ to other neighbor nodes; otherwise <N d ×P rb >The distance between the neighbor nodes is greater than d min Neighbor nodes forward the broadcast RREQ.

[0030] The embodiment of the present invention provides an AODV routing protocol optimization method for a LoRa sensor network. The AODV routing protocol optimization execution efficiency is high, which can improve the performance of large-scale LoRa sensor networks. The shortest path delay is used as the path selection principle to establish routes with lower path delays, extend the life of battery-powered LoRa sensor networks, and provide a strong guarantee for promoting the practical application of LoRa technology.

[0031] It should be noted that the coding, interleaving, scrambling, and FSCM modulation processes of the LoRa physical layer enable LoRa to achieve a receiving sensitivity of -148dBm, but this also results in a lower transmission rate for LoRa. The LoRa transmission rate is described by the symbol rate Rs and the data rate DR, which are related to the spreading factor SF, the coding rate CR, and the signal bandwidth BW, as shown in formulas (1) and (2):

[0032]

[0033]

[0034] like Figure 4As shown in Figure 1, a complete LoRa data packet consists of a preamble, a header, and a payload. The preamble is used for receiver synchronization; the header carries information about the payload length, forward error correction code rate, and whether the payload checksum CRC is enabled. The packet transmission time, Tpacket, is calculated using formula (3):

[0035]

[0036] where N preamble is the preamble length, N payload is the effective payload length.

[0037] When the CR is 4 / 5, the BW is 125 kHz, the preamble is 10 symbols, and the payload is 20 bytes, according to the demodulation signal-to-noise ratio (SNR) reference provided by Semtech, the data rate, transmission time, demodulation signal-to-noise ratio threshold, and receiving sensitivity corresponding to different SFs are as follows: Figure 5 As shown in the figure, LoRa data packet transmission time ranges from tens to hundreds of milliseconds. LoRa communication latency is composed of data transmission time. Reducing the spreading factor by 1 approximately doubles the data rate and reduces the transmission time by about half, but the demodulation signal-to-noise ratio threshold increases, shortening the communication range accordingly.

[0038] Because large-scale LoRa sensor networks have a large number of nodes, there are typically multiple paths for nodes to upload data to the gateway. AODV, however, is a single-path routing protocol and cannot establish the most appropriate path, limiting network performance. Furthermore, as the number of nodes increases, AODV's routing overhead increases, necessitating control of routing overhead. Furthermore, in battery-powered LoRa sensor networks, the endurance of nodes is crucial to the network's operational lifespan. Therefore, the present invention improves the AODV protocol by comprehensively considering the number of node neighbors, inter-node distances, path delays, and energy balance during the route discovery process, proposing a comprehensive optimized path selection strategy.

[0039] First, the present invention proposes a routing overhead optimization strategy based on the number of neighboring nodes and the distance to neighboring nodes. Since the AODV routing protocol's route request (RREQ) messages are transmitted within the network via flooding, in large-scale LoRa sensor networks with a large number of nodes, due to the high node density and the large number of neighboring nodes, after the RREQ is broadcast, some nodes will forward it, resulting in significant routing overhead. The present invention optimizes routing overhead by rationally reducing the number of RREQ forwardings. When a node receives an RREQ from a neighboring node, if the neighboring node has many neighbors, the probability of forwarding the RREQ is reduced to prevent too many nodes from participating in the forwarding of the same RREQ. If the neighboring node has few neighbors, the probability of forwarding the RREQ is increased to ensure a sufficient number of nodes forwarding the RREQ to ensure a successful route establishment. Furthermore, when the distance between the receiving node and the previous forwarding node is small, the communication areas of the two nodes will overlap significantly. If forwarding is still performed, redundancy will result. Therefore, the present invention assigns a higher forwarding priority to neighboring nodes whose distance exceeds a certain threshold.

[0040] Secondly, in the route discovery process of the AODV protocol, the intermediate node only forwards the first received RREQ, and the destination node only responds to the first received RREQ. In large-scale LoRa sensor networks, there are usually multiple routes for sending data from the source node to the destination node. Selecting the route with the lowest latency can reduce the end-to-end latency and channel occupancy time of data packet transmission, thereby improving network throughput. According to the characteristics of LoRa nodes, in order to ensure the coverage of the LoRa sensor network, the communication distance of LoRa nodes must be far enough, and the larger the SF, the better. However, when the SF is larger, the longer the SF is, the better. Figure 5 Longer transmission times increase route establishment time, leading to decreased network performance. Networks often have nodes that are closer together and have higher channel quality, thus utilizing smaller SFs. Therefore, by using a rate-adaptive algorithm to select the appropriate LoRa node SF and reduce transmission times, the AODV route discovery process is modified to select routes with lower transmission latency, thereby improving network throughput.

[0041] Finally, the nodes of a large-scale LoRa sensor network are densely distributed. During the AODV route discovery process, a node in the network has the potential to become the next-hop forwarding node for its neighboring nodes. For nodes with many neighboring nodes, they have the potential to become forwarding nodes for many neighboring nodes. This causes the node to forward more data than other nodes in each cycle, resulting in energy imbalance among nodes and shortening the network operation time due to excessive power consumption of some nodes. The present invention adopts an energy balancing strategy, which records the remaining energy of the node as E and uses it as the basis for forwarding RREQ during the route discovery process. If the E value is very small, the RREQ will no longer be forwarded, and other nodes will participate in the establishment of the route to avoid excessive energy consumption of the node. If the E value is too small, the node will reduce the probability of forwarding RREQ, reducing the probability of increasing the load on the node. If the E value is appropriate, the RREQ will be forwarded normally to achieve the purpose of energy balance.

[0042] The implementation basis of each embodiment of the present invention is to implement programmed processing through a device with processor functions. Therefore, in engineering practice, the technical solutions and functions of each embodiment of the present invention can be encapsulated into various modules. Based on this reality, on the basis of the above embodiments, an embodiment of the present invention provides an AODV routing protocol optimization device for a LoRa sensor network, which is used to execute the AODV routing protocol optimization method for a LoRa sensor network in the above method embodiment. Figure 2 The device includes: a first main module, which is used to implement step 1, initializing the parameters; step 2, counting the number of neighbor nodes N of the source node n The distance between the source node and the neighbor node is greater than d min The number of neighbor nodes N d The source node performs probability P on the forwarding probability field in the RREQ message based on the routing cost optimization strategy. rb Assignment, the source node according to the probability P rb Broadcast RREQ; The second main module is used to implement step 3. When the intermediate node receives the RREQ, it first determines whether the node participates in forwarding the RREQ based on the remaining energy E of the node based on the energy balancing strategy. If it cannot be forwarded, the node discards the RREQ, otherwise it calculates the parameter single-hop transmission delay Tpacket; The third main module is used to implement step 4. The intermediate node determines whether it has received the RREQ with the same RREQ_ID. If it has not received it, the node responds to the RREQ. Otherwise, the AODV routing protocol is not used to directly discard the RREQ, but to respond to the RREQ with a shorter path delay; The fourth main module is used to implement step 5. Determine whether the node is the destination node. If so, jump to step 7. Otherwise, update the probability P based on the routing cost optimization strategy and the energy balancing strategy. rb And according to the probability P rbForward the broadcast RREQ; Step 6, repeat steps 3 to 5 for other intermediate nodes; Step 7, reply with the routing response RREP and establish a reverse route.

[0043] The AODV routing protocol optimization device for the LoRa sensor network provided by the embodiment of the present invention adopts Figure 2 Among them, the AODV routing protocol has high optimization execution efficiency, which can improve the performance of large-scale LoRa sensor networks. It uses the shortest path delay as the path selection principle to establish routes with lower path delay, extend the life of battery-powered LoRa sensor networks, and provide strong support for promoting the practical application of LoRa technology.

[0044] It should be noted that the device in the device embodiment provided by the present invention can be used to implement the method in the above-mentioned method embodiment as well as the method in other method embodiments provided by the present invention. The only difference is that the corresponding functional modules are set. The principle is basically the same as the principle of the above-mentioned device embodiment provided by the present invention. As long as those skilled in the art refer to the specific technical solutions in other method embodiments on the basis of the above-mentioned device embodiment, obtain the corresponding technical means and the technical solutions composed of these technical means by combining technical features, and ensure the practicality of the technical solutions, they can improve the device in the above-mentioned device embodiment to obtain the corresponding device class embodiment, thereby obtaining the corresponding device class embodiment for implementing the methods in other method class embodiments. For example:

[0045] Based on the content of the above device embodiment, as an optional embodiment, the AODV routing protocol optimization device for the LoRa sensor network provided in the embodiment of the present invention further includes: a first submodule for implementing step 1 specifically including: step 1.1, the SF of all LoRa nodes is defaulted to 9, the CR is 4 / 5, the BW is 125KHz, and the local record path hop count hops_local and path delay Tpath_local are added, and the initial value is 0; step 1.2, according to the formula Calculate the LoRa communication distance d corresponding to different spreading factors within the line of sight and without electromagnetic interference, where P t is the transmitting power of the transmitter, P r is the receiving sensitivity of the receiving end, G t is the antenna gain at the transmitter, G r is the antenna gain at the receiving end, f is the operating frequency, L c is the feeder insertion loss of the transmitting antenna, L0 is the air propagation loss caused by the environment, and the receiving sensitivity P r It takes different values according to different spreading factors SF; Step 1.3, let d min =k×d SF=6 , where d SF=6is the communication distance of LoRa when SF=6, Step 1.4: Add the forwarding probability field P to the RREQ message. rb and path delay field Tpath and are both set to 0.

[0046] Based on the content of the above device embodiment, as an optional embodiment, the AODV routing protocol optimization device for the LoRa sensor network provided in the embodiment of the present invention further includes: a second submodule for implementing step 2 specifically including: step 2.1, if N n ≤4, then there are few neighbor nodes, let the probability P rb =1, all neighboring nodes of the source node broadcast RREQ; Step 2.2, if N n >4 and N d ≤4, let The number of forwarding nodes is 4, where the source node is connected to all neighboring nodes whose distance is greater than d. min Neighbor nodes broadcast RREQ to 4-N d Other neighbor nodes broadcast RREQ; Step 2.3, if 4 <N d ≤N th , then it has many neighbor nodes, which reduces the forwarding probability, and let P rb =P2, where P2 is 0.7, N th Take 12, the source node pair <N d ×P rb >The distance between the neighbor nodes is greater than d min Neighbor nodes broadcast RREQ; Step 2.4, if N d >N th , indicating that there are many neighbor nodes, which reduces the forwarding probability. Let P rb =P min , P min Take 0.3 to ensure that all LoRa nodes still have forwarding function in the network and will not become dead nodes; the source node <N d ×P rb >The distance between the neighbor nodes is greater than d min The neighboring nodes broadcast RREQ, where the symbol <> represents the rounding-up operation.

[0047] Based on the content of the above device embodiment, as an optional embodiment, the AODV routing protocol optimization device for the LoRa sensor network provided in the embodiment of the present invention further includes: a third submodule for implementing step 3 specifically including: step 3.1, if E <E th2 The remaining energy of the node is low, and being an intermediate node will increase the energy consumption of the node, so the RREQ is discarded and the process goes to step 6, where E th2 =E max ×0.5, Emax is the full - scale energy of the battery; Step 3.2, if E>E th2 then obtain the demodulation signal - to - noise ratio SNR of the LoRa node, and determine the optimal SF for the communication between the previous - hop node and itself according to the demodulation signal - to - noise ratio threshold of LoRa. If - 5dB≤SNR, then SF = 6; if - 5<SNR≤ - 7.5dB, then SF = 7; if - 7.5<SNR≤ - 10dB, then SF = 8; if - 10<SNR≤ - 12.5dB, then SF = 9; if - 12.5<SNR≤ - 15dB, then SF = 10; if - 15<SNR≤ - 17.5dB, then SF = 11; if - 17.5<SNR≤ - 20dB, then SF = 12; Step 3.3, calculate the single - hop transmission delay Tpacket under this SF, where LoRa symbol rate N payload is the payload length, N preamble is the preamble length.

[0048] Based on the content of the above device embodiments, as an optional embodiment, the AODV routing protocol optimization device for the LoRa sensor network provided in the embodiments of the present invention further includes: a fourth sub - module, used to implement Step 4, which specifically includes: Step 4.1, when the intermediate node has not received an RREQ with the same RREQ_ID, extract the path - hop number field hops and the path - delay field Tpath in the RREQ, and update the path - hop number field hops and the path - delay field Tpath in the RREQ according to the formulas T path =T path +T packet and hops = hops + 1, and record the path - hop number and the path - delay locally as hops_local and Tpath_local respectively, then jump to Step 5; Step 4.2, when the intermediate node has received an RREQ with the same RREQ_ID, extract the path - hop number field hops and the path - delay field Tpath in the RREQ, and calculate the updated Tpath and hops of the new RREQ according to the formulas T path =T path +T packet and hops = hops + 1; Step 4.3, if hops>hops_local, then discard this RREQ and jump to Step 6; Step 4.4, otherwise if T path ≥T path _local, then discard this RREQ and jump to Step 6; Step 4.5, otherwise update the path - hop number field hops and the path - delay field Tpath in the RREQ, and record the path - hop number and the path - delay locally as hops_local and Tpath_local respectively.

[0049] Based on the content of the above device embodiment, as an optional embodiment, the AODV routing protocol optimization device of the LoRa sensor network provided in the embodiment of the present invention further includes: a fifth submodule for implementing step 5 specifically including: step 5.1, based on the routing overhead optimization strategy, according to the number of its neighbor nodes Nn and the distance between the intermediate node and the neighbor node greater than d min The number of neighbor nodes N d According to the formula Calculate the probability P of the intermediate node forwarding the broadcast RREQ rb ; Step 5.2, based on the energy balance strategy, according to the formula Calculate the probability P of the intermediate node forwarding the broadcast RREQ rb ,in E th1 =E max ×a, a is 0.8; Step 5.3, if N n ≤4, then the intermediate nodes follow the probability P rb Forward broadcast RREQ; if N n >4 and N d ≤4, the intermediate node has a distance greater than d from all neighboring nodes min Neighbor nodes forward the broadcast RREQ to 4-N d broadcast RREQ to other neighbor nodes; otherwise <N d ×P rb >The distance between the neighbor nodes is greater than d min Neighbor nodes forward the broadcast RREQ.

[0050] The method of the embodiment of the present invention is implemented by electronic devices, so it is necessary to introduce the relevant electronic devices. Based on this purpose, the embodiment of the present invention provides an electronic device, such as Figure 3 As shown, the electronic device includes: at least one processor, a communications interface, at least one memory, and a communications bus, wherein the at least one processor, the communications interface, and the at least one memory communicate with each other via the communications bus. The at least one processor can call logic instructions in the at least one memory to execute all or part of the steps of the methods provided in the aforementioned method embodiments.

[0051] In addition, the logic instructions in the at least one memory mentioned above can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each method embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0052] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0053] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.

[0054] The flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. Based on this understanding, each box in the flowchart or block diagram can represent a module, program segment or part of the code, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, or sometimes in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0055] It should be noted that the terms "comprise," "include," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, the elements defined by the phrase "comprise..." do not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising the elements.

[0056] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for optimizing the AODV routing protocol in a LoRa sensor network, characterized in that: include: Step 1: Initialize the parameters; Step 2: Count the number of neighbor nodes N of the source node n The distance between the source node and the neighbor node is greater than d min The number of neighbor nodes N d The source node performs probability P on the forwarding probability field in the RREQ message based on the routing cost optimization strategy. rb Assignment, the source node according to the probability P rb Broadcast RREQ; Step 3, the intermediate node receives RREQ, first based on the energy balance strategy according to the node's remaining energy E to determine whether the node participates in forwarding RREQ, if it cannot forward, the node discards the RREQ, otherwise calculates the parameter single-hop transmission delay Tpacket; Step 4, the intermediate node determines whether it has received RREQ with the same RREQ_ID, if not, the node responds to RREQ, otherwise the AODV routing protocol is not used to directly discard the RREQ, but to respond to the RREQ with a shorter path delay; Step 5, determine whether the node is the destination node, if so, jump to step 7, otherwise update the probability P based on the routing cost optimization strategy and energy balance strategy. rb And according to the probability P rb Forward the broadcast RREQ; Step 6, repeat steps 3 to 5 for other intermediate nodes; Step 7, reply with the routing response RREP and establish a reverse route.

2. The AODV routing protocol optimization method of the LoRa sensor network according to claim 1, wherein Step 1 specifically includes: Step 1.1, set the default SF of all LoRa nodes to 9, CR to 4 / 5, BW to 125KHz, add local record path hops_local and path delay Tpath_local, and the initial value is 0; Step 1.2, according to the formula Calculate the LoRa communication distance d corresponding to different spreading factors within the line of sight and without electromagnetic interference, where P t is the transmitting power of the transmitter, P r is the receiving sensitivity of the receiving end, G t is the antenna gain at the transmitter, G r is the antenna gain at the receiving end, f is the operating frequency, L c is the feeder insertion loss of the transmitting antenna, L0 is the air propagation loss caused by the environment, and the receiving sensitivity P r It takes different values according to different spreading factors SF; Step 1.3, let d min =k×d SF=6 , where d SF=6 is the communication distance of LoRa when SF=6, Step 1.4: Add the forwarding probability field P to the RREQ message. rb and path delay field Tpath and are both set to 0.

3. The AODV routing protocol optimization method of the LoRa sensor network according to claim 2, wherein Step 2 specifically includes: Step 2.1, if N n ≤4, then there are few neighbor nodes, let the probability P rb =1, all neighboring nodes of the source node broadcast RREQ; Step 2.2, if N n >4 and N d ≤4, let The number of forwarding nodes is 4, where the source node is connected to all neighboring nodes whose distance is greater than d. min Neighbor nodes broadcast RREQ to 4-N d Other neighbor nodes broadcast RREQ; Step 2.3, if 4 <N d ≤N th , then it has many neighbor nodes, which reduces the forwarding probability, and let P rb =P2, where P2 is 0.7, N th Take 12, the source node pair <N d ×P rb >The distance between the neighbor nodes is greater than d min Neighbor nodes broadcast RREQ; Step 2.4, if N d >N th , indicating that there are many neighbor nodes, which reduces the forwarding probability. Let P rb =P min , P min Take 0.3 to ensure that all LoRa nodes still have forwarding function in the network and will not become dead nodes; the source node <N d ×P rb >The distance between the neighbor nodes is greater than d min The neighboring nodes broadcast RREQ, where the symbol < > represents the rounding-up operation.

4. The AODV routing protocol optimization method of the LoRa sensor network according to claim 3, wherein Step 3 specifically includes: Step 3.

1. If E < E th2 then the remaining energy of the node is low. Acting as an intermediate node will increase the energy consumption of this node. Therefore, discard this RREQ and jump to Step 6, where E th2 = E max ×0.5, and E max is the full-scale energy of the battery; Step 3.

2. If E > E th2 then obtain the demodulation signal-to-noise ratio SNR of the LoRa node, and determine the best SF for the previous-hop node to communicate with itself according to the demodulation signal-to-noise ratio threshold of LoRa. If -5dB ≤ SNR, then SF = 6; if -5 < SNR ≤ -7.5dB, then SF = 7; if -7.5 < SNR ≤ -10dB, then SF = 8; if -10 < SNR ≤ -12.5dB, then SF = 9; if -12.5 < SNR ≤ -15dB, then SF = 10; if -15 < SNR ≤ -17.5dB, then SF = 11; if -17.5 < SNR ≤ -20dB, then SF = 12; Step 3.

3. Calculate the single-hop transmission delay Tpacket at this SF, where LoRa symbol rate N payload is the payload length, and N preamble [[]]is the preamble length.

5. The AODV routing protocol optimization method of the LoRa sensor network according to claim 4, wherein Step 4 specifically includes: Step 4.1, the intermediate node has not received the RREQ with the same RREQ_ID, extracts the path hop count field hops and path delay field Tpath in the RREQ, and uses the formula T path =T path +T packet Update the path hop count field hops and path delay field Tpath in RREQ with hops=hops+1, and record the path hop count and path delay locally as hops_local and Tpath_local respectively, and jump to step 5; Step 4.2, the intermediate node has received the RREQ with the same RREQ_ID, extracts the path hop count field hops and path delay field Tpath in RREQ, and calculates the path hop count field hops and path delay field Tpath according to the formula T path =T path +T packet and hops=hops+1 to calculate the updated Tpath and hops of the new RREQ; Step 4.3, if hops>hops_local, discard the RREQ and jump to step 6; Step 4.4, otherwise if T path ≥T path _local, discard the RREQ and jump to step 6; Step 4.5, otherwise update the path hop count field hops and path delay field Tpath in the RREQ, and record the path hop count and path delay locally as hops_local and Tpath_local respectively.

6. The AODV routing protocol optimization method for the LoRa sensor network according to claim 5, wherein Step 5 specifically includes: Step 5.1, based on the routing cost optimization strategy, according to the number of its neighbor nodes Nn and the distance between the intermediate node and the neighbor node greater than d min The number of neighbor nodes N d According to the formula Calculate the probability P of the intermediate node forwarding the broadcast RREQ rb ; Step 5.2, based on the energy balance strategy, according to the formula Calculate the probability P of the intermediate node forwarding the broadcast RREQ rb ,in E th1 =E max ×a, a is 0.8; Step 5.3, if N n ≤4, then the intermediate nodes follow the probability P rb Forward broadcast RREQ; if N n >4 and N d ≤4, the intermediate node has a distance greater than d from all neighboring nodes min Neighbor nodes forward the broadcast RREQ to 4-N d broadcast RREQ to other neighbor nodes; otherwise <N d ×P rb >The distance between the neighbor nodes is greater than d min Neighbor nodes forward the broadcast RREQ.

7. An AODV routing protocol optimization device for a LoRa sensor network, characterized in that: include: The first main module is used to implement step 1, initializing the parameters; step 2, counting the number of neighbor nodes N of the source node n The distance between the source node and the neighbor node is greater than d min The number of neighbor nodes N d The source node performs probability P on the forwarding probability field in the RREQ message based on the routing cost optimization strategy. rb Assignment, the source node according to the probability P rb Broadcast RREQ; The second main module is used to implement step 3. When the intermediate node receives the RREQ, it first determines whether the node participates in forwarding the RREQ based on the remaining energy E of the node based on the energy balancing strategy. If it cannot be forwarded, the node discards the RREQ, otherwise it calculates the parameter single-hop transmission delay Tpacket; The third main module is used to implement step 4. The intermediate node determines whether it has received the RREQ with the same RREQ_ID. If it has not received it, the node responds to the RREQ. Otherwise, the AODV routing protocol is not used to directly discard the RREQ, but to respond to the RREQ with a shorter path delay; The fourth main module is used to implement step 5. Determine whether the node is the destination node. If so, jump to step 7. Otherwise, update the probability P based on the routing cost optimization strategy and the energy balancing strategy. rb And according to the probability P rb Forward the broadcast RREQ; Step 6, repeat steps 3 to 5 for other intermediate nodes; Step 7, reply with the routing response RREP and establish a reverse route.

8. An electronic device, characterized in that: include: At least one processor, at least one memory and a communication interface; wherein, The processor, memory and communication interface communicate with each other; The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium stores computer instructions, which cause the computer to execute the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • AODV routing protocol optimization method based on distance estimation

    CN106792975A

  • AODV dynamic delay routing method based on energy aware

    CN107949027A