Mesh network transmission path selection method, storage medium and node device
By comprehensively evaluating candidate parent nodes in the Mesh network, and considering factors such as signal strength, latency, load, and topology, the optimal transmission path is selected, thus solving the problems of network load imbalance and environmental adaptability, and improving network performance and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHUHAI HUGE IC CO LTD
- Filing Date
- 2025-06-26
- Publication Date
- 2026-07-21
AI Technical Summary
In existing Mesh networks, the transmission path selection method lacks consideration for the overall network topology and load balancing, resulting in uneven network load, which may cause network congestion, affect communication quality and stability, and make it difficult to adapt to dynamic and complex network environments.
By receiving and parsing management frames to obtain candidate parent node information, measuring signal strength, delay, and load, and combining link depth and the number of child nodes, normalization processing and weighted summation are performed to comprehensively evaluate the link quality of candidate parent nodes, and the parent node with the highest comprehensive score is selected for association.
It enables more accurate selection of the optimal transmission path, avoids the selection of high-load nodes, adapts to changes in the network environment, improves network performance and stability, reduces waste of computing resources, and improves communication efficiency.
Smart Images

Figure CN120603013B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication, and more particularly to a method for selecting transmission paths in a Mesh network, a storage medium, and node devices. Background Technology
[0002] In a mesh network, the process of a new node joining the network and the strategy for selecting transmission paths directly impact network performance. Currently, when an offline node joins an already deployed and operating mesh network, a relatively basic and common path selection method is typically used. Specifically, before joining the network, the offline node actively scans for potential parent nodes in its surrounding environment. By analyzing the scan results, it generates a list of candidate parent nodes. Subsequently, the offline node measures the Received Signal Strength Indicator (RSSI) of each parent node in the list. Based on the measured RSSI value, the offline node selects the parent node with the highest RSSI as the target parent node and uses this to determine the data transmission path.
[0003] However, this selection method lacks consideration for the overall network topology and load balancing. In a mesh network, the load of each node changes dynamically as the network operates. If a large number of nodes tend to select the parent node with the strongest received signal, it may lead to excessive network load on that parent node and its surrounding area, while other nodes with slightly weaker signal strength but lower loads are not fully utilized. This load imbalance not only reduces the overall efficiency of the network but may also cause network congestion, further deteriorating communication quality and even causing some nodes to be unable to communicate normally, affecting the stability and reliability of the network.
[0004] Furthermore, as the scale and complexity of mesh networks continue to expand, the communication relationships between nodes become more intricate. Relying solely on received signal strength to select paths is insufficient to adapt to this dynamically changing network environment, failing to select the optimal transmission path in a timely and accurate manner. This limits the performance of mesh networks in larger-scale and more complex application scenarios.
[0005] Therefore, the existing method of selecting the target parent node and transmission path based on the maximum received signal strength has significant shortcomings in ensuring the communication quality of Mesh networks, achieving load balancing, and adapting to complex dynamic network environments. There is an urgent need to propose a more effective and comprehensive method for node access and transmission path selection to improve the overall performance of Mesh networks. Summary of the Invention
[0006] This application provides a method for selecting transmission paths in a mesh network, a storage medium, and node devices, which can solve the problem of poor mesh network performance in existing transmission path selection methods. The technical solution is as follows:
[0007] In a first aspect, embodiments of this application provide a method for selecting a transmission path in a Mesh network, the method comprising:
[0008] Receive management frames sent by online nodes in an existing Mesh network. The management frame carries the link depth, link delay, number of child nodes, link load, and sender MAC address of the sending node. The link depth represents the distance between the sending node and the root node, the link delay represents the transmission delay between the sending node and the root node, the number of child nodes represents the number of child nodes associated with the sending node, and the link load represents the maximum load of each sub-link between the sending node and the root node.
[0009] The received management frame is parsed, and a candidate parent node list is generated based on the sender's MAC address carried in the management frame; the candidate parent node list includes multiple candidate parent nodes.
[0010] Measure the received signal strength between the current node and the candidate parent node, and use the measurement result as the link received signal strength;
[0011] Measure the signal delay between the current node and the parent node, and sum the measured signal delay with the resolved link delay of the parent node to obtain the final link delay;
[0012] Measure the link load between the current node and the parent node, and take the maximum value between the calculated link load and the resolved link load of the parent node to obtain the final link load;
[0013] The resolved link depth, link received signal strength, final link delay, final link load, and number of resolved child nodes are normalized.
[0014] The weighted sum of the normalized index values is used to obtain the comprehensive score of each candidate parent node.
[0015] The parent node with the highest overall score will be the target parent node.
[0016] It associates with the target parent node. After successful association, it sends a management frame carrying the link depth, link delay, number of child nodes, link load and its own MAC address to the outside world through the broadcast channel.
[0017] Secondly, embodiments of this application provide a node device, the device comprising:
[0018] The transceiver unit is used to receive management frames sent by online nodes in an existing Mesh network. The management frame carries the link depth, link delay, number of child nodes, link load, and sender MAC address of the sending node. The link depth represents the distance between the sending node and the root node, the link delay represents the transmission delay between the sending node and the root node, the number of child nodes represents the number of child nodes associated with the sending node, and the link load represents the maximum load of each sub-link between the sending node and the root node.
[0019] The parsing unit is used to parse the received management frame and generate a candidate parent node list based on the sender's MAC address carried in the management frame; the candidate parent node list includes multiple candidate parent nodes.
[0020] The measurement unit is used to measure the received signal strength between the current node and the candidate parent node, and the measurement result is used as the link received signal strength.
[0021] The measurement unit is also used to measure the signal delay between the current node and the parent node, and to sum the measured signal delay and the resolved link delay of the parent node to obtain the final link delay;
[0022] The measurement unit is also used to measure the link load between the current node and the parent node, and to take the maximum value between the calculated link load and the resolved link load of the parent node to obtain the final link load.
[0023] The normalization unit is used to normalize the resolved link depth, link received signal strength, final link delay, final link load, and the number of resolved child nodes.
[0024] The selection unit is used to perform a weighted summation of the normalized index values to obtain a comprehensive score for each candidate parent node, and to select the parent node with the largest comprehensive score as the target parent node.
[0025] The transceiver unit is also used to associate with the target parent node. After successful association, it sends a management frame carrying the link depth, link delay, number of child nodes, link load and its own MAC address to the outside through the broadcast channel.
[0026] Thirdly, embodiments of this application provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the above-described method steps.
[0027] Fourthly, embodiments of this application provide a node device, which may include: a processor and a memory; wherein the memory stores a computer program, the computer program being adapted to be loaded by the processor and to execute the above-described method steps.
[0028] The beneficial effects of the technical solutions provided in some embodiments of this application include at least the following:
[0029] This approach considers not only the received signal strength but also multiple key metrics such as link depth, link delay, number of child nodes, and link load. Link depth reflects the distance from a node to the root node, link delay reflects the timeliness of data transmission, the number of child nodes is related to the network topology and node load capacity, and link load directly relates to the node's data processing capability. By comprehensively considering these metrics, the link quality between a node and its parent node can be evaluated more comprehensively and accurately, avoiding the limitations of relying solely on the received signal strength.
[0030] When calculating the final link load, the maximum value between the link load of the current node and its parent node and the resolved link load of the parent node is taken, fully considering the overall load of the parent node. This ensures that when selecting a target parent node, nodes with lower loads are preferred, avoiding those already under high load.
[0031] Each time a node connects, it re-receives the management frames sent by the online nodes, parses the relevant information, and recalculates the comprehensive score of each candidate parent node. This means that even if the network environment changes, such as the movement of other nodes or the appearance or disappearance of obstacles, causing changes in the signal strength and link quality of a certain parent node, the new method can promptly detect and re-evaluate the merits of each candidate parent node, and select the most suitable parent node at the current moment. Attached Figure Description
[0032] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 This is a schematic diagram of the network architecture of the Mesh network provided in the embodiments of this application;
[0034] Figure 2 This is a flowchart illustrating the transmission path selection method for a Mesh network provided in an embodiment of this application;
[0035] Figure 3 This is a schematic diagram of the structure of a node device provided in this application;
[0036] Figure 4 This is a schematic diagram of the computer storage medium provided in this application;
[0037] Figure 5 This is a schematic diagram of the structure of a node device provided in this application. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0039] Figure 1 The network architecture of the Mesh network that can be applied to this application is shown.
[0040] like Figure 1 As shown, the network architecture can include: multiple node devices that communicate with each other via a wireless WiFi protocol. The Mesh network has a tree structure, with node device 0 as the root node. Node device 0 has two child nodes: node device 1 and node device 2. Node device 1 has two child nodes: node device 11 and node device 12. Node device 2 has a child node 21. When a node device needs to join... Figure 1 When there is an existing Mesh network, a candidate parent node is selected for association according to the path selection method of this application.
[0041] It should be understood that Figure 1 The number of nodes and network topology shown are for illustrative purposes only. Configuration should be based on implementation requirements.
[0042] The following will be combined with the appendix Figure 2 This application provides a detailed description of the transmission path selection method for Mesh networks according to embodiments. The node devices in these embodiments can be... Figure 1 The node device shown.
[0043] Please see Figure 2 This is a flowchart illustrating a method for selecting a transmission path in a Mesh network, as provided in this application embodiment. Figure 2 As shown, the method described in this application embodiment may include the following steps:
[0044] S201. The current node receives a management frame sent by an online node in the existing Mesh network. The management frame carries the link depth, link delay, number of child nodes, link load, and sender MAC address of the sending node.
[0045] The current node can be an offline node, or it can be a node at a specified location. For example, if the current node is the online node with the largest link depth in the mesh network, it can periodically execute S202-S209 to dynamically update the mesh network topology. To access an existing mesh network, the current node needs to actively listen for management frames sent by online nodes. Management frames play a management role in the mesh network, carrying a series of key information about the sending node. BEACON frames and probe response frames are two common types of management frames. BEACON frames are typically broadcast periodically by nodes in the network to announce the network's existence, synchronize node clocks, and provide basic network configuration information. Probe response frames are response frames returned by the probed node after a node initiates a probe request. By receiving these management frames, the current node can obtain information such as the sending node's link depth, link delay, number of child nodes, link load, and the sender's MAC address. Link depth reflects the hierarchical relationship between the sending node and the root node. The closer to the root node, the smaller the link depth, which usually means fewer hops for data transmission to the root node. Link latency represents the data transmission delay between the sending node and the root node. The smaller the latency, the better the real-time performance of data transmission. The number of child nodes reflects the number of child nodes currently associated with the sending node. Too many child nodes may lead to excessive node load. Link load represents the maximum load of each sub-link between the sending node and the root node. Excessive load may affect the efficiency of data transmission. The sending node's MAC address is used to uniquely identify the sending node.
[0046] S202. Parse the received management frame and generate a list of candidate parent nodes based on the sender's MAC address carried in the management frame.
[0047] Upon receiving a management frame, the current node needs to parse the data within the frame to extract useful information. This parsing process involves recognizing the management frame format and extracting the data, ensuring accurate acquisition of the sender's MAC address and other relevant parameters. Based on the parsed sender MAC address, the current node identifies these online nodes as candidate parent nodes and generates a candidate parent node list. This candidate parent node list forms the basis for subsequent selection of the target parent node and contains information on all online nodes that could potentially become the current node's parent. During list generation, each candidate parent node needs to be marked for easy operation and analysis later.
[0048] For example, after receiving management frames from multiple online nodes, the current node begins parsing these frames. For instance, for the node with the MAC address 00:1A:2B:3C:4D:5E mentioned earlier, the current node records its information and marks it as candidate parent node 1. Simultaneously, it receives another management frame from a node with the MAC address 00:1A:2B:3C:4D:5F, parses out its relevant information, and marks it as candidate parent node 2. After multiple receptions and parsings, the current node generates a list containing multiple candidate parent nodes, such as candidate parent node 1 (MAC address 00:1A:2B:3C:4D:5E), candidate parent node 2 (MAC address 00:1A:2B:3C:4D:5F), etc.
[0049] S203. Measure the received signal strength between the current node and the candidate parent node, and use the measurement result as the link received signal strength.
[0050] The current node needs to measure the Received Signal Strength (RSSI) between itself and its candidate parent node. Received signal strength is a crucial indicator of wireless link quality, reflecting signal attenuation during transmission. The current node sends a probe signal to the candidate parent node via its own wireless module and receives the signal returned by the candidate parent node. During signal reception, the wireless module measures the signal strength to obtain the link's received signal strength value. A higher received signal strength value generally indicates better signal quality and higher data transmission reliability. However, it's important to note that received signal strength is affected by various factors, such as distance, obstacles, and electromagnetic interference; therefore, it cannot be used alone to comprehensively evaluate link quality.
[0051] In some possible embodiments of this application, nodes in the candidate parent node list that receive signal strength less than a first strength threshold are proposed.
[0052] The preset first strength threshold is determined based on a comprehensive consideration of factors such as network design requirements, actual environmental conditions, and communication quality standards. For example, in a small indoor mesh network, considering the short signal propagation distance and relatively little interference, the strength threshold can be set to -70dBm; while in a large outdoor mesh network, due to the long signal propagation distance and the potential presence of more interference sources, the strength threshold might be set to -85dBm. This threshold serves to filter out candidate parent nodes whose signal quality meets basic communication requirements.
[0053] The current node continuously monitors the received signal strength of each candidate parent node. Once the RSSI value of a candidate parent node is obtained, it is compared with a preset first strength threshold. This is because signal strength directly affects the reliability and stability of data transmission. If the signal strength is too weak, data is more susceptible to noise, interference, and other factors during transmission, leading to increased bit error rate, data loss, and other problems, thus affecting the performance of the entire network.
[0054] If the received signal strength of a candidate parent node is found to be less than the strength threshold, the current node will determine that the candidate parent node cannot provide a stable and reliable communication connection in the current network environment. To optimize the subsequent parent node selection process, the current node will remove the candidate parent node from the candidate parent node list. For example, suppose the current node has collected information on 5 candidate parent nodes, and after signal strength monitoring, it finds that one of the candidate parent nodes has an RSSI value of -90dBm, while the preset first strength threshold is -85dBm. Then, the current node will remove this candidate parent node with an RSSI value of -90dBm from the list.
[0055] The elimination operation in this application is based on a comprehensive consideration of network performance and communication quality. By excluding candidate parent nodes with weak signal strength, unnecessary calculations and analyses of these unsuitable nodes can be avoided during the subsequent parent node selection process, thereby saving computational resources.
[0056] During the parent node selection process, the current node typically needs to perform a series of complex evaluations and calculations on candidate parent nodes, such as calculating metrics like link load, signal latency, and packet error rate, and then ranking and selecting based on these metrics. If the candidate parent node list contains a large number of nodes with weak signal strength, performing these calculations on these nodes will waste a significant amount of computing resources and time.
[0057] By removing candidate parent nodes whose received signal strength is below a threshold, the length of the candidate parent node list is shortened accordingly. This reduces the amount of data to be processed in subsequent calculations, lowering computational complexity and effectively reducing the computational load. For example, instead of calculating five candidate parent nodes, removing one reduces the load to four, a 20% reduction.
[0058] By comparing the received signal strength of candidate parent nodes with a strength threshold at the current node, and removing candidate parent nodes with signal strength below the threshold from the list, the computational load in the subsequent parent node selection process can be significantly reduced. This not only improves the processing efficiency of the current node and reduces energy consumption, but also speeds up the parent node selection process, enabling the current node to establish stable communication connections more quickly, thereby improving the performance and response speed of the entire mesh network. Simultaneously, this filtering mechanism also helps improve the reliability of network connections because excluding candidate parent nodes with poor signal quality reduces the possibility of communication failures caused by signal problems.
[0059] S204. Measure the signal delay between the current node and the candidate parent node, and sum the measured signal delay with the resolved link delay of the parent node to obtain the final link delay.
[0060] The current node not only needs to measure the signal delay with the candidate parent node, but also needs to combine this with the link delay of the parent node parsed from the management frame to calculate the final link delay. Signal delay refers to the time required for a signal to travel from the current node to the candidate parent node. The current node can measure signal delay by sending specific test data packets and recording the timestamps of sending and receiving. The link delay parsed from the management frame is the transmission delay between the candidate parent node and the root node. Adding the two together yields the final link delay from the current node to the root node via the candidate parent node. The final link delay reflects the total time it takes for data to travel from the current node to the root node; the smaller the delay, the better the real-time performance of data transmission.
[0061] For example: The current node sends a test data packet to candidate parent node 1 (MAC address 00:1A:2B:3C:4D:5E), recording the sending time as 10:00:00. Candidate parent node 1 immediately returns a response data packet upon receiving it, with the current node recording the reception time as 10:00:02. The calculated signal delay is 2ms. The link delay of candidate parent node 1, parsed from previously received management frames, is 20ms. Adding these two together, the final link delay is 22ms. For candidate parent node 2 (MAC address 00:1A:2B:3C:4D:5F), the current node measures a signal delay of 3ms and parses a link delay of 18ms, resulting in a final link delay of 21ms.
[0062] In some embodiments of this application, the process of measuring the signal delay between the current node and the candidate parent node includes:
[0063] The current node generates a series of specific test data packets. These packets typically contain specific information for identification and recording, such as the packet sequence number and sending timestamp. The current node then sends these test data packets to its parent node sequentially at regular time intervals using its own wireless communication module. The choice of time interval requires consideration of several factors. Too short an interval may lead to network congestion, affecting the accuracy of the test results; too long an interval will prolong the measurement time and reduce measurement efficiency. For example, in a relatively stable mesh network environment, a test data packet can be sent every 100 milliseconds, and a certain number of packets (e.g., 10) can be sent to ensure sufficient data is acquired to calculate signal delay.
[0064] Upon receiving a test data packet from the current node, the candidate parent node immediately records the reception timestamp and sends this information back to the current node. After receiving the feedback from the parent node, the current node can calculate the transmission duration of each data packet based on its send and receive timestamps. The send timestamp is the time recorded when the current node sends the data packet, and the receive timestamp is the time recorded when the parent node receives the data packet; the difference between the two is the transmission duration. Due to the instability of the network environment, the transmission duration of each data packet may vary. For example, during transmission, factors such as signal interference and network congestion may cause some data packets to take longer to transmit. Therefore, it is necessary to collect the transmission duration of multiple data packets for more accurate subsequent calculations.
[0065] To eliminate the randomness of individual data packet transmission durations and improve the accuracy of signal delay measurement, the current node needs to average the transmission durations of all statistically obtained data packets. The averaging method involves adding the transmission durations of all data packets and then dividing by the total number of data packets. The average obtained in this way more accurately reflects the signal delay between the current node and its parent node. For example, if the calculated average transmission duration is 21.3 milliseconds, then the signal delay between the current node and its candidate parent node can be considered to be approximately 21.3 milliseconds.
[0066] S205. Measure the link load between the current node and the parent node, and take the maximum value between the calculated link load and the resolved link load of the parent node to obtain the final link load.
[0067] The current node needs to measure the link load between itself and the candidate parent node, and compare the calculated link load with the resolved link load of that parent node, taking the maximum of the two as the final link load. Link load reflects the busyness of the link, usually expressed as the amount of data transmitted over a certain period. The current node can measure the link load by monitoring the data traffic between itself and the candidate parent node. The link load resolved from the management frame is the maximum load of each child link between the candidate parent node and the root node. Taking the maximum of the two as the final link load ensures that the busiest part of the entire link is considered, avoiding the selection of an excessively loaded link, which would affect data transmission efficiency.
[0068] For example: The current node monitors the data traffic between itself and candidate parent node 1 (MAC address 00:1A:2B:3C:4D:5E). After a period of statistical analysis, the calculated link load is 60%. However, parsing from previously received management frames, the link load of candidate parent node 1 is 70%. Comparing the two, the higher value, 70%, is taken as the final link load. For candidate parent node 2 (MAC address 00:1A:2B:3C:4D:5F), the current node measures a link load of 50%, and the parsed link load is 65%, resulting in a final link load of 65%.
[0069] S206. Normalize the received signal strength, final link delay, final link load, and number of resolved child nodes.
[0070] Because metrics such as link received signal strength, final link delay, final link load, and the number of resolved child nodes have different units and dimensions, direct comparison and calculation may lead to inaccurate results. Therefore, it is necessary to normalize these metrics to convert them to the same dimensional range. There are many methods for normalization, such as linear normalization and Z-score normalization. Through normalization, the values of each metric can be mapped to a specific interval (such as [0,1]), making different metrics comparable and providing a basis for subsequent comprehensive score calculation.
[0071] In some possible embodiments of this application, the normalization process includes:
[0072] The resolved link depth, link received signal strength, final link delay, final link load, and number of resolved child nodes are normalized according to the following formula:
[0073] x normal ={1-(xx min ) / (x max -x min+α)}, where x represents the index value before normalization, x min x represents the preset minimum index value. min This represents the preset maximum index value, α represents the preset constant value, and x represents the preset maximum index value. norma l represents the normalized index value.
[0074] In a mesh network, when evaluating and selecting a parent node, the current node considers multiple metrics, including link depth, received signal strength, final link latency, final link load, and the number of child nodes resolved. However, the physical meaning and value range of these metrics vary. For example, link depth is usually a non-negative integer representing the number of hops from the current node to the root node, and its value may gradually increase from 1; received signal strength is generally expressed in dBm and is a negative number, ranging from -100dBm to 0dBm; link latency is usually expressed in milliseconds and can range from a few milliseconds to several hundred milliseconds; link load is a percentage value, ranging from 0% to 100%; and the number of child nodes is a positive integer, with its value depending on the network size and the node's connectivity.
[0075] Because these metrics have different value ranges and units, it is unreasonable to directly evaluate and compare them comprehensively. For example, one cannot simply add the link depth value and the link received signal strength value to compare the merits of different parent nodes. Therefore, these metrics need to be normalized to the same value range, usually the [0,1] interval, in order to conduct a fair and reasonable comprehensive evaluation.
[0076] The core idea of the normalization process in this application is to map the original index value x to the interval [0,1]. First, calculate x and x... min The difference (xx) min This represents the degree of deviation of the current indicator value from the minimum value. Then, x is calculated. max With x min The difference (x) max -x min This represents the range of values for the indicator. To prevent the denominator from being zero, a constant value α is introduced. By dividing the degree of deviation by the range of values (after adding α), a relative proportion is obtained. Finally, subtracting this relative proportion from 1 yields the normalized value x. normal .
[0077] x min and x max It is preset based on the actual needs and performance characteristics of the network. For example, regarding the link received signal strength, if the network design requires normal communication between -90dBm and -30dBm, then x can be preset.min = -90dBm, x max = -30dBm. α is a very small positive number, its purpose being to avoid... max and x min When the values are equal, a denominator of zero leads to a calculation error. Additionally, α can be used to fine-tune the normalization result, making it more consistent with actual needs.
[0078] When x = x min At that time, x normal =1 indicates that the index is in its optimal state; when x = x max At that time, x normal =0 indicates that the indicator is in its worst state; when x is at x min and x max Between, x normal The value is between 0 and 1, reflecting the relative quality of the indicator.
[0079] The following provides examples of the normalization process for each indicator value.
[0080] Link depth: Assuming a preset minimum link depth x min =1, maximum link depth x max =5, α=0.1. If the link depth x of a candidate parent node is 3, then the normalized link depth x normal =1-(3-1) / (5-1+0.1)=1-4.12≈0.51.
[0081] Link received signal strength: preset x min = -90dBm, x max = -30dBm, α = 0.1. If the link received signal strength x = -60dBm for a candidate parent node, then the normalized link received signal strength x normal =1-(-60-(-90)) / (-30-(-90)+0.1)=1-60.130≈0.50.
[0082] Final link delay: Assume x min =10ms, x max =200ms, α=0.1. When the final link delay x of a candidate parent node is 50ms, the normalized final link delay x normal =1-(50-10) / (200-10+0.1)=1-190.140≈0.79.
[0083] Final link load: preset x min =0%, x max =100%, α = 0.1. If the final link load x of a candidate parent node is 30%, then the normalized final link load x is 100%, α = 0.1.normal =1-(30-0) / (100-0+0.1)=1-100.130≈0.70.
[0084] Number of child nodes: Assume x min =0, x max =10, α=0.1. When the number of child nodes of a candidate parent node is x=5, the normalized number of child nodes is x. normal =1-(5-0) / (10-0+0.1)=1-10.15≈0.50.
[0085] By using the normalization formula described above to normalize metrics such as link depth, received signal strength, final link delay, final link load, and number of child nodes, the current node can uniformly convert metrics with different value ranges and units to the [0,1] interval. This allows these metrics to be compared and comprehensively evaluated on the same scale, providing a fair and reasonable basis for subsequent parent node selection. Normalization eliminates the dimensional differences between metrics, improving the accuracy and reliability of the evaluation, and helping the current node select a higher-performing parent node, thereby improving the performance and stability of the entire Mesh network. Simultaneously, the normalized metrics also facilitate weighted summation and other comprehensive calculations, further optimizing the parent node selection algorithm.
[0086] S207. The normalized index values are weighted and summed to obtain the comprehensive score of each candidate parent node.
[0087] To comprehensively consider the impact of multiple indicators such as link received signal strength, final link delay, final link load, and number of child nodes on candidate parent nodes, a weighted sum of the normalized indicator values is required to obtain a comprehensive score for each candidate parent node. The weights for the summation can be set according to actual needs, with different weights reflecting the importance of each indicator in the comprehensive score. For example, if real-time data transmission is prioritized, the weight of link delay can be set higher; if network load balancing is prioritized, the weight of link load can be set higher. Through weighted summation, a comprehensive score reflecting the merits of the candidate parent nodes can be obtained.
[0088] For example: Assume the weight of the received link signal strength is 0.3, the weight of the final link delay is 0.2, the weight of the final link load is 0.3, and the weight of the number of child nodes is 0.2. For candidate parent node 1, the normalized received link signal strength is 0.417, the final link delay is 0.22, the final link load is 0.7, and the number of child nodes is 0.25. Therefore, its overall score is 0.417*0.3 + 0.22*0.2 + 0.7*0.3 + 0.25*0.2 = 0.4451. Similarly, calculate the overall score for candidate parent node 2.
[0089] In some possible embodiments of this application, the weights of each indicator value are dynamically adjusted according to the business scenario:
[0090] When the measured received signal strength value of the link is less than the second strength threshold but greater than the first strength threshold, the weight of the received signal strength of the link is reduced according to the preset weight adjustment rules.
[0091] When the calculated final link load exceeds the load threshold, the weight of the final link load is increased according to the preset weight adjustment rules.
[0092] In the actual operation of a Mesh network, different business scenarios have significantly different requirements for network performance indicators. For example, for video call services with extremely high real-time requirements, link latency and signal strength are key indicators, because unstable signals or excessive latency can lead to problems such as video stuttering and audio desynchronization, seriously affecting the user experience. For file download services with large data transfer volumes, link load and bandwidth utilization are more important, as high load can slow down download speeds or even cause download failures. Therefore, the current node needs to dynamically adjust the weights of various indicator values according to the current business scenario to ensure that the selection of the parent node better meets the business needs.
[0093] The current node monitors the received signal strength of the link. When the measured received signal strength is less than a second strength threshold but greater than a first strength threshold, it means the current signal strength is in a relatively unstable range. For example, assuming the first strength threshold is -85dBm and the second strength threshold is -75dBm, a measured received signal strength of -80dBm would meet the trigger condition. In this case, although basic communication can still be maintained, the signal quality is relatively poor and susceptible to external interference, leading to reduced data transmission reliability.
[0094] According to the preset weighting rules, the current node will reduce the weight of the link's received signal strength. This is because within this signal strength range, simply increasing the signal strength has limited effect on improving overall network performance, while other metrics (such as link latency and link load) may have a more significant impact on services. For example, in video calls, even with a signal strength of around -80dBm, high link latency can still cause video stuttering. Therefore, reducing the weight of the link's received signal strength allows the current node to pay more attention to other metrics that have a greater impact on services during the parent node selection process.
[0095] Assuming the original weight of the received signal strength of the link was 0.3, according to the preset rules, when the signal strength is between -85dBm and -75dBm, the weight is reduced by 0.1, and the adjusted weight becomes 0.2.
[0096] The current node calculates the final link load. When the calculated final link load exceeds the load threshold, it indicates that the current link is already handling a significant amount of data transmission, approaching or exceeding its capacity. For example, assuming the load threshold is 70%, a weight adjustment condition is triggered when the calculated final link load reaches 80%. In this situation, continuing to select this link as the parent node may lead to link congestion, decreased data transmission speed, or even data loss.
[0097] According to preset weight adjustment rules, the current node will have its final link load weight increased. This is because high-load links have a greater impact on services; increasing their weight makes the current node more inclined to choose lower-load links during the parent node selection process, thereby avoiding link congestion and improving data transmission efficiency and stability. For example, in file download services, selecting lower-load links can ensure stable download speeds and reduce download time.
[0098] Adjustment example: Suppose the original final link load weight was 0.2. According to the preset rules, when the link load is greater than 70%, the weight increases by 0.1, and the adjusted weight becomes 0.3.
[0099] By dynamically adjusting the weights of various metrics based on the business scenario, the current node can more accurately select the parent node suitable for the current business. When the signal strength is relatively unstable but still within an acceptable range, reducing the weight of the received signal strength can prevent over-focusing on signal strength while ignoring other important metrics, thereby improving the rationality of the parent node selection. When the link load is high, increasing the weight of the final link load can guide the current node to select a link with a lower load, effectively avoiding link congestion and ensuring the smoothness and stability of data transmission.
[0100] S208. Select the parent node with the highest comprehensive score as the target parent node.
[0101] In this process, based on the calculated comprehensive score of each candidate parent node, the current node selects the parent node with the highest comprehensive score as its target parent node. A higher comprehensive score indicates that the candidate parent node performs better in multiple aspects, such as link received signal strength, final link delay, final link load, and the number of child nodes, making it more suitable as the current node's parent. Selecting the target parent node is a crucial step for the current node to access the Mesh network, directly impacting the quality and efficiency of subsequent data transmission.
[0102] For example: Suppose that the overall score of candidate parent node 1 is 0.4451 and the overall score of candidate parent node 2 is 0.42. Since the overall score of candidate parent node 1 is higher, the current node will choose candidate parent node 1 (MAC address 00:1A:2B:3C:4D:5E) as the target parent node.
[0103] S209. Associate with the target parent node. After successful association, send a management frame carrying the link depth, link delay, number of child nodes, link load and its own MAC address through the broadcast channel.
[0104] After selecting a target parent node, the current node needs to establish an association with it. This association process typically involves sending an association request frame and the target parent node returning an association response frame. Through the interaction of these frames, a communication connection is established between the current node and the target parent node. Once the association is successful, the current node officially becomes part of the mesh network. To announce its existence and provide relevant information to other nodes in the network, the current node broadcasts a management frame carrying link depth, link delay, number of child nodes, link load, and its own MAC address. Upon receiving this management frame, other nodes can update their network topology information for subsequent data transmission and network management.
[0105] In some possible embodiments of this application, the management frame is a BEACON frame or a probe response frame. The current node periodically sends BEACON frames through a broadcast channel, and responds with a probe response frame when it receives a probe request frame sent by an offline node. Both the BEACON frame and the probe response frame carry the link depth, link delay, number of child nodes, link load and its own MAC address.
[0106] For example: The current node sends an association request frame to the target parent node 1 (MAC address 00:1A:2B:3C:4D:5E). After receiving the request, the target parent node 1 checks its own resource status. If it allows the current node to access, it returns an association response frame. After receiving the response frame, the current node's association is successful. Subsequently, the current node generates a management frame, which includes its own link depth (assumed to be 4, because accessing through the target parent node 1 results in a link depth 1 greater than the target parent node 1), link latency (22ms), number of child nodes (initially 0), link load (initially 0%), and its own MAC address (assumed to be 00:1A:2B:3C:4D:60), and sends it out via the broadcast channel.
[0107] In some possible embodiments of this application, calculating the link load of the current node includes:
[0108] Calculate the queue load of the current node: (current node's send queue length / current node's maximum queue length) * 100%;
[0109] Calculate the packet error rate load of the current node: (number of packet errors in the current node / total number of packets sent by the current node) * 100%;
[0110] Calculate the RSSI load of the current node: {1-(RSSI-RSSI)} min ) / (RSSI max -RSSI min )}*100%, RSSI represents the RSSI of the parent node measured by the current node. min Indicates the preset minimum signal strength, RSSI max Indicates the preset maximum signal strength;
[0111] The link load of the current node is obtained by taking a weighted average of the three calculation results above.
[0112] In the network communication process of the current node, the sending queue plays a crucial role. The sending queue stores data packets to be sent, and its length reflects the amount of data the current node needs to send. The maximum queue length of the current node is a threshold preset during node design or configuration; it represents the maximum number of data packets the node can handle. By calculating the ratio of the current node's sending queue length to the maximum queue length and multiplying it by 100%, the queue load percentage of the current node can be obtained. This percentage directly reflects the occupancy of the current node's sending queue. A high queue load indicates that the current node has many data packets waiting to be sent, which may lead to increased data transmission latency because data packets need to queue for processing. For example, when network traffic suddenly increases, a large number of data packets flood the sending queue, the queue length increases rapidly, and the queue load also rises, which may affect the efficiency of data interaction between the node and other nodes.
[0113] For example: Suppose the maximum queue length of the current node is 100 data packets, and the sending queue currently contains 30 data packets. Then the queue load calculation formula is (30 / 100)*100% = 30%. This indicates that the current node's sending queue has already occupied 30% of its capacity.
[0114] Packet error rate (PER) is a crucial indicator of data transmission quality. During data transmission at the current node, various factors, such as signal interference, excessive transmission distance, and equipment failure, can cause some data packets to be erroneous and fail to be received correctly. The number of packet errors at the current node refers to the number of data packets sent but not correctly received within a certain time period; the total number of packets sent by the current node refers to all data packets sent by the current node within the same time period. By calculating the ratio of the number of packet errors to the total number of packets sent and multiplying it by 100%, the packet error rate load percentage of the current node can be obtained. A higher packet error rate load indicates a more severe error situation during data transmission. This not only leads to data retransmission and increased network overhead but may also affect data integrity and accuracy. For example, in a high-interference environment, the packet error rate may increase significantly, and the packet error rate load will increase accordingly, thus affecting the performance of the entire network.
[0115] For example: Suppose that the current node sends a total of 500 data packets in one minute, of which 25 packets are corrupted during transmission and not received correctly. Then the packet error rate load is calculated as (25 / 500) * 100% = 5%. This indicates that the current node's packet error rate load is 5%.
[0116] RSSI (Received Signal Strength Indication) reflects the strength of the wireless signal between the current node and its parent node. The preset minimum signal strength (RSSI) is... min ) and maximum signal strength (RSSI) max RSSI is a range defined based on network design requirements and actual environmental conditions. min RSSI indicates the minimum signal strength required to guarantee normal communication; values below this may lead to decreased communication quality or even interruption. max This represents the theoretically maximum signal strength that can be received. It is calculated by {1-(RSSI-RSSI)} min ) / (RSSI max -RSSI min Multiplying the result by 100% will give you the RSSI load percentage for the current node. This formula maps the RSSI value to a load percentage; the closer the RSSI value is to the RSSI load percentage, the higher the load percentage will be. min At this time, a higher RSSI load indicates poorer signal quality, which may affect the stability and reliability of data transmission; when the RSSI value is closer to RSSI... max In general, a lower RSSI load indicates better signal quality. For example, if the distance between the current node and its parent node is large or there are obstacles blocking the signal, the RSSI value will decrease and the RSSI load will increase, thus increasing the risk of data transmission problems.
[0117] For example: Assume a preset RSSI min -90dBm, RSSI max The current node's RSSI is -30dBm, and the current node's measured RSSI is -70dBm. Therefore, the formula for calculating RSSI load is {1-(-70-(-90)) / (-30-(-90))}*100%={1-(-20) / 60}*100%≈66.67%. This indicates that the current node's RSSI load is approximately 66.67%.
[0118] To comprehensively consider the impact of queue load, packet error rate load, and RSSI load on the current node's link, a weighted average of the three calculation results is required. The weights for this weighted average can be set according to actual needs, with different weights reflecting the importance of each load indicator in the link load. For example, if greater emphasis is placed on data transmission accuracy, the weight of packet error rate load can be set higher; if greater emphasis is placed on signal quality, the weight of RSSI load can be set higher. The link load of the current node calculated through weighted averaging can more comprehensively and accurately reflect the current node's link busyness and communication quality.
[0119] For example: Assume the weight of queue load is 0.3, the weight of packet error rate load is 0.4, and the weight of RSSI load is 0.3. We have already calculated that the queue load is 30%, the packet error rate load is 5%, and the RSSI load is approximately 66.67%. Therefore, the link load of the current node is approximately 30% * 0.3 + 5% * 0.4 + 66.67% * 0.3 ≈ 30%.
[0120] Calculating the link load of the current node using the method described above comprehensively considers multiple factors related to link performance, including data transmission queue occupancy, data transmission error rate, and signal strength. This makes the assessment of link load more comprehensive and accurate, helping the current node better understand its own network status. In practical applications, accurate link load information can help nodes allocate resources more rationally, such as adjusting the data transmission rate based on link load and selecting a more suitable parent node, thereby improving network stability and data transmission efficiency, reducing data loss and transmission latency, and enhancing the overall performance of the mesh network.
[0121] This application includes the following beneficial effects:
[0122] This approach considers not only the received signal strength but also multiple key metrics such as link depth, link delay, number of child nodes, and link load. Link depth reflects the distance from a node to the root node, link delay reflects the timeliness of data transmission, the number of child nodes is related to the network topology and node load capacity, and link load directly relates to the node's data processing capability. By comprehensively considering these metrics, the link quality between a node and its parent node can be evaluated more comprehensively and accurately, avoiding the limitations of relying solely on the received signal strength.
[0123] When calculating the final link load, the maximum value between the link load of the current node and its parent node and the resolved link load of the parent node is taken, fully considering the overall load of the parent node. This ensures that when selecting a target parent node, nodes with lower loads are preferred, avoiding those already under high load.
[0124] Each time a node connects, it re-receives the management frames sent by the online nodes, parses the relevant information, and recalculates the comprehensive score of each candidate parent node. This means that even if the network environment changes, such as the movement of other nodes or the appearance or disappearance of obstacles, causing changes in the signal strength and link quality of a certain parent node, the new method can promptly detect and re-evaluate the merits of each candidate parent node, and select the most suitable parent node at the current moment.
[0125] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0126] Please see Figure 3 This illustration shows a schematic diagram of a node device provided in an exemplary embodiment of this application, hereinafter referred to as device 3. Device 3 can be implemented as all or part of the node device through software, hardware, or a combination of both. Device 3 includes: a transceiver unit 301, a parsing unit 302, a measurement unit 303, a normalization unit 304, and a selection unit 305.
[0127] The transceiver unit 301 is used to receive management frames sent by online nodes in an existing Mesh network. The management frame carries the link depth, link delay, number of child nodes, link load, and sender MAC address of the sending node. The link depth represents the distance between the sending node and the root node, the link delay represents the transmission delay between the sending node and the root node, the number of child nodes represents the number of child nodes associated with the sending node, and the link load represents the maximum load of each sub-link between the sending node and the root node.
[0128] The parsing unit 302 is used to parse the received management frame and generate a candidate parent node list based on the sender MAC address carried in the management frame; the candidate parent node list includes multiple candidate parent nodes.
[0129] Measurement unit 303 is used to measure the received signal strength between the current node and the candidate parent node, and use the measurement result as the link received signal strength;
[0130] The measurement unit 303 is also used to measure the signal delay between the current node and the parent node, and to sum the measured signal delay and the resolved link delay of the parent node to obtain the final link delay;
[0131] The measurement unit 303 is also used to measure the link load between the current node and the parent node, and to take the maximum value between the calculated link load and the resolved link load of the parent node to obtain the final link load.
[0132] The normalization unit 304 is used to normalize the resolved link depth, link received signal strength, final link delay, final link load and the number of resolved child nodes.
[0133] Selection unit 305 is used to perform weighted summation of the normalized index values to obtain the comprehensive score of each candidate parent node, and to select the parent node with the largest comprehensive score as the target parent node.
[0134] The transceiver unit 301 is also used to associate with the target parent node. After successful association, it sends a management frame carrying the link depth, link delay, number of child nodes, link load and its own MAC address to the outside through the broadcast channel.
[0135] In one or more possible embodiments, measuring the link load between the current node and the parent node includes:
[0136] Calculate the queue load of the current node: (current node's send queue length / current node's maximum queue length) * 100%;
[0137] Calculate the packet error rate load of the current node: (number of packet errors in the current node / total number of packets sent by the current node) * 100%;
[0138] Calculate the RSSI load of the current node: {1-(RSSI-RSSI)} min ) / (RSSI max -RSSI min )}*100%, RSSI represents the RSSI of the parent node measured by the current node. min Indicates the preset minimum signal strength, RSSI max Indicates the preset maximum signal strength;
[0139] The link load of the current node is obtained by taking a weighted average of the three calculation results above.
[0140] In one or more possible embodiments, measuring the signal delay between the current node and the parent node includes:
[0141] The current node sends multiple test data packets to the parent node;
[0142] Calculate the transmission time of each data packet;
[0143] The signal delay is obtained by averaging the statistical transmission durations.
[0144] In one or more possible embodiments, the resolved link depth, link received signal strength, final link delay, final link load, and resolved number of child nodes are normalized according to the following formula:
[0145] x normal ={1-(xx min ) / (x max -x min +α)}, where x represents the index value before normalization, xmin represents the preset minimum index value, xmin represents the preset maximum index value, and α represents the preset constant value, x normal This represents the normalized index value.
[0146] In one or more possible embodiments, it also includes:
[0147] The deletion unit is used to remove the candidate parent node from the candidate parent node list if the received signal strength of the candidate parent node is less than a first strength threshold.
[0148] In one or more possible embodiments, the weights of each indicator value are dynamically adjusted according to the business scenario:
[0149] When the measured received signal strength value of the link is less than the second strength threshold but greater than the first strength threshold, the weight of the received signal strength of the link is reduced according to the preset weight adjustment rules.
[0150] When the calculated final link load exceeds the load threshold, the weight of the final link load is increased according to the preset weight adjustment rules.
[0151] In one or more possible embodiments, the step of transmitting a management frame carrying link depth, link delay, number of child nodes, link load, and its own MAC address via a broadcast channel includes:
[0152] BEACON frames are periodically transmitted in the broadcast channel; the management frames are either BEACON frames or probe response frames.
[0153] When a probe request frame is received from an offline node, a probe response frame is executed.
[0154] It should be noted that the device 3 provided in the above embodiments, when executing the transmission path selection method for a Mesh network, is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the above functions. In addition, the node device provided in the above embodiments and the transmission path selection method embodiments for Mesh networks belong to the same concept, and its implementation process is detailed in the method embodiments, which will not be repeated here.
[0155] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0156] See Figure 4 This application provides a computer storage medium, which can be a disk, optical disk, magnetic tape, or USB flash drive, etc. The computer storage medium can store multiple instructions (i.e., computer programs), which are adapted to be loaded and executed by a processor as described above. Figure 1 The method steps of the illustrated embodiment can be found in the following documentation for detailed execution. Figure 1 The specific details of the illustrated embodiments will not be elaborated here.
[0157] This application also provides a computer program product that stores at least one instruction, which is loaded and executed by the processor to implement the transmission path selection method for the Mesh network as described in the above embodiments.
[0158] Please see Figure 5 This document provides a schematic diagram of the structure of a node device according to an embodiment of this application. Figure 5 As shown, the node device 500 may include: at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502.
[0159] The communication bus 502 is used to enable communication between these components.
[0160] The user interface 503 is used to perform user interaction operations, such as a touch screen, display screen, keyboard and other input / output devices.
[0161] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0162] The processor 501 may include one or more processing cores. The processor 501 connects to various parts within the node device 500 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 505, and by calling data stored in the memory 505. Optionally, the processor 501 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 501 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 501 and may be implemented as a separate chip.
[0163] The memory 505 may include random access memory (RAM) or read-only memory. Optionally, the memory 505 may include a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 505 may also be at least one storage device located remotely from the aforementioned processor 501. Figure 5 As shown, the memory 505, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and application programs.
[0164] exist Figure 5 In the node device 500 shown, the user interface 503 is mainly used to provide an input interface for the user and obtain user input data; while the processor 501 can be used to call the application program stored in the memory 505 and specifically execute, such as Figure 2 The method shown can be referred to for details. Figure 2 As shown, it will not be elaborated further here.
[0165] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.
[0166] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A method for selecting transmission paths in a mesh network, characterized in that, include: Receive management frames sent by online nodes in an existing Mesh network. The management frame carries the link depth, link delay, number of child nodes, link load, and sender MAC address of the sending node. The link depth represents the distance between the sending node and the root node, the link delay represents the transmission delay between the sending node and the root node, the number of child nodes represents the number of child nodes associated with the sending node, and the link load represents the maximum load of each sub-link between the sending node and the root node. Parse the received management frames and generate a list of candidate parent nodes based on the sender's MAC address carried in the management frames; The candidate parent node list includes multiple candidate parent nodes; Measure the received signal strength between the current node and the candidate parent node, and use the measurement result as the link received signal strength; Measure the signal delay between the current node and the parent node, and sum the measured signal delay with the resolved link delay of the parent node to obtain the final link delay; Measure the link load between the current node and the parent node, and take the maximum value between the calculated link load and the resolved link load of the parent node to obtain the final link load; The resolved link depth, link received signal strength, final link delay, final link load, and number of resolved child nodes are normalized. The weighted sum of the normalized index values is used to obtain the comprehensive score of each candidate parent node. The parent node with the highest overall score will be the target parent node. It associates with the target parent node. After successful association, it sends a management frame carrying the link depth, link delay, number of child nodes, link load and its own MAC address to the outside world through the broadcast channel.
2. The method according to claim 1, characterized in that, The measurement of link load between the current node and the parent node includes: Calculate the queue load of the current node: (current node's send queue length / current node's maximum queue length) * 100%; Calculate the packet error rate load of the current node: (number of packet errors in the current node / total number of packets sent by the current node) * 100%; Calculate the RSSI load of the current node: {1-(RSSI-RSSI)} min ) / (RSSI max -RSSI min )}*100%, RSSI represents the RSSI of the parent node measured by the current node. min Indicates the preset minimum signal strength, RSSI max Indicates the preset maximum signal strength; The link load of the current node is obtained by taking a weighted average of the three calculation results above.
3. The method according to claim 1 or 2, characterized in that, The measurement of signal delay between the current node and the parent node includes: The current node sends multiple test data packets to the parent node; Calculate the transmission time of each data packet; The signal delay is obtained by averaging the statistical transmission durations.
4. The method according to claim 3, characterized in that, The resolved link depth, link received signal strength, final link delay, final link load, and number of resolved child nodes are normalized according to the following formula: x normal ={1-(xx min ) / (x max -x min +α)}, where x represents the index value before normalization, x min x represents the preset minimum index value. max This represents the preset maximum index value, α represents the preset constant value, and x represents the preset maximum index value. normal This represents the normalized index value.
5. The method according to claim 4, characterized in that, Also includes: If the received signal strength of a candidate parent node is less than a first strength threshold, the candidate parent node is removed from the candidate parent node list.
6. The method according to claim 5, characterized in that, Dynamically adjust the weights of each indicator value according to the business scenario: When the measured received signal strength value of the link is less than the second strength threshold but greater than the first strength threshold, the weight of the received signal strength of the link is reduced according to the preset weight adjustment rules. When the calculated final link load exceeds the load threshold, the weight of the final link load is increased according to the preset weight adjustment rules.
7. The method according to claim 3, 4, or 5, characterized in that, The management frame transmitted outward via the broadcast channel, carrying link depth, link delay, number of child nodes, link load, and its own MAC address, includes: BEACON frames are periodically transmitted in the broadcast channel; the management frames are either BEACON frames or probe response frames. When a probe request frame is received from an offline node, a probe response frame is executed.
8. A node device, characterized in that, include: The transceiver unit is used to receive management frames sent by online nodes in an existing Mesh network. The management frame carries the link depth, link delay, number of child nodes, link load, and sender MAC address of the sending node. The link depth represents the distance between the sending node and the root node, the link delay represents the transmission delay between the sending node and the root node, the number of child nodes represents the number of child nodes associated with the sending node, and the link load represents the maximum load of each sub-link between the sending node and the root node. The parsing unit is used to parse the received management frame and generate a list of candidate parent nodes based on the sender's MAC address carried in the management frame. The candidate parent node list includes multiple candidate parent nodes; The measurement unit is used to measure the received signal strength between the current node and the candidate parent node, and the measurement result is used as the link received signal strength. The measurement unit is also used to measure the signal delay between the current node and the parent node, and to sum the measured signal delay and the resolved link delay of the parent node to obtain the final link delay; The measurement unit is also used to measure the link load between the current node and the parent node, and to take the maximum value between the calculated link load and the resolved link load of the parent node to obtain the final link load. The normalization unit is used to normalize the resolved link depth, link received signal strength, final link delay, final link load, and the number of resolved child nodes. The selection unit is used to perform a weighted summation of the normalized index values to obtain a comprehensive score for each candidate parent node, and to select the parent node with the largest comprehensive score as the target parent node. The transceiver unit is also used to associate with the target parent node. After successful association, it sends a management frame carrying the link depth, link delay, number of child nodes, link load and its own MAC address to the outside through the broadcast channel.
9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as method steps as claimed in any one of claims 1 to 7.
10. A node device, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed the method steps as claimed in any one of claims 1 to 7.