Hybrid networking method and system
By using a hybrid networking approach that combines local short-range self-organizing networks and remote wide area networks, gateway nodes are dynamically elected and data aggregation is performed, solving the problem of low data transmission efficiency for dual-mode terminals and enabling efficient management of data transmission for massive numbers of terminals and complex scenarios.
Patent Information
- Application Number
- CN202511995622.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-03-03
AI Technical Summary
In existing technologies, the data transmission efficiency of dual-mode terminals is limited, making it difficult to efficiently manage a large number of terminals and adapt to complex scenario requirements.
A hybrid networking approach is adopted, which uses a local short-range self-organizing network and a remote wide area network to coordinate networking, dynamically elect gateway nodes, perform data aggregation and compression, optimize routing mechanisms, and achieve efficient data transmission and management.
It improves network reliability and adaptability, reduces network load and terminal power consumption, optimizes system real-time performance, energy efficiency and manageability, and improves data transmission efficiency.
Smart Images

Figure CN121604192A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless communication network technology, and specifically to a hybrid networking method and system. Background Technology
[0002] With the rapid development of IoT technology, Low Power Wide Area Networks (LPWANs) are widely used in fields such as smart metering and environmental monitoring. Existing solutions typically employ a single communication architecture: either relying on a long-range wide area network (such as LoRaWAN) or a local short-range ad hoc network (such as Bluetooth Mesh). However, both of these independent architectures have inherent limitations: while long-range wide area networks (such as LoRaWAN) offer advantages in long distance and low power consumption, they are significantly insufficient in supporting massive node access, achieving low-latency downlink communication, and optimizing overall network energy efficiency. Local short-range ad hoc networks (such as Bluetooth Mesh), while possessing the characteristics of high-speed local communication and flexible node self-organization, have limited communication range and cannot directly transmit remote data back.
[0003] Therefore, the commonly used combination method is the dual-mode terminal mode. However, although the above method integrates two modules, it lacks intelligent collaboration, only superimposed functions, resulting in limited transmission efficiency, inability to efficiently manage massive numbers of terminals, and difficulty in adapting to complex scenario requirements. Summary of the Invention
[0004] This invention provides a hybrid networking method and system to solve the problems of limited data transmission efficiency of dual-mode terminals in the prior art, inability to efficiently manage massive numbers of terminals, and difficulty in adapting to complex scenario requirements.
[0005] In a first aspect, the present invention provides a hybrid networking method, the method comprising: When the terminal node is powered on, two communication modes are enabled. The initial gateway node broadcasts a gateway announcement message via a first communication method; the initial gateway node is a terminal node that connects to the cloud server via a second communication method. The terminal node receives the gateway announcement message and performs a hop count check to determine whether it has become a regional member of the initial gateway node and whether to continue forwarding the gateway announcement message. The target gateway node is selected periodically by the terminal node based on a preset hop count threshold and a real-time weight score. The target gateway node aggregates the data of all nodes within its region that meet the preset conditions to obtain the corresponding aggregated data packet, and then sends the aggregated data packet of the corresponding region to the cloud server.
[0006] This invention provides a hybrid networking method. A dynamic gateway election mechanism enhances network reliability and adaptability. Data aggregation and compression technology based on difference detection effectively filters and merges data from multiple nodes, significantly reducing uplink transmissions and lowering network load and terminal power consumption. Simultaneously, a local and cloud-coordinated routing mechanism supports millisecond-level rapid interaction between devices via local short-distance networks and precise and efficient distribution of downlink commands through gateway aggregation. This expands coverage while comprehensively optimizing system real-time performance, energy efficiency, and manageability, improving data transmission efficiency and solving the problems of limited data transmission efficiency in existing dual-mode terminals, inability to efficiently manage massive numbers of terminals, and difficulty in adapting to complex scenario requirements.
[0007] In one optional implementation, the first communication method is a local short-range ad hoc network for communication between local terminal nodes, and the local short-range ad hoc network is either a Bluetooth Mesh network or a Zigbee network; the second communication method is a remote wide area network for establishing a remote connection with a cloud server, and the remote wide area network is either a LoRaWAN network, an NB-IoT network, or an LTE-Cat.M network.
[0008] The present invention provides a hybrid networking method that achieves complementary advantages through the collaborative networking of local short-range self-organizing networks (such as Bluetooth Mesh or Zigbee) and long-range wide area networks (such as LoRaWAN, NB-IoT or LTE-Cat.M).
[0009] In one optional implementation, the terminal node receives the gateway announcement message and performs a hop count determination to confirm whether it has become a region member of the initial gateway node and whether to continue forwarding the gateway announcement message, including: When a terminal node receives a gateway announcement message, it obtains the number of hops received by the initial gateway node or the previous terminal node, and calculates a new number of hops based on the number of hops received. If the new hop count does not exceed the preset maximum allowed hop count, the terminal node is confirmed as a member of the initial gateway node's region. Simultaneously, it continues to forward gateway announcement messages and updates the new hop count to the region member node's own hop count, forming a logical partition centered on the initial gateway node. This invention provides a hybrid networking method that, based on a preset maximum allowed hop count, allows the network to automatically and accurately delineate logical partition boundaries centered on the gateway node, preventing unlimited region expansion. Nodes only forward announcement messages that do not exceed the hop count threshold, effectively suppressing network flooding and broadcast storms, significantly reducing wireless channel conflicts and energy consumption. Furthermore, this distributed decision-making process enables each node to autonomously and efficiently complete region joining and route construction.
[0010] In one optional implementation, the target gateway node is selected periodically by the terminal node based on a preset hop count threshold and a real-time weight score, including: The terminal node periodically broadcasts status update messages, which include real-time weight scores and its own hop count. The target gateway node is selected based on all status update messages within the logical partition, i.e., the preset hop count threshold and the real-time weight score.
[0011] The present invention provides a hybrid networking method that enables continuous self-optimization of the network by having nodes periodically broadcast status information including real-time weight scores and their own hop count, and making distributed decisions based on a preset hop count threshold. Through comprehensive evaluation of weight scores and limitation of hop count range, nodes with central positions and stable states can be automatically elected as hubs, avoiding single points of failure and optimizing data aggregation paths.
[0012] In one optional implementation, the target gateway node is selected based on all state update messages within the logical partition, i.e., a preset hop count threshold and a real-time weight score, including: From the members of the logical partition, select the member whose number of hops is less than or equal to the preset hops threshold and whose real-time weight score is the highest. If the selected regional member is not the initial gateway node, and its real-time weight score is higher than that of the initial gateway node, then the selected regional member will be determined as the default candidate gateway node for the regional member. Based on the takeover request confirmation message, the candidate gateway node is determined as the target gateway node.
[0013] The present invention provides a hybrid networking method that achieves smooth, accurate and reliable switching of gateway roles through a three-step mechanism of initial screening based on hop count threshold, selection based on weight score, and takeover confirmation and handover.
[0014] In one optional implementation, determining the candidate gateway node as the target gateway node based on the takeover request confirmation message includes: Send a takeover request to the initial gateway node from the candidate gateway node; When the takeover request is confirmed by the initial gateway node, a role change message is broadcast through the candidate gateway node, and the candidate gateway node is converted into the target gateway node based on the role change message, while the initial gateway node is downgraded to a region member.
[0015] The present invention provides a hybrid networking method in which candidate nodes first send takeover requests, enabling the current gateway node to prepare for handover and release resources in an orderly manner; role changes are broadcast only after explicit confirmation is received, avoiding conflicts between dual gateway nodes and network splits caused by information asynchrony; finally, network-wide broadcasting enables all nodes to update their routing tables synchronously, achieving real-time topology convergence.
[0016] In one optional implementation, the target gateway node aggregates the data of all nodes within its region that meet preset conditions to obtain a corresponding aggregated data packet, including: Transmit all node data within the region to the target gateway node for caching, and determine whether the cached data meets the triggering conditions. When the triggering condition is met, a difference detection is performed on the cached data to filter out valid data; The valid data is compressed and encapsulated to generate the corresponding aggregated data packet, and then the aggregated data packet is encrypted to obtain the encrypted aggregated data packet.
[0017] This invention provides a hybrid networking method that, through the synergy of caching and triggering conditions, temporarily stores and processes sporadic data in batches, avoiding frequent small packet transmissions. Intelligent filtering based on multi-dimensional difference detection accurately identifies and eliminates a large amount of unchanged redundant data, ensuring high information density in the reported data. Subsequently, valid data is compressed, encapsulated, and encrypted, reducing air interface load while ensuring transmission security. The core results are a significant reduction in network load, effective saving of terminal energy consumption, and a substantial increase in uplink channel utilization, fundamentally alleviating the network congestion pressure caused by massive terminal access.
[0018] In one optional implementation, determining whether the cached data meets the triggering condition includes: If the amount of cached data exceeds the preset threshold for receiving data, the aggregation condition is deemed met; otherwise, the cached data continues to be received.
[0019] The present invention provides a hybrid networking method that, through the coordination of caching and triggering conditions, temporarily stores and processes sporadic data in batches, thereby avoiding frequent small packet transmissions.
[0020] In one optional implementation, difference detection is performed on the cached data to filter out valid data, including: The cached data undergoes numerical change detection, status word change detection, and time accumulation trigger detection to filter out valid data that exceeds a preset change threshold for numerical changes, status word changes, and / or a silent time threshold. This invention provides a hybrid networking method that systematically achieves accurate filtering of reported data through a triple parallel judgment process involving numerical change, status word change, and time accumulation triggers.
[0021] In a second aspect, the present invention provides a hybrid networking system applied to the hybrid networking method of the first aspect or any corresponding embodiment thereof, the system comprising: The terminal node is an IoT device with dual-mode functionality of local short-range self-organizing network and long-range wide area network; the terminal node is used to receive gateway announcement messages, perform hop count judgment, confirm whether to become a regional member of the initial gateway node, and whether to continue forwarding gateway announcement messages; periodically select target gateway nodes based on preset hop count threshold and real-time weight score; Gateway nodes are special terminal nodes with dual-mode functions of local short-range self-organizing networks and long-range wide area networks. They are elected as cluster heads and are used to aggregate the data of all nodes in their respective areas that meet the preset conditions, obtain the corresponding aggregated data packets, and send the aggregated data packets of the corresponding areas to the cloud server. Remote WAN gateways are standard network infrastructure. The cloud server is a standard cloud platform used to receive and parse aggregated data packets transmitted by gateway nodes through remote WAN gateways.
[0022] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the hybrid networking method of the first aspect or any corresponding embodiment described above.
[0023] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the hybrid networking method of the first aspect or any corresponding embodiment thereof.
[0024] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the hybrid networking method of the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0025] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0026] Figure 1 This is a schematic diagram of the first type of hybrid networking method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a second process for a hybrid networking method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the third process of the hybrid networking method according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the fourth process of the hybrid networking method according to an embodiment of the present invention; Figure 5 This is a structural block diagram of a hybrid networking system according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.
[0029] Currently, related technologies typically employ a single communication architecture: either relying on long-range wide-area networks (such as LoRaWAN) or on local short-range self-organizing networks (such as Bluetooth Mesh). However, both of these independent architectures have inherent limitations. The commonly used combination method is a dual-mode terminal mode, which integrates two modules but lacks intelligent collaboration, merely superimposing functions. This limits transmission efficiency, makes it difficult to efficiently manage massive numbers of terminals, and is hard to adapt to complex scenario requirements.
[0030] This invention provides a hybrid networking method, a hybrid networking method of dynamic gateway election and optimized data aggregation, which realizes dynamic network organization, intelligent data aggregation, and efficient communication management. According to this invention, a hybrid networking method embodiment is provided. It should be noted that the steps shown in the flowcharts can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0031] This embodiment provides a hybrid networking method that can be used in hybrid networking systems with dual-mode BLE (Bluetooth Low Energy) and LoRaWAN (Long Range Wide Area Network) functionality. Figure 1 This is a flowchart of a hybrid networking method according to an embodiment of the present invention, such as... Figure 1As shown, the process includes the following steps: Step S101: When the terminal node is powered on, two communication methods are enabled; the initial gateway node broadcasts a gateway announcement message through the first communication method; the initial gateway node is a terminal node that connects to the cloud server through the second communication method.
[0032] Specifically, the terminal node is a node with dual-mode functionality, possessing both local short-range self-organizing network and long-range wide area network capabilities. Examples include data acquisition and reporting devices, local network relay routers, etc. As mentioned earlier, the first communication method is a local short-range self-organizing network communication method, which can be, for example, a Bluetooth Mesh (i.e., BLE Mesh).
[0033] The second communication method is a remote wide area network (WAN) communication method, such as a LoRaWAN network. After all dual-mode terminal nodes are powered on, their BLE function is activated first, entering an "unpartitioned" state. The terminal node connected to the cloud server via the second communication method serves as the initial gateway node, which periodically broadcasts gateway announcement messages. The gateway announcement message is the core control signaling used for network self-organization and logical partitioning in this hybrid networking scheme. It can be understood as a "network broadcast" issued by the gateway node, with the purpose of recruiting members, demarcating territories, and establishing communication rules.
[0034] Step S102: The terminal node receives the gateway announcement message and performs a hop count determination to confirm whether it has become a regional member of the initial gateway node and whether to continue forwarding the gateway announcement message.
[0035] Specifically, when the initial gateway node periodically broadcasts a gateway announcement message, when an "unpartitioned" terminal node receives the gateway announcement message, it performs hop count calculation and hop count check. "Hop count" refers to the number of "relay forwardings" a data packet needs to go through from the source node to the destination node.
[0036] Upon receiving a gateway announcement message, an end node calculates the new hop count from itself to the initial gateway node based on the hop count carried in the message, compares it with the preset maximum allowed hop count, and autonomously decides whether to join the logical region. If the limit is not exceeded, the end node becomes a region member, updates its own state, and relays the announcement, thereby collaboratively defining the network region boundary; if the limit is exceeded, forwarding stops to suppress flooding.
[0037] Step S103: The terminal node periodically selects the target gateway node based on a preset hop count threshold and a real-time weight score.
[0038] Specifically, each terminal node in the region periodically broadcasts a status update message containing its own real-time weight score and its own hop count; each node independently collects this information and, based on a preset hop count threshold, selects the node with the highest real-time weight score that meets the preset hop count threshold as a candidate; when the candidate's score is significantly better than the current initial gateway node, a smooth role takeover process is triggered, and it is established as the new target gateway node.
[0039] Step S104: The target gateway node aggregates all node data that meet the preset conditions within its area to obtain the corresponding aggregated data packet, and sends the aggregated data packet of the corresponding area to the cloud server.
[0040] Specifically, the target gateway node receives and caches data sent by all member nodes within its local self-organizing network. When the amount of cached data or the waiting time reaches a preset trigger condition, the gateway node initiates intelligent difference detection. By comparing numerical changes, status word changes, and silence time, it accurately filters out the truly valid data that needs to be reported. Subsequently, this valid data is compressed, encapsulated, and encrypted to generate a compact aggregated data packet, which is then uploaded to the cloud server in a single transmission over a remote wide area network. This process compresses the originally massive and sporadic uplink transmissions into a small, efficient data stream, greatly reducing the load on the core network and significantly lowering terminal power consumption.
[0041] The hybrid networking method provided in this embodiment integrates local self-organizing network technology (a first communication method) with long-distance backhaul technology (a second communication method). Control commands between local devices can be transmitted and responded to end-to-end entirely within the local self-organizing network, completely bypassing the cloud and achieving millisecond-level linkage. By employing data aggregation and protocol conversion, N remote wide area network uplink transmissions are compressed into one, greatly reducing network congestion. Downlink commands are also distributed through aggregation points, optimizing downlink channel resource utilization and effectively solving the problems of centralized communication latency and uplink channel congestion.
[0042] This embodiment provides a hybrid networking method that can be used in hybrid networking systems with dual-mode BLE (Bluetooth Low Energy) and LoRaWAN (Long Range Wide Area Network) functionality. Figure 2 This is a flowchart of a hybrid networking method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: When the terminal node is powered on, two communication methods are enabled; the initial gateway node broadcasts a gateway announcement message through the first communication method; the initial gateway node is a terminal node that connects to the cloud server through the second communication method.
[0043] In one optional implementation, the first communication method is a local short-range ad hoc network for communication between local terminal nodes, and the local short-range ad hoc network is either a Bluetooth Mesh network or a Zigbee network; the second communication method is a remote wide area network for establishing a remote connection with a cloud server, and the remote wide area network is either a LoRaWAN network, an NB-IoT network, or an LTE-Cat.M network.
[0044] In this embodiment, the local short-range self-organizing network is exemplified by a Bluetooth Mesh network, and the long-range wide area network is exemplified by a LoRaWAN network.
[0045] After all dual-mode terminal nodes are powered on, they first activate their BLE function and enter the "unpartitioned" state. Each terminal node begins to periodically broadcast a message containing "node ID, current role (unpartitioned / member / gateway node candidate / gateway node), region ID (initially empty), hop count, and weight score (initially 0)". Once any terminal node successfully establishes a connection with the cloud server through its LoRaWAN network, the terminal node immediately promotes itself to the initial gateway node. It assigns itself a unique region ID, sets its hop count to 0, calculates its initial weight score, and begins to periodically broadcast "gateway announcement" messages in the BLEMesh network, containing: region ID, sender hop count (0), gateway node ID, and gateway node real-time weight score.
[0046] Step S202: The terminal node receives the gateway announcement message and performs a hop count determination to confirm whether it has become a regional member of the initial gateway node and whether to continue forwarding the gateway announcement message.
[0047] Specifically, step S202 includes: Step S2021: When the terminal node receives the gateway announcement message, it obtains the number of received hops of the initial gateway node or the previous terminal node, and calculates the new number of hops based on the number of received hops.
[0048] Specifically, neighboring nodes handle gateway announcements: when an "unpartitioned" end node receives a "gateway announcement" message, it performs hop count calculation and hop count check, and the new hop count = the received hop count + 1.
[0049] In step S2022, if the new hop count does not exceed the preset maximum allowed hop count, the terminal node is confirmed to be a regional member of the initial gateway node. At the same time, the gateway announcement message continues to be forwarded, and the new hop count is updated to the hop count of the regional member node itself, forming a logical partition centered on the initial gateway node.
[0050] Specifically, if the new hop count is greater than the maximum allowed hop count N (e.g., N=5), this message is ignored; this is crucial for the area boundary. If the hop count is valid (i.e., the new hop count ≤ the maximum allowed hop count N), the terminal node records the area ID and gateway node ID, updates its own hop count to the new hop count, changes its role to "area member," and records the previous hop node (i.e., the terminal node that sent this gateway announcement message) as the best path to the gateway node in the routing table.
[0051] It should be noted that newly added "region member" nodes forward the gateway announcement message after a random delay (to avoid collisions). The sender hop count in the gateway announcement message is updated to the node's own hop count, but the region ID and gateway node ID remain unchanged. If an end node receives multiple gateway announcement messages with the same region ID but a larger hop count, these are not forwarded to avoid network flooding. Through this relay process, a circular logical region with a radius of N hops, centered on the initial gateway, is automatically defined. All end nodes that can receive the announcement within N hops become members of this region. End nodes outside of N hops, or nodes that cannot be connected within N hops due to physical barriers, will remain in an "unpartitioned" state.
[0052] If an "unpartitioned" end node does not receive any gateway node announcement after a timeout (e.g., 60 seconds), the seed node attempts to activate its own LoRaWAN module to connect to the cloud server. If successful, it will promote itself to the new initial gateway node, generate a new area ID, set the hop count to 0, and start broadcasting gateway announcement messages to form its own logical area. If it fails, it will continue to wait, or it can wait for subsequent elections as a "slave gateway node candidate".
[0053] The above logical steps are performed multiple times to initialize the network and divide it into multiple sub-logical regions.
[0054] Step S203 involves the terminal nodes periodically selecting target gateway nodes based on a preset hop count threshold and real-time weight scores. For details, please refer to [link to relevant documentation]. Figure 1 Step S103 of the illustrated embodiment will not be described again here.
[0055] Step S204: The target gateway node aggregates the data of all nodes within its region that meet preset conditions to obtain the corresponding aggregated data packet, and then sends the aggregated data packet for the corresponding region to the cloud server. For details, please refer to [link to relevant documentation]. Figure 1 Step S104 of the illustrated embodiment will not be described again here.
[0056] The hybrid networking method provided in this embodiment achieves continuous self-optimization of the network by periodically broadcasting status information including real-time weight scores and hop counts of nodes, and making distributed decisions based on preset hop count thresholds. Through comprehensive evaluation of weight scores and hop count range limitations, nodes with central positions and stable states can be automatically elected as hubs, avoiding single points of failure and optimizing data aggregation paths.
[0057] This embodiment provides a hybrid networking method that can be used in hybrid networking systems with dual-mode BLE (Bluetooth Low Energy) and LoRaWAN (Long Range Wide Area Network) functionality. Figure 3 This is a flowchart of a hybrid networking method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps: Step S301: When the terminal node powers on, two communication modes are enabled; the initial gateway node broadcasts a gateway announcement message via the first communication mode; the initial gateway node is a terminal node that connects to the cloud server via the second communication mode. For details, please refer to [link to details]. Figure 2 Step S201 of the illustrated embodiment will not be described again here.
[0058] Step S302: The terminal node receives the gateway announcement message and performs a hop count check to confirm whether it has become a region member of the initial gateway node and whether to continue forwarding the gateway announcement message. For details, please refer to [link to relevant documentation]. Figure 2 Step S202 of the illustrated embodiment will not be described again here.
[0059] Step S303: The terminal node periodically selects the target gateway node based on a preset hop count threshold and a real-time weight score.
[0060] Specifically, step S303 includes: Step S3031: The terminal node periodically broadcasts status update messages, which include the real-time weight score and its own hop count.
[0061] Specifically, within each sub-region, all member nodes periodically (e.g., every 5 minutes) broadcast their own status update messages, including: node ID, region ID, hop count, and real-time weight score.
[0062] Step S3032: Select the target gateway node based on all status update messages within the logical partition, namely the preset hop count threshold and real-time weight score.
[0063] In some optional implementations, step S3032 above includes: Step a1: Select the region member with the highest real-time weight score from the region members of the logical partition whose own hop count is less than or equal to the preset hop count threshold.
[0064] Specifically, each terminal node independently finds the node with the highest weight score whose number of hops is less than or equal to the optimal number of hops threshold (e.g., 2 hops).
[0065] The formula for calculating the real-time weighted score is: Score=[f(B)]^α×[f(L)]^β×[f(H)]^γ×[f(S)]^δ.
[0066] Where f(B) is the normalized remaining capacity function, f(B) = current remaining battery capacity / nominal full battery capacity.
[0067] f(L) is the normalized link quality function, f(L)=(SNR_measured-SNR_min) / (SNR_max-SNR_min), where SNR_measured is the SNR (Signal-to-Noise Ratio) value of the LoRaWAN uplink signal measured by the node, SNR_min is the minimum acceptable SNR threshold of the network, and SNR_max is the expected optimal SNR value.
[0068] f(H) is the hop count penalty function, f(H)=1 / (H+C), where H is the number of hops from the node to the current reference gateway, and C is a smoothing constant (usually set to 1 to prevent the denominator from being zero).
[0069] f(S) is the stability reward function, f(S)=S_stable / S_total, where S_stable is the number of hours in the past time window (e.g., 24 hours) during which the node was in a stable working state (no gateway switching, no restart); and S_total is the total number of hours in the time window.
[0070] Multiple preset working modes can be selected. Preferably, the index weighting coefficients are configured as follows: α=2, β=1.5, γ=1, δ=1.5.
[0071] Step a2: If the selected regional member is not the initial gateway node and its real-time weight score is higher than that of the initial gateway node, then the selected regional member will be determined as the default candidate gateway node for the regional member.
[0072] If the found node is not the original initial gateway node, and its real-time weight score is higher than the current gateway node by a "switching hysteresis threshold" (to prevent frequent switching), then the member node of that region is considered a new gateway node candidate.
[0073] Step a3: Based on the takeover request confirmation message, determine the candidate gateway node as the target gateway node.
[0074] In some alternative implementations, step a3 above includes: A takeover request is sent from the candidate gateway node to the initial gateway node. When the initial gateway node confirms the takeover request, a role change message is broadcast through the candidate gateway node. Based on the role change message, the candidate gateway node is converted into the target gateway node, and the initial gateway node is downgraded to a region member.
[0075] Specifically, the node that is considered a candidate for the new gateway by a majority of nodes sends a "takeover request" to the current initial gateway node. The current initial gateway node confirms the request and begins to gradually hand over tasks such as data aggregation. The new gateway node broadcasts a "role change" message, announcing that it has become the new gateway node, and the original initial gateway node is demoted to a "regional member".
[0076] Step S304: The target gateway node aggregates all node data that meet the preset conditions within its area to obtain the corresponding aggregated data packet, and sends the aggregated data packet of the corresponding area to the cloud server.
[0077] Specifically, step S304 includes: Step S3041: Transmit all node data within the area to which the target gateway node belongs to the target gateway node for caching, and determine whether the cached data meets the triggering conditions.
[0078] In an optional implementation, the step S3041 above, determining whether the cached data meets the triggering condition, includes: If the amount of cached data exceeds the preset threshold for receiving data, the aggregation condition is deemed met; otherwise, the cached data continues to be received.
[0079] It should be noted that this embodiment uses local data acquisition and Bluetooth Mesh routing: the terminal node collects data, and if the data needs to be reported to the cloud, the node no longer sends it directly using its own LoRaWAN module, but encapsulates the data packet in a Bluetooth Mesh message; the message is routed to the elected gateway node through the multi-hop relay function of the Bluetooth Mesh network.
[0080] The gateway node receives uplink data from terminal nodes within its sub-region via the BLE Mesh network, establishes a data cache queue, and stores the data in sorted order by device ID and timestamp. The gateway node determines whether the aggregation condition is met. The trigger condition is that the received data volume > 20 (the limit for the received data volume can be adjusted according to the actual situation). If the aggregation condition is met, data aggregation is performed; otherwise, the gateway node continues to receive data packets, and the data continues to be stored in its internal memory cache or queue.
[0081] Step S3042: When the triggering condition is met, perform difference detection on the cached data and filter out valid data.
[0082] In an optional implementation, step S3042 above, which involves performing difference detection on the cached data to filter out valid data, includes: Perform numerical change detection, status word change detection, and time accumulation trigger detection on cached data to filter out valid data with numerical changes exceeding preset change thresholds, status word changes, and / or exceeding silent time thresholds.
[0083] Specifically, during data aggregation, the gateway node does not forward the data immediately. Instead, it compares the received data with the previously stored data to filter out node data that has changed or is in an abnormal state. Each gateway node maintains a historical data record table for all terminal nodes within its area. The records include: device ID and device type identifier, the value of the last reported data, the complete status word, and the last valid reporting timestamp.
[0084] The following multi-dimensional change detection method is used to detect differences: 1) Value Change Detection: The gateway node maintains a LastValueTable, recording the DeviceID and the last collected data value, LastValue. Upon receiving new data, it compares the new data with the value in LastValueTable. If abs(NewValue - LastValue) > the threshold, the data is added to the aggregation packet, and LastValueTable is updated. The filtered data is then combined with the gateway identifier, timestamp, and other information into an aggregated data packet.
[0085] 2) Status word change detection: Any change will trigger an immediate report.
[0086] 3) Time accumulation trigger: Set a maximum silent time threshold (e.g., 24 hours). Even if the data does not change, a report will be triggered after the silent time is exceeded to prevent the device from "losing connection" due to long periods of no communication.
[0087] Step S3043: Compress and encapsulate the valid data to generate the corresponding aggregated data packet, and encrypt the aggregated data packet to obtain the encrypted aggregated data packet.
[0088] Specifically, the aggregated data packet is constructed by compressing the device identifier (device ID difference encoding, recording the ID increment relative to the previous device), data value (data difference), and status bit fields (critical status bits are fully preserved; ordinary status bits only record the changed bits), etc., and the aggregated data packet format is as follows: [Baotou] [Change Data Record 1] [Change Data Record 2] ... [Check Code].
[0089] The packet header structure (8 bytes in total) consists of: gateway ID, aggregation timestamp, number of data packets, and aggregation policy identifier (optional); the change data record structure consists of: device identifier (1-2 bytes, differential encoding), data change information, status change information, time information, etc.
[0090] The gateway node encrypts the aggregated data packet using its own application session key (AppSKey), encapsulates the encrypted payload as the active payload into a LoRaWAN uplink data frame. The frame header of this data frame contains the gateway node's device address and a dedicated application port for identifying the aggregated data. Finally, the complete LoRaWAN data frame is transmitted via the wireless interface. By aggregating data, data from independent terminal nodes that originally required N LoRaWAN transmissions is optimized to require only one transmission, significantly reducing network load and optimizing terminal power consumption.
[0091] Once the cloud server receives the aggregated data packet, it performs the following cloud processing and downlink instruction distribution operations: The cloud server receives aggregated data packets from the gateway node and stores, analyzes, and displays them. The cloud server receives a data frame forwarded from the LoRaWAN gateway. The DevAddr of this frame points to the gateway node and contains an FPort value. FPort is a specific value (FPort is used to identify the application layer port number of the "aggregated data packet"). The cloud server recognizes this as a special "aggregated data packet" through the FPort, rather than data directly transmitted from a regular terminal. The cloud server uses the AppSKey (application session key) corresponding to the gateway node to decrypt the FRMPayload, obtaining the original aggregated data. The cloud server calls a parsing service specifically designed for processing aggregated data to parse the aggregated data packet, extracting the gateway ID, timestamp, and multiple terminal node data records. This aggregated message is "disassembled" into independent, virtual terminal node device data records, which are then stored in the database according to the corresponding terminal node device ID (DevID). Finally, the cloud server performs various business logic calculations and instruction decisions based on the parsed data.
[0092] If the cloud server receives a downlink command, it first sends the command to the LoRaWAN address of the gateway node where the target terminal node resides. After receiving the downlink command via LoRaWAN, the gateway node then distributes the command to the target terminal node through the BLE Mesh network. The cloud server maintains a routing table that maps the logical ID of each terminal node to its corresponding gateway node (DevAddr). When the cloud server wants to send a command to a terminal node, it queries the routing table to find that the terminal node belongs to Gateway_DevAddr_A. The cloud server then sends the command to the gateway node with DevAddr as Gateway_DevAddr_A, and the command payload explicitly includes the logical ID of the final target terminal node and the specific command content.
[0093] The gateway node receives downlink command messages from the cloud server via LoRaWAN communication. It then converts these LoRaWAN-compliant commands into custom control messages that the end nodes can recognize and use within the BLE Mesh network. The gateway node then sends these converted command messages out through the BLE Mesh network. Upon receiving the commands, the target end nodes execute the corresponding instructions.
[0094] The hybrid networking method provided in this embodiment is a BLE Mesh and LoRaWAN hybrid networking method based on dynamic gateway election and optimized data aggregation. Control commands between local devices can be transmitted and responded to end-to-end entirely within the BLE Mesh, completely bypassing the cloud and achieving millisecond-level linkage. By employing data aggregation and protocol conversion, N LoRaWAN uplink transmissions are compressed into one, greatly reducing network congestion. Downlink commands are also distributed through aggregation points, optimizing the use of downlink channel resources.
[0095] As one or more specific application embodiments of the present invention, combined with Figure 4 The hybrid networking method provided by this invention will be further described in detail, such as... Figure 4 As shown, the specific process is as follows: 1. Network initialization: After all dual-mode terminal nodes are powered on, they first activate their BLE function and enter the "unpartitioned" state. Each terminal node begins to periodically broadcast a message containing "node ID, current role (unpartitioned / member / gateway node candidate / gateway node), region ID (initially empty), hop count, and weight score (initially 0)". Once any terminal node successfully establishes a connection with the cloud server through its LoRaWAN network, the terminal node immediately promotes itself to the initial gateway node. It assigns itself a unique region ID, sets its hop count to 0, calculates its initial weight score, and begins to periodically broadcast "gateway announcement" messages in the BLEMesh network, containing: region ID, sender hop count (0), gateway node ID, and gateway node real-time weight score.
[0096] Neighboring nodes handle gateway announcements: When an "unpartitioned" end node receives a "gateway announcement" message, it calculates and checks the hop count. The new hop count equals the received hop count plus 1. If the new hop count is greater than the maximum allowed hop count N (e.g., N=5), the message is ignored; this is crucial for area boundaries. If the hop count is valid (i.e., the new hop count ≤ the maximum allowed hop count N), the end node records the area ID and gateway node ID, updates its own hop count to the new hop count, changes its role to "area member," and records the previous hop node (i.e., the end node that sent the gateway announcement message) as the best path to the gateway node in its routing table.
[0097] Newly added "region member" nodes forward the gateway announcement message after a random delay (to avoid collisions). They update the sender's hop count in the gateway announcement message to their own hop count, but the region ID and gateway node ID remain unchanged. If an end node receives multiple gateway announcement messages with the same region ID but a larger hop count, it will not forward them to avoid network flooding. Through this relay process, a circular logical region with a radius of N hops, centered on the initial gateway, is automatically defined. All end nodes that can receive the announcement within N hops become members of this region. End nodes outside of N hops, or nodes that cannot be connected within N hops due to physical barriers, will remain in an "unpartitioned" state.
[0098] If an "unpartitioned" end node does not receive any gateway node announcement after a timeout (e.g., 60 seconds), the seed node attempts to activate its own LoRaWAN module to connect to the cloud server. If successful, it will promote itself to the new initial gateway node, generate a new area ID, set the hop count to 0, and start broadcasting gateway announcement messages to form its own logical area. If it fails, it will continue to wait, or it can wait for subsequent elections as a "slave gateway node candidate".
[0099] The above logical steps are performed multiple times to initialize the network and divide it into multiple sub-logical regions.
[0100] 2. Gateway node election: Within each sub-region, all region member nodes periodically (e.g., every 5 minutes) broadcast their status update messages, including: node ID, region ID, hop count, and real-time weight score. Each terminal node independently identifies the node with the highest weight score and a hop count ≤ the optimal hop count threshold (e.g., 2 hops). If the found node is not the original initial gateway node, and its real-time weight score is higher than the current gateway node by a "switching hysteresis threshold" (to prevent frequent switching), then that region member node is considered a new gateway node candidate. The node that is defaulted to the new gateway by a majority of nodes sends a "takeover request" to the current initial gateway node. The current initial gateway node confirms the request and begins to gradually hand over tasks such as data aggregation. The new gateway node broadcasts a "role change" message, announcing itself as the new gateway node, and the original initial gateway node is demoted to a "region member".
[0101] The formula for calculating the real-time weighted score is: Score=[f(B)]^α×[f(L)]^β×[f(H)]^γ×[f(S)]^δ.
[0102] Where f(B) is the normalized remaining capacity function, f(B) = current remaining battery capacity / nominal full battery capacity.
[0103] f(L) is the normalized link quality function, f(L)=(SNR_measured-SNR_min) / (SNR_max-SNR_min), where SNR_measured is the SNR (Signal-to-Noise Ratio) value of the LoRaWAN uplink signal measured by the node, SNR_min is the minimum acceptable SNR threshold of the network, and SNR_max is the expected optimal SNR value.
[0104] f(H) is the hop count penalty function, f(H)=1 / (H+C), where H is the number of hops from the node to the current reference gateway, and C is a smoothing constant (usually set to 1 to prevent the denominator from being zero).
[0105] f(S) is the stability reward function, f(S)=S_stable / S_total, where S_stable is the number of hours in the past time window (e.g., 24 hours) during which the node was in a stable working state (no gateway switching, no restart); and S_total is the total number of hours in the time window.
[0106] Multiple preset working modes can be selected. Preferably, the index weighting coefficients are configured as follows: α=2, β=1.5, γ=1, δ=1.5.
[0107] 3. Local data acquisition and Bluetooth Mesh routing: When a terminal node collects data, if the data needs to be reported to the cloud, the node no longer sends it directly using its own LoRaWAN module. Instead, it encapsulates the data packet in a Bluetooth Mesh message. This message is routed to the elected gateway node through the multi-hop relay function of the Bluetooth Mesh network.
[0108] 4. Data aggregation and protocol conversion: The gateway node receives uplink data from terminal nodes within its sub-region via the BLE Mesh network, establishes a data cache queue, and stores the data in sorted order by device ID and timestamp. The gateway node determines whether the aggregation condition is met. The trigger condition is that the received data volume > 20 (the limit for the received data volume can be adjusted according to the actual situation). If the aggregation condition is met, data aggregation is performed; otherwise, the gateway node continues to receive data packets, and the data continues to be stored in its internal memory cache or queue.
[0109] During data aggregation, gateway nodes do not forward data immediately. Instead, they compare the received data with the previously stored data to filter out node data that has changed or is in an abnormal state. Each gateway node maintains a historical data record table for all terminal nodes within its area. The records include: device ID and device type identifier, the value of the last reported data, the complete status word, and the last valid reporting timestamp.
[0110] The following multi-dimensional change detection method is used to detect differences: 1) Value Change Detection: The gateway node maintains a LastValueTable, recording the DeviceID and the last collected data value, LastValue. Upon receiving new data, it compares the new data with the value in LastValueTable. If abs(NewValue - LastValue) > the threshold, the data is added to the aggregation packet, and LastValueTable is updated. The filtered data is then combined with the gateway identifier, timestamp, and other information into an aggregated data packet.
[0111] 2) Status word change detection: Any change will trigger an immediate report.
[0112] 3) Time accumulation trigger: Set a maximum silent time threshold (e.g., 24 hours). Even if the data does not change, a report will be triggered after the silent time is exceeded to prevent the device from "losing connection" due to long periods of no communication.
[0113] Aggregated data packet construction: The aggregated data packet is constructed by compressing the device identifier (device ID difference encoding, recording the ID increment relative to the previous device), data value (data difference), and status bit fields (critical status bits are fully preserved; only change bits are recorded for ordinary status bits), etc. The aggregated packet format is as follows: [Baotou] [Change Data Record 1] [Change Data Record 2] ... [Check Code].
[0114] The packet header structure (8 bytes in total) consists of: gateway ID, aggregation timestamp, number of data packets, and aggregation policy identifier (optional); the change data record structure consists of: device identifier (1-2 bytes, differential encoding), data change information, status change information, time information, etc.
[0115] The gateway node encrypts the aggregated data packet using its own application session key (AppSKey), encapsulates the encrypted payload as the active payload into a LoRaWAN uplink data frame. The frame header of this data frame contains the gateway node's device address and a dedicated application port for identifying the aggregated data. Finally, the complete LoRaWAN data frame is transmitted via the wireless interface. By aggregating data, data from independent terminal nodes that originally required N LoRaWAN transmissions is optimized to require only one transmission, significantly reducing network load and optimizing terminal power consumption.
[0116] 5. Cloud processing and downlink command distribution: The cloud server receives aggregated data packets from the gateway node and stores, analyzes, and displays them. The cloud server receives a data frame forwarded from the LoRaWAN gateway. The DevAddr of this frame points to the gateway node and contains an FPort value. FPort is a specific value (FPort is used to identify the application layer port number of the "aggregated data packet"). The cloud server recognizes this as a special "aggregated data packet" through the FPort, rather than data directly transmitted from a regular terminal. The cloud server uses the AppSKey (application session key) corresponding to the gateway node to decrypt the FRMPayload, obtaining the original aggregated data. The cloud server calls a parsing service specifically designed for processing aggregated data to parse the aggregated data packet, extracting the gateway ID, timestamp, and multiple terminal node data records. This aggregated message is "disassembled" into independent, virtual terminal node device data records, which are then stored in the database according to the corresponding terminal node device ID (DevID). Finally, the cloud server performs various business logic calculations and instruction decisions based on the parsed data.
[0117] If the cloud server receives a downlink command, it first sends the command to the LoRaWAN address of the gateway node where the target terminal node resides. After receiving the downlink command via LoRaWAN, the gateway node then distributes the command to the target terminal node through the BLE Mesh network. The cloud server maintains a routing table that maps the logical ID of each terminal node to its corresponding gateway node (DevAddr). When the cloud server wants to send a command to a terminal node, it queries the routing table to find that the terminal node belongs to Gateway_DevAddr_A. The cloud server then sends the command to the gateway node with DevAddr as Gateway_DevAddr_A, and the command payload explicitly includes the logical ID of the final target terminal node and the specific command content.
[0118] The gateway node receives downlink command messages from the cloud server via LoRaWAN communication. It then converts these LoRaWAN-compliant commands into custom control messages that the end nodes can recognize and use within the BLE Mesh network. The gateway node then sends these converted command messages out through the BLE Mesh network. Upon receiving the commands, the target end nodes execute the corresponding instructions.
[0119] The hybrid networking method provided in this embodiment is a BLE Mesh and LoRaWAN hybrid networking method based on dynamic gateway election and optimized data aggregation. Control commands between local devices can be transmitted and responded to end-to-end entirely within the BLE Mesh, completely bypassing the cloud and achieving millisecond-level linkage. By employing data aggregation and protocol conversion, N LoRaWAN uplink transmissions are compressed into one, greatly reducing network congestion. Downlink commands are also distributed through aggregation points, optimizing the use of downlink channel resources. This method has been applied to water meter reading tests, demonstrating significant effectiveness and feasibility.
[0120] This embodiment also provides a hybrid networking system for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.
[0121] This embodiment provides a hybrid networking system, such as Figure 5 As shown, it includes: Terminal node 501 is an IoT device with dual-mode functionality of local short-range self-organizing network and long-range wide area network. The terminal node is used to receive gateway announcement messages, perform hop count judgment, confirm whether to become a regional member of the initial gateway node, and whether to continue forwarding gateway announcement messages; periodically select target gateway nodes based on preset hop count thresholds and real-time weight scores.
[0122] Gateway node 502 is a special terminal node with dual-mode functionality of local short-range self-organizing network and long-range wide area network. It is elected as the cluster head and is used to aggregate the data of all nodes in its area that meet the preset conditions to obtain the corresponding aggregated data packet, and send the aggregated data packet of the corresponding area to the cloud server.
[0123] The Remote WAN Gateway 503 is a standard network infrastructure. This Remote WAN Gateway is a LoRaWAN gateway.
[0124] Cloud server 504 is a standard cloud platform used to receive and parse aggregated data packets transmitted by gateway nodes through remote WAN gateways.
[0125] The hybrid networking system provided in this embodiment of the invention can execute the hybrid networking method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method. Further functional descriptions of the various modules and units are the same as in the corresponding embodiments described above, and will not be repeated here.
[0126] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0127] The following is a detailed reference. Figure 6 This diagram illustrates a suitable structural design for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 601, which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 602 or a program loaded from memory 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of the electronic device. The processor 601, ROM 602, and RAM 603 are interconnected via bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0128] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0129] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a memory 608, or installed from a ROM 602. When the computer program is executed by the processor 601, it performs the functions defined in the hybrid networking method of the embodiments of the present invention.
[0130] Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0131] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the hybrid networking method shown in the above embodiments is implemented.
[0132] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0133] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A hybrid networking method, characterized in that, The method includes: When the terminal node is powered on, two communication modes are enabled. An initial gateway node broadcasts a gateway announcement message via a first communication method; the initial gateway node is a terminal node connected to the cloud server via a second communication method. The terminal node receives the gateway announcement message and performs a hop count determination to confirm whether it has become a regional member of the initial gateway node and whether to continue forwarding the gateway announcement message. The target gateway node is selected periodically by the terminal node based on a preset hop count threshold and a real-time weight score. The target gateway node aggregates the data of all nodes within its region that meet the preset conditions to obtain the corresponding aggregated data packet, and then sends the aggregated data packet of the corresponding region to the cloud server.
2. The hybrid networking method according to claim 1, characterized in that, The first communication method is a local short-range ad hoc network, used for communication between local terminal nodes, wherein the local short-range ad hoc network is either a Bluetooth Mesh network or a Zigbee network; the second communication method is a remote wide area network, used for establishing a remote connection with a cloud server, wherein the remote wide area network is either a LoRaWAN network, an NB-IoT network, or an LTE-Cat.M network.
3. The hybrid networking method according to claim 1, characterized in that, The terminal node receives the gateway announcement message, performs a hop count check, confirms whether it has become a region member of the initial gateway node, and determines whether to continue forwarding the gateway announcement message, including: When a terminal node receives a gateway announcement message, it obtains the number of hops received by the initial gateway node or the previous terminal node, and calculates a new number of hops based on the number of hops received. If the new hop count does not exceed the preset maximum allowed hop count, then the terminal node is confirmed to be a regional member of the initial gateway node, and the gateway announcement message continues to be forwarded. The new hop count is then updated to the hop count of the regional member node itself, forming a logical partition centered on the initial gateway node.
4. The hybrid networking method according to claim 3, characterized in that, The target gateway node is selected periodically by the terminal node based on a preset hop count threshold and a real-time weight score, including: The terminal node periodically broadcasts status update messages, which include real-time weight scores and its own hop count; The target gateway node is selected based on all status update messages within the logical partition, i.e., the preset hop count threshold and the real-time weight score.
5. The hybrid networking method according to claim 4, characterized in that, The target gateway node is selected based on all state update messages within the logical partition, i.e., the preset hop count threshold and real-time weight score, including: From the members of the logical partition, select the member whose number of hops is less than or equal to the preset hops threshold and whose real-time weight score is the highest. If the selected regional member is not the initial gateway node, and its real-time weight score is higher than that of the initial gateway node, then the selected regional member will be determined as the default candidate gateway node for the regional member. Based on the takeover request confirmation message, the candidate gateway node is determined as the target gateway node.
6. The hybrid networking method according to claim 5, characterized in that, Based on the takeover request confirmation message, the candidate gateway node is determined as the target gateway node, including: Send a takeover request to the initial gateway node from the candidate gateway node; When the takeover request is confirmed by the initial gateway node, a role change message is broadcast through the candidate gateway node, and the candidate gateway node is converted into the target gateway node based on the role change message, while the initial gateway node is downgraded to a region member.
7. The hybrid networking method according to claim 1, characterized in that, The target gateway node aggregates data from all nodes within its region that meet preset conditions to obtain the corresponding aggregated data packet, including: Transmit all node data within the region to the target gateway node for caching, and determine whether the cached data meets the triggering conditions. When the triggering condition is met, the cached data is subjected to difference detection to filter out valid data; The valid data is compressed and encapsulated to generate a corresponding aggregated data packet, and the aggregated data packet is encrypted to obtain an encrypted aggregated data packet.
8. The hybrid networking method according to claim 7, characterized in that, Determine whether the cached data meets the triggering conditions, including: If the amount of cached data exceeds the preset threshold for receiving data, the aggregation condition is deemed met; otherwise, the cached data continues to be received.
9. The hybrid networking method according to claim 7, characterized in that, Perform difference detection on the cached data to filter out valid data, including: The cached data is subjected to numerical change detection, status word change detection, and time accumulation trigger detection to filter out valid data with numerical changes exceeding a preset change threshold, status word changes, and / or exceeding a silent time threshold.
10. A hybrid networking system, characterized in that, The system, applied to the hybrid networking method as described in any one of claims 1 to 9, comprises: The terminal node is an IoT device with dual-mode functionality of local short-range self-organizing network and long-range wide area network; the terminal node is used to receive gateway announcement messages, perform hop count judgment, confirm whether to become a regional member of the initial gateway node, and whether to continue forwarding the gateway announcement message; periodically select target gateway nodes based on a preset hop count threshold and real-time weight score; Gateway nodes are special terminal nodes with dual-mode functions of local short-range self-organizing networks and long-range wide area networks. They are elected as cluster heads and are used to aggregate the data of all nodes in their respective areas that meet the preset conditions, obtain the corresponding aggregated data packets, and send the aggregated data packets of the corresponding areas to the cloud server. Remote WAN gateways are standard network infrastructure. The cloud server is a standard cloud platform used to receive and parse aggregated data packets transmitted by gateway nodes through remote WAN gateways.