House type self-adaptive based building explosion initial state parameter prediction analysis method and device

By constructing a configuration library that adapts to different apartment layouts and employing differentiated data augmentation strategies, combined with the physical characteristics of building explosion overpressure values, and optimizing machine learning models, the problems of insufficient apartment layout adaptability and small sample generalization ability in existing technologies have been solved, achieving efficient and accurate prediction of initial explosion parameters.

CN122113648APending Publication Date: 2026-05-29BEIJING INST OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING INST OF TECH
Filing Date
2026-03-11
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing building explosion parameter prediction technologies have shortcomings in terms of unit type adaptability, model parameter fixation, small sample generalization ability, and feature engineering, and cannot simultaneously meet the requirements of real-time performance, high accuracy, and adaptability to all unit types.

Method used

We construct an adaptive configuration library for apartment types, build derived features by combining the physical characteristics of building explosion overpressure values, and use differentiated data augmentation strategies and machine learning model optimization to perform adaptive training for different apartment types and prediction tasks, including feature dimensionality reduction and physical constraints.

Benefits of technology

It achieves high-precision and stable prediction of initial explosion parameters under different housing scenarios, improves the model's adaptability and prediction efficiency, and meets the needs of rapid assessment and emergency decision-making at accident sites.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122113648A_ABST
    Figure CN122113648A_ABST
Patent Text Reader

Abstract

The application discloses a building explosion initial state parameter prediction analysis method and device based on house type self-adaptation, which comprises the following steps: firstly, a configuration library of multiple brick-concrete and frame house types is constructed, corresponding configurations are loaded, and data is verified; secondly, overpressure monitoring data is preprocessed, four types of derived features are constructed in combination with explosion overpressure physical characteristics, and original features are standardized and reduced in dimension by PCA; thirdly, a differentiated data enhancement strategy is adopted to expand samples for classification / regression prediction tasks; fourthly, an XGBoost model is optimized by grid search cross-validation for a classification task, and an adaptive GRNN model is trained by traversing a house type smooth factor candidate set for a regression task; and finally, an input overpressure value of a user is preprocessed and predicted, and an output result is obtained after physical constraint. The application realizes self-adaptive adaptation of a model and a house type, improves prediction accuracy and small sample generalization ability, can quickly and accurately predict explosion initial state parameters, and is suitable for scenes such as accident tracing, explosion-proof design and emergency rescue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary fields of safety engineering, machine learning and building disaster prevention, and specifically relates to a method and device for predicting and analyzing the initial state parameters of building explosions based on adaptive unit type. It is applicable to scenarios such as explosion accident source tracing analysis, building explosion-proof design, and emergency rescue plan formulation. Background Technology

[0002] Gas explosions are sudden and destructive, easily triggering a chain of disasters such as fires and building collapses. Accurately predicting initial parameters such as explosive substances, detonation location, ignition method, and explosive gas volume is crucial for accident tracing, liability determination, explosion-proof design, and emergency response plan development. Therefore, the development of efficient and accurate explosion parameter prediction technology has become a necessity in the field of safety engineering.

[0003] Currently, the methods for predicting explosion parameters in the industry are mainly divided into three categories: traditional model prediction, fluid dynamics numerical simulation, and machine learning prediction, all of which have significant technical bottlenecks. Traditional model prediction is efficient but simple in structure, has large errors, and is subject to many environmental limitations; fluid dynamics numerical simulation has a clear physical mechanism and can characterize the propagation law of shock waves, but it has a long modeling cycle and high computational complexity, which cannot meet the needs of real-time assessment at accident sites, and the simulation results are affected by a variety of factors, and the errors are difficult to control without actual measurement data for calibration.

[0004] Machine learning prediction has become a mainstream approach due to its strong nonlinear fitting ability and fast prediction speed. Among them, GRNN is often used for regression prediction of explosive gas volume, and XGBoost is suitable for classification prediction of explosive materials and detonation location. However, existing machine learning-based methods still have many shortcomings: First, they lack adaptability to different apartment types. The uniform model is not customized to the structural differences of different apartment types, resulting in large fluctuations in prediction accuracy. Second, the smoothing factor of the core parameter of GRNN is fixed, which cannot adapt to the overpressure data distribution characteristics of different apartment types. Third, they have insufficient generalization ability with small samples. It is difficult to obtain actual measured data, and existing simple sample augmentation methods are prone to model overfitting. Fourth, feature engineering is not targeted enough. Only basic preprocessing is performed, without combining the physical characteristics of explosive overpressure to mine derived features, resulting in insufficient feature representation ability. Summary of the Invention

[0005] Therefore, the present invention provides a method and apparatus for predicting and analyzing the initial explosive parameters of buildings based on adaptive apartment layout, in order to solve or partially solve the problems mentioned in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution: A first aspect provides a method for predicting and analyzing the initial explosive state parameters of a building based on adaptive unit type, comprising:

[0007] 1) Construct and initialize a configuration library that includes multiple types of brick-concrete and frame-type structure apartment types, receive apartment type selection instructions and prediction task selection instructions input by users, load the configuration information of the corresponding apartment type in the configuration library and complete the data file validity verification. 2) Based on the loaded apartment configuration, read the building explosion overpressure monitoring data of the corresponding apartment type, perform data preprocessing operations on the feature column and label column of the building explosion overpressure monitoring data respectively, remove invalid data and constrain the physical rationality of the label data to obtain an effective sample set; 3) Based on the physical characteristics of the building explosion overpressure value, a derived feature is constructed. The derived feature is then spliced ​​with the original overpressure feature and standardized to form an enhanced feature matrix. 4) Perform dimensionality reduction processing on the enhanced feature matrix to simplify the feature dimensions while retaining the main information of the original features, and obtain a dimensionality-reduced feature matrix; 5) Based on the type of prediction task, the reduced feature matrix and corresponding labels are augmented using data augmentation strategies to obtain a sample set for model training; 6) For classification prediction tasks and regression prediction tasks, corresponding machine learning models are constructed respectively. The optimization training of the corresponding machine learning models is completed by parameter optimization to obtain the explosive initial state parameter prediction model for apartment type adaptation. 7) Receive the overpressure monitoring value input by the user, perform preprocessing, input the trained explosion initial state parameter prediction model, apply physical constraints to the output result of the explosion initial state parameter prediction model, and output the final explosion initial state parameter prediction result.

[0008] As a preferred scheme for the building explosion initial state parameter prediction and analysis method based on unit type adaptation, in step 1), the configuration library includes the file storage path, overpressure feature dimension, smoothing factor candidate set, dimensionality reduction information retention ratio, default overpressure input value, and meaning of overpressure measurement point corresponding to each type of unit type. The prediction task includes the classification prediction task of explosive material, detonation location, and excitation mode, and the regression prediction task of explosive gas volume. In step 1), the range of the candidate set of smoothing factors is positively correlated with the overpressure feature dimension of the corresponding apartment type.

[0009] As a preferred scheme for the building explosion initial state parameter prediction and analysis method based on unit type adaptation, in step 2), the preprocessing of the feature column includes data type conversion, missing value filling and outlier correction, and the preprocessing of the label column includes null value sample deletion and physical constraint limitation.

[0010] As a preferred scheme for the prediction and analysis method of building explosion initial state parameters based on unit type adaptation, in step 3), the derived features include the core region mean value representing the overpressure intensity of the explosion core region, the edge region mean value representing the overpressure intensity of the explosion edge region, the pressure ratio representing the spatial decay law of explosion energy, and the pressure standard deviation representing the dispersion of overpressure value distribution. The enhanced feature matrix is ​​a splicing matrix of the original overpressure features and the derived features.

[0011] As a preferred scheme for the building explosion initial state parameter prediction and analysis method based on unit type adaptation, in step 4), the principal component analysis method is used to perform dimensionality reduction. If the dimension of the standardized enhanced feature matrix is ​​less than or equal to the preset value, the features of the specified dimension are directly retained and the principal component analysis calculation is not performed.

[0012] As a preferred scheme for the building explosion initial state parameter prediction and analysis method based on unit type adaptation, in step 5), the data augmentation strategy is as follows: The classification prediction task first solves the class imbalance problem through an oversampling algorithm before adding noise perturbation. The regression prediction task applies a set degree of perturbation to the feature value and the label value respectively, and ensures the physical rationality of the label value after perturbation. If the number of effective samples is lower than the preset threshold, the data augmentation factor will be increased according to the prediction task type.

[0013] As a preferred scheme for the building explosion initial state parameter prediction and analysis method based on unit type adaptation, in step 6), the machine learning model of the classification prediction task is the XGBoost classifier, and the model parameters are optimized by combining grid search with cross-validation. The machine learning model for the regression prediction task is a generalized regression neural network (GRNN). The optimal smoothing factor is determined by traversing the candidate set of apartment type smoothing factors, thereby realizing the adaptive optimization of apartment type by the GRNN.

[0014] As a preferred scheme for the building explosion initial state parameter prediction and analysis method based on unit type adaptation, the prediction formula of the generalized regression neural network GRNN is:

[0015] In the formula, For the test sample k 3D feature vectors For the training sample k 3D feature vectors For the first j The label values ​​of each training sample. m The total number of training samples. n The feature dimension of the feature matrix. For the smoothing factor of the generalized regressive neural network, For the firsti Predicted values ​​for each test sample; The selection rule for the optimal smoothness factor in the generalized regression neural network is as follows: If a test set exists, select the smoothing factor that maximizes the coefficient of determination of the test set; if no test set exists, select the median value of the candidate smoothing factor set as the optimal smoothing factor.

[0016] As a preferred scheme for the building explosion initial state parameter prediction and analysis method based on unit type adaptation, in step 7), the physical constraint is to limit the regression prediction result to the numerical range of the model training set label. The final output prediction result includes the prediction task type, prediction value, and reference range. The classification prediction task additionally outputs the optimal parameters of the model, and the regression prediction task additionally outputs the optimal smoothing factor of the model.

[0017] Secondly, the present invention provides a building explosion initial state parameter prediction and analysis device based on unit type adaptation, employing the building explosion initial state parameter prediction and analysis method based on unit type adaptation or any possible implementation thereof, including: The configuration module is used to build and initialize a configuration library that includes multiple types of brick-concrete and frame-type structure apartment types, receive apartment type selection instructions and prediction task selection instructions input by the user, load the configuration information of the corresponding apartment type in the configuration library, and complete the data file validity verification. The data preprocessing module is used to read the building explosion overpressure monitoring data of the corresponding apartment type based on the loaded apartment type configuration, and to perform data preprocessing operations on the feature column and label column of the building explosion overpressure monitoring data respectively, to remove invalid data and constrain the physical rationality of the label data, so as to obtain an effective sample set. The feature engineering module is used to construct derived features based on the physical properties of building explosion overpressure values. The derived features are then spliced ​​with the original overpressure features and standardized to form an enhanced feature matrix. The dimensionality reduction module is used to perform dimensionality reduction processing on the enhanced feature matrix, simplifying the feature dimensions while retaining the main information of the original features, to obtain a dimensionality-reduced feature matrix; The data augmentation module is used to augment the dimensionality-reduced feature matrix and its corresponding labels using data augmentation strategies according to the type of prediction task, so as to obtain a sample set for model training. The model training module is used to build corresponding machine learning models for classification prediction tasks and regression prediction tasks respectively. The optimization training of the corresponding machine learning models is completed through parameter optimization to obtain the explosive initial state parameter prediction model for adaptive apartment layout. The prediction module receives the overpressure monitoring value input by the user, performs preprocessing, inputs the trained explosion initial state parameter prediction model, applies physical constraints to the output of the explosion initial state parameter prediction model, and outputs the final explosion initial state parameter prediction result.

[0018] Thirdly, the present invention provides an electronic device, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the processor, when executing the program or instructions, implements the first aspect or any possible implementation thereof, the building explosion initial state parameter prediction and analysis method based on unit type adaptive.

[0019] Fourthly, the present invention provides a computer-readable storage medium storing a program or instructions, wherein when the program or instructions are executed by a processor, the program or instructions implement the steps of the first aspect or any possible implementation thereof, the building explosion initial state parameter prediction and analysis method based on unit type adaptive.

[0020] The present invention has the following advantages: This invention constructs a housing configuration library covering brick-concrete and frame structures, and customizes candidate sets for the feature dimensions of different housing types. It achieves adaptive optimization of the smoothness factor of the GRNN model for different housing types, completely solving the problems of fixed parameters and a "one-size-fits-all" approach to all housing types in traditional models. Experimental verification shows that the prediction accuracy of this invention is more than 20% higher than that of traditional fixed-parameter models, maintaining stable high prediction accuracy in different housing type scenarios and achieving accurate adaptation for all housing types.

[0021] This invention, based on the spatial distribution and propagation physical characteristics of overpressure values ​​in building explosions, designs derived features such as the mean of the core area, the mean of the peripheral area, the pressure ratio, and the pressure standard deviation. It then fuses the original monitoring features with the derived features to construct an enhanced feature matrix, fully exploring the intrinsic correlation between overpressure data and initial explosion parameters. Compared to traditional feature engineering methods that only perform basic preprocessing, the features of this invention have a stronger correlation with explosion parameters, providing more effective feature support for accurate model prediction.

[0022] This invention designs differentiated data augmentation strategies for classification and regression prediction tasks. For classification, oversampling combined with noise augmentation is used to address class imbalance, while for regression, feature-label dual perturbation is employed to expand the sample size. Simultaneously, a sample size threshold triggering mechanism is implemented to effectively alleviate model overfitting in small sample scenarios. This invention significantly improves the model's predictive stability on new measured samples, perfectly adapting to practical applications where obtaining measured data for building explosions is difficult and sample sizes are limited.

[0023] For classification tasks involving explosive materials, detonation locations, and activation methods, an XGBoost classifier optimized with grid search and cross-validation is employed to ensure both accuracy and robustness in classification predictions. For the regression task involving explosive gas volume, a user-adaptive GRNN model is used, leveraging its adaptability to small sample data to improve regression prediction accuracy. These two models are specifically adapted to different types of prediction tasks, fully utilizing the performance advantages of each algorithm to achieve accurate prediction of all dimensions of initial explosion parameters.

[0024] This invention constructs a prediction model based on machine learning algorithms. After training, the prediction time for a single sample is in the millisecond range. Simultaneously, PCA dimensionality reduction simplifies feature dimensions, reducing model computational complexity and significantly improving prediction efficiency. Compared to the drawbacks of traditional fluid dynamics numerical simulations, which suffer from long modeling cycles and computational demands, this invention can quickly output prediction results, meeting the real-time requirements for rapid accident scene assessment and emergency decision-making. Attached Figure Description

[0025] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0026] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0027] Figure 1 This is a schematic diagram of the building explosion initial state parameter prediction and analysis method based on unit type adaptation provided in the embodiments of the present invention; Figure 2 The image shows a comparison of the distribution of candidate smoothing factors (sigma) for different apartment layouts provided in this embodiment of the invention, illustrating the correlation between feature dimensions and the candidate range of smoothing factors. Figure 3 The feature engineering-derived feature calculation logic diagram provided in the embodiments of the present invention illustrates the calculation process of core mean, edge mean, pressure ratio, and pressure standard deviation; Figure 4 This is a schematic diagram of the architecture of the building explosion initial state parameter prediction and analysis device based on unit type adaptation provided in an embodiment of the present invention; Figure 5 This is an electronic device architecture diagram provided in an embodiment of the present invention. Detailed Implementation

[0028] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. 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.

[0029] Gas explosions, as a type of sudden and highly destructive safety hazard, occur widely in various settings such as residential buildings, commercial buildings, and industrial plants. They not only cause severe casualties and property damage but can also trigger chain reactions such as fires and secondary collapses, posing a significant threat to public safety. After an accident, determining the core explosion parameters, including the type of explosive material (e.g., natural gas, liquefied petroleum gas), the ignition location (e.g., kitchen, living room, bedroom), the ignition method (e.g., open flame ignition, electrical spark triggering), and the explosive gas volume (unit: m³), ​​is a crucial prerequisite for tracing the cause of the accident, determining responsibility, and assessing losses. Simultaneously, accurate prediction of explosion parameters under different scenarios is a key technical support for optimizing the protective performance of building structures and improving the targeted nature of emergency response during the building explosion-proof design and emergency rescue plan development stages. Therefore, developing efficient and accurate building explosion parameter prediction technology remains an important research topic and an essential industry requirement in the field of safety engineering.

[0030] Currently, the technical means for predicting building explosion parameters at home and abroad are mainly divided into three types: traditional model prediction, numerical simulation based on fluid dynamics and machine learning algorithms. Each of these three technologies has its own advantages and disadvantages and forms a complementary application in real-world scenarios, but all of them have obvious technical bottlenecks.

[0031] The first type of traditional model prediction is a relatively efficient method for estimating the initial state elements of an explosion. However, these models are usually quite simple, have large errors, and are subject to many environmental limitations.

[0032] The second type is a numerical simulation method based on fluid mechanics. Its core principle is to construct a three-dimensional structural model of the building and, combined with explosion dynamics equations, simulate the generation, propagation, and interaction of the explosion shock wave with the building structure, thereby inferring or predicting explosion parameters. The advantage of this method lies in its clear physical mechanism, accurately depicting the attenuation law of the explosion shock wave within the building space, making it suitable for explosion-proof design verification of complex building structures. Commonly used numerical simulation tools include ANSYS, FLUENT, and AUTODYN, and related technologies have been applied to some extent in the explosion-proof design of industrial plants and large commercial buildings. However, this type of method has significant drawbacks: on the one hand, it requires extremely high precision in the building structural model, necessitating accurate input of massive parameters such as wall thickness, material, and door and window layout. The modeling cycle is long, and the computational complexity is high; simulation of a single scenario often takes hours or even days, completely failing to meet the real-time requirements for rapid assessment and emergency decision-making at accident sites. On the other hand, the simulation results are sensitive to initial parameter settings and are greatly affected by factors such as mesh generation accuracy and the selection of turbulence models. Without calibration using measured data, prediction errors are difficult to control, limiting its reliability in accident tracing scenarios.

[0033] The third type is a machine learning-based prediction method. Its core logic is to bypass complex fluid dynamics mechanisms and instead construct a data-driven prediction model by exploring the potential correlation between explosion overpressure monitoring data and core parameters, thus enabling rapid prediction of explosion parameters. With the development of sensor technology, explosion overpressure values ​​at different locations within buildings can be accurately collected, providing a sufficient data foundation for machine learning models. Simultaneously, machine learning algorithms possess advantages such as strong nonlinear fitting capabilities and fast prediction speed after training (single-sample prediction takes milliseconds), perfectly compensating for the lack of real-time performance in numerical simulation methods. This has gradually become the mainstream development direction in the field of building explosion parameter prediction.

[0034] In machine learning-based explosion parameter prediction techniques, Generalized Regressive Neural Networks (GRNNs) and Gradient Boosting Trees (such as XGBoost) are the two most widely used algorithms. GRNNs, due to their simple structure, lack of complex parameter tuning requirements, and strong adaptability to small sample data, are extensively used for regression prediction of continuous parameters such as explosive gas volume. XGBoost, on the other hand, dominates in the classification prediction of discrete parameters such as explosive materials and detonation location due to its excellent classification performance. However, existing machine learning-based explosion parameter prediction methods have revealed a series of key technical shortcomings in practical applications for different types of buildings, resulting in prediction accuracy and generalization ability that fail to meet actual industry needs. Specifically: First, there is a lack of adaptability to different apartment types, creating an inherent contradiction between model universality and accuracy. Different apartment types have fundamentally different spatial structures, wall layouts, volumes, and material properties, directly leading to drastically different propagation paths, attenuation rates, and overpressure distribution characteristics of explosive shock waves. For example, in a compact one-bedroom apartment, the explosive shock wave is easily reflected and superimposed within the enclosed environment, resulting in a generally high and concentrated overpressure value; while in a spacious three-bedroom apartment with multiple functional zones, the attenuation of the shock wave varies significantly across different areas, resulting in a large dispersion in overpressure distribution. Furthermore, the impact of shock waves on the beam-column structure differs significantly between frame-structured buildings and brick-concrete structures due to different wall load-bearing methods. However, existing machine learning models all adopt a "one-size-fits-all" design approach. Neither the feature processing logic, model structure, nor the core parameters are customized for the characteristics of different apartment types. When using a uniform model to adapt to all apartment types, the problem inevitably arises where some apartment types have excellent prediction accuracy while others have excessive prediction errors, making stable application across all apartment types impossible.

[0035] Secondly, the fixed core parameters of GRNN make it difficult to adapt to the distribution of overpressure data across different apartment types. The predictive performance of GRNN is highly dependent on the value of the smoothing factor sigma, which directly controls the range of the radial basis function and determines the model's fit to the training data and its generalization ability. If the sigma value is too small, the model is prone to overfitting and becomes sensitive to noisy data; if the sigma value is too large, the model's fit is too poor, failing to capture potential patterns in the data. In existing technologies, sigma values ​​are often fixed based on experience or determined by a simple grid search, without considering the differences in overpressure data distribution across different apartment types. For example, the overpressure data of a one-bedroom apartment with 8-dimensional features is concentrated, requiring a smaller sigma value to ensure fitting accuracy; while the overpressure data of a three-bedroom apartment with 13-dimensional features is dispersed, requiring a larger sigma value to cover data patterns. Fixing the sigma value leads to drastic fluctuations in the prediction accuracy of the GRNN model across different apartment types, making it difficult to meet the prediction needs of all apartment types.

[0036] Secondly, the model's generalization ability is insufficient for small sample sizes, making it difficult to adapt to real-world application scenarios. Acquiring real-world data for building explosion accidents presents inherent challenges: on the one hand, the suddenness of explosions makes it difficult to deploy monitoring equipment in advance, resulting in slow data accumulation; on the other hand, there are significant differences in samples across different apartment types and explosion scenarios, with the number of effective samples for similar scenarios often being extremely small, typically less than 50 training samples, or even less than 20. Existing models do not employ targeted sample augmentation strategies for small sample scenarios, relying solely on simple random sampling or basic noise addition methods. This fails to effectively expand sample diversity, leading to overfitting—the model performs well on the training set but its predictive performance drops significantly on new real-world samples, making it unsuitable for scenarios with extremely high predictive reliability requirements, such as accident tracing.

[0037] Finally, feature engineering suffers from weak targeting and insufficient feature representation capabilities. Existing methods often limit feature processing to basic data preprocessing techniques such as standardization and normalization, achieving only data dimension unification without leveraging the physical characteristics of building explosion overpressure values ​​to extract effective information. The distribution of building explosion overpressure values ​​exhibits clear physical patterns; for example, overpressure values ​​in the explosion core region are significantly higher than those in the peripheral region, and the dispersion of overpressure values ​​is directly related to explosion energy and building space size. However, existing methods do not design specific derived features based on these physical characteristics, resulting in features input to the model that only reflect the surface information of the original monitoring data. This fails to effectively characterize the intrinsic relationship between overpressure data and explosion parameters, hindering the full realization of the model's predictive potential.

[0038] In summary, existing building explosion parameter prediction technologies, whether based on numerical simulation methods of fluid mechanics or prediction methods based on machine learning, all suffer from insurmountable technical bottlenecks and cannot simultaneously meet the industry's core requirements of real-time performance, high accuracy, adaptability to all apartment types, and generalization with small samples. Therefore, developing an explosion parameter prediction method that can adapt to different apartment characteristics, dynamically optimize core model parameters, enhance small-sample generalization ability, and mine physical characteristic-guided features has become an urgent technical problem to be solved in the current intersection of safety engineering and machine learning, and is of great significance for promoting the upgrading of building explosion accident prevention and emergency response technologies. The following are the specific contents of the embodiments of this invention.

[0039] See Figure 1 This invention provides a method for predicting and analyzing the initial explosive parameters of a building based on adaptive unit type, comprising: S1. Construct and initialize a configuration library that includes multiple types of brick-concrete and frame-type structure apartment types, receive apartment type selection instructions and prediction task selection instructions input by the user, load the configuration information of the corresponding apartment type in the configuration library, and complete the data file validity verification.

[0040] Specifically, a dedicated configuration system is built for at least six types of apartment layouts, including one-bedroom, two-bedroom, and three-bedroom apartments in brick-concrete and frame-structured buildings. This breaks away from the "one-size-fits-all" design flaw of traditional models, allowing the model's basic configuration to be deeply adapted to the apartment layout characteristics. The configuration library stores key information for each apartment layout, such as the file storage path, overpressure feature dimension, smoothing factor sigma candidate set, PCA dimensionality reduction information retention ratio, default overpressure input value, and the meaning of overpressure measurement points. The range of the smoothing factor candidate set is positively correlated with the apartment layout's overpressure feature dimension; the higher the feature dimension, the wider the candidate range, adapting to the different distributions of overpressure data for different apartment layouts. Simultaneously, the prediction task is divided into classification prediction tasks based on explosive substances, detonation locations, and excitation methods, and regression prediction tasks based on explosive gas volume, laying the foundation for differentiated model training. Upon receiving user instructions, the corresponding configuration is loaded, and file validity is verified to avoid errors in subsequent processes due to missing or corrupted data files, ensuring the stability of the prediction process.

[0041] S2. Based on the loaded apartment configuration, read the building explosion overpressure monitoring data of the corresponding apartment type, perform data preprocessing operations on the feature column and label column of the building explosion overpressure monitoring data respectively, remove invalid data and constrain the physical rationality of the label data to obtain a valid sample set.

[0042] Specifically, targeted data preprocessing eliminates noise and invalid information in the original monitoring data, ensuring the quality of the input model. Simultaneously, it incorporates the physical laws of explosion to constrain the label range, ensuring the sample data conforms to actual engineering scenarios. The preprocessing of feature columns follows a logic of unified type, missing value filling, and outlier correction. First, feature columns are forcibly converted to float64 numerical type to ensure data format uniformity. Empty columns are filled with 0 values, and columns with missing values ​​are filled with the mean to address data loss. Outlier correction uses a mean ± 10 standard deviation rule, replacing abnormal overpressure values ​​outside this range with the mean to eliminate the interference of extreme data on the model. The preprocessing of label columns revolves around eliminating invalidity and physical constraints. Samples with null values ​​in the label column are deleted to prevent invalid samples from participating in model training. Simultaneously, physical constraints are applied to the explosion gas volume label, as there are no reasonable scenarios in actual engineering where the explosion gas volume is lower than this value. This constraint ensures the physical rationality of the label data. For classification tasks, labels also need to be deduplicated, and the number of samples in each category needs to be counted to provide a basis for data augmentation.

[0043] S3. Based on the physical characteristics of the building explosion overpressure value, construct derived features, and then perform standardization processing after splicing the derived features with the original overpressure features to form an enhanced feature matrix.

[0044] This study explores the spatial distribution and propagation physical laws of overpressure values ​​in building explosions, constructing derived features with practical physical significance. This overcomes the shortcomings of traditional feature engineering, which only performs basic preprocessing and lacks sufficient characterization capabilities, allowing the feature matrix to better reflect the intrinsic relationship between overpressure data and initial explosion parameters. Based on the physical characteristics of high overpressure values ​​in the core area and low overpressure values ​​in the peripheral area of ​​the explosion shock wave within the building, and the correlation between overpressure dispersion and explosion energy, four types of derived features are constructed: the core area mean is the arithmetic mean of the first three dimensions of overpressure features, representing the overpressure intensity in the core area of ​​the explosion; the peripheral area mean is the arithmetic mean of the last three dimensions of overpressure features, representing the overpressure intensity in the peripheral area of ​​the explosion; the pressure ratio is the ratio of the core area mean to the peripheral area mean, representing the spatial attenuation law of explosion energy; and the pressure standard deviation is the standard deviation of all overpressure features, representing the dispersion of overpressure values. By concatenating the original overpressure features with the four types of derived features and then standardizing them, the dimensional differences between the different features can be eliminated, ensuring that the feature data are on the same order of magnitude. This avoids the model overfitting to high-dimensional features due to dimensional issues. The resulting enhanced feature matrix combines the original monitoring information with physical law information, providing effective feature support for model prediction.

[0045] S4. Perform dimensionality reduction processing on the enhanced feature matrix to simplify the feature dimensions while retaining the main information of the original features, and obtain the dimensionality-reduced feature matrix.

[0046] This process involves reducing the dimensionality of the feature matrix through dimensionality reduction, thereby decreasing the computational complexity of the model and improving training and prediction efficiency. Simultaneously, reasonable dimensionality reduction rules ensure that the key information of the original features is not lost, avoiding the curse of dimensionality caused by excessive dimensionality. Principal Component Analysis (PCA) is used for dimensionality reduction in this step. Principal components are extracted based on the PCA dimensionality reduction information retention ratio for the apartment configuration (default 0.95-0.98). This ratio ensures that the dimensionality-reduced features retain 95%-98% of the information of the original enhanced features, balancing dimensionality simplification and information integrity. A special rule is also set: if the dimensionality of the standardized enhanced feature matrix is ​​≤3, the first two dimensions are directly retained without performing PCA calculations. Since low-dimensional features do not inherently suffer from the curse of dimensionality, no additional dimensionality reduction is needed, reducing unnecessary computational steps and further improving process efficiency. The resulting feature matrix simplifies the computational burden of model training while retaining core information related to the initial explosive state parameters.

[0047] S5. Based on the type of prediction task, the reduced feature matrix and corresponding labels are augmented using data augmentation strategies to obtain a sample set for model training.

[0048] Differentiated data augmentation strategies were designed for the different characteristics of classification and regression prediction tasks. Combined with an automatic adjustment mechanism triggered by a sample size threshold, this effectively alleviated the model overfitting problem caused by the difficulty in obtaining actual building explosion samples and the small sample size, thus improving the model's generalization ability with small samples. The augmentation strategy for the classification prediction task follows the logic of first balancing categories and then adding noise. First, it is determined whether the number of samples in all categories is ≥2. Only when this condition is met is the SMOTE algorithm used for oversampling to solve the common class imbalance problem in classification tasks and ensure that the contribution of each category sample to model training is balanced. Then, ±3% random noise is applied to the feature values ​​of the SMOTE-processed samples to generate new samples and expand sample diversity. For the regression prediction task, considering the continuous value of the explosion gas volume, a feature-label dual perturbation strategy is adopted. ±2% random noise is applied to the feature values, and ±5% random perturbation is applied to the label values. After perturbation, it is ensured that the label value is ≥0.1m. 3 Physical constraints are used to prevent the perturbed labels from deviating from the actual engineering scenario. Furthermore, a sample size threshold mechanism is set. If the number of effective samples is lower than a preset threshold (<10), the data augmentation factor will be increased according to the prediction task type: +1 for classification tasks and +2 for regression tasks. This targeted expansion for extremely small sample sizes further improves the model's adaptability in small-sample scenarios. Finally, the original samples and augmented samples are merged to obtain the model training sample set, ensuring that the sample size and diversity meet the model training requirements.

[0049] S6. For classification prediction tasks and regression prediction tasks, respectively, construct corresponding machine learning models, and complete the optimization training of the corresponding machine learning models through parameter optimization to obtain the explosion initial state parameter prediction model that adapts to the apartment layout.

[0050] Based on the characteristics of the two prediction tasks, classification and regression, suitable machine learning algorithms are selected, and model training is completed through a parameter optimization method specific to each apartment type. This achieves dual adaptation between the model algorithm and the prediction task and apartment type features, breaking the defect of fixed parameters in traditional models.

[0051] For the classification prediction task, the XGBoost classifier was selected. This algorithm has excellent classification performance and anti-overfitting ability, and is suitable for predicting discrete parameters of explosive materials, detonation locations, and excitation methods. Parameter optimization was carried out using a grid search combined with 3-5 fold cross-validation. The parameter search grid was set to max_depth[3,5,7], learning_rate[0.05,0.1], n_estimators[200,300,400], and scale_pos_weight[1,2]. The optimal parameter combination was determined by the F1 weighted value. Cross-validation can avoid the randomness of a single split of the training / test set, making the optimal parameters more generalizable. Before model training, stratified sampling was used to split 10%-20% of the test set to ensure that the class distribution of the test set was consistent with that of the training set, thus improving the accuracy of model evaluation.

[0052] For the regression prediction task, a Generalized Regression Neural Network (GRNN) was chosen. This algorithm has a simple structure, strong adaptability to small sample data, and is suitable for predicting continuous parameters of explosive gas volume. The core of the algorithm optimizes parameters by traversing the candidate set of the smoothing factor sigma for each apartment type, adapting to the overpressure data distribution of different apartment types. The selection rule for the optimal smoothing factor is: if a test set exists, the sigma that maximizes the coefficient of determination R² value of the test set is selected to ensure the model's prediction accuracy; if no test set exists, the median value of the sigma candidate set is selected to ensure the reasonableness of the parameters. Before model training, stratified sampling based on gas volume is used to divide the test set into 10%-20% portions to avoid sampling bias caused by uneven gas volume distribution. Through the above differentiated model construction and parameter optimization, an adaptive prediction model for different apartment types and prediction tasks is finally obtained, ensuring the prediction accuracy of various initial explosion parameters.

[0053] S7. Receive the overpressure monitoring value input by the user, perform preprocessing, input the trained explosion initial state parameter prediction model, apply physical constraints to the output result of the explosion initial state parameter prediction model, and output the final explosion initial state parameter prediction result.

[0054] In the practical application phase of the model, the processing flow of user input data is ensured to be consistent with that of the model training phase, matching the input features with the feature distribution of the model training. Simultaneously, physical constraints are used to ensure that the prediction results conform to actual engineering scenarios, ultimately outputting prediction results containing complete information, thus improving the practicality and interpretability of the method. First, the overpressure monitoring value input by the user is received. If no user input is provided, the default overpressure input value for the corresponding apartment type is used. The dimensionality of the input value is verified to be consistent with the apartment type feature dimension; if the dimensionality is inconsistent, an error mechanism is triggered to avoid invalid input. The user input data undergoes a full-process preprocessing consistent with the training phase, including missing value imputation, derived feature construction, feature standardization, and PCA dimensionality reduction, ensuring that the feature vectors input to the model are consistent with the training samples in terms of format, dimension, and distribution, avoiding prediction bias caused by inconsistent processing flows. The preprocessed feature vectors are input into the trained apartment type adaptive prediction model. After obtaining preliminary prediction results, physical constraints are applied to the regression prediction results (explosion gas volume), limiting them to the minimum and maximum values ​​of the model training set labels, preventing the model from outputting prediction values ​​that exceed the reasonable range of the actual apartment type. The final output prediction results include the prediction task type, predicted value, and reference range. For classification prediction tasks, the optimal parameters of the model are additionally output, and for regression prediction tasks, the optimal smoothing factor of the model is additionally output. This allows users not only to obtain the prediction results, but also to understand the core parameters of the model, thereby improving the interpretability and reference value of the prediction results.

[0055] In one possible embodiment, in step S1, the configuration library includes the file storage path, overpressure feature dimension, smoothing factor candidate set, dimensionality reduction information retention ratio, default overpressure input value, and meaning of overpressure measurement points for each type of apartment. The prediction task includes a classification prediction task for explosive substances, detonation location, and excitation mode, and a regression prediction task for explosive gas volume.

[0056] Specifically, the configuration library content and prediction tasks in step S1 are further refined to ensure that the information in the configuration library covers the entire process of apartment type adaptation and model training, and that the division of prediction tasks matches the types of initial explosion parameters. The file storage path stored in the configuration library is used to read overpressure monitoring data for the corresponding apartment type. The overpressure feature dimension determines the number of overpressure monitoring points for each apartment type. The smoothing factor candidate set provides a basis for optimizing GRNN model parameters. The proportion of information retained during dimensionality reduction sets the standard for PCA dimensionality reduction. The default overpressure input value provides valid data when there is no user input. The meaning of overpressure measurement points clarifies the actual monitoring location of each dimension of features. This information forms a complete apartment-specific configuration system, providing a basis for apartment type adaptation. The prediction tasks are divided into classification and regression because explosive substances, detonation locations, and excitation methods are discrete categorical parameters, suitable for prediction using classification models; while explosive gas volume is a continuous numerical parameter, suitable for prediction using regression models. This ensures a high degree of compatibility between the model algorithm and the parameter types, improving prediction accuracy.

[0057] See Figure 2 In step S1, the range of the candidate set of smoothing factors is positively correlated with the overpressure feature dimension of the corresponding apartment type. Based on the differences in overpressure feature dimensions among different apartment types, a customized sigma candidate set range is designed to match the overpressure data distribution of the apartment type, providing a reasonable search range for GRNN model parameter optimization. The overpressure feature dimension reflects the number of overpressure monitoring points in the apartment type. A higher feature dimension indicates a more complex spatial structure and a more discrete distribution of overpressure monitoring data, requiring a larger sigma value to cover data patterns and ensure the model's generalization ability. Conversely, a lower feature dimension indicates a simpler spatial structure and a more concentrated distribution of overpressure monitoring data, requiring a smaller sigma value to ensure the model's fitting accuracy. Therefore, the range of the sigma candidate set is set to be positively correlated with the overpressure feature dimension. Specifically, 8-9 dimension features correspond to sigma candidate set of 0.05-1.3, 10 dimension features correspond to 0.05-1.6, and 13 dimension features correspond to 0.05-1.8. This makes the sigma optimization range more targeted for different apartment types and avoids poor parameter optimization results caused by unreasonable candidate set range.

[0058] In one possible embodiment, in step S2, the preprocessing of the feature column includes data type conversion, missing value filling, and outlier correction, and the preprocessing of the label column includes null value sample deletion and physical constraint limitation.

[0059] Specifically, targeted preprocessing operations are designed for the different data attributes of the feature and label columns. The feature columns, as input data to the model, must ensure uniform format, no missing values, and no anomalies. The label columns, as the model's learning targets, must ensure no invalid values ​​and conform to physical laws. The three types of preprocessing operations for the feature columns form a progressive relationship: data type conversion is fundamental, unifying all feature values ​​to numerical types to ensure the feasibility of subsequent calculations; missing value imputation addresses incomplete data, ensuring each sample has complete feature dimensions; outlier correction eliminates extreme noise data, avoiding interference from outliers in model training. These three operations together ensure the validity and consistency of the feature column data. The two types of preprocessing operations for the label columns revolve around "validity": null sample deletion directly removes invalid samples without learning targets, preventing them from participating in model training and causing fitting bias; physical constraints ensure that label values ​​conform to the actual engineering laws of building explosions, ensuring that the model learns from reasonable sample data and improving the practical reference value of the model's prediction results.

[0060] In one possible embodiment, in step S3, the derived features include the core region mean value representing the overpressure intensity of the explosion core region, the edge region mean value representing the overpressure intensity of the explosion edge region, the pressure ratio representing the spatial decay law of explosion energy, and the pressure standard deviation representing the dispersion of overpressure value distribution. The enhanced feature matrix is ​​a spliced ​​matrix of the original overpressure features and the derived features.

[0061] See Figure 3 Specifically, derived features can characterize the spatial distribution and propagation patterns of explosive overpressure. By concatenating these features with the original features, the enhanced feature matrix simultaneously incorporates both original monitoring information and physical law information, improving the feature's representational capability. Each of the four types of derived features corresponds to a core physical law of explosive overpressure. The mean value of the core region and the mean value of the edge region reflect the overpressure intensity at the explosion core and edge, respectively, directly reflecting the distribution of explosion energy. The pressure ratio, the ratio of these two values, reflects the rate of energy decay from the core to the edge. Different apartment layouts have different spatial structures, resulting in significant differences in the pressure ratio. The pressure standard deviation reflects the dispersion of the overpressure value across the entire apartment layout and is directly related to the explosion gas volume and the size of the building space. Concatenating the original overpressure features with the four types of derived features results in an enhanced feature matrix with a dimension of the original dimension +4. This retains the original overpressure data from each monitoring point while integrating higher-order information extracted based on physical laws, allowing the model to uncover the deep correlation between overpressure data and initial explosion parameters, thus improving prediction accuracy.

[0062] In one possible embodiment, in step S4, principal component analysis is used to perform dimensionality reduction. If the dimension of the standardized enhanced feature matrix is ​​less than or equal to a preset value, the features of the specified dimension are directly retained, and principal component analysis is not performed.

[0063] Specifically, PCA dimensionality reduction is chosen to simplify feature dimensions, while a rule for dimensionality reduction exemption for low-dimensional features is set to improve process efficiency while ensuring dimensionality reduction effectiveness. PCA transforms a high-dimensional feature matrix into a low-dimensional principal component matrix through orthogonal transformation. The principal components are arranged in descending order of variance, and selecting the first few principal components preserves the main information of the original features. This is an effective method to solve the curse of dimensionality and is suitable for the dimensionality reduction processing of the enhanced feature matrix in this invention. A rule is set that dimensionality reduction is exempted if the dimension of the standardized enhanced feature matrix is ​​≤3. When the feature dimension is ≤3, the computational complexity of model training is extremely low, and there is no curse of dimensionality problem. Dimensionality reduction through PCA is unnecessary; the first two dimensions can be directly retained. This reduces the number of PCA calculation steps, saves computational resources, and improves the efficiency of the entire prediction process. Furthermore, the risk of information loss from low-dimensional features is small, and direct retention will not affect the model's prediction accuracy.

[0064] In one possible embodiment, in step S5, the data augmentation strategy is: The classification prediction task first solves the class imbalance problem through an oversampling algorithm before adding noise perturbation. The regression prediction task applies a set degree of perturbation to the feature value and the label value respectively, and ensures the physical rationality of the label value after perturbation. If the number of effective samples is lower than the preset threshold, the data augmentation factor will be increased according to the prediction task type.

[0065] Specifically, appropriate enhancement methods are designed based on the different data characteristics of classification and regression tasks. Simultaneously, a sample size threshold mechanism is used to dynamically adjust the enhancement factor, maximizing the model's generalization ability in small-sample scenarios. One of the core problems in classification prediction tasks is class imbalance, meaning that the number of samples varies significantly among different explosive substances and detonation locations. If the model is trained directly, it will favor the class with more samples. Therefore, an oversampling algorithm (SMOTE) is first used to expand the minority class samples to achieve class balance, and then noise enhancement is added to expand sample diversity. This two-step strategy balances class balance and sample diversity. Regression prediction tasks predict continuous values ​​of explosive gas volume, which does not have the class imbalance problem. Therefore, a "feature-label dual perturbation" approach is adopted, applying a set degree of random perturbation to both feature values ​​and label values ​​to generate new samples. Simultaneously, the perturbation ensures the physical reasonableness of the label values, avoiding the generation of unrealistic samples. The reason for setting a sample size threshold mechanism is that there are scenarios in the actual building explosion test data where the sample size is extremely small (the number of effective samples is <10). The conventional enhancement factor cannot meet the model training requirements. Therefore, the enhancement factor is increased according to the prediction task type, with +1 for classification tasks and +2 for regression tasks. This targeted expansion is carried out for extremely small sample sizes to further alleviate the overfitting problem.

[0066] In one possible embodiment, in step S6, the machine learning model for the classification prediction task is an XGBoost classifier, and the model parameters are optimized by combining grid search with cross-validation. The machine learning model for the regression prediction task is a generalized regression neural network (GRNN). The optimal smoothing factor is determined by traversing the candidate set of apartment type smoothing factors, thereby realizing the adaptive optimization of apartment type by the GRNN.

[0067] Specifically, the algorithm selection matches the characteristics of the prediction task, and the parameter optimization method matches the apartment type features, achieving a triple adaptation of "algorithm-task-apartment type". The XGBoost classifier is an excellent classification algorithm of the ensemble learning type. It improves classification accuracy by ensemble multiple decision trees and has features such as regularization terms and missing value handling. It has strong anti-overfitting ability and is perfectly adapted to discrete classification prediction of explosive substances, detonation locations, and excitation methods. Grid search combined with cross-validation is a mature parameter optimization method. Grid search can traverse preset parameter combinations, and cross-validation can avoid the randomness of single sampling, making the optimal parameters obtained by optimization more generalizable. GRNN is a regression neural network based on radial basis functions. It has a simple structure, fast training speed, and is far more adaptable to small sample data than traditional regression algorithms, making it suitable for small sample regression prediction of explosive gas volume. By traversing the sigma candidate set specific to each apartment type to determine the optimal smoothing factor, the core parameters of GRNN are adapted to the overpressure data distribution of each apartment type. This breaks the defect of fixed parameters in traditional models, realizes the apartment type adaptive optimization of the GRNN model, and ensures the prediction accuracy of explosive gas volume under different apartment types.

[0068] The prediction formula of the generalized regression neural network (GRNN) is as follows:

[0069] Specifically, based on the nonlinear fitting characteristics of the radial basis function (RBF), the predicted value of the test sample is obtained by calculating the feature similarity between the test sample and the training sample and then weighting the results. The addition of 1e-8 is to avoid calculation errors due to a denominator of 0 and to ensure the formula's executability. The physical meaning and calculation logic of each parameter in the formula are as follows: For the first i The first test sample k 3D feature vectors For the first j The training sample of the th training sample k The sum of squared differences between the two feature vectors reflects the feature similarity between the test sample and the training sample. The higher the similarity, the greater the weight of the training sample in the predicted value of the test sample. For the first j Label values ​​(explosive gas volume) of each training sample; m The total number of training samples. n The feature dimension of the feature matrix; σ is the smoothing factor of GRNN, a core parameter controlling the model's fit and generalization ability. σ If the value is too small, the model is prone to overfitting and is sensitive to noise. σ If the value is too large, the model fit will be too low and it will be unable to capture data patterns. This invention optimizes the model by iterating through a candidate set of sigma values ​​specific to each apartment type. σ The value is highly compatible with the characteristics of the apartment layout; For the first i The predicted explosion gas volume of each test sample is obtained by weighted summation of the label values ​​of all training samples. The weighting coefficient is the feature similarity calculated based on the radial basis function, ensuring that the predicted value can reflect the overall pattern of the training samples.

[0070] The selection rule for the optimal smoothness factor of the generalized regression neural network is as follows: If a test set exists, select the smoothing factor that maximizes the coefficient of determination of the test set; if no test set exists, select the median value of the candidate smoothing factor set as the optimal smoothing factor.

[0071] Specifically, depending on the availability of a test set, different sigma selection methods are used to ensure both prediction accuracy when there is evaluation data and parameter rationality when there is no evaluation data, thus achieving scientific optimization of GRNN model parameters. The coefficient of determination (R²) 2 R0 is the core evaluation metric for regression models. The closer its value is to 1, the better the model fits the test set data and the better the prediction accuracy. Therefore, when a test set exists, the model should be chosen to make the test set R0 the optimal value. 2 The largest sigma value allows the GRNN model to achieve the best prediction effect of explosive gas volume for this apartment type. When there is no test set, there is a lack of actual model evaluation basis. In this case, the median value of the sigma candidate set is selected because the median value can take into account the model's fitting degree and generalization ability, avoid overfitting or underfitting the model due to the selection of extreme values, and ensure the rationality of the sigma parameter in the absence of a test set. At the same time, the sigma candidate set is customized according to the apartment type feature dimension, and its median value is also adapted to the apartment type feature.

[0072] In one possible embodiment, in step S7, the physical constraint is to limit the regression prediction result to the numerical range of the model training set labels. The final output prediction result includes the prediction task type, the predicted value, and the reference range. The classification prediction task additionally outputs the optimal parameters of the model, and the regression prediction task additionally outputs the optimal smoothing factor of the model.

[0073] Specifically, physical constraints are used to ensure that the regression prediction results conform to the actual explosion gas volume range of the apartment type, and rich output information enhances the practicality and interpretability of the method. The regression prediction results (explosion gas volume) are limited to the numerical range of the training set labels. The training set data consists of actual explosion monitoring data for this apartment type, and its numerical range reflects the reasonable explosion gas volume range for this apartment type. If the model output results exceed this range, they will not conform to the actual engineering scenario. This constraint avoids the model outputting invalid prediction values. The final output prediction results include two parts: basic information and specific parameters. The basic information (prediction task type, predicted value, reference range) allows users to quickly obtain the core prediction results, while the reference range provides a basis for users to evaluate the reasonableness of the prediction values. The classification task additionally outputs the model's optimal parameters, and the regression task additionally outputs the optimal smoothing factor, allowing users to understand the model's core training parameters. This not only improves the interpretability of the prediction results but also provides data support for subsequent model optimization and result validation, enabling this method to not only achieve parameter prediction but also provide a reference for engineering analysis.

[0074] The application scenarios of this invention are as follows: Building Explosion Accident On-Site Tracing and Responsibility Determination: After an accident, emergency management, fire protection, and safety supervision departments can use this invention to quickly collect overpressure monitoring data within the affected building. By selecting the corresponding apartment type and executing a prediction process, key parameters such as the type of explosive substance (e.g., natural gas, liquefied petroleum gas), the specific location of the explosion (e.g., kitchen, living room, secondary bedroom), the ignition method (e.g., open flame ignition, electrical spark triggering), and the volume of explosive gas can be obtained in a short time. These initial parameters provide core technical basis for tracing the cause of the accident, clarifying whether the accident was caused by gas leakage, improper operation, equipment failure, or other factors. Simultaneously, it provides objective data support for subsequent accident responsibility determination and loss accounting, solving the problems of traditional tracing methods relying on manual investigation, being time-consuming, and having conclusions easily influenced by subjective factors.

[0075] Emergency Decision-Making in Building Explosion Accidents: During emergency rescue operations for building explosion accidents, rescuers can use this invention to quickly predict core explosion parameters, determine the scope of the explosion's impact, the potential explosion risk of remaining gas, and the key reasons for structural damage to the building. Based on the prediction results, rescuers can scientifically plan rescue routes, identify key search and rescue areas and critical points for explosion prevention and hazard mitigation, and rationally allocate rescue equipment and personnel. This avoids secondary explosions, building collapses, and other secondary disasters caused by misjudging explosion parameters, improving the targeting, safety, and efficiency of emergency rescue, and minimizing casualties and property losses.

[0076] Explosion-proof design and structural optimization for civil buildings: During the design phase of residential buildings, apartments, and mixed-use buildings, real estate developers and architectural design firms can use this invention to simulate initial-state parameters under different explosion scenarios for different unit types (brick-concrete / frame type, one / two / three-bedroom, etc.). This analysis examines the impact of different unit structures, wall layouts, gas pipeline routing, and ventilation system designs on the propagation of explosion shock waves and overpressure distribution. Based on the prediction results, the explosion-proof design of buildings can be optimized. For example, adding explosion-proof walls in high-risk explosion areas (kitchens), rationally setting up gas leak monitoring points, and optimizing door and window layouts to mitigate shock wave superposition can all be implemented. Furthermore, customized designs for gas pipelines and explosion-proof facilities can be created for different unit types, enhancing the building's explosion-proof and blast-resistant performance and reducing the probability and severity of gas explosion accidents from the source.

[0077] Explosion-proof Compliance Verification for Commercial / Industrial Buildings: Commercial and industrial buildings such as shopping malls, office buildings, and industrial plants have higher requirements for explosion-proof design due to their high population density, complex equipment, and large usage of natural gas / flammable and explosive gases. They also need to pass compliance verification by relevant safety supervision departments. Design units and safety supervision departments can use this invention to simulate and predict explosion parameters for commercial and industrial buildings of different unit types / structures, verifying whether their explosion-proof design meets relevant national safety standards and determining the rationality of the storage locations of flammable and explosive gases, the layout of work areas, and the configuration of explosion-proof facilities within the building. For areas where the design does not meet standards, targeted rectification can be carried out based on the prediction results to ensure the compliance and reliability of the building's explosion-proof design.

[0078] Gas Safety Management and Daily Risk Assessment: When conducting daily gas safety management in residential communities and commercial complexes, gas companies and property management companies can combine building unit information with this invention to simulate and predict explosion risks for different unit types. This identifies high-risk unit types (such as those with compact spaces or gas pipelines close to heat sources) and high-risk areas, allowing for the development of targeted safety inspection plans. Simultaneously, based on predicted explosion gas volume and ignition location parameters, gas safety awareness campaigns and risk prevention measures can be customized for different unit types. For example, users in units with kitchens considered high-risk for explosion can be specifically educated on methods for closing gas valves and detecting leaks, improving the precision of gas safety management and enabling early accident prevention.

[0079] It should be noted that the method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method in this embodiment, and the multiple devices will interact with each other to complete the building explosion initial state parameter prediction and analysis method based on apartment type adaptation.

[0080] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0081] See Figure 4 This invention also provides a building explosion initial state parameter prediction and analysis device based on unit type adaptation, employing the building explosion initial state parameter prediction and analysis method based on unit type adaptation described in the above embodiments, including: The configuration module 100 is used to build and initialize a configuration library including multiple types of brick-concrete and frame-type structure apartment types, receive apartment type selection instructions and prediction task selection instructions input by the user, load the configuration information of the corresponding apartment type in the configuration library, and complete the data file validity verification. The data preprocessing module 200 is used to read the building explosion overpressure monitoring data of the corresponding apartment type based on the loaded apartment type configuration, and to perform data preprocessing operations on the feature column and label column of the building explosion overpressure monitoring data respectively, to remove invalid data and constrain the physical rationality of the label data, so as to obtain an effective sample set; The feature engineering module 300 is used to construct derived features based on the physical characteristics of the building explosion overpressure value, and to perform standardization processing after splicing the derived features with the original overpressure features to form an enhanced feature matrix. The dimension reduction module 400 is used to perform dimension reduction processing on the enhanced feature matrix, simplifying the feature dimension while retaining the main information of the original features, to obtain a dimension-reduced feature matrix. The data augmentation module 500 is used to expand the sample set for model training by applying a data augmentation strategy to the dimensionality reduction feature matrix and corresponding labels according to the type of prediction task. Model training module 600 is used to build corresponding machine learning models for classification prediction tasks and regression prediction tasks respectively. The corresponding machine learning models are optimized and trained by parameter optimization to obtain the explosive initial state parameter prediction model for apartment type adaptation. The prediction module 700 is used to receive the overpressure monitoring value input by the user, perform preprocessing, input the trained explosion initial state parameter prediction model, apply physical constraints to the output result of the explosion initial state parameter prediction model, and output the final explosion initial state parameter prediction result.

[0082] The system described above is used to implement the building explosion initial state parameter prediction and analysis method based on unit type adaptation in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0083] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the building explosion initial state parameter prediction and analysis method based on unit type adaptive as described in any of the above embodiments.

[0084] Figure 5 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 810, a memory 820, an input / output interface 830, a communication interface 840, and a bus 850. The processor 810, memory 820, input / output interface 830, and communication interface 840 are interconnected internally via the bus 850.

[0085] The processor 810 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0086] The memory 820 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 820 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 820 and is called and executed by the processor 810.

[0087] The input / output interface 830 is used to connect input / output modules to enable information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0088] The communication interface 840 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0089] Bus 850 includes a pathway for transmitting information between various components of the device, such as processor 810, memory 820, input / output interface 830, and communication interface 840.

[0090] It should be noted that although the above-described device only shows the processor 810, memory 820, input / output interface 830, communication interface 840, and bus 850, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0091] The electronic device described above is used to implement the building explosion initial state parameter prediction and analysis method based on unit type adaptation in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0092] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, the present invention also provides a non-transitory computer-readable storage medium storing computer instructions, which are used to cause the computer to execute the building explosion initial state parameter prediction and analysis method based on unit type adaptation as described in any of the above embodiments.

[0093] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0094] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the building explosion initial state parameter prediction and analysis method based on unit type adaptation as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0095] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention is limited to these examples; within the framework of the invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity.

[0096] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of the invention, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of the invention, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of the invention will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of the invention, it will be apparent to those skilled in the art that the embodiments of the invention may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0097] Although the invention has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., DRAM) may use the embodiments discussed.

[0098] The embodiments of this invention are intended to cover all such substitutions, modifications, and variations falling within the scope of the claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this invention should be included within the scope of protection of this invention.

Claims

1. A method for predicting and analyzing the initial explosive state parameters of buildings based on adaptive apartment layout, characterized in that, include: 1) Construct and initialize a configuration library that includes multiple types of brick-concrete and frame-type structure apartment types, receive apartment type selection instructions and prediction task selection instructions input by users, load the configuration information of the corresponding apartment type in the configuration library and complete the data file validity verification. 2) Based on the loaded apartment configuration, read the building explosion overpressure monitoring data of the corresponding apartment type, perform data preprocessing operations on the feature column and label column of the building explosion overpressure monitoring data respectively, remove invalid data and constrain the physical rationality of the label data to obtain an effective sample set; 3) Based on the physical characteristics of the building explosion overpressure value, a derived feature is constructed. The derived feature is then spliced ​​with the original overpressure feature and standardized to form an enhanced feature matrix. 4) Perform dimensionality reduction processing on the enhanced feature matrix to simplify the feature dimensions while retaining the main information of the original features, and obtain a dimensionality-reduced feature matrix; 5) Based on the type of prediction task, the reduced feature matrix and corresponding labels are augmented using data augmentation strategies to obtain a sample set for model training; 6) For classification prediction tasks and regression prediction tasks, corresponding machine learning models are constructed respectively. The optimization training of the corresponding machine learning models is completed by parameter optimization to obtain the explosive initial state parameter prediction model for apartment type adaptation. 7) Receive the overpressure monitoring value input by the user, perform preprocessing, input the trained explosion initial state parameter prediction model, apply physical constraints to the output result of the explosion initial state parameter prediction model, and output the final explosion initial state parameter prediction result.

2. The method for predicting and analyzing building explosion initial state parameters based on adaptive unit type as described in claim 1, characterized in that, In step 1), the configuration library includes the file storage path, overpressure feature dimension, smoothing factor candidate set, dimensionality reduction information retention ratio, default overpressure input value, and meaning of overpressure measurement point for each type of housing. The prediction task includes the classification prediction task of explosive material, detonation location, and excitation mode, and the regression prediction task of explosive gas volume. In step 1), the range of the candidate set of smoothing factors is positively correlated with the overpressure feature dimension of the corresponding apartment type.

3. The method for predicting and analyzing building explosion initial state parameters based on adaptive unit type as described in claim 1, characterized in that, In step 2), the preprocessing of the feature column includes data type conversion, missing value filling and outlier correction, and the preprocessing of the label column includes null value deletion and physical constraint limitation.

4. The method for predicting and analyzing building explosion initial state parameters based on adaptive unit type as described in claim 1, characterized in that, In step 3), the derived features include the core region mean value representing the overpressure intensity of the explosion core region, the edge region mean value representing the overpressure intensity of the explosion edge region, the pressure ratio representing the spatial decay law of explosion energy, and the pressure standard deviation representing the dispersion of overpressure value distribution. The enhanced feature matrix is ​​a splicing matrix of the original overpressure features and the derived features.

5. The method for predicting and analyzing building explosion initial state parameters based on adaptive unit type as described in claim 1, characterized in that, In step 4), dimensionality reduction is performed using principal component analysis. If the dimension of the standardized enhanced feature matrix is ​​less than or equal to the preset value, the features of the specified dimension are retained directly, and principal component analysis is not performed.

6. The method for predicting and analyzing building explosion initial state parameters based on adaptive unit type as described in claim 1, characterized in that, In step 5), the data augmentation strategy is as follows: The classification prediction task first solves the class imbalance problem through an oversampling algorithm before adding noise perturbation. The regression prediction task applies a set degree of perturbation to the feature value and the label value respectively, and ensures the physical rationality of the label value after perturbation. If the number of effective samples is lower than the preset threshold, the data augmentation factor will be increased according to the prediction task type.

7. The method for predicting and analyzing building explosion initial state parameters based on adaptive unit type as described in claim 1, characterized in that, In step 6), the machine learning model for the classification prediction task is the XGBoost classifier, and the model parameters are optimized by combining grid search with cross-validation. The machine learning model for the regression prediction task is a generalized regression neural network (GRNN). The optimal smoothing factor is determined by traversing the candidate set of apartment type smoothing factors, thereby realizing the adaptive optimization of apartment type by the GRNN.

8. The method for predicting and analyzing building explosion initial state parameters based on adaptive unit type as described in claim 7, characterized in that, The prediction formula of the generalized regression neural network (GRNN) is as follows: In the formula, For the test sample k 3D feature vectors For the training sample k 3D feature vectors For the first j The label values ​​of each training sample. m The total number of training samples. n The feature dimension of the feature matrix. For the smoothing factor of the generalized regressive neural network, For the first i Predicted values ​​for each test sample; The selection rule for the optimal smoothness factor in the generalized regression neural network is as follows: If a test set exists, select the smoothing factor that maximizes the coefficient of determination of the test set; if no test set exists, select the median value of the candidate smoothing factor set as the optimal smoothing factor.

9. The method for predicting and analyzing building explosion initial state parameters based on adaptive unit type as described in claim 1, characterized in that, In step 7), the physical constraint is to limit the regression prediction results to the numerical range of the model training set labels. The final output prediction results include the prediction task type, prediction value, and reference range. The classification prediction task additionally outputs the optimal parameters of the model, and the regression prediction task additionally outputs the optimal smoothing factor of the model.

10. A building explosion initial state parameter prediction and analysis device based on adaptive unit type, employing the building explosion initial state parameter prediction and analysis method based on adaptive unit type as described in any one of claims 1 to 9, characterized in that, include: The configuration module is used to build and initialize a configuration library that includes multiple types of brick-concrete and frame-type structure apartment types, receive apartment type selection instructions and prediction task selection instructions input by the user, load the configuration information of the corresponding apartment type in the configuration library, and complete the data file validity verification. The data preprocessing module is used to read the building explosion overpressure monitoring data of the corresponding apartment type based on the loaded apartment type configuration, and to perform data preprocessing operations on the feature column and label column of the building explosion overpressure monitoring data respectively, to remove invalid data and constrain the physical rationality of the label data, so as to obtain an effective sample set. The feature engineering module is used to construct derived features based on the physical properties of building explosion overpressure values. The derived features are then spliced ​​with the original overpressure features and standardized to form an enhanced feature matrix. The dimensionality reduction module is used to perform dimensionality reduction processing on the enhanced feature matrix, simplifying the feature dimensions while retaining the main information of the original features, to obtain a dimensionality-reduced feature matrix; The data augmentation module is used to augment the dimensionality-reduced feature matrix and its corresponding labels using data augmentation strategies according to the type of prediction task, so as to obtain a sample set for model training. The model training module is used to build corresponding machine learning models for classification prediction tasks and regression prediction tasks respectively. The optimization training of the corresponding machine learning models is completed through parameter optimization to obtain the explosive initial state parameter prediction model for adaptive apartment layout. The prediction module receives the overpressure monitoring value input by the user, performs preprocessing, inputs the trained explosion initial state parameter prediction model, applies physical constraints to the output of the explosion initial state parameter prediction model, and outputs the final explosion initial state parameter prediction result.