Indoor fire hazard flashover risk prediction method based on flame form and remote sensing data
By combining flame morphology analysis and remote sensing data, a fire bombing risk prediction model is built, which solves the problem that traditional fire monitoring is difficult to accurately predict bombing risks, and achieves the effect of accurately predicting and issuing early fires to reduce fire losses.
Patent Information
- Application Number
- CN202411574732.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-06
AI Technical Summary
Traditional fire monitoring and early warning methods are difficult to accurately predict the fire risk of indoor fires in the early stages of the fire, and cannot win time for evacuation of personnel and fire fighting.
The indoor fire explosion risk prediction method based on flame morphology and remote sensing data is adopted. The fire data is simulated through fire simulation software, and the flame image obtained by high-definition cameras and methane gas concentration data obtained by methane laser remote sensing detectors are combined to build fire explosion risk. Prediction model, using residual networks and long and short-term memory networks to predict the fire's blasting risk.
It can accurately identify and predict the fire's explosion risk in the early stage of fire development, and issue early warning signals when the fire is about to enter the explosion stage to reduce casualties and property losses caused by the fire.
Smart Images

Figure CN119445801A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for predicting indoor fire flashover risk based on flame morphology and remote sensing data, and belongs to the technical field of fire monitoring. Background Art
[0002] In the process of accelerating urbanization and urbanization, the original building form cannot meet the living and working environment requirements of urban populations, and the building floors are gradually increasing. These high-rise buildings have the problems of high fire risk, serious accident losses, and difficulty in extinguishing. Carrying out relevant research on building fire prevention and control is of great significance to reducing casualties and property losses caused by fire.
[0003] The development of indoor fires in buildings can usually be divided into four stages, namely the primary growth stage, the flashover stage, the full development stage and the fire attenuation stage. In the primary growth stage of a fire, as the fire source continues to burn, the indoor high-temperature smoke layer accumulates and settles, and the heat radiation to other combustibles on the ground is significantly enhanced. When the indoor temperature reaches a certain value, it will induce the occurrence of flashover and cause the combustibles in the room to be fully ignited in an instant. Once a flashover occurs, it will lead to a significant increase in casualties and property losses. However, the occurrence of fire flashover is highly complex and sudden, which makes it difficult for traditional fire monitoring and early warning methods to accurately predict the risk of flashover in the early stages of a fire, and it is impossible to buy time for personnel evacuation and fire fighting. Summary of the invention
[0004] The present invention provides a method for predicting the flashover risk of indoor fires based on flame morphology and remote sensing data. The prediction method can accurately identify and predict the flashover risk of a fire in the early stages of fire development, and send out a warning signal when the fire is about to enter the flashover stage, thereby reducing casualties and property losses caused by the fire.
[0005] In order to achieve the above object, the present invention provides a method for predicting indoor fire flashover risk based on flame morphology and remote sensing data, comprising the following steps:
[0006] Step 1: Use fire simulation software to simulate fire data and build a fire data set;
[0007] Step 2: Ignite the fire, obtain the indoor fire flame image through a high-definition camera, and process the obtained image;
[0008] Step 3: The processed image is passed through the residual network Resnet model to output the real-time heat release rate HRR of the ignition point;
[0009] Step 4: Use a methane laser remote sensing detector to monitor and obtain methane gas concentration data of a smoke layer at a specific height indoors in real time;
[0010] Step 5: Build a fire flashover risk prediction model based on the heat release rate of the fire source and the methane gas concentration to predict the flashover risk in advance.
[0011] Furthermore, the specific process of using fire simulation software to simulate fire data in step 1 and constructing a fire data set is as follows:
[0012] 1-1. Build a fire combustion model, set the geometric structure of the fire room, the location of the fire source, the heat release rate of the fire source and the area of the fire source;
[0013] 1-2. Add chemical reactions according to the combustibles to be ignited, set the fuel and oxidant of the reaction, and define the methane produced by incomplete combustion according to the reaction equation;
[0014] 1-3. Set up a gas monitor just above the fire source, select methane as Species and Volume fraction as Quantity; set up a heat release rate measuring point at a specific distance S just above the fire source;
[0015] 1-4. Set the simulation time and obtain the simulated gas measurement point data set {V t},V t represents the methane gas concentration data at the tth second; the simulated fire source heat release rate data set {H t},H t represents the heat release rate data of the fire source at the tth second; {V t} and {H t Merge to generate data set t}, where the vertical axis represents different times, and the horizontal axis represents the methane gas concentration parameter and the fire source heat release rate parameter:
[0016]
[0017] 1-5. Record the time point t when flashover occurs in the simulation software, i.e. the average temperature of the ceiling of the fire room reaches 600°C flashover .
[0018] Furthermore, the specific process of step 2 is as follows:
[0019] 2-1. For the acquired flame image, use Opencv to measure the height and area of the flame:
[0020] 2-2. Convert the flame image from BGR to HSV color space, set the HSV color range, extract the flame area, and generate a binary mask matrix, where the pixel value of the flame area is 1 and the pixel value of the non-flame area is 0; the mask is recorded as M(x,y), where ((x,y) is the position of each pixel in the image:
[0021]
[0022] The white area in the mask represents the flame part; in the HSV color space, the V channel represents the brightness of each pixel. The brightness value of each pixel in the image is V(x,y). The average brightness of the flame area is limited to the flame area through the mask, and the average value of all brightness values in the area is calculated. If the total number of pixels in the flame area is N, the calculation formula for the average brightness is:
[0023]
[0024] In the formula, ∑ x,y V(x,y)·M(x,y) represents the sum of all brightness values in the flame area, Σ x,y M(x,y) represents the total number of pixels in the flame area;
[0025] The extracted flame area is denoised and filled with holes using morphology; the denoising operation is an opening operation, which is a process of first corrosion and then expansion. For an image A and a structural element B, the corrosion operation is expressed as:
[0026]
[0027] Among them, B z represents the translation of the center point of the structural element B at the z position;
[0028] The dilation operation is expressed as:
[0029]
[0030] 2-3. Use Opencv's findContours() function to extract the contour of the flame area, and select the largest contour to represent the main area of the flame; the specific implementation process of the findContours() function is as follows:
[0031] 2-3-1. Binarize the processed image and convert it into an image containing only two pixel values, 0 and 255. Use the color threshold to set the flame area to white 255 and the background area to black 0.
[0032] 2-3-2. Use the gradient change of pixel intensity to identify the edge of the image. The edge is located by calculating the gradient of the pixel points in the image. The gradient is defined as the rate of change of the image brightness value. For a given pixel point (x, y), the gradient in the horizontal and vertical directions is calculated by convolution:
[0033] G x =I(x+1,y)-I(x-1,y)
[0034] G y=I(x,y+1)-I(x,y-1);
[0035] Among them, I(x,y) represents the gray value of the pixel. According to the gradient, the direction and amplitude of the image edge are:
[0036]
[0037] The position with large gradient, that is, the position with obvious brightness change, is the edge point;
[0038] 2-3-3. Use the connectivity analysis method to track and group edge pixels and identify connected edge areas, that is, check whether the neighborhood of each pixel has the same pixel value, which is represented by a white area. Use the findContours() function to identify a group of connected edge pixels to form a closed contour.
[0039] 2-3-4. Based on the chain code representation method, the contour is represented as a series of moving directions between adjacent pixel points. When performing edge tracking, starting from an edge point of the binary image, the next adjacent edge point is determined, and this process is repeated until it returns to the starting point or no new connected edge point can be found, thus forming a closed contour and recording all pixel coordinates in each contour;
[0040] 2-3-5. After finding the flame outline, calculate the vertical span of the flame area, that is, the height of the flame. The flame height is equal to the maximum Y coordinate value of the flame image outline point minus the minimum Y coordinate value;
[0041] 2-3-6. After finding the flame contour, use the contourArea() function of OpenCV to calculate the area of the contour. For the pixel coordinate sequence of all the contour points that have been determined (x1, y1), (x2, y2), ..., (x n ,y n ), the area S is expressed in discrete form using Green's formula:
[0042]
[0043] n represents the number of contour points;
[0044] 2-3-7. For the flame video data obtained, extract the flame outline in each frame and calculate its area. The change of the flame area is represented by a time series. The calculation result of the flame area of each frame A(t) constitutes the flame area change sequence with time t. Perform Fourier transform on A(t) and convert it into frequency domain representation F(f), where f is the frequency:
[0045]
[0046] Since the frame data of the flame area is a discrete time series, it is calculated using discrete Fourier transform, and its expression is:
[0047]
[0048] Where N is the number of samples and k is the discrete frequency index. The spectrum F(f) is obtained by Fourier transform of the flame area time series, where the amplitude of each frequency component corresponds to the intensity of the flame fluctuation at that frequency. The main frequency, i.e., the main fluctuation frequency, is the non-zero frequency with the largest amplitude in the spectrum, indicating the main fluctuation frequency of the flame profile, corresponding to the oscillation or fluctuation of the flame.
[0049] Furthermore, the specific process of step three is:
[0050] 3-1. The height, area, average brightness and fluctuation frequency data of each flame image frame are taken as auxiliary labels and input into the residual network Resnet model. Each image data in the database of the residual network Resnet model has its corresponding HRR label, as well as the flame height, area, average brightness and fluctuation frequency data as auxiliary labels;
[0051] 3-2. The residual network Resnet model uses ResNet-50 as the backbone network to extract deep features from the flame image, removes the fully connected layer of ResNet-50, retains the convolutional layer, and obtains the high-dimensional feature representation of the flame image;
[0052] 3-3. The residual network Resnet model predicts auxiliary label features through multiple fully connected layers, captures the physical characteristics of the flame, and improves the prediction accuracy of the heat release rate HRR;
[0053] 3-4. The residual network Resnet model combines the features output by ResNet-50 with the auxiliary label prediction results, and performs HRR prediction through several fully connected layers. The specific prediction process is as follows:
[0054] 3-4-1. Use the mean square error MSE loss function to predict the flame height. The formula is:
[0055] Flame height
[0056] In the formula, h i is the true value of the flame height of the i-th sample, is the model's prediction of flame height;
[0057] 3-4-2. Use the mean square error MSE loss function to predict the flame area. The formula is:
[0058] Flame area
[0059] In the formula, a i is the true value of the flame area of the ith sample, is the model's prediction of the flame area;
[0060] 3-4-3. Use the mean square error MSE loss function to predict the average flame brightness. The formula is:
[0061] Average brightness
[0062] Where b i is the average brightness true value of the i-th sample, is the model's prediction of the average brightness;
[0063] 3-4-4. Use the mean square error MSE loss function to predict the flame fluctuation frequency. The formula is:
[0064] Fluctuation frequency
[0065] In the formula, f i is the average brightness true value of the i-th sample, is the model's prediction of the average brightness;
[0066] 3-4-5. Use the mean square error MSE loss function to predict the heat release rate. The formula is:
[0067] Heat release rate
[0068] In the formula, r i is the average brightness true value of the i-th sample, is the model's prediction of the average brightness;
[0069] 3-4-6. The total loss is expressed as:
[0070] Total loss = 0.2*flame height MSE + 0.2*flame area MSE + 0.2*average brightness MSE + 0.2*fluctuation frequency MSE + 1*heat release rate MSE;
[0071] Among them, the weight of heat release rate is 1, and the weights of flame height, area, average brightness, and fluctuation frequency are all 0.2.
[0072] Furthermore, the step 5 uses the fire source heat release rate-time data and methane gas concentration-time data in the past T1 seconds as input, and uses the long short-term memory network LSTM model for training to determine whether flashover will occur in the future T2 seconds. The LSTM model includes an input layer, an LSTM feature extraction branch, a heat release rate LSTM branch, a methane gas concentration LSTM branch, a feature fusion layer, a fully connected layer and an output layer; the specific prediction process of the LSTM model is:
[0073] 5-1. The LSTM model has two input layers, which are used to receive the fire source heat release rate and methane gas concentration time series data within the past T1 seconds:
[0074] input_hrr: The shape is (T1,1), which represents the heat release rate data of the fire source in the past T1 seconds, with one data point per second;
[0075] input_methane: The shape is (T1,1), which means the methane concentration data in the past T1 seconds;
[0076] 5-2. LSTM feature extraction branch process:
[0077] LSTM is used to extract features from the fire source heat release rate and methane gas concentration series. Each input data branch has an independent LSTM layer, which is used to capture the time dependence of the fire source heat release rate and methane gas concentration. The LSTM layer contains multiple LSTM units. In time step t, the output calculation process of each LSTM unit is:
[0078] 5-2-1. Calculate the forget gate f t :
[0079] f t =σ(W f ·[h t-1 ,x t ]+b f );
[0080] Among them, W f is the weight matrix of the forget gate, connecting h t-1 and x t ;h t-1 is the hidden state of the previous time step; x t is the input of the current time step; b f is the bias term of the forget gate; σ represents the sigmoid function, which limits the output value to [0,1]; the forget gate is used to determine the previous memory state C t-1 The part that needs to be forgotten;
[0081] 5-2-2. Input gate i t and candidate memory The input gate determines how much of the current input information is written into the memory cell:
[0082] i t =σ((W i ·[h t-1 ,x t ]+b i )
[0083]
[0084] W i and W C are the weight matrices of the input gate and candidate memory cells respectively; b i and b C is a bias term; tanh is a hyperbolic tangent activation function that limits the output value to between [-1,1];
[0085] 5-2-3. Update memory unit C t :
[0086]
[0087] 5-2-4, Output Gate o t and the hidden state h t :
[0088]
[0089] h t =o t tanh(C t );
[0090] The output gate determines the output content of the hidden state and passes it to the next layer; W o is the weight matrix of the output gate, connecting h t-1 and x t ; b o is the bias term of the output gate;
[0091] 5-3. Heat release rate LSTM branching process:
[0092] 5-3-1. The first layer of LSTM units has 64 units. return_sequences = True makes it output the features of each time step so that the next layer of LSTM can continue to process the sequence data.
[0093] 5-3-2. The second layer of LSTM units has 32 units, and return_sequences = False makes it output the features of the last time step, which is used to summarize the information of the previous time step;
[0094] 5-4. Methane gas concentration LSTM branching process:
[0095] 5-4-1. The first layer of LSTM units has 64 hidden units, which are used to output the features of each time step;
[0096] 5-4-2. The second layer of LSTM units has 32 hidden units, which are used to output the features of the last time step;
[0097] 5-5. Feature fusion layer performs feature fusion: The time series features of HRR and methane gas concentration are extracted through the features output by the heat release rate LSTM branch and the methane gas concentration LSTM branch, and the two feature vectors are merged to form a comprehensive feature vector;
[0098] 5-6. Based on the fused features, two fully connected layers are used to further extract features, and these features are used to predict the probability of flashover. The first fully connected layer contains 64 neurons, and the activation function is RELU, which is used to extract the deep relationship of the fused features. The second fully connected layer contains 32 neurons, and the activation function is RELU, which is used to further reduce the feature space.
[0099] 5-7. The final output layer is a binary classification output, which is used to determine whether flashover will occur within the next T2 seconds. The specific process is as follows:
[0100] 5-7-1. Use the sigmoid activation function to limit the output range to [0,1]. 0 means no flashover is predicted, and 1 means flashover is predicted. The sigmoid activation function maps the output to the probability space. For the input feature z, the mathematical expression of the sigmoid activation function is:
[0101]
[0102] Output of the sigmoid activation function It indicates the predicted probability of flashover: if If it is close to 1, the LSTM prediction model determines that "flashover will occur". If it is close to 0, the LSTM prediction model determines that "flashover will not occur"; the threshold is set to 0.5, and the predicted flashover probability is converted into a binary classification result:
[0103]
[0104] 5-7-2. Use the binary cross entropy loss function to measure the difference between the prediction results of the LSTM prediction model and the actual label. Set the Adam optimizer and Accuracy as evaluation indicators to evaluate the credibility of the prediction model during the training process. The specific process is as follows:
[0105] 5-7-2.1. Gradient calculation: For each parameter θ t , first calculate the gradient of the loss function L(θ) with respect to the parameters:
[0106] g t =▽ θ L(θ t )
[0107] 5-7-2.2. First-order momentum estimation: Adam uses the exponential weighted average method to calculate the first-order momentum estimate of the gradient, that is, the mean of the gradient, denoted by m t is the weighted moving average of the gradient:
[0108] m t =β1·m t-1 +((1-β1)·g t
[0109] Among them, β1 is the decay rate of momentum, which is 0.9;
[0110] m t It is the exponentially weighted average of the gradient, which approximately represents the direction of the gradient;
[0111] 5-7-2.3. Second-order momentum estimation: Adam uses the square of the gradient to calculate the second-order momentum estimate, that is, the variance of the gradient, denoted by v t is the weighted moving average of the squared gradient:
[0112] v t =β2·v t-1 +((1-β2)·g t 2
[0113] Among them, β2 is the decay rate of variance, which is 0.999; v t is the exponentially weighted average of the squared gradients;
[0114] 5-7-2.4. Deviation correction: Due to m t and v t The calculations all use exponential weighted averages, so there will be deviations in the early stages of training. Adam corrects the deviations using the following formula:
[0115]
[0116] t * is the current time step, that is, the current iteration number of training;
[0117] 5-7-2.5. Parameter update: Adam uses the corrected momentum and variance estimates to update the parameters. The update formula is:
[0118]
[0119] Where α is the learning rate; ε is a small constant used to prevent division by zero errors;
[0120] 5-7-2.6. Accuracy refers to the ratio of the number of samples predicted correctly to the total number of samples;
[0121]
[0122] Among them, TP is the number of positive examples correctly predicted by the model; TN is the number of negative examples correctly predicted by the model; FP is the number of positive examples incorrectly predicted by the model; FN is the number of negative examples incorrectly predicted by the model.
[0123] Furthermore, in step 2-3-2, the process of determining the position with a large gradient is as follows: a threshold T is set, and when the gradient size G≥T, the point is regarded as an edge point. When the image has more noise and only significant edges need to be retained, a higher threshold T is usually set; when more edge information needs to be retained, a lower threshold T is usually set; the present invention adopts the Canny algorithm and uses a dual threshold method to define edge points to reduce the impact of noise;
[0124] After calculating the size and direction of the gradient G of each pixel, set a high threshold T h and a low threshold T l When the gradient size G ≥ T h When the gradient size T l ≤G<T h When , the pixel point is marked as a weak edge point; next, edge connection is performed. For a weak edge point, if there is a strong edge point in the 8-neighborhood, that is, the 8 adjacent pixels around the weak edge point, it is regarded as part of the edge, otherwise it is removed as noise; the operation of connecting weak edge points is iterative. If a weak edge point is connected to a strong edge point through the neighborhood check, the weak edge point will be re-marked as an edge, and then the neighborhood check will continue with the newly marked weak edge point as the center until all weak edge points that can be connected to the strong edge point are processed.
[0125] The present invention adopts an indoor fire flashover risk prediction LSTM model based on flame morphology and remote sensing data, uses a high-definition camera to obtain image data and then inputs it into a Resnet-50 model to output the real-time heat release rate of the fire point, and uses a methane laser remote sensing detector to obtain methane concentration data above the fire point, which is input in real time into a trained indoor fire flashover risk prediction LSTM model based on flame morphology and remote sensing data. The flashover time pattern is captured in the changes of fire parameters in multiple time steps, and the risk of flashover is predicted in advance, thereby accurately identifying and predicting the flashover risk of a fire in the early stage of fire development, and sending out a warning signal when the fire is about to enter the flashover stage, thereby reducing casualties and property losses caused by the fire. BRIEF DESCRIPTION OF THE DRAWINGS
[0126] Figure 1 It is a schematic diagram of the risk prediction LSTM model workflow of the present invention;
[0127] Figure 2 Schematic diagram of the residual network structure of the present invention;
[0128] Figure 3 It is a schematic diagram of the feature fusion process of the present invention;
[0129] Figure 4 It is a structural schematic diagram of a fire combustion model of the present invention.
[0130] In the figure: 1. Fire room, 2. Fire source, 3. Observation window, 4. Ventilation opening, 5. Methane gas remote sensing detector, 6. Computer. DETAILED DESCRIPTION
[0131] The present invention will be further described below in conjunction with the accompanying drawings.
[0132] like Figure 1 As shown, a method for predicting indoor fire flashover risk based on flame morphology and remote sensing data includes the following steps:
[0133] Step 1: Use fire simulation software to simulate fire data and build a fire data set;
[0134] Step 2: Ignite the fire, obtain the indoor fire flame image through a high-definition camera, and process the obtained image;
[0135] Step 3: The processed image is passed through the residual network Resnet model to output the real-time heat release rate HRR of the ignition point;
[0136] Step 4: Use a methane laser remote sensing detector to monitor and obtain methane gas concentration data of a smoke layer at a specific height indoors in real time;
[0137] Step 5: Build a fire flashover risk prediction model based on the heat release rate of the fire source and the methane gas concentration to predict the flashover risk in advance.
[0138] like Figure 4 As shown, the present invention also provides a fire combustion model structure for predicting the risk of indoor fire flashover, including a fire room 1, a fire source 2 and a high-definition camera are arranged inside the fire room 1, an observation window 3 and a ventilation opening 4 are opened on the wall of the fire room 1, the ventilation opening 4 can be closed or the size of the opening can be adjusted by installing a fireproof plate to adjust the air flow condition in the fire room 1 and simulate the fire development under different ventilation conditions, a methane gas remote sensing detector 5 is arranged outside the observation window 3, the methane gas remote sensing detector 5 can monitor the methane gas concentration in the fire room 1 in real time through the observation window 3, the high-definition camera and the methane gas remote sensing detector 5 are both connected to a computer 6 outside the fire room 1, and the real-time monitored heat release rate and methane gas concentration data are respectively transmitted to the computer 6;
[0139] As a preferred implementation, the step 1 uses fire simulation software to simulate fire data, and the specific process of constructing a fire data set is as follows:
[0140] 1-1. Build a fire combustion model, set the geometric structure of the fire room, the location of the fire source, the heat release rate of the fire source and the area of the fire source;
[0141] 1-2. Add chemical reactions according to the combustibles to be ignited, set the fuel and oxidant of the reaction, and define the methane produced by incomplete combustion according to the reaction equation;
[0142] 1-3. Set up a gas monitor just above the fire source and near the indoor ceiling. Select methane as Species and Volume fraction as Quantity. Set up a heat release rate measuring point at a specific distance S just above the fire source.
[0143] 1-4. Set the simulation time and obtain the simulated gas measurement point data set {V t},V t represents the methane gas concentration data at the tth second; the simulated fire source heat release rate data set {H t},H t represents the heat release rate data of the fire source at the tth second; {V t} and {H t Merge to generate data set t}, where the vertical axis represents different times, and the horizontal axis represents the methane gas concentration parameter and the fire source heat release rate parameter:
[0144]
[0145] 1-5. Record the time point t when flashover occurs in the simulation software, i.e. the average temperature of the ceiling of the fire room reaches 600°C flashover .
[0146] As a preferred implementation, the specific process of step 2 is:
[0147] 2-1. For the acquired flame image, use Opencv to measure the height and area of the flame:
[0148] 2-2. Convert the flame image from BGR to HSV color space, set the HSV color range, extract the flame area, and generate a binary mask matrix, where the pixel value of the flame area is 1 and the pixel value of the non-flame area is 0; the mask is recorded as M((x, y), where ((x, y) is the position of each pixel in the image:
[0149]
[0150] The white area in the mask represents the flame part; in the HSV color space, the V channel represents the brightness of each pixel. The brightness value of each pixel in the image is V(x,y). The average brightness of the flame area is limited to the flame area through the mask, and the average value of all brightness values in the area is calculated. If the total number of pixels in the flame area is N, the calculation formula for the average brightness is:
[0151]
[0152] In the formula, ∑ x,y V(x,y)·M(x,y) represents the sum of all brightness values in the flame area, ∑ x,y M(x,y) represents the total number of pixels in the flame area;
[0153] The extracted flame area is denoised and filled with holes using morphology; the denoising operation is an opening operation, which is a process of first corrosion and then expansion. For an image A and a structural element B, the corrosion operation is expressed as:
[0154]
[0155] Among them, B z represents the translation of the center point of the structural element B at the z position;
[0156] The dilation operation is expressed as:
[0157]
[0158] 2-3. Use Opencv's findContours() function to extract the contour of the flame area, and select the largest contour to represent the main area of the flame; the specific implementation process of the findContours() function is as follows:
[0159] 2-3-1. Binarize the processed image and convert it into an image containing only two pixel values, 0 and 255. Use the color threshold to set the flame area to white 255 and the background area to black 0.
[0160] 2-3-2. Use the gradient change of pixel intensity to identify the edge of the image. The edge is located by calculating the gradient of the pixel points in the image. The gradient is defined as the rate of change of the image brightness value. For a given pixel point (x, y), the gradient in the horizontal and vertical directions is calculated by convolution:
[0161] G x =I(x+1,y)-I(x-1,y)
[0162] G y =I(x,y+1)-I(x,y-1);
[0163] Among them, I(x,y) represents the gray value of the pixel. According to the gradient, the direction and amplitude of the image edge are:
[0164]
[0165] The position with large gradient, that is, the position with obvious brightness change, is the edge point;
[0166] 2-3-3. Use the connectivity analysis method to track and group edge pixels and identify connected edge areas, that is, check whether the neighborhood of each pixel has the same pixel value, which is represented by a white area. Use the findContours() function to identify a group of connected edge pixels to form a closed contour.
[0167] 2-3-4. Based on the chain code representation method, the contour is represented as a series of moving directions between adjacent pixel points. When performing edge tracking, starting from an edge point of the binary image, the next adjacent edge point is determined, and this process is repeated until it returns to the starting point or no new connected edge point can be found, thus forming a closed contour and recording all pixel coordinates in each contour;
[0168] 2-3-5. After finding the flame outline, calculate the vertical span of the flame area, that is, the height of the flame. The flame height is equal to the maximum Y coordinate value of the flame image outline point minus the minimum Y coordinate value;
[0169] 2-3-6. After finding the flame contour, use the contourArea() function of OpenCV to calculate the area of the contour. For the pixel coordinate sequence of all the contour points that have been determined (x1, y1), (x2, y2), ..., (xn ,y n ), the area S is expressed in discrete form using Green's formula:
[0170]
[0171] n represents the number of contour points;
[0172] 2-3-7. For the flame video data obtained, extract the flame outline in each frame and calculate its area. The change of the flame area is represented by a time series. The calculation result of the flame area of each frame A(t) constitutes the flame area change sequence with time t. Perform Fourier transform on A(t) and convert it into frequency domain representation F(f), where f is the frequency:
[0173]
[0174] Since the frame data of the flame area is a discrete time series, it is calculated using discrete Fourier transform, and its expression is:
[0175]
[0176] Where N is the number of samples and k is the discrete frequency index. The spectrum F(f) is obtained by Fourier transform of the flame area time series, where the amplitude of each frequency component corresponds to the intensity of the flame fluctuation at that frequency. The main frequency, i.e., the main fluctuation frequency, is the non-zero frequency with the largest amplitude in the spectrum, indicating the main fluctuation frequency of the flame profile, corresponding to the oscillation or fluctuation of the flame.
[0177] like Figure 1 As shown, as a preferred implementation, the specific process of step three is:
[0178] 3-1. The height, area, average brightness and fluctuation frequency data of each flame image frame are taken as auxiliary labels and input into the residual network Resnet model. Each image data in the database of the residual network Resnet model has its corresponding HRR label, as well as the flame height, area, average brightness and fluctuation frequency data as auxiliary labels;
[0179] 3-2. The residual network Resnet model uses ResNet-50 as the backbone network to extract deep features from the flame image, removes the fully connected layer of ResNet-50, retains the convolutional layer, and obtains the high-dimensional feature representation of the flame image;
[0180] 3-3. The residual network Resnet model predicts auxiliary label features through multiple fully connected layers, captures the physical characteristics of the flame, and improves the prediction accuracy of the heat release rate HRR;
[0181] 3-4. The residual network Resnet model combines the features output by ResNet-50 with the auxiliary label prediction results, and performs HRR prediction through several fully connected layers. The specific prediction process is as follows:
[0182] 3-4-1. Use the mean square error MSE loss function to predict the flame height. The formula is:
[0183] Flame height
[0184] In the formula, h i is the true value of the flame height of the i-th sample, is the model's prediction of flame height;
[0185] 3-4-2. Use the mean square error MSE loss function to predict the flame area. The formula is:
[0186] Flame area
[0187] In the formula, a i is the true value of the flame area of the ith sample, is the model's prediction of the flame area;
[0188] 3-4-3. Use the mean square error MSE loss function to predict the average flame brightness. The formula is:
[0189] Average brightness
[0190] Where b i is the average brightness true value of the i-th sample, is the model's prediction of the average brightness;
[0191] 3-4-4. Use the mean square error MSE loss function to predict the flame fluctuation frequency. The formula is:
[0192] Fluctuation frequency
[0193] In the formula, f i is the average brightness true value of the i-th sample, is the model's prediction of the average brightness;
[0194] 3-4-5. Use the mean square error MSE loss function to predict the heat release rate. The formula is:
[0195] Heat release rate
[0196] In the formula, r i is the average brightness true value of the i-th sample, is the model's prediction of the average brightness;
[0197] 3-4-6. The total loss is expressed as:
[0198] Total loss = 0.2*flame height MSE + 0.2*flame area MSE + 0.2*average brightness MSE + 0.2*fluctuation frequency MSE + 1*heat release rate MSE;
[0199] Among them, the weight of heat release rate is 1, and the weights of flame height, area, average brightness, and fluctuation frequency are all 0.2.
[0200] like Figure 1 As shown, as a preferred implementation, the step five uses the fire source heat release rate-time data and methane gas concentration-time data in the past T1 seconds as input, and uses the long short-term memory network LSTM model for training to determine whether flashover will occur in the future T2 seconds. The LSTM model includes an input layer, an LSTM feature extraction branch, a heat release rate LSTM branch, a methane gas concentration LSTM branch, a feature fusion layer, a fully connected layer and an output layer; the specific prediction process of the LSTM model is:
[0201] 5-1. The LSTM model has two input layers, which are used to receive the fire source heat release rate and methane gas concentration time series data within the past T1 seconds:
[0202] input_hrr: The shape is (T1,1), which represents the heat release rate data of the fire source in the past T1 seconds, with one data point per second;
[0203] input_methane: The shape is (T1,1), which means the methane concentration data in the past T1 seconds;
[0204] 5-2. LSTM feature extraction branch process:
[0205] LSTM is used to extract features from the fire source heat release rate and methane gas concentration series. Each input data branch has an independent LSTM layer, which is used to capture the time dependence of the fire source heat release rate and methane gas concentration. The LSTM layer contains multiple LSTM units. In time step t, the output calculation process of each LSTM unit is:
[0206] 5-2-1. Calculate the forget gate f t :
[0207] f t =σ(W f ·[h t-1 ,x t ]+b f );
[0208] Among them, W f is the weight matrix of the forget gate, connecting h t-1 and x t ;h t-1 is the hidden state of the previous time step; x t is the input of the current time step; b f is the bias term of the forget gate; σ represents the sigmoid function, which limits the output value to [0,1]; the forget gate is used to determine the previous memory state C t-1 The part that needs to be forgotten;
[0209] 5-2-2. Input gate i t and candidate memory The input gate determines how much of the current input information is written into the memory cell:
[0210] i t =σ((W i ·[h t-1 ,x t ]+b i )
[0211]
[0212] W i and W C are the weight matrices of the input gate and candidate memory cells respectively; b i and b C is a bias term; tanh is a hyperbolic tangent activation function that limits the output value to between [-1,1];
[0213] 5-2-3. Update memory unit C t :
[0214]
[0215] 5-2-4, Output Gate o t and the hidden state h t :
[0216]
[0217] h t =o t tanh(C t );
[0218] The output gate determines the output content of the hidden state and passes it to the next layer; W o is the weight matrix of the output gate, connecting h t-1 and x t ; b o is the bias term of the output gate;
[0219] 5-3. Heat release rate LSTM branching process:
[0220] 5-3-1. The first layer of LSTM units has 64 units. return_sequences = True makes it output the features of each time step so that the next layer of LSTM can continue to process the sequence data.
[0221] 5-3-2. The second layer of LSTM units has 32 units, and return_sequences = False makes it output the features of the last time step, which is used to summarize the information of the previous time step;
[0222] 5-4. Methane gas concentration LSTM branching process:
[0223] 5-4-1. The first layer of LSTM units has 64 hidden units, which are used to output the features of each time step;
[0224] 5-4-2. The second layer of LSTM units has 32 hidden units, which are used to output the features of the last time step;
[0225] 5-5, such as Figure 2 and Figure 3 As shown, the feature fusion layer performs feature fusion: the time series features of HRR and methane gas concentration are extracted through the features output by the heat release rate LSTM branch and the methane gas concentration LSTM branch, and the two feature vectors are merged to form a comprehensive feature vector;
[0226] 5-6. Based on the fused features, two fully connected layers are used to further extract features, and these features are used to predict the probability of flashover. The first fully connected layer contains 64 neurons, and the activation function is RELU, which is used to extract the deep relationship of the fused features. The second fully connected layer contains 32 neurons, and the activation function is RELU, which is used to further reduce the feature space.
[0227] 5-7. The final output layer is a binary classification output, which is used to determine whether flashover will occur within the next T2 seconds. The specific process is as follows:
[0228] 5-7-1. Use the sigmoid activation function to limit the output range to [0,1]. 0 means no flashover is predicted, and 1 means flashover is predicted. The sigmoid activation function maps the output to the probability space. For the input feature z, the mathematical expression of the sigmoid activation function is:
[0229]
[0230] Output of the sigmoid activation function It indicates the predicted probability of flashover: if If it is close to 1, the LSTM prediction model determines that "flashover will occur". If it is close to 0, the LSTM prediction model determines that "flashover will not occur"; the threshold is set to 0.5, and the predicted flashover probability is converted into a binary classification result:
[0231]
[0232] 5-7-2. Use the binary cross entropy loss function to measure the difference between the prediction results of the LSTM prediction model and the actual label. Set the Adam optimizer and Accuracy as evaluation indicators to evaluate the credibility of the prediction model during the training process. The specific process is as follows:
[0233] 5-7-2.1. Gradient calculation: For each parameter θ t , first calculate the gradient of the loss function L(θ) with respect to the parameters:
[0234] g t =▽ θ L(θ t )
[0235] 5-7-2.2. First-order momentum estimation: Adam uses the exponential weighted average method to calculate the first-order momentum estimate of the gradient, that is, the mean of the gradient, denoted by m t is the weighted moving average of the gradient:
[0236] m t =β1·m t-1 +((1-β1)·g t
[0237] Among them, β1 is the decay rate of momentum, which is 0.9; m t It is the exponentially weighted average of the gradient, which approximately represents the direction of the gradient;
[0238] 5-7-2.3. Second-order momentum estimation: Adam uses the square of the gradient to calculate the second-order momentum estimate, that is, the variance of the gradient, denoted by v t is the weighted moving average of the squared gradient:
[0239] v t =β2·v t-1 +((1-β2)·g t 2
[0240] Among them, β2 is the decay rate of variance, which is 0.999; v t is the exponentially weighted average of the squared gradients;
[0241] 5-7-2.4. Deviation correction: Due to m t and vt The calculations all use exponential weighted averages, so there will be deviations in the early stages of training. Adam corrects the deviations using the following formula:
[0242]
[0243] t * is the current time step, that is, the current iteration number of training;
[0244] 5-7-2.5. Parameter update: Adam uses the corrected momentum and variance estimates to update the parameters. The update formula is:
[0245]
[0246] Where α is the learning rate; ε is a small constant used to prevent division by zero errors;
[0247] 5-7-2.6. Accuracy Accuracy indicates the ratio of the number of samples predicted correctly to the total number of samples:
[0248]
[0249] Among them, TP is the number of positive examples correctly predicted by the model; TN is the number of negative examples correctly predicted by the model; FP is the number of positive examples incorrectly predicted by the model; FN is the number of negative examples incorrectly predicted by the model.
[0250] As a preferred implementation, in step 2-3-2, the process of determining the position with a large gradient is as follows: a threshold T is set, and when the gradient size G≥T, the point is regarded as an edge point. When the image has more noise and only significant edges need to be retained, a higher threshold T is usually set; when more edge information needs to be retained, a lower threshold T is usually set; the present invention adopts the Canny algorithm and uses a dual threshold method to define edge points to reduce the impact of noise;
[0251] After calculating the size and direction of the gradient G of each pixel, set a high threshold T h and a low threshold T l When the gradient size G ≥ T h When the gradient size T l ≤G<T hWhen , the pixel point is marked as a weak edge point; next, edge connection is performed. For a weak edge point, if there is a strong edge point in the 8-neighborhood, that is, the 8 adjacent pixels around the weak edge point, it is regarded as part of the edge, otherwise it is removed as noise; the operation of connecting weak edge points is iterative. If a weak edge point is connected to a strong edge point through the neighborhood check, the weak edge point will be re-marked as an edge, and then the neighborhood check will continue with the newly marked weak edge point as the center until all weak edge points that can be connected to the strong edge point are processed.
[0252] A flashover prediction experiment was carried out based on the existing full-scale fire experimental device. The fire simulation model described in the invention was consistent with the actual full-scale fire experimental layout. The average temperature of the fire ceiling reaching 600°C was taken as the node for entering the flashover stage and the time point was recorded. Six groups of full-scale fire experiments were carried out to verify the effect of the model in predicting flashover. A fire flashover risk prediction model was built based on the heat release rate of the fire source and the methane gas concentration. The prediction result was a time node 30s before the flashover occurred, that is, T2=30s.
[0253] The experimental data obtained are as follows:
[0254]
[0255] The mean absolute error (MAE) is used to measure the average deviation of the prediction:
[0256]
[0257] The average absolute error of all groups is 21 seconds. Among all groups, the largest error is group 2, which is 66 seconds, and the smallest error is group 6, which is only 2 seconds, indicating that the model's prediction in this group is very close to the actual flashover time node. The errors range from 2 seconds to 66 seconds, indicating that the prediction accuracy of the model in different experimental groups fluctuates to a certain extent, but most of the errors are within a small range, especially for groups 1, 3, 4, 5 and 6, the errors are all within 30 seconds, which meets the requirements of early warning.
[0258] Through the above full-scale fire experiment, the following conclusions were drawn: considering the prediction 30 seconds in advance, the average absolute error of the model is 21 seconds, which performs well and can provide accurate flashover warning; the prediction error of most groups is within 30 seconds, which makes the model suitable for the task of warning the occurrence of flashover 30 seconds in advance.
Claims
1. A method for predicting indoor fire flashover risk based on flame morphology and remote sensing data, characterized in that: The steps include: Step 1: Use fire simulation software to simulate fire data and build a fire data set; Step 2: Ignite the fire, obtain the indoor fire flame image through a high-definition camera, and process the obtained image; Step 3: The processed image is passed through the residual network Resnet model to output the real-time heat release rate HRR of the ignition point; Step 4: Use a methane laser remote sensing detector to monitor and obtain methane gas concentration data of a smoke layer at a specific height indoors in real time; Step 5: Build a fire flashover risk prediction model based on the heat release rate of the fire source and the methane gas concentration to predict the flashover risk in advance.
2. The indoor fire flashover risk prediction method based on flame morphology and remote sensing data according to claim 1 is characterized in that: The specific process of using fire simulation software to simulate fire data and construct a fire data set in step 1 is as follows: 1-1. Build a fire combustion model, set the geometric structure of the fire room, the location of the fire source, the heat release rate of the fire source and the area of the fire source; 1-2. Add chemical reactions according to the combustibles to be ignited, set the fuel and oxidant of the reaction, and define the methane produced by incomplete combustion according to the reaction equation; 1-3. Set up a gas monitor just above the fire source, select methane as Species and Volume fraction as Quantity; set up a heat release rate measuring point at a specific distance S just above the fire source; 1-4. Set the simulation time and obtain the simulated gas measurement point data set {V t },V t represents the methane gas concentration data at the tth second; the simulated fire source heat release rate data set {H t },H t represents the heat release rate data of the fire source at the tth second; {V t } and {H t Merge to generate data set t }, where the vertical axis represents different times, and the horizontal axis represents the methane gas concentration parameter and the fire source heat release rate parameter: 1-5. Record the time point t when flashover occurs in the simulation software, i.e. the average temperature of the ceiling of the fire room reaches 600°C flashover .
3. The indoor fire flashover risk prediction method based on flame morphology and remote sensing data according to claim 2 is characterized in that: The specific process of step 2 is as follows: 2-1. For the acquired flame image, use Opencv to measure the height and area of the flame: 2-2. Convert the flame image from BGR to HSV color space, set the HSV color range, extract the flame area, and generate a binary mask matrix, where the pixel value of the flame area is 1 and the pixel value of the non-flame area is 0; the mask is recorded as M(x,y), where (x,y) is the position of each pixel in the image: The white area in the mask represents the flame part; in the HSV color space, the V channel represents the brightness of each pixel. The brightness value of each pixel in the image is V(x,y). The average brightness of the flame area is limited to the flame area through the mask, and the average value of all brightness values in the area is calculated. If the total number of pixels in the flame area is N, the calculation formula for the average brightness is: In the formula, ∑ x,y V(x,y)·M(x,y) represents the sum of all brightness values in the flame area, ∑ x,y M(x,y) represents the total number of pixels in the flame area; The extracted flame area is denoised and filled with holes using morphology; the denoising operation is an opening operation, which is a process of first corrosion and then expansion. For an image A and a structural element B, the corrosion operation is expressed as: Among them, B z represents the translation of the center point of the structural element B at the z position; The dilation operation is expressed as: 2-3. Use Opencv's findContours() function to extract the contour of the flame area, and select the largest contour to represent the main area of the flame; the specific implementation process of the findContours() function is as follows: 2-3-1. Binarize the processed image and convert it into an image containing only two pixel values, 0 and 255. Use the color threshold to set the flame area to white 255 and the background area to black 0. 2-3-2. Use the gradient change of pixel intensity to identify the edge of the image. The edge is located by calculating the gradient of the pixel points in the image. The gradient is defined as the rate of change of the image brightness value. For a given pixel point (x, y), the gradient in the horizontal and vertical directions is calculated by convolution: G x =I(x+1,y)-I(x-1,y) G y =I(x,y+1)-I(x,y-1); Among them, I(x,y) represents the gray value of the pixel. According to the gradient, the direction and amplitude of the image edge are: The position with large gradient, that is, the position with obvious brightness change, is the edge point; 2-3-3. Use the connectivity analysis method to track and group edge pixels and identify connected edge areas, that is, check whether the neighborhood of each pixel has the same pixel value, which is represented by a white area. Use the findContours() function to identify a group of connected edge pixels to form a closed contour. 2-3-4. Based on the chain code representation method, the contour is represented as a series of moving directions between adjacent pixel points. When performing edge tracking, starting from an edge point of the binary image, the next adjacent edge point is determined, and this process is repeated until it returns to the starting point or no new connected edge point can be found, thus forming a closed contour and recording all pixel coordinates in each contour; 2-3-5. After finding the flame outline, calculate the vertical span of the flame area, that is, the height of the flame. The flame height is equal to the maximum Y coordinate value of the flame image outline point minus the minimum Y coordinate value; 2-3-6. After finding the flame contour, use the contourArea() function of OpenCV to calculate the area of the contour. For the pixel coordinate sequence of all the contour points that have been determined (x1, y1), (x2, y2), ..., (x n ,y n ), the area S is expressed in discrete form using Green's formula: n represents the number of contour points; 2-3-7. For the flame video data obtained, extract the flame outline in each frame and calculate its area. The change of the flame area is represented by a time series. The calculation result of the flame area of each frame A(t) constitutes the flame area change sequence with time t. Perform Fourier transform on A(t) and convert it into frequency domain representation F(f), where f is the frequency: Since the frame data of the flame area is a discrete time series, it is calculated using discrete Fourier transform, and its expression is: Where N is the number of samples and k is the discrete frequency index. The spectrum F(f) is obtained by Fourier transform of the flame area time series, where the amplitude of each frequency component corresponds to the intensity of the flame fluctuation at that frequency. The main frequency, i.e., the main fluctuation frequency, is the non-zero frequency with the largest amplitude in the spectrum, indicating the main fluctuation frequency of the flame profile, corresponding to the oscillation or fluctuation of the flame.
4. The indoor fire flashover risk prediction method based on flame morphology and remote sensing data according to claim 3 is characterized in that: The specific process of step three is: 3-1. The height, area, average brightness and fluctuation frequency data of each flame image frame are taken as auxiliary labels and input into the residual network Resnet model. Each image data in the database of the residual network Resnet model has its corresponding HRR label, as well as the flame height, area, average brightness and fluctuation frequency data as auxiliary labels; 3-2. The residual network Resnet model uses ResNet-50 as the backbone network to extract deep features from the flame image, removes the fully connected layer of ResNet-50, retains the convolutional layer, and obtains the high-dimensional feature representation of the flame image; 3-3. The residual network Resnet model predicts auxiliary label features through multiple fully connected layers, captures the physical characteristics of the flame, and improves the prediction accuracy of the heat release rate HRR; 3-4. The residual network Resnet model combines the features output by ResNet-50 with the auxiliary label prediction results, and performs HRR prediction through several fully connected layers. The specific prediction process is as follows: 3-4-1. Use the mean square error MSE loss function to predict the flame height. The formula is: In the formula, h i is the true value of the flame height of the i-th sample, is the model's prediction of flame height; 3-4-2. Use the mean square error MSE loss function to predict the flame area. The formula is: In the formula, a i is the true value of the flame area of the i-th sample, is the model's prediction of the flame area; 3-4-3. Use the mean square error MSE loss function to predict the average flame brightness. The formula is: Where b i is the average brightness true value of the i-th sample, is the model's prediction of the average brightness; 3-4-4. Use the mean square error MSE loss function to predict the flame fluctuation frequency. The formula is: In the formula, f i is the average brightness true value of the i-th sample, is the model's prediction of the average brightness; 3-4-5. Use the mean square error MSE loss function to predict the heat release rate. The formula is: In the formula, r i is the average brightness true value of the i-th sample, is the model's prediction of the average brightness; 3-4-6. The total loss is expressed as: Total loss = 0.2*flame height MSE + 0.2*flame area MSE + 0.2*average brightness MSE + 0.2*fluctuation frequency MSE + 1*heat release rate MSE; Among them, the weight of heat release rate is 1, and the weights of flame height, area, average brightness, and fluctuation frequency are all 0.
2.
5. The indoor fire flashover risk prediction method based on flame morphology and remote sensing data according to claim 4 is characterized in that: The step 5 uses the fire source heat release rate-time data and methane gas concentration-time data in the past T1 seconds as input, and uses the long short-term memory network LSTM model for training to determine whether flashover will occur in the future T2 seconds. The LSTM model includes an input layer, an LSTM feature extraction branch, a heat release rate LSTM branch, a methane gas concentration LSTM branch, a feature fusion layer, a fully connected layer and an output layer; the specific prediction process of the LSTM model is: 5-1. The LSTM model has two input layers, which are used to receive the fire source heat release rate and methane gas concentration time series data within the past T1 seconds: input_hrr: The shape is (T1,1), which represents the heat release rate data of the fire source in the past T1 seconds, with one data point per second; input_methane: The shape is (T1,1), which means the methane concentration data in the past T1 seconds; 5-2. LSTM feature extraction branch process: LSTM is used to extract features from the fire source heat release rate and methane gas concentration series. Each input data branch has an independent LSTM layer, which is used to capture the time dependence of the fire source heat release rate and methane gas concentration. The LSTM layer contains multiple LSTM units. In time step t, the output calculation process of each LSTM unit is: 5-2-1. Calculate the forget gate f t : f t =σ(W f ·[h t-1 ,x t ]+b f ); Among them, W f is the weight matrix of the forget gate, connecting h t-1 and x t ;h t-1 is the hidden state of the previous time step; x t is the input of the current time step; b f is the bias term of the forget gate; σ represents the sigmoid function, which limits the output value to [0,1]; The forget gate is used to determine the previous memory state C t-1 The part that needs to be forgotten; 5-2-2. Input gate i t and candidate memory The input gate determines how much of the current input information is written into the memory cell: i t =σ(W i ·[h t-1 ,x t ]+b i ) W i and W C are the weight matrices of the input gate and candidate memory cells respectively; b i and b C is a bias term; tanh is a hyperbolic tangent activation function that limits the output value to between [-1,1]; 5-2-3. Update memory unit C t : 5-2-4, Output Gate o t and the hidden state h t : h t =o t ·tanh(C t ); The output gate determines the output content of the hidden state and passes it to the next layer; W o is the weight matrix of the output gate, connecting h t-1 and x t ; b o is the bias term of the output gate; 5-3. Heat release rate LSTM branching process: 5-3-1. The first layer of LSTM units has 64 units. return_sequences = True makes it output the features of each time step so that the next layer of LSTM can continue to process the sequence data. 5-3-2. The second layer of LSTM units has 32 units, and return_sequences = False makes it output the features of the last time step, which is used to summarize the information of the previous time step; 5-4. Methane gas concentration LSTM branching process: 5-4-1. The first layer of LSTM units has 64 hidden units, which are used to output the features of each time step; 5-4-2. The second layer of LSTM units has 32 hidden units, which are used to output the features of the last time step; 5-5. Feature fusion layer performs feature fusion: The time series features of HRR and methane gas concentration are extracted through the features output by the heat release rate LSTM branch and the methane gas concentration LSTM branch, and the two feature vectors are merged to form a comprehensive feature vector; 5-6. Based on the fused features, two fully connected layers are used to further extract features, and these features are used to predict the probability of flashover. The first fully connected layer contains 64 neurons, and the activation function is RELU, which is used to extract the deep relationship of the fused features. The second fully connected layer contains 32 neurons, and the activation function is RELU, which is used to further reduce the feature space. 5-7. The final output layer is a binary classification output, which is used to determine whether flashover will occur within the next T2 seconds. The specific process is as follows: 5-7-1. Use the sigmoid activation function to limit the output range to [0,1]. 0 means no flashover is predicted, and 1 means flashover is predicted. The sigmoid activation function maps the output to the probability space. For the input feature z, the mathematical expression of the sigmoid activation function is: Output of the sigmoid activation function It indicates the predicted probability of flashover: if If it is close to 1, the LSTM prediction model determines that "flashover will occur". If it is close to 0, the LSTM prediction model determines that "flashover will not occur"; the threshold is set to 0.5, and the predicted flashover probability is converted into a binary classification result: 5-7-2. Use the binary cross entropy loss function to measure the difference between the prediction results of the LSTM prediction model and the actual label. Set the Adam optimizer and Accuracy as evaluation indicators to evaluate the credibility of the prediction model during the training process. The specific process is as follows: 5-7-2.
1. Gradient calculation: For each parameter θ t , first calculate the gradient of the loss function L(θ) with respect to the parameters: 5-7-2.
2. First-order momentum estimation: Adam uses the exponential weighted average method to calculate the first-order momentum estimate of the gradient, that is, the mean of the gradient, denoted by m t is the weighted moving average of the gradient: m t =β1·m t-1 +()1-β1)·g t Among them, β1 is the decay rate of momentum, which is 0.9; m t It is the exponentially weighted average of the gradient, which approximately represents the direction of the gradient; 5-7-2.
3. Second-order momentum estimation: Adam uses the square of the gradient to calculate the second-order momentum estimate, that is, the variance of the gradient, denoted by v t is the weighted moving average of the squared gradient: v t =β2·v t-1 +((1-β2)·g t 2 Among them, β2 is the decay rate of variance, which is 0.999; v t is the exponentially weighted average of the squared gradients; 5-7-2.
4. Deviation correction: Due to m t and v t The calculations all use exponential weighted averages, so there will be deviations in the early stages of training. Adam corrects the deviations using the following formula: t * is the current time step, that is, the current iteration number of training; 5-7-2.
5. Parameter update: Adam uses the corrected momentum and variance estimates to update the parameters. The update formula is: Where α is the learning rate; ε is a small constant used to prevent division by zero errors; 5-7-2.
6. Accuracy refers to the ratio of the number of samples predicted correctly to the total number of samples; Among them, TP is the number of positive examples correctly predicted by the model; TN is the number of negative examples correctly predicted by the model; FP is the number of positive examples incorrectly predicted by the model; FN is the number of negative examples incorrectly predicted by the model.
6. The indoor fire flashover risk prediction method based on flame morphology and remote sensing data according to claim 3 is characterized in that: In step 2-3-2, the process of determining the position with a large gradient is as follows: Using the Canny algorithm, the threshold T is set, and its endpoints are T l and T h , when the gradient size G ≥ T h When the gradient size T l ≤G<T h When , the pixel point is marked as a weak edge point; for a weak edge point, if there is a strong edge point within the 8 adjacent pixels around the edge of the weak point, it is regarded as part of the edge, otherwise it is removed as noise; the weak edge points are connected through iterative operations, and if a weak edge point is connected to a strong edge point through a neighborhood check, the weak edge point is re-marked as an edge, and then the neighborhood check is continued with the newly marked weak edge point as the center until all weak edges that can be connected to strong edge points are processed.
Citation Information
Patent Citations
BIM data-based method and system for dispatching and allocating fire-fighting resources in building
CN117035323A
Pipe gallery fire risk assessment method based on convolutional neural network image processing
CN118015198A
Sensor device for fire detecting and Power system with the same
KR102594191B1
Cited By
Earthquake early warning system, method and equipment with harmful gas detection function
CN119863915A
Fixed, movable and fixed-movable collaborative flashover grading early warning device and application method thereof
CN120544323A
Unmanned aerial vehicle cluster collaborative fire extinguishing method and system for building fire
CN122111097A
A method and system for collaborative firefighting using drone swarms in building fires
CN122111097B