Two-way predictive system between flame shape and regulated physical quantities

CN117574153BActive Publication Date: 2026-10-23CHINA ACAD OF SAFETY SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311574367.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2026-10-23
Estimated Expiration
2043-11-23

AI Technical Summary

Benefits of technology

[0018](1)现有的训练方法是根据物理量来预测火焰的形态,无法完成从火焰图像识别出火焰形态,反向推测出物理量;其次,从火焰形态到物理量的预测可以用卷积神经网络等实现,从物理量到火焰形态的预测可以使用扩散模型等实现,但是若想实现双向预测单独训练两个网络是繁琐的,本发明提出能使用训练后的单一模型实现火焰形态和调控物理量之间的双向预测;从火焰形态预测物理量,能够为火灾事后的事故调查提供调控物理量还原的能力;(2)目前理论上可以实现从图像到物理量之间双向预测的方法有自动编码器模型和变分自动编码器模型;对于自动编码器模型,其理论上可以实现图像的编码和解码功能,从而实现双向预测的两个方面,但由于调控火焰的物理量一般只有少数几个,因此编码的维度非常小,编码解码效果较差且训练不易收敛;对于变分自动编码器模型,要求中间的物理量接近于N(0,1)的正态分布,这不符合物理量的数学特性;本发明保留变分自动编码器的采样生成功能,并在最后一层卷积层之后的全连接层插入了调控物理量的神经节点层,从而保证物理量能准确预测的同时具备较强的图像生成能力,并且模型具备良好的收敛性;(3)为了增强模型的泛化能力和收敛性,系统设计了自动构建并确定卷积层和反卷积层层数的功能,能同时应对高分辨率图像和低分辨率图像的输入和预测。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117574153B_ABST
    Figure CN117574153B_ABST
Patent Text Reader

Abstract

The application discloses a bidirectional prediction system between flame forms and regulation physical quantities, and the regulation physical quantity output by a bidirectional prediction model after a flame image in a data set and the real corresponding regulation physical quantity are as close as possible; and the flame image output by the bidirectional prediction model after the regulation physical quantity in the data set and the real corresponding flame image are also as close as possible, so that the bidirectional prediction function between the flame form picture and the regulation physical quantity of the flame form is achieved, the visualization prediction ability in the flame form research field is enhanced, the reduction ability of the regulation physical quantity for post-fire accident investigation is provided, the flame form can be quickly predicted, and the difficulty of long-time numerical simulation and new on-site experiment arrangement in traditional flame form prediction is overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fire protection, and in particular to a method and system for training a two-way predictive model between flame morphology and control physical quantities. Background Technology

[0002] Fire is one of the most serious disasters endangering people's lives and safety. Major fires caused by gas leaks occur frequently, leading to a surge in research on the behavior and mechanisms of such jet fires. In jet fire research, the deflection angle between the jet direction and the direction of gravity, the direction of ambient wind, and the jet gas velocity all affect the morphology and behavior of the flame. Currently, some researchers have experimentally recorded the flame morphology under different controlled physical quantities and averaged the images over time to obtain time-averaged flame images, ignoring flame oscillations. These time-averaged flame images can further provide information such as the flame deflection angle, flame length, and flame height. Finally, through dimensionless analysis and fitting, predicted values ​​for the flame deflection angle, flame length, and flame height are obtained when the controlled physical quantities are known. The resulting fitted correlations will help determine safe fire distances, protecting lives and property.

[0003] However, the information obtained through dimensionless fitting has significant limitations. For example: ① Flame information obtained through fitting is always non-visual; directly predicting flame images by controlling physical quantities would be more helpful in understanding the behavior of flames. ② Conversely, dimensionless fitting cannot map images to the physical quantities controlling the flame's shape at the time of the event; yet, we know that determining the controlling physical quantities at the time of obtaining a flame image would help investigate the accident and reconstruct the scene. ③ Dimensionless fitting is a slow, non-intelligent process, especially since exponential parameters require multiple attempts to successfully fit a satisfactory computational correlation, consuming a very long time. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for training a bidirectional prediction model between flame morphology and control physical quantities, thereby solving the aforementioned technical problems pointed out in the prior art.

[0005] This invention provides a bidirectional prediction method between flame morphology and controllable physical quantities, comprising the following steps:

[0006] Obtain a fire experiment dataset; the fire experiment dataset includes multiple flame morphology diagrams and a set of control physical quantities; the set of control physical quantities includes multiple control physical quantities.

[0007] The model training dataset is constructed based on all the preprocessed flame morphology images obtained after performing preprocessing operations on the fire experiment dataset and the corresponding normalized control physical quantity groups of the preprocessed flame morphology images.

[0008] The model training dataset is divided into a model training set and a model evaluation set.

[0009] Bidirectional prediction model training: Construct a bidirectional prediction encoder-decoder deep neural network model; train the bidirectional prediction model based on the model training set to obtain a trained bidirectional prediction model;

[0010] Determine whether the evaluation result obtained by evaluating the trained bidirectional prediction model using the model evaluation set has reached the preset evaluation completion condition; if yes, output the bidirectional prediction model; if no, adjust the hyperparameters of the trained bidirectional prediction model and return to the above "bidirectional prediction model training" operation for retraining until the evaluation result reaches the preset evaluation completion condition, and output the bidirectional prediction model.

[0011] Accordingly, the present invention provides a two-way prediction system between flame morphology and controllable physical quantities, including a data preprocessing module, a two-way prediction model training module, and a two-way prediction model evaluation module.

[0012] The data preprocessing module is used to acquire a fire experiment dataset; the fire experiment dataset includes multiple flame pattern diagrams and a set of control physical quantities, the set of control physical quantities including multiple control physical quantities.

[0013] The model training dataset is constructed based on all the preprocessed flame morphology images obtained after performing preprocessing operations on the fire experiment dataset and the corresponding normalized control physical quantity groups of the preprocessed flame morphology images.

[0014] The bidirectional prediction model training module divides the model training dataset into a model training set and a model evaluation set.

[0015] Bidirectional prediction model training: Construct a bidirectional prediction model; train the bidirectional prediction model based on the model training set to obtain a trained bidirectional prediction model;

[0016] The bidirectional prediction model evaluation module is used to determine whether the evaluation result obtained by evaluating the trained bidirectional prediction model using the model evaluation set has reached the preset evaluation completion condition; if yes, the bidirectional prediction model is output; if no, the hyperparameters of the trained bidirectional prediction model are adjusted and the above "bidirectional prediction model training" operation is returned for retraining until the evaluation result reaches the preset evaluation completion condition, and the bidirectional prediction model is output.

[0017] Compared with the prior art, the present invention has the following technical advantages:

[0018] (1) Existing training methods predict the shape of flames based on physical quantities, which cannot identify the shape of flames from flame images and infer the physical quantities in reverse. Secondly, the prediction from flame shape to physical quantity can be achieved by convolutional neural networks, and the prediction from physical quantity to flame shape can be achieved by diffusion models, but training two networks separately to achieve bidirectional prediction is cumbersome. This invention proposes to achieve bidirectional prediction between flame shape and control physical quantity using a single trained model. Predicting physical quantity from flame shape can provide the ability to restore control physical quantity for post-fire accident investigation. (2) Currently, the methods that can theoretically achieve bidirectional prediction from images to physical quantities are autoencoder models and variational autoencoder models. For autoencoder models, they can theoretically achieve image encoding and decoding functions. Yes, thus achieving two aspects of bidirectional prediction. However, since there are generally only a few physical quantities that regulate the flame, the coding dimension is very small, the coding and decoding effect is poor, and the training is not easy to converge. For the variational autoencoder model, the physical quantities in the middle are required to be close to the normal distribution of N(0,1), which does not conform to the mathematical characteristics of physical quantities. This invention retains the sampling and generation function of the variational autoencoder and inserts the neural node layer that regulates physical quantities into the fully connected layer after the last convolutional layer, thereby ensuring that the physical quantities can be accurately predicted while having a strong image generation capability, and the model has good convergence. (3) In order to enhance the generalization ability and convergence of the model, the system is designed to automatically construct and determine the number of convolutional and deconvolutional layers, which can simultaneously handle the input and prediction of high-resolution and low-resolution images. Attached Figure Description

[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of the operation process for training a bidirectional rapid prediction model between flame morphology and controllable physical quantities provided in Embodiment 1 of the present invention.

[0021] Figure 2 This is a schematic diagram simulating the operation steps of a training method for a bidirectional rapid prediction model between flame morphology and controllable physical quantities provided in Embodiment 1 of the present invention.

[0022] Figure 3This is a schematic diagram of the loss function curve simulation of the training model in the training method of a bidirectional fast prediction model between flame morphology and control physical quantities provided in Embodiment 1 of the present invention.

[0023] Figure 4 This is a schematic diagram of the operation steps for training a bidirectional prediction model in a training method for a rapid bidirectional prediction model between flame morphology and control physical quantities provided in Embodiment 1 of the present invention.

[0024] Figure 5 A deep learning model diagram for a training method of a bidirectional fast prediction model between flame morphology and control physical quantities provided in Embodiment 1 of the present invention.

[0025] Figure 6 In the training method of the bidirectional fast prediction model between flame morphology and control physical quantities provided in Embodiment 1 of the present invention, the number of intermediate layers L is calculated and obtained. mid A diagram illustrating the operation steps;

[0026] Figure 7 In the training method of the bidirectional fast prediction model between flame morphology and control physical quantities provided in Embodiment 1 of the present invention, the number of intermediate layers L is calculated and obtained. mid A schematic diagram simulating the operation steps;

[0027] Figure 8 The first embodiment of the present invention provides a schematic diagram of the operation steps for training a bidirectional fast prediction model between flame morphology and control physical quantities and outputting the predicted control physical quantities.

[0028] Figure 9 The first embodiment of the present invention provides a schematic diagram of the operation steps for training a bidirectional fast prediction model between flame morphology and control physical quantities to output a predicted flame morphology map.

[0029] Figure 10 The diagram below illustrates the steps for calculating and obtaining the loss function in a training method for a bidirectional fast prediction model between flame morphology and control physical quantities, provided in Embodiment 1 of this invention.

[0030] Figure 11 The present invention provides a training method for a bidirectional fast prediction model between flame morphology and control physical quantities, which evaluates two images predicted by a dataset at different times.

[0031] Figure 12 The first embodiment of the present invention provides a training method for a bidirectional fast prediction model between flame morphology and control physical quantities, which can be arbitrarily selected from two examples.

[0032] Figure 13The first embodiment of the present invention provides a schematic diagram of the overall architecture of a training system for a bidirectional rapid prediction model between flame morphology and controllable physical quantities.

[0033] Figure labeling: Data preprocessing module 10; Bidirectional prediction model training module 20; Bidirectional prediction model evaluation module 30; Intermediate layer calculation submodule 21; Prediction submodule from flame image to control physical quantity 22; Prediction submodule from control physical quantity to flame image 23; Loss function calculation submodule 24; End of training judgment submodule 25. Detailed Implementation

[0034] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0035] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings.

[0036] Example 1

[0037] like Figure 1 or Figure 2 As shown, this invention proposes a training method for a bidirectional fast prediction model between flame morphology and control physical quantities, comprising the following steps:

[0038] Step S10: Obtain the fire experiment dataset; the fire experiment dataset includes multiple flame morphology diagrams and a set of control physical quantities, the set of control physical quantities includes multiple control physical quantities;

[0039] It should be noted that the above fire experiment dataset is used to train a bidirectional fast prediction model between flame morphology and control physical quantities; the above control physical quantities refer to the physical quantities that control flame morphology, or the vector that controls flame morphology.

[0040] For example, in a propane-fueled jet fire, the ambient fire pressure varies from 40 kPa to 80 kPa, and the propane injection flow rate varies from 3 L / min to 10 L / min. Therefore, the physical quantities that control the flame pattern are the ambient pressure p and the propane injection flow rate. The dataset of flame morphology and regulating physical quantities established accordingly was used to train a deep neural network to obtain a bidirectional prediction model.

[0041] Step S20: Preprocess each of the flame morphology diagrams to obtain preprocessed flame morphology diagrams; normalize the control physical quantity group to obtain a normalized control physical quantity group; construct a model training dataset based on all the preprocessed flame morphology diagrams and all the normalized control physical quantity groups.

[0042] It should be noted that the above preprocessing includes image cropping, image scaling, and physical quantity normalization. Specifically, each flame shape image is cropped so that the selected flame shape occupies more than 30% of the entire image area, while ensuring that the pixel size of each image is consistent; the physical quantities that control the flame shape are normalized; and a dataset is formed.

[0043] For example: After cropping, the flame image is uniformly sized to 200×200 pixels, with the flame portion occupying more than 30% of the space; each controllable physical quantity is normalized based on the difference between its maximum value (Max) and minimum value (Min).

[0044] Step S30: Divide the model training dataset into a model training set and a model evaluation set;

[0045] After constructing the dataset, the training set and the evaluation set are divided in a 7:3 ratio. 70% of the data in the model training dataset is selected for model training, and 30% of the data is selected for model evaluation.

[0046] Step S40: Bidirectional prediction model training: Construct a bidirectional prediction model; Train the bidirectional prediction model based on the model training set to obtain a trained bidirectional prediction model;

[0047] It should be noted that the above bidirectional prediction model includes bidirectional prediction between flame morphology images and control physical quantities, that is, flame morphology images predict control physical quantities and control physical quantities predict flame morphology images.

[0048] Among them, the prediction of the physical quantity of the flame shape image refers to the prediction of the physical quantity of the control from the flame image in the network when the flame shape image is used as the input and the physical quantity of the control is used as the quantity to be predicted (i.e., input flame shape image, output predicted physical quantity of control).

[0049] The above-mentioned prediction of flame morphology image by regulating physical quantity refers to the prediction from regulating physical quantity to flame image when the regulating physical quantity is used as the input quantity and the flame morphology image is used as the quantity to be predicted (i.e., the input is the regulating physical quantity and the output is the predicted flame morphology image).

[0050] Step S50: Evaluate the trained bidirectional prediction model using the model evaluation set to obtain the evaluation result; determine whether the evaluation result has reached the preset evaluation completion condition; if yes, output the bidirectional prediction model; if no, adjust the hyperparameters of the trained bidirectional prediction model and return to the "bidirectional prediction model training" operation in step S40 above for retraining until the training is completed and output the bidirectional prediction model.

[0051] The preset evaluation completion condition refers to the convergence of the evaluation results, that is, the loss function shows a downward trend.

[0052] It should be noted that after constructing the network, the training set is used to train the network. 70% of the training set is used for training, and 30% for testing, for a total of 1000 training epochs. The evolution curve of the loss function during the training process is shown below. Figure 3 As shown. First, a significant drop in the loss function is observed, indicating that the training is progressing towards convergence. If this is not the case, the hyperparameters are changed and the model is retrained. In this embodiment, the trained bidirectional prediction model is evaluated using an evaluation dataset. If the evaluation result is unsatisfactory, the model hyperparameters are changed, and the process returns to step S40 to retrain, obtaining the bidirectional prediction model.

[0053] As a key feature of this invention, the number of convolutional and deconvolutional layers in a deep neural network can be automatically determined according to the task, simplifying the modeling steps and reducing the difficulty of model training convergence. The specific operation is as follows.

[0054] like Figure 4 As shown, in step S40, the bidirectional prediction model is trained based on the model training set to obtain a trained bidirectional prediction model, including the following steps:

[0055] Step S41: Calculate the number of intermediate layers L based on the pixel size of the preprocessed flame morphology image. mid ;

[0056] Step S42: Input the preprocessed flame morphology image into the bidirectional prediction model, and output the predicted control physical quantity after passing through the number of convolutions in the intermediate layers; and input the normalized control physical quantity group into the bidirectional prediction model, and output the predicted flame morphology image after passing through the number of deconvolutions in the intermediate layers.

[0057] Step S43: Calculate and obtain the loss function based on the preprocessed flame morphology diagram, the predicted flame morphology diagram, the normalized control physical quantity, and the predicted control physical quantity.

[0058] Step S44: When the loss function reaches the preset end-training condition, the training ends, and the model parameters are updated using the loss function to obtain the trained bidirectional prediction model.

[0059] See Figure 6-7 In step S41, the number of intermediate layers L is calculated based on the pixel size of the preprocessed flame pattern image. mid The operation includes the following steps:

[0060] Step S411: Obtain the pixel height H corresponding to all the preprocessed flame morphology images. ini and pixel width W ini ;

[0061] Step S412: Based on the pixel height H ini With pixel width W ini Construct the maximum pixel height and width max(W) ini H ini );

[0062] Step S413: Based on the maximum pixel height and width max(W) ini H ini ) Calculate and obtain the number of convolutional layers (i.e., the number of intermediate layers) L mid ;

[0063] The number of convolutional layers L mid The calculation method is as follows:

[0064]

[0065] In the formula, Ceil{} is the floor function; P is the maximum number of pixels in the image after the last convolutional layer.

[0066] It should be noted that after determining the number of intermediate layers in the convolutional layer using the above calculation steps, the stride of each convolutional layer is 2 along both width and height. After the calculation of each convolutional layer, the image is reduced to 1 / 4 of its original size. mid After the convolutional computation of the layers, the resulting image will have a length and width of less than P pixels. This final image will also be flattened and directly connected to the neural nodes that control the physical quantities. In this way, the image size transitions smoothly, and the final image will not have too many pixels, which would make the training process difficult to converge. After determining the number of intermediate layers in the convolutional layers, the number of intermediate layers in the deconvolutional layers is also L. mid Each layer can be viewed as the inverse process of convolutional layer computation; the stride of each convolutional layer is 2 along both width and height.

[0067] In addition to the steps above, after the first convolutional layer, the number of image channels changes from RGB three channels to M. Thereafter, after each nth (n>1) convolutional layer, the number of channels changes from M·2. n-2 Become M·2 n-1 Similarly, after each nth deconvolutional layer from the end, the number of channels increases from M·2. n-2 Become M·2 n-1 ;

[0068] To enhance the generalization ability and convergence of the model, this invention calculates the number of intermediate layers L. mid This allows for the automatic construction and determination of the number of convolutional and deconvolutional layers, enabling the simultaneous handling of both high-resolution and low-resolution image inputs and predictions. This simplifies the modeling process and reduces the difficulty of model training convergence. Furthermore, see [link to other documentation]. Figure 5 The invention retains the sampling and generation function of the variational autoencoder and inserts a neural node layer that controls physical quantities into the fully connected layer after the last convolutional layer. This ensures that physical quantities can be accurately predicted while having strong image generation capabilities, and the model has good convergence.

[0069] like Figure 8 As shown, in step S42, the preprocessed flame morphology diagram is input into the bidirectional prediction model, and the predicted control physical quantity is output after passing through the intermediate convolution layers. This includes the following steps:

[0070] Step S421: Perform a convolution operation on the flame shape image to obtain the convolved image;

[0071] It should be noted that the above embodiments of this application use L to visualize the flame shape image. mid After the convolution operation of the layer, a smaller convolutional image is obtained;

[0072] Step S422: Flatten the convolved image to obtain a flame vector group;

[0073] It should be noted that the convolved image is usually a three-dimensional tensor, where the first dimension represents the number of channels, and the second and third dimensions represent the height and width of the image; the flattening process described above transforms this three-dimensional tensor into a one-dimensional vector (i.e., the resulting flame vector group); the above embodiment of this application flattens the convolved image into a set of vectors (i.e., the flame vector group), and the flame vector group is connected to neurons with the same number of control physical quantities in the control physical quantity group;

[0074] It should be noted that the embodiments of this application first process the flame shape image through convolution with a convolution kernel to obtain a convolutional image. This convolution kernel can extract features from the input flame shape image. In this way, a convolutional image with fewer dimensions and richer feature information can be obtained. The convolutional image (also called a "feature map") is then flattened to obtain a flame vector group. This means that the convolutional image is unfolded into a long vector containing all feature information. The flattened flame vector group has lower dimensions and can be more conveniently used in model training and prediction. In this way, the original flame shape image can be converted into a vector group, thereby enabling better analysis and processing.

[0075] Specifically, such as Figure 9 As shown, in step S42, the normalized control physical quantity group is input into the bidirectional prediction model, and the predicted flame morphology map is output after passing through the intermediate layers and deconvolution times. The steps include the following:

[0076] Step S4201: Traverse all the normalized control physical quantity groups and calculate the sampled average vector μ and the sampled logarithmic mean square error vector lnσ of the normalized control physical quantity groups;

[0077] Step S4202: Calculate and obtain the new sampling result vector x corresponding to the current control physical quantity group based on the sampling average vector μ and the sampling logarithmic mean square error vector lnσ. * ;

[0078] The new sampling result vector x * The calculation method is as follows:

[0079]

[0080] In the formula, ε is a random variable that follows a standard normal distribution N(0,1);

[0081] Step S4203: Convert the new sampling result vector x * After performing deconvolution to obtain vectors that are then overlaid into an image, image processing operations are performed to obtain the predicted flame shape image.

[0082] The size of the predicted flame shape image is the same as the size of the flame shape image.

[0083] It should be noted that the aforementioned predictive control physical quantities and the predicted flame morphology diagram are trained simultaneously, and are connected at the neural network unit nodes where the control physical quantities are located, forming a deep neural network trained simultaneously.

[0084] Currently, theoretically, methods for bidirectional prediction from images to physical quantities include autoencoder models and variational autoencoder models. Autoencoder models can theoretically perform image encoding and decoding, thus enabling bidirectional prediction. However, since the physical quantities controlling a flame are generally only a few, the encoding dimension is very small, resulting in poor encoding / decoding performance and difficulty in training convergence. Variational autoencoder models require the intermediate physical quantities to approximate a normal distribution of N(0,1), which does not conform to the mathematical properties of physical quantities. The second feature of this system is that it retains the sampling and generation function of the variational autoencoder and inserts a neural node layer controlling physical quantities on the fully connected layer after the last convolutional layer. This ensures accurate prediction of physical quantities while possessing strong image generation capabilities, and the model exhibits good convergence.

[0085] The above-described embodiment of this application first samples the normalized control physical quantity group and calculates its sampling average vector and sampling logarithmic mean square error vector. These two vectors are indicators for evaluating the distribution of the control physical quantity group and can be used to determine whether the sampling results are reasonable. Then, a new sampling result vector is calculated based on the sampling average vector and sampling logarithmic mean square error vector. By adding random quantities for calculation, the calculated sampling result vector can have a certain degree of randomness and diversity, more realistically reflecting the distribution of the control physical quantities of the flame. Finally, the calculated new sampling result vector is deconvolved to obtain a reconstituted image. The deconvolution operation is the inverse process of the convolution operation, which can restore the original image shape. Then, image processing operations are performed on the reconstituted image to obtain the predicted flame shape image. This process actually starts from the control physical quantities, and after calculation and processing, finally obtains the predicted flame shape.

[0086] like Figure 10 As shown, in step S43, the loss function includes three parts: the loss function between the preprocessed flame morphology diagram and the predicted flame morphology diagram, the loss function between the controlled physical quantity and the predicted controlled physical quantity, and the relative entropy between the sampled average vector μ and the sampled logarithmic mean square error vector lnσ calculated in the process of predicting the controlled physical quantity. The specific operation is as follows:

[0087] Step S431: Calculate and obtain the first loss function loss1 between the preprocessed flame pattern map and the predicted flame pattern map;

[0088] The first loss function can be mean squared error, variance, mean absolute difference, cross entropy, etc.

[0089] Step S432: Calculate and obtain the second loss function loss2 between the normalized control physical quantity and the predicted control physical quantity;

[0090] The second loss function can be mean squared error, variance, mean absolute difference, binary cross-entropy, etc.

[0091] Step S433: Calculate the relative entropy loss of the distribution formed by the sampled average vector μ and the sampled logarithmic mean square error vector lnσ. p ;

[0092] Step S434: Preset weights a for the first loss function, b for the second loss function, and c for the relative entropy;

[0093] Step S435: Calculate and obtain the loss function based on the weights a, b, c, the first loss function, the second loss function, and the relative entropy;

[0094] The loss function is calculated as follows:

[0095] Loss = loss1×a + loss2×b + loss p ×c;

[0096] It should be noted that the above embodiments of this application use the difference between the actual controlled physical quantity and the predicted controlled physical quantity (i.e., the second loss function mentioned above), the difference between the actual flame shape image and the predicted flame shape image (i.e., the first loss function mentioned above), and the relative entropy of the distribution composed of μ and σ to calculate the total loss function (i.e., Loss) to evaluate the quality of the model prediction. The goal is to minimize the total loss function, thereby optimizing the accuracy of bidirectional prediction.

[0097] For example, continuing the example from the previous embodiment, the loss function between the actual flame shape image and the predicted flame shape image is calculated using a binary cross-entropy function, the loss function between the actual control physical quantity and the predicted control physical quantity is calculated using a mean squared error function, and the relative entropy of the distribution formed by μ and σ is the third part of the loss function. Considering the difference in magnitude between the three parts of the loss function, the weight ratio of the three parts is set to 1000:300:1. The optimizer used for model training is the Adam method, and the learning rate is set to 0.001.

[0098] Based on the calculations in steps S411 to S413 above, the P value is set to 50. Calculate...

[0099] Therefore, the network contains two convolutional layers and two deconvolutional layers. The scale change of a single image data after being processed by the deep network is as follows:

[0100] ① The initial flame shape image size is changed from a tensor of size (3, 200, 200) to a tensor of size (32, 100, 100) after passing through the first convolutional layer;

[0101] ②After passing through the second convolutional layer, it becomes a quantity with a size of (64, 50, 50);

[0102] ③Then it is flattened into a vector of size (1, 1, 160000) and connected to a vector of size (1, 1, 2) composed of predicted control physical quantities;

[0103] ④ The physical quantities are connected to μ and σ of size (1, 1, 2) respectively;

[0104] ⑤ After renormalizing μ and σ, x is formed with a size of (1, 1, 2). * ;

[0105] ⑥x *It is concatenated with a vector of size (1,1,160000) and then converted into a tensor of size (64,50,50);

[0106] ⑦ A tensor of size (64, 50, 50) is transformed into a tensor of size (32, 100, 100) through a deconvolution layer;

[0107] ⑧ A tensor of size (32, 100, 100) is transformed into a tensor of size (3, 200, 200) through a deconvolution layer, which is the predicted image.

[0108] After constructing the network, it was trained using the training set, which was used 90% for training and 10% for testing, for a total of 2000 epochs. The evolution curve of the loss function during training was observed. First, a significant decrease in the loss function was observed, indicating that the training was progressing towards convergence. If this was not the case, the hyperparameters were changed and the model was retrained. Second, the decreasing trends of the loss function values ​​on the training and test sets were consistent, indicating that the model did not exhibit overfitting or underfitting. If overfitting or underfitting was observed, the hyperparameters were changed and the model was retrained.

[0109] After training the network, it is tested using an evaluation dataset. If the test results are satisfactory, the process ends; otherwise, the hyperparameters are changed and the model is retrained. Figure 11 The image shown represents two images predicted from the evaluation dataset at different times. As the training epochs increase, the predicted flame shape increasingly approximates the real flame shape, thus achieving the prediction from controlling physical quantities to flame shape images. Furthermore, by inputting real flame shape images into the deep network, the physical quantities controlling the flame shape can be predicted. Figure 12 For any two randomly selected instances, we can see that the prediction error is within 5%.

[0110] In step S44, the preset end-of-training condition is that the loss function is less than or equal to the preset minimum threshold of the loss function.

[0111] Example 2

[0112] like Figure 13 As shown, the present invention proposes a training system for a bidirectional fast prediction model between flame morphology and control physical quantities, including a data preprocessing module 10, a bidirectional prediction model training module 20, and a bidirectional prediction model evaluation module 30.

[0113] The data preprocessing module 10 is used to acquire a fire experiment dataset; the fire experiment dataset includes multiple flame pattern diagrams and a set of control physical quantities; the set of control physical quantities includes multiple control physical quantities.

[0114] Each flame morphology image is preprocessed to obtain a preprocessed flame morphology image; the control physical quantity group is normalized to obtain a normalized control physical quantity group; a model training dataset is constructed based on all the preprocessed flame morphology images and all the normalized control physical quantity groups.

[0115] The bidirectional prediction model training module 20 divides the model training dataset into a model training set and a model evaluation set.

[0116] Bidirectional prediction model training: Construct a bidirectional prediction model; train the bidirectional prediction model based on the model training set to obtain a trained bidirectional prediction model;

[0117] The bidirectional prediction model evaluation module 30 is used to evaluate the trained bidirectional prediction model using the model evaluation set and obtain the evaluation result; determine whether the evaluation result has reached the preset evaluation completion condition; if yes, output the bidirectional prediction model; if no, adjust the hyperparameters of the trained bidirectional prediction model and return to the above "bidirectional prediction model training" operation for retraining until the training is completed and output the bidirectional prediction model.

[0118] The preset evaluation completion condition refers to the convergence of the evaluation results, that is, the loss function shows a downward trend.

[0119] Preferably, the bidirectional prediction model training module 20 includes an intermediate layer calculation submodule 21, a prediction submodule 22 from flame image to control physical quantity, a prediction submodule 23 from control physical quantity to flame image, a loss function calculation submodule 24, and a training termination judgment submodule 25.

[0120] The intermediate layer number calculation submodule 21 is used to calculate and obtain the intermediate layer number L based on the pixel size of the preprocessed flame pattern image. mid ;

[0121] The prediction submodule 22, which transforms flame images into control physical quantities, is used to input the preprocessed flame morphology image into a bidirectional prediction model and output the predicted control physical quantities after passing through the number of convolutions in intermediate layers.

[0122] The prediction submodule 23, which transforms the controlled physical quantities into flame images, is used to input the normalized controlled physical quantity group into the bidirectional prediction model and output the predicted flame morphology image after passing through the number of deconvolutions in the intermediate layers.

[0123] The loss function calculation submodule 24 is used to calculate and obtain the loss function based on the preprocessed flame pattern diagram, the predicted flame pattern diagram, the normalized control physical quantity, and the predicted control physical quantity.

[0124] The training termination judgment submodule 25 is used to terminate training when the loss function reaches the preset training termination condition, and update the model parameters using the loss function to obtain the trained bidirectional prediction model.

[0125] The preset end-of-training condition is that the loss function is less than or equal to the preset minimum threshold of the loss function.

[0126] Preferably, the intermediate layer calculation submodule 21 is specifically used to obtain the pixel height H corresponding to all the preprocessed flame morphology images. ini and pixel width W ini ;

[0127] Based on the pixel height H ini With pixel width W ini Construct the maximum pixel height and width max(W) ini H ini );

[0128] Based on the maximum pixel height and width max(W) ini H ini ) Calculate and obtain the number of convolutional layers L mid ;

[0129] The number of convolutional layers L mid The calculation method is as follows:

[0130]

[0131] In the formula, Ceil{} is the floor function;

[0132] Preferably, the prediction submodule 22 from the flame image to the control physical quantity is specifically used to perform a convolution operation on the flame shape image to obtain a convolutional image;

[0133] The convolved image is flattened to obtain a group of flame vectors.

[0134] Preferably, the prediction submodule 23 from the control physical quantity to the flame image is used to traverse all the normalized control physical quantity groups and calculate the sampled average vector μ and the sampled logarithmic mean square error vector lnσ of the normalized control physical quantity groups.

[0135] The new sampling result vector x corresponding to the current group of controlled physical quantities is calculated based on the sampling average vector μ and the sampling logarithmic mean square error vector lnσ. * ;

[0136] The new sampling result vector x * The calculation method is as follows:

[0137]

[0138] In the formula, ε is a random variable;

[0139] The new sampling result vector x * After performing deconvolution to obtain vectors that are then overlaid into an image, image processing operations are performed to obtain the predicted flame shape image.

[0140] The size of the predicted flame shape image is the same as the size of the flame shape image.

[0141] Preferably, the loss function calculation submodule 24 is specifically used to calculate the first loss function loss1 between the preprocessed flame pattern map and the predicted flame pattern map;

[0142] The first loss function can be mean squared error, variance, mean absolute difference, cross entropy, etc.

[0143] Calculate and obtain the second loss function loss2 between the normalized control physical quantity and the predicted control physical quantity;

[0144] The second loss function can be mean squared error, variance, mean absolute difference, binary cross-entropy, etc.

[0145] Calculate the relative entropy loss of the distribution formed by the sampled average vector μ and the sampled logarithmic mean square error vector lnσ. p ;

[0146] The first loss function is assigned a preset weight a, the second loss function is assigned a preset weight b, and the relative entropy is assigned a preset weight c.

[0147] The loss function is obtained by calculating the weights a, b, and c, as well as the first loss function, the second loss function, and the relative entropy.

[0148] The loss function is calculated as follows:

[0149] Loss = loss1×a + loss2×b + loss p ×c.

[0150] In summary, the bidirectional prediction model training method and system between flame morphology and control physical quantities proposed in this invention, by collecting and processing flame morphology images and control physical quantity data, and training them using a deep neural network, can achieve bidirectional prediction capabilities from flame morphology images to control physical quantities and from control physical quantities to flame morphology images. It ensures that the control physical quantities output from the flame images in the dataset after passing through the bidirectional prediction model are as close as possible to the actual corresponding control physical quantities; and it also ensures that the flame images output from the control physical quantities in the dataset after passing through the bidirectional prediction model are as close as possible to the actual corresponding flame images. This achieves bidirectional prediction functionality between flame morphology images and controllable flame morphology physical quantities, enhancing the concrete prediction capabilities in the field of flame morphology research and providing the ability to reconstruct control physical quantities for post-fire accident investigations.

[0151] It can quickly predict flame morphology, overcoming the difficulties of traditional flame morphology prediction requiring long-term numerical simulation and setting up new field experiments.

[0152] In training the bidirectional prediction model, a preprocessed flame morphology image is first used as input, and a convolution operation is performed to obtain the predicted control physical quantity. Simultaneously, a normalized control physical quantity set is also input into the model and deconvolutionally processed to obtain the predicted flame morphology image. Through this process, the flame morphology can be predicted using the flame's physical quantities, or the corresponding physical quantity can be predicted using the flame morphology. By comparing the predicted results with the true values, a loss function is calculated. The loss function is calculated based on the differences between the preprocessed flame morphology image, the predicted flame morphology image, the normalized control physical quantity, and the predicted control physical quantity. The model parameters are updated according to the loss function to improve the model's predictive ability. The training process iterates based on the changes in the loss function until the loss function reaches a preset end-of-training condition. By preprocessing the flame morphology image, using the bidirectional prediction model to predict flame morphology and physical quantities, and calculating the loss function and updating the model parameters, the prediction accuracy is improved. Furthermore, this application can automatically determine the number of convolutional and deconvolutional layers in the deep neural network according to the task, simplifying the modeling steps and reducing the difficulty of model training convergence.

[0153] In a further technical solution, training operations for predicting and controlling physical quantities and predicting flame morphology images are performed simultaneously. The flame morphology image is convolved using a convolution kernel to obtain a convolved image. This convolution kernel can extract features from the input flame morphology image. In this way, a convolved image with fewer dimensions and richer feature information can be obtained. The convolved image (also called a "feature map") is then flattened to obtain a flame vector group. This means that the convolved image is unfolded into a long vector containing all feature information. The flattened flame vector group has lower dimensions and can be more conveniently used in model training and prediction. In this way, the original flame morphology image can be converted into a vector group for better analysis and processing. The normalized control physical quantity group is sampled, and its sampled mean vector and sampled logarithmic mean square error vector are calculated. These two vectors are indicators for evaluating the distribution of the control physical quantity group and can be used to determine the rationality of the sampling results. Then, a new sampling result vector is calculated based on the sampled mean vector and sampled logarithmic mean square error vector. By adding random quantities to the calculation, the calculated sampling result vector can have a certain degree of randomness and diversity, more realistically reflecting the distribution of the control physical quantities of the flame. Finally, the calculated new sampling result vector is deconvolved to obtain a reconstituted image. Deconvolution is the inverse process of convolution, which can restore the original image morphology. Then, image processing operations are performed on the reconstituted image to obtain the predicted flame morphology image. This process essentially starts from the control physical quantities, goes through calculation and processing, and finally obtains the predicted flame morphology.

[0154] Then, by combining the difference between the actual controlled physical quantity and the predicted controlled physical quantity (i.e., the second loss function mentioned above), the difference between the actual flame shape image and the predicted flame shape image (i.e., the first loss function mentioned above), and the relative entropy of the distribution composed of μ and σ, the total loss function (i.e., Loss) is calculated to evaluate the quality of the model prediction. The goal is to minimize the total loss function, thereby optimizing the accuracy of bidirectional prediction.

[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; those skilled in the art can modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A bidirectional prediction method between flame morphology and controllable physical quantities, characterized in that, The following steps are included: Obtain the fire experiment dataset; After performing preprocessing operations on the fire experiment dataset, all preprocessed flame morphology images are obtained. A model training dataset is constructed based on the preprocessed flame morphology images and the corresponding normalized control physical quantity groups. The model training dataset is divided into a model training set and a model evaluation set. Bidirectional prediction model training: Construct a bidirectional prediction model; train the bidirectional prediction model based on the model training set to obtain a trained bidirectional prediction model; Determine whether the evaluation result obtained by evaluating the trained bidirectional prediction model using the model evaluation set meets the preset evaluation completion conditions; if yes, output the bidirectional prediction model; if no, adjust the hyperparameters of the trained bidirectional prediction model and return to the above "bidirectional prediction model training" operation for retraining until the evaluation result meets the preset evaluation completion conditions, and output the bidirectional prediction model. The step of training the bidirectional prediction model based on the model training set to obtain a trained bidirectional prediction model includes the following steps: The number of intermediate layers L is calculated based on the pixel dimensions of the preprocessed flame pattern image. mid ; The preprocessed flame morphology image is input into the bidirectional prediction model, and the predicted control physical quantity is output after passing through the number of convolutions in the intermediate layers; the normalized control physical quantity group is input into the bidirectional prediction model, and the predicted flame morphology image is output after passing through the number of deconvolutions in the intermediate layers. The loss function is calculated based on the preprocessed flame morphology diagram, the predicted flame morphology diagram, the normalized control physical quantity, and the predicted control physical quantity. Training ends when the loss function reaches the preset termination condition, and the model parameters are updated using the loss function to obtain the trained bidirectional prediction model.

2. The method according to claim 1, characterized in that, The fire experiment dataset includes multiple flame morphology diagrams and a set of controllable physical quantities; the set of controllable physical quantities includes multiple controllable physical quantities.

3. The method according to claim 2, characterized in that, The number of intermediate layers L is calculated based on the pixel size of the preprocessed flame pattern image. mid The operation includes the following steps: Obtain the pixel height corresponding to all the preprocessed flame morphology images. and pixel width ; Based on the pixel height With pixel width Construct the maximum pixel height and width ; Based on the maximum pixel height and width Calculate the number of convolutional layers ; The number of convolutional layers The calculation method is as follows: ; In the formula, P is the maximum number of image pixels after the last convolutional layer, and Ceil{} is the rounding up function.

4. The method according to claim 3, characterized in that, The process of inputting the preprocessed flame morphology image into the bidirectional prediction model and outputting the predicted control physical quantity after passing through intermediate convolution layers includes the following steps: The flame shape image is convolved to obtain the convolved image. The convolved image is flattened to obtain a group of flame vectors.

5. The method according to claim 4, characterized in that, The process of inputting the normalized control physical quantity group into the bidirectional prediction model and outputting the predicted flame morphology map after passing through the intermediate layers and performing deconvolution is as follows: Traverse all the normalized control physical quantity groups and calculate the sampled average vector of the normalized control physical quantity groups. With the sampled logarithm mean square error vector ; According to the sampling average vector With the sampled logarithm mean square error vector Calculate and obtain the new sampling result vector corresponding to the current set of controlled physical quantities. ; The new sampling result vector The calculation method is as follows: ; In the formula, It is obedience Normally distributed random quantities; The new sampling result vector After performing deconvolution to obtain vectors that are then overlaid into an image, image processing operations are performed to obtain the predicted flame shape image.

6. The method according to claim 5, characterized in that, The process of calculating and obtaining the loss function based on the preprocessed flame morphology diagram, the predicted flame morphology diagram, the normalized control physical quantity, and the predicted control physical quantity includes the following steps: Calculate and obtain the first loss function loss1 between the preprocessed flame pattern map and the predicted flame pattern map; Calculate and obtain the second loss function loss2 between the normalized control physical quantity and the predicted control physical quantity; Calculate and obtain the sampled average vector With the sampled logarithmic mean square error vector The relative entropy loss constituting the distribution p ; The first loss function is assigned a preset weight a, the second loss function is assigned a preset weight b, and the relative entropy is assigned a preset weight c. The loss function is obtained by calculating the weights a, b, and c, as well as the first loss function, the second loss function, and the relative entropy. The loss function is calculated as follows: Loss=loss1×a+loss2×b+loss p ×c。 7. The method according to claim 6, wherein the first loss function includes mean squared error, variance, mean absolute difference, and cross entropy; The second loss function includes mean squared error, variance, mean absolute difference, and binary cross-entropy.

8. A bidirectional prediction system between flame morphology and controlled physical quantities, characterized in that, It includes a data preprocessing module, a bidirectional prediction model training module, and a bidirectional prediction model evaluation module; The data preprocessing module is used to acquire a fire experiment dataset; the fire experiment dataset includes multiple flame pattern diagrams and a set of control physical quantities; the set of control physical quantities includes multiple control physical quantities. The model training dataset is constructed based on all the preprocessed flame morphology images obtained after performing preprocessing operations on the fire experiment dataset and the corresponding normalized control physical quantity groups of the preprocessed flame morphology images. The bidirectional prediction model training module is used to divide the model training dataset into a model training set and a model evaluation set; Bidirectional prediction model training: Construct a bidirectional prediction model; train the bidirectional prediction model based on the model training set to obtain a trained bidirectional prediction model; The bidirectional prediction model evaluation module is used to determine whether the evaluation result obtained by evaluating the trained bidirectional prediction model using the model evaluation set has reached the preset evaluation completion condition; if yes, the bidirectional prediction model is output; if no, the hyperparameters of the trained bidirectional prediction model are adjusted and the above "bidirectional prediction model training" operation is returned to retrain until the evaluation result reaches the preset evaluation completion condition, and the bidirectional prediction model is output. The bidirectional prediction model training module includes an intermediate layer calculation submodule, a prediction submodule from flame image to control physical quantity, a prediction submodule from control physical quantity to flame image, a loss function calculation submodule, and a training termination judgment submodule. The intermediate layer number calculation submodule is used to calculate and obtain the intermediate layer number L based on the pixel size of the preprocessed flame pattern image. mid ; The prediction submodule from flame image to control physical quantity is used to input the preprocessed flame morphology image into the bidirectional prediction model and output the predicted control physical quantity after passing through the number of convolutions in the intermediate layers. The prediction submodule from the control physical quantity to the flame image is used to input the normalized control physical quantity group into the bidirectional prediction model, and output the predicted flame morphology image after passing through the number of deconvolutions in the intermediate layers. The loss function calculation submodule is used to calculate and obtain the loss function based on the preprocessed flame pattern diagram, the predicted flame pattern diagram, the normalized control physical quantity, and the predicted control physical quantity. The training termination judgment submodule is used to terminate training when the loss function reaches the preset training termination condition, and to update the model parameters using the loss function to obtain the trained bidirectional prediction model.

Citation Information

Patent Citations

  • Methods and systems for data collection, learning, and streaming of machine signals for analytics and maintenance using the industrial internet of things

    CN112703457A

  • Oil and gas station fire detection method, system, medium, equipment and terminal

    CN116563762A