A wide-narrow fusion emergency ad hoc network cross-layer communication method based on TPUNB and WIFI
By using a cross-layer communication method that integrates TPUNB and WIFI for emergency self-organizing networks, a heterogeneous network architecture is constructed, and routing protocols and data transmission are optimized. This solves the problems of low transmission rate of LoRa technology and poor adaptability of traditional WMN, and achieves efficient and reliable emergency communication.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTH CHINA UNIV OF TECH
- Filing Date
- 2026-02-25
- Publication Date
- 2026-06-02
Smart Images

Figure CN122138279A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless communication technology, specifically to a cross-layer communication method for a broadband-narrowband converged emergency self-organizing network based on TPUNB and WIFI. Background Technology
[0002] In the event of natural disasters and other emergencies, communication infrastructure is often damaged or unable to meet the sudden demand for large-scale services, resulting in extreme situations such as power outages, network outages, and road blockages. Under these circumstances, the development of emergency communications is receiving increasing attention.
[0003] Wireless Mesh Networks (WMNs) are gradually becoming an important foundation for emergency communication terrestrial networking due to their multi-hop transmission, strong self-organization capabilities, and flexible network topology adaptability. By constructing a mesh structure with redundant links from gateway nodes (aggregation nodes) and terminal nodes, WMNs can maintain network connectivity reliability and robustness even in situations where infrastructure is missing or partially paralyzed, demonstrating good scalability and energy efficiency in emergency communication terrestrial networking scenarios.
[0004] Currently, LoRa-Mesh is a typical application of WMN in emergency communication terrestrial networking. Relying on LoRa technology, it can meet the long-distance data transmission needs in emergency scenarios, but it still faces many problems:
[0005] (1) The air interface rate of LoRa technology, i.e. the transmission rate, is generally between 0.3Kbps and 37.5Kbps. The transmission rate is slightly low, which is not conducive to solving the situation of a large amount of data burst in emergency scenarios. At the same time, LoRa technology faces some intellectual property risks, which is not conducive to the construction of emergency communication in some fields such as the power industry.
[0006] (2) In the ground networking of emergency communication, nodes may be randomly distributed or moved, and communication links may change at any time. At the same time, the data throughput in the emergency communication network is large and the real-time requirements of data transmission are high. The protocol stack implementation of traditional WMN applications such as LoRa-Mesh, especially the traditional routing protocol, generally adopts route discovery based on flooding mechanism. It is suitable for scenarios with fixed nodes, stable communication links, low throughput and low real-time requirements, but cannot meet the needs of ground networking of emergency communication.
[0007] (3) In emergency communication ground networking, there is a common situation of dense distribution of massive terminals. The dense distribution of narrowband long-distance communication terminals in the network architecture will cause a large amount of data to be transmitted in the network and cannot be processed in time, resulting in network instability and congestion. It will not be able to give full play to the advantages of long-distance communication and will waste resources. Therefore, it is necessary to consider integrating broadband communication technology and narrowband communication technology to form a network architecture that is suitable for emergency ground networking communication. Summary of the Invention
[0008] To overcome the defects and shortcomings of existing technologies, this invention provides a cross-layer communication method for emergency self-organizing networks based on TPUNB and WIFI. This invention can effectively build a TPUNB-Mesh wireless communication network between devices, while performing secure and reliable multi-hop data transmission. Furthermore, it optimizes the communication methods used through various cross-layer collaborative optimization strategies, greatly improving the stability and efficiency of the communication system and meeting the communication needs of emergency scenarios with randomly distributed nodes and low-speed movement.
[0009] To achieve the above objectives, the present invention adopts the following technical solution:
[0010] This invention provides a cross-layer communication method for emergency self-organizing networks based on TPUNB and WIFI, comprising the following steps:
[0011] Construct a terrestrial network architecture that integrates broadband and narrowband networks to achieve heterogeneous communication between WIFI star networks and TPUNB-Mesh networks;
[0012] The terminal node sends information collection requests to its neighboring nodes to collect neighboring node addresses and coordinates and update the routing table.
[0013] The terminal node sends a coordinate acquisition request to the aggregation node, the aggregation node sends a response and updates the terminal node information, and the terminal node calculates its own coordinates based on the response.
[0014] Terminal nodes periodically update their own coordinates using either a neighbor coordinate-based determination method or a flooding mechanism based on the aggregation node, and periodically broadcast their own coordinates to neighboring nodes.
[0015] The terminal node collects WIFI data and transmits it back to the aggregation node via the TPUNB-Mesh network;
[0016] The application layer defines a private communication protocol to encapsulate the data, adds application layer control information, and calls the network layer data sending interface;
[0017] The network layer uses a greedy search algorithm based on virtual coordinates to integrate an improved AODV routing protocol to construct mesh network transmission paths, adds network layer control information, and calls the MAC layer data sending interface.
[0018] The MAC layer uses the CSMA / CA algorithm to implement data collision detection and backoff control, adds MAC layer control information, and calls the RDC layer data sending interface;
[0019] The RDC layer adds RDC layer control information and calls the physical layer data sending interface.
[0020] The physical layer calls the TPUNB RF driver to complete data transmission and real-time reception, and optimizes the TPUNB RF driver.
[0021] After receiving data, the terminal node calls the physical layer, RDC layer, MAC layer, network layer, and application layer to parse the data based on the control information of each layer.
[0022] As a preferred technical solution, a terrestrial network architecture integrating broadband and narrowband networks is constructed, specifically including:
[0023] The terminal node integrates the WIFI AP module and the TPUNB module, and the WIFI STA module and the WIFI AP module realize a star topology. The WIFI STA module sends data to the WIFI AP module. After the WIFI AP module receives the data, it enters the terminal node for processing and is then sent through the TPUNB module into the TPUNB-Mesh network for multi-hop transmission, and finally sent to another terminal node or the aggregation node for reception.
[0024] As a preferred technical solution, the terminal node sends a coordinate acquisition request to the aggregation node, the aggregation node sends a response and updates the terminal node information, and the terminal node calculates its own coordinates based on the response, specifically including:
[0025] According to the routing table, the terminal node sends a coordinate retrieval request. The neighboring node that receives the coordinate retrieval request adds its own coordinates and address to the request, increments the number of nodes recorded in the request by one, and forwards the request to the next node according to its own routing table.
[0026] After receiving a request, the aggregation node obtains the transmission path of the request along the coordinates, sends the coordinates, and receives a response. The response includes the number of nodes traversed by the path.
[0027] During the coordinate acquisition waiting window, the terminal node receives and parses the coordinate acquisition response to obtain the number of hops it has taken to reach different aggregation nodes and determines its own virtual coordinates.
[0028] As a preferred technical solution, when a terminal node periodically updates its own coordinates using a triggering method based on neighbor coordinates, the terminal node periodically sends its own coordinates to all neighbor nodes recorded in the routing table, and at the same time receives coordinate transmission information from neighbor nodes. If the coordinates of a neighbor node to a certain aggregation node plus one are smaller than its own coordinates, then the terminal node updates its own coordinates to the neighbor node's coordinates plus one; otherwise, it does not update.
[0029] As a preferred technical solution, when a terminal node periodically updates its own coordinates using a triggering method based on the flooding mechanism of the aggregation node, the aggregation node traverses its own routing table and periodically sends a coordinate update command to all neighboring nodes recorded in the routing table. This command is then flooded in the network. The coordinate update command records the path hop count from the aggregation node to the terminal node receiving the command. After receiving the coordinate update command, the neighboring nodes of the aggregation node parse out the hop count in the command and update their own coordinates using the hop count according to the coordinate update principle. They then increment the hop count by one and forward it to all neighboring nodes in their own routing table. In each round of coordinate updates, the command sent by the same aggregation node is executed once within a single terminal node.
[0030] As a preferred technical solution, the application layer defines a private communication protocol to encapsulate the data, specifically including:
[0031] The data type and data payload of the message are encapsulated. The data encapsulation format is: service_type+msg_type+len+message;
[0032] Here, service_type represents the business type field, msg_type represents the message type field, len represents the length field, and message represents the valid data field.
[0033] As a preferred technical solution, the network layer uses a greedy search algorithm based on virtual coordinates combined with an improved AODV routing protocol to construct mesh network transmission paths, specifically including:
[0034] When there is a need to send data, a greedy search algorithm is used to find the next hop node based on the virtual coordinates and then the data is sent to that node.
[0035] After receiving the data packet, the next-hop node repeatedly performs a greedy search to obtain the coordinates of the shortest-distance neighbor node and forwards the data until the destination node receives the data.
[0036] When the greedy algorithm iterates through the coordinates of all neighboring nodes and calculates the distance, and determines that no neighboring node is closer to the destination node than itself, the fallback mechanism is executed. The fallback is performed to search the routing table to find a valid path to the destination node address. The data is then forwarded according to the next-hop node address recorded in the valid path.
[0037] When there is no valid route to the destination node in its own routing table, a request-response mechanism is used to discover routes and maintain routes between nodes. Each node maintains a routing table, which records the coordinates and addresses of neighboring nodes, the address of the destination node for each path, the number of hops, and the sequence number.
[0038] As a preferred technical solution, the greedy search algorithm calculation process is as follows:
[0039] Based on the known virtual coordinates of the destination node, traverse the virtual coordinates of all neighboring nodes recorded in the routing table and calculate the distance to the destination node's coordinates.
[0040] The shortest distance calculation method is expressed as follows:
[0041] G=(neighbor->coord.hop1-dest->coord.hop1) 2 +(neighbor->coord.hop2-dest->coord.hop2) 2 ,
[0042] Where, neighbor->coord is the coordinate of the neighbor node in the source node's routing table, and dest->coord is the coordinate of the destination node;
[0043] The data sent by a node includes its own coordinates and address, the coordinates and address of the destination node, and the data.
[0044] As a preferred technical solution, when the request-response mechanism is executed, the routing request initiating node generates a routing request message RREQ and initiates data flooding to flood the data into the sub-network;
[0045] Each node that receives a Route Request Message (RREQ) first checks the signal strength (RSSI) and noise floor (NOISE) of the received RREQ packet. If the signal strength (RSSI) is lower than the threshold (W1) or the noise floor (NOISE) is higher than the threshold (W2), the RREQ packet is discarded.
[0046] If the node itself is the destination node or has a valid path to the destination node in its routing table, update its routing table and generate a route response message (RREP) to return to the node that initiated the route request. If no valid path is detected, update the routing table, add the reverse path to the source of the route request message (RREQ), increment the forwarding count of the route request message (RREQ), and continue to flood the route request message (RREQ) to other neighboring nodes.
[0047] If it is determined that an intermediate node or the target node has received a route request message RREQ, it sends a route response message RREP, specifying the next hop node in the return path, and returns to the source node along the reverse path of the route request message RREQ. Each node that receives a route response message RREP establishes a forward path to the node that received the route response message RREP. After receiving the route response message RREP, the node that initiated the route request updates its routing table, records the route to the target node, and forwards the data to the next hop node of the route record.
[0048] As a preferred technical solution, the MAC layer uses the CSMA / CA algorithm to implement data collision detection and backoff control, specifically including:
[0049] After setting the maximum backoff window exponent, if the RDC layer feedback channel is busy after data transmission (i.e., the RF module fails to transmit), the collision backoff phase begins. The backoff time is:
[0050] delay = random() %( (2 MIN(collisions, CSMA_MAX_BE) -1)* backoff_period());
[0051] Where random() represents a random number, collisions represents the number of collisions that have occurred, CSMA_MAX_BE represents the maximum backoff window exponent, and backoff_period() represents the length of the backoff time slice per unit time.
[0052] If a transmission conflict occurs again after each backoff and retransmission, the backoff window is expanded until it reaches (2). CSMA_MAX_BE -1)*backoff_period() window length.
[0053] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0054] (1) The present invention is based on a broadband-narrowband converged self-organizing network architecture based on TPUNB and WIFI technologies. The architecture integrates the characteristics of broadband communication network with high transmission rate and large throughput, and narrowband communication network with long transmission distance, wide coverage and low power consumption. The remote WIFI star network can complete the real-time collection of massive data in densely distributed areas, and the central TPUNB-Mesh network can greatly improve the network communication coverage area. The heterogeneous network architecture of the two can effectively solve the complex problems brought about by different types of business needs of emergency communication networks and adapt to the construction of emergency communication ground networks.
[0055] (2) This invention realizes the design of TPUNB-Mesh emergency communication protocol stack and communication firmware, which can realize the construction of reliable, stable and efficient TPUNB-Mesh private self-organizing communication network. It has portability and scalability in different business scenarios and has great practical application value for emergency communication ground network with large-scale random distribution of nodes and node mobility.
[0056] (3) This invention utilizes a greedy search algorithm based on anchor nodes and BFS hierarchical coordinates (virtual coordinates) to integrate an improved AODV routing protocol to construct a mesh network transmission path. This can effectively improve the efficiency of data transmission in actual emergency communication networks, reduce data flooding caused by traditional routing protocols, reduce the probability of network congestion, reduce the frequency of route discovery, and thus reduce transmission time. At the same time, the greedy search based on virtual coordinates enhances the reachability of any terminal node in the network. Terminal nodes can not only communicate with the aggregation node to upload data, but also communicate with other terminal nodes to interact with data, adapting to the needs of emergency communication node interaction. It also solves the problem of hardware resource consumption caused by storing a large number of routes, thereby greatly improving the efficiency and reliability of TPUNB-Mesh networks in emergency communication.
[0057] (4) The present invention controls the data link layer based on the physical layer fast short ack and implements collision detection and backoff control of the device based on the CSMA / CA mechanism, which greatly reduces the probability of data collision, thereby improving communication efficiency and realizing reliable data transmission.
[0058] (5) The present invention is based on a real-time transmit and receive control method driven by physical layer radio frequency hardware, which deeply integrates the process mechanism and state machine implementation of the operating system, and has a certain degree of portability for embedded operating system programs that use interrupt mode for data transmission and reception. Attached Figure Description
[0059] Figure 1 This is a schematic diagram of the information flow of the cross-layer communication method for the broadband and narrowband converged emergency self-organizing network based on TPUNB and WIFI according to the present invention;
[0060] Figure 2 This is a schematic diagram of the broadband-narrowband converged emergency self-organizing network architecture of the present invention;
[0061] Figure 3 This is a flowchart illustrating the task flow of the broadband-narrowband converged emergency self-organizing network communication after the device is powered on.
[0062] Figure 4 This is a schematic diagram of the TPUNB-Mesh wireless network communication protocol stack frame encapsulation process of the present invention;
[0063] Figure 5 This is a schematic diagram of the real-time transmit and receive process of the physical layer radio frequency driver of the TPUNB-Mesh communication protocol stack of the present invention.
[0064] Figure 6 This is a timing diagram of the fast ack method based on physical layer fast short response of the present invention;
[0065] Figure 7(a) is a flowchart of the AODV routing protocol node 1 (initiating node) improved by the greedy search algorithm based on virtual coordinates according to the present invention.
[0066] Figure 7(b) is a flowchart of the improved AODV routing protocol node 2 (relay node) based on the greedy search algorithm of virtual coordinates according to the present invention.
[0067] Figure 7(c) is a flowchart of the improved AODV routing protocol node 3 (destination node) based on the greedy search algorithm of virtual coordinates according to the present invention.
[0068] Figure 8 This is the routing representation of the improved AODV routing protocol based on a greedy search algorithm using virtual coordinates, as described in this invention.
[0069] Figure 9 This is a schematic diagram of the two-level design of the TPUNB-Mesh communication protocol stack application layer private type message type in this invention. Detailed Implementation
[0070] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0071] Example
[0072] like Figure 1 As shown, a cross-layer communication method for emergency self-organizing networks based on TPUNB and WIFI, comprising the following steps:
[0073] S1: As Figure 2 As shown, a self-organizing network, namely a broadband-narrowband converged terrestrial network architecture, is deployed according to the broadband-narrowband converged emergency self-organizing network architecture to realize heterogeneous communication between the WIFI star network and the TPUNB-Mesh network. The network includes two aggregation nodes and several terminal nodes, where the edge aggregation nodes and relay nodes are terminal nodes. The terminal nodes are determined by the pre-set flag WIFI_connect. If WIFI_connect is 1, it is an edge aggregation node; otherwise, it is a relay node. The edge aggregation nodes communicate with the aggregation nodes through the relay nodes. After the terminal nodes and aggregation nodes are powered on, they first perform initialization operations. In this embodiment, the terminal nodes, i.e., the edge aggregation nodes, are connected to the WIFI AP devices and deployed at the locations where service data needs to be collected. They collect the data collected by the WIFI STA nodes and transmit it back to the aggregation nodes through the TPUNB-Mesh network. The aggregation nodes are used to summarize the edge aggregation nodes within the self-organizing network they are connected to and upload it via Ethernet.
[0074] In this embodiment, the terminal node integrates the WIFI AP and TPUNB module. The WIFI STA and WIFI AP form a star network. The WIFI STA sends data to the WIFI AP. After the WIFI AP module receives the data, it enters the MCU of the terminal node for processing and then sends it through the TPUNB module into the TPUNB-Mesh network for multi-hop transmission. Finally, it is sent to another terminal node or the aggregation node for reception.
[0075] like Figure 3 As shown, initialization includes two operations: system parameter initialization and service process initialization. System parameter initialization includes: serial communication initialization (initializing serial port driver parameters according to the required transmission rate); timer and system clock initialization (initializing the system clock according to hardware); protocol stack initialization (determining TPUNB communication parameters and initializing the TPUNB communication module according to the communication scenario); PROCESS process management and private communication protocol initialization (initializing device process management parameters); watchdog initialization (initializing the watchdog program according to pre-written parameters); and Ethernet function initialization (initializing the Ethernet UDP connection program according to pre-written parameters for aggregation nodes). Process initialization operations are determined by the device node type. For aggregation nodes, the data polling process, topology polling process, and Ethernet transceiver process are initialized; for terminal nodes, the TPUNB data transceiver process is initialized. For special terminal nodes, i.e., edge aggregation nodes, the WIFI data transceiver process also needs to be initialized. The data polling process collects data from nodes within the connected network; the topology polling process collects routing paths constructed by nodes within the connected network; and the Ethernet transceiver process initializes TCP / IP. Protocol stack parameters and platform-server transmission protocol parameters; TPUNB data transceiver process is used for TPUNB transceiver management, and WIFI data transceiver process is used for WIFI module transceiver control;
[0076] S2: After initialization, the terminal node sends a CollectionREQ request to its neighboring nodes to collect neighboring node addresses and coordinates, and updates the routing table. The routing table is as follows: Figure 8 As shown, this includes: the coordinates and addresses of neighboring nodes, the address of the destination node for each path, the number of hops, and the sequence number;
[0077] S3: Based on the routing table obtained in step S2, the terminal node sends a coordinate retrieval request (CoordRAQ) to the aggregation node. The aggregation node sends a response (CoordREP) and updates the terminal node information. The terminal node calculates its own coordinates based on the response. The specific steps include:
[0078] S31: According to the routing table, the terminal node sends a coordinate retrieval request (CoordRAQ) to the sink node 1 and sink node 2. The physical location and coordinates of the sink nodes are fixed and known to the terminal node. The neighboring node that receives the coordinate retrieval request adds its own coordinates and address to the request, increments the number of nodes recorded in the request by one, and forwards the request to the next node according to its own routing table.
[0079] S32: Other terminal nodes, i.e. relay nodes, that receive the forwarded request repeat the operation of the neighboring nodes in step S32, and continuously forward the coordinate acquisition request.
[0080] S33: After receiving the request, the aggregation node records the node address of the new terminal node, obtains the reverse order of the requested transmission path along the coordinates, and sends the coordinates to obtain the response CoordREP. The response includes the number of nodes traversed by the CoordREQ path, i.e., the number of hops.
[0081] S34: During the coordinate acquisition waiting window, the terminal node receives and parses the coordinate acquisition response CoordREP to obtain the hop counts hop1 and hop2 of its journey to two different sink nodes, and determines its own virtual coordinates (16 bits). The coordinates are represented as: coord=[hop1, hop2], where hop1 is the number of hops from the terminal node to sink node 1, and hop2 is the number of hops from the terminal node to sink node 2. In this embodiment, the coordinate acquisition waiting window is set to 5 seconds. This parameter can be adjusted according to the number of nodes attached to the ad hoc network.
[0082] S4: After a terminal node successfully obtains its own coordinates, if it is an edge aggregation node, it will receive the data collected by the WIFI STA node and send it to the destination node through the TPUNB-Mesh network. The destination node can be another terminal node or an aggregation node. The specific steps for the next data transmission under the control of the TPUNB-Mesh emergency communication protocol stack constructed in this embodiment include:
[0083] S41: As Figure 4 As shown, the application layer initiates a data transmission request, encapsulates the data according to the data type (business data or control data) using the application layer's private protocol, and then calls the network layer's data transmission interface.
[0084] In this embodiment, the application layer protocol is used to implement end-to-end business data acquisition and control tasks. The application layer distinguishes messages into business data and control information, and constructs the coordinate acquisition mechanism in S3. After the terminal node successfully acquires its own coordinates, it can send the business data it has collected to the aggregation node. The construction of the application layer protocol specifically includes: (1) constructing a private application layer protocol that can flexibly expand various services. The data type adopts a two-level definition, such as Figure 9As shown, it includes task type service_type and message type msg_type. The task type defines the task to which the current message belongs. It can be divided into network control messages and business data messages. The message type defines the message type under the current task. For example, the task number of the topology data service is 0x05. This task type includes three message types: node topology information acquisition (0x01), node topology information reply (0x02), and node topology information update upload (0x03). Through the flexibly defined application layer private protocol service_type and msg_type headers, the definition of various business data exclusive protocols can be realized, and the customization of business data frame format can be supported. It has strong extensibility in business type; (2) Define the application layer frame structure as: service_type (1 byte) + msg_type (1 byte) + len (1 byte) + message (len bytes). The length len field records the valid data message word carried by the current message. The length of the segment; (3) The aggregation node performs an initialization operation, initializes its own node address to 0x0001 (aggregation node 1) or 0x0002 (aggregation node 2), and initializes a node information list Mount_Node_Info_list with a size of MAX_Mount_NODE_NUM (maximum number of mounted nodes). A node information structure includes: node address (16 bits), node virtual coordinates (16 bits) and address usage status (1 byte). The address usage status is divided into NODE_NOT_ASSIGNED (unallocated status), NODE_ASSIGNING (address allocation in progress), NODE_ONLINE (address online), and NODE_OFFLINE (address offline). After receiving data from a terminal node, the node virtual coordinates and address usage status in the node information list will be updated according to the data; (4) The terminal node performs an initialization operation. The specific steps are: obtain the unique ID of the STM32 device (96 bits), which is represented as: DEVICE_ID=(ID 95 ID 94 Divide this ID into six 16-bit parts, each represented as ID0; i(i=0, 1, 2, 3, 4, 5, 6), perform a cyclic XOR operation on each 16-bit value to obtain an initial random value (16 bits), which is represented as: DEVICE_ID=ID0⊕ID1⊕ID2⊕ID3⊕ID4⊕ID5; calculate its own random initial address = DEVICE_ID% (0x00ff-1), and initialize the address of the aggregation node at the same time; (5) perform the coordinate acquisition process of step S3, in which the aggregation node, after receiving the coordinate acquisition request CoordREQ, parses out the node address and writes it into a new line of the node information list, and updates the address status to NODE_ASSIGNING.
[0085] S42: The network layer adds network layer control information to the data. The network layer is responsible for tasks such as coordinate query, coordinate management, route discovery, and route maintenance, and calls the data transmission interface of the medium access control layer (hereinafter referred to as MAC layer) in the data link layer.
[0086] In this embodiment, the network layer implements the network layer protocol based on the open-source Rime protocol stack and the Chameleon architecture, providing communication functions, coordinate updates, route construction, channel management, and other functions for the upper application layer. The Rime protocol stack is an open-source, lightweight network protocol stack composed of multiple modules at different levels, each providing different communication functions. Chameleon is a flexible protocol header conversion architecture designed for seamless integration of protocol stacks and message formats. The Rime protocol stack provides protocol header construction and parsing management, and also integrates several key components, each responsible for different tasks, which together support the communication functions of the Rime protocol stack. The network layer implements communication functions such as unicast, multicast, broadcast, flooding, and mesh communication based on the AODV routing protocol, which is based on the Rime protocol stack, Chameleon architecture, and a greedy search algorithm based on virtual coordinates. In this embodiment, the AODV routing protocol, which is based on a greedy search algorithm based on virtual coordinates, is used to construct a mesh routing path to realize the core mesh communication function in the TPUNB-Mesh emergency communication network, as shown in Figures 7(a), 7(b), and 7(c). The specific steps are as follows: (1) When there is a need to send data, the greedy search algorithm is used to find the next hop node based on the virtual coordinates and send data to the node. The calculation process of the greedy search algorithm is as follows: Based on the known virtual coordinates of the destination node, the virtual coordinates of all neighboring nodes recorded in the routing table are traversed to calculate the distance G between the destination node and the coordinates. The shortest distance calculation method is expressed as follows:
[0087] G=(neighbor->coord.hop1-dest->coord.hop1) 2 +(neighbor->coord.hop2-dest->coord.hop2)2 , where neighbor->coord is the coordinate of the neighbor node in the source node's routing table, and dest->coord is the coordinate of the destination node; the data sent includes: its own coordinates and address, the coordinates and address of the destination node and the data; after the next-hop node receives the data packet, it repeatedly performs a greedy search to obtain the coordinates of the shortest distance neighbor node in the next hop and forwards the data until the destination node receives the data; (2) when it finds that no neighbor node is closer to the destination node than itself after traversing all the coordinates of the neighbor nodes and calculating the distance according to the greedy algorithm, it executes the backoff mechanism, backslides to the route search to find whether there is a valid path to the address of the destination node in its own routing table, and continues to forward the data according to the address of the next-hop node recorded in the valid path; (3) when there is no valid route to the destination node in its own routing table, it uses the request-response mechanism to discover the route and maintain the route between the nodes. Each node maintains a routing table, which records the coordinates and addresses of the neighbor nodes, the address of the destination node of each path, the number of hops, and the sequence number; (4) when the request-response mechanism is executed, the routing request initiating node generates a routing request message RREQ and initiates data flooding, which floods the data According to the flooding process within the subnetwork: Each node receiving a Route Request Message (RREQ) first checks the signal strength (RSSI) and noise floor (NOISE) of the received RREQ packet. If RSSI is lower than threshold W1 or NOISE is higher than threshold W2, it indicates that there is a lot of interference on the path, and the RREQ is discarded. Here, W1 = -85dBm and W2 = -95dBm. After receiving the RREQ, if the node itself is the destination node or has a valid path to the destination node in its routing table, it generates a Route Reply Message (RREP), specifies the next hop node in the return path, and sends it to the node that initiated the route request along the reverse path of the RREQ. Each node that receives the RREP establishes a forward path to the node that initiated the RREP. After receiving the RREP, the node that initiated the route request updates its routing table and records the route to the destination node, and re-initiates data transmission. If no valid path is detected, a reverse path to the node that sent the RREQ is added, the forwarding count of the RREQ is increased, and the RREQ is flooded to other neighboring nodes.
[0088] In this embodiment, the terminal node periodically updates its own coordinates using two triggering methods: neighbor coordinate determination or sink node flooding mechanism. The specific steps include: (1) setting the triggering method according to emergency needs. If the network data throughput is low and the node movement speed requirement is high, or the coordinate accuracy requirement of the nodes in the network is high, the update triggering method based on sink node flooding mechanism is adopted. If the network data throughput is high and the node movement speed requirement is low, or the coordinate accuracy requirement of the nodes in the network is low, the triggering method based on neighbor coordinate determination is adopted to reduce network congestion; (2) the coordinate update follows the principle of descent priority and rise delay. When the received hop value falls below the threshold, the node updates its own coordinates according to the threshold. When the hop value decreases, the coordinates should be updated immediately. When the hop value increases, the update is allowed to be delayed. The current coordinates are updated only when the hop value increases multiple times, so as to reduce the impact of coordinate instability caused by short-term link jitter; (3) When the triggering mode based on the flooding mechanism of the aggregation node is set, aggregation node 1 and aggregation node 2 traverse their own routing tables and periodically send a coordinate update command CoordUpdate to all neighboring nodes recorded in the routing table so that it floods in the network. The coordinate update command records the number of hops from the aggregation node to the terminal node that receives the command. After receiving the coordinate update command CoordUpdate, the neighboring node of the aggregation node parses the number of hops in the command and updates the coordinates accordingly. The new principle uses the hop count to update its own coordinates, increments the hop count by one, and forwards it to all neighboring nodes in its own routing table, so that the coordinate update command continues to flood. (4) Nodes that subsequently receive the coordinate update command repeat step (3). During each coordinate update process, the command sent by the same aggregation node is executed only once in a terminal node. That is, only the first coordinate update command is executed in the current receiving terminal node. The coordinate update commands received later will be ignored to avoid routing loops and infinite flooding. (5) When the triggering method based on neighbor coordinates is set, the terminal node, i.e. the sending node, periodically sends its own coordinates to all neighboring nodes recorded in the routing table. When the neighboring nodes receive the sent coordinates, After sending its own coordinates, a node replies with a coordinate transmission message (Coordtransmit) to the sending node. The sending node parses the coordinate transmission and determines: if the coordinates of a neighboring node to a certain sink node plus one are less than its own coordinates, then it immediately updates its own coordinates to that sink node to the neighboring node's coordinates plus one; otherwise, it does not update. For example, if the current coordinates of the node are [hop1, hop2] = [5, 7], and after receiving the coordinate transmission message, it finds that the coordinates of the neighboring node are [hop1, hop2] = [3, 7], that is, the coordinates of the neighboring node to sink node 1 plus one are less than its own coordinates, so it updates its own coordinates to [hop1, hop2] = [4, 7].
[0089] S43: The data link layer protocol is responsible for tasks such as collision detection and backoff control of nodes in the TPUNB-Mesh network, ensuring the reliability of point-to-point communication. The data link layer applicable to TPUNB communication includes the RDC layer and the MAC layer. The MAC layer adds MAC layer control information to the data. The MAC layer implements channel detection and collision avoidance mechanism based on the CSMA / CA method, and is responsible for collision detection and backoff control tasks. If the data encounters a data collision or the channel is busy, backoff control will be performed in the MAC layer, and then the data transmission interface of the radio energy saving control layer (hereinafter referred to as the RDC layer) will be called.
[0090] In this embodiment, the MAC layer uses the CSMA / CA protocol to perform the collision backoff control process, specifically including: first, setting the maximum backoff window exponent CSMA_MAX_BE; assuming that after node A sends a data packet, if the transmission fails and returns a collision, or if the transmission succeeds but there is no ACK response, node A enters the collision backoff phase, and the backoff time is: delay = random()%( (2 MIN(collisions, CSMA_MAX_BE) -1)* backoff_period()), where random() is a random number, collisions is the number of collisions that have occurred so far. Collisions are increased by failure to transmit or by channel collisions where node A transmits data but does not receive an ACK frame. backoff_period() refers to the length of the backoff time slice, which can be set according to specific circumstances. If a collision occurs again after each backoff retransmission, node A will continue to expand the backoff window until it reaches (2)* backoff_period(). CSMA_MAX_BE -1)* backoff_period() Window length. By dynamically increasing the size of the contention window each time a collision occurs, the probability of multiple nodes sending data simultaneously is effectively reduced. In this way, the system can better adapt to changes in network load, maintaining a fast response under low load and reducing collisions through an exponential backoff mechanism under high load, thereby improving the overall efficiency of the network.
[0091] The RDC layer adds RDC layer control information to the data, is responsible for connecting the MAC layer and the physical layer, and will notify the MAC layer of data collision to perform backoff processing. If data transmission occurs, the physical layer data transmission interface will be called.
[0092] S44: The physical layer calls the data transmission interface of the TPUNB communication driver to send data. The physical layer is responsible for tasks such as setting the radio frequency parameters of TPUNB communication, buffer management, ACK mechanism and communication status control.
[0093] In this embodiment, the physical layer interface is responsible for setting the radio frequency parameters, sending TPUNB data packets, and receiving data packets for TPUNB communication. The radio frequency parameter settings include setting the frequency point, module operating mode, transmit power, and air interface rate. The physical layer implements the TPUNB communication driver based on a state machine. The TPUNB communication module modulates and demodulates the received TPUNB narrowband communication signal to convert the analog signal to a digital signal. The MCU then receives the digital signal through a serial port interrupt and converts the binary code stream to the ASCII code stream to obtain the data packet content that can be processed by the protocol stack.
[0094] In this embodiment, the physical layer uses a finite state machine model to design the TPUNB driver for data transmission and reception, such as... Figure 5 As shown, the real-time drive control based on the finite state machine switches modes according to the event triggering conditions and the current state. The specific steps of a data transmission are as follows: (1) After the physical layer receives the data to be transmitted, it calls the transmission process transmit. The transmission process transmit repeatedly calls the transmission state machine transmit_process until the transmission is completed or the transmission is busy and fails. The states in the transmission state machine transmit_process include four states: standby, transmission initialization (Tx_init), transmission in progress (Tx_running), and transmission completed (Tx_done). Each transmission will cycle through the three states of transmission initialization, transmission in progress, and transmission completed, and then return to the standby state. When entering different states, the corresponding radio frequency driver will be called. Function; (2) If the transmission is successful and the transmitted data is not an ACK short response or broadcast data, then a timer is set in the transmit process to give up the CPU so that the serial port connected to the TPUNB wireless communication module can be successfully interrupted. After time T2, when the timer expires, the serial port is checked again to see if it is interrupted. If it is, the data receiving process is invoked to process the ACK short response and the transmission success is returned to the upper layer. Otherwise, the timer is reset and waits again until the total time T3 for waiting for the ACK short response is exceeded and the transmission congestion failure is returned. T2 and T3 are set according to the required network response speed and throughput; (3) If the transmission fails and returns collision or the transmission is successful but the ACK response reception timeout is returned and returns noack, then it is reported to the MAC layer to perform backoff and data retransmission until the maximum number of retransmissions is exceeded and the transmission is abandoned and the data is discarded.
[0095] S5: After receiving valid data, the destination node parses it, calls different processing methods and executes corresponding operations based on the business type. The specific steps for the next data reception controlled by the protocol stack are as follows:
[0096] S51: The serial port connected to the TPUNB module generates a receive interrupt, calling the data receiving process Node_Receive_Datatrans_process. The receiving process calls the receive function Receive_process to detect the validity of the data. If it is a valid data packet (i.e., the data frame header is the TPUNB module's data frame identifier NNMI), the physical layer data receiving interface is called to parse the data. If it is not a valid data packet, it is discarded and the serial port receive buffer is cleared. After the physical layer receives a valid data packet, it immediately returns an ACK frame and then calls the RDC layer data receiving interface. Existing methods wait for the data packet to be parsed through the RDC layer, MAC layer, network layer, and application layer before sending an ACK response. If the application layer service data parsing and processing time is long, it may cause the sending node to wait for the ACK to time out, and then the sending node will consider the transmission to have failed and retransmit. Such retransmission will waste channel resources. This embodiment optimizes the TPUNB physical layer driver based on the fast ack method of the physical layer, and directly sends an ACK response to the received data packet at the physical layer, which improves the efficiency of the ACK response and can avoid timeout retransmission caused by the long upper layer data processing time, thereby improving the network throughput.
[0097] like Figure 6 As shown, the ACK response mechanism is optimized using a cross-layer collaborative strategy, and a fast short response is performed directly at the physical layer. The specific steps include: (1) After the sending node sends a message, it immediately enters the ACK waiting state, and the receiving window length is 1s (the length can be set), waiting for the ACK frame message from the receiving node; (2) After the receiving node receives a valid data packet, it uses the known RDC layer format to parse the point-to-point sender address and point-to-point receiver address in advance, and then immediately returns a 6-byte short response ACK frame. The short response consists of a 2-byte short response identifier header (0xF0F0), a 2-byte receiver address, and a 2-byte sender address; (3) After the sending node receives the short response message, it immediately ends the receiving state and returns the sending success status to the upper layer; (4) If the sending node does not receive the short response within the set ACK waiting window, it considers the sending to have failed, reports the noack status to the RDC layer, and then reports it to the MAC layer for data retransmission; In this embodiment, the physical layer fast response is combined with the RDC layer point-to-point address. The ACK method can detect frame loss or corruption in advance and immediately acknowledge (or fail to acknowledge) the received frame at the physical layer. It can identify transmission errors hop by hop instead of waiting for higher layers (such as the network layer or application layer) to retransmit after a timeout. This can significantly improve network throughput and reduce the latency caused by upper-layer processing.
[0098] S52: The RDC layer parses the RDC layer control information in the data packet, such as the point-to-point sender address, point-to-point receiver address, sequence number, etc., and then calls the MAC layer data receiving interface;
[0099] S53: The MAC layer parses the MAC layer control information in the data packet and then calls the network layer data receiving interface;
[0100] S54: The network layer parses the network layer control information in the data packet, such as the end-to-end sender address and coordinates, the end-to-end receiver address and coordinates, hop count, etc., and performs tasks such as coordinate update, route maintenance, and route update. Then, it calls the application layer data receiving interface.
[0101] S55: The application layer parses the application layer's private protocol according to the data type (business data or control data) and then executes the corresponding task;
[0102] S6: When the aggregation node receives service data, it encapsulates the data through the aggregation node-platform communication protocol and then reports it to Ethernet. After receiving the data, Ethernet updates the specified database.
[0103] S7: Ethernet can also send node polling commands to poll node data through the aggregation-platform communication protocol. After receiving the node polling command, the aggregation node will send service data requests to the attached terminal nodes in sequence. After receiving the data request, the terminal node will immediately return the service data. The aggregation node repeats step S6.
[0104] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A cross-layer communication method for emergency self-organizing networks based on TPUNB and WIFI, characterized in that, Includes the following steps: Construct a terrestrial network architecture that integrates broadband and narrowband networks to achieve heterogeneous communication between WIFI star networks and TPUNB-Mesh networks; The terminal node sends information collection requests to its neighboring nodes to collect neighboring node addresses and coordinates and update the routing table. The terminal node sends a coordinate acquisition request to the aggregation node, the aggregation node sends a response and updates the terminal node information, and the terminal node calculates its own coordinates based on the response. Terminal nodes periodically update their own coordinates using either a neighbor coordinate-based determination method or a flooding mechanism based on the aggregation node, and periodically broadcast their own coordinates to neighboring nodes. The terminal node collects WIFI data and transmits it back to the aggregation node via the TPUNB-Mesh network; The application layer defines a private communication protocol to encapsulate the data, adds application layer control information, and calls the network layer data sending interface; The network layer uses a greedy search algorithm based on virtual coordinates to integrate an improved AODV routing protocol to construct mesh network transmission paths, adds network layer control information, and calls the MAC layer data sending interface. The MAC layer uses the CSMA / CA algorithm to implement data collision detection and backoff control, adds MAC layer control information, and calls the RDC layer data sending interface; The RDC layer adds RDC layer control information and calls the physical layer data sending interface. The physical layer calls the TPUNB RF driver to complete data transmission and real-time reception, and optimizes the TPUNB RF driver. After receiving data, the terminal node calls the physical layer, RDC layer, MAC layer, network layer, and application layer to parse the data based on the control information of each layer.
2. The method for cross-layer communication in a broadband and narrowband converged emergency self-organizing network based on TPUNB and WIFI according to claim 1, characterized in that, Constructing a terrestrial network architecture that integrates broadband and narrowband networks specifically includes: The terminal node integrates the WIFI AP module and the TPUNB module, and the WIFI STA module and the WIFI AP module realize a star topology. The WIFI STA module sends data to the WIFI AP module. After the WIFI AP module receives the data, it enters the terminal node for processing and is then sent through the TPUNB module into the TPUNB-Mesh network for multi-hop transmission, and finally sent to another terminal node or the aggregation node for reception.
3. The method for cross-layer communication in a broadband and narrowband converged emergency self-organizing network based on TPUNB and WIFI according to claim 1, characterized in that, The terminal node sends a coordinate acquisition request to the aggregation node, the aggregation node sends a response and updates the terminal node information, and the terminal node calculates its own coordinates based on the response, specifically including: According to the routing table, the terminal node sends a coordinate retrieval request. The neighboring node that receives the coordinate retrieval request adds its own coordinates and address to the request, increments the number of nodes recorded in the request by one, and forwards the request to the next node according to its own routing table. After receiving a request, the aggregation node obtains the transmission path of the request along the coordinates, sends the coordinates, and receives a response. The response includes the number of nodes traversed by the path. During the coordinate acquisition waiting window, the terminal node receives and parses the coordinate acquisition response to obtain the number of hops it has taken to reach different aggregation nodes and determines its own virtual coordinates.
4. The method for cross-layer communication in a broadband and narrowband converged emergency self-organizing network based on TPUNB and WIFI according to claim 1, characterized in that, When a terminal node periodically updates its own coordinates using a triggering method based on neighbor coordinates, the terminal node periodically sends its own coordinates to all neighbor nodes recorded in the routing table, and at the same time receives coordinate transmission information from neighbor nodes. If the coordinates of a neighbor node to a certain aggregation node plus one are smaller than its own coordinates, the terminal node updates its own coordinates to the neighbor node's coordinates plus one; otherwise, it does not update.
5. The cross-layer communication method for broadband and narrowband converged emergency self-organizing networks based on TPUNB and WIFI according to claim 1, characterized in that, When a terminal node periodically updates its own coordinates using a flooding mechanism based on the sink node, the sink node traverses its own routing table and periodically sends a coordinate update command to all neighboring nodes recorded in the routing table. This command is then flooded in the network. The coordinate update command records the hop count from the sink node to the terminal node that receives the command. After receiving the coordinate update command, the neighboring nodes of the sink node parse out the hop count in the command and update their own coordinates using the hop count according to the coordinate update principle. They then increment the hop count and forward it to all neighboring nodes in their own routing table. In each round of coordinate updates, the command sent by the same sink node is executed once within a single terminal node.
6. The cross-layer communication method for broadband and narrowband converged emergency self-organizing networks based on TPUNB and WIFI according to claim 1, characterized in that, The application layer defines a private communication protocol to encapsulate data, specifically including: The data type and data payload of the message are encapsulated. The data encapsulation format is: service_type+msg_type+len+message; Here, service_type represents the business type field, msg_type represents the message type field, len represents the length field, and message represents the valid data field.
7. The method for cross-layer communication in a broadband and narrowband converged emergency self-organizing network based on TPUNB and WIFI according to claim 1, characterized in that, The network layer uses a greedy search algorithm based on virtual coordinates to fuse an improved AODV routing protocol to construct mesh network transmission paths, specifically including: When there is a need to send data, a greedy search algorithm is used to find the next hop node based on the virtual coordinates and then the data is sent to that node. After receiving the data packet, the next-hop node repeatedly performs a greedy search to obtain the coordinates of the shortest-distance neighbor node and forwards the data until the destination node receives the data. When the greedy algorithm iterates through the coordinates of all neighboring nodes and calculates the distance, and determines that no neighboring node is closer to the destination node than itself, the fallback mechanism is executed. The fallback is performed to search the routing table to find a valid path to the destination node address. The data is then forwarded according to the next-hop node address recorded in the valid path. When there is no valid route to the destination node in its own routing table, a request-response mechanism is used to discover routes and maintain routes between nodes. Each node maintains a routing table, which records the coordinates and addresses of neighboring nodes, the address of the destination node for each path, the number of hops, and the sequence number.
8. The method for cross-layer communication in a broadband and narrowband converged emergency self-organizing network based on TPUNB and WIFI according to claim 7, characterized in that, The greedy search algorithm calculation process is as follows: Based on the known virtual coordinates of the destination node, traverse the virtual coordinates of all neighboring nodes recorded in the routing table and calculate the distance to the destination node's coordinates. The shortest distance calculation method is expressed as follows: G=(neighbor->coord.hop1-dest->coord.hop1) 2 +(neighbor->coord.hop2-dest->coord.hop2) 2 , Where, neighbor->coord is the coordinate of the neighbor node in the source node's routing table, and dest->coord is the coordinate of the destination node; The data sent by a node includes its own coordinates and address, the coordinates and address of the destination node, and the data.
9. The method for cross-layer communication in a broadband and narrowband converged emergency self-organizing network based on TPUNB and WIFI according to claim 7, characterized in that, When the request-response mechanism is executed, the node that initiates the route request generates a route request message (RREQ) and initiates data flooding to flood the data into the sub-network; Each node that receives a Route Request Message (RREQ) first checks the signal strength (RSSI) and noise floor (NOISE) of the received RREQ packet. If the signal strength (RSSI) is lower than the threshold (W1) or the noise floor (NOISE) is higher than the threshold (W2), the RREQ packet is discarded. If the node itself is the destination node or has a valid path to the destination node in its routing table, update its routing table and generate a route response message (RREP) to return to the node that initiated the route request. If no valid path is detected, update the routing table, add the reverse path to the source of the route request message (RREQ), increment the forwarding count of the route request message (RREQ), and continue to flood the route request message (RREQ) to other neighboring nodes. If it is determined that an intermediate node or the target node has received a route request message RREQ, it sends a route response message RREP, specifying the next hop node in the return path, and returns to the source node along the reverse path of the route request message RREQ. Each node that receives a route response message RREP establishes a forward path to the node that received the route response message RREP. After receiving the route response message RREP, the node that initiated the route request updates its routing table, records the route to the target node, and forwards the data to the next hop node of the route record.
10. The method for cross-layer communication in a broadband and narrowband converged emergency self-organizing network based on TPUNB and WIFI according to claim 1, characterized in that, The MAC layer uses the CSMA / CA algorithm to implement data collision detection and backoff control, specifically including: After setting the maximum backoff window exponent, if the RDC layer feedback channel is busy after data transmission (i.e., the RF module fails to transmit), the collision backoff phase begins. The backoff time is: delay = random() %( (2 MIN(collisions, CSMA_MAX_BE) -1)* backoff_period()); Where random() represents a random number, collisions represents the number of collisions that have occurred, CSMA_MAX_BE represents the maximum backoff window exponent, and backoff_period() represents the length of the backoff time slice per unit time. If a transmission conflict occurs again after each backoff and retransmission, the backoff window is expanded until it reaches (2). CSMA_MAX_BE -1)*backoff_period() window length.