A tunnel fire early warning method and system based on deep learning

By utilizing deep learning technology, self-cleaning photoelectric smoke sensors, low-power wireless transmission networks, and multimodal data fusion, the accuracy and reliability of fire early warning in tunnel construction environments have been solved, enabling multi-level emergency response and fire risk assessment, thereby improving tunnel construction safety.

CN120599764BActive Publication Date: 2026-05-08HEFEI UNIV OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HEFEI UNIV OF TECH
Filing Date
2025-06-23
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing fire early warning technologies in tunnel construction environments suffer from problems such as dust interference, unstable data acquisition and transmission, insufficient fusion of multi-source heterogeneous data, overly simplified early warning models, and a single response mechanism, resulting in low early warning accuracy and difficulty in meeting the requirements for safe production.

Method used

A tunnel fire early warning method based on deep learning is adopted, including the deployment of self-cleaning photoelectric smoke sensors, low-power wireless transmission networks, multimodal data acquisition and feature fusion, dynamic threshold mechanism and multi-level early warning response mechanism, to build a tunnel fire early warning model adapted to the construction environment.

Benefits of technology

It improves the accuracy and reliability of fire early warning, reduces the false alarm rate, extends the battery life of sensor nodes, provides fire risk assessment and development trend prediction, and enables multi-level emergency response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599764B_ABST
    Figure CN120599764B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of fire warning, and discloses a tunnel fire warning method and system based on deep learning, wherein the tunnel fire warning method based on deep learning comprises the following steps: deploying sensors and constructing a wireless transmission network to obtain multi-modal data; pre-processing, feature extraction and feature fusion are performed on the multi-modal data; a tunnel fire warning model suitable for a construction environment is constructed, and a dynamic threshold mechanism is designed; a multi-stage warning response mechanism is designed, and warning is performed. The application overcomes the problem that the dustproof smoke sensor is easily disturbed by dust; the sampling frequency and the communication frequency are automatically adjusted according to monitoring requirements during data transmission, the monitoring effect is guaranteed, and the battery life is prolonged; a tunnel fire warning model based on TCNN is constructed, a large-scale fire data set is constructed through FDS digital simulation, and the model is trained; a dynamic threshold capable of being automatically adjusted according to the environment is designed, and the problem that a fixed threshold system is not suitable for a changing environment is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fire early warning technology, and more specifically, to a tunnel fire early warning method and system based on deep learning. Background Technology

[0002] Tunnel construction involves numerous open flame operations and electrical equipment, making it a high-risk area for fires. Once a fire breaks out during tunnel construction, the enclosed space and limited escape routes can easily lead to mass casualties; it can also cause project delays and significant economic losses. Tunnels typically have only one exit during construction, and the temporary support structures have limited strength, making them prone to collapse after a fire, further increasing the risk of injury and death. Mountain tunnels are often located in remote areas, resulting in long external rescue times, necessitating reliance on early warning and self-rescue measures.

[0003] In a highway network expansion project, a long mountain tunnel (8.3 kilometers in length) is currently under construction. The tunnel traverses various complex geological structures, including fault zones, carbonaceous shale, and coal seams, with abundant groundwater. Construction involves a large number of tunneling machines, transport vehicles, temporary power supply equipment, and welding operations. An average of 120 workers are on duty per shift, operating 24 hours a day. Construction equipment and materials are scattered throughout the tunnel, and temporary ventilation fans provide limited ventilation; some areas have poor ventilation, resulting in high dust concentrations in the air.

[0004] Currently used fire early warning technologies mainly include:

[0005] Point-type temperature sensor: Temperature sensors are installed at fixed intervals on the top of the tunnel. An alarm is triggered when the local temperature exceeds a preset threshold.

[0006] Point-type smoke detector: Based on photoelectric principle, it triggers an alarm when the smoke concentration reaches a certain level.

[0007] Linear fiber optic temperature measurement system: Temperature-sensing optical fibers are laid along the tunnel to monitor temperature anomalies by analyzing changes in the optical signal.

[0008] Fixed camera surveillance: Manual or basic video analysis software is used to monitor suspicious smoke and open flames.

[0009] Manual inspection: Assign dedicated personnel to regularly inspect the construction site and report any fires immediately.

[0010] In the complex environment of tunnel construction, existing fire early warning technologies have the following obvious shortcomings:

[0011] Dust interference: The large amount of dust generated during construction can cause frequent false alarms in traditional photoelectric smoke detectors. Furthermore, dust adhering to the sensor surface reduces its sensitivity and prolongs response time. Existing systems cannot effectively distinguish between normal dust in the construction environment and smoke from fires, lack self-cleaning capabilities, and require frequent maintenance to maintain normal operation.

[0012] Unstable data acquisition and transmission: Power supply is unstable and cables are easily damaged in tunnel construction environments, and traditional wired sensor networks have low reliability. Sensors operate in a fixed power consumption mode, resulting in high energy consumption and short battery life, making them unsuitable for long-term remote monitoring. The transmission network lacks self-organization and self-recovery capabilities, and a single point of failure can easily paralyze the entire monitoring system.

[0013] Insufficient fusion of multi-source heterogeneous data: Existing systems typically use a single sensing method, such as relying solely on temperature or smoke detection, which cannot achieve collaborative analysis of multi-source data.

[0014] The early warning model is overly simplistic: traditional systems generally use fixed threshold triggering mechanisms, which cannot adapt to the changing environment at different construction stages (blasting, tunneling, masonry, etc.). Early warning decisions lack the ability to predict fire development trends and cannot provide crucial information such as the direction and speed of fire spread.

[0015] The response mechanism is too simplistic: most existing systems only provide single-level alarms and lack a mechanism for tiered responses based on the degree of risk.

[0016] Traditional fire early warning methods are ineffective in complex construction environments and fail to meet the requirements of safe production. There is an urgent need to develop new early warning systems that are adapted to the characteristics of construction environments in order to improve the accuracy of early warnings and reduce fire risks. Summary of the Invention

[0017] This invention provides a tunnel fire early warning method and system based on deep learning, which solves the technical problems in the aforementioned related technologies.

[0018] This invention provides a tunnel fire early warning method based on deep learning, comprising:

[0019] Deploy sensors and build a low-power wireless transmission network to acquire multimodal data;

[0020] The acquired multimodal data is preprocessed, features are extracted, and features are fused.

[0021] Construct a tunnel fire early warning model adapted to the construction environment and design a dynamic threshold mechanism;

[0022] Design a multi-level early warning and response mechanism and issue early warnings.

[0023] Furthermore, the deployed sensor includes a photoelectric smoke sensor with a self-cleaning function, which comprises the following core components:

[0024] The photoelectric smoke detection section uses an 850nm wavelength infrared LED light source and a photoelectric receiver to form a scattered light path;

[0025] Miniature compressed air pump: maximum pressure 0.1MPa, flow rate 2L / min, volume less than 50×30×20mm;

[0026] Airflow control valve: controls airflow intensity and direction via PWM;

[0027] Dust concentration detector: Used to monitor the ambient dust concentration in real time and trigger the self-cleaning function.

[0028] Furthermore, the physical layer of the low-power wireless transmission network adopts LoRa technology; the link layer adopts a TDMA-based protocol; the network layer implements a self-organizing mesh network based on AODV; and the power consumption control formula for the node devices is as follows:

[0029] P total =P base +P sensing ×f sensing +P comm ×f comm ;

[0030] Where: P total P represents the total power consumption of the node. base Based on power consumption; P sensing The power consumption per sensing operation; f sensing f is the sampling frequency; comm Power consumption per communication session; f comm For communication frequency.

[0031] Furthermore, the sampling frequency and communication frequency are dynamically adjusted to achieve power balance. The dynamic adjustment is based on the risk level of the local computing environment, enabling automatic switching between three working modes: low power mode, alert mode, and emergency mode.

[0032] Furthermore, the feature extraction includes extracting thermal anomaly region features using an improved YOLOv5-Fire model, enhancing the detection capability for small target thermal anomalies by adding an attention mechanism, and adding convolutional block attention modules to the backbone network. The thermal anomaly target detection formula is as follows:

[0033]

[0034] Where: P(class) i|object) is the conditional probability that the target belongs to the i-th class, representing the probability that the detected object belongs to flame, hot spot or smoke; P(object) is the probability that the target exists in the image, representing the confidence that the detection box contains the actual target; To measure the localization accuracy, the intersection-union ratio (IUU) of the predicted bounding box and the ground truth bounding box is used; threshold is the image detection confidence threshold used to determine whether fire features exist in the thermal image.

[0035] The image feature detection confidence threshold is dynamically adjusted under different environmental conditions to improve the accuracy of thermal image feature extraction and reduce the false detection rate at the feature level. The dynamic adjustment of the image feature detection confidence threshold adopts the following strategy:

[0036] Under normal construction conditions, threshold = 0.6;

[0037] Threshold = 0.5 at night or under low light conditions;

[0038] For high-risk operations, the threshold is 0.7.

[0039] Furthermore, the tunnel fire early warning model is designed with a multi-task output layer, and the specific outputs are as follows:

[0040] Fire risk score: Outputs a fire risk score between 0 and 1;

[0041] Fire type identification: Distinguish between different types of fires, and output a vector, where the i-th component of the vector represents the probability that the fire is of the i-th type;

[0042] Development trend prediction: The development path and speed of the fire are represented by a vector, where each component of the vector represents the growth rate, spread speed, main direction, probability distribution of each stage of the fire, and estimated time of danger.

[0043] Furthermore, the fire risk score is used to initially determine whether a fire has occurred. The determination method is to compare it with a dynamic threshold. If the fire risk score is higher than the dynamic threshold, an adaptive dynamic threshold algorithm is designed based on the environmental characteristics of different construction stages. The calculated dynamic threshold is used to determine whether a fire has occurred. The dynamic threshold calculation formula is as follows:

[0044] T threshold (t)=w base T base +w env ΔT env (t)+w act ΔT act (t)+w trd ΔT trd (t);

[0045] Wherein: T threshold (t) represents the dynamic threshold (0-1) at time t; w base w env w act w trd T represents the adjustment coefficients for the first, second, third, and fourth dynamic thresholds. base The baseline threshold is determined by statistical analysis of historical data; ΔT env (t) represents the environmental factor adjustment term at time t; ΔT act (t) represents the construction activity adjustment item at time t; ΔT trd (t) represents the trend adjustment term at time t;

[0046] Calculation method for environmental factor adjustment items:

[0047] ΔT env (t)=α1·(T ambient (t)-T ref )+α2·(H ambient (t)-H ref );

[0048] Wherein: T ambient (t) represents the ambient temperature at time t; T ref For reference temperature; H ambient (t) represents the ambient humidity at time t; H ref The reference humidity is α1 and α2 are the weighting coefficients for the first and second environmental factors, respectively.

[0049] Calculation method for construction activity adjustment items:

[0050]

[0051] Among them: A i (t) is the indicator function for the i-th type of construction activity; w i n is the weighting coefficient for the i-th type of construction activity; act This refers to the total number of types of construction activities;

[0052] Calculation method for trend adjustment item:

[0053]

[0054] in: Δt is the rate of temperature change; Δt is the width of the time window; β1 is the adjustment coefficient, which controls the intensity of the trend influence.

[0055] Furthermore, the parameter optimization of the dynamic threshold employs a deep Q-network combined with priority-based empirical replay technology to implement a reinforcement learning algorithm.

[0056] The dynamic threshold adjustment problem is modeled as a reinforcement learning framework, which can continuously optimize the dynamic threshold parameters through interaction with the environment; the specific implementation is as follows:

[0057] Reinforcement learning problem modeling:

[0058] State space:

[0059] S={s t =[E t ,P t D t A t ]|t∈T seq};

[0060] Among them, E t P represents the environmental characteristics at time t. t P represents the historical performance index at time t. t A represents the characteristics of the detection data at time t. t T represents the activity type code at time t. seq Represents a time series set, s t Let S represent the state at time t, and let S represent the state space.

[0061] Action space:

[0062] A={a t =[ΔT base ,Δβ time Δβ location Δβ activity ]|t∈T seq};

[0063] Where, ΔT base Δβ represents the adjustment amount of the base threshold. time Δβ location Δβ activity These represent the adjustment amounts for the time factor, location factor, and activity factor, respectively. t Let A represent the action taken at time t, and let A represent the action space.

[0064] Reward function: Based on the performance definition of the early warning system:

[0065] R(s t ,a t ,s t+1 )=w1·R accuracy +w2·R timeliness -w3·R cost ;

[0066] R(s t ,a t ,s t+1() represents the reward function, which consists of three parts:

[0067] Rewards for accurate early warnings:

[0068] R accuracy =α TP ·TP-α FP ·FP-α FN ·FN;

[0069] Where: TP is the number of true positives, i.e., the actual fire events that were successfully alerted; FP is the number of false positives, i.e., false alarms; FN is the number of false negatives, i.e., missed alarms; R accuracy Rewards will be given for accurate early warnings;

[0070] α TP α FP α FN Weighting coefficients for the accuracy of the first, second, and third predictions;

[0071] Rewards for timely early warnings:

[0072]

[0073] Wherein: T advance,i T represents the lead time for the i-th successful warning event; ref β2 is the reference time; TP is the set of true cases, containing all fire events for which a warning was successfully issued; R timeliness Rewards will be given for timely early warnings;

[0074] System cost penalty:

[0075]

[0076] Among them: |A t | This refers to the range of motion to prevent drastic parameter fluctuations; I(a t,i ≠a t-1,i ) is an indicator function, which is 1 when the parameter changes, and 0 otherwise; γ1 and γ2 are the cost penalty coefficients of the first and second systems, respectively; n a R represents the dimension of the action space, i.e., the number of threshold parameters; I() is an indicator function, which takes a value of 1 when the condition in parentheses is true, and 0 otherwise; cost This is a penalty for system costs.

[0077] Furthermore, the fire dataset required for training the tunnel fire early warning model is constructed by using FDS software to establish a target tunnel model, performing fire dynamics numerical simulation, and obtaining simulated fire temperature data and smoke images.

[0078] A deep learning-based tunnel fire early warning system, used to execute any of the deep learning-based tunnel fire early warning methods described above, includes:

[0079] Multimodal data acquisition module: As the front-end perception layer of the system, it is responsible for collecting relevant parameters in the tunnel construction environment;

[0080] Low-power wireless transmission module: solves the problems of unstable power supply and fragile cables in tunnel construction environment, and realizes reliable data transmission;

[0081] Data preprocessing and feature extraction module: responsible for transforming raw sensor data into discriminative feature representations;

[0082] Tunnel fire early warning model module: Built based on deep learning technology and using TCNN architecture, it is the core decision-making unit of the system;

[0083] Dynamic threshold mechanism module: It adopts a deep Q-network to implement a reinforcement learning framework, which can automatically adjust the warning threshold according to the environment;

[0084] Multi-level early warning response module: responsible for triggering corresponding level of emergency measures based on the risk score output by the early warning model;

[0085] System Integration and Management Module: Integrates various functional modules into a unified system platform, providing management interface, data storage and analysis, and system maintenance functions.

[0086] The beneficial effects of this invention are as follows:

[0087] A multimodal data acquisition system adapted to the tunnel construction environment was constructed, integrating dustproof smoke sensors, infrared thermal imaging, and gas concentration sensors to form a complementary monitoring network. This overcomes the problem of traditional systems being susceptible to dust interference and improves the monitoring reliability in harsh environments. The sensors adopt a self-cleaning design, periodically removing dust through pulsed airflow, significantly reducing maintenance requirements and false alarm rates.

[0088] A low-power wireless transmission network was designed, employing LoRa technology and a self-organizing mesh network architecture to solve the problems of unstable power supply and fragile cables in tunnel construction environments. Dynamic power management technology automatically adjusts the sampling and communication frequencies according to monitoring needs, extending the battery life of sensor nodes while ensuring monitoring effectiveness. Network redundancy design ensures that a single point of failure does not affect the overall network communication, significantly improving system reliability.

[0089] A multi-source data preprocessing method based on wavelet transform effectively removes high-frequency noise while preserving temperature change trends. An improved YOLOv5-Fire model is used to extract thermal anomaly features from infrared images, resulting in higher detection accuracy. An attention mechanism enables intelligent fusion of multimodal features, automatically adjusting the weights of different sensor data to enhance the discriminative power of the fused features.

[0090] A tunnel fire early warning model based on transposed convolutional neural networks (TCNN) was constructed to achieve accurate assessment and prediction of fire risks. The model employs a multi-task learning framework, simultaneously outputting fire risk scores, fire type identification, and development trend predictions, providing comprehensive information for emergency decision-making. A large-scale fire dataset covering over 1000 fire scenarios was constructed using FDS digital simulations, significantly improving the model's generalization ability.

[0091] A dynamic threshold mechanism based on reinforcement learning was designed, which can automatically adjust the warning threshold according to the environment, thus solving the problem that fixed threshold systems cannot adapt to changing environments. The warning accuracy is improved and the false alarm rate is reduced compared with traditional methods.

[0092] A multi-level early warning and response mechanism has been implemented, which automatically triggers different levels of emergency measures based on risk scores. Attached Figure Description

[0093] Figure 1 This is a flowchart of a tunnel fire early warning method based on deep learning according to the present invention. Detailed Implementation

[0094] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, some features described in the examples may be combined in other examples.

[0095] At least one embodiment of the present invention discloses a tunnel fire early warning method based on deep learning, such as... Figure 1 As shown, it includes the following steps:

[0096] Step 100: Deploy sensors and build a low-power wireless transmission network to acquire multimodal data;

[0097] By deploying a multimodal data acquisition system adapted to the tunnel construction environment, comprehensive monitoring of environmental parameters within the tunnel can be achieved. This includes the following sub-steps:

[0098] Step 101: Deploy a dustproof sensor network;

[0099] This self-cleaning smoke sensor employs a photoelectric smoke sensor with a self-cleaning function, periodically removing dust adhering to the sensor surface via pulsed airflow. Each sensor integrates a miniature air pump and a timing control unit, automatically adjusting the cleaning frequency based on dust concentration. The core components of this self-cleaning smoke sensor are as follows:

[0100] The photoelectric smoke detection section uses an 850nm wavelength infrared LED light source and a photoelectric receiver to form a scattered light path;

[0101] Miniature compressed air pump: maximum pressure 0.1MPa, flow rate 2L / min, volume less than 50×30×20mm;

[0102] Airflow control valve: controls airflow intensity and direction via PWM;

[0103] Dust concentration detector: Used to monitor the ambient dust concentration in real time and trigger a self-cleaning program;

[0104] Control circuit: Adjust the cleaning frequency according to dust concentration data. The default value is once every 12 hours, and it can be increased to once every 4 hours in high dust environment;

[0105] The above-mentioned components operate as follows: when the dust concentration sensor detects that dust accumulation has reached a set threshold (default value is 4g / m³), the dust concentration sensor will detect that the dust accumulation has reached a set threshold. 3 When the dust is applied, the controller activates a miniature air pump, generating a compressed airflow of 0.1 MPa. This airflow is directed through a specially designed nozzle at the sensitive area of ​​the sensor to remove adhering dust. The entire cleaning process lasts for 3 seconds. During this time, the sensor briefly enters maintenance mode and does not generate an alarm signal, but adjacent sensors provide redundant monitoring to ensure there are no blind spots.

[0106] Deploying infrared thermal imaging cameras is an option, as infrared thermal imaging is unaffected by dust and can directly detect thermal anomalies, compared to visible light cameras.

[0107] An array of CO / CO2 concentration sensors was installed. These sensors are insensitive to dust interference and can detect changes in characteristic gas concentrations during a fire. The sensors were installed at a height of 1.5 meters above the ground, which is within the breathing range of people, thus improving detection sensitivity.

[0108] The gas sensor array also integrates temperature and humidity sensors for environmental parameter acquisition and gas concentration correction, ensuring measurement accuracy under different temperature and humidity conditions.

[0109] The above three types of sensing devices form a complementary monitoring network to jointly overcome the dust interference problem in the tunnel construction environment and ensure the accuracy and reliability of fire early warning.

[0110] Step 102: Construct a low-power wireless transmission network;

[0111] To address the issues of unstable power supply and easily damaged cables in tunnel construction environments, this step employs the following solution to construct a stable and reliable data transmission network:

[0112] The physical layer uses LoRa technology, operates at a frequency of 433MHz, and features strong wall penetration and obstacle clearance, long transmission distance, and low power consumption.

[0113] The link layer uses a protocol based on TDMA (Time Division Multiple Access);

[0114] The network layer implements a self-organizing mesh network based on AODV (On-Demand Distance Vector);

[0115] Node deployment interval: One backbone node is deployed every 500 meters, and ordinary sensor nodes are distributed according to monitoring needs and automatically connect to the nearest backbone node;

[0116] Network redundancy design: Each sensor node can communicate with at least two backbone nodes to ensure that a single point of failure does not affect the overall network communication;

[0117] Communication security: Employs AES-128 encryption algorithm to protect data transmission security and supports dynamic key updates;

[0118] This network is better suited to the linear spatial structure of tunnels. The backbone nodes are arranged along the tunnel axis, while the edge sensor nodes are flexibly distributed according to monitoring needs and automatically connect to the network through a self-organizing protocol. The network topology balances coverage and transmission reliability.

[0119] The node devices employ dynamic power management technology, automatically adjusting the sampling and communication frequencies based on monitoring requirements. Under normal conditions, the sampling period is 60 seconds and the communication period is 5 minutes. When an anomaly is detected, it automatically switches to a higher frequency mode, shortening the sampling period to 5 seconds and the communication period to 10 seconds. The power consumption control formula is as follows:

[0120] P total =P base +P sensing ×f sensing +P comm ×f comm ;

[0121] Where: P total P represents the total power consumption of the node. base Based on power consumption; P sensing The power consumption per sensing operation; f sensing P is the sampling frequency; comm Power consumption per communication session; f comm For communication frequency.

[0122] The sampling frequency and communication frequency are dynamically adjusted to achieve power consumption balance; the working mode is automatically switched according to the risk level. When the risk is low, a low power mode is used to extend battery life, and when the risk is high, a high frequency mode is switched to ensure monitoring effect.

[0123] Dynamic power management is implemented by the node's microcontroller, based on the following three operating modes:

[0124] Low power mode: sampling frequency 1 / 60Hz, communication frequency 1 / 300Hz, used for normal environment monitoring;

[0125] Alert mode: Sampling frequency 1 / 20Hz, communication frequency 1 / 60Hz, used when an anomaly occurs but a fire has not been confirmed;

[0126] Emergency mode: Sampling frequency 1 / 5Hz, communication frequency 1 / 10Hz, used to confirm fires or high-risk periods.

[0127] In practical applications, sensor nodes determine the environmental risk level through local calculations and automatically switch between three working modes to achieve a balance between power consumption and monitoring effectiveness.

[0128] Sensor nodes automatically switch operating modes by calculating the local environmental risk level. The risk level calculation formula is as follows:

[0129]

[0130] Where: R local The risk level is calculated locally, with a value range of [0,1]; T now This is the current temperature reading; T baseline This is the temperature reference value, typically the normal operating temperature at that location, determined based on historical data; T threshold This is the temperature threshold, representing a clearly defined abnormal temperature, typically set to a baseline value +15°C; S now The current smoke concentration reading is obtained from the smoke sensor; S baseline S represents the baseline value for smoke concentration, indicating the background value under normal conditions. threshold G represents the smoke concentration threshold, indicating a clearly abnormal concentration. now The current gas concentration reading is obtained from the gas sensor; G baseline This is the gas concentration reference value, representing the background value under normal conditions; G threshold This is a gas concentration threshold, representing a clearly abnormal concentration;

[0131] w T w S w G The weights of the first, second, and third risk level parameters satisfy w T +w S+w G =1, adjusted according to sensor type and installation location;

[0132] The node is based on the calculated R local Value selection working mode:

[0133] When R local When the power consumption is less than 0.3, a low-power mode is used.

[0134] When 0.3≤R local When the value is less than 0.7, the alert mode is activated.

[0135] When R local When the value is ≥0.7, emergency mode is activated.

[0136] In one embodiment of the present invention, to prevent frequent mode switching, mode switching is only triggered when the risk level continuously exceeds the threshold for three sampling cycles, or exceeds the threshold by more than 20% in a single instance. This ensures monitoring sensitivity while avoiding unnecessary power consumption increases due to short-term fluctuations.

[0137] Step 200: Perform data preprocessing, feature extraction, and feature fusion on the collected multimodal data;

[0138] This step involves preprocessing and feature extraction of the collected multimodal data, a crucial step in transforming raw sensor data into discriminative features. The data types to be processed include time-series temperature data, gas concentration data, and infrared thermal images, each with significantly different noise characteristics and information structures. Targeted preprocessing and feature extraction methods can effectively improve the recognition performance of subsequent models. Specifically, it includes the following sub-steps:

[0139] Step 201: Sensor data denoising and standardization;

[0140] For temperature sensor data, wavelet transform is used to remove high-frequency noise while preserving the temperature change trend. Specifically, db4 wavelet, 3-level decomposition, and soft thresholding are used for noise reduction. The noise reduction formula is as follows:

[0141]

[0142] Where: X raw The original temperature data sequence is noisy time-series data directly collected by sensors; DWT is the Discrete Wavelet Transform function, which decomposes the time-series data into different frequency components; IDWT is the Inverse Discrete Wavelet Transform function, which reconstructs the time-series data from the processed wavelet coefficients; Θ threshold X is the threshold operator used to remove noise coefficients. denoised The temperature sequence after denoising;

[0143] This indicates a threshold operation, which processes the wavelet coefficients.

[0144] The specific processing flow of this denoising formula is as follows:

[0145] 1. Perform db4 wavelet level 3 decomposition on the original temperature sequence to obtain low-frequency approximation coefficients and high-frequency detail coefficients at three different scales;

[0146] 2. Apply a soft thresholding method to the high-frequency detail coefficients. The threshold value is determined based on the noise level estimate, and is usually calculated using a general thresholding method based on the median absolute deviation (MAD).

[0147] 3. Retain the low-frequency approximation coefficients unchanged, and combine them with the processed high-frequency detail coefficients to perform wavelet reconstruction, thereby obtaining the denoised temperature sequence.

[0148] The reason why this wavelet transform-based denoising method is suitable for temperature data is that temperature changes during a fire usually exhibit a low-frequency trend, while sensor noise and environmental interference are mostly high-frequency components.

[0149] Standardize the data from various sensors to eliminate dimensional differences.

[0150] Step 202, infrared image feature extraction;

[0151] The infrared thermal imaging images undergo preprocessing, including noise reduction, geometric correction, and temperature calibration. The specific implementation method is as follows:

[0152] Noise Reduction: The Non-Local Mean (NLM) filtering algorithm is applied to effectively suppress thermal noise while preserving image edges and details;

[0153] Geometric correction: Based on camera calibration parameters, perspective transformation is performed to eliminate geometric distortion caused by lens distortion and mounting angle;

[0154] Temperature calibration: The camera is calibrated periodically using a blackbody radiation source to establish a mapping relationship between pixel grayscale values ​​and actual temperature, ensuring the accuracy of temperature measurement.

[0155] Image preprocessing employs a pipelined architecture, utilizing the GPU resources of edge servers for acceleration.

[0156] The improved YOLOv5-Fire model is used to extract features of thermal anomaly regions. This model enhances its ability to detect small target thermal anomalies by adding an attention mechanism, specifically CBAM (Convolutional Block Attention Module) to the backbone network. The formula for thermal anomaly target detection is as follows:

[0157]

[0158] Where: P(class) i|object) is the conditional probability that the target belongs to the i-th class, representing the probability that the detected object belongs to flame, hot spot or smoke; P(object) is the probability that the target exists in the image, representing the confidence that the detection box contains the actual target; To predict the intersection-union ratio (IUU) between the bounding box and the true bounding box, and to measure the localization accuracy; threshold is the image detection confidence threshold, used to determine whether there are fire features in the thermal image, and is dynamically adjusted according to different environments.

[0159] The improved YOLOv5-Fire model features include:

[0160] Infrastructure: YOLOv5s is used as the basic network, with approximately 7.2M parameters, making it suitable for edge deployment;

[0161] Attention enhancement: A CBAM module is added to the backbone network to implement channel attention and spatial attention respectively, thereby enhancing the ability to extract fire features;

[0162] Feature fusion: Multi-scale feature fusion is achieved using an FPN (Feature Pyramid Network) + PAN (Path Aggregation Network) structure to improve the detection capability of fire sources of different sizes;

[0163] Category definition: The detection targets are divided into three categories: flames, hot spots, and smoke, which correspond to the characteristics of fires at different stages;

[0164] Lightweight design: By reducing the computational complexity of the model through channel pruning and weight quantization, real-time inference at 30fps is achieved on edge devices.

[0165] The formula outputs a comprehensive score regarding the effectiveness of target detection. When the score is greater than or equal to the image detection confidence threshold, the detected target is considered a valid fire feature. This feature-level confidence threshold adjustment is performed during the feature extraction stage.

[0166] The following strategy is used to dynamically adjust the confidence threshold for image feature detection:

[0167] Under normal construction conditions, threshold = 0.6;

[0168] Threshold = 0.5 at night or under low light conditions;

[0169] For high-risk operations such as welding, the threshold is 0.7.

[0170] By adjusting the confidence threshold for image feature detection under different environmental conditions, the accuracy of thermal image feature extraction is improved and the false detection rate at the feature level is reduced.

[0171] The spatiotemporal characteristics of the thermal anomaly region are extracted, including the rate of change of the region's area, the change in the location of the highest temperature point, and the temperature gradient. The formula for calculating the region's growth rate is as follows:

[0172]

[0173] Where: R growth The growth rate of the thermal anomaly region represents the rate at which the thermal anomaly region expands; A t Let A be the area (in pixels) of the thermal anomaly region at time t, and the size of the thermal anomaly region detected at the current time. t-Δt t represents the area (in pixels) of the thermal anomaly region at time t-Δt, which is the size of the thermal anomaly region at the previous time; Δt is the time interval, the time difference between the two observations.

[0174] In addition to the regional growth rate, the following spatiotemporal features were also extracted:

[0175] Highest temperature point trajectory: Tracks the positional changes of the highest temperature point in the image, reflecting the movement of the heat source;

[0176] Temperature distribution gradient: Calculate the spatial derivative of temperature in the thermal anomaly region and analyze the direction of heat diffusion;

[0177] Shape features: Extract shape parameters such as perimeter, area ratio, and length-to-width ratio of thermal anomaly areas to assist in fire mode identification;

[0178] Texture features: Use the gray-level co-occurrence matrix (GLCM) to extract texture features from the thermal image, such as energy, entropy, and contrast.

[0179] Time series pattern: Apply a sliding window to extract the change pattern of hot spots over time, such as oscillation frequency and trend.

[0180] Step 203, multimodal feature fusion;

[0181] Sensor data features and image features are spatiotemporally aligned and fused to construct a multidimensional feature vector. Since different modalities have varying acquisition frequencies, information densities, and representation methods, effectively fusing these heterogeneous data is crucial for improving early warning accuracy. The fusion method employs a weighted fusion approach based on an attention mechanism, as shown in the following formula:

[0182]

[0183] Wherein: F fused F represents the fused feature vector, which is the final output of multimodal data fusion. i The feature vector for the i-th mode includes temperature features, gas concentration features, image features, etc.; α iThe weight coefficients for the i-th modality are learned through an attention network and reflect the importance of different modalities in the current context; n modal The number of feature modes includes three main modes: temperature, gas concentration, and thermal image.

[0184] This formula achieves adaptive weighted fusion, unlike simple feature concatenation or averaging. It can dynamically adjust the importance weights of each modality according to different scenarios. The fused feature F fused It is a core input for risk assessment and directly affects the accuracy of early warning decisions.

[0185] The weighting coefficients are calculated using the following formula:

[0186]

[0187] Among them: W i and b i ... x ;

[0188] This attention mechanism allows for the automatic adjustment of fusion weights for different modalities based on the current environment and data characteristics.

[0189] In some embodiments of the present invention, in environments with high dust concentrations, the weight of smoke sensor features is reduced and the weight of thermal image features is increased; in welding operation areas, the weight of gas sensor features is increased because changes in CO / CO2 concentration are a key indicator for distinguishing between normal welding and abnormal fires; in different areas of the tunnel, such as the entrance, middle section and construction face, different weight configurations are adopted to adapt to the environmental characteristics of each area.

[0190] The realization of multimodal fusion involves the following key technologies:

[0191] Time synchronization: Different modal data are acquired at different frequencies, requiring alignment through time windows and interpolation methods;

[0192] Feature standardization: unifies features from different modalities to the same numerical range and distribution, preventing any one modality from dominating the fusion result;

[0193] Attention network: Implemented using a two-layer fully connected network, with inputs being features of each modality and outputs being the corresponding weight coefficients;

[0194] Dynamic updates: The fusion weights are not fixed, but are dynamically calculated based on real-time data to adapt to environmental changes;

[0195] This attention-based multimodal fusion method can fully leverage the complementary advantages of various data sources, significantly improving the accuracy and robustness of fire early warning, especially demonstrating a clear advantage in complex construction environments.

[0196] Step 300: Construct a tunnel fire early warning model adapted to the construction environment and design a dynamic threshold mechanism;

[0197] This step involves constructing a tunnel fire early warning model suitable for the tunnel construction environment to achieve accurate identification of fire risks. It includes the following sub-steps:

[0198] Step 301: Construct a tunnel fire early warning model;

[0199] This tunnel fire early warning model needs to address the unique challenges of the tunnel construction environment, including data imbalance (limited fire samples), complex and variable environments, and numerous interfering factors. It utilizes deep learning technology to automatically learn fire characteristics from multimodal data and achieve accurate early warning even in complex environments. The specific implementation is as follows:

[0200] The model architecture is designed using a TCNN (Transposed Convolutional Neural Network) architecture, which employs an encoder-decoder structure to achieve spatiotemporal feature extraction and fire risk prediction.

[0201] Input layer design:

[0202] Receive the multimodal feature vector fused in step 203;

[0203] Preserve the temporal dimension to capture the temporal evolution patterns of features;

[0204] Encoder module:

[0205] Deep temporal modeling: using multi-layer 1D convolutional networks to progressively extract advanced spatiotemporal patterns of fused features;

[0206] Multi-scale feature extraction: Capturing changing features at different time scales through convolutional kernels with different receptive fields;

[0207] Attention Enhancement: Integrating temporal and channel attention mechanisms to highlight key time points and feature dimensions;

[0208] Decoder (Spatiotemporal Prediction) Module:

[0209] Transposed convolutional network design: Constructing a decoder using multiple layers of transposed convolutions;

[0210] Temporal dimension reconstruction: gradually restores temporal resolution through transposed convolution to predict future states;

[0211] Spatial dimension reconstruction: Reconstructing the spatial distribution of thermal image features to predict the spread of fire;

[0212] Residual connection: Add a residual connection between the encoder and decoder to preserve detail information and avoid information loss;

[0213] Multi-task output layer design:

[0214] Fire risk score: Outputs a fire risk score between 0 and 1, which is used for subsequent dynamic threshold determination;

[0215] Fire type identification: Distinguish between different types of fires (such as electrical fires, combustible material combustion, etc.), and output a vector, where the i-th component of the vector represents the probability that the fire is of the i-th type;

[0216] Development trend prediction: Fire development path and speed, a vector, where each component of the vector represents the growth rate, spread speed, main direction, probability distribution of each stage of the fire, and estimated danger time;

[0217] In one embodiment of the present invention, the fire development trend output vector is: [0.6,0.4,0.25,0.05,0.8,0.15,0,0.7], which indicates that the fire is growing at a medium-high rate (0.6), spreading at a moderately slow rate (0.4), mainly expanding eastward (0.25), with a 5% probability of being in the incubation period, an 80% probability of being in the growth period, a 15% probability of being in the peak period, a 0% probability of being in the decline period, and is expected to reach the danger threshold within a relatively long period of time (0.7).

[0218] In one embodiment of the present invention, the growth rate: range [0,1], represents a standardized value of the fire spread rate; 0 represents no growth; 0.5 represents a moderate growth rate (approximately 5% area / minute); 1 represents extremely rapid growth (approximately 15% area / minute or more);

[0219] Spread speed: range [0,1], representing the rate at which the fire spreads in space; 0 indicates almost stationary; 0.5 indicates medium speed (approximately 0.5 m / min); 1 indicates high-speed spread (approximately 2 m / min or more);

[0220] Main direction: range [0,1], representing normalized angle values; 0 represents 0° (due north); 0.25 represents 90° (due east); 0.5 represents 180° (due south); 0.75 represents 270° (due west);

[0221] Expected danger time: range [0,1], representing normalized time prediction; 0 indicates that the danger threshold has been reached; 0.5 indicates that the danger threshold is expected to be reached within a moderate time (approximately 5 minutes); 1 indicates that the danger threshold will not be reached in the short term (≥15 minutes).

[0222] Step 302: Design a dynamic threshold mechanism and calculate the dynamic threshold for each sensor;

[0223] An adaptive dynamic threshold algorithm is designed to address the environmental characteristics of different construction stages. The calculated dynamic threshold is used to determine whether a fire has occurred. The formula for calculating the dynamic threshold is as follows:

[0224] T threshold (t)=w base T base +w env ΔT env (t)+w act ΔT act (t)+w trd ΔT trd (t);

[0225] Wherein: T threshold (t) represents the dynamic threshold (0-1) at time t; w base w env w act w trd T represents the adjustment coefficients for the first, second, third, and fourth dynamic thresholds. base The baseline threshold is determined by statistical analysis of historical data; ΔT env (t) represents the environmental factor adjustment term at time t, which is related to ambient temperature and humidity; ΔT act (t) represents the construction activity adjustment item at time t, which is related to the current construction type; ΔT trd (t) is the trend adjustment term at time t, which is related to the historical data trend.

[0226] Calculation method for environmental factor adjustment items:

[0227] ΔT env (t)=α1·(T ambient (t)-T ref )+α2·(H ambient (t)-H ref );

[0228] Wherein: T ambient (t) represents the ambient temperature at time t; T ref Reference temperature (20℃); H ambient (t) represents the ambient humidity at time t; H ref The reference humidity is 50% (normal). α1 and α2 are the weighting coefficients for the first and second environmental factors, respectively, with default values ​​of 0.8 and 0.2.

[0229] Calculation method for construction activity adjustment items:

[0230]

[0231] Among them: A i (t) is the indicator function for the i-th type of construction activity (1 if in progress, 0 otherwise); w i n is the weighting coefficient for the i-th type of construction activity; act This refers to the total number of construction activities, including welding, cutting, blasting, and other construction operations that may affect temperature.

[0232] Trend adjustment item calculation method:

[0233]

[0234] in: Δt is the rate of temperature change; Δt is the width of the time window; β1 is the adjustment coefficient, which controls the intensity of the trend influence.

[0235] The dynamic threshold adjustment problem is modeled as a reinforcement learning framework, which can continuously optimize the dynamic threshold parameters through interaction with the environment. The specific implementation is as follows:

[0236] Reinforcement learning problem modeling:

[0237] State space:

[0238] S={s t =[E t ,P t D t A t ]|t∈T seq );

[0239] Among them, E t P represents the environmental characteristics (temperature, humidity, dust concentration, etc.) at time t. t D represents the historical performance metrics (accuracy, false alarm rate, etc.) at time t. t A represents the characteristics of the detection data at time t. t T represents the activity type code at time t. seq Represents a time series set, s t Let S represent the state at time t, and let S represent the state space.

[0240] Action space:

[0241] A={a t =[ΔT base Δβ time ,Δβ location Δβ activity ]|t∈T seq};

[0242] Where, ΔT base Δβ represents the adjustment amount of the base threshold. time Δβlocation Δβ activity These represent the adjustment amounts for the time factor, location factor, and activity factor, respectively. t Let A represent the action taken at time t, and let A represent the action space.

[0243] Reward function: Based on the performance definition of the early warning system:

[0244] R(s t ,a t ,s t+1 )=w1·R accuracy +w2·R timeliness -w3·R cost ;

[0245] R(s t a t s t+1 () represents the reward function, which consists of three parts:

[0246] Rewards for accurate early warnings:

[0247] R accuracy =α TP ·TP-α FP ·FP-α FN ·FN;

[0248] Where: TP is the number of true positives, i.e., the actual fire events that were successfully alerted; FP is the number of false positives, i.e., false alarms; FN is the number of false negatives, i.e., missed alarms; R accuracy Rewards for accurate early warnings; α TP α FP α FN The weighting coefficients for the accuracy of the first, second, and third predictions are set to default values ​​of 2.0, 1.0, and 3.0, respectively, reflecting that the severity of missed reports is higher than that of false reports.

[0249] Rewards for timely early warnings:

[0250]

[0251] Wherein: T advance,i T represents the lead time (in minutes) for the i-th successful warning event; ref β2 is the time reference (set to 10 minutes); β2 is the time reward coefficient, with a default value of 0.5; TP is the set of true cases, containing all fire events for which a warning was successfully issued; R timeliness Rewards will be given for timely early warnings;

[0252] System cost penalty:

[0253]

[0254] Where: |at | This refers to the range of motion to prevent drastic parameter fluctuations; I(a t,i ≠a t-1,i ) is an indicator function, which is 1 when the parameter changes, and 0 otherwise; γ1 and γ2 are the cost penalty coefficients for the first and second systems, with default values ​​of 0.1 and 0.05 respectively; n a R represents the dimension of the action space, i.e., the number of threshold parameters; I() is an indicator function, which takes a value of 1 when the condition in parentheses is true, and 0 otherwise; cost Penalty for system costs;

[0255] The dynamic threshold parameter optimization adopts a reinforcement learning algorithm by combining a deep Q-network (DQN) with priority experience replay technique.

[0256] In one embodiment of the present invention, the dynamic threshold obtained at time t is used as the judgment limit for the risk score output by the tunnel fire early warning model. When the output risk score is higher than this dynamic threshold, it is determined that a fire has occurred; otherwise, no fire has occurred.

[0257] Compared with traditional fixed threshold methods, the dynamic threshold mechanism based on reinforcement learning can automatically find the optimal combination of dynamic threshold parameters under different construction stages and environmental conditions, achieving adaptive intelligent adjustment and significantly improving the tunnel fire early warning system's ability to cope with complex and ever-changing construction environments.

[0258] Step 303: Perform fire dynamics numerical simulation based on FDS;

[0259] This step utilizes FDS (Fire Dynamics Simulator) software to establish a target tunnel model, conduct numerical simulations of fire dynamics, acquire simulated fire temperature data and smoke images, and construct a fire dataset as training data for the tunnel fire early warning model in step 301. The specific implementation is as follows:

[0260] Tunnel physical model construction:

[0261] Geometric modeling: Constructing a three-dimensional model based on the actual tunnel's geometric dimensions (cross-sectional shape, length, curvature, etc.);

[0262] Material property settings: Input the thermophysical parameters (thermal conductivity, specific heat capacity, density, etc.) of the tunnel surrounding rock and support structure;

[0263] Boundary condition definition: Set the airflow conditions, temperature conditions, etc. at the tunnel entrance and exit;

[0264] Mesh generation: The computational domain is divided into multiple continuous mesh blocks along the tunnel axis, each mesh block being 40-60 meters in length; the mesh size for the area where the fire source is located is D* / 10, where D is the diameter of the characteristic fire; the mesh size for adjacent areas is D* / 8; and the mesh size for areas far from the fire source is D* / 5; this is achieved in the FDS input file by defining multiple &MESH named lines and specifying the coordinate range and mesh number parameters for each mesh block.

[0265] Fire scene design:

[0266] Fire source types: Simulate different types of fire sources (electrical fires, vehicle fires, combustible material fires, etc.);

[0267] Changes in ignition source location: Ignition sources are placed at different locations in the tunnel (entrance section, middle section, exit section, bends, etc.);

[0268] Fire intensity control: Set fires with different heat release rates (HRR), ranging from small-scale (1MW) to large-scale (200MW);

[0269] Variations in ventilation conditions: Simulates fire development under different ventilation conditions (natural ventilation, mechanical ventilation, different wind speeds, etc.);

[0270] FDS parameter configuration:

[0271] Combustion Model: The Mixture Fraction Model was selected as the combustion model. This model is suitable for diffuse flames in tunnel fires, describing the mixing and reaction process of fuel and oxygen by solving the transport equations for the mixture fraction. The Heat Release Rate (HRR) is specified using an area-based method, specifically set as the HRRPUA parameter (Heat Release Rate per Unit Area), with a typical range of 500-2500 kW / m². 2 Adjustments can be made based on different combustion materials;

[0272] Turbulence Model: Considering the balance between computational efficiency and accuracy, Large Eddy Simulation (LES) was selected as the turbulence model, with the Smagorinsky constant set to 0.2. The LES model is suitable for simulating smoke flow in large-scale spaces such as tunnels, accurately capturing the large-scale motion characteristics of smoke, while having relatively acceptable computational resource requirements. For key local areas (such as near the fire source), a mesh refinement strategy was adopted to improve the simulation accuracy of small-scale turbulence. When using the DNS model for comparative verification in specific cases, the mesh size was reduced to 1-2 cm to ensure that the smallest turbulence scale could be directly simulated.

[0273] Radiation Model: The finite volume method (FVM) was selected for radiative heat transfer simulation. This model strikes a good balance between computational efficiency and accuracy, making it suitable for radiative heat transfer simulation in narrow spaces like tunnels. For the radiation absorption coefficient, considering the influence of dust and water vapor in the tunnel construction environment, it is set slightly higher than the absorption coefficient of standard air, with a parameter of 0.5.

[0274] Computational stability control: An initial time step of 0.02 seconds is set; the L2 norm is used to calculate the CFL number; in regions with large temperature gradients, the lower limit for time step reduction is set to 0.4. FDS automatically adjusts the time step for each calculation step according to the CFL conditions (Courant-Friedrich-Lévy conditions) to ensure computational stability without manual intervention.

[0275] Virtual sensor deployment:

[0276] In the FDS model, virtual sensors are set up according to the sensor deployment plan;

[0277] Temperature sensors: arranged along the length of the tunnel, spaced 6-10m apart, at heights of 1.5m and 2.5m above the ground;

[0278] Gas concentration sensor: measures the concentration of gases such as CO, CO2, and O2;

[0279] Thermal imaging virtual camera: Set up a virtual camera to capture temperature field distribution;

[0280] Fire simulation data acquisition:

[0281] Time-series data acquisition: Record data such as temperature and gas concentration at each sensor point at 1-second intervals;

[0282] Full data export: Export complete 3D data such as temperature field and flue gas distribution field every 30 seconds;

[0283] Cross-sectional data acquisition: Record detailed two-dimensional distribution data along key cross-sections in the tunnel's axial and transverse directions;

[0284] Visualized data: Generate visualization results such as temperature cloud maps, flue gas diffusion maps, and velocity vector maps;

[0285] Fire dataset construction:

[0286] Data cleaning: removing outliers and handling data gaps;

[0287] Data standardization: unifying data of different proportions and units into a standard range;

[0288] Time series segmentation: Data is segmented according to different time windows (10s, 30s, 60s) to form training samples;

[0289] Sample label generation: Generate sample labels based on fire development stage, risk level, etc.

[0290] Data augmentation: Increasing the number of samples by adding noise, time shifting, feature combination, etc.

[0291] Simulation results verification:

[0292] Mesh sensitivity analysis: By comparing the calculation results of different mesh densities, a suitable mesh density is determined;

[0293] Comparison with empirical formulas: Verify the results by comparing them with established empirical formulas for fire development;

[0294] Small-scale experimental verification: Comparison with laboratory small-scale fire experiments;

[0295] Case retrospective: Attempts to recreate existing tunnel fire cases to verify the accuracy of the simulation;

[0296] Through the above FDS simulations, a large-scale fire dataset containing more than 1,000 fire scenarios and over 100,000 time steps was constructed, covering various fire scenarios that may occur in tunnels, providing a high-quality data foundation for the next step of training tunnel fire early warning models.

[0297] Step 304, Model Training and Optimization;

[0298] This step trains the tunnel fire early warning model designed in step 301 based on the fire simulation dataset generated in step 303.

[0299] The specific implementation is as follows:

[0300] Multi-task learning loss function design:

[0301]

[0302] Where: L total L is the total loss function; i w is the specific loss function for the i-th task; i L represents the weight coefficient of the i-th task, reflecting its importance; M represents the total number of tasks, corresponding to the number of branches in the multi-task output layer; L represents the weight coefficient of the i-th task, reflecting its importance. reg λ1 is the regularization loss, which controls the model complexity; λ1 is the regularization coefficient, with a default value of 0.001.

[0303] This multi-task learning framework designs dedicated loss functions for the three branches of the multi-task output layer of the tunnel fire early warning model, as follows:

[0304] Fire risk scoring branch loss function:

[0305]

[0306] Where: L risk For fire risk scoring, the branch loss function is used; N is the sample size; r i The actual risk score, ranging from [0,1], is obtained through annotation of training data. To predict the risk score, the range is [0,1], and the risk score output by the tunnel fire early warning model is y. i α is the sample label, where 1 represents a fire sample and 0 represents a non-fire sample; BCE() is the binary cross-entropy function; α3 is the weight coefficient for non-fire samples, with a default value of 0.5, used to balance positive and negative samples.

[0307] The fire risk score loss is calculated using a weighted binary cross-entropy method, which considers both the accuracy of the prediction score and the ability to distinguish between fire and non-fire samples. Since fire samples are scarce, the accuracy of predictions for fire samples is more important for the tunnel fire early warning model; therefore, fire samples are given a higher weight.

[0308] Fire type identification branch loss function:

[0309]

[0310] Where: L class The loss function is used for fire type identification; N is the number of samples; C is the number of fire types (electrical fires, fuel fires, material fires, etc.); y ij The true label is 1 if sample i belongs to category j, and 0 otherwise; p ij To predict probabilities, the tunnel fire early warning model predicts the probability that sample i belongs to category j; β j Here, represents the weight coefficient for category j, which is inversely proportional to the category frequency and is used to handle class imbalance; the calculation formula is:

[0311]

[0312] Where N j γ is the number of samples in class j; γ3: focusing parameter, default value is 0.25, adjusts the loss contribution of easy / difficult samples; ξ ij Misclassification indicator, when the prediction is correct (p ij >0.5 and y ij =1) is 1, otherwise it is 0.

[0313] The fire type identification loss uses an improved FocalLoss algorithm. This improvement incorporates a category weighting term β. j and more flexible focus items The role of the focusing term is: when the sample prediction is correct (ξ) ij =1), the loss contribution is (1-γ) times; when the prediction is wrong (ξ ij =0), the loss contribution is γ times, thus making the model pay more attention to hard-to-class samples. This improvement can better handle the multi-class imbalance problem while paying attention to hard-to-class samples.

[0314] Development trend prediction branch loss function:

[0315] L trend =λ g ·I growth +λ s ·L speed +λ d ·L dir +λ p ·L phase +λ t ·L time ;

[0316] Where: L trend For trend prediction, branch loss function; L growth To predict losses based on the growth rate, measure the accuracy of fire growth rate forecasts; L speed To predict losses based on fire spread rate, assess the accuracy of fire spread rate prediction; L dir To predict losses by direction and ensure the accuracy of predicting the main direction of fire development; L phase To predict losses at each stage of a fire, the accuracy of the predicted probability distribution for each stage of a fire is measured; L time To predict losses at dangerous times, penalize delayed warnings and encourage accurate prediction of when a fire will reach a dangerous stage; g , λ s , λ d , λ p , λ t The balance coefficients for the first, second, third, fourth, and fifth development trends are 0.2, 0.2, 0.2, 0.2, 0.2, and 0.2 respectively by default. They are dynamically adjusted based on the performance on the validation set, and the optimal combination of values ​​is searched in the range [0.1, 0.5] using the Bayesian optimization method.

[0317] The calculation formulas for the five sub-loss functions are as follows:

[0318] Growth rate forecast loss:

[0319]

[0320] Where: L growth The loss is calculated as the growth rate prediction loss, where N is the number of samples in the training batch; g i The actual fire growth rate for sample i is derived from FDS simulation data; The fire growth rate of sample i predicted by the tunnel fire early warning model;

[0321] The mean squared error (MSE) is used to calculate the growth rate prediction error, which can effectively measure the difference between the predicted value and the actual value.

[0322] Predicting losses based on spread rate:

[0323]

[0324] Where: l speed The loss is predicted to indicate the spread rate; N is the number of samples in the training batch; s i The actual fire spread rate for sample i is derived from FDS simulation data. The fire spread rate of sample i predicted by the tunnel fire early warning model;

[0325] The mean square error calculation is also used, which is suitable for predicting continuous spread rate, and the units remain consistent.

[0326] Directional prediction loss:

[0327]

[0328] Where: L dir θ is the direction prediction loss; N is the number of samples in the training batch; i The vector represents the main direction of actual fire spread, derived from the fire spread field vector field simulated by FDS. The vector representing the main direction of fire spread predicted by the tunnel fire early warning model; To calculate the cosine similarity between two direction vectors;

[0329] The loss function uses cosine distance (1 - cosine similarity), with a value range of [0,2]. The loss is 0 when the two directions are the same and 2 when the directions are opposite. By minimizing this loss function, the predicted direction is made as consistent as possible with the true direction.

[0330] Predicted losses during fire phase:

[0331]

[0332] Where: L phase To predict losses for different fire stages; N is the number of samples in the training batch; P is the number of fire stages, divided into four stages: latent stage, growth stage, peak stage, and decline stage; q ij This represents the true probability distribution of sample i being in fire stage j, derived from FDS simulation data annotation. The probability that sample i is in fire stage j, as predicted by the tunnel fire early warning model;

[0333] The cross-entropy loss function is applicable to multi-class probability distribution prediction and can effectively measure the difference between the predicted distribution and the true distribution.

[0334] Predicting losses during dangerous times:

[0335]

[0336] Where: L time Loss is the predicted loss for the critical time period; N is the number of samples in the training batch; t i The actual time when sample i reaches the dangerous stage is determined by FDS simulation data and is defined as the time point when the fire reaches its peak stage. ω represents the time when sample i reaches the dangerous stage as predicted by the tunnel fire early warning model. i The time error weight is calculated using the following formula:

[0337]

[0338] in: As an indicator function, when the predicted time is later than the actual time The value is 1 otherwise; α4 is the penalty coefficient for delayed warnings, with a default value of 2.0, which was determined through cross-validation to make the penalty for delayed warnings greater than that for early warnings.

[0339] Using weighted absolute error (L1 loss) can impose a greater penalty on delayed warnings, reflecting the principle of safety first, while being less sensitive to outliers than mean square error;

[0340] Through the above-mentioned meticulously designed multi-task loss function system, the tunnel fire early warning model can simultaneously optimize three tasks: fire risk scoring, fire type identification, and fire development trend prediction. This fully leverages the advantages of multi-task learning and improves the overall performance and generalization ability of the model.

[0341] Through the above training strategies, the tunnel fire early warning model achieved a high level of prediction accuracy on the test set. In terms of early fire warning, the tunnel fire early warning system can detect fire risks earlier than traditional threshold methods, thus gaining valuable time for emergency response.

[0342] Step 400: Design a multi-level early warning response mechanism and issue early warnings;

[0343] This step designs a multi-level early warning and response mechanism, which automatically triggers different levels of response measures based on the predicted fire risk level. The specific implementation is as follows:

[0344] Step 401: Continuously output fire risk scores based on the tunnel fire early warning model and compare them with dynamic thresholds;

[0345] If the fire risk score is higher than the dynamic threshold, it is determined that a fire may occur. At this time, a second determination is made through step 402 to achieve a more accurate early warning and prevent false alarms.

[0346] Step 402, Risk Level Classification;

[0347] Based on the patterns of fire development and the safety requirements of tunnel construction, fire risk is divided into four levels: Normal (0-0.25), Caution (0.25-0.5), Warning (0.5-0.75), and Emergency (0.75-1.0).

[0348] The risk level classification uses a continuous numerical range of 0-1, rather than a simple discrete level, which enables the tunnel fire early warning system to achieve more refined risk assessment and a smoother transition. The formula for calculating the comprehensive risk score using secondary judgment is as follows:

[0349] R total =w F ×R F +w T ×R T +w S ×R S +W P ×R P +w L ×R L ;

[0350] Where: R total For the overall risk score (0-1); W F W T W S W P W L The weights for the first, second, third, fourth, and fifth comprehensive risk scores are 0.2, 0.3, 0.3, 0.1, and 0.1, respectively; R F The fire risk score (0-1) output by the tunnel fire early warning model; R T Temperature anomaly risk score (0-1); R S Smoke characteristic risk score (0-1); R P Assign a risk score based on population density (0-1); R L Risk score for tunnel area characteristics (0-1);

[0351] The calculation methods for each sub-item risk score are as follows:

[0352] Temperature Anomaly Risk Score: This score assesses the degree of temperature anomaly based on temperature sensor data. The calculation formula is as follows:

[0353]

[0354] Where: RT For temperature anomaly risk scoring; T max This is the highest temperature currently monitored in the area; T baseline The current environmental reference temperature is obtained through statistical analysis of historical data; T threshold This is the temperature anomaly threshold, with a default value of 50℃, which can be adjusted according to the characteristics of the tunnel area; r T The rate of temperature rise is the rate of temperature change within a short time window; r threshold This is the temperature rise rate threshold, with a default value of 5℃ / min; K T This is a weighting factor; the default value is 0.6.

[0355] Temperature anomaly risk scoring considers not only absolute temperature values ​​but also the trend of temperature changes. For example, even if the absolute temperature is not high, a rapid rise in temperature will result in a higher risk score.

[0356] Smoke Feature Risk Score: Calculated by comprehensively considering smoke concentration, gas composition, and thermal image features, using the following formula:

[0357] R S =w CO ×R CO +w smoke ×R smoke +w IR ×R IR ;

[0358] Where: R S Smoke characteristic risk score; W CO W smoke ,w IR The weights for the risk scores of the first, second, and third smoke characteristics are 0.4, 0.3, and 0.3, respectively, with default values ​​of 0.4, 0.3, and 0.3; R CO The risk score for CO / CO2 concentration is calculated based on the relative threshold and rate of change of gas concentration; R smoke Risk score for smoke optical concentration is calculated based on data from photoelectric smoke sensors; R IR The results of smoke recognition in thermal images by the tunnel fire early warning model are used to score the smoke features of infrared thermal imaging.

[0359] The smoke characteristic risk score improves the ability to identify fire smoke by integrating multiple sensing methods. This score pays particular attention to changes in gas composition, as changes in CO / CO2 concentration are a crucial indicator for distinguishing fire smoke from construction dust.

[0360] Population density risk score: Based on the current population size and distribution within the area, the calculation formula is as follows:

[0361]

[0362] Where: RP Score the risk of personnel density; n person To monitor the number of people in the area, data is obtained through Wi-Fi detection, personnel location tags, or AI video analysis; threshold This serves as a baseline threshold for the number of personnel; the default value is 10 people per 100 square meters. 2 Adjusted according to the tunnel cross-sectional area; α cluster This is the clustering impact coefficient, with a default value of 0.5, representing the amplifying effect of population gathering on risk; C factor This is the population clustering factor, which measures the degree of concentration of population distribution, and its value ranges from 0 to 1.

[0363] Personnel density risk scores reflect the number of exposed objects and their vulnerability to fire risks. As the number of people in an area increases, the potential harm from a fire also increases; when people are highly concentrated, evacuation becomes more difficult, further increasing the risk. In practical applications, tunnel fire early warning systems obtain personnel distribution information through wireless signal strength analysis, Bluetooth beacon positioning, or AI video analysis technology, and dynamically calculate risk scores.

[0364] Tunnel area characteristic risk assessment: Considering inherent characteristics such as tunnel structure, ventilation conditions, and evacuation difficulty, the calculation formula is as follows:

[0365] R L =w vent ×R vent +w exit ×R exit +w material ×R material ;

[0366] Where: R L Risk assessment for tunnel area characteristics; w vent w exit w material The weights for the risk assessment of the first, second, and third tunnel areas are 0.4, 0.4, and 0.2, respectively, with default values ​​of 0.4, 0.4, and 0.2. vent R scores the ventilation conditions to assess the effectiveness of regional ventilation; exit Scoring evacuation routes takes into account the distance to the nearest safe exit and the accessibility of the route; R material Assess the risk of surrounding materials and evaluate the quantity and type of combustibles in the area;

[0367] The tunnel area characteristic risk score reflects the inherent risk differences in different areas of the tunnel. This score is determined as a baseline value through professional assessment during the initial deployment of the tunnel fire early warning system and can be updated regularly according to construction progress and environmental changes.

[0368] The output R of the comprehensive risk scoring system totalThe system directly determines the warning level and triggers corresponding response measures. The tunnel fire early warning system calculates R every second. total The system triggers a corresponding level of early warning response when the calculated value exceeds the level threshold for three consecutive times. To avoid frequent level fluctuations, the tunnel fire early warning system implements a state lag mechanism: the upgrade condition is more sensitive (upgrade occurs after exceeding the level threshold three times), while the downgrade condition is more conservative (downgrade only occurs after falling below the level threshold for ten consecutive times).

[0369] Step 403, Tiered Response Strategy;

[0370] Early warning model output to obtain early warning information: The tunnel fire early warning model continuously outputs fire risk score, fire type and predicts fire development trend, and continuously records fire type and fire development trend as warning information;

[0371] Corresponding response strategies were designed for different risk levels. The specific response strategies are as follows:

[0372] Attention level (0.25-0.5) response strategy:

[0373] Automatic monitoring frequency increase: The sampling frequency of temperature and gas sensors is increased from the conventional 60 seconds / time to 20 seconds / time;

[0374] Send alert messages to on-site safety supervisors and area managers, including the location of suspicious areas, the type of anomaly, and preliminary assessment results;

[0375] The management terminal displays a yellow warning, marking the abnormal area;

[0376] The on-site LED status indicator light turned to a slow yellow flash, but no sound alarm was emitted;

[0377] Abnormal situations are recorded in the tunnel fire early warning system log and a mandatory notification is given during shift handover to facilitate manual inspection;

[0378] Warning level (0.5-0.75) response strategy:

[0379] Maximize monitoring frequency: All sensors are increased to the highest sampling frequency (5 seconds / time);

[0380] Continuously push early warning information to all on-site management personnel and safety officers until the fire risk level returns to normal.

[0381] The management platform displays an orange warning screen and pops up a confirmation dialog box;

[0382] Activate on-site warning lights (flashing orange) and voice prompts;

[0383] Report early warning information to external monitoring platforms to provide early warnings for fire and rescue operations;

[0384] Warning messages will be broadcast via intercom during construction until normal operation is restored;

[0385] Adjust ventilation direction and speed, optimize airflow organization, and prevent smoke diffusion;

[0386] Remotely shut down non-essential electrical equipment in suspected areas to reduce energy risks;

[0387] Discontinue high-risk operations (such as welding, cutting, etc.) in suspected areas;

[0388] Emergency Level (0.75-1.0) Response Strategy:

[0389] All nodes have entered emergency mode and are continuously monitoring at the highest frequency.

[0390] Trigger the full tunnel alarm system and activate the audible and visual alarm (red flashing light and high-decibel alarm sound);

[0391] Send an emergency evacuation order to all construction workers;

[0392] Evacuation instructions will be continuously broadcast via emergency broadcast system;

[0393] Continuously send automatic alarms and early warnings to external rescue agencies until the fire risk level returns to normal.

[0394] Send an emergency notification to all management and safety personnel to activate the emergency command system;

[0395] Emergency lighting is activated, and LED indicators in all evacuation routes are turned on;

[0396] Automatically cuts off power to high-risk areas, reducing the risk of electrical fires and electric shock;

[0397] Close the relevant fire doors to control the spread of the fire;

[0398] Adjust ventilation, control the direction of smoke flow, and protect evacuation routes.

[0399] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.

Claims

1. A tunnel fire early warning method based on deep learning, characterized in that, Includes the following steps: Deploy sensors and build a low-power wireless transmission network to acquire multimodal data; The acquired multimodal data is preprocessed, features are extracted, and features are fused. Construct a tunnel fire early warning model adapted to the construction environment and design a dynamic threshold mechanism; The tunnel fire early warning model is designed with a multi-task output layer, and the specific outputs are as follows: Fire risk score: Outputs a fire risk score between 0 and 1; Fire type identification: Distinguish between different types of fires, and output a vector, where the i-th component of the vector represents the probability that the fire is of the i-th type; Development trend prediction: The development path and speed of the fire are represented by a vector, where each component of the vector represents the growth rate, spread speed, main direction, probability distribution of each stage of the fire, and estimated time of danger. The fire risk score is used to initially determine whether a fire has occurred. The determination method is to compare it with a dynamic threshold. If the fire risk score is higher than the dynamic threshold, an adaptive dynamic threshold algorithm is designed based on the environmental characteristics of different construction stages. The calculated dynamic threshold is used to determine whether a fire has occurred. The dynamic threshold calculation formula is as follows: in: The dynamic threshold (0-1) at time t; , , , These are the adjustment coefficients for the first, second, third, and fourth dynamic thresholds; The basic threshold is determined by statistical analysis of historical data; This refers to the environmental factor adjustment term at time t. For construction activity adjustments at time t; The trend adjustment term at time t; Calculation method for environmental factor adjustment items: in: Let t be the ambient temperature at time t; For reference temperature; Let t be the ambient humidity at time t; For reference humidity; Adjust the weighting coefficients for the first and second environmental factors; Calculation method for construction activity adjustment items: in: Let i be the indicator function for the i-th type of construction activity; The weighting coefficient for the i-th type of construction activity; This refers to the total number of types of construction activities; Trend adjustment item calculation method: in: The rate of temperature change; The width of the time window; The adjustment coefficient controls the intensity of the trend's influence. Design a multi-level early warning and response mechanism and issue early warnings.

2. The tunnel fire early warning method based on deep learning according to claim 1, characterized in that, The deployed sensor includes a photoelectric smoke sensor with a self-cleaning function, which comprises the following core components: The photoelectric smoke detection section uses an 850nm wavelength infrared LED light source and a photoelectric receiver to form a scattered light path; Miniature compressed air pump: maximum pressure 0.1MPa, flow rate 2L / min, volume less than 50×30×20mm; Airflow control valve: controls airflow intensity and direction via PWM; Dust concentration detector: Used to monitor the ambient dust concentration in real time and trigger the self-cleaning function.

3. The tunnel fire early warning method based on deep learning according to claim 2, characterized in that, The low-power wireless transmission network physical layer adopts LoRa technology; the link layer adopts a TDMA-based protocol; the network layer implements a self-organizing mesh network based on AODV; and the power consumption control formula for node devices is as follows: in: This represents the total power consumption of the node. Based on power consumption; This refers to the power consumption per sensing cycle. The sampling frequency; This refers to the power consumption per communication session. For communication frequency.

4. The tunnel fire early warning method based on deep learning according to claim 3, characterized in that, The sampling frequency and communication frequency are dynamically adjusted to achieve power balance. The dynamic adjustment is based on the risk level of the local computing environment to achieve automatic switching between three working modes: low power mode, alert mode, and emergency mode.

5. The tunnel fire early warning method based on deep learning according to claim 4, characterized in that, The feature extraction includes extracting features of thermal anomaly regions using an improved YOLOv5-Fire model, enhancing the detection capability for small target thermal anomalies by adding an attention mechanism, and adding convolutional block attention modules to the backbone network. The thermal anomaly target detection formula is as follows: in: Let be the conditional probability that the target belongs to the i-th class, and let represent the probability that the detected object belongs to flame, hot spot or smoke; The probability that a target exists in the image represents the confidence level that the detection box contains an actual target. To measure the localization accuracy, the intersection-union ratio (IUU) between the predicted bounding box and the true bounding box is used. The image detection confidence threshold is used to determine whether fire features exist in the thermal image; The image feature detection confidence threshold is dynamically adjusted under different environmental conditions to improve the accuracy of thermal image feature extraction and reduce the false detection rate at the feature level. The dynamic adjustment of the image feature detection confidence threshold adopts the following strategy: Under normal construction conditions, threshold = 0.6; Threshold = 0.5 at night or under low light conditions; For high-risk operations, threshold = 0.

7.

6. The tunnel fire early warning method based on deep learning according to claim 5, characterized in that, The fire dataset required for training the tunnel fire early warning model is constructed by using FDS software to establish a target tunnel model, performing fire dynamics numerical simulation, and obtaining simulated fire temperature data and smoke images.

7. A tunnel fire early warning system based on deep learning, characterized in that, It is used to execute the deep learning-based tunnel fire early warning method according to any one of claims 1-6, comprising: Multimodal data acquisition module: As the front-end perception layer of the system, it is responsible for collecting relevant parameters in the tunnel construction environment; Low-power wireless transmission module: solves the problems of unstable power supply and fragile cables in tunnel construction environment, and realizes reliable data transmission; Data preprocessing and feature extraction module: responsible for transforming raw sensor data into discriminative feature representations; Tunnel fire early warning model module: Built based on deep learning technology, it adopts a transposed convolutional neural network architecture and is the core decision-making unit of the system; Dynamic threshold mechanism module: It adopts a deep Q-network to implement a reinforcement learning framework, which can automatically adjust the warning threshold according to the environment; Multi-level early warning response module: responsible for triggering corresponding level of emergency measures based on the risk score output by the early warning model; System Integration and Management Module: Integrates various functional modules into a unified system platform, providing management interface, data storage and analysis, and system maintenance functions.

Citation Information

Patent Citations

  • Fire sensing method of double-layer cable tunnel structure and related device

    CN119559380A