LoRa networking method and system of virtual tree topology structure
Through the combination of virtual tree topology and density clustering algorithm, the dynamic adjustment and autonomous management problems of LoRa network are solved, the coverage is expanded, the capacity and reliability are improved, the resource utilization is optimized, and a more efficient LoRa network is achieved.
Patent Information
- Application Number
- CN202510840880.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-09-16
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing LoRa network networking method lacks dynamic adjustment capabilities, making it difficult to adapt to changes in the network environment and the dynamic nature of node status. The network stability and reliability are insufficient, and there is a lack of effective network partitioning management, resulting in limited network coverage, restricted capacity and unreasonable energy consumption.
The LoRa networking method adopts a virtual tree topology structure. The virtual connection relationship is hierarchically constructed through signal strength and hop count parameters. The density clustering algorithm is combined to divide the autonomous domain. The node with the largest density distribution value and the highest power consumption is selected as the domain management node to realize network autonomous management. The network status information is exchanged through the boundary nodes.
It expands network coverage, improves network capacity and reliability, optimizes network resource utilization, reduces communication energy consumption, and provides a more efficient networking solution.
Smart Images

Figure CN120658619A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of networking technology, and in particular to a LoRa networking method and system with a virtual tree topology structure. Background Art
[0002] With the rapid development of the Internet of Things (IoT), LoRa, a low-power wide area network (LWAN) communication technology, has gained widespread application in smart cities, industrial monitoring, agricultural IoT, and other fields due to its long communication range and low power consumption. LoRa networks typically utilize a star topology, with end nodes communicating directly with a gateway, which in turn connects to a cloud server. However, in complex environments or large-scale deployments, a star topology struggles to meet coverage and network capacity requirements. Therefore, a multi-hop network topology has become an important solution.
[0003] Traditional LoRa network configuration methods suffer from the following major issues: First, existing LoRa network configuration methods mostly employ fixed topologies, lacking dynamic adjustment capabilities and making it difficult to adapt to changes in the network environment and the dynamic nature of node states, resulting in insufficient network stability and reliability. Second, existing networking methods often only consider single factors, such as signal strength or hop count, when selecting nodes and routing, failing to comprehensively consider multiple network parameters. This leads to insufficient network performance optimization and low communication efficiency. Finally, traditional LoRa networks lack effective network partitioning management mechanisms, making them prone to network congestion, load imbalance, and unreasonable energy consumption in large-scale deployment scenarios, impacting the overall network lifecycle and service quality.
[0004] Therefore, a LoRa networking method is needed that can dynamically construct a topology structure according to the network environment, comprehensively consider multiple network parameters for routing selection, and realize network autonomous domain division to improve the network coverage, reliability and energy efficiency. Summary of the Invention
[0005] The embodiments of the present invention provide a LoRa networking method and system with a virtual tree topology structure, which can solve the problems in the prior art.
[0006] A first aspect of an embodiment of the present invention provides a LoRa networking method with a virtual tree topology structure, including: Receive a network access request data packet sent by each LoRa terminal node in the network, wherein the network access request data packet includes a node identifier, a signal strength parameter, and a hop count parameter of the LoRa terminal node that sends the network access request data packet; The LoRa terminal nodes are layered according to the signal strength parameters, and a virtual connection relationship of the layered nodes is constructed, specifically comprising: judging the signal connectivity between the nodes of each layer according to the signal strength parameters, establishing a parent-child relationship between the nodes of each layer according to the principle of minimum number of hops and optimal signal strength, generating a virtual tree topology structure, and sending the connection relationship information of the virtual tree topology structure to each of the LoRa terminal nodes; A spherical search space is set based on the position coordinate information of each of the LoRa terminal nodes, a spatial density contribution value is calculated according to the relative distance between the nodes, and based on the spatial density contribution value, a density clustering algorithm is used to divide the LoRa network into autonomous domains to obtain multiple autonomous domains; In each of the autonomous domains, a node with the largest density distribution value and the highest power consumption is selected as a domain management node, and a node with the best communication quality in an autonomous domain adjacent to the domain management node is selected as a boundary node, and network status information is exchanged between adjacent autonomous domains through the boundary nodes.
[0007] Determining the signal connectivity between nodes at each layer according to the signal strength parameter includes: Collect signal attenuation data on the transmission path between the LoRa terminal nodes, and calculate the path loss value between the nodes based on the signal attenuation data; Calculating a path loss correction value according to the product of a preset path loss weight coefficient and the path loss value, and subtracting the path loss correction value from the signal strength value corresponding to the signal strength parameter to obtain an initial connectivity value; The Euclidean distance value between nodes is calculated based on the geographic location information of the LoRa terminal node; the distance attenuation exponential function value is calculated according to the preset distance attenuation coefficient and the Euclidean distance value, and the initial connectivity value is multiplied by the distance attenuation exponential function value to obtain the signal connectivity between nodes.
[0008] Establishing a parent-child relationship between nodes at each layer according to the principle of minimum hop number and optimal signal strength, generating a virtual tree topology structure, and sending connection relationship information of the virtual tree topology structure to each of the LoRa terminal nodes includes: Each layer of nodes includes first-layer nodes, second-layer nodes, and third-layer nodes; The first-layer node is set as a root node, and second-layer candidate nodes with a hop count of 1 to the root node are screened based on the hop count information; a node with the greatest signal strength to the root node is selected from the second-layer candidate nodes as a child node of the root node, and a first parent-child connection relationship is established between the root node and the child node; For each set of child nodes that have established the first parent-child connection relationship with the root node as the second-layer node, screen out third-layer candidate nodes with a hop count of 1 to the second-layer node based on the hop count information; select a node with the greatest signal strength to the second-layer node from the third-layer candidate nodes as a child node of the second-layer node, and establish a second parent-child connection relationship between the second-layer node and the child node; Generate a virtual tree topology structure including the first parent-child connection relationship and the second parent-child connection relationship, wherein the connection relationship information of the virtual tree topology structure includes parent node identification information and child node identification information of each node; Send connection relationship information of the virtual tree topology structure to each of the LoRa terminal nodes in the network.
[0009] A spherical search space is set based on the position coordinate information of each LoRa terminal node, and a spatial density contribution value is calculated according to the relative distance between nodes. Based on the density contribution value, a density clustering algorithm is used to divide the LoRa network into autonomous domains, and multiple autonomous domains are obtained, including: Constructing an initial spherical search space centered on the location coordinate information of each LoRa terminal node, setting a radius value of the initial spherical search space based on the node communication range, dividing the initial spherical search space into a plurality of concentric spherical layers, and increasing the radius of each concentric spherical layer according to a preset step size; Counting the number of nodes in each of the concentric spherical layers to obtain a spherical layer node density value, and taking the spherical layer radius where the spherical layer node density value has an inflection point as the optimal search radius; Constructing an optimized spherical search space according to the optimal search radius, and calculating a spatial density contribution value based on the relative distance between nodes in the optimized spherical search space, specifically comprising: calculating the distance between any two nodes in the spherical search space, substituting the distance value into a Gaussian kernel function to obtain a density contribution value; Based on the density contribution value, a density clustering algorithm is used to divide the LoRa network into autonomous domains to obtain multiple autonomous domains.
[0010] Based on the density contribution value, the density clustering algorithm is used to divide the LoRa network into autonomous domains, and multiple autonomous domains are obtained, including: Accumulating the density contribution values of all node pairs in the optimized spherical search space to obtain a local density value of the central node; calculating the minimum distance between the central node and other nodes with higher local density values to obtain a relative distance value of the central node; Multiplying the local density value by the relative distance value to obtain a clustering index value of the node; and using an adaptive threshold selection algorithm to select nodes with clustering index values greater than an adaptive threshold as density clustering centers based on distribution characteristics of the clustering index value; The Mahalanobis distance between the non-density clustering center point and each of the density clustering center points is calculated, and each of the non-density clustering center points is divided into an autonomous domain where the nearest density clustering center point is located based on the Mahalanobis distance.
[0011] In each of the autonomous domains, selecting a node with the largest density distribution value and the highest power consumption as a domain management node, selecting a node with the best communication quality in an autonomous domain adjacent to the domain management node as a boundary node, and exchanging network status information between adjacent autonomous domains through the boundary node includes: Collecting network status data of each node in the autonomous domain, and calculating a node density distribution value based on the network status data, wherein the node density distribution value is obtained by comprehensively calculating data flow, number of connections, and density of node distribution within the node neighborhood; Performing energy consumption detection on each node in the autonomous domain, wherein the energy consumption detection includes computing and processing energy consumption, data storage energy consumption, and communication transmission energy consumption, and obtaining a power consumption energy value of the node according to the detection result; Perform node scoring according to the density distribution value and the power consumption energy value, and select the node with the largest density distribution value and the highest power consumption energy value as the domain management node of the autonomous domain; Detecting the communication quality of each node in other autonomous domains adjacent to the domain management node, the communication quality including channel quality, transmission delay, and link stability, and calculating the communication quality score of the node based on the detection results of the communication quality; Selecting the node with the highest communication quality score as a boundary node of an adjacent autonomous domain, wherein the boundary node is used to exchange network status information with the domain management node; The border node collects network status information of the autonomous domain, and transmits the network status information to the border node of the adjacent autonomous domain through the border node, thereby realizing the exchange of network status information between autonomous domains.
[0012] A second aspect of an embodiment of the present invention provides a LoRa networking system with a virtual tree topology, including: The first unit is configured to receive a network access request data packet sent by each LoRa terminal node in the network, wherein the network access request data packet includes a node identifier, a signal strength parameter, and a hop count parameter of the LoRa terminal node that sends the network access request data packet; The second unit is used to hierarchize the LoRa terminal nodes according to the signal strength parameters and construct a virtual connection relationship between the hierarchical nodes, specifically including: judging the signal connectivity between the nodes of each layer according to the signal strength parameters, establishing a parent-child relationship between the nodes of each layer according to the principle of minimum number of hops and optimal signal strength, generating a virtual tree topology structure, and sending the connection relationship information of the virtual tree topology structure to each of the LoRa terminal nodes; The third unit is used to set a spherical search space based on the position coordinate information of each of the LoRa terminal nodes, calculate the spatial density contribution value according to the relative distance between the nodes, and divide the LoRa network into autonomous domains based on the spatial density contribution value using a density clustering algorithm to obtain multiple autonomous domains; The fourth unit is used to select the node with the largest density distribution value and the highest power consumption energy in each of the autonomous domains as the domain management node, select the node with the best communication quality in the autonomous domain adjacent to the domain management node as the boundary node, and exchange network status information between adjacent autonomous domains through the boundary nodes.
[0013] According to a third aspect of an embodiment of the present invention, an electronic device is provided, including: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0014] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0015] The beneficial effects of this application are as follows: The present invention hierarchizes LoRa terminal nodes by signal strength parameters and constructs virtual connection relationships between hierarchical nodes to form a virtual tree topology. This avoids the problems of limited network coverage and capacity caused by the star topology in traditional LoRa networks, expands network coverage, and improves network capacity.
[0016] The present invention sets a spherical search space based on the location coordinate information of the terminal nodes and adopts a density clustering algorithm to divide the LoRa network into autonomous domains, thereby realizing self-organizing management of the network, reducing the complexity of network management, and improving the scalability and flexibility of the network.
[0017] The present invention selects the node with the largest density distribution value and the highest power consumption as the domain management node, and realizes information exchange between adjacent autonomous domains through boundary nodes, thereby optimizing the utilization of network resources, reducing the energy consumption of network communication, and improving the stability and reliability of the network, providing a more efficient networking solution for LoRa networks in Internet of Things applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 Schematic diagram of the process of the LoRa networking method of the virtual tree topology structure according to the embodiment of the present invention; Figure 2 This is a bar chart comparing the LoRa terminal node signal connectivity analysis in an embodiment of the present invention; Figure 3 This is a flowchart of the division of LoRa network autonomous domains based on the spherical search space according to an embodiment of the present invention; Figure 4 This is a bar chart comparing the performance of LoRa network autonomous domain division based on density clustering in an embodiment of the present invention; Figure 5 This is a diagram of the virtual tree network topology structure of an embodiment of the present invention. DETAILED DESCRIPTION
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 efforts shall fall within the scope of protection of the present invention.
[0020] The following specific embodiments are used to describe the technical solution of the present invention in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0021] Figure 1 Schematic diagram of the flow of the LoRa networking method of the virtual tree topology structure according to the embodiment of the present invention, as shown in FIG. Figure 1 As shown, the method includes: Receive a network access request data packet sent by each LoRa terminal node in the network, wherein the network access request data packet includes a node identifier, a signal strength parameter, and a hop count parameter of the LoRa terminal node that sends the network access request data packet; The LoRa terminal nodes are layered according to the signal strength parameters, and a virtual connection relationship of the layered nodes is constructed, specifically comprising: judging the signal connectivity between the nodes of each layer according to the signal strength parameters, establishing a parent-child relationship between the nodes of each layer according to the principle of minimum number of hops and optimal signal strength, generating a virtual tree topology structure, and sending the connection relationship information of the virtual tree topology structure to each of the LoRa terminal nodes; A spherical search space is set based on the position coordinate information of each of the LoRa terminal nodes, a spatial density contribution value is calculated according to the relative distance between the nodes, and based on the spatial density contribution value, a density clustering algorithm is used to divide the LoRa network into autonomous domains to obtain multiple autonomous domains; In each of the autonomous domains, a node with the largest density distribution value and the highest power consumption is selected as a domain management node, and a node with the best communication quality in an autonomous domain adjacent to the domain management node is selected as a boundary node, and network status information is exchanged between adjacent autonomous domains through the boundary nodes.
[0022] In an optional implementation, determining the signal connectivity between nodes at each layer according to the signal strength parameter includes: Collect signal attenuation data on the transmission path between the LoRa terminal nodes, and calculate the path loss value between the nodes based on the signal attenuation data; Calculating a path loss correction value according to the product of a preset path loss weight coefficient and the path loss value, and subtracting the path loss correction value from the signal strength value corresponding to the signal strength parameter to obtain an initial connectivity value; The Euclidean distance value between nodes is calculated based on the geographic location information of the LoRa terminal node; the distance attenuation exponential function value is calculated according to the preset distance attenuation coefficient and the Euclidean distance value, and the initial connectivity value is multiplied by the distance attenuation exponential function value to obtain the signal connectivity between nodes.
[0023] Collects signal attenuation data along the transmission path between LoRa end nodes. This process is accomplished by LoRa nodes sending probe signals and receiving feedback signals. Specifically, each LoRa end node in the network periodically sends probe signal packets to surrounding nodes. The probe signal packets contain the sending node's unique identifier and transmit power information.
[0024] After receiving the probe signal, the receiving node records the received signal strength and uses the difference between the received signal strength and the transmit power information as the signal attenuation data. To ensure data accuracy, the system repeatedly collects signal attenuation data multiple times over different time periods and calculates the average value as the final signal attenuation data. For example, if node A sends a 10dBm probe signal to node B and node B receives a -75dBm signal, the signal attenuation from node A to node B is 85dB.
[0025] Based on the collected signal attenuation data, the system calculates the path loss between nodes. This path loss calculation takes into account various environmental factors that affect signal propagation, including terrain, buildings, and weather. Specifically, the system compares the collected signal attenuation data with a standard free-space path loss model to determine the additional loss due to environmental factors. This, combined with the free-space loss, gives the path loss between nodes. In the above example, assuming the standard free-space path loss model calculates a loss of 70dB, the additional loss due to environmental factors is 15dB, for a total path loss of 85dB.
[0026] The system pre-sets a path loss weight factor, which reflects the impact of path loss on signal connectivity. In practice, this factor is typically adjusted based on the characteristics of the network deployment environment. For example, in urban environments with dense buildings, the path loss weight factor is set to 0.8; in open areas, the factor is set to 0.6. The system multiplies the path loss weight factor by the path loss value to obtain a path loss correction value. Continuing with the above example, if the path loss weight factor is 0.7, the path loss correction value is 59.5dB.
[0027] The system obtains the signal strength value corresponding to the signal strength parameter, typically the received signal strength indicator (RSSI) value measured by the receiving node. The path loss correction value is subtracted from the signal strength value to obtain the initial connectivity value. This value reflects the signal connectivity after accounting for path loss. Assuming that the RSSI value of the signal received by node B from node A is -75dBm and the path loss correction value is 59.5dB, the initial connectivity value is -134.5dB.
[0028] Based on the geographic location of the LoRa end nodes, the system calculates the Euclidean distance between them. Geographic location information, which includes the node's longitude, latitude, and altitude, can be obtained through the GPS module. The Euclidean distance is calculated using the distance formula between two points in three-dimensional space, fully accounting for the actual physical distance between the nodes. For example, if node A is located at (116.3, 39.9, 50) and node B is located at (116.4, 40.0, 45), the calculated Euclidean distance is approximately 15.81 kilometers.
[0029] The system has a preset distance attenuation coefficient, which reflects the degree to which distance affects signal attenuation. The distance attenuation coefficient varies in different deployment environments. For example, in urban environments, the distance attenuation coefficient is set to 0.03; in suburban environments, it is set to 0.02; and in rural environments, it is set to 0.01. The system calculates the distance attenuation exponential function value based on the preset distance attenuation coefficient and the Euclidean distance value. Specifically, the distance attenuation exponential function value is equal to the negative of the product of the distance attenuation coefficient and the Euclidean distance value, raised to the power of the natural logarithm base e. For example, if the distance attenuation coefficient is 0.02 and the Euclidean distance value is 15.81 kilometers, the distance attenuation exponential function value is approximately 0.73.
[0030] The system multiplies the initial connectivity value by the distance decay exponential function value to calculate the inter-node signal connectivity. This value takes into account factors such as signal strength, path loss, and distance decay, and more accurately reflects the actual connectivity between nodes. Continuing with the above example, if the initial connectivity value is -134.5dB and the distance decay exponential function value is 0.73, the inter-node signal connectivity is -98.19dB.
[0031] The system sets a signal connectivity threshold to determine whether a valid connection exists between nodes. Typically, this threshold is set at -140dB. If the calculated signal connectivity between nodes exceeds the threshold, a valid connection is considered between the two nodes; otherwise, no valid connection is considered between the two nodes. In the above example, the signal connectivity between the nodes is -98.19dB, which is greater than the -140dB threshold. Therefore, the system determines that a valid connection exists between nodes A and B.
[0032] Through the above steps, the system can determine the signal connectivity between nodes at each layer based on the signal strength parameter, providing a reliable basis for topology construction and routing optimization of the LoRa network. This method comprehensively considers multiple factors such as signal strength, path loss, and distance attenuation, and can more accurately reflect the connectivity between nodes in the actual network environment, thereby improving the communication quality and reliability of the LoRa network.
[0033] Figure 2 This is a bar chart comparing the LoRa terminal node signal connectivity analysis of an embodiment of the present invention: This figure compares the connectivity performance of three algorithms in different environments. The horizontal axis represents four environmental types: indoor, urban, suburban, and complex terrain; the vertical axis represents the connectivity percentage (0-100%). The three algorithms compared are connectivity after path loss correction, connectivity after distance attenuation, and connectivity of the combined algorithm, distinguished by different bar graph filling styles. The combined algorithm performs best in all environments, achieving connectivity rates of 90.4%, 78.9%, 94.6%, and 73.5%, respectively. The path loss correction algorithm comes in second, with connectivity rates of 87.5%, 75.3%, 92.1%, and 68.7%, respectively. The distance attenuation algorithm performs worst overall, with performance rates of 82.3%, 70.8%, 88.4%, and 63.2%, respectively. The performance difference between the three algorithms is most pronounced in complex terrain environments, while the combined algorithm performs best in suburban environments. Overall, the connectivity performance of each algorithm deteriorates with increasing environmental complexity, but the combined algorithm maintains a relatively strong performance advantage, demonstrating strong environmental adaptability.
[0034] In an optional embodiment, establishing a parent-child relationship between nodes in each layer according to the principle of minimum hop number and optimal signal strength, generating a virtual tree topology structure, and sending the connection relationship information of the virtual tree topology structure to each of the LoRa terminal nodes includes: Each layer of nodes includes first-layer nodes, second-layer nodes, and third-layer nodes; The first-layer node is set as a root node, and second-layer candidate nodes with a hop count of 1 to the root node are screened based on the hop count information; a node with the greatest signal strength to the root node is selected from the second-layer candidate nodes as a child node of the root node, and a first parent-child connection relationship is established between the root node and the child node; For each set of child nodes that have established the first parent-child connection relationship with the root node as the second-layer node, screen out third-layer candidate nodes with a hop count of 1 to the second-layer node based on the hop count information; select a node with the greatest signal strength to the second-layer node from the third-layer candidate nodes as a child node of the second-layer node, and establish a second parent-child connection relationship between the second-layer node and the child node; Generate a virtual tree topology structure including the first parent-child connection relationship and the second parent-child connection relationship, wherein the connection relationship information of the virtual tree topology structure includes parent node identification information and child node identification information of each node; Send connection relationship information of the virtual tree topology structure to each of the LoRa terminal nodes in the network.
[0035] Collects hop count and signal strength information between each LoRa terminal node in the network. Hop count information indicates the number of intermediate nodes required for communication between any two nodes, while signal strength information indicates the signal strength between the two nodes, typically in dBm. This information is obtained through periodic measurement and information exchange between nodes and stored in the network controller.
[0036] Assume that there are 10 LoRa end nodes in the network, identified as Node_1 through Node_10. Preliminary measurements have revealed the number of hops and signal strength between these nodes. For example, the hop count between Node_1 and Node_2 is 1, with a signal strength of -85dBm; the hop count between Node_1 and Node_3 is 1, with a signal strength of -80dBm; and the hop count between Node_1 and Node_4 is 2, with a signal strength of -95dBm.
[0037] At the beginning of the tree topology construction process, Node_1 is set as the root node, the first-level node. Based on the hop count information, nodes with a hop count of 1 to the root node are selected as second-level candidate nodes. In this example, Node_2, Node_3, and Node_5 have a hop count of 1, making them second-level candidate nodes. Next, the signal strengths of these candidate nodes are compared with the root node, and the node with the highest signal strength is selected as the child node of the root node. In this example, Node_3's signal strength is -80dBm, which is higher than Node_2's -85dBm and Node_5's -90dBm. Therefore, Node_3 is selected as the child node of Node_1, establishing the first parent-child connection relationship between Node_1 and Node_3.
[0038] Continuing to compare the remaining second-layer candidate nodes, Node_2's signal strength is -85dBm, higher than Node_5's -90dBm. Therefore, Node_2 is also selected as a child of Node_1, establishing the first parent-child connection between Node_1 and Node_2. Similarly, Node_5 is also selected as a child of Node_1, establishing the first parent-child connection between Node_1 and Node_5.
[0039] After completing the parent-child connection relationship between the first-layer nodes and the second-layer nodes, the connection relationship between each second-layer node and the third-layer node is processed. For the second-layer node Node_3, based on the hop count information, the nodes with a hop count of 1 to Node_3 are selected as third-layer candidate nodes. Assuming that the hop count between Node_4 and Node_6 and Node_3 is 1, they become third-layer candidate nodes. Comparing the signal strength between these candidate nodes and Node_3, assuming that the signal strength of Node_4 is -88dBm and the signal strength of Node_6 is -92dBm, Node_4, with its higher signal strength, is selected as the child node of Node_3, and the second parent-child connection relationship between Node_3 and Node_4 is established.
[0040] Similarly, for the second-layer node Node_2, assuming the hop count between Node_7 and Node_8 and Node_2 is 1, they become candidate nodes for the third layer. Comparing their signal strengths with Node_2, assuming Node_7's signal strength is -87dBm and Node_8's signal strength is -89dBm, Node_7, with its higher signal strength, is selected as Node_2's child node, establishing a second parent-child connection between Node_2 and Node_7. Similarly, since Node_8 also has a higher signal strength, Node_8 is also selected as Node_2's child node, establishing a second parent-child connection between Node_2 and Node_8.
[0041] For the second-layer node Node_5, assume that the hop count between Node_9 and Node_10 and Node_5 is 1, making them candidate nodes for the third layer. Comparing the signal strengths between them and Node_5, assuming that Node_9's signal strength is -86dBm and Node_10's signal strength is -91dBm, Node_9, with its higher signal strength, is selected as the child node of Node_5, establishing a second parent-child connection between them. Similarly, Node_10 is selected as the child node of Node_5, establishing a second parent-child connection between them.
[0042] Through the above process, a virtual tree-like topology structure containing the first parent-child connection relationship and the second parent-child connection relationship is generated. The connection relationship information of this topology structure includes the parent node identification information and the child node identification information of each node. For example, the child node identification information of Node_1 includes Node_2, Node_3, and Node_5; the parent node identification information of Node_2 is Node_1, and the child node identification information includes Node_7 and Node_8; the parent node identification information of Node_3 is Node_1, and the child node identification information is Node_4; the parent node identification information of Node_5 is Node_1, and the child node identification information includes Node_9 and Node_10.
[0043] The connection relationship information of the generated virtual tree topology is encapsulated into a network configuration message and sent to each LoRa terminal node in the network through broadcast or targeted transmission. After receiving this message, each LoRa terminal node determines its own position in the network and communication path based on the parent node identification information and child node identification information contained in it, and then transmits data according to the virtual tree topology.
[0044] In this way, data transmission within the network can be carried out along the path with the best signal strength while minimizing the number of hops, thereby improving the reliability and efficiency of network communications. This method is particularly suitable for low-power wide-area networks such as LoRa, effectively extending the battery life of network nodes and improving the success rate of data transmission.
[0045] In an optional embodiment, a spherical search space is set based on the position coordinate information of each of the LoRa terminal nodes, and a spatial density contribution value is calculated according to the relative distance between the nodes. Based on the density contribution value, a density clustering algorithm is used to divide the LoRa network into autonomous domains, and multiple autonomous domains are obtained, including: Constructing an initial spherical search space centered on the location coordinate information of each LoRa terminal node, setting a radius value of the initial spherical search space based on the node communication range, dividing the initial spherical search space into a plurality of concentric spherical layers, and increasing the radius of each concentric spherical layer according to a preset step size; Counting the number of nodes in each of the concentric spherical layers to obtain a spherical layer node density value, and taking the spherical layer radius where the spherical layer node density value has an inflection point as the optimal search radius; Constructing an optimized spherical search space according to the optimal search radius, and calculating a spatial density contribution value based on the relative distance between nodes in the optimized spherical search space, specifically comprising: calculating the distance between any two nodes in the spherical search space, substituting the distance value into a Gaussian kernel function to obtain a density contribution value; Based on the density contribution value, a density clustering algorithm is used to divide the LoRa network into autonomous domains to obtain multiple autonomous domains.
[0046] like Figure 3 As shown, the method includes: In the specific technical solution for implementing the present invention, the LoRa network includes multiple terminal nodes, each of which has a certain location coordinate information. An initial spherical search space is constructed with the location coordinate information of each LoRa terminal node as the center, and the radius of the initial spherical search space is set based on the communication range of the node. Assuming that the communication range of the LoRa terminal node is 5 kilometers, the radius of the initial spherical search space can be set to 5 kilometers. In order to analyze the node distribution more finely, the initial spherical search space is divided into multiple concentric spherical layers, and the radius of each concentric spherical layer increases according to a preset step size. For example, the step size can be set to 0.5 kilometers, forming concentric spherical layers with radii of 0.5 kilometers, 1 kilometer, 1.5 kilometers, etc.
[0047] The node density of each concentric sphere is calculated by counting the number of nodes within the sphere. Specifically, for a sphere with a radius of r, the number of nodes falling within the sphere is calculated and divided by the volume of the sphere to obtain the node density of the sphere. For example, a sphere with a radius of 0.5 km has 10 nodes, and the volume of the sphere is approximately 0.52 cubic kilometers, so the node density is 19.23 nodes per cubic kilometer; a sphere with a radius of 1 km has 25 nodes, and the volume of the sphere is approximately 3.14 cubic kilometers, so the node density is 7.96 nodes per cubic kilometer; a sphere with a radius of 1.5 km has 15 nodes, and the volume of the sphere is approximately 10.6 cubic kilometers, so the node density is 1.42 nodes per cubic kilometer. By plotting the relationship between the sphere radius and the node density, the radius of the sphere where the node density value has an inflection point is found and used as the optimal search radius. In the above example, it can be found that at a radius of 1 km, the node density value drops sharply from 19.23 to 7.96, which is a clear inflection point of the curve. Therefore, 1 km can be determined as the optimal search radius.
[0048] An optimized spherical search space is constructed based on the optimal search radius. Within the optimized spherical search space, the spatial density contribution is calculated based on the relative distance between nodes. Specifically, the distance between any two nodes in the spherical search space is calculated, and the distance value is substituted into the Gaussian kernel function to obtain the density contribution value. For example, for nodes A and B, their location coordinates are (121.5, 31.2, 50) and (121.4, 31.3, 55), respectively. The calculated distance between the two points is approximately 0.14 kilometers. Substituting this distance value into the Gaussian kernel function, the density contribution value of node B to node A is approximately 0.85. Similarly, the density contribution values between all node pairs in the spherical search space are calculated.
[0049] For a LoRa terminal node, the total density value of the node is calculated by adding up the density contributions of all other nodes within its optimized spherical search space. For example, if the optimized spherical search space of node A contains nodes B, C, and D, and their density contributions to node A are 0.85, 0.92, and 0.78, respectively, then the total density value of node A is 2.55. Based on the preset density threshold, nodes are identified as high-density nodes. For example, if the density threshold is set to 2.0, node A is considered a high-density node.
[0050] Based on density contribution values, a density clustering algorithm is used to partition the LoRa network into autonomous domains, resulting in multiple autonomous domains. Specifically, starting with an unpartitioned high-density node, a search is performed within its optimized spherical search space for other high-density nodes. If the distance between two high-density nodes is less than a preset distance threshold, they are considered to belong to the same autonomous domain. For example, if the distance threshold is set to 0.8 km and the distance between high-density nodes A and E is 0.6 km, then nodes A and E belong to the same autonomous domain. All interconnected high-density nodes are then grouped into the same autonomous domain, forming the core of the autonomous domain.
[0051] For non-high-density nodes, determine whether they are within the optimized spherical search space of a high-density node. If so, assign them to the autonomous domain of that high-density node. For example, if non-high-density node F is within the optimized spherical search space of high-density node A, assign node F to the autonomous domain of node A. If a non-high-density node is within the optimized spherical search space of multiple high-density nodes, assign it to the autonomous domain of the high-density node with the highest density contribution.
[0052] Through the above steps, the autonomous domain division of the LoRa network is completed, resulting in multiple autonomous domains. The nodes within each autonomous domain have a high spatial density correlation, which helps improve network communication efficiency and resource utilization. For example, in a LoRa network covering an area of 100 square kilometers, containing 500 terminal nodes, this method can be divided into 8 autonomous domains, with the number of nodes in each autonomous domain ranging from 45 to 80. The boundaries between the autonomous domains are clear, effectively avoiding network resource conflicts and communication interference.
[0053] In an optional embodiment, based on the density contribution value, a density clustering algorithm is used to divide the LoRa network into autonomous domains, and the obtained multiple autonomous domains include: Accumulating the density contribution values of all node pairs in the optimized spherical search space to obtain a local density value of the central node; calculating the minimum distance between the central node and other nodes with higher local density values to obtain a relative distance value of the central node; Multiplying the local density value by the relative distance value to obtain a clustering index value of the node; and using an adaptive threshold selection algorithm to select nodes with clustering index values greater than an adaptive threshold as density clustering centers based on distribution characteristics of the clustering index value; The Mahalanobis distance between the non-density clustering center point and each of the density clustering center points is calculated, and each of the non-density clustering center points is divided into an autonomous domain where the nearest density clustering center point is located based on the Mahalanobis distance.
[0054] In the autonomous domain division of the LoRa network, the density clustering algorithm realizes the self-organizing partitioning of the network based on the calculation of the density contribution value between nodes.
[0055] For each node within the optimized spherical search space, the local density value of each node as a central node must first be calculated. For example, assume that the optimized search space contains 100 nodes, numbered N1 to N100. For each central node, such as N50, its density contribution to all other nodes in the space must be calculated and accumulated. The density contribution value reflects the degree of connection between two nodes, taking into account factors such as communication quality, geographical distance, and resource status. For example, the density contribution value of N50 with N25 is 0.85, the density contribution value with N76 is 0.42, and so on. Adding the density contribution values of N50 with all other 99 nodes gives N50 a local density value of 67.3. The local density values of all 100 nodes are calculated using the same method.
[0056] After the local density value is calculated, the relative distance value of each node needs to be determined. For the central node N50, find all node sets with local density values higher than N50. Assume that there are 30 nodes with local density values higher than 67.3. Calculate the distance between N50 and each of these 30 nodes, and take the minimum value as the relative distance value of N50. The distance here can be measured using Euclidean distance, Manhattan distance, etc. In this embodiment, Euclidean distance is used. Assuming that among the nodes with higher local density values, N50 has the smallest distance to N23, which is 120 meters, then the relative distance value of N50 is 120. For the node with the highest local density value, since there is no node with higher density, its relative distance value is taken as the maximum distance value in the search space, for example 500 meters.
[0057] The clustering index is calculated by multiplying the node's local density by its relative distance. For N50, the clustering index is 67.3 × 120 = 8076. Similarly, the clustering index values for all nodes are calculated. The distribution of these values typically shows a clear differentiation, with a few nodes having significantly higher clustering index values than the rest.
[0058] An adaptive threshold selection algorithm is used to determine density cluster centers. This algorithm automatically determines an appropriate threshold based on the distribution characteristics of clustering index values. Specifically, the clustering index values of all nodes are sorted in descending order, the difference between adjacent values is calculated, and the location with a significant increase in difference is identified as the dividing point. In this example, assuming that the clustering index values of the first five nodes after sorting are 25,000, 23,500, 22,000, 21,000, and 20,500, respectively, and the value of the sixth node drops sharply to 12,000, 20,500 is used as the threshold. The five nodes with clustering index values greater than 20,500 are identified as density cluster centers: N15, N37, N62, N84, and N93.
[0059] Divide non-density clustering centers into appropriate autonomous domains. For each non-center point, calculate the Mahalanobis distance between it and each density clustering center point. The Mahalanobis distance takes into account the correlation of features in each dimension and can more accurately reflect the actual degree of connection between nodes. Taking non-center point N50 as an example, its Mahalanobis distances with the five center points are calculated as follows: 3.2 with N15, 4.7 with N37, 2.1 with N62, 5.3 with N84, and 6.0 with N93. Since N50 has the smallest distance to N62, it is divided into the autonomous domain centered on N62.
[0060] Following the same method, all non-central points are divided into autonomous domains corresponding to the nearest central point, ultimately forming five autonomous domains. The autonomous domain centered on N62 includes 23 nodes, including N50 and N51; the autonomous domain centered on N15 includes 19 nodes; the autonomous domain centered on N37 includes 18 nodes; the autonomous domain centered on N84 includes 21 nodes; and the autonomous domain centered on N93 includes 14 nodes.
[0061] Through the density clustering process described above, the LoRa network is divided into multiple autonomous domains. Nodes within each autonomous domain have high similarity and correlation in physical location and communication characteristics. This division maximizes intra-domain communication efficiency while reducing the complexity of cross-domain communication, effectively improving overall network performance. This autonomous domain division method is particularly suitable for low-power wide-area networks such as LoRa, optimizing network resource utilization and extending network lifecycles while ensuring communication quality.
[0062] Figure 4 This is a bar chart comparing the performance of LoRa network autonomous domain division based on density clustering in an embodiment of the present invention: This figure compares the accuracy of three different segmentation algorithms in regions of varying density. The horizontal axis delineates four density regions: low, medium, high, and mixed density; the vertical axis represents the accuracy percentage (0-100%). The three algorithms compared include local density segmentation accuracy, adaptive threshold segmentation accuracy, and Mahalanobis distance segmentation accuracy. The Mahalanobis distance segmentation method performs best overall, achieving accuracies of 90.3%, 84.7%, 95.2%, and 82.9% in the four regions, respectively. The adaptive threshold segmentation method comes in second, with accuracies of 88.6%, 82.1%, 93.5%, and 79.4%, respectively. The local density segmentation method performs worst, with accuracies of 85.2%, 78.3%, 91.7%, and 73.8%, respectively. All three algorithms achieve the best performance in high-density regions, but perform relatively poorly in mixed-density regions. Notably, the accuracy of each algorithm generally increases with increasing regional density, but all algorithms experience a significant decline in performance when dealing with mixed-density regions.
[0063] In an optional embodiment, in each autonomous domain, selecting a node with the largest density distribution value and the highest energy consumption as a domain management node, selecting a node with the best communication quality in an autonomous domain adjacent to the domain management node as a boundary node, and exchanging network status information between adjacent autonomous domains through the boundary node includes: Collecting network status data of each node in the autonomous domain, and calculating a node density distribution value based on the network status data, wherein the node density distribution value is obtained by comprehensively calculating data flow, number of connections, and density of node distribution within the node neighborhood; Performing energy consumption detection on each node in the autonomous domain, wherein the energy consumption detection includes computing and processing energy consumption, data storage energy consumption, and communication transmission energy consumption, and obtaining a power consumption energy value of the node according to the detection result; Perform node scoring according to the density distribution value and the power consumption energy value, and select the node with the largest density distribution value and the highest power consumption energy value as the domain management node of the autonomous domain; Detecting the communication quality of each node in other autonomous domains adjacent to the domain management node, the communication quality including channel quality, transmission delay, and link stability, and calculating the communication quality score of the node based on the detection results of the communication quality; Selecting the node with the highest communication quality score as a boundary node of an adjacent autonomous domain, wherein the boundary node is used to exchange network status information with the domain management node; The border node collects network status information of the autonomous domain, and transmits the network status information to the border node of the adjacent autonomous domain through the border node, thereby realizing the exchange of network status information between autonomous domains.
[0064] In practical applications, the method of the present invention first needs to determine the autonomous domain division in the network, each autonomous domain includes multiple network nodes, and these nodes have different network status characteristics and power consumption characteristics.
[0065] In each autonomous domain, the system needs to collect network status data from each node. This process obtains real-time data by regularly scanning network nodes, including data traffic, number of connections, and node distribution. For example, for a certain node A, within a 5-minute sampling period, the system recorded a data traffic of 24MB, 15 active connections, and 8 other nodes within a 100-meter range. Based on this raw data, when calculating the node density distribution value, the system normalizes the data traffic to 0.8 (relative to the maximum value of 30MB in the domain), the number of connections to 0.75 (relative to the maximum value of 20 in the domain), and the node distribution density to 0.6 (relative to the highest density area in the domain). The system weights these three factors according to a 4:3:3 weighting and sums them, resulting in a density distribution value of 0.73 for node A.
[0066] For energy consumption monitoring, the system monitors the energy consumption of each node in real time. Processing energy consumption is calculated based on CPU utilization and runtime. For example, Node A's average CPU utilization is 45%, and its processing energy consumption over the past hour was 120mWh. Data storage energy consumption is determined by the frequency and capacity of storage operations. Node A performed 30 storage operations, with a total storage energy consumption of 85mWh. Communication transmission energy consumption is calculated based on the amount of data transmitted and the transmission distance. Node A transmitted 24MB of data over an average transmission distance of 50 meters, with a communication energy consumption of 150mWh. The system adds these three energy consumption items and, taking into account the node's remaining battery capacity (85%), calculates Node A's power consumption to be 0.68.
[0067] During node scoring, the system comprehensively considers density distribution and power consumption. For each node, the score is calculated as: score = density distribution × 0.6 + power consumption × 0.4. Based on this calculation, node A's score is 0.73 × 0.6 + 0.68 × 0.4 = 0.71. Comparing the scores of all nodes in the autonomous domain, the system selects node B, which has the highest score (score 0.85, density distribution 0.92, and power consumption 0.75), as the domain management node.
[0068] After determining the domain management node, the system begins monitoring the communication quality of nodes in other autonomous domains adjacent to that node. For node C in neighboring autonomous domain X, the system measures the channel quality between it and domain management node B, recording a signal-to-noise ratio of 23 dB, a normalized value of 0.85; a transmission delay of 15 ms, a normalized value of 0.90; and a link stability of 98% over the past 24 hours, a normalized value of 0.98. The communication quality score is calculated using the weighted sum of three metrics: score = channel quality × 0.4 + transmission delay × 0.3 + link stability × 0.3. Therefore, node C's communication quality score is 0.85 × 0.4 + 0.90 × 0.3 + 0.98 × 0.3 = 0.904.
[0069] After evaluating the communication quality of all nodes in the adjacent autonomous domain X, the system selects node D (with a score of 0.925) with the highest score as the boundary node for that autonomous domain. Boundary node D is responsible for collecting network status information within autonomous domain X, including key metrics such as network topology, node load, and link status. Specifically, boundary node D scans the status of all nodes within the domain every 30 seconds, collecting information such as average processing delay (25ms), bandwidth utilization (65%), and packet loss rate (0.5%), and packages this information into network status packets.
[0070] During the network status information exchange process, border node D transmits the collected information packets to the border node of the adjacent autonomous domain via a pre-set secure communication channel. A lightweight encryption protocol is used during the transmission process to ensure data security. A data compression mechanism is also introduced to compress the original information packet (approximately 8KB) to 3.5KB, reducing the transmission burden. To ensure transmission reliability, the system uses an acknowledgement mechanism, where the receiver returns an acknowledgment signal upon successful receipt of the information packet.
[0071] In practical applications, this method effectively reduces cross-domain communication redundancy, reducing network traffic by approximately 65% compared to traditional full-network broadcast methods. By selecting nodes with the best communication quality as boundary nodes, the success rate of inter-domain information exchange increased to 99.2%, a 15% improvement over traditional methods. Furthermore, by selecting nodes with the highest density distribution values and the highest energy consumption as domain management nodes, the overall network management efficiency of the system increased by approximately 40%, and node energy utilization increased by 25%.
[0072] Through the above mechanism, the present invention realizes efficient network status information exchange between autonomous domains, provides technical support for the collaborative management of distributed networks, and significantly improves network operation efficiency and resource utilization.
[0073] like Figure 5 As shown, the method includes: A gateway and first-level subnodes form a subnet. First-level subnodes include terminal nodes and the repeater's uplink communication module. The repeater's downlink communication module and the terminal node form a subnet. Each subnet uses a different channel, creating a star topology within the subnet. Because the repeater role encompasses both upstream and downstream modules, it has both parent and child roles, effectively connecting the two subnets. This interconnection transforms the overall network into a tree-like network. Because each subnet has its own channel and the repeater connects the two subnets, these two features are achieved: the overall network is a tree-like network, while each subnet is a star-like network with a different channel, hence the name "virtual" tree topology.
[0074] The terminal node belongs to the child node of the subnet whose channel it uses. The channel can distinguish the parent-child relationship, and there is no need to send the connection relationship separately.
[0075] The LoRa network consists of three types of devices: gateways, repeaters, and end nodes. Gateways communicate with servers via 4G Cat.1 or Ethernet and contain a LoRa module to communicate with downstream nodes. Repeaters contain two LoRa modules: one for uplink and one for downlink. End nodes contain a LoRa module for uplink communication. Gateways are defined as parent nodes, end nodes as child nodes, and repeaters have both parent and child attributes.
[0076] The entire LoRa communication network operates in the 470MHz to 510MHz frequency band, which is subdivided into 24 channels, each with a bandwidth of 1.2MHz. The maximum number of gateways and repeaters in the network is limited to 24, and the parent nodes of all subnets use different channels for downlink communication.
[0077] Channel allocation is centrally managed by the server. In specific implementation, after the gateway establishes a connection with the server, it applies for an idle channel from the server. Taking a hospital monitoring system as an example, the first gateway obtains channel 1 (470.0MHz-471.2MHz), the second gateway obtains channel 2 (471.2MHz-472.4MHz), and so on. As a child node, the repeater enters the network distribution mode after powering on and scans 24 channels in sequence. If the signal strength detected on channel 1 is -80dBm and the signal strength detected on channel 2 is -70dBm, channel 2 with better signal strength is selected to complete the network access and synchronize the time with the parent node. After successful network access, the repeater, as the parent node, applies to the server for an idle channel for downlink communication, such as obtaining channel 3 (472.4MHZ-473.6MHz). The terminal node also completes the network access by scanning 24 channels and matching the best channel according to the signal strength.
[0078] Regarding time slot division, based on sensor monitoring requirements, the minimum real-time communication interval for the entire network is set at 1 minute, divided into 30 time slots of 2 seconds each. A single gateway supports up to 30 terminal nodes. If the time slot number is N, the first second is recorded as N.1 and the second second is recorded as N.2.
[0079] Timeslot allocation is centrally managed by the gateway. After joining the network, an end node requests an available timeslot. For example, a temperature and humidity sensor is assigned timeslot 5. When timeslot 5 arrives, the sensor actively initiates communication. During timeslot 5.1 seconds, only the sensor and all repeaters on its corresponding logical path are allowed to communicate uplink. Timeslot 5.2 seconds is reserved for emergency communications, allowing all end nodes to actively initiate communications.
[0080] The repeater is a middle layer in the network. Its two LoRa modules' transmit and receive channels are always active, acting as transparent transmission channels between upper and lower nodes. Upon receiving a signal from a logically subordinate child node, the repeater reads the information and forwards it upwards via the uplink communication module. For example, a temperature and humidity sensor sends the data "temperature 25°C, humidity 60%" to a repeater. The repeater, without changing the data content, directly forwards the same data to the gateway via the uplink module. Similarly, upon receiving a signal from a logically subordinate parent node, the repeater reads the information and forwards it downwards via the downlink communication module.
[0081] For downlink settings, the server can only issue settings to end nodes after they have successfully initiated communication. For example, if a temperature and humidity sensor has a time slot number of 5, it will initiate an uplink communication within 5.1 seconds of the time slot, reporting the data "temperature 25°C, humidity 60%." This uplink communication passes through the repeater and reaches the gateway, which then transmits the information to the server via the internet. The server sends the parameter "sampling interval set to 10 minutes" to the gateway, which then transmits it downlink via LoRa. During the 5.1-second time slot, all end nodes under the gateway enter a sleep state and do not receive downlink signals from the gateway. During the 5.1-second time slot, all repeaters receiving signals from the parent node will check whether there has been any communication from the repeater's child node within the 5.1-second time slot. If so, they forward the communication; otherwise, they discard it.
[0082] To ensure network robustness, the present invention adopts multiple strategies: During the public communication time, nodes that need to actively initiate communication use random functions to control the random initiation of communication to avoid collisions. If a collision still causes failure, there will be a maximum of three retransmission opportunities during the public communication time. All devices have Bluetooth communication capabilities. When the automatic network configuration is abnormal, manual settings can be made through the mobile phone. Each communication data packet contains the network parameters of the path. If a channel or a time slot is inactive for three consecutive data collection cycles, it is determined to be a device failure, the server reclaims the channel, and the gateway reclaims the time slot. If the configured sub-node fails in uplink communication for three consecutive times, it will re-enter the network configuration mode and apply for network access during the public time.
[0083] To account for internet latency, when downlinking settings, if the gateway receives the terminal node's configuration parameters after the first second of the corresponding time slot, it will cache them and subsequently attempt to send the configuration parameters to the terminal node within three cycles. The entire system has a breakpoint-resume transmission mechanism. Both the terminal node and the gateway have local storage chips to store breakpoint data for subsequent retransmission. The repeater hierarchy is designed to not exceed three levels to ensure data transmission efficiency.
[0084] For added convenience, all repeaters and end nodes can manually trigger network configuration mode and provide users with the best available channel information. If a device needs to be relocated, the gateway's network parameters are backed up on the server. If gateway A replaces gateway B, the server sends gateway A's network parameters to gateway B. If an end node or repeater is relocated, the user simply turns the device on and off, and the device will initially enter network configuration mode.
[0085] A second aspect of an embodiment of the present invention provides a LoRa networking system with a virtual tree topology, including: The first unit is configured to receive a network access request data packet sent by each LoRa terminal node in the network, wherein the network access request data packet includes a node identifier, a signal strength parameter, and a hop count parameter of the LoRa terminal node that sends the network access request data packet; The second unit is used to hierarchize the LoRa terminal nodes according to the signal strength parameters and construct a virtual connection relationship between the hierarchical nodes, specifically including: judging the signal connectivity between the nodes of each layer according to the signal strength parameters, establishing a parent-child relationship between the nodes of each layer according to the principle of minimum number of hops and optimal signal strength, generating a virtual tree topology structure, and sending the connection relationship information of the virtual tree topology structure to each of the LoRa terminal nodes; the third unit is used to set a spherical search space based on the position coordinate information of each of the LoRa terminal nodes, calculate the spatial density contribution value according to the relative distance between the nodes, and based on the spatial density contribution value, use a density clustering algorithm to divide the LoRa network into autonomous domains to obtain multiple autonomous domains; The fourth unit is used to select the node with the largest density distribution value and the highest power consumption energy in each of the autonomous domains as the domain management node, select the node with the best communication quality in the autonomous domain adjacent to the domain management node as the boundary node, and exchange network status information between adjacent autonomous domains through the boundary nodes.
[0086] According to a third aspect of an embodiment of the present invention, an electronic device is provided, including: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0087] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0088] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0089] 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 above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A LoRa networking method with a virtual tree topology structure, characterized in that: include: Receive a network access request data packet sent by each LoRa terminal node in the network, wherein the network access request data packet includes a node identifier, a signal strength parameter, and a hop count parameter of the LoRa terminal node that sends the network access request data packet; The LoRa terminal nodes are layered according to the signal strength parameters, and a virtual connection relationship of the layered nodes is constructed, specifically comprising: judging the signal connectivity between the nodes of each layer according to the signal strength parameters, establishing a parent-child relationship between the nodes of each layer according to the principle of minimum number of hops and optimal signal strength, generating a virtual tree topology structure, and sending the connection relationship information of the virtual tree topology structure to each of the LoRa terminal nodes; A spherical search space is set based on the position coordinate information of each of the LoRa terminal nodes, a spatial density contribution value is calculated according to the relative distance between the nodes, and based on the spatial density contribution value, a density clustering algorithm is used to divide the LoRa network into autonomous domains to obtain multiple autonomous domains; In each of the autonomous domains, a node with the largest density distribution value and the highest power consumption is selected as a domain management node, and a node with the best communication quality in an autonomous domain adjacent to the domain management node is selected as a boundary node, and network status information is exchanged between adjacent autonomous domains through the boundary nodes.
2. The method according to claim 1, characterized in that Determining the signal connectivity between nodes at each layer according to the signal strength parameter includes: Collect signal attenuation data on the transmission path between the LoRa terminal nodes, and calculate the path loss value between the nodes based on the signal attenuation data; Calculating a path loss correction value according to the product of a preset path loss weight coefficient and the path loss value, and subtracting the path loss correction value from the signal strength value corresponding to the signal strength parameter to obtain an initial connectivity value; The Euclidean distance value between nodes is calculated based on the geographic location information of the LoRa terminal node; the distance attenuation exponential function value is calculated according to the preset distance attenuation coefficient and the Euclidean distance value, and the initial connectivity value is multiplied by the distance attenuation exponential function value to obtain the signal connectivity between nodes.
3. The method according to claim 1, characterized in that Establishing a parent-child relationship between nodes at each layer according to the principle of minimum hop number and optimal signal strength, generating a virtual tree topology structure, and sending connection relationship information of the virtual tree topology structure to each of the LoRa terminal nodes includes: Each layer of nodes includes first-layer nodes, second-layer nodes, and third-layer nodes; The first-layer node is set as a root node, and second-layer candidate nodes with a hop count of 1 to the root node are screened based on the hop count information; a node with the greatest signal strength to the root node is selected from the second-layer candidate nodes as a child node of the root node, and a first parent-child connection relationship is established between the root node and the child node; For each set of child nodes that have established the first parent-child connection relationship with the root node as the second-layer node, screen out third-layer candidate nodes with a hop count of 1 to the second-layer node based on the hop count information; select a node with the greatest signal strength to the second-layer node from the third-layer candidate nodes as a child node of the second-layer node, and establish a second parent-child connection relationship between the second-layer node and the child node; Generate a virtual tree topology structure including the first parent-child connection relationship and the second parent-child connection relationship, wherein the connection relationship information of the virtual tree topology structure includes parent node identification information and child node identification information of each node; Send connection relationship information of the virtual tree topology structure to each of the LoRa terminal nodes in the network.
4. The method according to claim 1, wherein A spherical search space is set based on the position coordinate information of each LoRa terminal node, and a spatial density contribution value is calculated according to the relative distance between nodes. Based on the density contribution value, a density clustering algorithm is used to divide the LoRa network into autonomous domains, and multiple autonomous domains are obtained, including: Constructing an initial spherical search space centered on the location coordinate information of each LoRa terminal node, setting a radius value of the initial spherical search space based on the node communication range, dividing the initial spherical search space into a plurality of concentric spherical layers, and increasing the radius of each concentric spherical layer according to a preset step size; Counting the number of nodes in each of the concentric spherical layers to obtain a spherical layer node density value, and taking the spherical layer radius where the spherical layer node density value has an inflection point as the optimal search radius; Constructing an optimized spherical search space according to the optimal search radius, and calculating a spatial density contribution value based on the relative distance between nodes in the optimized spherical search space, specifically comprising: calculating the distance between any two nodes in the spherical search space, substituting the distance value into a Gaussian kernel function to obtain a density contribution value; Based on the density contribution value, a density clustering algorithm is used to divide the LoRa network into autonomous domains to obtain multiple autonomous domains.
5. The method according to claim 4, characterized in that Based on the density contribution value, the density clustering algorithm is used to divide the LoRa network into autonomous domains, and multiple autonomous domains are obtained, including: Accumulating the density contribution values of all node pairs in the optimized spherical search space to obtain a local density value of the central node; calculating the minimum distance between the central node and other nodes with higher local density values to obtain a relative distance value of the central node; Multiplying the local density value by the relative distance value to obtain a clustering index value of the node; and using an adaptive threshold selection algorithm to select nodes with clustering index values greater than an adaptive threshold as density clustering centers based on distribution characteristics of the clustering index value; The Mahalanobis distance between the non-density clustering center point and each of the density clustering center points is calculated, and each of the non-density clustering center points is divided into an autonomous domain where the nearest density clustering center point is located based on the Mahalanobis distance.
6. The method according to claim 1, characterized in that In each of the autonomous domains, selecting a node with the largest density distribution value and the highest power consumption as a domain management node, selecting a node with the best communication quality in an autonomous domain adjacent to the domain management node as a boundary node, and exchanging network status information between adjacent autonomous domains through the boundary node includes: Collecting network status data of each node in the autonomous domain, and calculating a node density distribution value based on the network status data, wherein the node density distribution value is obtained by comprehensively calculating data flow, number of connections, and density of node distribution within the node neighborhood; Performing energy consumption detection on each node in the autonomous domain, wherein the energy consumption detection includes computing and processing energy consumption, data storage energy consumption, and communication transmission energy consumption, and obtaining a power consumption energy value of the node according to the detection result; Perform node scoring according to the density distribution value and the power consumption energy value, and select the node with the largest density distribution value and the highest power consumption energy value as the domain management node of the autonomous domain; Detecting the communication quality of each node in other autonomous domains adjacent to the domain management node, the communication quality including channel quality, transmission delay, and link stability, and calculating the communication quality score of the node based on the detection results of the communication quality; Selecting the node with the highest communication quality score as a boundary node of an adjacent autonomous domain, wherein the boundary node is used to exchange network status information with the domain management node; The border node collects network status information of the autonomous domain, and transmits the network status information to the border node of the adjacent autonomous domain through the border node, thereby realizing the exchange of network status information between autonomous domains.
7. A LoRa networking system with a virtual tree topology, for implementing the method according to any one of claims 1 to 6, characterized in that: include: The first unit is configured to receive a network access request data packet sent by each LoRa terminal node in the network, wherein the network access request data packet includes a node identifier, a signal strength parameter, and a hop count parameter of the LoRa terminal node that sends the network access request data packet; The second unit is used to hierarchize the LoRa terminal nodes according to the signal strength parameters and construct a virtual connection relationship between the hierarchical nodes, specifically including: judging the signal connectivity between the nodes of each layer according to the signal strength parameters, establishing a parent-child relationship between the nodes of each layer according to the principle of minimum number of hops and optimal signal strength, generating a virtual tree topology structure, and sending the connection relationship information of the virtual tree topology structure to each of the LoRa terminal nodes; The third unit is used to set a spherical search space based on the position coordinate information of each of the LoRa terminal nodes, calculate the spatial density contribution value according to the relative distance between the nodes, and divide the LoRa network into autonomous domains based on the spatial density contribution value using a density clustering algorithm to obtain multiple autonomous domains; The fourth unit is used to select the node with the largest density distribution value and the highest power consumption energy in each of the autonomous domains as the domain management node, select the node with the best communication quality in the autonomous domain adjacent to the domain management node as the boundary node, and exchange network status information between adjacent autonomous domains through the boundary nodes.
8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Power line communication network topology reconstruction method and device for single-port missing
CN121530909A