LoRa tree networking method, device and equipment
By calculating the delayed response time, determining the optimal path of the LoRa network and locking it, the system congestion and power consumption problems caused by excessive routing and forwarding are solved, and the performance and communication success rate are improved.
Patent Information
- Application Number
- CN202410983540.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-07-22
AI Technical Summary
When LoRa builds a tree network, routing and forwarding simultaneously lead to system congestion, performance degradation, increased packet loss rate and increased power consumption.
By calculating the delay response time of routing depth, signal-to-noise ratio and signal strength, the optimal path is determined and locked in the early stage of networking, the optimal path is forwarded to reduce invalid routing forwarding and improve system performance.
It effectively reduces the number of data forwarding times, improves system performance, reduces power consumption, improves communication success rate, and avoids data storms and miswave nodes.
Smart Images

Figure CN119052956A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of LoRa technology, and in particular to a method, device and equipment for LoRa tree networking. Background Art
[0002] LoRa is a low-power long-range wireless communication technology, where "LoRa" is the abbreviation of Long Range Radio. Its biggest feature is that it can transmit farther than other wireless methods under the same power consumption conditions, achieving the unity of low power consumption and long distance. It can extend the communication distance 3-5 times that of traditional wireless radio frequency under the same power consumption.
[0003] In many application scenarios, there are a lot of obstructions or the distance between the node and the gateway is too far to communicate directly. In this case, it is necessary to add a route between the node and the gateway. The network formed after the addition is a tree network, which includes gateways, routes, and nodes. The gateway serves as the management center and data center of the network. It can access the platform through the Internet to achieve remote monitoring and remote control, and can form a tree network structure through LoRa. The router is a node with data forwarding function. By expanding the number of routes, the coverage of the LoRa system can be effectively expanded. The access method of the router is the same as that of the node. The node is generally used as a terminal for data collection, reporting, receiving downlink data and making corresponding controls, and does not have data forwarding function.
[0004] In the prior art, when a tree network is established, after a node sends a network request, the router that receives the network request will forward the network request after determining that it is not the destination address until it is forwarded to the gateway. Finally, the gateway selects the optimal path and sends the network response information to the node along the path, thereby completing the establishment of the tree network. In this way, it is easy for LoRa to forward the routes at the same time when establishing a tree network, resulting in excessive forwarding in the system, leading to system congestion, performance degradation, increased packet loss rate, and increased power consumption. Summary of the invention
[0005] In view of this, the purpose of the present invention is to propose a LoRa tree networking method, device and equipment, which can solve the problems of LoRa routing and forwarding simultaneously when forming a tree network, resulting in excessive forwarding in the system, leading to system congestion, performance degradation, increased packet loss rate and increased power consumption.
[0006] According to one aspect of the present invention, a method for LoRa tree networking is provided, the method comprising:
[0007] The gateway or router receives the node network request packet and calculates the delayed response time based on the routing depth, signal-to-noise ratio, and signal strength. The delayed response time calculation formula is:
[0008] delay=(d+1)*100-5*SNR+|RSSI| / 5
[0009] Where, delay is the delayed response time in milliseconds; d is the routing depth; SNR is the signal-to-noise ratio; RSSI is the signal strength;
[0010] If the network type data of the node is received during the delayed response time, the locking is abandoned; otherwise, a network locking packet is sent to the node.
[0011] In the above technical scheme, the locking is completed at the initial stage of network addition, and there is only one optimal path to the gateway afterwards. This process achieves as few false awakenings of nodes as possible, which is beneficial to improving the low power consumption performance of the system. The present invention proposes a method for LoRa tree networking, which relates to the fields of low-power wide area network, Internet of Things, wireless networking, etc., and solves the problems that when LoRa forms a tree network, the routing is forwarded at the same time, which leads to excessive forwarding in the system, resulting in system congestion, performance degradation, increased packet loss rate and increased power consumption. The method has locked the routing of the optimal path at the source of the networked node, avoiding invalid routing forwarding. The routing is forwarded for network addition only after the routing is locked. Finally, there is only one optimal path to forward the network addition request to the gateway, effectively reducing the number of forwarding times and improving system performance.
[0012] In some embodiments, the gateway or router receives a node network joining request packet, and then further includes:
[0013] Determine whether the signal-to-noise ratio and signal strength are less than the specified minimum limit value. If so, do not participate in forwarding.
[0014] In the above technical solution, it is first determined whether the signal-to-noise ratio (SNR) and signal strength (RSSI) are less than the specified minimum limit value. If so, it means that the signal quality is poor and subsequent communications may be unstable, so forwarding is not involved to prevent the use of paths with poor signal quality from causing subsequent communication instability.
[0015] In some embodiments, sending a network lock packet to a node further includes:
[0016] If the network lock confirmation packet of the node is not received within the timeout period, the network joining process is exited; if the router receives the network lock confirmation packet of the node, it reports the network joining request to the gateway according to its own path to the gateway; when the gateway receives the network forwarding packet, it returns along the original reported path.
[0017] In the above technical solution, the path selection is sunk to the first level of nodes and routes, and the locking is completed at the node end. After that, only the successfully locked routes will be forwarded, which effectively reduces the number of data forwarding times.
[0018] In some embodiments, the method specifically:
[0019] If the node can communicate directly with the gateway, the steps are as follows:
[0020] The node initiates a network joining request packet, and the gateway and several other routers receive the network joining request at the same time. The routing depth of the gateway is zero, and the delayed response time is as follows:
[0021] GW=100-5*SNR+|RSSI| / 5 <R i =(d+1)*100-5*SNR+|RSSI| / 5
[0022] In the formula, GW is the gateway, R i is the i-th route.
[0023] The gateway puts the assigned address and path into the network joining response packet and sends it out. The other routers give up the network joining lock after receiving the network joining response. Meanwhile, node E receives the network joining response.
[0024] After receiving the gateway network joining response packet, the node obtains the short address and the path to the gateway, and the gateway also adds node E and the path to the tree network.
[0025] In the above technical solution, there are mainly two situations when joining the network, namely, being able to communicate directly with the gateway and being unable to communicate directly with the gateway. The above solution provides a situation in which the node can communicate directly with the gateway.
[0026] In some embodiments, if the node cannot communicate directly with the gateway, the steps are as follows:
[0027] The node sends a node-initiated network joining request packet. Several routes receive the network joining request at the same time. The priority of several routes is determined by the delayed response time.
[0028] The route with the highest priority sends a network locking packet, and the other routes exit the network joining process after receiving the network locking packet or locking response packet; after the node receives the network locking packet from the route with the highest priority, it sends a network locking confirmation packet to complete the locking.
[0029] In the above technical solution, there are mainly two situations when joining the network, namely, being able to communicate directly with the gateway and being unable to communicate directly with the gateway. The above solution provides a situation where the node cannot communicate directly with the gateway.
[0030] In some embodiments, a screen lock confirmation packet is given to complete the lock, and then the following steps are further included:
[0031] After receiving the network lock confirmation packet, the router with the highest priority learns that it has successfully locked with the node, and then reports the network lock request packet to the gateway step by step through unicast along its own path to the gateway;
[0032] After receiving the network joining request packet, the gateway puts the assigned short address and path into the network joining response packet and transmits it to the node level by level through unicast;
[0033] After receiving the gateway network joining response packet, the node obtains the short address and the path to the gateway, and the gateway also adds node E and the path to the tree network.
[0034] In the above technical scheme, the present invention completes the locking of the upper-level route at the first level of nodes and routes, and other routes will also complete actions such as giving up locking or attempting to lock in a short time. When the gateway responds to the network acceptance packet, the network request and locking packet of the node no longer exist in the system, which greatly improves the communication success rate and enhances the system performance.
[0035] According to another aspect of the present invention, a LoRa tree networking device is provided, based on the above method; comprising:
[0036] Analysis module: used for gateway or router to receive node network request packet, calculate delayed response time through routing depth, signal-to-noise ratio, and signal strength. The delayed response time calculation formula is:
[0037] delay=(d+1)*100-5*SNR+|RSSI| / 5
[0038] Where, delay is the delayed response time in milliseconds; d is the routing depth; SNR is the signal-to-noise ratio; RSSI is the signal strength;
[0039] The locking module is used to abandon the locking if the network type data of the node is received during the delayed response time; otherwise, send a network locking packet to the node.
[0040] In the above technical scheme, in order to better use the above method, the present application proposes a LoRa tree networking device, each module corresponds to each step of the above method, and its specific principles have been described above and will not be repeated here.
[0041] According to another aspect of the present invention, a LoRa tree networking device is provided, comprising:
[0042] at least one processor and a memory communicatively coupled to the at least one processor;
[0043] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the above method.
[0044] In the above technical solution, in order to better run and process the method, the above method is stored in a memory, and the stored method is executed by a processor. It should be noted that the principle and effect of each step have been described above and will not be described in detail here.
[0045] According to another aspect of the present invention, a computer-readable storage medium is provided, storing a computer program, wherein the computer program implements the above method when executed by a processor.
[0046] In the above technical solution, in order to better run and use the method, the above method is stored in a computer-readable storage medium, and the above method is implemented by a processor. It should be noted that the principle and effect of each step have been described above and will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative work.
[0048] Figure 1 It is a flow chart of an embodiment of a method for forming a LoRa tree network according to the present invention;
[0049] Figure 2 It is a LoRa tree network topology diagram of an embodiment of a LoRa tree networking method of the present invention;
[0050] Figure 3 This is a specific example diagram of an embodiment of a LoRa tree networking method of the present invention;
[0051] Figure 4 This is a communication example diagram of a LoRa tree networking method according to an embodiment of the present invention that can directly communicate with a gateway;
[0052] Figure 5 This is a communication example diagram of an embodiment of a LoRa tree networking method of the present invention that cannot directly communicate with a gateway;
[0053] Figure 6 It is a structural diagram of an embodiment of a LoRa tree networking device of the present invention. DETAILED DESCRIPTION
[0054] The present invention will be further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present invention, but are not intended to limit the scope of the present invention. Similarly, the following examples are only partial embodiments of the present invention rather than all embodiments, and all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of the present invention.
[0055] The present invention provides a LoRa tree networking method, device and equipment, which can solve the problems of simultaneous routing and forwarding in the LoRa tree network, resulting in excessive forwarding in the system, leading to system congestion, performance degradation, increased packet loss rate and increased power consumption.
[0056] After receiving the network addition request, the routing of the original method will forward the network addition data. At this time, there will be a large number of data forwarding packets in the LoRa network. Many nodes are low-power battery-powered devices, which will be mistakenly awakened when receiving the routing forwarding packet, which greatly increases the power consumption and reduces the battery life. A large number of data forwarding packets may form a data storm. If a node needs to report emergency alarm data at this time, it is very likely that the packet will be lost or delayed for a long time before it can successfully reach the platform, causing losses. The fundamental reason for this shortcoming is that the original technology completely puts the right to choose the path on the gateway side. Then the routing that receives the network addition request has no right to make an operation, and the network addition request packet will be forwarded to the upper-level routing until it is forwarded to the gateway. In this process, many network addition data forwarding packets will inevitably appear. Due to the low communication rate of LoRa, each communication takes a long time. If there are too many forwarded data packets in the system, a large number of data collisions, delayed transmission, and even data storms will occur. Based on this phenomenon, please read the following embodiments in detail.
[0057] Embodiment 1
[0058] See also Figure 1 , a LoRa tree networking method, the method comprising:
[0059] S1. The gateway or router receives the node network request packet and calculates the delayed response time based on the routing depth, signal-to-noise ratio, and signal strength. The delayed response time calculation formula is:
[0060] delay=(d+1)*100-5*SNR+|RSSI| / 5
[0061] Wherein, delay is the delayed response time in milliseconds; d is the routing depth; SNR is the signal-to-noise ratio; RSSI is the signal strength; the gateway or router receives the network joining request packet, where the network joining request packet may be the router or node to be joined.
[0062] In this embodiment, the gateway or router receives the node network request packet, and then further includes:
[0063] Determine whether the signal-to-noise ratio and signal strength are less than the specified minimum limit value. If so, do not participate in forwarding. First determine whether the signal-to-noise ratio (SNR) and signal strength (RSSI) are less than the specified minimum limit value. If so, it means that the signal quality is poor and subsequent communication may be unstable. Do not participate in forwarding to prevent the use of a path with poor signal quality from causing subsequent communication instability.
[0064] S2. If the node's locking information or other networking type data (which may be a networking response or node locking confirmation packet type data directly given by the gateway) is received during the delayed response time, the locking is abandoned; otherwise, a networking locking packet is sent to the node.
[0065] In this embodiment, the network locking packet is sent to the node, and then the following steps are further included:
[0066] S4. If the network lock confirmation packet of the node is not received within the timeout period, the network joining process is exited; if the router receives the network lock confirmation packet of the node, it reports the network joining request to the gateway according to its own path to the gateway; when the gateway receives the network joining forwarding packet, it returns along the original path reported.
[0067] In this embodiment, the path selection is sunk to the first level of nodes and routes, and the locking is completed at the node end. After that, only the successfully locked routes will be forwarded, which effectively reduces the number of data forwarding times.
[0068] In this embodiment, the present invention sinks the optimal path selection to the route near the node, calculates the waiting time through the delayed response algorithm, and gives a response earlier with a higher priority to obtain the locking authority. The route and the node are locked at the first level, and the route that fails to be locked will no longer forward the network data, and will only forward the network request from the route that is successfully locked to the gateway. After receiving the network request, the gateway returns the network response packet to the node along the original path, thereby completing the allocation of the node short address and data communication link. In this network process, only the route that is successfully locked with the node will perform subsequent network forwarding, and other routes will no longer forward, which effectively reduces the number of forwarding and reduces the probability of false awakening of the node, thereby improving the overall performance of the system.
[0069] In this embodiment, the method is specifically divided into two cases, one is that the node can communicate directly with the gateway, and the other is that the node cannot communicate directly with the gateway. The steps of the two methods are as follows:
[0070] (1) Nodes can communicate directly with the gateway
[0071] A1. The node initiates a network joining request packet. The gateway and several other routers receive the network joining request at the same time. The routing depth of the gateway is zero. The delayed response time is as follows:
[0072] GW=100-5*SNR+|RSSI| / 5 <R i =(d+1)*100-5*SNR+|RSSI| / 5
[0073] In the formula, GW is the gateway, R i is the i-th route. The gateway’s routing depth is zero, and the waiting time should be the shortest so that it can give the first response, and the priority is the highest.
[0074] A2. The gateway puts the assigned address and path into the network joining response packet and sends it out. The other routers give up the network joining lock after receiving the network joining response. Meanwhile, node E receives the network joining response.
[0075] A3. After receiving the gateway network joining response packet, the node obtains the short address and the path to the gateway. The gateway also adds node E and the path to the tree network.
[0076] (2) Nodes cannot communicate directly with the gateway
[0077] B1. The node sends a node-initiated network joining request packet. Several routes receive the network joining request at the same time. The priority of several routes is determined by the delayed response time.
[0078] B2. The highest priority route sends a network lock packet, and the other routes exit the network process after receiving the network lock packet or lock response packet; after the node receives the network lock packet from the highest priority route, it sends a network lock confirmation packet to complete the lock. The reason why it is a network lock packet or lock response packet is that if the node is between two gateways, the gateways cannot receive each other's data, but can communicate with the node, so it may give up the lock after receiving the lock response packet sent by the node.
[0079] In this embodiment, in the second case, a screen locking confirmation packet is given to complete the locking, and then the following steps are further included:
[0080] B21, after receiving the network lock confirmation packet, the router with the highest priority learns that the node lock is successful, and then reports the network request packet to the gateway step by step through unicast according to the path from itself to the gateway;
[0081] B22. After receiving the network joining request packet, the gateway puts the assigned short address and path into the network joining response packet and transmits it to the node level by level through unicast;
[0082] B23. After receiving the gateway network joining response packet, the node obtains the short address and the path to the gateway. The gateway also adds node E and the path to the tree network.
[0083] In this embodiment, the locking of the upper level route is completed at the first level of the node and the route, and other routes will also complete the actions of giving up the lock or trying to lock in a short time. When the gateway responds to the network acceptance packet, the network request and locking packet of the node no longer exist in the system, which greatly improves the communication success rate and enhances the system performance.
[0084] In this embodiment, the present invention proposes a method for LoRa tree networking, which involves the fields of low-power wide area network, Internet of Things, wireless networking, etc. It solves the problem that when LoRa forms a tree network, the routing is forwarded at the same time, which leads to excessive forwarding in the system, resulting in system congestion, performance degradation, increased packet loss rate and increased power consumption. The method has locked the route of the optimal path at the source of the network node, avoiding invalid route forwarding. The route is forwarded only after the route is locked. Finally, there is only one optimal path to forward the network request to the gateway, which effectively reduces the number of forwarding times and improves system performance.
[0085] In order to further explain the specific working principle of the present invention, the following will be described in detail:
[0086] See also Figure 2 , this figure is a LoRa tree network topology diagram, which includes three roles, namely gateway, router, and node. The gateway is the management center and data center of the network. The data of the router and the node need to interact with the platform through the Internet through the gateway. The communication address and path of the node and the router are allocated by the gateway. The router is a node with data forwarding function. The router and the node are added to the network in the same way. Generally, the closer the router is to the gateway, the earlier it is added to the network, so that the optimal network can be built when the tree network is constructed later. Nodes are generally used for data acquisition and remote control terminals. Nodes do not have data forwarding functions and are generally low-power battery-powered devices.
[0087] The existing technology has the following three reasons: LoRa routes and forwards simultaneously when forming a tree network, which leads to excessive forwarding in the system, resulting in system congestion, performance degradation, increased packet loss rate, and increased power consumption.
[0088] (1) The choice of the original technical path lies with the gateway. After receiving a network request, the router will forward the network request until it is forwarded to the gateway. If there are many routes, the system will be full of forwarding packets, which is prone to data storms.
[0089] (2) The original technology is to screen the paths at the gateway end and select the appropriate path for allocation. However, when the gateway sends the network joining response packet, some routes may still be forwarding the network joining request packet. At this time, the data may be lost due to collision in the air, resulting in a decrease in the network joining success rate. In addition, if an emergency event is reported during this process, data may be lost or delayed seriously.
[0090] (3) The routing of the original technology will forward the network request packet after receiving it. Since most nodes are low-power battery-powered devices, a large number of nodes may be woken up by mistake, resulting in increased power consumption and reduced battery life.
[0091] Based on the above three points, the specific beneficial effects of the method proposed by the present invention are as follows:
[0092] (1) The present invention sinks the path selection to the first level of nodes and routes, and completes the locking at the node end. After that, only the routes that are successfully locked will be forwarded, which effectively reduces the number of data forwarding times.
[0093] (2) The present invention completes the locking of the upper-level route at the first level of nodes and routes, and other routes will also complete actions such as giving up locking or attempting to lock in a short time. When the gateway responds to the network acceptance packet, the network request and locking packet of the node no longer exist in the system, which greatly improves the communication success rate and enhances the system performance.
[0094] (3) The present invention completes the locking at the initial stage of network joining, and there is only one optimal path to the gateway afterwards. This process minimizes false awakening of nodes, thereby facilitating the improvement of the low power consumption performance of the system.
[0095] Based on the above three points, the detailed scheme of the present invention is as follows:
[0096] See also Figure 3 , which is a specific example diagram of the present invention, showing the process of calculating the delayed response time and completing the locking process with the node after the gateway or router receives the network joining request packet, and the detailed description is as follows:
[0097] Step 101: A gateway or a router receives a network joining request packet, where the network joining request packet may be a router or a node to be joined.
[0098] Step 102: First determine whether the signal-to-noise ratio (SNR) and signal strength (RSSI) are less than the specified minimum limit value. If so, it means that the signal quality is poor and subsequent communications may be unstable. Do not participate in forwarding to prevent the use of a path with poor signal quality from causing subsequent communication instability.
[0099] Step 103: Calculate the delayed response time by using the routing depth (d), signal-to-noise ratio (SNR), and signal strength (RSSI). The weight priority is d>SNR>RSSI, and the number of hops to the gateway is the depth. The depth d of the gateway is 0, so the gateway has the highest priority. The signal-to-noise ratio (SNR) value may be negative or positive. The larger the value, the shorter the waiting time. The smaller the array, the longer the waiting time and the lower the priority. The signal strength value is negative, and the absolute value is taken during the calculation. The smaller the value, the longer the waiting time and the lower the priority. The delayed response time calculation formula is delay (ms) = (d+1)*100-5*SNR+|RSSI| / 5. If this is a gateway, it will skip the lock and jump directly to step 108 to execute the network response.
[0100] Step 104: If the node receives network lock, lock confirmation, network forwarding, network completion response, etc. from the node while waiting to send the lock packet, it means that a better path than itself has been used for further network operation, then the node abandons the lock and does not participate in the subsequent network process.
[0101] Step 105: If no network lock packet, lock confirmation packet, network forwarding, network completion response, etc. are received during the waiting period, a network lock packet is sent to the node to try to lock with the node.
[0102] Step 106: If the network lock confirmation packet of the node is not received within the timeout period, the network lock process is exited. If the node has successfully locked with another router, it will not respond to other network locks.
[0103] Step 107: After receiving the lock confirmation packet, the router reports the network joining request to the gateway according to the path from itself to the gateway.
[0104] Step 108: When the gateway receives the network forwarding packet, it returns along the original path reported, thus completing the complete process. If the gateway can directly receive the network request packet and the signal quality is good, the gateway skips the locking process and directly sends the network response packet to the node to complete the network process. The gateway also adds the node and path to the tree network.
[0105] In the system, E is a node, GW is a gateway, and R is a router. There are two main situations when joining the network: being able to communicate directly with the gateway and not being able to communicate directly with the gateway. The following describes the network joining process in detail for the two situations:
[0106] (1) Can communicate directly with the gateway
[0107] See also Figure 4 , follow the communication steps as follows:
[0108] Step S-1: Node E initiates a network joining request, and GW, R1, and R2 receive the network joining request at the same time. Assuming that the signal quality meets the specification, the gateway depth is 0, the R1 depth is 1, and the R2 depth is 2, so the response priority should be GW>R1>R2.
[0109] Step S-2: The gateway puts the assigned address and path into a network joining response packet and sends it out. R1 receives the network joining response and gives up the network joining lock. Meanwhile, node E also receives the network joining response.
[0110] Step S-3: R2 is far away from the gateway and cannot receive the network joining response from GW. After the waiting time is reached, R2 will try to lock with E. R2 sends a network joining lock packet to E. Since R2 has a lower priority than GW, when R2 sends the network joining lock packet, E is receiving the network joining confirmation packet or has completed the network joining. Regardless of the status, E will not respond to R2's lock packet. R2 exits the network joining process after the waiting timeout.
[0111] Finally, after receiving the gateway network joining response packet, E obtains the short address and the path to the gateway as E->GW, and the gateway also adds node E and the path to the tree network.
[0112] (2) Cannot communicate directly with the gateway
[0113] See also Figure 5 , which will be described in detail according to the communication sequence number:
[0114] Step S-1: Node E initiates a network request, and R2, R3, and R8 receive the network request packet at the same time. The depth values d of R2 and R3 are 2, and the depth value of R8 is 3. Therefore, R8 has a larger depth value and the longest waiting time. R2 and R3 have the same depth, but R2 has better signal quality. The final priority is R2>R3>R8.
[0115] Step S-2: R2 is given priority to provide a screen lock package by calculation, and R3 can also receive the package sent by R2. R3 is in a waiting state at this time, and exits the screen process after receiving the screen lock package given by R2.
[0116] Step S-3: After receiving the network lock packet sent by R2, the node sends a network lock confirmation packet, thus completing the lock with R2. If the network response packet is not received within the timeout period, the network can be re-initiated.
[0117] Step S-4: After receiving the network lock confirmation packet, R2 knows that the node lock is successful, and then reports the network request packet to the gateway level by level through unicast along its own path to the gateway, and first forwards the network request packet to the upper level router R1.
[0118] Step S-5: After receiving the network joining request forwarded by R2, R1 forwards it to the gateway.
[0119] Step S-6: After receiving the network joining request packet, the gateway puts the assigned short address and path into the network joining response packet and sends it to R1 according to the reported path. The path [GW->R1->R2->E] to node E is added to the tree network to build the network.
[0120] Step S-7: After receiving the completion response packet from GW, R1 forwards it to R2 according to the path.
[0121] Step S-8: After receiving the network joining response forwarding packet from R1, R2 forwards it to node E. At this point, node E completes the network joining request operation and obtains the assigned short address and the communication path to the gateway E->R2->R1->GW.
[0122] Step S-9: After receiving E's network joining request, R8 calculates the delay time, and if it does not receive a network joining response packet, a network joining lock packet, a network joining lock confirmation packet, etc. during the waiting process, it will send a network joining lock packet to E. At this time, E is in the receiving S-2 state or has completed the reception of S-2. Regardless of the state, it will not respond to R8's lock packet. If R8 still does not receive a lock confirmation packet after the waiting timeout, it will exit the network joining process.
[0123] Based on the above detailed steps, it can be known that compared with the original technology, the present invention finds the optimal path and completes the route locking at the beginning of the network addition, and then only forwards from this path to the gateway. The original technology is that the path selection right is in the gateway, and the router forwards after receiving the network addition data until the gateway makes a path selection. The present invention reduces the invalid network addition forwarding of the router, thereby greatly reducing the probability of other nodes being woken up by mistake, thereby improving the battery life of low-power devices. In addition, due to the reduction of data packets in the system, the probability of data collision is reduced, the success rate of network addition is improved, the occurrence of data storms is prevented, and the system performance is improved. In this process, if there is an emergency report, it can also be reported in time and processed in time.
[0124] Embodiment 2
[0125] See also Figure 6 , a LoRa tree networking device, based on the method described in one of the embodiments; comprising:
[0126] Analysis module: used for gateway or router to receive node network request packet, calculate delayed response time through routing depth, signal-to-noise ratio, and signal strength. The delayed response time calculation formula is:
[0127] delay=(d+1)*100-5*SNR+|RSSI| / 5
[0128] Where, delay is the delayed response time in milliseconds; d is the routing depth; SNR is the signal-to-noise ratio; RSSI is the signal strength;
[0129] The locking module is used to abandon the locking if the network type data of the node is received during the delayed response time; otherwise, send a network locking packet to the node.
[0130] In this embodiment, in order to better use the method described in one of the embodiments, the present application proposes a LoRa tree networking device, each module corresponds to each step of the above method, and its specific principles have been described above and will not be repeated here.
[0131] Embodiment 3
[0132] A LoRa tree networking device, comprising:
[0133] at least one processor and a memory communicatively coupled to the at least one processor;
[0134] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the above method.
[0135] In this embodiment, in order to better run and process the method described in one of the embodiments, the above method is stored in a memory, and a processor is used to execute the method described in one of the stored embodiments. It should be noted that the principle and effect of each step have been described above and will not be described in detail here.
[0136] Embodiment 4
[0137] A computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the method described in one of the embodiments is implemented.
[0138] In this embodiment, in order to better run and use the method described in one of the embodiments, the above method is stored in a computer-readable storage medium, and a processor is used to implement the method described in one of the embodiments. It should be noted that the principle and effect of each step have been described above and will not be described in detail here.
[0139] The above descriptions are only some embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any equivalent device or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A LoRa tree networking method, characterized in that: The method comprises: The gateway or router receives the node network request packet and calculates the delayed response time based on the routing depth, signal-to-noise ratio, and signal strength. The delayed response time calculation formula is: delay=(d+1)*100-5*SNR+|RSSI| / 5 Where, delay is the delayed response time in milliseconds; d is the routing depth; SNR is the signal-to-noise ratio; RSSI is the signal strength; If the network type data of the node is received during the delayed response time, the locking is abandoned; otherwise, a network locking packet is sent to the node.
2. A LoRa tree networking method as claimed in claim 1, characterized in that, The gateway or router receives the node joining request packet, which also includes: Determine whether the signal-to-noise ratio and signal strength are less than the specified minimum limit value. If so, do not participate in forwarding.
3. A LoRa tree networking method as claimed in claim 1, characterized in that, Send a network lock packet to the node, followed by: If the network lock confirmation packet of the node is not received within the timeout period, the network joining process is exited; if the router receives the network lock confirmation packet of the node, it reports the network joining request to the gateway according to its own path to the gateway; when the gateway receives the network forwarding packet, it returns along the original reported path.
4. A LoRa tree networking method as claimed in claim 1, characterized in that, The method specifically: If the node can communicate directly with the gateway, the steps are as follows: The node initiates a network joining request packet, and the gateway and several other routers receive the network joining request at the same time. The routing depth of the gateway is zero, and the delayed response time is as follows: GW=100-5*SNR+|RSSI| / 5 <R i =(d+1)*100-5*SNR+|RSSI| / 5 In the formula, GW is the gateway, R i is the i-th route; The gateway puts the assigned address and path into the network joining response packet and sends it out. The other routers give up the network joining lock after receiving the network joining response. Meanwhile, node E receives the network joining response. After receiving the gateway network joining response packet, the node obtains the short address and the path to the gateway, and the gateway also adds node E and the path to the tree network.
5. A LoRa tree networking method as claimed in claim 1, characterized in that, If the node cannot communicate directly with the gateway, the steps are as follows: The node sends a node-initiated network joining request packet. Several routes receive the network joining request at the same time. The priority of several routes is determined by the delayed response time. The route with the highest priority sends a network lock packet, and the remaining routes exit the network process after receiving the network lock packet or lock response packet; After receiving the network locking packet from the highest priority route, the node sends a network locking confirmation packet to complete the locking.
6. A LoRa tree networking method as claimed in claim 5, characterized in that: A screen lock confirmation package is given to complete the lock, followed by: After receiving the network lock confirmation packet, the router with the highest priority learns that it has successfully locked with the node, and then reports the network lock request packet to the gateway step by step through unicast along its own path to the gateway; After receiving the network joining request packet, the gateway puts the assigned short address and path into the network joining response packet and transmits it to the node level by level through unicast; After receiving the gateway network joining response packet, the node obtains the short address and the path to the gateway, and the gateway also adds node E and the path to the tree network.
7. A LoRa tree networking device, characterized in that: A method according to any one of claims 1 to 6; comprising: Analysis module: used for gateway or router to receive node network request packet, calculate delayed response time through routing depth, signal-to-noise ratio, and signal strength. The delayed response time calculation formula is: delay=(d+1)*100-5*SNR+|RSSI| / 5 Where, delay is the delayed response time in milliseconds; d is the routing depth; SNR is the signal-to-noise ratio; RSSI is the signal strength; A locking module: used for giving up locking if the network type data of the node is received during the delayed response time; Otherwise, send a network lock packet to the node.
8. A LoRa tree networking device, characterized in that: include: at least one processor and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as claimed in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Communication terminal and communication method
CN101897153A
Method for building tree-shaped route in wireless Ad Hoc network for power distribution and utilization
CN106604350A
Routing establishment and maintenance method suitable for wireless self-organizing network
CN109673035A
Wireless networking method of power internet of things and terminal
CN113692019A
Calling method, calling terminal and calling system through information and communication network
US20030072302A1
Cited By
Low-power-consumption wireless sensor network data processing method
CN119854922A
LoRa tree network mine positioning system
CN121692051A
