Fire simulation method and system based on neural network acceleration calculation
By combining convolutional networks and long short-term memory networks for modeling and employing the Wasserstein growth rate sampling strategy, the problems of long computation time and large errors in traditional fire simulation calculations are solved, achieving efficient and error-controlled fire simulation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-07
AI Technical Summary
Traditional fire simulation calculation methods involve large computational loads under high-dimensional grids and complex geometric structures, making it difficult to meet the needs of real-time assessment and multi-scenario comparison. Furthermore, simplified models have errors in key results and are difficult to cover complex coupled scenarios.
By employing joint modeling of convolutional networks and long short-term memory networks, combined with channel selection matrix and Wasserstein growth rate adaptive sampling mechanism, spatial feature extraction, time series extrapolation, and dynamic adjustment of sampling interval are performed to form a simulation calculation process with controllable error.
It achieves efficient computation in fire scenarios, maintains the stability and consistency of simulation results, reduces the amount of parameter calculation, improves inference efficiency, and controls the size of the training set through the Wasserstein distance growth rate strategy to enhance the relevance of the training process.
Smart Images

Figure CN121809248A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fire simulation calculation technology, and in particular to a fire simulation method and system based on neural network accelerated calculation. Background Technology
[0002] Fire simulation technology is a key computational tool in fire protection engineering, emergency management, and safety analysis. By numerically solving processes such as heat conduction, smoke flow, material pyrolysis, and chemical reactions, it outputs parameters such as temperature distribution, smoke concentration distribution, and heat release rate, providing important references for building fire protection design, vehicle compartment protection design, and fire emergency decision-making. Traditional fire simulation mainly relies on computational fluid dynamics methods. Common solvers require numerous iterative steps to solve the governing equations, resulting in high computational costs under high-dimensional grids and complex geometries. A single simulation can take hours or even days, making it difficult to meet the needs of real-time assessment and multi-scenario comparison. To reduce computational costs, some solutions construct approximate models by simplifying physical processes. However, these approximate models contain errors in key results such as temperature peak locations, smoke diffusion trends, and heat release curves, making it difficult to cover complex coupled scenarios. As the types of scenarios and the number of parameters increase, traditional numerical simulation is limited in terms of generalization ability, runtime, and resource consumption. Therefore, it is necessary to construct a fire simulation acceleration method that incorporates neural network structures. This method learns high-precision simulation data to form a mapping relationship, enabling rapid simulation and controllable error output in large-scale scenarios. Summary of the Invention
[0003] One objective of this invention is to propose a fire simulation method and system based on neural network-accelerated computation. This invention introduces a channel selection matrix and a Wasserstein growth rate adaptive sampling mechanism, constructing a joint modeling system of convolutional network structure and long short-term memory network structure. It performs spatial feature extraction, time series calculation, and dynamic adjustment of sampling intervals on the fire scene input, forming a simulation computation process that can iteratively cycle under multiple sets of parameters. This method and system possesses technical advantages such as short computation cycle, high parameter update efficiency, and controllable simulation result errors. According to an embodiment of this invention, a fire simulation method and system based on neural network-accelerated computation includes the following steps:
[0004] S1. Construct the input parameter set and form a feature vector; S2. Construct a convolutional network module and perform convolution operations on the feature vectors, with the convolution result forming a spatial feature tensor; S3. Construct a channel selection matrix and perform channel filtering operations on the spatial feature tensor, with the filtering result forming an input subset. The number of channels in the input subset is controlled by the threshold parameter of the channel selection matrix; S4. Construct a long short-term memory network module and perform time series modeling on the input subset to generate a prediction result vector; S5. Construct a Wasserstein distance sequence, perform distance calculation on two consecutive sets of prediction result vectors, and form a distance... S6. Perform ratio conversion on the distance difference sequence and time interval to form a growth rate sequence, and select a step size parameter group according to the interval range of the growth rate. The step size parameter group includes the minimum step size, interval step size and maximum step size; S7. Perform sampling rhythm control on the step size parameter group to generate the sampling interval of the next set of training samples; S8. Perform iterative training on the sampling interval and training sample set to update the parameters of the convolutional network module, channel selection matrix and long short-term memory network module; S9. Perform inference calculation on the input parameter set and output the simulation results of temperature distribution, concentration distribution and heat release rate.
[0005] Optionally, S3 specifically includes: After the convolutional network structure outputs the spatial representation tensor and before the long short-term memory network structure receives the input, a channel selection matrix is set. The number of channels in the channel dimension of the spatial representation tensor is denoted as C. During the parameter initialization phase, the channel selection matrix records a set of channel weight parameters and a set of threshold parameters of length C. The set of threshold parameters contains one or more threshold scalars, and each threshold scalar corresponds to a channel scoring interval. Perform channel description extraction operation on each channel in the spatial representation tensor, perform global pooling operation in the row and column directions, summarize the values of each channel in the spatial dimension into a single scalar, and arrange the scalars of all channels in the order of channel index to form a channel description vector of length C; The channel description vector and the channel weight parameter group are multiplied and added element by element, and a bias parameter vector is introduced. The result of the operation forms a channel score vector, in which each element corresponds to the relevance score of a channel. Channel labeling rules are established based on the comparison relationship between the channel score vector and the threshold parameter group. When the relevance score of a channel is greater than the first threshold scalar, the channel is labeled as a reserved channel. When the relevance score is less than or equal to the first threshold scalar, the channel is labeled as a blocked channel. When the threshold parameter group contains the second threshold scalar, two or more score intervals are divided. Different level numbers are assigned to the reserved channels, and the level numbers correspond one-to-one with the channel index. The channel indexes are retained to form a channel index set. The spatial representation tensor is subjected to index rearrangement and pruning operations in the channel dimension. The data slices corresponding to the masked channels are removed, and only the data slices corresponding to the channel index set are retained to form the input subset. The number of channels in the input subset in the channel dimension does not exceed C. During the training phase, the input subset and the prediction vector set are fed into the loss function calculation. Gradient backpropagation and parameter updates are performed on the channel weight parameter set and the threshold parameter set. After several training iterations, the value distribution of the channel score vector in the training batch converges to the numerical range that matches the threshold parameter set. The channel index set remains fixed at the end of training, and the input subset forms a fixed channel layout in front of the long short-term memory network structure.
[0006] Optionally, the channel index in step S3 specifically includes: The channel index is a sequence of integer numbers in the channel dimension of the spatial representation tensor. The sequence starts with a number of zero or one, and each number increases in order of channel arrangement in the tensor. In the channel score vector, the number of the corresponding score value is greater than the channel selection threshold. All the retained numbers are arranged in ascending order to form the channel index set. The channel index set is used as the index parameter in the channel pruning step. Only the data slices in the spatial representation tensor whose numbers belong to the channel index set are selected into the time modeling structure.
[0007] Optionally, S5 specifically includes: In the output stage of the prediction vector group, the temperature distribution vector, concentration distribution vector and heat release rate vector are concatenated into a one-dimensional prediction result vector according to the preset index rules. Each element of the one-dimensional prediction result vector corresponds to a discrete grid or discrete time node, and a prediction result matrix is constructed. The prediction result matrix is arranged according to the time step number. Perform nonnegative mapping and normalization operations on the prediction result vector at each time step in the prediction result matrix. After clipping all negative values to zero, calculate the ratio of each element value to the sum of elements to form a probability distribution vector. The probability distribution vector corresponds one-to-one with the time step number. Introducing a cost matrix, the elements of which record the transmission cost between any two discrete locations, the transmission cost is generated according to the combination rule of the absolute value of the spatial coordinate difference or the time index difference. The probability distribution vector and the cost matrix together constitute the input of the optimal transmission problem. Optimal transmission solution is performed on the probability distribution vectors of two adjacent time steps, and the cost of a single transmission is output. The cost of a single transmission is used as the Wasserstein distance value of the corresponding time segment and arranged in chronological order to form a one-dimensional Wasserstein distance sequence. Perform adjacent difference operations on the Wasserstein distance sequence to calculate the distance difference between each time step and the previous time step, and record it as a distance difference sequence element. All elements are arranged in chronological order to form a distance difference sequence, and the distance difference sequence corresponds one-to-one with the time step number.
[0008] 5. A fire simulation method and system based on neural network accelerated computation according to claim 1, characterized in that the optimal transmission solution in step S5 specifically includes: Optimal transmission establishes a transmission matrix between discrete probability distribution vectors. Each element in the transmission matrix records the transmission amount allocated from one discrete location to another. In the generated cost matrix, each cost element records the cost of the corresponding transmission path. The optimal transmission solution obtains the minimum cost by minimizing the sum of the element-wise products of the transmission matrix and the cost matrix. The transmission matrix must satisfy the constraints that the sum of the transmission amounts in each row equals the element values of the source distribution vector, the sum of the transmission amounts in each column equals the element values of the target distribution vector, and all elements are non-negative. Among the set of transmission matrices that satisfy all constraints, the transmission matrix with the minimum total cost is taken as the optimal transmission matrix, and the total cost is taken as the Wasserstein distance value for the corresponding time segment.
[0009] Optionally, S6 specifically includes: A time index sequence is constructed, recording the sampling time labels corresponding to each prediction result vector. The difference between adjacent sampling time labels forms a time interval sequence. Each element in the time interval sequence and its corresponding element in the distance difference sequence form a set of calculation units. A division operation is performed on each calculation unit, dividing the absolute value of the distance difference sequence element by the corresponding time interval element to output the single ratio. The single ratio is arranged in time index order and written into a one-dimensional growth rate sequence. Each element in the growth rate sequence corresponds to the distance change rate of a time interval. In calculation units where the time interval element value is equal to zero, the division operation is skipped, and the corresponding growth rate sequence element is directly assigned the value of zero. Statistical operations are performed on the growth rate sequence to calculate the median, upper quantile, and lower quantile. The statistical results are written into a threshold parameter group, which records the interval division boundary of the growth rate. The growth rate sequence and the threshold parameter group establish a correspondence between the interval number and the step size number in the step size parameter selection step.
[0010] Optionally, S7 specifically includes: A sampling rhythm control unit is constructed, which records the current sampling interval and step size parameter group. At each time step, the interval number of the growth rate sequence is read, and the interval number corresponds to the minimum step size, interval step size and maximum step size in the step size parameter group. The interval number is converted into the target sampling interval. The current sampling interval and the target sampling interval are weighted to form the rhythm interval. When the rhythm interval exceeds the preset upper and lower bounds, a truncation operation is performed to form the final sampling interval. The final sampling interval is converted into the number of sampling steps and written into the training sample scheduling structure. The next training sample is selected in the training sample scheduling structure according to the number of sampling steps.
[0011] Optionally, S8 specifically includes: In each training epoch, training samples are selected according to the sampling interval and input into the convolutional neural network structure. Loss calculation is performed on the predicted vector group and the labeled vector group, and the loss calculation result is written into the gradient calculation unit. The gradient calculation unit performs gradient calculation on the convolutional kernel weights, channel weight parameters, threshold parameters and gating weights in the long short-term memory network. After the gradient calculation is completed, a weight update operation is performed on all parameters. The weight update operation is performed by multiplying and adding according to the learning rate scalar. Each parameter gradually converges to a fixed value group in several training epochs.
[0012] Optionally, S9 specifically includes: During the inference phase, the input parameter set is normalized according to the training phase to form an inference vector set. The inference vector set enters the convolutional network structure to generate a spatial representation tensor. After being filtered by the channel selection matrix, an inference channel subset is formed. The inference channel subset is input into the long short-term memory network structure and performs state recursion and sequence mapping at each time step, outputting a prediction vector set. The prediction vector set is split into a temperature distribution vector, a concentration distribution vector, and a heat release rate vector according to a preset index, and reconstructed into a simulation result matrix according to the grid number or time number. The simulation result matrix is directly used as the fire simulation output after the inference is completed.
[0013] The beneficial effects of this invention are: (1) By combining convolutional network structure and long short-term memory network structure for modeling, the ability to synchronously represent spatial and temporal variables is formed, and high structural consistency and computational stability are maintained in the process of estimating temperature distribution, concentration distribution and heat release rate in fire scenarios.
[0014] (2) Introducing a channel selection matrix to filter and reorganize the channels output by the convolutional network structure, so that only the feature channels with high relevance are retained in the time series modeling stage, reducing the amount of parameter calculation and improving inference efficiency, and maintaining a low network load under large-scale input dimensions.
[0015] (3) Construct a Wasserstein distance growth rate sampling strategy. The growth rate sequence is formed by the ratio of distance difference to time interval. The sampling interval is adjusted according to the growth rate interval number so that the training process can obtain higher sampling density in parameter sensitive sections and maintain a lower sampling frequency in parameter stable sections, thereby controlling the size of the training set and enhancing the targeting of the training process.
[0016] (4) An iterative training mechanism is adopted, and the weights of the convolution kernel, channel weights, threshold parameters and long short-term memory network structure are uniformly updated in each training round, so that the overall model forms a convergent structure after multiple rounds of training, providing a stable output for fire simulation calculation. Attached Figure Description
[0017] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0018] Figure 1 This is a flowchart of a fire simulation method and system based on neural network accelerated computation proposed in this invention. Figure 2 This is a schematic diagram of Wasserstein growth rate sampling rhythm control for a fire simulation method and system based on neural network accelerated computation proposed in this invention. Figure 3 This is a schematic diagram of the CNN-LSTM hybrid structure and channel selection matrix of a fire simulation method and system based on neural network accelerated computing proposed in this invention. Detailed Implementation
[0019] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0020] refer to Figure 1-3 A fire simulation method and system based on neural network accelerated computation includes the following steps: S1. Construct the input parameter set and form a feature vector; S2. Construct a convolutional network module and perform convolution operations on the feature vectors, with the convolution result forming a spatial feature tensor; S3. Construct a channel selection matrix and perform channel filtering operations on the spatial feature tensor, with the filtering result forming an input subset. The number of channels in the input subset is controlled by the threshold parameter of the channel selection matrix; S4. Construct a long short-term memory network module and perform time series modeling on the input subset to generate a prediction result vector; S5. Construct a Wasserstein distance sequence, perform distance calculation on two consecutive sets of prediction result vectors, and form a distance... S6. Perform ratio conversion on the distance difference sequence and time interval to form a growth rate sequence, and select a step size parameter group according to the interval range of the growth rate. The step size parameter group includes the minimum step size, interval step size and maximum step size; S7. Perform sampling rhythm control on the step size parameter group to generate the sampling interval of the next set of training samples; S8. Perform iterative training on the sampling interval and training sample set to update the parameters of the convolutional network module, channel selection matrix and long short-term memory network module; S9. Perform inference calculation on the input parameter set and output the simulation results of temperature distribution, concentration distribution and heat release rate.
[0021] In this embodiment, S3 specifically includes: After the convolutional network structure outputs the spatial representation tensor and before the long short-term memory network structure receives the input, a channel selection matrix is set. The number of channels in the channel dimension of the spatial representation tensor is denoted as C. During the parameter initialization phase, the channel selection matrix records a set of channel weight parameters and a set of threshold parameters of length C. The set of threshold parameters contains one or more threshold scalars, and each threshold scalar corresponds to a channel scoring interval. Perform channel description extraction operation on each channel in the spatial representation tensor, perform global pooling operation in the row and column directions, summarize the values of each channel in the spatial dimension into a single scalar, and arrange the scalars of all channels in the order of channel index to form a channel description vector of length C; The channel description vector and the channel weight parameter group are multiplied and added element by element, and a bias parameter vector is introduced. The result of the operation forms a channel score vector, in which each element corresponds to the relevance score of a channel. Channel labeling rules are established based on the comparison relationship between the channel score vector and the threshold parameter group. When the relevance score of a channel is greater than the first threshold scalar, the channel is labeled as a reserved channel. When the relevance score is less than or equal to the first threshold scalar, the channel is labeled as a blocked channel. When the threshold parameter group contains the second threshold scalar, two or more score intervals are divided. Different level numbers are assigned to the reserved channels, and the level numbers correspond one-to-one with the channel index. The channel indexes are retained to form a channel index set. The spatial representation tensor is subjected to index rearrangement and pruning operations in the channel dimension. The data slices corresponding to the masked channels are removed, and only the data slices corresponding to the channel index set are retained to form the input subset. The number of channels in the input subset in the channel dimension does not exceed C. During the training phase, the input subset and the prediction vector set are fed into the loss function. Gradient backpropagation and parameter updates are performed on the channel weight parameter set and the threshold parameter set. After several training iterations, the value distribution of the channel score vector in the training batch converges to the numerical range that matches the threshold parameter set. The channel index set remains fixed at the end of training, and the input subset forms a fixed channel layout in front of the long short-term memory network structure.
[0022] In this embodiment, the channel index in step S3 specifically includes: The channel index is a sequence of integer numbers in the channel dimension of the spatial representation tensor. The sequence starts with a number of zero or one, and each number increases in order of channel arrangement in the tensor. In the channel score vector, the number of the corresponding score value is greater than the channel selection threshold. All the retained numbers are arranged in ascending order to form the channel index set. The channel index set is used as the index parameter in the channel pruning step. Only the data slices in the spatial representation tensor whose numbers belong to the channel index set are selected into the time modeling structure.
[0023] In this embodiment, S5 specifically includes: In the output stage of the prediction vector group, the temperature distribution vector, concentration distribution vector and heat release rate vector are concatenated into a one-dimensional prediction result vector according to the preset index rules. Each element of the one-dimensional prediction result vector corresponds to a discrete grid or discrete time node, and a prediction result matrix is constructed. The prediction result matrix is arranged according to the time step number. Perform nonnegative mapping and normalization operations on the prediction result vector at each time step in the prediction result matrix. After clipping all negative values to zero, calculate the ratio of each element value to the sum of elements to form a probability distribution vector. The probability distribution vector corresponds one-to-one with the time step number. The nonnegative mapping specifically includes: performing a threshold comparison operation on each element of the prediction result vector, replacing elements with values less than zero with zero, and keeping the original values of elements with values greater than or equal to zero. The vector after replacement is denoted as a nonnegative vector. The nonnegative vector maintains a correspondence with the time step number of the prediction result matrix and serves as the input for the normalization operation to construct the probability distribution vector.
[0024] Introducing a cost matrix, the elements of which record the transmission cost between any two discrete locations, the transmission cost is generated according to the combination rule of the absolute value of the spatial coordinate difference or the time index difference. The probability distribution vector and the cost matrix together constitute the input of the optimal transmission problem. Optimal transmission solution is performed on the probability distribution vectors of two adjacent time steps, and the cost of a single transmission is output. The cost of a single transmission is used as the Wasserstein distance value of the corresponding time segment and arranged in chronological order to form a one-dimensional Wasserstein distance sequence. Perform adjacent difference operations on the Wasserstein distance sequence to calculate the distance difference between each time step and the previous time step, and record it as a distance difference sequence element. All elements are arranged in chronological order to form a distance difference sequence, and the distance difference sequence corresponds one-to-one with the time step number.
[0025] In this embodiment, the cost matrix in step S5 specifically includes: A discrete location index set is constructed, where each index corresponds to a temperature grid point, concentration grid point, or time node. In a two-dimensional spatial scenario, for any two location indices i and j, the planar coordinates (x_i, y_i) and (x_j, y_j) are read, and the sum of the absolute values of the differences in the horizontal and vertical coordinates is calculated and written into the element in the i-th row and j-th column of the cost matrix. In a one-dimensional temporal scenario, for any two time indices i and j, the absolute value of the time tag difference is calculated and written into the element in the i-th row and j-th column of the cost matrix. In scenarios where space and time both participate in the transmission cost, the sum of the absolute values of the spatial differences and the absolute values of the temporal differences are linearly combined according to preset weighting coefficients and written into the corresponding element of the cost matrix. All elements in the cost matrix are non-negative real numbers, and the number of rows and columns is consistent with the length of the probability distribution vector, which is directly used as the transmission cost input in the optimal transmission solution stage.
[0026] In this embodiment, the optimal transmission solution in step S5 specifically includes: Optimal transmission establishes a transmission matrix between discrete probability distribution vectors. Each element in the transmission matrix records the transmission amount allocated from one discrete location to another. In the generated cost matrix, each cost element records the cost of the corresponding transmission path. The optimal transmission solution obtains the minimum cost by minimizing the sum of the element-wise products of the transmission matrix and the cost matrix. The transmission matrix must satisfy the constraints that the sum of the transmission amounts in each row equals the element values of the source distribution vector, the sum of the transmission amounts in each column equals the element values of the target distribution vector, and all elements are non-negative. Among the set of transmission matrices that satisfy all constraints, the transmission matrix with the minimum total cost is taken as the optimal transmission matrix, and the total cost is taken as the Wasserstein distance value for the corresponding time segment.
[0027] The cost specifically includes: when determining any transmission path, reading the source and target location indices, summing the absolute values of the differences in the planar coordinates of the source and target locations as the spatial difference, and summing the absolute values of the differences in the time indices of the source and target locations as the temporal difference; multiplying the spatial and temporal differences by preset spatial and temporal weighting coefficients respectively, and then performing addition, the result is recorded as the basic cost of the path; during the optimal transmission solution process, multiplying the basic cost of the path by the transmission amount of the corresponding element in the transmission matrix and writing it into the total cost accumulation unit, the total cost is composed of the sum of the products of all basic path costs and transmission amounts. The transmission amount is a non-negative value recorded during the optimal transmission solution process, allocated from one discrete location to another, representing the amount of numerical transfer performed between probability distributions to maintain mass conservation.
[0028] In this embodiment, S6 specifically includes: A time index sequence is constructed, recording the sampling time labels corresponding to each prediction result vector. The difference between adjacent sampling time labels forms a time interval sequence. Each element in the time interval sequence and its corresponding element in the distance difference sequence form a set of calculation units. A division operation is performed on each calculation unit, dividing the absolute value of the distance difference sequence element by the corresponding time interval element to output the single ratio. The single ratio is arranged in time index order and written into a one-dimensional growth rate sequence. Each element in the growth rate sequence corresponds to the distance change rate of a time interval. In calculation units where the time interval element value is equal to zero, the division operation is skipped, and the corresponding growth rate sequence element is directly assigned the value of zero. Statistical operations are performed on the growth rate sequence to calculate the median, upper quantile, and lower quantile. The statistical results are written into a threshold parameter group, which records the interval division boundary of the growth rate. The growth rate sequence and the threshold parameter group establish a correspondence between the interval number and the step size number in the step size parameter selection step.
[0029] In this embodiment, S7 specifically includes: A sampling rhythm control unit is constructed, which records the current sampling interval and step size parameter group. At each time step, the interval number of the growth rate sequence is read, and the interval number corresponds to the minimum step size, interval step size and maximum step size in the step size parameter group. The interval number is converted into the target sampling interval. The current sampling interval and the target sampling interval are weighted to form the rhythm interval. When the rhythm interval exceeds the preset upper and lower bounds, a truncation operation is performed to form the final sampling interval. The final sampling interval is converted into the number of sampling steps and written into the training sample scheduling structure. The next training sample is selected in the training sample scheduling structure according to the number of sampling steps.
[0030] In this embodiment, S8 specifically includes: In each training epoch, training samples are selected according to the sampling interval and input into the convolutional neural network structure. Loss calculation is performed on the predicted vector group and the labeled vector group, and the loss calculation result is written into the gradient calculation unit. The gradient calculation unit performs gradient calculation on the convolutional kernel weights, channel weight parameters, threshold parameters and gating weights in the long short-term memory network. After the gradient calculation is completed, a weight update operation is performed on all parameters. The weight update operation is performed by multiplying and adding according to the learning rate scalar. Each parameter gradually converges to a fixed value group in several training epochs.
[0031] In this embodiment, the learning rate scalar specifically includes: setting up a learning rate generation unit during the training initialization phase, which records the initial value of the basic learning rate, the training epoch number, and the learning rate adjustment rule; reading the current epoch number in each training epoch, performing a multiplication operation between the initial value of the basic learning rate and the decay function in the adjustment rule, where the input of the decay function is the epoch number and the output is a non-negative coefficient, and the multiplication result is recorded as the learning rate scalar; and calling this learning rate scalar to perform a multiply-accumulate update in the weight update step of all parameters, so that each parameter is scaled according to a uniform ratio before being written into the next training epoch.
[0032] In this embodiment, S9 specifically includes: During the inference phase, the input parameter set is normalized according to the training phase to form an inference vector set. The inference vector set enters the convolutional network structure to generate a spatial representation tensor. After being filtered by the channel selection matrix, an inference channel subset is formed. The inference channel subset is input into the long short-term memory network structure and performs state recursion and sequence mapping at each time step, outputting a prediction vector set. The prediction vector set is split into a temperature distribution vector, a concentration distribution vector, and a heat release rate vector according to a preset index, and reconstructed into a simulation result matrix according to the grid number or time number. The simulation result matrix is directly used as the fire simulation output after the inference is completed.
[0033] Example 1: This embodiment selects a fire scenario involving the distribution of various combustible materials, different spatial partition structures, and multiple smoke diffusion paths. Input parameters include material pyrolysis coefficients, spatial geometric variables, and boundary condition variables. Spatial features are extracted using the convolutional network structure of this invention. A channel selection matrix filters the feature tensors, forming an input subset which is then fed into a long short-term memory network to generate prediction vectors. These prediction vectors sequentially form temperature distribution, concentration distribution, and heat release rate curves. During the training phase, the sampling interval is selected based on the Wasserstein distance growth rate, and gradient updates are performed, causing the difference between the prediction and the labeled values to converge after multiple rounds of training. In the inference phase, the original scene is input into the trained model, enabling the output of key fire indicators within a short computation time.
[0034]
[0035] Table 1: Comparison of Fire Simulation Results Table 1 shows a comparison of key parameters between traditional fire simulation methods and the method of this invention under the same scenario. The parameters in the table include maximum temperature, average temperature, maximum concentration, smoke diffusion time, and peak heat release, which correspond to the most representative physical quantities in the fire evolution process. To verify the effectiveness of the method of this invention, the same input conditions were input into both a traditional numerical simulation solver and the neural network model trained by this invention, and the two sets of output results were compared one-to-one to evaluate the error level and the advantage in calculation speed of the method of this invention.
[0036] The comparison of the highest temperatures shows that the traditional method outputs 820, while this method outputs 804, a difference of 16, which is a relatively small proportion of the traditional results. This indicates that the present invention can maintain high numerical consistency in the high-temperature peak region. The difference in average temperature is even lower, only 5, demonstrating that the neural network achieves good fitting ability in the overall heat distribution estimation. The difference in maximum concentration is 0.03, indicating that the method of the present invention can maintain a relatively stable deviation range in the estimation of flue gas diffusion intensity. The difference in flue gas diffusion time is 15, indicating that the present method maintains a relatively close relationship with the traditional solution in terms of temporal evolution trend. The difference in heat release peak value is 0.04, indicating that the neural network can effectively cover the changing characteristics of combustion rate.
[0037] Overall, the differences in the table are all within a controllable range, and the trends of various parameters are highly consistent with those of traditional methods. This indicates that the convolutional network structure, channel selection matrix, and long short-term memory network constructed in this invention can effectively learn the spatial and temporal mapping relationships of high-dimensional fire scenarios. In particular, the sampling mechanism driven by the Wasserstein distance growth rate enables the training process to obtain more data in key change segments, thereby significantly reducing prediction bias. The temperature field, concentration field, and heat release rate curves calculated by the method of this invention not only maintain the trend consistent with traditional simulations but also have a significant advantage in computation time, enabling them to play a more efficient role in concurrent calculations of a large number of scenarios or rapid assessment of scenario changes.
[0038] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A fire simulation method and system based on neural network accelerated computation, characterized in that, Includes the following steps: S1. Construct the set of input parameters and form a feature vector; S2. Construct a convolutional network module and perform convolution operation on the feature vector, the convolution result forming a spatial feature tensor; S3. Construct a channel selection matrix and perform channel filtering operation on the spatial feature tensor, the filtering result forming an input subset, the number of channels in the input subset is controlled by the threshold parameter of the channel selection matrix; S4. Construct a long short-term memory network module and perform time series modeling on the input subset to generate a prediction result vector; S5. Construct a Wasserstein distance sequence, perform distance calculation on two consecutive sets of prediction result vectors to form a distance difference sequence; S6. Perform ratio conversion on the distance difference sequence and the time interval to form a growth rate sequence, and select a step size parameter group according to the interval range of the growth rate. The step size parameter group includes the minimum step size, the interval step size, and the maximum step size. S7. Perform sampling rhythm control on the step size parameter group to generate the sampling interval for the next set of training samples; S8. Perform iterative training on the sampling interval and training sample set, and update the parameters of the convolutional network module, channel selection matrix and long short-term memory network module; S9. Perform inference calculations on the set of input parameters and output simulation results of temperature distribution, concentration distribution and heat release rate.
2. The fire simulation method and system based on neural network accelerated computation according to claim 1, characterized in that, S3 specifically includes: After the convolutional network structure outputs the spatial representation tensor and before the long short-term memory network structure receives the input, a channel selection matrix is set. The number of channels in the channel dimension of the spatial representation tensor is denoted as C. During the parameter initialization phase, the channel selection matrix records a set of channel weight parameters and a set of threshold parameters of length C. The set of threshold parameters contains one or more threshold scalars, and each threshold scalar corresponds to a channel scoring interval. Perform channel description extraction operation on each channel in the spatial representation tensor, perform global pooling operation in the row and column directions, summarize the values of each channel in the spatial dimension into a single scalar, and arrange the scalars of all channels in the order of channel index to form a channel description vector of length C; The channel description vector and the channel weight parameter group are multiplied and added element by element, and a bias parameter vector is introduced. The result of the operation forms a channel score vector, in which each element corresponds to the relevance score of a channel. Channel labeling rules are established based on the comparison relationship between the channel score vector and the threshold parameter group. When the relevance score of a channel is greater than the first threshold scalar, the channel is labeled as a reserved channel. When the relevance score is less than or equal to the first threshold scalar, the channel is labeled as a blocked channel. When the threshold parameter group contains the second threshold scalar, two or more score intervals are divided. Different level numbers are assigned to the reserved channels, and the level numbers correspond one-to-one with the channel index. The channel indexes are retained to form a channel index set. The spatial representation tensor is subjected to index rearrangement and pruning operations in the channel dimension. The data slices corresponding to the masked channels are removed, and only the data slices corresponding to the channel index set are retained to form the input subset. The number of channels in the input subset in the channel dimension does not exceed C. During the training phase, the input subset and the prediction vector set are fed into the loss function calculation. Gradient backpropagation and parameter updates are performed on the channel weight parameter set and the threshold parameter set. After several training iterations, the value distribution of the channel score vector in the training batch converges to the numerical range that matches the threshold parameter set. The channel index set remains fixed at the end of training, and the input subset forms a fixed channel layout in front of the long short-term memory network structure.
3. The fire simulation method and system based on neural network accelerated computation according to claim 1, characterized in that, The channel index in step S3 specifically includes: The channel index is a sequence of integer numbers in the channel dimension of the spatial representation tensor. The sequence starts with a number of zero or one, and each number increases in order of channel arrangement in the tensor. In the channel score vector, the number of the corresponding score value is greater than the channel selection threshold. All the retained numbers are arranged in ascending order to form the channel index set. The channel index set is used as the index parameter in the channel pruning step. Only the data slices in the spatial representation tensor whose numbers belong to the channel index set are selected into the time modeling structure.
4. The fire simulation method and system based on neural network accelerated computation according to claim 1, characterized in that, S5 specifically includes: In the output stage of the prediction vector group, the temperature distribution vector, concentration distribution vector and heat release rate vector are concatenated into a one-dimensional prediction result vector according to the preset index rules. Each element of the one-dimensional prediction result vector corresponds to a discrete grid or discrete time node, and a prediction result matrix is constructed. The prediction result matrix is arranged according to the time step number. Perform nonnegative mapping and normalization operations on the prediction result vector at each time step in the prediction result matrix. After clipping all negative values to zero, calculate the ratio of each element value to the sum of elements to form a probability distribution vector. The probability distribution vector corresponds one-to-one with the time step number. Introducing a cost matrix, the elements of which record the transmission cost between any two discrete locations, the transmission cost is generated according to the combination rule of the absolute value of the spatial coordinate difference or the time index difference. The probability distribution vector and the cost matrix together constitute the input of the optimal transmission problem. Optimal transmission solution is performed on the probability distribution vectors of two adjacent time steps, and the cost of a single transmission is output. The cost of a single transmission is used as the Wasserstein distance value of the corresponding time segment and arranged in chronological order to form a one-dimensional Wasserstein distance sequence. Perform adjacent difference operations on the Wasserstein distance sequence to calculate the distance difference between each time step and the previous time step, and record it as a distance difference sequence element. All elements are arranged in chronological order to form a distance difference sequence, and the distance difference sequence corresponds one-to-one with the time step number.
5. The fire simulation method and system based on neural network accelerated computation according to claim 1, characterized in that, The optimal transmission solution in step S5 specifically includes: Optimal transmission establishes a transmission matrix between discrete probability distribution vectors. Each element in the transmission matrix records the transmission amount allocated from one discrete location to another. In the generated cost matrix, each cost element records the cost of the corresponding transmission path. The optimal transmission solution obtains the minimum cost by minimizing the sum of the element-wise products of the transmission matrix and the cost matrix. The transmission matrix must satisfy the constraints that the sum of the transmission amounts in each row equals the element values of the source distribution vector, the sum of the transmission amounts in each column equals the element values of the target distribution vector, and all elements are non-negative. Among the set of transmission matrices that satisfy all constraints, the transmission matrix with the minimum total cost is taken as the optimal transmission matrix, and the total cost is taken as the Wasserstein distance value for the corresponding time segment.
6. The fire simulation method and system based on neural network accelerated computation according to claim 1, characterized in that, S6 specifically includes: A time index sequence is constructed, recording the sampling time labels corresponding to each prediction result vector. The difference between adjacent sampling time labels forms a time interval sequence. Each element in the time interval sequence and its corresponding element in the distance difference sequence form a set of calculation units. A division operation is performed on each calculation unit, dividing the absolute value of the distance difference sequence element by the corresponding time interval element to output the single ratio. The single ratio is arranged in time index order and written into a one-dimensional growth rate sequence. Each element in the growth rate sequence corresponds to the distance change rate of a time interval. In calculation units where the time interval element value is equal to zero, the division operation is skipped, and the corresponding growth rate sequence element is directly assigned the value of zero. Statistical operations are performed on the growth rate sequence to calculate the median, upper quantile, and lower quantile. The statistical results are written into a threshold parameter group, which records the interval division boundary of the growth rate. The growth rate sequence and the threshold parameter group establish a correspondence between the interval number and the step size number in the step size parameter selection step.
7. The fire simulation method and system based on neural network accelerated computation according to claim 1, characterized in that, Specifically, S7 includes: A sampling rhythm control unit is constructed, which records the current sampling interval and step size parameter group. At each time step, the interval number of the growth rate sequence is read, and the interval number corresponds to the minimum step size, interval step size and maximum step size in the step size parameter group. The interval number is converted into the target sampling interval. The current sampling interval and the target sampling interval are weighted to form the rhythm interval. When the rhythm interval exceeds the preset upper and lower bounds, a truncation operation is performed to form the final sampling interval. The final sampling interval is converted into the number of sampling steps and written into the training sample scheduling structure. The next training sample is selected in the training sample scheduling structure according to the number of sampling steps.
8. The fire simulation method and system based on neural network accelerated computation according to claim 1, characterized in that, S8 specifically includes: In each training epoch, training samples are selected according to the sampling interval and input into the convolutional neural network structure. Loss calculation is performed on the predicted vector group and the labeled vector group, and the loss calculation result is written into the gradient calculation unit. The gradient calculation unit performs gradient calculation on the convolutional kernel weights, channel weight parameters, threshold parameters and gating weights in the long short-term memory network. After the gradient calculation is completed, a weight update operation is performed on all parameters. The weight update operation is performed by multiplying and adding according to the learning rate scalar. Each parameter gradually converges to a fixed value group in several training epochs.
9. The fire simulation method and system based on neural network accelerated computation according to claim 1, characterized in that, S9 specifically includes: During the inference phase, the input parameter set is normalized according to the training phase to form an inference vector set. The inference vector set enters the convolutional network structure to generate a spatial representation tensor. After being filtered by the channel selection matrix, an inference channel subset is formed. The inference channel subset is input into the long short-term memory network structure and performs state recursion and sequence mapping at each time step, outputting a prediction vector set. The prediction vector set is split into a temperature distribution vector, a concentration distribution vector, and a heat release rate vector according to a preset index, and reconstructed into a simulation result matrix according to the grid number or time number. The simulation result matrix is directly used as the fire simulation output after the inference is completed.