Tunnel fire early warning method and system based on deep learning

By deploying self-cleaning photoelectric smoke sensors, low-power wireless transmission networks and multimodal data fusion in the tunnel construction environment, a deep learning fire warning system adapted to the construction environment was constructed, which solved the accuracy and reliability problems of fire warning in tunnel construction and realized multi-level emergency response and risk assessment.

CN120599764AActive Publication Date: 2025-09-05HEFEI UNIV OF TECH

Patent Information

Application Number
CN202510844549.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-09-05
Estimated Expiration
2045-06-23

Smart Images

  • Figure CN120599764A_ABST
    Figure CN120599764A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of fire early warning, and discloses a tunnel fire early warning method and system based on deep learning, and the method comprises the steps: deploying a sensor, constructing a wireless transmission network, and obtaining multi-modal data; carrying out preprocessing, feature extraction and feature fusion on the multi-modal data; constructing a tunnel fire early warning model adapted to the construction environment and designing a dynamic threshold mechanism; and designing a multi-level early warning response mechanism and carrying out early warning. According to the invention, the dust-proof smoke sensor is arranged to overcome the problem of susceptibility to dust interference; sampling frequency and communication frequency are automatically adjusted according to monitoring requirements during data transmission, so that the monitoring effect is ensured and the service life of a battery is prolonged; a tunnel fire early warning model based on TCNN is constructed, and a large-scale fire data set is constructed through FDS digital simulation to train the model; a dynamic threshold value capable of being automatically adjusted according to the environment is designed, and the problem that a fixed threshold value system does not adapt to the changing environment is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Tunnel construction involves extensive open flames and electrical equipment, creating a high-risk fire zone. If a fire breaks out during tunnel construction, the enclosed space and limited escape routes can easily lead to mass casualties, project delays, and significant economic losses. During construction, tunnels typically have only one-way exits, and the strength of temporary support structures is limited, making them prone to collapse after a fire, further increasing the risk of casualties. Mountain tunnels are geographically remote, and outside rescue efforts take a long time to arrive, necessitating reliance on early warning and self-rescue.

[0003] As part of a highway network expansion project, a long, mountainous tunnel (8.3 kilometers long) is currently under construction. The tunnel traverses complex geological structures, including fault zones, carbonaceous shales, and coal seams, with abundant groundwater. Tunnel construction involves a large number of tunneling machines, transport vehicles, temporary power supply equipment, and welding operations. The average construction crew, 120 per shift, operates 24 hours a day. Construction equipment and materials are scattered throughout the tunnel, and temporary fans provide limited ventilation. This results in poor ventilation in some areas, resulting in high dust concentrations in the air.

[0004] The fire warning technologies currently used mainly include:

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

[0006] Point smoke detector: Based on the 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 optical signals.

[0008] Fixed camera surveillance: Manual or basic video analytics software monitors for suspicious smoke and open flames.

[0009] Manual inspection: Arrange special personnel to inspect the construction site regularly and report any fire immediately.

[0010] In complex tunnel construction environments, existing fire warning technologies have the following obvious drawbacks:

[0011] Dust interference: The large amount of dust generated during construction can cause traditional photoelectric smoke detectors to frequently generate false alarms. Dust adheres to the sensor surface, reducing sensitivity and prolonging response time. Existing systems cannot effectively distinguish between normal construction dust and smoke from fires, lack self-cleaning capabilities, and require frequent maintenance to maintain proper operation.

[0012] Unstable data collection and transmission: Tunnel construction environments suffer from unstable power supply and easily damaged cables, making traditional wired sensor networks unreliable. Sensors operate in a fixed-power 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 single-point failures can easily paralyze the entire monitoring system.

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

[0014] Oversimplification of early warning models: Traditional systems generally use fixed threshold trigger mechanisms that cannot adapt to the changing environment of different construction phases (blasting, tunneling, masonry, etc.). Early warning decisions lack the ability to predict fire development trends and cannot provide key information such as the direction and speed of fire spread.

[0015] Single response mechanism: Existing systems mostly have a single-level alarm and lack a mechanism for graded response based on the degree of risk.

[0016] Traditional fire warning methods are ineffective in complex construction environments and are difficult to meet safety production requirements. There is an urgent need to develop a new warning system that adapts to the characteristics of the construction environment to improve warning accuracy and reduce fire risks. Summary of the Invention

[0017] The present invention provides a tunnel fire early warning method and system based on deep learning to solve the technical problems in the above-mentioned related technologies.

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

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

[0020] Perform data preprocessing, feature extraction and feature fusion on the acquired multimodal data;

[0021] Build a tunnel fire warning model that adapts to the construction environment and design a dynamic threshold mechanism;

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

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

[0024] Photoelectric smoke detection part: uses 850nm wavelength infrared LED light source and 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 through 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 an AODV-based self-organizing Mesh network; and the power consumption control formula of the node device is as follows:

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

[0030] Where: P total is the total power consumption of the node; P base is the basic power consumption; P sensing is the power consumption of single sensing; f sensing is the sampling frequency; f comm is the power consumption of a single communication; f comm is the communication frequency.

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

[0032] Furthermore, the feature extraction includes using an improved YOLOv5-Fire model to extract features of thermal anomaly areas, and enhancing the ability to detect small thermal anomalies by adding an attention mechanism. A convolutional block attention module is added to the backbone network. The thermal anomaly target detection formula is as follows:

[0033]

[0034] Among them: P(class i|object) is the conditional probability that the target belongs to the i-th class, indicating 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, indicating the confidence that the detection box contains the actual target; is the intersection-over-union ratio of the predicted bounding box and the true bounding box, which measures the positioning accuracy; threshold is the image detection confidence threshold, which is used to determine whether there are fire features in the thermal image;

[0035] The confidence threshold for image feature detection 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 confidence threshold for image feature detection adopts the following strategies:

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

[0037] At night or in low light conditions, threshold = 0.5;

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

[0039] Furthermore, the tunnel fire 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 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, a vector, the components of which represent the growth rate, spread speed, main direction, probability distribution of each stage of the fire, and expected danger time.

[0043] Furthermore, the fire risk score is used to initially determine whether a fire has occurred. The determination method is to compare it with the 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] Where: T threshold (t) is the dynamic threshold at time t (0-1); w base 、w env 、w act 、w trd are the first, second, third and fourth dynamic threshold adjustment coefficients; T base is the basic threshold, determined by historical data statistics; ΔT env (t) is the environmental factor adjustment item at time t; ΔT act (t) is the construction activity adjustment item at time t; ΔT trd (t) is 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] Where: T ambient (t) is the ambient temperature at time t; T ref is the reference temperature; H ambient (t) is the ambient humidity at time t; H ref is the reference humidity; α1, α2 are the adjustment weight coefficients of the first and second environmental factors;

[0049] Calculation method for construction activity adjustments:

[0050]

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

[0052] Trend adjustment calculation method:

[0053]

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

[0055] Furthermore, the dynamic threshold parameter optimization adopts a deep Q network combined with priority experience 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 by interacting 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 represents the environmental characteristics at time t, P t represents the historical performance index at time t, P t Represents the detection data features at time t, A t Indicates the activity type code at time t, T seq represents a time series set, s t represents the state at time t, and S represents the state space;

[0061] Action Space:

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

[0063] Where, ΔT base Indicates the adjustment amount of the basic threshold, Δβ time , Δβ location , Δβ activity Respectively represent the adjustment amount of time factor, position factor, and activity factor, a t represents the action taken at time t, and A represents the action space;

[0064] Reward function: Defined based on the performance 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 Early Warning Accuracy:

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

[0069] Where: TP is the number of true positives, i.e., actual fire events that were successfully warned; FP is the number of false positives, i.e., false alarm events; FN is the number of false negatives, i.e., missed alarm events; R accuracy rewards for early warning accuracy;

[0070] α TP , α FP , α FN : weight coefficients of the first, second and third prediction accuracy;

[0071] Reward for timely warning:

[0072]

[0073] Where: T advance,i is the lead time of the i-th successful warning event; T ref is the reference time; β2 is the time reward coefficient; TP is the true positive set, which includes all fire events that are successfully warned; R timeliness Rewards for timely warnings;

[0074] System cost penalty:

[0075]

[0076] Where: |A t | is the amplitude of the action to prevent the parameters from fluctuating violently; I(a t,i ≠a t-1,i ) is an indicator function, which is 1 when the parameter changes and 0 otherwise; γ1, γ2 are the first and second system cost penalty coefficients; n a is the dimension of the action space, that is, the number of threshold parameters; I() is the indicator function, which takes the value 1 when the condition in the brackets is true, otherwise it is 0; R cost Penalty for system costs.

[0077] Furthermore, the fire data set required for the training of the tunnel fire warning model is constructed by using FDS software to establish a target tunnel model, perform fire dynamics numerical simulation, obtain simulated fire temperature data and smoke images, and thus construct a fire data set.

[0078] A deep learning-based tunnel fire early warning system, configured to execute any of the above-mentioned deep learning-based tunnel fire early warning methods, comprising:

[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 environments, and achieves reliable data transmission;

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

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

[0083] Dynamic threshold mechanism module: uses 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 emergency measures of corresponding levels based on the risk scores 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 the present invention are:

[0087] A multimodal data acquisition system adapted to tunnel construction environments was constructed. It integrates dust-resistant smoke sensors, infrared thermal imaging, and gas concentration sensors to form a complementary monitoring network. This overcomes the vulnerability of traditional systems to dust interference and improves monitoring reliability in harsh environments. The sensors feature a self-cleaning design that regularly removes dust through pulsed airflow, significantly reducing maintenance requirements and false alarm rates.

[0088] A low-power wireless transmission network was designed, utilizing LoRa technology and a self-organizing mesh network architecture, to address the challenges of unstable power supply and fragile cables in tunnel construction environments. Dynamic power management technology automatically adjusts sampling and communication frequencies based on monitoring requirements, extending sensor node battery life while ensuring effective monitoring. Network redundancy ensures that single point failures do not affect 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 trends. An improved YOLOv5-Fire model is used to extract thermal anomaly features from infrared images, achieving higher detection accuracy. An attention mechanism enables intelligent fusion of multimodal features, automatically adjusting the weights of different sensor data to make the fused features more discriminative.

[0090] A tunnel fire early warning model based on a transposed convolutional neural network (TCNN) was constructed to accurately assess and predict fire risks. Using a multi-task learning framework, the model simultaneously outputs a fire risk score, fire type identification, and fire trend prediction, providing comprehensive information for emergency decision-making. A large-scale fire dataset, covering over 1,000 fire scenarios, was constructed through FDS digital simulation, significantly improving the model's generalization capabilities.

[0091] A dynamic threshold mechanism based on reinforcement learning has been designed to automatically adjust warning thresholds based on the environment, resolving the problem of fixed threshold systems being unable to adapt to changing environments. This improves warning accuracy and reduces false alarm rates compared to traditional methods.

[0092] A multi-level early warning response mechanism has been implemented, which automatically triggers emergency measures at different levels based on risk scores. BRIEF DESCRIPTION OF THE DRAWINGS

[0093] Figure 1 This is a flow chart of a tunnel fire early warning method based on deep learning of the present invention. DETAILED DESCRIPTION

[0094] The subject matter described herein will now be discussed with reference to example embodiments. It should be understood that these embodiments are discussed solely to enable those skilled in the art to better understand and implement the subject matter described herein, and that the functions and arrangements of the elements discussed may be varied without departing from the scope of this specification. Various examples may omit, substitute, or add various processes or components as needed. Furthermore, features described in some 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, the following steps are included:

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

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

[0098] Step 101: deploying a dust-proof sensor network;

[0099] A photoelectric smoke sensor with a self-cleaning function uses pulsed airflow to periodically remove dust from the sensor surface. Each sensor integrates a micro air pump and a timing control unit to automatically adjust the cleaning frequency based on dust concentration. This self-cleaning smoke sensor includes the following core components:

[0100] Photoelectric smoke detection part: uses 850nm wavelength infrared LED light source and 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 through PWM;

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

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

[0105] The above components work in the following way: When the dust concentration sensor detects that the dust accumulation reaches the set threshold (the default value is 4g / m 3 ), the controller activates a micro-pump, generating a compressed airflow of 0.1 MPa. This is directed through a specially designed nozzle toward the sensitive area of ​​the sensor to remove adhering dust. The entire cleaning process lasts three seconds, during which the sensor briefly enters maintenance mode and does not generate an alarm signal. However, adjacent sensors provide redundant monitoring to ensure there are no blind spots.

[0106] Deploy infrared thermal imaging cameras. Compared with visible light cameras, infrared thermal imaging is not affected by dust and can directly detect thermal anomalies.

[0107] An array of CO / CO2 concentration sensors is installed. These sensors are insensitive to dust interference and can detect characteristic changes in gas concentration during a fire. The sensors are installed 1.5 meters above the ground, consistent with human breathing height, to improve detection sensitivity.

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

[0109] The above three types of sensing equipment form a complementary monitoring network, which jointly overcomes the dust interference problem in the tunnel construction environment and ensures the accuracy and reliability of fire warning.

[0110] Step 102: Building 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 uses the following solution to build a stable and reliable data transmission network:

[0112] The physical layer uses LoRa technology with an operating frequency of 433MHz, which has the characteristics of strong wall penetration, long transmission distance and low power consumption;

[0113] The link layer uses a TDMA (time division multiple access) based protocol;

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

[0115] Node deployment interval: backbone nodes are deployed every 500 meters. 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 entire network communication;

[0117] Communication security: AES-128 encryption algorithm is used to protect data transmission security and dynamic key updates are supported;

[0118] This network is more suitable for 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 takes into account both coverage and transmission reliability.

[0119] Node devices use dynamic power management technology to automatically adjust 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 high-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 is the total power consumption of the node; P base is the basic power consumption; P sensing is the power consumption of single sensing; f sensing is the sampling frequency; P comm is the power consumption of a single communication; f comm is the 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, using low-power mode to extend battery life when the risk is low, and switching to high-frequency mode to ensure monitoring effect when the risk is high.

[0123] Dynamic power management is implemented by the node's microcontroller and is based on the following three levels of operation:

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

[0125] Alarm mode: sampling frequency 1 / 20Hz, communication frequency 1 / 60Hz, used when an abnormality occurs but a fire is not confirmed;

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

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

[0128] The sensor node automatically switches its working mode by calculating the risk level of the environment locally. The risk level calculation formula is as follows:

[0129]

[0130] Where: R local is the locally calculated risk level, ranging from [0,1]; T now is the current temperature reading; T baseline is the temperature reference value, which is usually the normal operating temperature of the location and is determined based on historical data; T threshold The temperature threshold indicates a clear abnormal temperature and is usually set to the reference value + 15°C. now is the current smoke concentration reading, obtained from the smoke sensor; S baseline is the smoke concentration baseline value, indicating the background value under normal conditions; S threshold is the smoke concentration threshold, indicating a clear abnormal concentration; G now is the current gas concentration reading, obtained from the gas sensor; G baseline is the gas concentration reference value, indicating the background value under normal conditions; G threshold is the gas concentration threshold, indicating a clear abnormal concentration;

[0131] w T 、w S 、w G : The first, second and third risk level parameter weights, satisfying w T +w S+w G =1, adjust according to sensor type and installation position;

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

[0133] When R local When <0.3, low power consumption mode is adopted;

[0134] When 0.3≤R local When the value is less than 0.7, the warning mode is adopted;

[0135] When R local When ≥0.7, emergency mode is adopted.

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

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

[0138] This step preprocesses and extracts features from the collected multimodal data, which is a key step in converting raw sensor data into discriminative features. The types of data that need to be processed include temperature time series data, gas concentration data, infrared thermal images, etc., and the noise characteristics and information structure of these types of data vary greatly. Through targeted preprocessing and feature extraction methods, the recognition performance of subsequent models can be effectively improved. Specifically, it includes the following sub-steps:

[0139] Step 201: sensor data denoising and normalization;

[0140] For temperature sensor data, wavelet transform is used to remove high-frequency noise while preserving the temperature 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 is the original temperature data sequence, which is the noisy time series data directly collected by the sensor; 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 processed wavelet coefficients into time series data; Θ threshold is a threshold operator used to remove noise coefficient; X denoised is the denoised temperature series;

[0143] Represents the threshold operation, which processes the wavelet coefficients.

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

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

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

[0147] 3. Keep the low-frequency approximation coefficients unchanged, combine them with the processed high-frequency detail coefficients for wavelet reconstruction, and obtain the denoised temperature series.

[0148] This wavelet transform-based denoising method is suitable for temperature data because temperature changes during a fire usually show low-frequency trends, while sensor noise and environmental interference are mostly high-frequency components.

[0149] Standardize various sensor data to eliminate dimensional differences.

[0150] Step 202, infrared image feature extraction;

[0151] Preprocess the infrared thermal imaging image, including noise removal, geometric correction and temperature calibration. The specific implementation method is as follows:

[0152] Noise Removal: Applying the non-local means (NLM) filtering algorithm to preserve image edges and details while effectively suppressing thermal noise;

[0153] Geometric correction: Perform perspective transformation based on camera calibration parameters to eliminate geometric deformation caused by lens distortion and installation angle;

[0154] Temperature calibration: Use a blackbody radiation source to regularly calibrate the camera to establish a mapping relationship between pixel grayscale value and actual temperature to ensure temperature measurement accuracy.

[0155] Image preprocessing adopts a pipeline architecture and utilizes the GPU resources of the edge server for acceleration.

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

[0157]

[0158] Among them: P(class i|object) is the conditional probability that the target belongs to the i-th class, indicating 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, indicating the confidence that the detection box contains the actual target; It is the intersection-over-union ratio of the predicted bounding box and the true bounding box, which measures the positioning accuracy; threshold is the image detection confidence threshold, which is used to determine whether there are fire features in the thermal image and is dynamically adjusted according to different environments.

[0159] Features of the improved YOLOv5-Fire model include:

[0160] Infrastructure: YOLOv5s is used as the basic network, with a parameter count of approximately 7.2M, suitable for edge deployment;

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

[0162] Feature fusion: The FPN (Feature Pyramid Network) + PAN (Path Aggregation Network) structure is used to achieve multi-scale feature fusion, improving the detection capability of fire sources of different sizes;

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

[0164] Lightweight design: Through channel pruning and weight quantization, the model computation complexity is reduced, achieving 30fps real-time inference on edge devices.

[0165] The output of this formula is a comprehensive score of the effectiveness of the 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 strategies are used to dynamically adjust the confidence threshold of image feature detection:

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

[0168] At night or in low light conditions, threshold = 0.5;

[0169] For high-risk operations such as welding, threshold = 0.7;

[0170] By adjusting the confidence threshold of 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] Extract the spatiotemporal characteristics of the thermal anomaly area, including the regional area change rate, the change in the position of the highest temperature point, the temperature gradient, etc. The regional growth rate calculation formula is as follows:

[0172]

[0173] Where: R growth is the growth rate of the thermal anomaly area, indicating the expansion speed of the thermal anomaly area; A t A is the area of ​​the thermal anomaly region at time t (number of pixels), and the size of the thermal anomaly region detected at the current moment; t-Δt is the area of ​​the thermal anomaly region at time t-Δt (number of pixels), which is the size of the thermal anomaly region at the previous moment; Δt is the time interval, which is the time difference between the two observations.

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

[0175] Maximum temperature point trajectory: tracks the position change of the highest temperature point in the image to reflect the movement of the heat source;

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

[0177] Shape features: Extract shape parameters such as the perimeter, area ratio, and aspect ratio of thermal anomaly areas to assist in identifying fire patterns;

[0178] Texture features: Gray-level co-occurrence matrix (GLCM) is used to extract texture features of thermal images, such as energy, entropy, contrast, etc.

[0179] Time series mode: Apply sliding windows to extract the change patterns of hot spots in the time dimension, such as oscillation frequency and trend.

[0180] Step 203: multimodal feature fusion;

[0181] The sensor data features and image features are temporally aligned and fused to construct a multidimensional feature vector. Since different modal data have different acquisition frequencies, information densities, and representation methods, effectively fusing these heterogeneous data is key to improving warning accuracy. This fusion uses a weighted fusion method based on the attention mechanism, as shown in the following formula:

[0182]

[0183] Among them: F fused is the fused feature vector, which is the final output of multimodal data fusion; F i is the characteristic vector of the i-th mode, including temperature characteristics, gas concentration characteristics, image characteristics, etc.; α iis the weight coefficient of the i-th modality, which is learned through the attention network and reflects the importance of different modalities in the current context; n modal is the number of characteristic modes, including three main modes: temperature, gas concentration, and thermal image;

[0184] This formula implements adaptive weighted fusion. Unlike simple feature concatenation or averaging, it can dynamically adjust the importance weight of each modality according to different scenarios. fused It is the core input of risk assessment and directly affects the accuracy of early warning decisions.

[0185] The weight coefficient is calculated by the following formula:

[0186]

[0187] Where: W i and b i is the parameter of the attention network, which is obtained through training and learning, and reflects the model's understanding of the importance of different modalities; represents the inner product operation, which is used to calculate the correlation between the eigenvector and the weight matrix; exp represents the exponential function, that is, e x ;

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

[0189] In some embodiments of the present invention, in an environment with high dust concentration, the weight of the smoke sensor feature will be reduced and the weight of the thermal image feature will be increased; in the welding operation area, the weight of the gas sensor feature will be increased because the change in CO / CO2 concentration is a key indicator for distinguishing normal welding from abnormal fire; in different areas of the tunnel, such as the entrance, middle and construction surface, different weight configurations will be used to adapt to the environmental characteristics of each area.

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

[0191] Time synchronization: Different modal data have different acquisition frequencies and need to be aligned through time windows and interpolation methods;

[0192] Feature normalization: Unify the features of different modalities to the same numerical range and distribution to prevent one modality from dominating the fusion results;

[0193] Attention network: It is implemented using a two-layer fully connected network, with the input being the features of each modality and the output being the corresponding weight coefficients;

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

[0195] Through this multimodal fusion method based on the attention mechanism, we can fully utilize the complementary advantages of various data sources and significantly improve the accuracy and robustness of fire warnings, especially in complex construction environments.

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

[0197] This step builds a tunnel fire warning model suitable for the tunnel construction environment to accurately identify fire risks. It includes the following sub-steps:

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

[0199] This tunnel fire warning model needs to address challenges unique to tunnel construction environments, including data imbalance (few fire samples), a complex and changing environment, and numerous interference factors. Using deep learning technology, it automatically learns fire characteristics from multimodal data and provides accurate warnings in complex environments. The specific implementation is as follows:

[0200] The model architecture design adopts the TCNN (Transposed Convolutional Neural Network) architecture, which realizes spatiotemporal feature extraction and fire risk prediction through an encoding-decoding structure:

[0201] Input layer design:

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

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

[0204] Encoder module:

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

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

[0207] Attention enhancement: Integrate time and channel attention mechanisms to highlight key time points and feature dimensions;

[0208] Decoder (spatial prediction) module:

[0209] Transposed Convolutional Network Design: Constructing a decoder using multiple layers of transposed convolutions;

[0210] Time dimension reconstruction: gradually restore the time resolution through transposed convolution and predict future states;

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

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

[0213] Multi-task output layer design:

[0214] Fire risk score: Outputs a fire risk score between 0 and 1 for subsequent dynamic threshold judgment;

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

[0216] Development trend prediction: Fire development path and speed, a vector whose components represent the growth rate, spread speed, main direction, probability distribution of each stage of the fire, and expected 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-to-high rate (0.6), spreading at a medium-to-slow rate (0.4), mainly expanding to the east (0.25), with a 5% probability of being in the latent stage, an 80% probability of being in the growth stage, a 15% probability of being in the peak stage, and a 0% probability of being in the decline stage. It 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 ranges from [0 to 1], representing a normalized value of the fire spread rate; 0 represents no growth; 0.5 represents a moderate growth rate (about 5% area / minute); 1 represents an extremely fast growth rate (about 15% area / minute or more);

[0219] Spread speed: range [0,1], indicating the rate at which the fire spreads in space; 0 means almost no fire; 0.5 means medium speed (about 0.5 m / min); 1 means high speed (about 2 m / min or more);

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

[0221] Estimated danger time: range [0,1], representing the normalized time prediction; 0 means the danger threshold has been reached; 0.5 means the danger threshold is expected to be reached in a medium time (about 5 minutes); 1 means the danger threshold will not be reached in the short term (≥15 minutes).

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

[0223] Based on the environmental characteristics of different construction stages, an adaptive dynamic threshold algorithm is designed. The calculated dynamic threshold is used to determine whether a fire has occurred. The dynamic threshold calculation formula 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] Where: T threshold (t) is the dynamic threshold at time t (0-1); w base 、w env 、w act 、w trd are the first, second, third and fourth dynamic threshold adjustment coefficients; T base is the basic threshold, determined by historical data statistics; ΔT env (t) is the environmental factor adjustment item at time t, which is related to the ambient temperature and humidity; ΔT act (t) is the construction activity adjustment item at time t, which is related to the current construction type; ΔT trd (t) is the trend adjustment item at time t, which is related to the trend of historical data.

[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] Where: T ambient (t) is the ambient temperature at time t; T ref is the reference temperature (normal temperature 20℃); H ambient (t) is the ambient humidity at time t; H ref is the reference humidity (normal 50%); α1, α2 are the adjustment weight coefficients of the first and second environmental factors, and their default values ​​are 0.8 and 0.2 respectively.

[0229] Calculation method for construction activity adjustments:

[0230]

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

[0232] Trend adjustment calculation method:

[0233]

[0234] in: is the temperature change rate; Δt is the time window width; β1 is the adjustment coefficient, which controls the intensity of 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 represents the environmental characteristics at time t (temperature, humidity, dust concentration, etc.), P t represents the historical performance indicators (accuracy, false alarm rate, etc.) at time t, D t Represents the detection data features at time t, A t Indicates the activity type code at time t, T seq represents a time series set, s t represents the state at time t, and S represents the state space.

[0240] Action Space:

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

[0242] Where ΔT base Indicates the adjustment amount of the basic threshold, Δβ time , Δβlocation , Δβ activity Respectively represent the adjustment amount of time factor, position factor, and activity factor, a t represents the action taken at time t, and A represents the action space.

[0243] Reward function: Defined based on the performance 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 Early Warning Accuracy:

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

[0248] Where: TP is the number of true positives, i.e., actual fire events that were successfully warned; FP is the number of false positives, i.e., false alarm events; FN is the number of false negatives, i.e., missed alarm events; R accuracy Reward for warning accuracy; α TP , α FP , α FN are the first, second, and third prediction accuracy weight coefficients, with default values ​​set to 2.0, 1.0, and 3.0, reflecting that missed reports are more serious than false positives;

[0249] Reward for timely warning:

[0250]

[0251] Where: T advance,i is the lead time of the i-th successful warning event (minutes); T ref is the reference time (set to 10 minutes); β2 is the time reward coefficient, with a default value of 0.5; TP is the true positive set, which includes all fire events that are successfully warned; R timeliness Rewards for timely warnings;

[0252] System cost penalty:

[0253]

[0254] Where: |at | is the amplitude of the action to prevent the parameters from fluctuating violently; I(a t,i ≠a t-1,i ) is an indicator function, which is 1 when the parameter changes and 0 otherwise; γ1, γ2 are the first and second system cost penalty coefficients, with default values ​​of 0.1 and 0.05; n a is the dimension of the action space, that is, the number of threshold parameters; I( ) is the indicator function, which takes the value 1 when the condition in the brackets is true, otherwise it is 0; R cost Penalty for system costs;

[0255] Dynamic threshold parameter optimization uses deep Q network (DQN) combined with priority experience replay technology to implement reinforcement learning algorithm.

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

[0257] Compared with the traditional fixed threshold method, the dynamic threshold mechanism based on reinforcement learning can automatically find the optimal dynamic threshold parameter combination under different construction stages and environmental conditions, realize adaptive intelligent adjustment, and greatly improve the ability of the tunnel fire warning system to cope with complex and changing construction environments.

[0258] Step 303, performing fire dynamics numerical simulation based on FDS;

[0259] This step uses FDS (Fire Dynamics Simulator) software to build a target tunnel model, perform fire dynamics numerical simulation, obtain simulated fire temperature data and smoke images, and construct a fire dataset to serve as training data for the tunnel fire warning model in step 301. The specific implementation is as follows:

[0260] Tunnel physical model construction:

[0261] Geometric modeling: Construct a 3D model based on the actual tunnel geometry (cross-sectional shape, length, curvature, etc.);

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

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

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

[0265] Fire scene design:

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

[0267] Change of fire source location: setting fire sources at different locations of the tunnel (entrance section, middle section, exit section, bend, etc.);

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

[0269] Changes in ventilation conditions: Simulate 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 is selected as the combustion model. This model is suitable for diffusion flames in tunnel fires. It describes the mixing and reaction process of fuel and oxygen by solving the transport equation of the mixture fraction. In terms of heat release rate (HRR), the heat release method is adopted. The specific setting is the HRRPUA parameter (heat release rate per unit area), with a typical value range of 500-2500kW / m 2 , adjusted according to different combustion materials;

[0272] Turbulence model: Considering the balance between computational efficiency and accuracy, large eddy simulation (LES) was selected as the turbulence model, and the Smagorinsky constant was set to 0.2. The LES model is suitable for simulating smoke flow in large-scale spaces such as tunnels. It can accurately capture the large-scale motion characteristics of smoke, while the computational resource requirements are relatively acceptable. A grid encryption strategy is used for local key areas (such as near the fire source) to improve the simulation accuracy of small-scale turbulent motion. When using the DNS model for comparative verification in specific cases, the grid size is reduced to 1-2 cm to ensure that the smallest turbulent scale can be directly simulated;

[0273] Radiation model: The finite volume method (FVM) is used to implement the radiation heat transfer model. This model strikes a good balance between computational efficiency and accuracy, making it suitable for simulating radiation heat transfer in narrow spaces such as tunnels. The radiation absorption coefficient is slightly higher than that of standard air, taking into account the influence of dust and water vapor in the tunnel construction environment, and is set to 0.5.

[0274] Computational stability control: Set the initial time step to 0.02 seconds; use the L2 norm to calculate the CFL number; and set a lower limit of 0.4 to limit the time step size in areas with large temperature gradients. FDS automatically adjusts the time step size for each calculation based on the CFL condition (Courant-Friedrichs-Lévy condition) to ensure computational stability without manual intervention.

[0275] Virtual arrangement of sensors:

[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, with a spacing of 6-10m and a height 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 the temperature field distribution;

[0280] Fire simulation data collection:

[0281] Time series data collection: record the temperature, gas concentration and other data of each sensor point at 1 second intervals;

[0282] Full field data export: export complete temperature field, smoke distribution field and other three-dimensional data every 30 seconds;

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

[0284] Visual data: Generate visualization results such as temperature cloud map, smoke diffusion map, velocity vector map, etc.

[0285] Fire dataset construction:

[0286] Data cleaning: remove outliers and handle data gaps;

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

[0288] Time series segmentation: Split the data into 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 enhancement: Expand the number of samples by adding noise, time shifting, feature combination, etc.

[0291] Simulation results verification:

[0292] Grid sensitivity analysis: Determine the appropriate grid density by comparing the calculation results of different grid densities;

[0293] Comparison with empirical formulas: Compare and verify with mature empirical formulas for fire development;

[0294] Small-scale experimental verification: comparison with laboratory small-scale fire test results;

[0295] Case review: try to reproduce existing tunnel fire cases to verify the accuracy of the simulation;

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

[0297] Step 304: model training and optimization;

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

[0299] The specific implementation is as follows:

[0300] Multi-task learning loss function design:

[0301]

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

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

[0304] Fire risk score branch loss function:

[0305]

[0306] Where: L risk is the fire risk score branch loss function; N is the number of samples; r i is the true risk score, ranging from [0, 1], obtained by annotating the training data; is the predicted risk score, ranging from [0,1], the risk score output by the tunnel fire warning model; i is the sample label, 1 represents a fire sample, and 0 represents a non-fire sample; BCE( ) is the binary cross entropy function; α3 is the weight coefficient of the non-fire sample, with a default value of 0.5, which is used to balance positive and negative samples.

[0307] The fire risk score loss uses weighted binary cross entropy, taking into account both the accuracy of the prediction score and the ability to distinguish between fire and non-fire samples. Due to the scarcity of fire samples, the tunnel fire warning model places greater importance on the prediction accuracy of fire samples, thus assigning a higher weight to fire samples.

[0308] Fire type recognition branch loss function:

[0309]

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

[0311]

[0312] where N j is the number of samples of category j; γ3: focusing parameter, the default value is 0.25, which adjusts the loss contribution of easy / hard-to-classify samples; ξ ij : misclassification indicator, when the prediction is correct (p ij >0.5 and y ij =1), otherwise it is 0.

[0313] The fire type identification loss adopts the improved FocalLoss. The improvement is to add the category weight term β j and more flexible focus items The function of the focus 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, which makes the model pay more attention to difficult samples. This improvement can better handle the problem of multi-class imbalance and pay attention to difficult 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 is the branch loss function for development trend prediction; L growth The loss is predicted for the growth rate, which measures the accuracy of the fire growth rate prediction; L speed Predict the loss for the spread speed and evaluate the accuracy of the fire spread speed prediction; L dir Predict the direction of loss and ensure the accuracy of the prediction of the main direction of fire development; phase Predict losses for each fire stage and measure the accuracy of probability distribution prediction for each fire stage; L time Predicting losses at the critical time, penalizing delayed warnings, and encouraging accurate prediction of the time when a fire reaches a critical stage; g ,λ s ,λ d ,λ p ,λ t : The first, second, third, fourth, and fifth development trend prediction balance coefficients are 0.2, 0.2, 0.2, 0.2, 0.2, and 0.2 by default respectively. They are dynamically adjusted based on the performance on the validation set, and the Bayesian optimization method is used to search for the optimal value combination in the range of [0.1, 0.5].

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

[0318] Growth rate forecast loss:

[0319]

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

[0321] The mean square error (MSE) is used to calculate the growth rate forecast error, which can effectively measure the difference between the predicted value and the true value;

[0322] Spread speed predicts losses:

[0323]

[0324] Among them: speed is the prediction loss of spreading speed; N is the number of samples in the training batch; s i is the actual fire spread speed of sample i, derived from FDS simulation data; is the fire spread speed of sample i predicted by the tunnel fire early warning model;

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

[0326] Direction prediction loss:

[0327]

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

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

[0330] Predicted losses by fire stage:

[0331]

[0332] Where: L phase is the fire stage prediction loss; N is the number of samples in the training batch; P is the number of fire stages, which are divided into 4 stages: latent stage, growth stage, heyday stage and decay stage; q ij is the true probability distribution of sample i in fire stage j, derived from the FDS simulation data annotation; is the probability of sample i being in fire stage j predicted by the tunnel fire early warning model;

[0333] The cross entropy loss function is used, which is suitable for multi-category probability distribution prediction and can effectively measure the difference between the predicted distribution and the true distribution.

[0334] Dangerous time prediction loss:

[0335]

[0336] Where: L time is the risk time prediction loss; N is the number of samples in the training batch; t i is the actual time when sample i reaches the dangerous stage, determined by FDS simulation data, and is defined as the time point when the fire reaches the peak stage; The time when sample i reaches the dangerous stage predicted by the tunnel fire early warning model; ω i is the time error weight, and the calculation formula is:

[0337]

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

[0339] The 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 the mean square error.

[0340] Through the above carefully designed multi-task loss function system, the tunnel fire warning model can simultaneously optimize the three tasks of fire risk scoring, fire type identification, and fire development trend prediction, giving full play to the advantages of multi-task learning and improving the overall performance and generalization ability of the model.

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

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

[0343] This step designs a multi-level early warning 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 a fire risk score based on the tunnel fire warning model and compare it with a dynamic threshold;

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

[0346] Step 402: Risk level classification;

[0347] Based on the laws of fire development and tunnel construction safety requirements, fire risks are 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] Risk levels are divided into continuous numerical values ​​ranging from 0 to 1, rather than simple discrete levels. This enables the tunnel fire warning system to achieve more refined risk assessment and smooth transition. The formula for calculating the comprehensive risk score for the 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 is the comprehensive risk score (0-1); W F 、W T 、W S 、W P 、W L are the first, second, third, fourth and fifth comprehensive risk score weights, with default values ​​of 0.2, 0.3, 0.3, 0.1 and 0.1 respectively; R F is the fire risk score (0-1) output by the tunnel fire early warning model; R T R is the risk score of temperature anomaly (0-1); S Score the smoke characteristic risk (0-1); R P Score the risk of personnel density (0-1); R L Score the tunnel area characteristic risk (0-1);

[0351] The calculation method for each sub-item risk score is as follows:

[0352] Temperature anomaly risk score: Assess the degree of temperature anomaly based on temperature sensor data. The calculation formula is:

[0353]

[0354] Where: RT Score the temperature anomaly risk; T max is the maximum temperature in the current monitoring area; T baseline is the current ambient reference temperature, obtained through historical data statistics; T threshold is the temperature anomaly threshold, the default value is 50℃, which can be adjusted according to the characteristics of the tunnel area; r T is the temperature rise rate, the rate of temperature change within a short time window; r threshold is the temperature rise rate threshold, the default value is 5℃ / min; K T is the trade-off factor, the default value is 0.6;

[0355] The temperature anomaly risk score not only considers the absolute temperature value, but also emphasizes the trend of temperature change. For example, even if the absolute temperature is not high, if the temperature rises rapidly, a higher risk score will be given.

[0356] Smoke characteristic risk score: Taking into account the smoke concentration, gas composition and thermal image characteristics, the calculation formula is:

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

[0358] Where: R S Score the smoke characteristic risk; W CO ,W smoke ,w IR are the risk score weights for the first, second, and third smoke characteristics, with default values ​​of 0.4, 0.3, and 0.3; R CO CO / CO2 concentration risk score, calculated based on the relative threshold and change rate of gas concentration; R smoke Smoke optical concentration risk score, calculated based on the data of photoelectric smoke sensor; R IR Scoring of infrared thermal imaging smoke features and smoke recognition results of tunnel fire warning models on thermal images;

[0359] The smoke signature risk score improves fire smoke identification by integrating multiple sensing methods. The score specifically focuses on changes in gas composition, as CO / CO2 concentration changes are crucial for distinguishing fire smoke from construction dust.

[0360] Population density risk score: Based on the number and distribution of people in the current area, the calculation formula is:

[0361]

[0362] Where: RP Score the risk of human density; n person To monitor the number of people in the area, obtain the information through Wi-Fi detection, personnel location tags or AI video analysis; threshold The default value is 10 people / 100m 2 , adjusted according to the tunnel cross-sectional area; α cluster is the aggregation influence coefficient, with a default value of 0.5, indicating the amplification effect of personnel gathering on risk; C factor is the personnel aggregation factor, which measures the concentration of personnel distribution and has a value range of 0-1;

[0363] The occupant density risk score reflects the number of objects exposed to fire risk and their vulnerability. As the number of people in an area increases, the potential for damage from a fire also increases. High concentrations of people increase the difficulty of evacuation and further increase the risk. In practice, tunnel fire early warning systems use wireless signal strength analysis, Bluetooth beacon positioning, or AI video analysis to obtain occupant distribution information and dynamically calculate risk scores.

[0364] Tunnel area characteristic risk score: Considering the inherent characteristics of the tunnel structure, ventilation conditions, evacuation difficulty, etc., the calculation formula is:

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

[0366] Where: R L Score the tunnel area characteristic risk; w vent , w exit , w material is the risk scoring weight of the first, second and third tunnel areas, with default values ​​of 0.4, 0.4 and 0.2 respectively; R vent Score ventilation conditions and evaluate regional ventilation effectiveness; R exit Score the evacuation route, taking into account the distance and patency of the nearest safe exit; R material Score surrounding material risk and assess the amount and type of combustibles in the area;

[0367] The tunnel area-specific risk score reflects the inherent risk differences between different tunnel areas. This score is determined through a professional assessment during the initial deployment of the tunnel fire early warning system and is regularly updated based on construction progress and environmental changes.

[0368] The output of the comprehensive risk scoring system R totalDirectly determines the warning level and triggers corresponding response measures. The tunnel fire warning system calculates R every 1 second. total When the calculated value exceeds the level threshold three times in a row, an early warning response of the corresponding level is triggered. To avoid frequent level fluctuations, the tunnel fire early warning system implements a state hysteresis mechanism: the upgrade condition is more sensitive (exceeding the level threshold three times will result in an upgrade), while the downgrade condition is more conservative (downgrade only occurs after falling below the level threshold 10 times in a row).

[0369] Step 403: hierarchical response strategy;

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

[0371] Design corresponding response strategies for different risk levels. The specific response strategies are as follows:

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

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

[0374] Send an alert message to the on-site safety supervisor and area manager, including the location of the suspicious area, the type of anomaly, and preliminary assessment results;

[0375] The management terminal displays a yellow prompt to mark the abnormal area;

[0376] The on-site LED status indicator turns yellow and flashes slowly, but no sound alarm is emitted;

[0377] Abnormal situations are recorded in the tunnel fire warning system log and a mandatory reminder is issued during team 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 managers and safety managers until the fire risk level returns to normal;

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

[0382] Start the on-site warning light (orange fast flashing) and voice prompt;

[0383] Report early warning information to the external supervision platform to alert fire rescue;

[0384] Broadcast warning information through construction intercom until the normal level is restored;

[0385] Adjust ventilation direction and wind speed to optimize airflow organization and prevent smoke from spreading;

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

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

[0388] Emergency level (0.75-1.0) response strategy:

[0389] All nodes enter emergency mode and continue monitoring at the highest frequency;

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

[0391] Send emergency evacuation instructions to all construction workers;

[0392] Continuously broadcast evacuation instructions through emergency broadcasts;

[0393] Continuously send automatic alarm and warning information to external rescue agencies until the fire risk level returns to normal;

[0394] Send emergency notifications to all management and security personnel to activate the emergency command system;

[0395] Start emergency lighting and activate LED indicators in all evacuation routes;

[0396] Automatically cut off power supply to high-risk areas to reduce the risk of electrical fire and electric shock;

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

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

[0399] The above describes an embodiment of the present invention, but this embodiment is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Ordinary technicians in this field can also make more forms of equivalent embodiments based on the inspiration of this embodiment, all of which are protected by this embodiment.

Claims

1. A tunnel fire early warning method based on deep learning, characterized in that: The following steps are involved: Deploy sensors and build low-power wireless transmission networks to acquire multimodal data; Perform data preprocessing, feature extraction and feature fusion on the acquired multimodal data; Build a tunnel fire warning model that adapts to the construction environment and design a dynamic threshold mechanism; Design a multi-level early warning response mechanism and issue early warnings.

2. A tunnel fire early warning method based on deep learning according to claim 1, characterized in that: The deployed sensors include a photoelectric smoke sensor with a self-cleaning function, which includes the following core components: Photoelectric smoke detection part: uses 850nm wavelength infrared LED light source and 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 through 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 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; the power consumption control formula of the node device is as follows: p total =P base +P sensing =f sensing +P comm ×f comm ; Where: P total is the total power consumption of the node; P base is the basic power consumption; P sensing is the power consumption of single sensing; f ensing is the sampling frequency; P comm is the power consumption of a single communication; f comm is the communication frequency.

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

5. The tunnel fire early warning method based on deep learning according to claim 4 is characterized in that: The feature extraction includes using the improved YOLOv5-Fire model to extract the features of the thermal anomaly area, and adding an attention mechanism to enhance the detection capability of small target thermal anomalies. The convolution block attention module is added to the backbone network. The thermal anomaly target detection formula is as follows: Among them: P(class i |object) is the conditional probability that the target belongs to the i-th class, indicating 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, indicating the confidence that the detection box contains the actual target; is the intersection-over-union ratio of the predicted bounding box and the true bounding box, which measures the positioning accuracy; threshold is the image detection confidence threshold, which is used to determine whether there are fire features in the thermal image; The confidence threshold for image feature detection 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 confidence threshold for image feature detection adopts the following strategies: Under normal construction conditions, threshold = 0.6; At night or in low light conditions, threshold = 0.5; 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 tunnel fire warning model described above designs 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 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, a vector, the components of which represent the growth rate, spread speed, main direction, probability distribution of each stage of the fire, and expected danger time.

7. The tunnel fire early warning method based on deep learning according to claim 6, characterized in that: The fire risk score is used to initially determine whether a fire has occurred. The determination method is to compare it with the 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: T threshold (t)=w base T base +w env ΔT env (t)+w act ΔT act (t)+w trd ΔT trd (t); Where: T threshold (t) is the dynamic threshold at time t; w base 、w env 、w act 、w trd are the first, second, third and fourth dynamic threshold adjustment coefficients; T base is the basic threshold, determined by historical data statistics; ΔT env (t) is the environmental factor adjustment item at time t; ΔT act (t) is the construction activity adjustment item at time t; ΔT trd (t) is the trend adjustment term at time t; Calculation method for environmental factor adjustment items: ΔT env (t)=α1·(T ambient (t)-T ref )+α2·(H ambient (t)-H ref ); Where: T ambient (t) is the ambient temperature at time t; T ref is the reference temperature; H ambient (t) is t Ambient humidity at the moment; H ref is the reference humidity; α1, α2 are the adjustment weight coefficients of the first and second environmental factors; Calculation method for construction activity adjustments: Among them: A i (t) is the indicator function of the i-th construction activity; w i is the weight coefficient of the i-th construction activity; n act is the total number of types of construction activities; Calculation method of trend adjustment item: in: is the temperature change rate; Δt is the time window width; β1 is the adjustment coefficient, which controls the intensity of trend influence.

8. The tunnel fire early warning method based on deep learning according to claim 7 is characterized in that: The dynamic threshold parameter optimization uses a deep Q network combined with priority experience replay technology to implement a reinforcement learning algorithm: The dynamic threshold adjustment problem is modeled as a reinforcement learning framework, which can continuously optimize the dynamic threshold parameters by interacting with the environment. The specific implementation is as follows: Reinforcement learning problem modeling: State Space: S={s t =[E t ,P t ,D t ,A t ]|t∈T seq }; Among them, E t represents the environmental characteristics at time t, P t represents the historical performance index at time t, D t Represents the detection data features at time t, A t Indicates the activity type code at time t, T seq represents a time series set, s t represents the state at time t, and S represents the state space; Action Space: A={a t =[ΔT base ,Db time ,Db location ,Db activity ]|t∈T seq }; Where, ΔT base Indicates the adjustment amount of the basic threshold, Δβ time , Δβ location , Δβ activity Respectively represent the adjustment amount of time factor, position factor, and activity factor, a t represents the action taken at time t, and A represents the action space; Reward function: Defined based on the performance of the early warning system: R(s t ,a t ,t s+1 )=w1·R accruacy +w2·R timeliness -w3·R cost ; R(s t , a t , s t+1 ) represents the reward function, which consists of three parts: Rewards for Early Warning Accuracy: R accuracy =a TP ·TP-a FP ·FP-a FN ·FN; Where: TP is the number of true positives, i.e., actual fire events that were successfully warned; FP is the number of false positives, i.e., false alarm events; FN is the number of false negatives, i.e., missed alarm events; R accuracy rewards for early warning accuracy; α TP , α FP , α FN : weight coefficients of the first, second and third prediction accuracy; Reward for timely warning: Where: T davance,i is the lead time of the i-th successful warning event; T ref is the reference time; β2 is the time reward coefficient; TP is the true positive set, which includes all fire events that are successfully warned; R timeliness Rewards for timely warnings; System cost penalty: Where: |a t | is the amplitude of the action to prevent the parameters from fluctuating violently; I(a t,i ≠a t-1,i ) is an indicator function, which is 1 when the parameter changes and 0 otherwise; γ1, γ2 are the first and second system cost penalty coefficients; n a is the dimension of the action space, that is, the number of threshold parameters; I( ) is the indicator function, which takes the value 1 when the condition in the brackets is true, otherwise it is 0; R cost Penalty for system costs.

9. The tunnel fire early warning method based on deep learning according to claim 8, characterized in that: The fire data set required for the training of the tunnel fire warning model is constructed by using FDS software to establish a target tunnel model, perform fire dynamics numerical simulation, obtain simulated fire temperature data and smoke images, and thus construct a fire data set.

10. A tunnel fire warning system based on deep learning, characterized in that: It is used to execute the tunnel fire early warning method based on deep learning according to any one of claims 1 to 9, 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 environments, and achieves reliable data transmission; Data preprocessing and feature extraction module: responsible for converting raw sensor data into discriminative feature representations; Tunnel fire warning model module: built based on deep learning technology and adopting TCNN architecture, it is the core decision-making unit of the system; Dynamic threshold mechanism module: uses 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 emergency measures of corresponding levels based on the risk scores 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

  • Urban area-level pipe gallery monitoring system based on distributed temperature measurement optical fibers and base stations

    CN120043575A

  • Fire detector

    JP2004152134A

  • Protecting trolley and construction method of rock burst prewarning protection system in non-contact tunnel construction

    US20220136391A1

Cited By

  • Intelligent identification method and system for initial fire type of kitchen

    CN120808094A

  • Smoke detection method based on deep learning

    CN120997775A

  • Smoke detection method based on deep learning

    CN120997775B

  • Tunnel fire early warning method and system suitable for high altitude and low oxygen

    CN121281188A

  • Fire detection system and method based on pulse neural network

    CN121459244A