A loRa-based gas inspection data transmission method
Patent Information
- Application Number
- CN202611087328.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-13
AI Technical Summary
[0039]1、本发明通过在步骤二中引入跨层融合网络拓扑斥力场的综合路由代价计算方法,将表征环境恶化程度的时空瓦斯梯度特征值代入指数型映射惩罚函数;当局部瓦斯浓度异常升高时,该机制能够触发权重自适应反转逻辑,使得环境风险斥力代价呈指数级上升;打破了传统多跳路由协议(如AODV或RPL)仅依靠物理层射频参数(RSSI、SNR)进行拓扑寻优的技术偏见;通过在底层逻辑中抵消高信噪比带来的“虚假优质路由”吸引力,引导网络拓扑主动绕开射频信号优良但面临物理断电或损毁风险的高危中继节点,从而有效防范了大量报警数据涌入单一高危节点而形成的通信路由黑洞,提升了工业恶劣环境下通信链路的生存率。
Smart Images

Figure CN122909636A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of wireless communication and industrial safety monitoring technology, specifically relating to a gas inspection data transmission method based on LoRa. Background Technology
[0002] In complex industrial environments such as underground coal mine tunnels and petrochemical industrial parks, traditional star-topology wireless communication (such as the standard LoRaWAN protocol) often faces severe signal multipath fading and communication dead zones due to physical shielding, high dust interference, and severe obstruction from metal pipelines and equipment. To ensure full coverage of gas environment inspection data, existing technologies typically employ low-power mesh networks (LoRaMesh) or chained multi-hop network topologies with multi-hop capabilities. In this network topology, fixed environmental monitoring terminals or mobile terminals carried by inspection personnel, in addition to undertaking their own data collection tasks, also need to act as underlying wireless relay nodes, relaying gas data packets from neighboring nodes, and ultimately converging them to a central gateway on the ground or at a remote location.
[0003] In existing wireless multi-hop routing protocols (such as AODV or RPL), the dynamic maintenance of the underlying network topology and route optimization are usually based entirely on the radio frequency communication characteristics of the physical layer or data link layer. When a patrol node or relay node needs to select the next hop transmission path, it usually does so by periodically listening to the beacon messages broadcast by neighboring nodes and extracting indicators such as Received Signal Strength Indication (RSSI), Signal-to-Noise Ratio (SNR), or Expected Transmissions (ETX) to calculate the current link cost. The algorithm then tends to select the path with the strongest radio frequency signal, the best transmission quality, and the fewest hops as the optimal data transmission channel.
[0004] However, in real-world gas inspection and leak alarm scenarios, gas leaks are often accompanied by spatial spread and sudden high risk. When a sudden gas leak occurs in a localized physical area, the relay node located in the center of the leak area (high-risk area) usually has excellent wireless channel transmission characteristics in the radio frequency space because it is physically closer to the inspection nodes near the leak source. Its feedback RSSI and SNR indicators are extremely excellent. At this time, existing routing algorithms, unable to perceive the physical danger, will automatically identify the relay node in the high-risk area as the golden routing node, thereby intensively scheduling and routing a large amount of inspection data and sudden alarm data from the surrounding area to this node for forwarding.
[0005] However, according to mining or chemical explosion-proof safety regulations, when the methane concentration in a local area exceeds the safety threshold, the area will quickly trigger a power interlock protection mechanism (such as a power cut-off device forcibly disconnecting non-explosion-proof or external power sources), or the relay node itself is highly susceptible to sudden damage or downtime in harsh and high-risk environments. This causes the transmission link, which was originally selected as the optimal one by traditional routing algorithms, to suddenly interrupt at the moment a large amount of core alarm data floods in.
[0006] Furthermore, traditional routing protocols, upon detecting a topology break, require waiting for the loss of multiple periodic heartbeat beacon packets before triggering route reconstruction or topology convergence (typically lasting several seconds to tens of seconds). During this blind window of topology convergence, critical emergency gas over-limit alarm packets cannot be routed and distributed at the underlying network layer, resulting in a large number being dropped or severely delayed at the network layer. This can easily lead to remote monitoring centers failing to receive core alarm information in a timely manner, thus missing the optimal opportunity for accident rescue.
[0007] Therefore, how to enable the routing transmission method to perceive the dangerous characteristics of the gas environment at the application layer in real time while ensuring stable transmission of the underlying network topology, and to proactively avoid high-risk relay nodes in advance before the topology link is damaged, so as to achieve adaptive microgrid topology self-healing and route reconstruction, is an urgent problem to be solved in the field of gas inspection data transmission based on LoRa. Summary of the Invention
[0008] To address the shortcomings of existing technologies, the present invention aims to provide a LoRa-based method for transmitting gas inspection data, thereby solving the problems in the prior art.
[0009] The objective of this invention can be achieved through the following technical solutions:
[0010] A LoRa-based method for transmitting gas inspection data includes:
[0011] Based on the gas concentration data collected by the current node, generate local spatiotemporal gas gradient feature values, and obtain the underlying radio frequency parameters of each adjacent candidate next-hop node and the corresponding neighbor spatiotemporal gas gradient feature values.
[0012] The basic gravitational cost is calculated based on the underlying radio frequency parameters of each adjacent candidate next-hop node, and the environmental risk repulsion cost is calculated based on the corresponding neighbor spatiotemporal gas gradient characteristic value. The basic gravitational cost and the environmental risk repulsion cost are weighted and fused to generate a comprehensive routing cost to each adjacent candidate next-hop node.
[0013] Obtain the comprehensive routing cost of the current next-hop relay node. If the preset topology reconstruction conditions are met based on the comprehensive routing cost, freeze the original route distribution logic, select a new next-hop node from the remaining candidate nodes other than the current next-hop relay node, and set the topology reconstruction trigger flag.
[0014] Based on the set topology reconstruction trigger flag, the target address of the MAC header of the gas inspection data packet to be sent is overwritten with the MAC address of the new next-hop node, and a high-risk avoidance hop point identifier is implanted in the MAC header; the backoff delay is determined based on the high-risk avoidance hop point identifier, and directional spread spectrum transmission is performed.
[0015] Furthermore, the process of generating local spatiotemporal gas gradient feature values based on the gas concentration data collected at the current node includes: acquiring a set of gas concentration time series data, extracting the concentration rise slope within a preset local time window and the base gas concentration value at the latest sampling time; performing a linear combination calculation of the base gas concentration value and the concentration rise slope to output the local spatiotemporal gas gradient feature values.
[0016] Furthermore, the process of calculating the fundamental gravitational cost includes:
[0017] The Received Signal Strength Indicator (RSSI) and Signal-to-Noise Ratio (SNR) are extracted from the underlying radio frequency parameters, normalized, and the fundamental gravitational cost is calculated. :
[0018]
[0019] in, and These are the signal strength gain weight and the signal-to-noise ratio gain weight, respectively. This is the received signal strength indication for the i-th adjacent candidate next-hop node; and These are the preset minimum receiving sensitivity and maximum saturation signal strength, respectively; Let be the signal-to-noise ratio of the i-th adjacent candidate next-hop node; and These are the preset lower limit and theoretical upper limit of the signal-to-noise ratio demodulation, respectively.
[0020] Furthermore, the process of calculating the environmental risk repulsion cost based on the corresponding neighboring spatiotemporal gas gradient eigenvalues includes:
[0021] The environmental risk repulsion cost is constructed by substituting the neighboring spatiotemporal gas gradient feature values into a preset exponential mapping penalty function;
[0022] When the neighboring spatiotemporal gas gradient characteristic value is greater than the preset safety benchmark concentration threshold, the weight adaptive reversal logic is triggered to increase the weight of the environmental risk repulsion cost in the weighted fusion.
[0023] Furthermore, based on the determination of the comprehensive routing cost value, a preset topology reconstruction condition is met, specifically including:
[0024] Extract the comprehensive routing cost of the current next-hop relay node in the current period, and the historical cost cached in the previous period, and calculate the time step change.
[0025] The time step change is determined to be greater than a preset cost step determination threshold, or the comprehensive routing cost of the current period is determined to be greater than a preset topology reconstruction absolute threshold.
[0026] Furthermore, the process of selecting a new next-hop node from the remaining candidate nodes other than the current next-hop relay node includes: traversing the remaining candidate nodes and selecting the suboptimal safe node with the smallest comprehensive routing cost and whose comprehensive routing cost is not greater than the absolute threshold of the topology reconstruction as the new next-hop node.
[0027] Furthermore, the process of embedding a high-risk avoidance jump point identifier in the MAC header includes: writing a preset value into the reserved bit of the frame control field in the MAC header to embed the high-risk avoidance jump point identifier as an implicit environmental obstacle avoidance signaling.
[0028] Furthermore, the process of determining the backoff delay based on the high-risk avoidance jump point identifier includes:
[0029] Based on the valid status of the high-risk avoidance jump point identifier, the corresponding priority preemption coefficient is extracted. According to the preemption coefficient Trigger the underlying channel contention backoff algorithm to calculate backoff delay :
[0030]
[0031] in, Let BE be a random integer function, and BE be the backoff index. Based on the time slot length.
[0032] A LoRa-based gas inspection data transmission system, performing the above method, includes:
[0033] The feature extraction module is used to generate local spatiotemporal gas gradient feature values based on the gas concentration data collected by the current node, and to obtain the underlying radio frequency parameters of each adjacent candidate next-hop node and the corresponding neighbor spatiotemporal gas gradient feature values.
[0034] The routing calculation module is used to calculate the basic gravitational cost based on the underlying radio frequency parameters of each adjacent candidate next-hop node, and to calculate the environmental risk repulsion cost based on the corresponding neighbor spatiotemporal gas gradient feature value; the basic gravitational cost and the environmental risk repulsion cost are weighted and fused to generate a comprehensive routing cost to each adjacent candidate next-hop node;
[0035] The topology self-healing module is used to obtain the comprehensive routing cost of the current next-hop relay node. When the preset topology reconstruction conditions are met based on the comprehensive routing cost, the original route distribution logic is frozen, a new next-hop node is selected from the remaining candidate nodes other than the current next-hop relay node, and the topology reconstruction trigger flag is set.
[0036] The transmitting module is used to overwrite the target address of the MAC header of the gas inspection data packet to be transmitted with the MAC address of the new next-hop node according to the set topology reconstruction trigger flag, and to implant a high-risk avoidance hop point identifier in the MAC header; determine the backoff delay based on the high-risk avoidance hop point identifier, and perform directional spread spectrum transmission.
[0037] A computer storage medium storing a readable program, which, when executed, instructs a computing device to perform the aforementioned LoRa-based gas inspection data transmission method.
[0038] The beneficial effects of this invention are:
[0039] 1. This invention introduces a comprehensive routing cost calculation method based on a cross-layer fusion network topology repulsion field in step two, substituting the spatiotemporal gas gradient characteristic value, which characterizes the degree of environmental deterioration, into an exponential mapping penalty function. When the local gas concentration rises abnormally, this mechanism can trigger a weight adaptive reversal logic, causing the environmental risk repulsion cost to increase exponentially. This breaks the technical bias of traditional multi-hop routing protocols (such as AODV or RPL) that rely solely on physical layer radio frequency parameters (RSSI, SNR) for topology optimization. By offsetting the attraction of "false high-quality routes" brought about by high signal-to-noise ratio in the underlying logic, the network topology is guided to actively bypass high-risk relay nodes with excellent radio frequency signals but facing the risk of physical power outages or damage. This effectively prevents a large amount of alarm data from flooding into a single high-risk node, thus improving the survivability of communication links in harsh industrial environments.
[0040] 2. This invention establishes a dual-track circuit breaker mechanism by collecting the first derivative (rising slope) of the gas concentration change in step one and setting a step change condition for the cost value based on the differential difference and an absolute limit-crossing condition in step three. This technical solution allows communication nodes to proactively freeze the original route at the MAC layer and complete the selection of suboptimal safe nodes during the brief blind window period before the actual physical power outage of the relay node, without waiting for a substantial physical channel break or data packet retransmission timeout. This proactive prediction and local reconstruction mechanism significantly compresses the convergence delay of traditional passive networks, ensuring continuous and uninterrupted transmission of life-threatening alarm data in the event of a sudden gas leak.
[0041] 3. Considering the strict duty cycle limitations and low effective payload bandwidth of LoRaWAN networks, this invention designs a dynamic MAC frame payload reassembly mechanism with evasion indicators in step four. By utilizing the reserved bits (RFU) in the MAC header frame control field to embed high-risk evasion hop point identifiers, the local topology detour status is directly attached as implicit signaling and synchronously transmitted in the service data frame. This avoids channel congestion caused by frequent broadcasting of global route update control frames. Subsequent nodes can learn that environmental obstacle avoidance has occurred at the front end after reading this identifier, thereby preventing packets from being transmitted back to the area where the change occurred. Without increasing additional communication load overhead, this effectively prevents network routing loop deadlock problems caused by local detours. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a flowchart of the gas inspection data transmission method of the present invention. Detailed Implementation
[0044] 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, and 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.
[0045] Example 1
[0046] like Figure 1 As shown, a LoRa-based gas inspection data transmission method includes the following steps:
[0047] Step 1: Node-aware data acquisition and preprocessing based on temporal environmental characteristics;
[0048] The system acquires the time-series data set of gas concentration collected by the current node and listens to extract the underlying radio frequency parameters (such as received signal strength indication and signal-to-noise ratio) carried in the beacon messages of adjacent candidate next-hop nodes in the physical layer to construct a link quality vector. Simultaneously, a sliding window algorithm is applied to the gas concentration time-series data set to calculate the first derivative of the gas concentration change within a local time window and obtain the concentration rise slope. Furthermore, a concentration gradient diffusion logic is introduced to linearly combine the current basic gas concentration value with the concentration rise slope to predict the environmental risk evolution trend within a preset future period and output a spatiotemporal gas gradient feature value that can characterize the degree of physical environmental deterioration.
[0049] Specifically, the data acquisition and preprocessing process includes:
[0050] S11: Radio frequency parameter sensing and link vector construction;
[0051] The current node periodically listens to beacon messages broadcast by neighboring candidate next-hop nodes through the physical layer, extracting the Received Signal Strength Indicator (RSSI) and Signal-to-Noise Ratio (SNR) carried in the beacon messages; based on the extracted underlying parameters, a two-dimensional link quality vector is directly constructed. The link quality vector is cached in the neighbor state table of the local MAC layer as input for subsequent gravity calculations; the mathematical expression of the link quality vector is:
[0052]
[0053] S12: Time-series gas concentration sampling and window sequence extraction;
[0054] The current node uses a connected local gas sensor at a fixed sampling period. Continuously acquire gas concentration sampling values; establish a sample capacity of [missing information] at the local data link layer. A sliding time window is used to extract the gas concentration sequence that strictly increases according to the time stamp within the window. This sequence contains the earliest concentration values at the start of the window. The baseline gas concentration value at the latest sampling time Its set representation is:
[0055]
[0056] S13: Calculate the first-order trend characteristics of concentration;
[0057] For the gas concentration sequence The first derivative of the gas concentration change within the local sliding time window was calculated using a difference algorithm. (That is, the slope of the concentration increase that characterizes the speed of gas leakage), its calculation formula is:
[0058]
[0059] in, The unit is seconds (s). This represents the absolute time span of the sliding time window.
[0060] S14: Cross-domain fusion and output of spatiotemporal gas gradient features
[0061] Inspired by the concentration gradient diffusion logic in fluid mechanics, the current baseline gas concentration value is used. With the slope of the concentration increase Perform linear combination calculations to output spatiotemporal gas gradient eigenvalues that characterize the degree of environmental deterioration at a specific physical node in time series. The calculation formula is as follows:
[0062]
[0063] in, The preferred range for the basic concentration weighting coefficient is 0.3 to 0.5. The trend weighting coefficient is preferably in the range of 1.2 to 2.0; the preferred range for the total number of sampling points W in the sliding window is 5 to 15.
[0064] By setting constraints This allows the node to remain operational even at the current absolute gas concentration. Even before reaching the nationally mandated power outage threshold, it can still be based on a very high slope. Early output of abnormally high This value enables communication nodes to predict environmental disasters, providing a quantitative benchmark for subsequent pre-emptive judgments.
[0065] Step 2: Calculation of the comprehensive routing cost of the cross-layer fusion network topology repulsion field;
[0066] The link quality vector obtained in step one is substituted into a preset routing metric model to calculate the basic gravitational cost characterizing the quality of the underlying communication link. Simultaneously, the spatiotemporal gas gradient feature value output in step one is substituted into a preset exponential mapping penalty function to construct a virtual environmental risk repulsion cost characterizing the level of environmental risk in the underlying network topology. Through a cross-layer fusion algorithm, the vector sum of the basic gravitational cost and the environmental risk repulsion cost is calculated, and the comprehensive routing cost sequence from the current node to each candidate neighboring node is output, thereby realizing the coupled evaluation of radio frequency communication quality and environmental physical risk in the underlying network layer of communication.
[0067] Specifically, the process of calculating the comprehensive routing cost includes:
[0068] S21: Neighbor node data alignment and state instantiation;
[0069] Suppose the set of candidate next-hop nodes for the current node is ,in The current node resolves the detected first... Extract the link quality vector for the i-th node from the beacon messages of the i-th candidate neighboring nodes. and simultaneously obtain the first Each node generates its own spatiotemporal gas gradient eigenvalues locally. .
[0070] S22: Extraction of underlying radio frequency fundamental gravity cost;
[0071] For each candidate neighbor node i in set N, its link quality vector is... and After performing double normalization, the data is substituted into a pre-defined gravitational routing metric model to calculate the fundamental gravitational cost characterizing the quality of the underlying physical radio frequency communication. The calculation formula is as follows:
[0072]
[0073] in, and These are the signal strength gain weight and the signal-to-noise ratio gain weight, respectively. (Preferred) ); and These are the preset minimum receive sensitivity and maximum saturation signal strength for the LoRa physical layer transceiver, respectively. and These represent the lower limit and theoretical upper limit of the signal-to-noise ratio (SNR) for demodulation.
[0074] S23: Construction of Environmental Risk Repulsion Costs;
[0075] Inspired by the artificial potential field method, the spatiotemporal gas gradient eigenvalues are... Substituting into the preset exponential mapping penalty function, an environmental risk repulsion cost representing the physical hazard repulsion effect is generated for node i in the underlying network topology logic. The calculation formula is as follows:
[0076]
[0077] Where e is the base of the natural logarithm; A is the constant of the repulsive force surge amplitude, preferably in the range of 10 to 50; and λ is the environmental risk amplification factor, preferably in the range of 0.5 to 1.5. This is the preset safety threshold concentration for gas.
[0078] S24: Cross-layer integration cost fusion and adaptive weight adjustment;
[0079] Calculated using cross-layer fusion algorithm and The weighted vector sum is used to output the comprehensive routing cost from the current node to the i-th candidate neighbor node. Finally, a complete comprehensive routing cost sequence is generated. The calculation formula is:
[0080]
[0081] in, For communication quality weights, As environmental risk weights, and .
[0082] This invention utilizes built-in weighted adaptive inversion logic: when At that time, set ;when When, the reverse setting is triggered. This logic, combined with exponential repulsion, causes the overall routing cost to surge exponentially when a neighboring node's gas consumption exceeds its limit. This forces traditional routing protocols to abandon high-risk nodes with excellent radio frequency performance but which may experience power outages at any time, thus achieving a topology that maximizes benefits and minimizes risks.
[0083] Step 3: Evaluation of local microgrid topology adaptive reconstruction based on underlying comprehensive cost;
[0084] The system polls and compares the values in the comprehensive routing cost sequence output in step two with the preset topology reconfiguration safety threshold. When it is determined that the comprehensive routing cost of the current default next-hop relay node undergoes a step change and exceeds the topology reconfiguration safety threshold, it is determined that the relay node faces the risk of physical damage or power outage due to excessive gas. The system immediately intercepts and freezes the original routing distribution logic at the data link layer. Subsequently, a forced update of the local routing table is performed. The candidate node with the smallest comprehensive routing cost that has not exceeded the threshold is re-selected from the sequence and established as the new next-hop node. The system outputs a locally updated routing table containing the new next-hop node and a topology reconfiguration trigger flag to proactively complete the self-healing of the local micronet topology before the physical link actually breaks.
[0085] Specifically, the process of local microgrid topology adaptive reconfiguration evaluation includes:
[0086] S31: Temporal state alignment and cost extraction;
[0087] Within the current listening period t, obtain the current next-hop node opt (which is configured by default in the local routing table of the current node) (where... ); the comprehensive routing cost sequence output from step two Accurately extract the current comprehensive routing cost for the node opt. At the same time, retrieve the historical value of the cache from the previous cycle t-1. .
[0088] S32: Dual-track determination of route step change and absolute limit violation;
[0089] The time-step change in cost is calculated using the differential difference algorithm. The step change condition is determined according to the formula:
[0090]
[0091] Alternatively, the formula for determining absolute limit exceedance conditions can be used:
[0092]
[0093] Anomaly assessment was conducted. Among other things, The preset threshold for determining the step change in cost is defined as 20% to 35% of the average gravitational cost under safe baseline conditions. The preset absolute threshold for topology reconstruction is set to a value that corresponds to the environmental penalty function. The output threshold is 1.2 to 1.5 times.
[0094] S33: Freezing of routing distribution logic and filtering of suboptimal safe nodes;
[0095] When the current next-hop node opt is determined to meet any of the above-mentioned over-limit conditions, the current node directly issues an interrupt command at the data link layer to freeze the original routing distribution logic; subsequently, the sequence is traversed. The remaining candidate node set New safe next-hop nodes are selected based on the following logic. :
[0096]
[0097] And the following constraints must be met: (j is the traversal variable).
[0098] S34: Local routing table update and reconstruction flags are set;
[0099] It will include the established new secure next-hop node. The local update routing table is written to the MAC layer cache, and the local topology reconstruction trigger flag is set. Set to 1.
[0100] Through a dual-track judgment mechanism, as long as the gas concentration shows an abnormal surge, the algorithm can proactively switch the route to the suboptimal node within the millisecond-level blind window period before the high-risk relay node is actually powered off or damaged, compressing the topology self-healing time to an extreme value and achieving deterministic, seamless detour.
[0101] Step 4: Dynamic reassembly and directional transmission of MAC frame payloads with circumvention markings;
[0102] When the topology reconstruction trigger flag output in step three is detected to be in a valid state, the gas inspection data packets that need to be reported are dynamically reassembled at the data link layer according to the local update routing table. The destination address of the current MAC frame is modified to the MAC address of the new next-hop node. At the same time, a high-risk avoidance hop point identifier is adaptively inserted into the reserved field of the re-encapsulated MAC frame header to notify subsequent routing nodes that the current data packet has undergone environmental detours, thereby avoiding network routing loops. Finally, the reassembled MAC frame payload is pushed into the high-priority transmission queue and directional spread spectrum transmission is performed based on the LoRa physical layer, so that the gas inspection data packets are relayed to the central gateway along the secure network topology link that avoids high-risk areas.
[0103] Specifically, the process of step four is as follows:
[0104] S41: Reconstructing State Monitoring and MAC Frame Header Rewriting
[0105] The current node monitors the topology reconfiguration trigger flag in real time at the data link layer. When detected At that time, the gas inspection data packet to be sent locally is intercepted, and the MAC header of the data packet is parsed. The device address field (DevAddr) in its frame header (FHDR) is forcibly overwritten to the new secure next-hop node established in step three. The physical MAC address.
[0106] S42: Implicit anti-loopway avoidance signage implanted;
[0107] While overwriting the address, the Frame Control Field (FCtrl) in the MAC frame header is extracted; using low-level bitmasking operations, the reserved bits (RFU) for future use in this field are set, and a custom high-risk evasion jump point identifier is written. This identifier is sent synchronously with the service data frame as an implicit signaling to notify subsequent relay nodes that the message is in a state of environmental obstacle avoidance and detour.
[0108] S43: Calculate the backoff delay based on the forced preemption mechanism;
[0109] After dynamic reassembly is completed, the reassembled MAC frame payload is pushed into the highest priority transmission queue, and the data link layer extracts the frame's... Identify and trigger the adaptive channel contention backoff algorithm, and calculate the absolute priority backoff delay. :
[0110]
[0111] in, To generate intervals A uniformly distributed random integer function; BE is the backoff index, initially set to a preset minimum backoff index. (Optimal 1~3), increment by 1 with each collision; The base time slot length set for the underlying physical layer.
[0112] The algorithm has built-in forced preemption logic: when a data frame is to be sent... At that time, a priority preemption coefficient is forcibly set. The value range is 0.1 to 0.3; when At that time, set .
[0113] S44: Directional spread spectrum transmission;
[0114] backoff delay After completion, the LoRa physical layer transceiver performs directional transmission with radio frequency spread factor, enabling the alarm data to be transmitted back along the reconstructed security topology link.
[0115] By using a data-included signaling mechanism, the detour status is hidden within valid redundant bits, preventing routing loops without increasing communication overhead; simultaneously, a mandatory preemption coefficient is used. This will exponentially shorten the backoff waiting time of the reconstructed alarm data packets, solving the problem of high-concurrency collisions caused by gas exceeding limits in high-risk areas.
[0116] Example 2
[0117] This embodiment proposes a LoRa-based gas inspection data transmission system, specifically including:
[0118] The feature extraction module is used to generate local spatiotemporal gas gradient feature values based on the gas concentration data collected by the current node, and to obtain the underlying radio frequency parameters of each adjacent candidate next-hop node and the corresponding neighbor spatiotemporal gas gradient feature values.
[0119] The routing calculation module is used to calculate the basic gravitational cost based on the underlying radio frequency parameters of each adjacent candidate next-hop node, and to calculate the environmental risk repulsion cost based on the corresponding neighbor spatiotemporal gas gradient feature value; the basic gravitational cost and the environmental risk repulsion cost are weighted and fused to generate a comprehensive routing cost to each adjacent candidate next-hop node;
[0120] The topology self-healing module is used to obtain the comprehensive routing cost of the current next-hop relay node. When the preset topology reconstruction conditions are met based on the comprehensive routing cost, the original route distribution logic is frozen, a new next-hop node is selected from the remaining candidate nodes other than the current next-hop relay node, and the topology reconstruction trigger flag is set.
[0121] The transmitting module is used to overwrite the target address of the MAC header of the gas inspection data packet to be transmitted with the MAC address of the new next-hop node according to the set topology reconstruction trigger flag, and to implant a high-risk avoidance hop point identifier in the MAC header; determine the backoff delay based on the high-risk avoidance hop point identifier, and perform directional spread spectrum transmission.
[0122] The methods of the present invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored on a remote recording medium or a non-transitory machine-readable medium and subsequently stored on a local recording medium, downloaded via a network. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses the code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for performing the methods shown herein.
[0123] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.
Claims
1. A method for transmitting gas inspection data based on LoRa, characterized in that, include: Based on the gas concentration data collected by the current node, generate local spatiotemporal gas gradient feature values, and obtain the underlying radio frequency parameters of each adjacent candidate next-hop node and the corresponding neighbor spatiotemporal gas gradient feature values. The basic gravitational cost is calculated based on the underlying radio frequency parameters of each adjacent candidate next-hop node, and the environmental risk repulsion cost is calculated based on the corresponding neighbor spatiotemporal gas gradient eigenvalues. The basic gravity cost and the environmental risk repulsion cost are weighted and fused to generate a comprehensive routing cost to each adjacent candidate next-hop node; Obtain the comprehensive routing cost of the current next-hop relay node. If the preset topology reconstruction conditions are met based on the comprehensive routing cost, freeze the original route distribution logic, select a new next-hop node from the remaining candidate nodes other than the current next-hop relay node, and set the topology reconstruction trigger flag. Based on the set topology reconstruction trigger flag, the target address of the MAC header of the gas inspection data packet to be sent is overwritten with the MAC address of the new next-hop node, and a high-risk avoidance hop point identifier is implanted in the MAC header. Based on the high-risk avoidance jump point identifier, the backoff delay is determined, and directional spread spectrum transmission is performed.
2. The method for transmitting gas inspection data based on LoRa according to claim 1, characterized in that, The process of generating local spatiotemporal gas gradient feature values based on gas concentration data collected at the current node includes: acquiring a set of gas concentration time series data, extracting the concentration rise slope within a preset local time window and the base gas concentration value at the latest sampling time; performing a linear combination calculation of the base gas concentration value and the concentration rise slope to output the local spatiotemporal gas gradient feature values.
3. The method for transmitting gas inspection data based on LoRa according to claim 1, characterized in that, The process of calculating the fundamental gravitational cost includes: The Received Signal Strength Indicator (RSSI) and Signal-to-Noise Ratio (SNR) are extracted from the underlying radio frequency parameters, normalized, and the fundamental gravitational cost is calculated. : ; in, and These are the signal strength gain weight and the signal-to-noise ratio gain weight, respectively. This is the received signal strength indication for the i-th adjacent candidate next-hop node; and These are the preset minimum receiving sensitivity and maximum saturation signal strength, respectively; Let be the signal-to-noise ratio of the i-th adjacent candidate next-hop node; and These are the preset lower limit and theoretical upper limit of the signal-to-noise ratio demodulation, respectively.
4. The method for transmitting gas inspection data based on LoRa according to claim 1, characterized in that, The process of calculating the environmental risk repulsion cost based on the corresponding neighboring spatiotemporal gas gradient eigenvalues includes: The environmental risk repulsion cost is constructed by substituting the neighboring spatiotemporal gas gradient feature values into a preset exponential mapping penalty function; When the neighboring spatiotemporal gas gradient characteristic value is greater than the preset safety benchmark concentration threshold, the weight adaptive reversal logic is triggered to increase the weight of the environmental risk repulsion cost in the weighted fusion.
5. The method for transmitting gas inspection data based on LoRa according to claim 1, characterized in that, Based on the determination of the comprehensive routing cost value, the preset topology reconstruction conditions are met, specifically including: Extract the comprehensive routing cost of the current next-hop relay node in the current period, and the historical cost cached in the previous period, and calculate the time step change. The time step change is determined to be greater than a preset cost step determination threshold, or the comprehensive routing cost of the current period is determined to be greater than a preset topology reconstruction absolute threshold.
6. The method for transmitting gas inspection data based on LoRa according to claim 5, characterized in that, The process of selecting a new next-hop node from the remaining candidate nodes other than the current next-hop relay node includes: traversing the remaining candidate nodes, selecting the suboptimal safe node with the smallest comprehensive routing cost and whose comprehensive routing cost is not greater than the absolute threshold of the topology reconstruction, and establishing it as the new next-hop node.
7. The method for transmitting gas inspection data based on LoRa according to claim 1, characterized in that, The process of embedding a high-risk avoidance jump point identifier in the MAC header includes: writing a preset value into the reserved bit of the frame control field in the MAC header to embed the high-risk avoidance jump point identifier as an implicit environmental obstacle avoidance signaling.
8. The method for transmitting gas inspection data based on LoRa according to claim 1, characterized in that, The process of determining the backoff delay based on the high-risk avoidance jump point marker includes: Based on the valid status of the high-risk avoidance jump point identifier, the corresponding priority preemption coefficient is extracted. According to the preemption coefficient Trigger the underlying channel contention backoff algorithm to calculate backoff delay : ; in, Let BE be a random integer function, and BE be the backoff index. Based on the time slot length.
9. A LoRa-based gas inspection data transmission system, comprising the method described in any one of claims 1-8, characterized in that, include: The feature extraction module is used to generate local spatiotemporal gas gradient feature values based on the gas concentration data collected by the current node, and to obtain the underlying radio frequency parameters of each adjacent candidate next-hop node and the corresponding neighbor spatiotemporal gas gradient feature values. The routing calculation module is used to calculate the basic gravitational cost based on the underlying radio frequency parameters of each adjacent candidate next-hop node, and to calculate the environmental risk repulsion cost based on the corresponding neighbor spatiotemporal gas gradient characteristic value. The basic gravity cost and the environmental risk repulsion cost are weighted and fused to generate a comprehensive routing cost to each adjacent candidate next-hop node; The topology self-healing module is used to obtain the comprehensive routing cost of the current next-hop relay node. When the preset topology reconstruction conditions are met based on the comprehensive routing cost, the original route distribution logic is frozen, a new next-hop node is selected from the remaining candidate nodes other than the current next-hop relay node, and the topology reconstruction trigger flag is set. The sending module is used to overwrite the target address of the MAC header of the gas inspection data packet to be sent with the MAC address of the new next-hop node according to the set topology reconstruction trigger flag, and to implant a high-risk avoidance hop point identifier in the MAC header. Based on the high-risk avoidance jump point identifier, the backoff delay is determined, and directional spread spectrum transmission is performed.
10. A computer storage medium storing a readable program, characterized in that, When the program is running, it can instruct the computing device to execute a LoRa-based gas inspection data transmission method as described in any one of claims 1-8.