A gas detection early warning method and system
Patent Information
- Application Number
- CN202611126021.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-30
AI Technical Summary
然而,这种方式难以兼顾预警的及时性与准确性,阈值设定较高时,只能在浓度逼近危险水平时才报警,难以为人员疏散预留提前量,阈值设定较低时,又易在正常浓度波动下频繁误报
[0011]在本申请中,针对工业现场多种可燃气体共存的情形,以各可燃气体的爆炸下限参数的倒数作为表征其危险程度的物理先验权重,对多个气体探测终端采集的气体浓度时间序列进行危险加权交叉融合,使爆炸下限越低的可燃气体在跨类别特征融合中获得越高的权重,从而得到能够反映不同类别可燃气体之间危险耦合关系的危险耦合全局特征。相较于相关技术中按单一气体、单一通道独立判断的方式,该危险耦合全局特征综合了多种可燃气体之间的相互作用与各自危险程度的差异,为后续预测提供了更全面、更贴合实际爆炸风险的特征依据,从而提升了预警的准确性。
Smart Images

Figure CN123016640A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of gas detection, specifically to a gas detection and early warning method and system. Background Technology
[0002] In industrial settings such as chemical, mining, metallurgy, and municipal pipeline networks, various hazardous gases may be generated or leaked during production or operation. Once the concentration of hazardous gases reaches dangerous levels, it will pose a serious threat to the safety of on-site personnel and production facilities. Therefore, detection and early warning of hazardous gases are crucial for ensuring safe production.
[0003] In related technologies, the gas concentration value collected by the gas detection terminal is usually compared with a pre-set fixed threshold, and an alarm is triggered when the value exceeds the fixed threshold. However, this method is difficult to balance the timeliness and accuracy of the warning. When the threshold is set too high, an alarm can only be triggered when the concentration approaches a dangerous level, making it difficult to allow sufficient time for personnel evacuation. When the threshold is set too low, false alarms are likely to occur frequently under normal concentration fluctuations.
[0004] Furthermore, industrial site conditions are complex and variable, and multiple hazardous gases with different hazardous properties often coexist. Fixed thresholds are difficult to set reasonably, and the aforementioned methods only passively trigger alarms when the concentration reaches hazardous levels, failing to provide early warning before a hazard occurs. Therefore, it is evident that the relevant technologies cannot guarantee the timeliness and accuracy of hazardous gas detection and early warning. Summary of the Invention
[0005] This application provides a gas detection and early warning method and system, which can improve the timeliness and accuracy of hazardous gas detection and early warning.
[0006] This application provides a gas detection and early warning method, including: Acquire time series of gas concentrations collected by multiple gas detection terminals deployed in the target area. Different gas detection terminals are used to detect different types of test gases, and at least two of the different types of test gases are combustible gases. The preset lower explosive limit parameters corresponding to each combustible gas are obtained, and the gas concentration time series are subjected to hazard-weighted cross-fusion based on the reciprocal of the lower explosive limit parameters of each combustible gas to obtain the hazard-coupled global features. Based on the global characteristics of hazard coupling, the concentration prediction sequence of each combustible gas in the future within a preset time period is obtained, as well as the remaining time information for the target area to reach the preset joint hazard state. The preset joint hazard state is the state in which the mixed hazard index reaches the preset hazard threshold. The mixed hazard index is the sum of the ratios of the concentration of each combustible gas to its corresponding lower explosive limit parameter at the same time. When the remaining time information meets the preset warning trigger conditions, a danger warning message is sent to the preset warning target.
[0007] This application also provides a gas detection and early warning system, including: The sequence acquisition unit is used to acquire the gas concentration time series collected by multiple gas detection terminals deployed in the target area. Different gas detection terminals are used to detect different types of test gases, and at least two of the different types of test gases are combustible gases. The sequence processing unit is used to obtain the preset lower explosive limit parameters corresponding to each combustible gas, and to perform hazard-weighted cross-fusion on the gas concentration time series based on the reciprocal of the lower explosive limit parameters of each combustible gas to obtain the hazard-coupled global features. The prediction unit is used to predict the concentration sequence of each combustible gas in a future preset time period based on the global characteristics of hazard coupling, as well as the remaining time information for the target area to reach the preset joint hazard state. The preset joint hazard state is the state in which the mixed hazard index reaches the preset hazard threshold. The mixed hazard index is the sum of the ratios of the concentration of each combustible gas to its corresponding lower explosive limit parameter at the same time. The danger alert unit is used to send danger alert information to the preset warning object when the remaining time information meets the preset warning triggering conditions.
[0008] This application also provides an electronic device, including a processor and a memory, wherein the memory stores multiple instructions; the processor loads instructions from the memory to execute the steps in any of the gas detection and early warning methods provided in this application.
[0009] This application also provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the gas detection and early warning methods provided in this application.
[0010] This application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps in any of the gas detection and early warning methods provided in this application.
[0011] In this application, for situations where multiple combustible gases coexist in industrial settings, the reciprocal of the lower explosive limit (LEL) parameter of each combustible gas is used as a physical prior weight to characterize its hazard level. Gas concentration time series collected from multiple gas detection terminals are subjected to hazard-weighted cross-fusion, ensuring that combustible gases with lower LELs receive higher weights in cross-category feature fusion. This results in a global hazard coupling feature that reflects the hazard coupling relationship between different types of combustible gases. Compared to related technologies that independently judge based on a single gas or single channel, this global hazard coupling feature integrates the interactions between multiple combustible gases and the differences in their respective hazard levels, providing a more comprehensive and realistic feature basis for subsequent predictions of explosion risks, thereby improving the accuracy of early warning.
[0012] Furthermore, this application, based on the global characteristics of hazard coupling, predicts the concentration prediction sequence of each combustible gas within a preset time period and predicts the remaining time information before the target area reaches a preset joint hazard state. The preset joint hazard state is defined by whether the sum of the ratios of the concentrations of each combustible gas to its lower explosive limit parameter reaches a preset hazard threshold. Thus, the joint hazard state under the combined action of multiple gases, rather than the concentration threshold of a single gas, serves as the criterion for early warning. On one hand, the remaining time information can be obtained before the target area actually reaches the joint hazard state. When the early warning triggering conditions are met, a hazard warning message is sent to the preset warning target, providing a quantifiable early warning time window before the hazard occurs, allowing time for personnel evacuation and emergency response. This overcomes the deficiency of fixed threshold alarms in related technologies, which only trigger after the hazard has occurred. On the other hand, the concentration prediction sequence and the remaining time information can be jointly predicted based on the same global characteristics of hazard coupling, and are mutually verified through physical consistency constraints, further improving the accuracy of the remaining time information. Therefore, this application improves the timeliness and accuracy of gas detection and early warning. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1a This is a schematic flowchart of the gas detection and early warning method provided in the embodiments of this application; Figure 1b This is a schematic diagram of the data processing of the dual-branch prediction model provided in the embodiments of this application; Figure 2 This is a schematic diagram of the gas detection and early warning system provided in the embodiments of this application. Detailed Implementation
[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0016] This application provides a gas detection and early warning method and system.
[0017] This gas detection and early warning system can be integrated into electronic devices, including but not limited to edge devices, terminals, or servers. Edge devices include microcontroller (MCU)-based gas detection devices, embedded devices, edge computing gateways, or programmable logic controllers (PLCs); terminals include industrial PCs, laptops, or personal computers (PCs); and servers can be single servers or distributed server clusters.
[0018] In some embodiments, the system can be distributed and integrated across multiple electronic devices to achieve the gas detection and early warning method of this application through edge-cloud collaboration. For example, the server completes the training and lightweighting of the model on sample data in the source and target domains; then the lightweighted model is distributed and deployed to microcontroller-based edge devices, where the edge devices locally perform gas concentration time series acquisition, feature cross-fusion, and synchronous joint prediction and early warning of concentration and remaining time in the target area. Furthermore, terminals or edge devices with computing power can also undertake some or all of the functions of the server.
[0019] In a preferred embodiment, the system is integrated into a microcontroller-based edge gas detection device to achieve a localized closed loop of hazardous gas detection, trend prediction, and real-time early warning. This architecture eliminates the need for cloud computing power for real-time inference, effectively mitigating risks such as data transmission delays, privacy data leaks, and network communication limitations or outages, thus significantly improving the reliability and timeliness of safety early warnings in industrial settings.
[0020] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0021] The following sections provide detailed descriptions of each example. It should be noted that the sequence numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0022] In this embodiment, a gas detection and early warning method is provided, such as... Figure 1a As shown, this gas detection and early warning method, applied to gas detection equipment, can be described in the following specific steps: S101. Obtain the gas concentration time series collected by multiple gas detection terminals deployed in the target area. Different gas detection terminals are used to detect different types of test gases, and at least two of the different types of test gases are combustible gases.
[0023] The target area refers to the industrial site space that may generate or leak hazardous gases and requires hazardous gas detection and early warning, such as chemical production workshops, mine tunnel working faces, metallurgical smelting plants, or enclosed or semi-enclosed spaces with leakage risks, such as municipal underground pipeline well chambers, gas pressure regulating stations, and sewage treatment ponds.
[0024] The gas to be tested refers to the gas that the gas detection terminal set up in the target area is to detect, which, when it reaches a dangerous level, will threaten personnel safety or production facilities. The gas to be tested includes multiple categories, and different gas detection terminals are used to detect different categories of the gas to be tested. Among them, at least two of the gas to be tested are combustible gases. Combustible gases are gases that can burn or explode when mixed with air and reach a certain concentration and encounter a source of ignition, such as methane (CH4), hydrogen (H2) and other flammable and explosive gases. The gas to be tested may also include toxic gases such as carbon monoxide (CO) and hydrogen sulfide (H2S), asphyxiating gases such as carbon dioxide (CO2), and volatile organic compounds (VOCs) and volatile organic gases such as benzene.
[0025] A gas detection terminal is a sensor device installed in a target area to detect the concentration of a corresponding type of gas in real time and output the gas concentration value. Multiple gas detection terminals can form a multi-sensor array. For example, a gas detection terminal can be an electrochemical sensor based on redox reaction, an infrared sensor based on infrared absorption spectroscopy, a photoionization (PID) sensor based on ultraviolet photoionization, a catalytic combustion sensor based on catalytic oxidation, or a semiconductor gas sensor, etc.
[0026] Deployment refers to the method of installing and fixing multiple gas detection terminals in a target area according to a preset layout. For example, the preset layout can be a grid layout with equal spacing, a layout near key risk sources, or a layout along the path where gas tends to accumulate.
[0027] In some embodiments, the total number N of the gas to be measured is set to 4. These 4 types of gas to be measured are divided according to their corresponding sensing detection principles, and specifically include: Toxic and harmful gases (such as carbon monoxide CO, hydrogen sulfide H2S, etc.) are detected based on the principle of electrochemical sensing. Gases detected based on the principle of non-dispersive infrared (NDIR) absorption spectroscopy (e.g., methane CH4, carbon dioxide CO2). Volatile organic compounds (such as conventional VOCs, benzene compounds, etc.) detected based on the principle of ultraviolet photoionization (PID). In addition, broad-spectrum combustible gases (such as hydrogen H2, propane, etc.) detected based on the principle of catalytic combustion (catalytic oxidation).
[0028] "Collection" refers to the method by which a gas detection terminal samples the concentration of the gas to be measured according to a preset collection cycle. "Detection" refers to the method by which a sensor converts the gas concentration into an electrical signal through its sensitive elements (such as electrochemical electrodes, infrared optical paths, photoionization chambers, or catalytic elements), and then obtains the gas concentration value through analog-to-digital conversion and calibration.
[0029] A gas concentration time series refers to a sequence of gas concentration values detected by a corresponding gas detection terminal at multiple consecutive acquisition times, arranged in chronological order of acquisition time. For example, stacking the gas concentration time series of each channel of a multi-sensor array along the channel dimension can form a two-dimensional data with shape [N,L], where N is the number of gas detection terminals (i.e., sensor channels), which is also the total number of categories of gases to be measured, and L is the preset time window length (i.e., sequence length). During batch training, this two-dimensional data is a tensor with shape [B,N,L], where B is the batch size.
[0030] The sampling time refers to the time during which the gas detection terminal detects the gas concentration value. The gas detection terminal can detect the gas concentration value at multiple consecutive sampling times according to a preset sampling cycle.
[0031] A gas concentration value refers to a numerical value that characterizes the concentration of the corresponding gas being measured, detected by a gas detection terminal at a certain acquisition time. For example, the dimensions of a gas concentration value can be parts per million (ppm), parts per billion (ppb), percentage of the lower explosive limit (%LEL), or percentage of volume (vol%), etc.
[0032] In some embodiments, data acquisition and input construction can still be completed efficiently and in real time on microcontrollers with limited computing power and memory, providing support for real-time detection and early warning at the edge, and further reducing the latency of detection and early warning. Specifically, the time series of gas concentrations collected by multiple gas detection terminals deployed in the target area are acquired, including: Based on the direct memory access mechanism of the microcontroller, the gas concentration values output by each gas detection terminal at each acquisition time are obtained from the hardware interface corresponding to each gas detection terminal. According to the preset time window length, the gas concentration values continuously output by each gas detection terminal within the preset time window length are serialized and spliced together to construct a gas concentration time series.
[0033] Direct Memory Access (DMA) refers to a mechanism where data transfer between peripherals and memory is completed directly by a dedicated DMA controller without requiring the microcontroller kernel (i.e., the Central Processing Unit, CPU) to handle the data byte-by-byte. For example, it could be a mechanism where, after analog-to-digital conversion (ADC), the DMA controller automatically moves the conversion result to a preset memory buffer; it could be a mechanism using double buffering (ping-pong buffering), where one buffer is being read by the kernel while the other continues to receive data; or it could be a mechanism using circular buffering to continuously receive multi-channel sampling data. In this case, "acquisition" is implemented by using this mechanism to directly move the gas concentration values from each hardware interface to memory, and then the kernel reads them from memory.
[0034] The hardware interface refers to the physical interface on the microcontroller used to connect to the gas detection terminal and receive its output signals. Each gas detection terminal has its own corresponding hardware interface.
[0035] For example, for a gas detection terminal with analog output, the hardware interface can be an analog-to-digital converter (ADC) channel (e.g., connecting four sensors to the four ADC pins of the development board); for a gas detection terminal with digital output, the hardware interface can be an inter-integrated circuit (IIC) bus. 2 C) Serial bus interfaces such as Serial Peripheral Interface (SPI); it can also be a General Purpose Input / Output (GPIO) pin or an interface connected via signal conditioning circuitry.
[0036] The preset time window length refers to the number of consecutive acquisition times (or consecutive gas concentration values) included within the time window used to construct a gas concentration time series by extracting a segment from the continuously output gas concentration values of the gas detection terminal. This time window length is the length L of the constructed gas concentration time series. For example, the time window length can be set according to the number of acquisition points, such as each time window containing L consecutive acquisition times, corresponding to a gas concentration time series of length L; it can also be set according to the duration of the time, such as each time window corresponding to a continuous acquisition period of 10 seconds, 30 seconds, or 60 seconds; a sliding window method can also be used, allowing overlap between adjacent time windows (i.e., the sliding step size of the time window is less than the time window length) to achieve continuous monitoring of the target area.
[0037] Serialization splicing refers to the process of arranging and splicing multiple gas concentration values continuously output by a gas detection terminal within a preset time window into a sequence according to the order of their acquisition time. For example, L gas concentration values continuously output by a single gas detection terminal within a time window can be arranged into a one-dimensional sequence of length L according to the order of their acquisition time (i.e., the gas concentration time series corresponding to that terminal). The one-dimensional sequences of multiple gas detection terminals (such as N sensors, where N is the total number of categories of gases to be measured, and in one implementation N is 4) can be stacked according to the channel dimension to construct a two-dimensional data of shape [N,L] (a tensor of shape [B,N,L] during batch training, where B is the batch size; and a batch size of 1 during edge inference, i.e., a tensor of shape [1,N,L]). Time alignment and padding (such as interpolation or zero padding for missing sampling points) can also be performed during splicing to ensure that the length of each sequence is consistent. Among them, "serialization splicing" is achieved by writing in the order of acquisition time and then stacking by channel dimension; "construction" is the above-mentioned method of serializing gas concentration values according to time window.
[0038] S102. Obtain the preset lower explosive limit parameters corresponding to each combustible gas, and perform hazard-weighted cross-fusion on the gas concentration time series based on the reciprocal of the lower explosive limit parameters of each combustible gas to obtain the hazard-coupled global features.
[0039] The lower explosive limit (LEL) is the lowest concentration at which a flammable gas can explode in air. It is a crucial physical property characterizing the hazard level of a flammable gas: the lower the LEL value, the easier it is for the gas to reach explosive conditions, and the higher the potential hazard. The LEL for each flammable gas can be obtained in advance from relevant safety standards or Material Safety Data Sheets (MSDS), and is typically expressed as a volume percentage (%VOL).
[0040] It should be noted that the hazard-weighted cross-fusion method in this application is an adaptive fusion mechanism that internalizes the physicochemical hazard properties of gases into the feature weights of a neural network. Specifically, this mechanism is not limited to extracting the numerical changes in the concentration of a single gas over time, but uses the inherent hazard parameters of the gas (such as the lower explosive limit parameter of flammable gases, or the lethal / hazardous concentration threshold of toxic gases) as prior physical constraints. By mapping the reciprocal of the hazard parameter to attention weights or scaling factors, the hidden features of multiple gas concentration time series are weighted and cross-combined. This process enables the model to adaptively allocate more computational resources and feature expression weights to gas channels that are "intrinsically highly hazarded (e.g., with extremely low lower explosive limits)" and "in a mixed and rising state."
[0041] Hazard-coupled global features refer to the high-dimensional feature vectors or feature matrices output by mathematically mapping and tensor fusion of the gas concentration time series collected by multiple detection terminals with the inherent physicochemical hazard priors of each gas (such as lower explosion limit parameters, hazard concentration thresholds, etc.) through feature extraction networks and cross-attention mechanisms in deep learning models.
[0042] In some embodiments, the global characteristics of dangerous coupling include a deep representation comprising the following three dimensions: Global temporal receptive field: This feature aggregates multi-scale temporal information in the time dimension, including not only the transient change characteristics in the early stage of gas leakage, but also the evolution of concentration envelope during gas diffusion and the long-term baseline change pattern affected by environmental drift, reflecting the global temporal dynamics of gas diffusion.
[0043] Multi-gas cooperative interference: This feature breaks the "data silo" of a single sensor in the channel dimension, maps the co-variation correlation of concentrations of different types of hazardous gases (including various combustible gases and potential toxic gases) in the same space and time in the hidden layer space, and quantifies the nonlinear cooperative evolution mode caused by the superposition of physical properties when multiple gases coexist.
[0044] Physical hazard orientation: Through hazard-weighted processing, this feature internally completes the pre-mapping of physical hazard states. It adaptively amplifies the characteristic response of low safety threshold (i.e., high hazard) gases in small fluctuations, and suppresses redundant expression of high safety threshold gases or background interference factors, so that the feature itself has the ability to characterize "potential joint hazard states".
[0045] In some embodiments, on the one hand, by setting feature extraction branches with different temporal receptive fields in parallel, the model can fully capture the dynamic changes in concentration across multiple time scales, effectively overcoming the shortcomings of easily missing sudden leaks (short-term features) or failing to detect slow drift of the sensor baseline (long-term features) at a single time scale, thus achieving a balance between sensitivity and stability in feature extraction. On the other hand, the physicochemical law (the reciprocal of the lower explosive limit) is internalized into the forward propagation structure of the neural network. A hazard attention mask is constructed using collaborative hazard weight coefficients, which not only breaks down data silos between multi-channel sensors but also forces the neural network to adaptively allocate extremely high feature attention to gas combinations that are "lower explosive limit (i.e., high hazard)" and "currently undergoing mixed and ascending evolution" at the initial stage of feature fusion. This feature weighting mechanism based on physical priors greatly improves the model's sensitivity to early subthreshold joint hazard states, effectively avoiding false alarms and missed detections.
[0046] Specifically, based on the reciprocal of the lower explosive limit parameter of each combustible gas, the gas concentration time series are subjected to hazard-weighted cross-fusion to obtain hazard-coupled global features, including: By using multiple feature extraction branches set in parallel, feature extraction processing is performed on the gas concentration time series at multiple time scales to obtain the temporal feature information corresponding to each time scale. Different feature extraction branches have different temporal receptive fields, and the temporal feature information reflects the dynamic change characteristics of the gas concentration time series at the corresponding time scale. For any i-th combustible gas and j-th combustible gas among all combustible gases, the product of the reciprocal of the lower explosive limit parameter of the i-th combustible gas and the reciprocal of the lower explosive limit parameter of the j-th combustible gas is determined as the cooperative hazard weight coefficient between the i-th combustible gas and the j-th combustible gas. A hazard attention mask is constructed based on the cooperative hazard weighting coefficients between each pair of combustible gas. By using hazard attention masking, the temporal features corresponding to each combustible gas are weighted and then cross-fused to obtain hazard-coupled global features. This enhances the feature representation of combustible gases with lower lower explosive limit parameters and rising mixed concentrations during the fusion process.
[0047] Among them, the feature extraction branch refers to the network branch that performs feature extraction on a certain time scale for the gas concentration time series.
[0048] A time scale refers to the time span used to characterize the dynamic changes in gas concentration over a time series. Different time scales correspond to the dynamic changes in gas concentration over time spans of varying lengths. For example, time scales can include: short time scales, corresponding to transient changes in gas concentration over a short time span (such as rapid abrupt changes in concentration at the beginning of a gas leak); medium time scales, corresponding to changes in the diffusion envelope of gas concentration over a medium time span (such as fluctuations in the concentration envelope caused by gas diffusion); and long time scales, corresponding to the long-term evolution trend of gas concentration over a long time span (such as slow and gradual changes in concentration caused by environmental factors). In this application, multiple feature extraction branches correspond to different time scales, and each feature extraction branch is used to extract the dynamic changes in concentration at its corresponding time scale.
[0049] The temporal receptive field refers to the length of a continuous time interval on the input gas concentration time series upon which a single feature point in the output features of a feature extraction branch depends for computation. Specifically, since convolution operations only cover a small segment of the input gas concentration time series each time, each feature point in the output features is calculated from only a few gas concentration values within that segment. The span of this input time interval "covered" by the feature point is the temporal receptive field. A larger temporal receptive field means that a single feature point integrates concentration change information over a longer time span, and the time scale corresponding to that feature extraction branch is also longer. For example, the temporal receptive field can be adjusted by the dilation rate of dilated convolution (a larger dilation rate results in a larger temporal receptive field), by the kernel size or the number of stacked convolutional layers, and by the downsampling stride. This application configures different temporal receptive fields for multiple feature extraction branches, making each feature extraction branch correspond to the aforementioned different time scales.
[0050] Parallel configuration of multiple feature extraction branches refers to the independent extraction of features at the corresponding time scale from the same gas concentration time series. For example, the number of feature extraction branches can be two, three, or more.
[0051] In one implementation, such as Figure 1b As shown, the parallel feature extraction branches are divided into three types: short-time scale branch, medium-time scale branch, and long-time scale branch.
[0052] Temporal feature information refers to the data output by the feature extraction branch after extracting features from a gas concentration time series, reflecting the dynamic changes in the gas concentration over the corresponding time scale. For example, temporal feature information can be a feature map, feature vector, or feature sequence.
[0053] Concentration dynamics refer to the patterns or regularities of gas concentration changes over time, as reflected in a gas concentration time series. For example, concentration dynamics can include the rate of increase or decrease, amplitude of fluctuations, morphology of fluctuations, and trends in gas concentration over time. At different time scales, concentration dynamics manifest themselves in various forms, such as transient changes at short time scales, diffusion envelope changes at medium time scales, and long-term evolution trends at long time scales.
[0054] The i-th and j-th combustible gases refer to two gas channels arbitrarily selected from the set of multiple combustible gases detected in the target area. Here, i and j are the index identifiers of the gas channels. It should be noted that when i=j, it indicates the prior extraction of the danger of the combustible gas itself, and when i≠j, it indicates the dangerous cross-coupling relationship between different combustible gases.
[0055] The reciprocal of the lower explosive limit parameter transforms the inherent physical safety threshold of a gas into a "hazard prior weight" that can be recognized by a neural network. Since the lower explosive limit (LEL) of a gas is more dangerous the lower it is, taking its reciprocal enables a reverse mapping of physical quantities, that is, transforming a "low lower explosive limit" into a "high feature attention weight".
[0056] The synergistic hazard weighting coefficient is used to characterize the degree of hazard coupling between the i-th and j-th combustible gases. Since the reciprocal of the lower explosive limit of a combustible gas is larger, when the lower explosive limits of both combustible gases in a mixture are low, the product of their reciprocals will produce a nonlinear exponential amplification, and the synergistic hazard weighting coefficient will increase sharply, indicating that the degree of hazard synergistic coupling when the two gases coexist is extremely high.
[0057] A hazard attention mask is a matrix composed of the cooperative hazard weight coefficients between each pair of combustible gases, arranged according to the channel index of the gas pair. For example, for N types of combustible gases, the hazard attention mask is an N×N dimensional weight matrix, where the element in the i-th row and j-th column is the cooperative hazard weight coefficient between the i-th and j-th combustible gases. This mask can be directly used as the prior weight bias of the attention mechanism in matrix multiplication operations to multiply the input temporal feature vector.
[0058] The hazard coupling global feature refers to a high-dimensional feature tensor generated by fusing the multi-scale temporal features of each combustible gas after the aforementioned weighted processing through cross-channel splicing and pointwise convolution. For example, for N combustible gases with an input sequence length of L, the hazard coupling global feature is represented as a three-dimensional feature tensor with C feature channels and a strictly maintained time dimension of L (its shape can be represented as [B,C,L], where B is the batch size of the model input, and in real-time inference applications on edge devices, B is usually 1). Any feature vector within it is a high-order abstract expression that simultaneously embeds the multi-scale physical diffusion laws of gases and the degree of cross-hazard of multiple gases. In the subsequent prediction process, this global feature can be directly used as the unified data input base for a dual-branch regression prediction network to synchronously decode and output the future concentration prediction sequence of each gas, as well as the remaining time information for reaching the preset joint hazard state.
[0059] In some embodiments, without increasing the number of network parameters or compromising time series resolution, the model's temporal receptive field is expanded exponentially, enabling it to accurately and comprehensively capture the multi-scale physical dynamics of gas leaks, from transient changes and spatial dispersion to long-term drift. This lightweight and high-resolution multi-scale feature extraction architecture not only lays a solid data foundation for subsequent high-precision remaining time prediction, but its extremely low computational overhead is also perfectly suited for edge devices such as microcontrollers with limited computing power, thus effectively ensuring the efficient and stable operation of localized real-time early warning in industrial settings. Specifically, through multiple parallel feature extraction branches, the gas concentration time series is processed for feature extraction at multiple time scales to obtain the temporal feature information corresponding to each time scale, including: For each time scale, the gas concentration time series is convolved through the first dilated convolutional layer in the feature extraction branch corresponding to the time scale to obtain the first convolutional feature information. The first convolutional feature information is processed by the second dilated convolutional layer cascaded with the first dilated convolutional layer in the feature extraction branch, thereby obtaining the temporal feature information corresponding to the time scale. The dilation rate of the dilated convolutional layer in different feature extraction branches is different, so that different feature extraction branches have different temporal receptive fields.
[0060] The first dilated convolutional layer refers to the dilated convolutional layer in the feature extraction branch that first performs dilated convolution processing on the input gas concentration time series.
[0061] Convolution processing refers to the operation of the input sequence using dilated convolution, that is, sampling the input sequence at intervals with the convolution kernel according to the corresponding dilation rate and summing the samples with weights.
[0062] The first convolutional feature information refers to the feature information output by the first dilated convolutional layer after convolving the gas concentration time series, and serves as the input to the second dilated convolutional layer cascaded with it. For example, the first convolutional feature information can be in the form of a feature map, feature vector, or feature sequence.
[0063] In one implementation, the first convolutional feature information is a feature map with shape [B,C,L], where B is the batch size, C is the number of output channels of the first dilated convolutional layer, and L is the length of the time dimension. After the first convolutional feature information is further convolved by the second dilated convolutional layer, the temporal feature information with shape [B,8,L] is obtained.
[0064] The second dilated convolutional layer refers to the dilated convolutional layer in the feature extraction branch that is cascaded with the first dilated convolutional layer (i.e., placed after the first dilated convolutional layer) and used to perform dilated convolution processing on the first convolutional feature information to obtain the temporal feature information of the feature extraction branch.
[0065] In some embodiments, the feature extraction branches corresponding to each time scale include a first feature extraction branch, a second feature extraction branch, and a third feature extraction branch. The expansion rate of each dilated convolutional layer in the second feature extraction branch is greater than that in the first feature extraction branch, and the expansion rate of each dilated convolutional layer in the third feature extraction branch is greater than that in the second feature extraction branch. The first feature extraction branch is used to extract the transient change features in the initial stage of gas leakage in the gas concentration time series, the second feature extraction branch is used to extract the concentration envelope change features during the gas diffusion process, and the third feature extraction branch is used to extract the long-term concentration evolution trend features caused by environmental factors.
[0066] Understandably, one-dimensional dilated convolution can be used to capture multi-scale temporal dynamics in gas concentration time series data. For a given input gas concentration time series X∈R... B×N×L At position t, a dilated convolution operation with an expansion rate of d is defined as: , where X∈R B×N×L The input represents the time series data of gas concentration (i.e., the input tensor), B is the batch size, which is usually 1 during edge inference, N is the number of input channels (i.e., the total number of categories of gases to be measured, such as N=4), L is the preset time window length (i.e., the sequence length), and K∈R. k Let be a one-dimensional convolutional kernel of size k, d be the dilation rate of the dilated convolution, used to control the element spacing of the kernel on the sequence, i be the index within the kernel, ranging from 0 to k−1, and t be the current time step position. This structure allows the network to exponentially expand its receptive field without increasing the number of parameters or sacrificing resolution.
[0067] like Figure 1b As shown, the multi-scale feature extractor employs a parallel three-branch structure. Each branch contains two stacked dilated convolutional layers with different dilation rates: the short-timescale branch uses dilation rates d=1 and d=1 to capture transient changes in gas concentration; the medium-timescale branch uses dilation rates d=2 and d=4 to extract medium-scale features related to changes in the gas diffusion envelope; and the long-timescale branch uses dilation rates d=8 and d=16 to capture long-term evolution trends and gradual changes in gas concentration.
[0068] For the j-th feature extraction branch, the feature extraction process is represented as follows: ,in, K j,1 and K j,2 These represent feature extraction branches. j In the first and second dilated convolutional layers, the kernel weight parameters are... d j,1 and d j,2 These represent the dilation rates of the first and second dilated convolutional layers in feature extraction branch j, respectively. σ (·) represents a non-linear activation function, specifically the ReLU (Rectified Linear Unit) activation function in this embodiment. F j ∈ R B×Cj×L C represents the feature map output by the j-th feature extraction branch. j This is the number of output channels for this branch (8 in the example).
[0069] = This indicates that the feature maps output from the short-time, medium-time, and long-time branches are concatenated along the channel dimension. The number of channels in the concatenated feature map is the sum of the number of channels in the three branches (e.g., 8+8+8=24). .
[0070] Then, pointwise convolution (1×1 kernel size) is applied to fuse multi-scale features: ,in, K fuse ∈ R 16×24×1 To fuse the convolution kernels, *1 indicates a standard convolution with a stride of 1. This design enables the model to simultaneously capture transient changes in the initial stage of a hazardous gas leak, diffusion dynamics in the middle stage, and the overall long-term trend.
[0071] This embodiment, by cascading a first dilated convolutional layer and a second dilated convolutional layer in each feature extraction branch, and by varying the dilation rates of the dilated convolutional layers in different feature extraction branches, enables the temporal receptive field of each feature extraction branch to expand exponentially with increasing dilation rate and the number of cascaded layers, without increasing the number of convolutional parameters or sacrificing temporal resolution. This allows each feature extraction branch to obtain a temporal receptive field adapted to different time scales with relatively low computational and memory overhead. Consequently, each feature extraction branch can extract the dynamic changes in gas concentration at different time scales in parallel and efficiently. While maintaining a lightweight model and facilitating deployment on microcontrollers with limited computing power and memory, it also enhances the expressive power of multi-scale features, thereby improving prediction accuracy.
[0072] In some embodiments, the inherent cross-interference problem of sensor arrays when multiple gases coexist in industrial environments is effectively overcome. Especially when the concentration of mixed gases rises sharply (i.e., approaches a critical dangerous state), traditional static compensation matrices often fail. This application introduces a cross-sensitivity matrix that dynamically and nonlinearly amplifies the gradient with varying hazard index, achieving adaptive and precise decoupling and compensation for severely distorted signals. This not only ensures the physical authenticity of the input data from the source and significantly reduces the false alarm rate of "false highs" caused by sensor cross-sensitivity, but also provides a clean and high-quality data foundation for subsequent accurate joint prediction by the neural network. Specifically, before performing hazard-weighted cross-fusion on the gas concentration time series to obtain the global hazard coupling features, the following steps are also included: Based on the gas concentration time series, the instantaneous mixing hazard index of each combustible gas at each sampling time is calculated. The instantaneous mixing hazard index is the sum of the ratios of the concentration of each combustible gas at the sampling time to its corresponding lower explosive limit parameter. Based on the variation gradient of the instantaneous mixing hazard index, the cross-sensitive response matrix between each gas detection terminal is determined. The off-diagonal elements in the cross-sensitive response matrix represent the cross-interference components generated by non-target category gas to the target gas detection terminal, and the off-diagonal elements increase non-linearly with the increase of the instantaneous mixing hazard index. Based on the cross-sensitive response matrix, baseline correction and cross-interference correction are performed on the gas concentration time series to obtain the corrected gas concentration time series.
[0073] The instantaneous mixing hazard index refers to the sum of the quotients obtained by dividing the actual concentration of all combustible gases in the space by their corresponding lower explosive limit (LEL) parameters at a specific collection moment (i.e., instant) in the gas concentration time series. It reflects the absolute static hazard level of the industrial site at that specific moment.
[0074] The variable gradient refers to the rate of change of the instantaneous mixed hazard index over time (i.e., the difference or first derivative of the hazard index at adjacent moments in the time series), which reflects the rate of increase or deterioration trend of the on-site hazard level.
[0075] The cross-sensitivity response matrix is a square matrix used for mathematical modeling of the response characteristics of a multi-channel sensor array. The matrix describes how the concentrations of various gases in a real environment are mapped to the output readings of the sensor array. In this application, this matrix is not fixed but dynamically updated in real time with the aforementioned "variable gradient." For a system containing four detection terminals, its cross-sensitivity response matrix is a 4×4 matrix used to calculate and decouple the mutual interference relationships between the sensors.
[0076] Off-diagonal elements refer to matrix elements in the cross-sensitive response matrix whose row number and column number are not equal (i.e., In a physical sense, these are specifically used to quantify the "crosstalk effect," which is the parasitic response amplification factor produced by one gas on a gas-specific sensor. For example, in a 4×4 matrix, the element in the 1st row and 2nd column... It is a non-diagonal element. Due to the extremely rapid leakage causing a very large gradient change, the value of this element may non-linearly surge from a static 0.1 to 0.4.
[0077] Non-target categories refer to other interfering gases present in the environment that are not the primary target gases for a particular sensor. For example, in the case of a carbon monoxide (CO) electrochemical sensor, hydrogen (H2) leaking from the environment simultaneously would be considered a non-target gas.
[0078] A target gas detection terminal is a physical hardware channel in a sensor array specifically designed for the targeted calibration and detection of a particular hazardous gas. In the four-in-one detector, channel 1 (Ch1), equipped with a filter membrane, electrolyte, and catalyst for optimal response to carbon monoxide (CO), serves as the target gas detection terminal for CO detection.
[0079] Cross-interference is a spurious signal caused by non-target gases when a target gas detector outputs a reading. It is the product of multiplying the concentration of the non-target gas by its corresponding off-diagonal element. For example, the actual carbon monoxide concentration in the environment might be 0 ppm, but due to the presence of a high concentration of a non-target gas (hydrogen), the carbon monoxide detector might incorrectly output a reading of 30 ppm. This spurious 30 ppm reading is the cross-interference component.
[0080] Baseline correction removes zero-drift from the sensor's raw output signal, caused by temperature variations, humidity fluctuations, or aging of sensor components, ensuring accurate zeroing of the sensor's readings in clean air. For example, a combustible gas detector in a completely odorless environment might experience a slow drift to 2% LEL due to long-term aging. The baseline correction algorithm shifts this entire time series by subtracting 2% LEL, eliminating hardware baseline errors.
[0081] Cross-interference correction is a process that uses a dynamically calculated cross-sensitive response matrix (usually obtained through matrix inversion or adaptive decoupling algorithms) to subtract the aforementioned "cross-interference component" from the noisy readings of each detection terminal, thereby restoring the independent and true concentration value of each gas.
[0082] For example, the algorithm knows that the current reading of the carbon monoxide sensor is 50 ppm, and calculates from the matrix that hydrogen contributes a cross-interference component of 20 ppm in this channel. After cross-interference correction, the true CO concentration is 50 - 20 = 30 ppm.
[0083] After the corrected gas concentration time series is processed by the preprocessing module to remove baseline drift and completely decouple nonlinear cross-interference components, a clean, high-fidelity multivariate time series data tensor is obtained. This is the clean data that is finally fed into the downstream "dual-branch prediction model" for feature extraction. It truly reflects the independent evolution trajectory of each gas in physical space and avoids the neural network learning false features caused by sensor hardware crosstalk.
[0084] In some embodiments, by pre-training the model on source domain sample data with sufficient data volume, freezing the feature extraction network on target domain sample data with limited data volume, and only fine-tuning the regression prediction network, the general gas time-series feature representation ability learned from massive historical data can be transferred and retained. The model can be adapted to the actual gas distribution in the target area using only a small amount of target domain data. This alleviates data distribution shifts between different operating conditions and scenarios without requiring the collection of large amounts of data in the target scene, ensuring the prediction accuracy and continuous effectiveness of the model in variable environments. Specifically, based on the reciprocal of the lower explosive limit parameter of each combustible gas, the gas concentration time series is subjected to hazard-weighted cross-fusion to obtain hazard-coupled global features, including: By using a bi-branch prediction model, the gas concentration time series are hazard-weighted cross-fused based on the reciprocal of the lower explosive limit parameters of each combustible gas to obtain hazard-coupled global features. Before obtaining the hazard-coupled global features by performing hazard-weighted cross-fusion of gas concentration time series based on the reciprocals of the lower explosive limit parameters of each combustible gas using a bi-branch prediction model, the following steps are also included: Acquire source domain sample data and target domain sample data. The source domain sample data includes gas concentration time series samples collected under historical operating conditions and / or simulation environments and their corresponding real labels. The target domain sample data includes gas concentration time series samples collected in the target area and their corresponding real labels. The amount of data in the target domain sample data is less than the amount of data in the source domain sample data. Construct a total loss function that includes prediction error loss and physical consistency constraint loss; Using the initial bi-branch prediction model, based on source domain sample data, the gas concentration time series samples are hazard-weighted cross-fused and predicted synchronously to obtain the concentration prediction sequence samples of each combustible gas and the remaining time information samples. The initial bi-branch prediction model includes a feature extraction network and a bi-branch regression prediction network. From the concentration prediction sequence samples of each combustible gas, obtain the predicted concentration of each combustible gas at the corresponding time of the remaining time information sample; Calculate the sum of the ratios of the predicted concentration of each combustible gas at the same time to its corresponding lower explosive limit parameter, and determine the difference between the sum of the ratios and the preset danger threshold as the physical consistency constraint loss; The total loss function is obtained based on the prediction error loss and the physical consistency constraint loss. The parameters of the initial bi-branch prediction model are then updated using the total loss function to obtain the pre-trained bi-branch prediction model. Without changing the parameters of the feature extraction network in the pre-trained bi-branch prediction model, the parameters of the bi-branch regression prediction network in the pre-trained bi-branch prediction model are fine-tuned based on the target domain sample data to obtain the bi-branch prediction model.
[0085] The bi-branch prediction model refers to a neural network model used to extract and fuse features from gas concentration time series at multiple time scales, and to simultaneously and jointly predict the future concentration change trends and remaining time information of each gas under test based on the same hazard coupled global features. It includes a feature extraction network and a bi-branch regression prediction network. For example, this model can be a multi-scale parallel convolutional (MSPC) neural network.
[0086] Historical operating conditions refer to the working conditions of a target area or related scenarios during past actual operations. Gas concentration time series collected under historical operating conditions can be used as source domain sample data. For example, historical operating conditions can be the normal operating conditions of a chemical workshop under different production loads (such as full load, half load, and shutdown for maintenance) and different environmental conditions, or the abnormal operating conditions during historical safety events such as gas leaks or abnormal concentration fluctuations.
[0087] A simulation environment refers to an environment constructed through computer simulation or physical simulation to simulate the generation, diffusion, and concentration evolution of gases. The generated gas concentration time series can be used as source domain sample data. For example, it can be an environment for numerical simulation of gas diffusion processes based on Gaussian diffusion models or computational fluid dynamics (CFD), or it can be a physical simulation device such as an experimental chamber or gas mixing platform (applying gas according to a set concentration gradient and flow rate and collecting sensor responses).
[0088] Source domain sample data refers to the massive sample data used for pre-training the initial bi-branch prediction model, including gas concentration time series samples collected under historical operating conditions and / or simulation environments and their corresponding real labels. The labels include the real concentration evolution trajectory of various gases to be measured in future time periods, as well as the real remaining time to reach the preset joint hazard state.
[0089] Target domain sample data refers to small batches of sample data used to fine-tune the bi-branch regression prediction network in the pre-trained bi-branch prediction model. This includes time-series samples of gas concentration actually collected in the target area and their corresponding real labels. For example, it could be a small number of real multi-channel concentration waveforms recently measured in the target workshop.
[0090] The initial bi-branch prediction model refers to the initial network structure that has not yet been trained with data. Its parameters can be randomly initialized (such as Xavier initialization or Kaiming initialization) or loaded with pre-trained weights of a general temporal network as initial parameters.
[0091] The feature extraction network refers to the part of a two-branch prediction model used for multi-timescale feature extraction and risk-weighted cross-fusion of the input sequence. For example, it may include the aforementioned parallel short-time, medium-time, and long-time dilated convolutional branches and a pointwise convolutional fusion mechanism. During the fine-tuning phase, the network's weight parameters are frozen and remain unchanged.
[0092] A two-branch regression prediction network refers to the part of a two-branch prediction model used to couple the hazard output of the feature extraction network to the global feature mapping and obtain the final prediction result. It contains two parallel output prediction branches, each performing different tensor mapping operations, specifically including: Concentration prediction sequence output branch: This branch does not perform destructive pooling of global features in the time dimension. Instead, it uses temporal deconvolution (1D-Deconv) or Long Short-Term Memory (LSTM) network units to infer multiple future states within a preset time period based on the current state. Its output tensor is then multiplied by the weight matrix and summed with the bias vector to output a concentration prediction sequence sample of shape [N, T_future], representing the predicted concentration trajectory of N types of analyte gases over multiple consecutive time steps in the future. The output concentration can be expressed in parts per million (ppm) or volume percentage (%VOL). The remaining time information output branch: This branch performs global average pooling on the time dimension of the danger coupling global features to obtain one-dimensional pooled feature information, which is then multiplied by a fully connected layer and a specific weight matrix, and summed with the bias vector to finally output a scalar value (i.e. the first or a specific numerical element in the prediction vector) to represent the remaining time information sample.
[0093] Prediction error loss refers to the data-driven, conventional supervised learning loss used to measure the difference between the concentration sequence and remaining time predicted by the model and their corresponding true labels. For example, it can be calculated using mean squared error (MSE) or mean absolute error (MAE).
[0094] The physical consistency constraint loss refers to the penalty term that introduces the physical and chemical laws (the principle of synergistic superposition of lower explosion limits) as prior knowledge into the neural network. This loss forces that the future concentration trajectory predicted by the first branch of the model, after passing through the predicted concentration at the remaining time point predicted by the second branch, must satisfy the physical boundary conditions for the occurrence of danger when substituted into the physical calculation formula (i.e., the sum of the ratios must be equal to the preset danger threshold, such as 100% LEL).
[0095] The total loss function is a weighted sum of the prediction error loss and the physical consistency constraint loss. During the pre-training phase, gradient backpropagation using the total loss function can constrain the physical causal consistency of the dual-branch outputs while fitting the data labels.
[0096] The sum of ratios refers to the mathematical expression of the hazard degree of a Le Chatelier mixture of combustible gases. Specifically, it is the sum of multiple quotients obtained by dividing the instantaneous concentration value of each combustible gas by its corresponding lower explosive limit parameter, i.e., ∑(C i / LEL i ).
[0097] The remaining time to reach the preset combined hazard state (i.e., the remaining time information sample) refers to the countdown to the time required for the target area to evolve from its current state to a multi-gas synergistic hazard outbreak (Time To Risk, TTR). This time is expressed in units such as seconds or minutes, for example, predicting that there are 30 seconds left to reach the hazard state. The preset combined hazard state usually refers to a mixed hazard index (the sum of ratios) reaching 1 or a set safety threshold (such as an alarm threshold of 0.5).
[0098] Predicted concentration refers to the process of extracting the concentration values of each combustible gas at a specific moment (time point T) from the "concentration prediction sequence sample" (i.e., the tensor [N, T_future]) output by the above model, using index slicing or interpolation operations. The extracted set of concentration values can be represented as [C1, C2, C3, C4], and can be directly substituted into the physical formula to calculate the physical consistency constraint loss.
[0099] In this application, the source domain sample data DS contains a large amount of gas detection data under historical operating conditions or simulated environments, while the target domain sample data DT contains limited waveform data collected by multi-sensor arrays in current actual industrial scenarios. This application employs a "physical constraint pre-training + feature freezing fine-tuning" strategy to compensate for the difference in the distribution of actual physical data between the source domain data and the target domain. The specific process is as follows: In this application, the source domain sample data DS contains a large amount of gas detection data under historical operating conditions or simulated environments, while the target domain sample data DT contains limited waveform data acquired by multi-sensor arrays in current actual industrial scenarios. A fine-tuning strategy is employed to compensate for the differences in the distribution of actual physical data between the source domain data and the target domain. The specific process is as follows: First, in the source domain sample data D S A multi-scale parallel convolutional neural network (MSPC model) is pre-trained to extract general gas time-series waveform features. The model parameters are divided into two parts based on functionality: multi-scale feature extractor parameters. θ f (Including multi-scale parallel convolutional layers) and global regressor parameters θ r (Including global average pooling layers and fully connected layers).
[0100] Solving during the pre-training phase: ,in, L S Let be the loss function over the source domain. To constrain the model predictions to conform to physical causality, the total loss function is a combination of prediction error loss (MSE) and physical consistency constraint loss, specifically: ;in, The number of samples in the source domain. and These represent the actual and predicted concentration sequence tags, respectively. and Let represent the actual and predicted remaining time, respectively. The latter part of the formula represents the loss due to physical consistency constraints. This represents the gas concentrations at the remaining time points extracted from the predicted sequence. To preset the danger threshold, This is the balance coefficient.
[0101] The model then utilizes the extracted source domain knowledge. Adapting to the target domain. To retain the general multi-gas hazard coupling feature extraction capability learned during the pre-training phase, the feature extraction network parameters are... Freeze, using only a limited number of target domain sample data The parameters of the bi-branch regression prediction network are fine-tuned. This fine-tuning process is represented as follows: ,in, This is the total loss function over the target domain (also following the calculation method described above that incorporates physical constraints); This represents the optimized regression prediction network parameters adapted to the distribution of real industrial field data.
[0102] The final gas detection model for the target task is as follows: It combines a frozen feature extraction network with a fine-tuned bi-branch regression network. This method not only transfers the gas co-hazard characterization learned from massive historical data, but also constrains its prediction lower bound with physical laws, effectively mitigating the impact of data distribution shifts between different operating conditions and scenarios. In the target scenario, it can ensure the model's continued effectiveness and high-precision prediction in variable environments without collecting massive amounts of data.
[0103] In some embodiments, traditional deep learning models, due to their large number of parameters and computational intensity, often rely on cloud or high-end computing devices, resulting in high deployment costs, response latency, and network outage risks. This embodiment significantly reduces the model's memory and computing power overhead through quantized pruning and code conversion mechanisms, seamlessly embedding complex multi-scale joint prediction algorithms into a low-cost microcontroller (MCU). This achieves the "edge-side sinking" of AI prediction capabilities, reducing system hardware costs while ensuring millisecond-level local early warning response. Specifically, after fine-tuning the parameters of the bi-branch regression prediction network in the pre-trained bi-branch prediction model based on target domain sample data to obtain the bi-branch prediction model, the following steps are also included: The bi-branch prediction model is subjected to quantization pruning to obtain a lightweight edge prediction model. Quantization pruning is used to quantize the parameters of the bi-branch prediction model from floating-point data to integer data, and to remove redundant network connections in the bi-branch prediction model. The lightweight edge prediction model is converted into inference code adapted to the microcontroller architecture and deployed in edge detection nodes connected to multiple gas detection terminals.
[0104] Quantization pruning combines two core techniques for lightweighting deep learning models. "Pruning" aims to eliminate connections or neurons in the neural network that contribute minimally to the final prediction result (e.g., weights close to zero) through algorithmic evaluation (such as weight thresholding), thereby sparsifying the network structure. "Quantization" aims to reduce the numerical precision of network weights and activation values, significantly reducing the model's storage space and accelerating matrix operations without sacrificing prediction performance.
[0105] Floating-point data refers to the high-precision data type used in standard deep learning frameworks for training and storing the weights and biases of neural network models. Examples include single-precision floating-point numbers (FP32) or double-precision floating-point numbers (FP64). Each FP32 value requires 4 bytes of storage space, and floating-point multiply-accumulate (MAC) operations consume significant CPU clock cycles and power.
[0106] Integer data refers to low-bit-width fixed-point numerical types used to replace high-precision floating-point numbers after model quantization mapping. Because the arithmetic logic unit (ALU) of a microcontroller provides extremely efficient support for integer operations, using integer data can significantly accelerate model inference. Examples include 8-bit unsigned integers (INT8) or 16-bit integers (INT16). Mapping FP32 weights to INT8 can directly reduce the model's parameter size to one-quarter of its original size, while increasing computation speed several times over.
[0107] The lightweight edge prediction model is a miniaturized neural network model generated after the aforementioned quantization pruning process. It has fewer network layers, a sparser weight matrix, and all operations are constrained to lower data precision, making it specifically designed for edge devices with extremely limited resources (such as very small amounts of RAM and Flash).
[0108] Inference code is the conversion of lightweight neural network model files into low-level C / C++ code libraries or firmware that can be directly recognized, compiled, and run independently by the target hardware (microcontroller)'s built-in compiler. This code does not contain backpropagation and gradient update logic; it only contains the network structure definition and weight count for forward prediction.
[0109] An edge detection node refers to an electronic hardware device located at the very end of the Industrial Internet of Things (IIoT), directly executing the gas detection and early warning method of this application, and electrically connecting and interacting with multiple physical gas detection terminals (such as a four-in-one sensor array). Edge detection nodes can be portable or fixed gas detection instruments based on microcontrollers (MCUs), edge gateways or programmable logic controllers (PLCs) in industrial settings, or embedded industrial control computers with real-time data acquisition and AI processing capabilities.
[0110] In a preferred hardware implementation, the edge detection node can be an edge device based on an STMicroelectronics (ST) STM32H7A3ZI series microcontroller (MCU). This microcontroller employs a high-performance ARM Cortex-M7 core with a clock speed of up to 280MHz, and is equipped with 2MB of Flash memory and up to 1.4MB of Static Random Access Memory (SRAM), along with a built-in double-precision floating-point unit (FPU) and L1 cache. With this powerful hardware configuration and ample on-chip storage, combined with the quantization pruning technique described in this application, the edge detection device (e.g., a system prototype mounted on the NUCLEO-H7A3ZI-Q development board) can run the inference code of the aforementioned dual-branch prediction model extremely smoothly, achieving local millisecond-level prediction and early warning for multiple gases.
[0111] S103. Based on the global characteristics of hazard coupling, the concentration prediction sequence of each combustible gas in the future preset time period is obtained, as well as the remaining time information of the target area reaching the preset joint hazard state. The preset joint hazard state is the state in which the mixed hazard index reaches the preset hazard threshold. The mixed hazard index is the sum of the ratios of the concentration of each combustible gas to its corresponding lower explosive limit parameter at the same time.
[0112] The future preset time period refers to the time span from the current data acquisition time for the prediction model to extrapolate the evolution of gas concentration into the future. The length of this time period can be preset according to the spatial size of the specific industrial scenario, the gas diffusion rate, and safety response requirements. For example, the future preset time period can be set to 10 minutes, 30 minutes, or 1 hour. If set to 10 minutes, it means that the model will extrapolate and predict the trend of gas concentration within the next 10 minutes based on the current global characteristics.
[0113] A concentration prediction sequence refers to a data set output by a prediction model (such as the first branch of a bi-branch regression prediction network) that reflects the expected concentration values of a specific combustible gas at each consecutive time step within a predetermined future period. Intuitively, it is represented as a curve depicting the future concentration evolution trajectory over time. For example, assuming a predetermined future period of 10 minutes and a prediction time step (resolution) of 1 minute, for a combustible gas like methane, the concentration prediction sequence output by the model would be a one-dimensional tensor containing 10 values (e.g., [1.2%, 1.5%, 2.1%, 3.0%, ..., 5.2%]), clearly depicting the concentration increase trajectory of methane over the next 10 minutes.
[0114] The pre-defined combined hazard state refers to the safety critical boundary characterizing the synergistic explosion hazard caused by the diffusion and mixing of multiple flammable gases within a target area. This application, based on Le Chatelier's principle of gas mixture explosion, rigorously defines this state using a "mixture hazard index." Its mathematical formula is defined as follows: ,in, for The mixed hazard index at any given time, where N is the total number of types of flammable gases present in the environment. Let be the concentration of the nth combustible gas at time t (when determining the future, take the predicted concentration at the corresponding time in the aforementioned concentration prediction sequence). Let be the fixed lower explosive limit parameter for the nth flammable gas. To preset the danger threshold (in standard industrial explosion-proof scenarios, It is usually set to 1.0, which means that the overall mixture reaches 100% of the lower limit of explosion.
[0115] For example, suppose methane (and its) are present in the industrial site. ) and hydrogen ( If the model predicts that in the next 5 minutes, the methane concentration will reach (2.5 / 5 = 0.5%) and the hydrogen concentration will reach 2.0% (2.0 / 4 = 0.5%). Although neither gas alone has reached its lower explosive limit, the combined hazard index H = 0.5 + 0.5 = 1 at the same moment, which is exactly equal to the preset hazard threshold, then the site is determined to have reached the preset combined hazard state in the next 5 minutes.
[0116] It should be noted that when calculating the sum of the ratios (i.e., the mixed hazard index), the concentrations of each combustible gas and their corresponding lower explosive limits should be converted to the same dimension beforehand (e.g., expressed as volume percentage %VOL or lower explosive limit percentage %LEL) before the ratio is calculated, so as to ensure that the physical meaning of the sum of the ratios is clear and the dimensions are consistent.
[0117] The remaining time information, also known as the Time To Risk (TTR), refers to the absolute physical time difference required for the target area to evolve from the current detection time to the aforementioned "preset joint hazard state." It is a time scalar value directly regressed from the model (such as the second branch of a bi-branch regression prediction network) after integrating the global features of hazard coupling.
[0118] For example, if the current time is 10:00:00, and the model, after feature extraction and deduction, determines that the environment will exceed the safety threshold (reach a combined danger state) at 10:04:30, then the model's output "remaining time information" will be 270 seconds (or 4.5 minutes). This information is extremely intuitive and provides a precise "golden time" window for automatically activating explosion-proof ventilation fans, shutting off gas supply valves, and guiding personnel to evacuate according to the emergency plan.
[0119] S104. When the remaining time information meets the preset warning triggering conditions, send a danger warning message to the preset warning object.
[0120] The warning trigger condition refers to the set safe time limit for determining that a danger is imminent. For example, when the remaining time before the predicted target area reaches a preset combined danger state (i.e., the danger threshold countdown, TTR) is lower than the set safe threshold time (e.g., TTR < 300 seconds), the warning trigger condition is considered met. This safe threshold time can be dynamically configured according to the shortest time required for the evacuation of on-site personnel.
[0121] Preset warning targets refer to the entities or devices that receive alarm commands and respond to emergencies. For example, under the premise of ensuring local autonomous decision-making, preset warning targets can be on-site distributed control systems (DCS), safety instrumented systems (SIS), host computer platforms, or industrial IoT gateways; they can also be on-site audible and visual alarms or linked ventilation equipment.
[0122] In one specific implementation, the microcontroller (MCU) carrying the algorithm of this application can establish a highly interference-resistant uplink communication connection with the aforementioned early warning object through a general-purpose serial communication interface (such as a low-power universal asynchronous transceiver (LPUART) or an RS-485 interface) or a high-reliability industrial fieldbus (such as a reserved CAN bus interface). It is understood that, in the specific design of the hardware circuit board or the adoption of a standard development platform, the physical connectivity of the underlying communication link can be ensured by configuring the corresponding pin multiplexing function or adjusting the hardware jumper / soldering bridge status of the communication link.
[0123] Hazard warning messages refer to communication messages or level control signals that indicate the presence of a potential combined explosion hazard at an site and notify pre-set warning targets to be vigilant or evacuate. For example, structured data packets containing "hazard level," "predicted remaining escape time," and "current multi-gas concentration distribution" sent to an industrial IoT gateway through the aforementioned communication interface, or high and low level trigger signals output to a local audible and visual alarm.
[0124] In some embodiments, for complex working conditions where flammable and toxic gases coexist in industrial sites, traditional systems handle explosion protection and poison protection independently, resulting in high overhead and difficulty in comprehensively assessing the safety situation. This embodiment, based on a unified hazard coupling global feature base, parallelly extrapolates "combined explosion hazard" and "toxic gas exceeding limit hazard." This "explosion protection + poison protection" dual-track prediction mechanism not only significantly improves the reusability of model computing power but also achieves earlier and more comprehensive early warning in the early stages of complex disaster evolution (such as situations where toxic gas diffusion reaches the threshold before explosion). Specifically, different categories of test gases also include at least one non-flammable toxic gas, and the hazard coupling global feature also incorporates the temporal characteristics corresponding to each toxic gas. The method further includes: Obtain the preset danger concentration thresholds for each toxic gas; Based on the global characteristics of hazard coupling, the time for the concentration of each toxic gas in the target area to exceed its corresponding hazard concentration threshold is predicted. When the remaining time information meets the preset warning trigger conditions, a danger warning message is sent to the preset warning target, including: When the time limit for toxicity exceeds the limit or the remaining time meets the warning triggering conditions, a danger warning message is sent to the preset warning targets.
[0125] Toxic gases refer to non-flammable or flammable gases that are harmful, irritating, or asphyxiating to human health, and whose exposure may lead to acute poisoning, health damage, or even death. In the fusion prediction system of this application, the focus is primarily on examining the physiological toxicity mechanisms of toxic gases on the human body. For example, common toxic gases in industrial enclosed spaces or pipeline environments include carbon monoxide (CO), hydrogen sulfide (H2S), sulfur dioxide (SO2), and chlorine (Cl2).
[0126] A hazard concentration threshold refers to the upper limit of safe human exposure concentration for a specific toxic gas, set according to national or international standards related to industrial hygiene and safety (such as Occupational Exposure Limits for Hazardous Factors in the Workplace). It typically serves as the absolute physical basis for assessing whether a toxic hazard exists on-site. This hazard concentration threshold can be defined using the Maximum Allowable Concentration (MAC), the Time-Weighted Average Allowable Concentration (PC-TWA), or the Shortest-Time Exposure Allowable Concentration (PC-STEL). For example, for hydrogen sulfide (H2S), the preset maximum allowable concentration threshold might be set at 10 mg / m³. 3 For carbon monoxide (CO), the permissible concentration for short-term exposure may be set at 30 mg / m³. 3 Or a certain level of parts per million (ppm) concentration.
[0127] The time required for a toxic gas to exceed its toxic limit refers to the physical time span required for the predicted concentration of a certain type of toxic gas in the target area to first rise and exceed its corresponding "hazardous concentration threshold" from the current detection time. This is a time-based early warning scalar independently predicted by the model based on the hazard-coupled global characteristics and the toxic evolution trajectory of the toxic gas.
[0128] For example, assuming the current time is 14:00, the dual-branch network predicts based on global features that the concentration of hydrogen sulfide (H2S) at the scene will exceed the safety threshold (reach a highly toxic level) at 14:08. The model's output "toxicity exceedance time" would then be 8 minutes. At this point, although the remaining time for the flammable gas explosion may still be 20 minutes, the toxicity exceedance time of hydrogen sulfide (8 minutes) has already met the warning triggering conditions (e.g., below the set 10-minute escape limit). Therefore, the system will prioritize sending out danger warning information immediately based on this 8-minute toxicity crisis.
[0129] In some embodiments, traditional single-threshold alarm states are abrupt and can easily cause panic or auditory fatigue. This embodiment introduces a tiered early warning mechanism based on predicted remaining time, transforming the abstract countdown into progressive physical sound and light signals, providing a layered safety perception. Simultaneously, the device implements local direct alarms based on an edge microcontroller, eliminating reliance on cloud networks and servers. Even in extreme network outage conditions such as mines, it can still make autonomous decisions and respond within seconds using edge computing power, constructing a highly reliable local safety closed loop. Specifically, when the remaining time information meets preset early warning triggering conditions, a danger warning message is sent to preset warning targets, including: When the remaining time information meets the warning triggering conditions, the warning level is determined based on the remaining time information; According to the warning level, the local alarm operation of the gas detection equipment is triggered, and different warning levels correspond to different local alarm methods.
[0130] Herein, the warning level refers to the artificially set and divided level of danger urgency based on the length of the predicted Time To Reach dangerous state (TTR). For example, the warning levels can be divided into a three-level response mechanism: when TTR>10 minutes, it is determined as "safety level"; when 5 minutes<TTR≤10 minutes, it is determined as "warning level"; when TTR≤5 minutes, it is determined as "danger level (evacuation level)".
[0131] The local alarm operation refers to the behavior that after the microcontroller (MCU) inside the gas detection device receives the prediction result output by the model, it does not need to upload the data to the cloud to wait for the control instruction of the server, and can make independent decisions on the edge device side, directly drive its mounted local hardware peripherals through the General Purpose Input / Output (GPIO) interface or Pulse Width Modulation (PWM) interface, so as to trigger a physical alarm.
[0132] That different warning levels correspond to different local alarm modes means that the gas detection device can adopt different manifestation forms such as color distinction, flashing frequency change, buzzer frequency change or step alarm means of different intensities according to the currently determined warning level.
[0133] For example, in the industrial edge computing implementation solution based on a microcontroller (MCU), the microcontroller can immediately trigger the corresponding local hardware step warning according to the predicted time: when in the "safety level", the microcontroller drives the first status indicator light integrated on the device panel (for example, a green light-emitting diode, connected to the first general-purpose I / O pin of the microcontroller) to keep a normally on state, indicating that the working condition is normal and no imminent danger is predicted; when in the "warning level", the microcontroller drives the second status indicator light integrated on the device panel (for example, a yellow light-emitting diode, connected to the second general-purpose I / O pin of the microcontroller) to flash at a specific period (such as slow, 2Hz), to remind on-site personnel to pay attention to ventilation and inspection; when in the "danger level", the microcontroller drives the third status indicator light integrated on the device panel (for example, a red light-emitting diode, connected to the third general-purpose I / O pin of the microcontroller) to flash at a high frequency (such as fast, 10Hz), and synchronously drives the acoustic alarm device connected to the peripheral interface (such as an external buzzer) to emit a high-frequency rapid alarm sound, so as to achieve the most intuitive audio-visual step escape alarm effect.
[0134] In one optional implementation, while performing the aforementioned local alarm operations, the edge detection node also supports highly reliable uplink communication. Specifically, while ensuring that the edge device has local autonomous decision-making and real-time early warning capabilities, the microcontroller (MCU) of the gas detection device can upload the future concentration information of each gas and the corresponding hazard warning information obtained by the joint prediction of the dual-branch model to the distributed control system (DCS), host computer platform, or industrial IoT gateway in real time through the communication peripheral integrated inside, for global safety scheduling and data archiving.
[0135] In terms of specific hardware interface implementation, the microcontroller can establish a serial communication link using the built-in low-power universal asynchronous transceiver (LPUART) interface. To ensure the applicability of the communication system in different industrial environments or hardware motherboard solutions, the serial communication link can be flexibly routed to general-purpose input / output pins by configuring pin multiplexing in software or by configuring hardware jumpers and zero-ohm resistors (solder bridges) on the backplane, thereby achieving physical connectivity.
[0136] Furthermore, considering the strong electromagnetic interference (EMI) often generated by the start-up and shutdown of high-power equipment in industrial production sites, this gas detection equipment can also reserve or expand Controller Area Network (CAN) bus interfaces or RS-485 differential communication interfaces. Through these industrial-grade fieldbus protocols with strong common-mode interference immunity, edge detection nodes can ensure stable and error-free long-distance transmission of hazard warning information to the higher-level Safety Instrumented System (SIS) in harsh electromagnetic environments, thereby constructing a multi-layered, interconnected industrial safety defense line.
[0137] Understandably, through the aforementioned edge computing deployment scheme and hardware-software co-design, this application's embodiment completely breaks the strong dependence of traditional hazardous gas detection and early warning systems on cloud server computing power and network communication bandwidth. By deeply quantizing and pruning the model, and completely offloading the multi-scale feature extraction and dual-branch joint inference process of deep learning to the microcontroller edge (such as the aforementioned high-performance embedded microprocessor), this solution can directly process the time-series data array of multiple sensors locally in a closed-loop manner even when completely offline. This not only achieves sub-second low-latency detection in complex and ever-changing industrial environments, but also ensures high-precision prediction of gas evolution trends and independent and reliable emergency explosion / poison warnings.
[0138] In some specific hardware implementations, for harsh detection scenarios involving hazardous gases, the specific hardware adaptation, resource allocation, and underlying driver configuration schemes for the edge gas detection equipment (i.e., edge detection nodes) can be as follows: In terms of power supply stability and thermal design, the device supports wide-voltage external DC power input to adapt to power fluctuations in industrial environments. Regarding hardware power tree configuration, the microcontroller's internal switched-mode power supply (SMPS) buck converter can be configured to operate in direct SMPS mode. This configuration significantly improves the dynamic conversion efficiency of the core power supply, substantially reduces the microcontroller's power consumption and chip heat generation during high-frequency inference calculations, thereby avoiding temperature drift interference caused by high temperatures to electrochemical or semiconductor gas sensors.
[0139] As can be seen from the above, the embodiments of this application can improve the timeliness and accuracy of hazardous gas detection and early warning.
[0140] To better implement the above methods, this embodiment will take the gas detection and early warning system specifically integrated into an electronic device as an example to provide a detailed description of the methods in this application embodiment.
[0141] For example, such as Figure 2 As shown, the gas detection and early warning system may include a sequence acquisition unit 201, a sequence processing unit 202, a prediction unit 203, and a hazard warning unit 204, as follows: (a) Sequence acquisition unit 201.
[0142] The sequence acquisition unit 201 is used to acquire the gas concentration time series collected by multiple gas detection terminals deployed in the target area. Different gas detection terminals are used to detect different types of test gases, and at least two of the different types of test gases are combustible gases.
[0143] (ii) Sequence processing unit 202.
[0144] The sequence processing unit 202 is used to obtain the preset lower explosive limit parameters corresponding to each combustible gas, and to perform hazard-weighted cross-fusion on the gas concentration time series based on the reciprocal of the lower explosive limit parameters of each combustible gas to obtain hazard-coupled global features.
[0145] (III) Prediction Unit 203.
[0146] The prediction unit 203 is used to predict the concentration prediction sequence of each combustible gas in the future within a preset time period based on the global characteristics of hazard coupling, as well as the remaining time information for the target area to reach a preset joint hazard state. The preset joint hazard state is the state in which the mixed hazard index reaches a preset hazard threshold. The mixed hazard index is the sum of the ratios of the concentration of each combustible gas to its corresponding lower explosive limit parameter at the same time.
[0147] (iv) Danger warning unit 204.
[0148] The danger warning unit 204 is used to send danger warning information to the preset warning object when the remaining time information meets the preset warning triggering conditions.
[0149] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.
[0150] Therefore, the embodiments of this application can improve the timeliness and accuracy of hazardous gas detection and early warning.
[0151] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0152] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute the steps in any of the gas detection and early warning methods provided in embodiments of this application.
[0153] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0154] According to one aspect of this application, a computer program product or computer program is provided, comprising a computer program / instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer program / instructions from the computer-readable storage medium and executes the computer program / instructions, causing the electronic device to perform the methods provided in various optional implementations of the gas detection and early warning aspects described in the above embodiments.
[0155] Since the instructions stored in the storage medium can execute the steps in any of the gas detection and early warning methods provided in the embodiments of this application, the beneficial effects that any of the gas detection and early warning methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0156] The above provides a detailed description of a gas detection and early warning method and system provided by the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A gas detection and early warning method, characterized in that, include: The gas concentration time series collected by multiple gas detection terminals deployed in the target area are obtained. Different gas detection terminals are used to detect different types of test gases, and at least two of the different types of test gases are combustible gases. The preset lower explosive limit parameters corresponding to each combustible gas are obtained, and the gas concentration time series is subjected to hazard-weighted cross-fusion based on the reciprocal of the lower explosive limit parameters of each combustible gas to obtain hazard-coupled global features. Based on the aforementioned hazard coupling global characteristics, the concentration prediction sequence of each combustible gas within a future preset time period is obtained, as well as the remaining time information for the target area to reach a preset joint hazard state. The preset joint hazard state is the state in which the mixed hazard index reaches a preset hazard threshold. The mixed hazard index is the sum of the ratios of the concentration of each combustible gas to its corresponding lower explosive limit parameter at the same time. When the remaining time information meets the preset warning triggering conditions, a danger warning message is sent to the preset warning target.
2. The gas detection and early warning method as described in claim 1, characterized in that, The gas concentration time series is subjected to hazard-weighted cross-fusion based on the reciprocal of the lower explosive limit parameter of each combustible gas to obtain hazard-coupled global features, including: By using multiple feature extraction branches set in parallel, feature extraction processing is performed on the gas concentration time series at multiple time scales to obtain temporal feature information corresponding to each time scale. Different feature extraction branches have different temporal receptive fields, and the temporal feature information reflects the dynamic change characteristics of the gas concentration time series at the corresponding time scale. For any i-th combustible gas and j-th combustible gas among the combustible gases, the product of the reciprocal of the lower explosive limit parameter of the i-th combustible gas and the reciprocal of the lower explosive limit parameter of the j-th combustible gas is determined as the cooperative hazard weighting coefficient between the i-th combustible gas and the j-th combustible gas. A hazard attention mask is constructed based on the cooperative hazard weight coefficients between each pair of the aforementioned combustible gases. Using the hazard attention mask, the temporal features corresponding to each combustible gas are weighted and then cross-fused to obtain hazard-coupled global features, so that the feature expression of combustible gases with lower explosion limit parameters and in a state of increasing mixed concentration is enhanced in the fusion.
3. The gas detection and early warning method as described in claim 2, characterized in that, The gas concentration time series is processed by performing feature extraction at multiple time scales through multiple parallel feature extraction branches to obtain time-series feature information corresponding to each time scale, including: For each time scale, the gas concentration time series is convolved through the first dilated convolutional layer in the feature extraction branch corresponding to the time scale to obtain the first convolutional feature information. The first convolutional feature information is processed by the second dilated convolutional layer cascaded with the first dilated convolutional layer in the feature extraction branch to obtain the temporal feature information corresponding to the time scale. The dilation rate of the dilated convolutional layer in different feature extraction branches is different so that the different feature extraction branches have different temporal receptive fields.
4. The gas detection and early warning method as described in claim 3, characterized in that, The feature extraction branches corresponding to each time scale include a first feature extraction branch, a second feature extraction branch, and a third feature extraction branch. The expansion rate of each dilated convolutional layer in the second feature extraction branch is greater than that in the first feature extraction branch, and the expansion rate of each dilated convolutional layer in the third feature extraction branch is greater than that in the second feature extraction branch. The first feature extraction branch is used to extract the transient change features in the initial stage of gas leakage in the gas concentration time series, the second feature extraction branch is used to extract the concentration envelope change features during the gas diffusion process, and the third feature extraction branch is used to extract the long-term concentration evolution trend features caused by environmental factors.
5. The gas detection and early warning method as described in claim 1, characterized in that, The gas concentration time series is subjected to hazard-weighted cross-fusion based on the reciprocal of the lower explosive limit parameter of each combustible gas to obtain hazard-coupled global features, including: By using a dual-branch prediction model, based on the reciprocal of the lower explosive limit parameter of each combustible gas, the gas concentration time series is subjected to hazard-weighted cross-fusion to obtain hazard-coupled global features. Before obtaining the hazard-coupled global features by performing hazard-weighted cross-fusion of the gas concentration time series based on the reciprocals of the lower explosive limit parameters of each combustible gas using a bi-branch prediction model, the method further includes: Acquire source domain sample data and target domain sample data. The source domain sample data includes gas concentration time series samples collected under historical operating conditions and / or simulation environments and their corresponding real labels. The target domain sample data includes gas concentration time series samples collected in the target area and their corresponding real labels. The amount of data in the target domain sample data is less than the amount of data in the source domain sample data. Construct a total loss function that includes prediction error loss and physical consistency constraint loss; Using an initial bi-branch prediction model, the gas concentration time series samples are subjected to hazard-weighted cross-fusion and synchronous prediction based on the source domain sample data, resulting in concentration prediction sequence samples and remaining time information samples for each combustible gas. The initial bi-branch prediction model includes a feature extraction network and a bi-branch regression prediction network. From the concentration prediction sequence samples of each combustible gas, obtain the predicted concentration of each combustible gas at the corresponding time in the remaining time information sample; Calculate the sum of the ratios of the predicted concentration of each combustible gas at the same time to its corresponding lower explosive limit parameter, and determine the difference between the sum of the ratios and the preset danger threshold as the physical consistency constraint loss; The value of the total loss function is obtained based on the prediction error loss and the physical consistency constraint loss, and the parameters of the initial bi-branch prediction model are updated using the value of the total loss function to obtain the pre-trained bi-branch prediction model. Without changing the parameters of the feature extraction network in the pre-trained bi-branch prediction model, the parameters of the bi-branch regression prediction network in the pre-trained bi-branch prediction model are fine-tuned based on the target domain sample data to obtain the bi-branch prediction model.
6. The gas detection and early warning method as described in claim 1, characterized in that, Before performing hazard-weighted cross-fusion on the gas concentration time series to obtain hazard-coupled global features, the method further includes: Based on the gas concentration time series, the instantaneous mixing hazard index of each combustible gas at each sampling time is calculated. The instantaneous mixing hazard index is the sum of the ratios of the concentration of each combustible gas at the sampling time to its corresponding lower explosive limit parameter. Based on the variation gradient of the instantaneous mixing hazard index, a cross-sensitivity response matrix is determined among the gas detection terminals. The off-diagonal elements in the cross-sensitivity response matrix represent the cross-interference components generated by non-target category gas to the target gas detection terminal, and the off-diagonal elements increase non-linearly with the increase of the instantaneous mixing hazard index. Based on the cross-sensitive response matrix, baseline correction and cross-interference correction are performed on the gas concentration time series to obtain the corrected gas concentration time series.
7. The gas detection and early warning method as described in claim 1, characterized in that, The different categories of test gases also include at least one non-flammable toxic gas, and the hazard coupling global feature further incorporates the temporal features corresponding to each toxic gas. The method also includes: Obtain the preset danger concentration thresholds corresponding to each of the toxic gases; Based on the aforementioned hazard coupling global characteristics, the time for the concentration of each toxic gas in the target area to exceed its corresponding hazard concentration threshold is predicted to exceed the toxicity limit. When the remaining time information meets the preset warning triggering conditions, a danger warning message is sent to the preset warning target, including: When the toxicity exceedance time or the remaining time information meets the warning triggering conditions, a danger warning message is sent to the preset warning target.
8. The gas detection and early warning method as described in claim 1, characterized in that, When the remaining time information meets the preset warning triggering conditions, a danger warning message is sent to the preset warning target, including: When the remaining time information meets the warning triggering condition, the warning level is determined based on the remaining time information; According to the aforementioned warning level, the local alarm operation of the gas detection device is triggered, and different warning levels correspond to different local alarm methods.
9. The gas detection and early warning method as described in claim 5, characterized in that, After fine-tuning the parameters of the bi-branch regression prediction network in the pre-trained bi-branch prediction model based on the target domain sample data to obtain the bi-branch prediction model, the method further includes: The dual-branch prediction model is subjected to quantization pruning to obtain a lightweight edge prediction model. The quantization pruning process is used to quantize the parameters of the dual-branch prediction model from floating-point data to integer data, and to remove redundant network connections in the dual-branch prediction model. The lightweight edge prediction model is converted into inference code adapted to the microcontroller architecture and deployed in the edge detection nodes connected to the multiple gas detection terminals.
10. A gas detection and early warning system, characterized in that, include: The sequence acquisition unit is used to acquire the gas concentration time series collected by multiple gas detection terminals deployed in the target area. Different gas detection terminals are used to detect different types of test gases, and at least two of the different types of test gases are combustible gases. The sequence processing unit is used to obtain the preset lower explosive limit parameters corresponding to each combustible gas, and to perform hazard-weighted cross-fusion on the gas concentration time series based on the reciprocal of the lower explosive limit parameters of each combustible gas to obtain hazard-coupled global features. The prediction unit is used to predict the concentration prediction sequence of each combustible gas in a future preset time period based on the aforementioned hazard coupling global features, as well as the remaining time information for the target area to reach a preset joint hazard state. The preset joint hazard state is the state in which the mixed hazard index reaches a preset hazard threshold. The mixed hazard index is the sum of the ratios of the concentration of each combustible gas to its corresponding lower explosive limit parameter at the same time. The danger warning unit is used to send danger warning information to a preset warning object when the remaining time information meets the preset warning triggering conditions.
