Distributed optical fiber temperature-sensitive fire detection algorithm based on CNN-LSTM and attention mechanism

The distributed fiber optic fire detection algorithm based on CNN-LSTM and attention mechanism solves the problems of high false alarm rate, delayed response and poor scene adaptability of traditional fiber optic detectors, and realizes efficient and accurate fire identification and self-adaptation capabilities, which is suitable for scenarios such as tunnels and substations.

CN120808505APending Publication Date: 2025-10-17XUZHOU NORMAL UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511071074.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing distributed fiber optic fire detection technology is susceptible to false alarms caused by ambient temperature fluctuations, cannot identify the dynamic characteristics of temperature anomalies, has poor adaptability, and the combination of deep learning algorithms and distributed fiber optics is not yet mature.

Method used

A distributed fiber-optic temperature-sensing fire detection algorithm based on CNN-LSTM and attention mechanism is adopted. Temperature data is collected through distributed fiber-optic sensing units, and Z-Score normalization, db4 wavelet noise reduction and 12-dimensional feature extraction are performed. A CNN-LSTM and attention mechanism framework is constructed, and model training is performed in combination with transfer learning and Focal Loss function to output the fire risk index.

Benefits of technology

Significantly reduce the false alarm rate, improve the accuracy of fire identification, enhance the adaptive ability, and quickly adapt across scenarios. Practice has shown that the false alarm rate is reduced by more than 80%, and the warning of smoldering fires is 25 seconds in advance. It is suitable for complex scenarios such as tunnels and substations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120808505A_ABST
    Figure CN120808505A_ABST
Patent Text Reader

Abstract

The invention discloses a distributed optical fiber temperature-sensitive fire detection algorithm based on CNN-LSTM and an attention mechanism, and aims to solve the problems of high false alarm rate, response lag and poor scene adaptability in the traditional detection technology. According to the system, temperature data are collected through a distributed optical fiber sensing unit at the interval of 2 seconds and the spatial resolution of 0.5 m, after Z-Score standardization, db4 wavelet noise reduction and 12-dimensional feature enhancement preprocessing, the temperature data are input into a CNN-LSTM hybrid model to extract spatial and temporal features, key areas and moments are focused in combination with an attention mechanism, and a fire risk index of 0-100 is output. Model training adopts transfer learning and a Focal Loss function to realize cross-scene rapid adaptation and sample imbalance processing, and parameters are updated through incremental learning every 30 days. Practice shows that compared with a traditional threshold value method, the method has the advantages that the false alarm rate is reduced by more than 80%, smoldering fire early warning is advanced by 25 seconds, and the method can be widely applied to fire safety monitoring of complex scenes such as tunnels, transformer substations and comprehensive pipe galleries.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to a distributed optical fiber temperature sensing fire detection algorithm based on a CNN-LSTM and an attention mechanism, and particularly relates to a distributed optical fiber temperature sensing fire detection algorithm based on a CNN-LSTM and an attention mechanism which improves fire identification accuracy and reduces false alarm rates and enhances the adaptive ability of different scenes by deeply mining the space-time characteristics of temperature data. BACKGROUND

[0002] A distributed optical fiber linear temperature sensing fire detector is a new generation of monitoring equipment relying on optical time domain reflection (OTDR) technology and Raman scattering effect. Its core principle is that when narrow pulse laser is transmitted along the optical fiber, non-elastic collision occurs with the molecules of the optical fiber medium to produce Raman scattering. The light intensity of the anti-Stokes light significantly decreases with the increase of temperature, while the light intensity of the Stokes light is basically not affected by the temperature. The temperature at each point along the optical fiber can be accurately inverted by calculating the light intensity ratio of the two. At the same time, the OTDR technology can accurately associate the temperature information with the spatial position (the positioning accuracy can reach ±0.5 meters) by measuring the transmission time difference of the laser pulse, forming a "temperature-position-time" three-dimensional monitoring matrix. This technical characteristic breaks through the limitations of traditional point or segmented detectors, realizes continuous and blind area-free monitoring of a single optical fiber within a range of 10-20 kilometers, and the optical fiber itself has physical properties such as insulation, anti-electromagnetic interference, and acid and alkali corrosion resistance, and can work stably in extreme environments of -40℃ to 120℃. It has been widely used in tunnels, power cables, comprehensive pipe galleries and other scenes.

[0003] However, the prior art has the following disadvantages:

[0004] 1. It relies on fixed temperature thresholds or simple temperature difference algorithms for fire judgment, which is prone to false alarms caused by environmental temperature fluctuations (such as high summer tunnel temperature and short-time cable overload). Statistics of a certain subway project show that the false alarm rate of traditional systems is as high as 15%.

[0005] 2. It cannot identify the dynamic characteristics of temperature anomalies (such as temperature acceleration changes in the early stage of fire), and the response to slow-burning fires is lagging, with an average early warning delay of more than 30 seconds.

[0006] 3. The temperature distribution characteristics of different application scenarios (such as transformer substations and petrochemical storage tanks) differ significantly, and the system adaptability is poor, requiring manual repeated calibration of threshold parameters.

[0007] Deep learning algorithms have shown significant advantages in processing complex space-time sequence data, and their core capabilities far exceed those of traditional algorithms:

[0008] Adaptive feature extraction capability: Traditional algorithms rely on manually designed features (such as fixed temperature difference, rate of change threshold), while deep learning can automatically mine high-order features through multiple nonlinear transformations. For example, convolutional neural networks (CNN) can extract spatial correlation from temperature distribution data (such as the diffusion pattern of local high-temperature areas), and long short-term memory networks (LSTM) can capture trend features in the time dimension (such as the acceleration of temperature rise), without human intervention to generate feature representations that better fit the nature of fire.

[0009] Complex pattern recognition capability: Fire signals are often masked by environmental noise (such as temperature fluctuations caused by equipment start-stop, external climate interference), showing nonlinear and non-stationary characteristics. Deep learning can distinguish subtle differences between "normal fluctuations" and "fire precursors" through complex mapping relationships formed by massive data training - such as the "slow rise + stepwise temperature rise" pattern of cable joint overheating and the "low rate sustained temperature rise" pattern of smoldering fire, which is easily misjudged by traditional threshold methods.

[0010] Cross-scene generalization capability: Based on the transfer learning framework, deep learning models can transfer fire knowledge from one scene (such as a tunnel) to a new scene (such as an oil and gas storage tank), and adapt to temperature characteristics in different environments through a small amount of scene data fine-tuning. In contrast, traditional algorithms need to redesign features and thresholds for each scene, which is costly and time-consuming.

[0011] Temporal and spatial features of coordinated temperature changes in adjacent areas can effectively distinguish between real fires (with spatial diffusion) and single-point disturbances (such as direct sunlight).

[0012] Dynamic learning and evolution capability: Through incremental learning strategies, deep learning models can continuously absorb data from new scenes and new types of fires, continuously optimizing decision boundaries. In the context of evolving fire types (such as new energy storage device fires), this self-evolution capability enables the algorithm to maintain high recognition accuracy, while traditional algorithms with fixed logic struggle to cope with unknown risks.

[0013] Currently, research on combining deep learning algorithms with distributed optical fiber detection technology is still in its infancy, and a mature algorithm framework has not yet been formed. Therefore, there is an urgent need to develop an intelligent detection algorithm that can deeply mine the temporal and spatial features of temperature data and adapt to complex scenarios to address the inherent shortcomings of traditional technology. SUMMARY

[0014] The technical problem to be solved by the present application is to provide a distributed optical fiber temperature sensing fire detection algorithm based on CNN-LSTM and attention mechanism, which can improve fire recognition accuracy and reduce false alarm rate by deeply mining the temporal and spatial features of temperature data, and enhance the adaptive ability of different scenes.

[0015] To solve the above technical problems, the technical scheme of the present application is: a distributed optical fiber temperature sensing fire detection algorithm based on CNN-LSTM and attention mechanism, which is characterized by the following steps:

[0016] Step S1: data acquisition, acquiring continuous temperature sequence data of the monitoring area through the distributed optical fiber sensing unit, sampling interval 2 seconds, spatial resolution 0.5m;

[0017] Step S2: data preprocessing, converting the temperature data into standardized data with a mean of 0 and a standard deviation of 1 using the Z-Score method, performing 3-layer decomposition using the db4 wavelet basis, applying soft threshold processing to the high-frequency coefficients, and extracting 12-dimensional features;

[0018] Step S3: constructing a CNN-LSTM and attention mechanism framework, including an input adaptation layer, a spatio-temporal feature extraction module, an attention mechanism module, and a risk assessment module;

[0019] The input adaptation layer converts the multi-dimensional features preprocessed in step S2 into a tensor format that meets the network input requirements, achieving data standardization and dimension alignment;

[0020] The spatio-temporal feature extraction module uses a CNN-LSTM hybrid structure, where the CNN layer contains 3 convolutional blocks for extracting spatial temperature distribution features within a 10m range, and the LSTM layer uses a 2-layer bidirectional structure for learning temperature variation trends in the time dimension;

[0021] The attention mechanism module generates a weight matrix through a 1x1 convolution in the spatial attention layer, focusing on temperature abnormal areas; the time attention layer uses Softmax normalization to strengthen the feature weights of temperature mutation moments;

[0022] The risk assessment module outputs a fire risk index of 0-100 through a fully connected layer;

[0023] Step S4: data set construction, containing labeled data with a normal working condition proportion of 70%, an interference working condition proportion of 15%, and a fire working condition proportion of 15%, covering tunnel, cable trench, and storage tank area scenarios;

[0024] Step S5: pre-training phase and fine-tuning phase, the pre-training phase uses the Adam optimizer and the Focal Loss function to solve the sample imbalance problem, with an initial learning rate of 0.001 for the Adam optimizer; the fine-tuning phase freezes the first 50% of the parameters of the base model, and sets the learning rate to 0.0001;

[0025] Step S6: input the preprocessed temperature features into the model to output a real-time risk index; when the risk index is greater than or equal to 61 for 3 consecutive sampling periods, determine that there is a fire and trigger an alarm, otherwise continue monitoring; every 30 days, adopt an incremental learning strategy to absorb new labeled data to update the model parameters and maintain the adaptability of the algorithm.

[0026] Preferably, in step S2, soft threshold processing is applied to the high-frequency coefficients, and the soft threshold processing formula is

[0027]

[0028] In the formula, w is the wavelet coefficient, and λ is the adaptive threshold.

[0029] In step S2, the adaptive threshold of wavelet denoising in data preprocessing is:

[0030]

[0031] In the formula, N is the data length.

[0032] Preferably, in step S2, 12-dimensional feature extraction is performed by calculating the instantaneous temperature, 10-second temperature difference, temperature change rate, and spatial neighborhood temperature difference of each monitoring point.

[0033] Preferably, the formula for calculating the temperature change rate is

[0034]

[0035] In the formula, r t is the temperature change rate (℃ / s) at time t, T(t) is the current temperature, and T(t-10) is the temperature 10 seconds ago. The 12-dimensional features form a 20000x13 feature matrix by merging with the original temperature matrix.

[0036] Preferably, in step S3, the convolution block is composed of a 3x3 convolution kernel, a batch normalization layer, and a ReLU activation function, and the three convolution blocks include a first convolution layer, a second convolution layer, and a third convolution layer.

[0037] The first convolution layer contains 32 3x3x3 convolution kernels, the second convolution layer contains 64 3x3x32 convolution kernels, and the third convolution layer contains 128 3x3x64 convolution kernels. The global average pooling outputs a spatial feature vector of 1x1x128.

[0038] Preferably, in step S3, the two-layer bidirectional structure includes a first layer and a second layer.

[0039] The first layer contains 64 hidden units and dropout=0.2, and the second layer contains 32 hidden units and outputs a 512-dimensional time feature vector.

[0040] Preferably, in the step S3, the spatial attention layer performs channel global pooling on the 197×1×128 feature map output by the CNN through 1×1 convolution, generates a 197×1 spatial weight matrix, and after calculating the 0-1 weight through the Sigmoid function, point-by-point multiplication is performed with the original feature map;

[0041] The time attention layer calculates the importance scores of the 5 time step features output by the LSTM through a single-layer perceptron, generates time weights through Softmax normalization, and performs weighted summation on the time sequence features.

[0042] Preferably, the weight coefficient of the spatial weight matrix in the spatial attention layer is ≥0.8.

[0043] Preferably, in the step S3, the fire risk index calculation formula is,

[0044]

[0045] wherein σ is the Sigmoid function, w i is the attention mechanism weight, f i is the feature value, and the risk index is divided into three levels: 0-30 is normal state, 31-60 is early warning state, and 61-100 is fire alarm state.

[0046] Preferably, in the step S5, the FocalLoss function formula is,

[0047] FL(p t )=-α t (1-p t ) γ log(p t )

[0048] wherein α t is the class weight, and γ is the adjustment factor.

[0049] The application has the advantages that the application is based on a distributed optical fiber line type temperature sensing fire detection algorithm of a CNN-LSTM and an attention mechanism, adopts a distributed optical fiber line type temperature sensing fire detection mode, and aims to solve the problems of high false alarm rate, response lag and poor scene adaptability in traditional detection technology. The system collects temperature data at an interval of 2 seconds and a spatial resolution of 0.5 meters through a distributed optical fiber sensing unit, and after Z-Score standardization, db4 wavelet denoising and 12-dimensional feature enhancement preprocessing, inputs a CNN-LSTM hybrid model to extract spatial and temporal features, focuses on key areas and moments in combination with an attention mechanism, and outputs a fire risk index of 0-100. The model training adopts transfer learning and a Focal Loss function, realizes cross-scene rapid adaptation and sample imbalance processing, and updates parameters through incremental learning every 30 days. Practice shows that the method reduces the false alarm rate by more than 80% compared with the traditional threshold method, and the early warning time for smoldering fire is 25 seconds, and the method can be widely applied to fire safety monitoring in complex scenes such as tunnels, substations and comprehensive pipe galleries. BRIEF DESCRIPTION OF DRAWINGS

[0050] The application will be described in further detail below in combination with the drawings and specific embodiments.

[0051] Figure 1 is a flow chart of the distributed optical fiber temperature sensing fire detection algorithm of the application based on a CNN-LSTM and an attention mechanism. DETAILED DESCRIPTION

[0052] The distributed optical fiber temperature sensing fire detection algorithm of the application based on a CNN-LSTM and an attention mechanism has the following steps:

[0053] Step S1: data acquisition, acquiring continuous temperature sequence data of a monitoring area through a distributed optical fiber sensing unit, a sampling interval of 2 seconds, a spatial resolution of 0.5 m, forming an original temperature matrix (dimension: 20000x1, corresponding to a monitoring range of 10 km);

[0054] Step S2: data preprocessing, eliminating environmental reference temperature difference by using a Z-Score method, converting temperature data into standardized data with a mean of 0 and a standard deviation of 1, performing 3-layer decomposition by using a db4 wavelet base, applying soft threshold processing to high-frequency coefficients, and performing 12-dimensional feature extraction;

[0055] Step S3: constructing a CNN-LSTM and attention mechanism framework, including an input adaptation layer, a spatiotemporal feature extraction module, an attention mechanism module and a risk assessment module;

[0056] The input adaptation layer converts the multi-dimensional features after step S2 preprocessing into a tensor format conforming to the network input requirements, realizes data standardization and dimension alignment;

[0057] The spatiotemporal feature extraction module adopts a CNN-LSTM hybrid structure, in which the CNN layer contains three convolution blocks for extracting spatial temperature distribution features within a range of 10m, and the LSTM layer adopts a two-layer bidirectional structure for learning temperature change trends in the time dimension;

[0058] The attention mechanism module generates a weight matrix through 1×1 convolution in the spatial attention layer to focus on the temperature abnormality area; the temporal attention layer uses Softmax normalization to strengthen the feature weight at the moment of temperature mutation;

[0059] The risk assessment module outputs a fire risk index of 0-100 through a fully connected layer;

[0060] Step S4: Dataset construction, including labeled data for 70% normal working conditions, 15% interference working conditions, and 15% fire working conditions, covering tunnels, cable trenches, and tank areas;

[0061] Step S5: pre-training stage and fine-tuning stage. The pre-training stage uses Adam optimizer and Focal Loss function to solve the sample imbalance problem. The initial learning rate of Adam optimizer is 0.001. The fine-tuning stage freezes the first 50% parameters of the basic model and the learning rate is set to 0.0001.

[0062] Step S6: Input the preprocessed temperature features into the model and output a real-time risk index. When the risk index is ≥61 for three consecutive sampling periods, it is determined to be a fire and an alarm is triggered. Otherwise, monitoring continues. An incremental learning strategy is used every 30 days to absorb newly labeled data and update model parameters to maintain algorithm adaptability.

[0063] This distributed fiber-optic linear temperature-sensing fire detection algorithm, based on a CNN-LSTM and attention mechanism, aims to address the high false alarm rate, delayed response, and poor scenario adaptability inherent in traditional detection technologies. The system collects temperature data at 2-second intervals and 0.5-meter spatial resolution using distributed fiber-optic sensing units. After preprocessing with Z-Score normalization, db4 wavelet noise reduction, and 12-dimensional feature enhancement, the data is fed into a CNN-LSTM hybrid model to extract spatiotemporal features. The algorithm then integrates an attention mechanism to focus on key areas and moments, outputting a fire risk index ranging from 0 to 100. The model is trained using transfer learning and a focal loss function, enabling rapid cross-scenario adaptation and handling sample imbalance. Parameters are updated every 30 days through incremental learning. Practice has demonstrated that this method reduces false alarm rates by over 80% compared to traditional threshold methods, providing 25-second advance warning of smoldering fires. It is widely applicable for fire safety monitoring in complex scenarios such as tunnels, substations, and utility corridors.

[0064] In the above step S2, soft threshold processing is applied to the high frequency coefficients. The soft threshold processing formula is:

[0065]

[0066] wherein w is a wavelet coefficient, and λ is an adaptive threshold.

[0067] In step S2, the adaptive threshold of wavelet denoising in data preprocessing is:

[0068]

[0069] wherein N is the length of data.

[0070] In step S2, 12-dimensional feature extraction is to calculate the instantaneous temperature, 10-second temperature difference, temperature change rate, and spatial neighborhood temperature difference of each monitoring point.

[0071] The calculation formula of the temperature change rate is:

[0072]

[0073] wherein r t is the temperature change rate (℃ / s) at time t, T(t) is the current temperature, and T(t-10) is the temperature 10 seconds ago, and the 12-dimensional features form a 20000x13 feature matrix by merging with the original temperature matrix.

[0074] In step S3, the convolution block is composed of a 3x3 convolution kernel, a batch normalization layer, and a ReLU activation function, and the three convolution blocks include a first convolution layer, a second convolution layer, and a third convolution layer; the first convolution layer contains 32 3x3x3 convolution kernels, the second convolution layer contains 64 3x3x32 convolution kernels, and the third convolution layer contains 128 3x3x64 convolution kernels, and the global average pooling outputs a spatial feature vector of 1x1x128.

[0075] In step S3, the two-layer bidirectional structure includes a first layer and a second layer; the first layer contains 64 hidden units and dropout=0.2; and the second layer contains 32 hidden units and outputs a 512-dimensional time feature vector.

[0076] In step S3, the spatial attention layer performs channel global pooling on the 197x1x128 feature map output by the CNN through a 1x1 convolution, generates a 197x1 spatial weight matrix, and after calculating the 0-1 weight through the Sigmoid function, the original feature map is multiplied point by point; the time attention layer calculates the importance score of the features of 5 time steps output by the LSTM through a single-layer perceptron, generates a time weight through Softmax normalization, and weights and sums the time sequence features. The weight coefficient of the spatial weight matrix in the spatial attention layer is ≥0.8.

[0077] In step S3, the calculation formula of the fire risk index is:

[0078]

[0079] wherein, sigma is Sigmoid function, w i is attention mechanism weight, f i is feature value, and the risk index is divided into three levels: 0-30 is normal state, 31-60 is early warning state, and 61-100 is fire alarm state.

[0080] In step S5, the FocalLoss function formula is

[0081] FL(p t )=-alpha t (1-p t ) γ log(p t )

[0082] wherein, alpha t is class weight, and gamma is adjustment factor.

[0083] The specific steps of the present application comprise the following parts:

[0084] 1. Data acquisition and pretreatment: collect the temperature data output by the distributed optical fiber sensing unit, the sampling interval is 2 seconds, the spatial resolution is 0.5 m, and the original temperature matrix (dimension: 20000*1, corresponding to 10 km monitoring range) is formed;

[0085] Standardization processing: the Z-Score method is used to eliminate the environmental reference temperature difference, and the formula is

[0086]

[0087] wherein, x is the original temperature value, mu is the temperature mean value of the monitoring area, and sigma is the temperature standard deviation;

[0088] Noise reduction processing: db4 wavelet base is used for 3-layer decomposition, and soft threshold processing is applied to high frequency coefficients.

[0089] 2. Model construction: The spatiotemporal feature extraction module adopts a CNN-LSTM hybrid structure, in which the CNN layer contains 3 convolution blocks (each convolution block consists of a 3×3 convolution kernel, a batch normalization layer, and a ReLU activation function) to extract the spatial temperature distribution characteristics within a range of 10m; the LSTM layer adopts a 2-layer bidirectional structure (with 64 hidden units) to learn the temperature change trend in the time dimension; the spatial attention layer of the attention mechanism module generates a weight matrix through 1×1 convolution to focus on the temperature abnormality area (weight coefficient ≥ 0.8); the temporal attention layer uses Softmax normalization to strengthen the feature weight at the moment of temperature mutation; the risk assessment module outputs a fire risk index of 0-100 through a fully connected layer, where 0-30 is normal state, 31-60 is warning state, and 61-100 is fire alarm state.

[0090] 3. Model training and optimization: Dataset construction: Contains labeled data for normal operating conditions (70%), interference conditions (15%), and fire conditions (15%), covering scenarios such as tunnels, cable trenches, and tank areas;

[0091] Pre-training phase: The basic model is trained using a cross-scenario dataset for 50 rounds. The Adam optimizer learning rate is initialized to 0.001. The Adam optimizer and Focal Loss function are used to address the sample imbalance problem.

[0092] During the fine-tuning phase, domain adaptive training was performed using 5,000 data points for a specific scenario. The first 50% of the base model parameters were frozen, and the learning rate was fine-tuned to 0.0001. These modules work closely together, and every step, from data collection and feature extraction to model training and inference, has been meticulously designed and optimized. This systematic architecture enables the algorithm to operate stably and efficiently in complex and changing environments.

[0093] 4. Real-time reasoning and updating: Real-time reasoning: Input the pre-processed temperature features into the model and output a real-time risk index. When the risk index is ≥61 for three consecutive sampling periods, it is determined to be a fire and an alarm is triggered;

[0094] Model update: An incremental learning strategy is used every 30 days to absorb newly labeled data to update model parameters and maintain algorithm adaptability.

[0095] It is to be understood that the above description is intended to be illustrative, and not restrictive. Many embodiments and many applications other than the examples provided would be apparent upon reading the above description. The scope of the teachings should, therefore, be determined not with reference to the above description, but should instead be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled. The disclosures of all articles and references, including patent applications and publications, are incorporated by reference for all purposes. The omission in the following claims of any aspect of subject matter that is disclosed herein is not a disclaimer of such subject matter, nor should it be regarded that the inventors did not consider such subject matter to be part of the disclosed inventive subject matter.

Claims

1. A distributed optical fiber temperature sensing fire detection algorithm based on CNN-LSTM and attention mechanism, characterized by The following steps are involved: Step S1: Data acquisition, obtaining continuous temperature sequence data of the monitoring area through distributed optical fiber sensing units, with a sampling interval of 2 seconds and a spatial resolution of 0.5m; Step S2: Data preprocessing: The temperature data is converted into standardized data with a mean of 0 and a standard deviation of 1 using the Z-Score method. The db4 wavelet basis is used for three-layer decomposition, soft threshold processing is applied to high-frequency coefficients, and 12-dimensional feature extraction is performed. Step S3: Construct the CNN-LSTM and attention mechanism framework, including the input adaptation layer, spatiotemporal feature extraction module, attention mechanism module, and risk assessment module; The input adaptation layer converts the multi-dimensional features preprocessed in step S2 into a tensor format that meets the network input requirements, achieving data standardization and dimension alignment; The spatiotemporal feature extraction module adopts a CNN-LSTM hybrid structure, in which the CNN layer contains three convolution blocks for extracting spatial temperature distribution features within a range of 10m, and the LSTM layer adopts a two-layer bidirectional structure for learning temperature change trends in the time dimension; The attention mechanism module generates a weight matrix through 1×1 convolution in the spatial attention layer to focus on the temperature abnormality area; the temporal attention layer uses Softmax normalization to strengthen the feature weight at the moment of temperature mutation; The risk assessment module outputs a fire risk index of 0-100 through a fully connected layer; Step S4: Dataset construction, including labeled data for 70% normal working conditions, 15% interference working conditions, and 15% fire working conditions, covering tunnels, cable trenches, and tank areas; Step S5: pre-training stage and fine-tuning stage. The pre-training stage uses Adam optimizer and Focal Loss function to solve the sample imbalance problem. The initial learning rate of Adam optimizer is 0.

001. The fine-tuning stage freezes the first 50% parameters of the basic model and the learning rate is set to 0.0001. Step S6: Input the preprocessed temperature features into the model and output a real-time risk index. When the risk index is ≥61 for three consecutive sampling periods, it is determined to be a fire and an alarm is triggered. Otherwise, monitoring continues. An incremental learning strategy is used every 30 days to absorb newly labeled data and update model parameters to maintain algorithm adaptability.

2. The distributed optical fiber temperature sensing fire detection algorithm based on CNN-LSTM and attention mechanism as claimed in claim 1, characterized in that: In step S2, soft threshold processing is applied to the high frequency coefficients. The soft threshold processing formula is: Where w is the wavelet coefficient, λ is the adaptive threshold; In step S2, the adaptive threshold of wavelet denoising in data preprocessing is: Where N is the data length.

3. The distributed optical fiber temperature sensing fire detection algorithm based on CNN-LSTM and attention mechanism as claimed in claim 1, characterized in that: The 12-dimensional feature extraction in step S2 is to calculate the instantaneous temperature, 10-second temperature difference, temperature change rate, and spatial neighborhood temperature difference of each monitoring point.

4. The distributed optical fiber temperature sensing fire detection algorithm based on CNN-LSTM and attention mechanism as claimed in claim 3, characterized in that: The calculation formula of the temperature change rate is: Among them, r t is the temperature change rate at time t (°C / s), T(t) is the current temperature, T(t-10) is the temperature 10 seconds ago, and the 12-dimensional features are merged with the original temperature matrix to form a 20000×13 feature matrix.

5. The distributed optical fiber temperature sensing fire detection algorithm based on CNN-LSTM and attention mechanism as claimed in claim 1, characterized in that: In step S3, the convolution block consists of a 3×3 convolution kernel, a batch normalization layer, and a ReLU activation function, and the three convolution blocks include a first convolution layer, a second convolution layer, and a third convolution layer; The first convolutional layer contains 32 3×3×3 convolution kernels, the second convolutional layer contains 64 3×3×32 convolution kernels, and the third convolutional layer contains 128 3×3×64 convolution kernels, and outputs a 1×1×128 spatial feature vector after global average pooling.

6. The distributed optical fiber temperature sensing fire detection algorithm based on CNN-LSTM and attention mechanism according to claim 1, characterized in that: In step S3, the two-layer bidirectional structure includes a first layer and a second layer; The first layer contains 64 hidden units and dropout=0.2; the second layer contains 32 hidden units and outputs a 512-dimensional time feature vector.

7. The distributed optical fiber temperature sensing fire detection algorithm based on CNN-LSTM and attention mechanism according to claim 1, characterized in that: In step S3, the spatial attention layer performs channel global pooling on the 197×1×128 feature map output by the CNN through 1×1 convolution to generate a 197×1 spatial weight matrix, which is then multiplied point by point with the original feature map after calculating the 0-1 weight using the Sigmoid function. The temporal attention layer calculates the importance scores of the five time-step features output by the LSTM through a single-layer perceptron, generates time weights through Softmax normalization, and performs weighted summation of the time series features.

8. The distributed optical fiber temperature sensing fire detection algorithm based on CNN-LSTM and attention mechanism according to claim 7, characterized in that: The weight coefficient of the spatial weight matrix in the spatial attention layer is ≥0.

8.

9. The distributed optical fiber temperature sensing fire detection algorithm based on CNN-LSTM and attention mechanism according to claim 1, characterized in that: The fire risk index calculation formula in step S3 is: Among them, σ is the Sigmoid function, w i is the attention mechanism weight, f i is the characteristic value, and the risk index is divided into three levels: 0-30 is normal state, 31-60 is warning state, and 61-100 is fire alarm state.

10. The distributed optical fiber temperature sensing fire detection algorithm based on CNN-LSTM and attention mechanism according to claim 1, characterized in that: In step S5, the Focal Loss function formula is: FL(p t )=-a t (1-p t ) γ log(p t ) Where, α t is the category weight, and γ is the adjustment factor.

Citation Information

Cited By

  • Smoke abnormity monitoring method based on sensing data of Internet of Things

    CN122024432A