Limited space accident risk dynamic assessment method and system based on Internet of Things
By collecting data through IoT sensor networks and generating virtual risk scenarios using generative adversarial networks, and then training models with real data, the problem of small sample size in confined space accident risk assessment is solved, achieving efficient and accurate dynamic risk assessment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies for risk assessment of accidents in confined spaces suffer from limitations such as small sample size, model bias towards safe states, lack of foresight and accuracy, and inability to generate virtual risk scenarios that conform to physical evolution and have spatiotemporal correlation, resulting in serious underreporting.
By deploying an IoT sensor network to collect multi-source heterogeneous spatiotemporal sequence data, a spatiotemporal data cube is constructed. Then, a virtual risk evolution scenario data is generated using a generative adversarial network with physical constraints. Combined with real historical data, a balanced and enhanced training dataset is constructed to train a spatiotemporal risk assessment model and achieve dynamic assessment.
It overcomes the limitations of small sample sizes, generates physically compliant virtual risk scenarios, and achieves accurate and dynamic assessment of confined space accident risks, improving the foresight and accuracy of the assessment.
Smart Images

Figure CN121745684A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of confined space risk assessment technology, and in particular relates to a method and system for dynamic assessment of confined space accident risks based on the Internet of Things. Background Technology
[0002] With the rapid development of the Industrial Internet of Things (IIoT) and intelligent sensing technologies, safety monitoring of confined spaces such as chemical plants and underground utility tunnels has gradually achieved automated and real-time data acquisition. By deploying various sensors to continuously monitor parameters such as temperature, pressure, and gas concentration, an IoT-based dynamic risk assessment method has been formed, with the goal of providing early warnings of potential accidents.
[0003] In traditional technologies, the assessment of such risks mainly relies on setting fixed safety thresholds, i.e., triggering an alarm when a sensor reading exceeds a preset threshold; or on using machine learning models such as logistic regression and support vector machines based on historical statistical data to distinguish between normal and abnormal states.
[0004] However, current assessment methods or traditional approaches still have limitations: serious accidents are low-probability events, resulting in extremely scarce real accident samples available for training models. Models are prone to bias towards predicting "safe" states due to data imbalance, leading to serious underreporting of real high risks. Traditional data augmentation techniques such as SMOTE can only perform simple interpolation in the feature space, making it difficult to generate virtual risk scenarios that conform to both physical evolution laws and spatiotemporal correlations, thus failing to effectively expand high-quality positive samples. Existing methods focus more on instantaneous data points while ignoring the dynamic propagation characteristics of risks in the spatiotemporal dimension, failing to integrate environmental constraints and the coupling relationship between multiple sensors, resulting in assessment results lacking foresight and accuracy. Summary of the Invention
[0005] Therefore, it is necessary to provide a confined space accident risk monitoring method that can overcome the limitations of small samples, generate physically compliant virtual risk scenarios, and achieve accurate dynamic assessment, in order to address the aforementioned technical problems.
[0006] Firstly, this application provides a method for dynamic assessment of confined space accident risks based on the Internet of Things, including:
[0007] Multi-source heterogeneous spatiotemporal sequence data is collected by deploying an IoT sensor network in a confined space, and a spatiotemporal data cube is constructed based on the multi-source heterogeneous spatiotemporal sequence data.
[0008] A spatiotemporal data cube is input into a physically constrained spatiotemporal generative adversarial network (PGAN) to output virtual risk evolution scenario data; the physically constrained spatiotemporal PGAN includes a generator and a discriminator.
[0009] A balanced augmented training dataset is constructed based on virtual risk evolution scenario data and real historical data.
[0010] The pre-defined spatiotemporal risk assessment model is trained using a balanced augmented training dataset to obtain a well-trained spatiotemporal risk assessment model.
[0011] Based on a trained spatiotemporal risk assessment model and real-time IoT data stream, the accident risk in a confined space is dynamically assessed, and the dynamic assessment results of the accident risk are obtained.
[0012] Furthermore, the spatiotemporal data cube is input into a physically constrained spatiotemporal generative adversarial network (GAN) to output virtual risk evolution scenario data; wherein, the physically constrained spatiotemporal GAN includes a generator and a discriminator, including:
[0013] A random noise vector and a condition vector describing the physical properties of a confined space are input into the generator of a spatiotemporal generative adversarial network with physical constraints to generate a preliminary multivariate time series. The generator is a hybrid architecture of a convolutional long short-term memory network and a Transformer encoder. The condition vector includes space volume, ventilation conditions, and types of hazardous substances.
[0014] Based on spatiotemporal data cubes, a discriminator using a spatiotemporal generative adversarial network with physical constraints is used to discriminate the multidimensional properties of preliminary multivariate time series, and the discriminant results are obtained. The multidimensional properties include overall authenticity, temporal dynamic rationality, and physical correlation between variables.
[0015] Based on preliminary multivariate time series and predefined physical laws, a physical constraint loss term is generated;
[0016] Based on the discrimination results and physical constraint loss terms, the generator is iteratively optimized using the backpropagation algorithm until the preset iteration stopping condition is met, at which point the iteration stops, resulting in an optimized generator. Based on the optimized generator, virtual risk evolution scenario data is output.
[0017] Furthermore, based on the preliminary multivariate time series and predefined physical laws, a physical constraint loss term is generated, including:
[0018] Based on predefined physical laws, simplified physical equations applicable to confined spaces are established;
[0019] Substitute the relevant variable values from the preliminary multivariate time series into the simplified physical equation and calculate the difference between the left and right sides of the simplified physical equation; the difference is used to characterize the deviation between the relevant variable values and the corresponding physical laws in the preliminary multivariate time series.
[0020] By calculating the L2 norm of the difference, the physical constraint loss term is obtained: the physical constraint loss term is used to penalize the generator for producing data that violates physical laws during the training process.
[0021] Furthermore, based on virtual risk evolution scenario data and real historical data, a balanced augmented training dataset is constructed, including:
[0022] The accident evolution process is obtained from virtual risk evolution scenario data and real historical data. Based on the accident evolution process, risk level labels are applied to the virtual risk evolution scenario data and real historical data to form a labeled dataset.
[0023] Extract time-domain statistical features and frequency-domain transform features from the labeled dataset, and construct an initial high-dimensional feature set based on the time-domain statistical features and frequency-domain transform features;
[0024] Features that meet preset conditions are selected from the initial high-dimensional feature set, and these features are then aggregated to form a feature subset.
[0025] Based on feature subsets and combined with grid mapping relationships at different spatial scales, a balanced and enhanced training dataset is constructed.
[0026] Furthermore, the pre-defined spatiotemporal risk assessment model is trained using a balanced augmented training dataset to obtain a trained spatiotemporal risk assessment model, including:
[0027] A spatiotemporal risk assessment model is constructed; the network architecture of the spatiotemporal risk assessment model includes a shared feature extraction network, a coarse-grained risk assessment branch, and a fine-grained risk assessment branch.
[0028] The balanced augmented training dataset is input into the shared feature extraction network of the spatiotemporal risk assessment model, and the output is a fused spatiotemporal feature vector; the shared feature extraction network includes a convolutional neural network and a long short-term memory network.
[0029] The spatiotemporal feature vectors are input into the coarse-grained risk assessment branch and the fine-grained risk assessment branch, respectively, and the regional-level risk probability distribution and the point-level risk probability distribution within the confined space are output.
[0030] Based on the regional and location-level risk probability distributions, the model parameters are iteratively optimized by minimizing the overall loss function of the spatiotemporal risk assessment model until the model converges, resulting in a well-trained spatiotemporal risk assessment model. The overall loss function is calculated by weighting the coarse-grained assessment loss, the fine-grained assessment loss, and the regularization term.
[0031] Furthermore, multi-source heterogeneous spatiotemporal sequence data is collected through an IoT sensor network deployed in a confined space, and a spatiotemporal data cube is constructed based on this data.
[0032] Raw spatiotemporal sequence data is collected by deploying an IoT sensor network in a confined space, and missing values are filled in to generate a preliminary spatiotemporal sequence dataset.
[0033] Denoising is performed on the initial spatiotemporal sequence dataset to obtain clean spatiotemporal sequence data;
[0034] Spatiotemporal alignment processing is performed on clean spatiotemporal sequence data to generate spatiotemporally aligned data;
[0035] Based on spatiotemporal alignment, the confined space is divided into grids to obtain multiple grid cells;
[0036] Data fusion is performed on the spatiotemporally aligned data within each grid cell to obtain the grid cell data value;
[0037] A spatiotemporal data cube is constructed based on the data values of all grid cells; the spatiotemporal data cube includes spatial dimension, time dimension and numerical dimension.
[0038] Secondly, this application also provides an IoT-based dynamic risk assessment system for confined spaces, including:
[0039] The data acquisition module is used to collect multi-source heterogeneous spatiotemporal sequence data through an IoT sensor network deployed in a confined space, and to construct a spatiotemporal data cube based on the multi-source heterogeneous spatiotemporal sequence data;
[0040] The data processing module is used to input the spatiotemporal data cube into the physically constrained spatiotemporal generative adversarial network and output virtual risk evolution scenario data; wherein, the physically constrained spatiotemporal generative adversarial network includes a generator and a discriminator;
[0041] The dataset construction module is used to build a balanced and enhanced training dataset based on virtual risk evolution scenario data and real historical data.
[0042] The model training module is used to train a pre-defined spatiotemporal risk assessment model using a balanced augmented training dataset to obtain a trained spatiotemporal risk assessment model.
[0043] The risk assessment module is used to dynamically assess the accident risk in a confined space based on a trained spatiotemporal risk assessment model and real-time IoT data stream, and obtain the dynamic assessment result of the accident risk.
[0044] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement any of the IoT-based dynamic risk assessment methods for confined spaces described in the embodiments of this application.
[0045] Fourthly, this application also provides a computer-readable storage medium storing at least one piece of program code, which is loaded and executed by a processor to implement any of the IoT-based dynamic risk assessment methods for confined spaces described in the embodiments of this application.
[0046] The aforementioned IoT-based method and system for dynamic risk assessment of confined spaces utilizes multi-source heterogeneous spatiotemporal sequence data. Based on this data, a spatiotemporal data cube is constructed. This cube is then input into a physically constrained generative adversarial network (GAN) to create a large amount of high-quality virtual risk scenario data that conforms to physical laws. This virtual risk scenario data is combined with real-world data to train a risk assessment model. The trained model is then seamlessly integrated with real-time data streams, and smoothing filtering techniques are employed to obtain a comprehensive dynamic risk assessment result. This approach overcomes the limitations of small sample sizes, generates physically compliant virtual risk scenarios, and achieves accurate dynamic assessment of confined space accident risks. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a flowchart illustrating a method for dynamic risk assessment of confined spaces based on the Internet of Things in one embodiment.
[0049] Figure 2 This is a flowchart illustrating the steps of inputting a spatiotemporal data cube into a physically constrained spatiotemporal generative adversarial network to output virtual risk evolution scenario data in one embodiment.
[0050] Figure 3 This is a schematic diagram of the structure of a confined space accident risk dynamic assessment system based on the Internet of Things in one embodiment. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] In one embodiment, a method for dynamic risk assessment of confined spaces based on the Internet of Things (IoT) is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and is implemented through the interaction between the terminal and the server. Figure 1 As shown, in this embodiment, the method includes the following steps:
[0053] Step S101: Collect multi-source heterogeneous spatiotemporal sequence data through an IoT sensor network deployed in a confined space, and construct a spatiotemporal data cube based on the multi-source heterogeneous spatiotemporal sequence data.
[0054] For example, based on the geometric characteristics and risk distribution features of the confined space, multiple sensors are optimally deployed to construct an IoT sensor network within the confined space. For instance, the number of cameras and gas sensors is calculated using a spatial coverage model: the formulas for the number of cameras and gas sensors are as follows:
[0055]
[0056]
[0057] in, For the number of cameras, For the total area, For the coverage area of a single camera, This is the overlap coefficient, used to ensure no blind spots; For the number of gas sensors, For the coverage area of a single sensor, To accommodate the number of high-risk areas, the types of sensors include temperature, pressure, gas concentration, and humidity sensors, as well as UWB (Ultra-Wideband) tags for locating personnel activities. For example, continuous data acquisition is performed through an IoT sensor network within a confined space to obtain multi-source heterogeneous spatiotemporal sequence data containing timestamps, spatial coordinates, and measurements. Based on the acquired multi-source heterogeneous spatiotemporal sequence data, a spatiotemporal data cube is constructed, comprising three dimensions: spatial location, time point, and sensor measurements.
[0058] Step S102: Input the spatiotemporal data cube into the physically constrained spatiotemporal generative adversarial network and output virtual risk evolution scenario data; wherein, the physically constrained spatiotemporal generative adversarial network includes a generator and a discriminator.
[0059] Among them, the physical constraint spatiotemporal generative adversarial network is a specific model derived from the generative adversarial network framework, which combines the prior constraints of physical laws with spatiotemporal data modeling. The core is to enable the network to strictly follow known physical laws when learning to generate real spatiotemporal data, and avoid generating unreasonable data that violates common sense. The model includes a generator and a discriminator. The discriminator is a multi-objective structure used to evaluate the overall authenticity of the generated sequence. It also uses a dedicated subnetwork to judge whether its temporal dynamics are reasonable and whether the correlation between different sensor variables conforms to physical common sense.
[0060] For example, the distribution of normal state data contained in the generated spatiotemporal data cube is used as the learning target to drive a physically constrained spatiotemporal generative adversarial network, which outputs a large amount of high-fidelity virtual risk evolution scenario data that conforms to the laws of physical evolution.
[0061] Step S103: Construct a balanced augmented training dataset based on virtual risk evolution scenario data and real historical data.
[0062] For example, real historical data is collected, and a balanced augmented training dataset is constructed based on the real historical data and all virtual risk evolution scenario data. This dataset has a sufficient sample size and a balance between positive and negative samples.
[0063] Step S104: Use the balanced augmented training dataset to train the preset spatiotemporal risk assessment model to obtain the trained spatiotemporal risk assessment model.
[0064] Among them, the pre-built spatiotemporal risk assessment model is a tool that integrates time and space dimensions to quantitatively assess and dynamically analyze the probability of occurrence, scope of impact, and severity of specific risk events. It breaks through the limitations of assessment based on a single time or space, and is more in line with the characteristics of risk events in reality that evolve over time and vary due to spatial differences. Its network architecture adopts a multi-task learning framework, which includes a shared feature extraction network and two parallel output branches: a coarse-grained risk assessment branch and a fine-grained risk assessment branch.
[0065] For example, the distribution of normal-state data contained in the generated spatiotemporal data cube is used as the learning objective to construct a dedicated spatiotemporal risk assessment model. This model is then trained using a balanced augmented training dataset. The training process optimizes all parameters by minimizing an overall loss function, which is calculated by weighting coarse-grained assessment loss, fine-grained assessment loss, and a regularization term to prevent overfitting. Through iterative optimization, the model accurately learns the mapping relationship from complex spatiotemporal data to risk levels, ultimately resulting in a well-trained spatiotemporal risk assessment model capable of comprehensively assessing multi-scale risks.
[0066] Step S105: Based on the trained spatiotemporal risk assessment model and real-time IoT data stream, the accident risk in the confined space is dynamically assessed to obtain the dynamic assessment result of the accident risk.
[0067] For example, the data stream collected in real time from the IoT sensor network undergoes the same preprocessing and spatiotemporal alignment process as in step S101 to form a real-time spatiotemporal data cube. This real-time data cube is then input into a trained spatiotemporal risk assessment model. The model quickly calculates and outputs risk probability values at the current moment and in the short term at different spatial locations (coarse-grained and fine-grained). To improve the stability and reliability of early warnings and reduce false alarms caused by instantaneous data fluctuations, a Kalman filter algorithm is typically applied to smooth these continuously output risk probability values. The smoothed risk probability values are compared with preset multi-level warning thresholds. Once a threshold is exceeded, the corresponding level of warning signal (e.g., yellow warning, red warning) is automatically triggered. Furthermore, based on integrated real-time personnel location information, a comprehensive dynamic accident risk assessment result including risk location, risk level, and recommended actions (e.g., evacuation routes) can be generated. The Kalman filter algorithm is a linear, unbiased, minimum variance recursive filtering algorithm used to estimate the true state of a dynamic system in real time from noisy observation data, such as the position and velocity of objects or the actual measurements of sensors.
[0068] In this embodiment, a spatiotemporal data cube is constructed based on acquired multi-source heterogeneous spatiotemporal sequence data. This spatiotemporal data cube is then input into a physically constrained generative adversarial network (GAN) to create a large amount of high-quality virtual risk scenario data that conforms to physical laws. This virtual risk scenario data is combined with real data to train a risk assessment model. The trained model is then seamlessly integrated with the real-time data stream, and smoothing filtering techniques are applied to obtain a comprehensive dynamic assessment result of accident risk. This approach overcomes the limitations of small sample sizes, generates physically compliant virtual risk scenarios, and achieves accurate dynamic assessment of accident risks in confined spaces.
[0069] In one embodiment, such as Figure 2 As shown, a spatiotemporal data cube is input into a physically constrained spatiotemporal generative adversarial network (GAN), which outputs virtual risk evolution scenario data. The physically constrained spatiotemporal GAN includes a generator and a discriminator, comprising:
[0070] Step S201: Input the random noise vector and the condition vector describing the physical properties of the confined space into the generator of the physical constraint spatiotemporal generative adversarial network to generate a preliminary multivariate time series; wherein, the generator is a hybrid architecture of convolutional long short-term memory network and Transformer encoder; the condition vector includes space volume, ventilation conditions and hazardous substance type.
[0071] The random noise vector is directly sampled from a pre-defined random probability distribution, conforming to a specific distribution such as the standard normal distribution. It serves as the source of randomness in data generation, ensuring the diversity and uncertainty of each generated risk scenario. The pre-defined random probability distribution is a pre-set probability allocation method for generating random event outcomes, defining the likelihood of different results. The condition vector describing the physical properties of the confined space is a quantified set of static parameters, typically including the three-dimensional volume of the space, the location coordinates and area of ventilation openings, and key environmental parameters such as the type and initial concentration of hazardous chemicals present inside. These parameters originate from prior knowledge or measurement data of the target confined space, collectively constituting the physical boundary conditions for risk evolution. The convolutional long short-term memory network (LSTM) is a hybrid deep learning model that integrates the core capabilities of convolutional neural networks and LSTM networks. It is primarily used to process spatiotemporal sequence data, meaning the data simultaneously contains spatial features and temporal dynamics. The Transformer encoder is a core component of the Transformer model, used to extract deep semantic features from input text or sequence data, providing context-rich vector representations for subsequent tasks.
[0072] For example, a prepared random noise vector and a condition vector describing the physical properties of a confined space are input into the generator of a spatiotemporal generative adversarial network (GAN) with physical constraints. The convolutional long short-term memory (LSTM) network, by introducing convolution operations into the gating mechanism of traditional LSTM networks, captures the short-term evolution patterns of sensor data in the local spatial neighborhood and time series, such as the initial diffusion path of toxic gas in a pipe. The Transformer encoder, utilizing its powerful self-attention mechanism, performs a global-level analysis of the feature sequence output by the convolutional LSTM network. By calculating the correlation weights between different time points in the sequence, it captures long-term and complex causal relationships, such as the slow rise in pressure due to the cumulative effect of temperature. Through this hierarchical processing mechanism, the input noise and condition vector are gradually mapped and synthesized into a preliminary multivariate time series. This series initially simulates the changes in readings of various sensors (such as temperature, pressure, and gas concentration sensors) over time, i.e., the dynamic process of evolution from a safe state to a dangerous state.
[0073] Step S202: Based on the spatiotemporal data cube, the discriminator of the spatiotemporal generative adversarial network with physical constraints is used to judge the multidimensional properties of the preliminary multivariate time series and obtain the judgment results; the multidimensional properties include overall authenticity, temporal dynamic rationality and physical correlation between variables.
[0074] Among these, the overall authenticity judgment refers to judging whether the generated preliminary multivariate time series, in terms of overall statistical characteristics and macroscopic form, is difficult to distinguish from the real normal or risk series extracted from the obtained real spatiotemporal data cube; the judgment of the time series dynamic rationality is usually implemented by a recurrent neural network (such as a long short-term memory network) or its variant within the discriminator, focusing on checking whether the temporal evolution logic of the sequence is natural and coherent, such as whether the concentration value will show instantaneous jumps that violate causality, and whether its trend of change conforms to the basic laws of material accumulation or diffusion; the judgment of the physical correlation between variables is usually modeled using graph convolutional networks, where the nodes of the graph represent different sensor variables, such as temperature sensor nodes and pressure sensor nodes, and the edges are defined based on known physical laws or engineering knowledge to define the interaction relationship between variables, such as an increase in temperature usually leading to an increase in pressure. The physical consistency is judged by checking whether the coupling relationship between these variables in the generated data violates the preset physical graph structure.
[0075] For example, using a spatiotemporal data cube as the standard for real data, the initial multivariate time series is input into the discriminator of a physically constrained spatiotemporal generative adversarial network. At the same time, the data is evaluated from the perspectives of overall authenticity, temporal dynamic rationality, and physical correlation between variables, and a comprehensive discriminant result is output. This result quantifies the gap between the generated data and the real data in various aspects.
[0076] Step S203: Based on the preliminary multivariate time series and predefined physical laws, generate the physical constraint loss term.
[0077] Among them, the predefined physical laws are the basic physicochemical laws applicable to confined space scenarios, such as the law of conservation of mass, the law of conservation of energy, or Fick's diffusion law.
[0078] For example, based on predefined physical laws, corresponding computable simplified physical equations or inequality constraints are established. The relevant variable values within the generated initial multivariate time series are precisely substituted into these simplified physical equations or inequality constraints. The deviation of the generated data from the physical law is quantitatively measured by calculating the difference between the theoretical predictions on the left-hand side of the equation and the "observations" provided by the generated data on the right-hand side. To quantify this deviation into a loss function usable for gradient optimization, the L2 norm of this difference, i.e., the mean squared error, is typically used to construct the physical constraint loss term. This loss does not depend on the discriminator's judgment but directly penalizes any data generation behavior that violates the selected physical law, thus strongly guiding the generator to learn and obey the fundamental laws of nature.
[0079] Step S204: Based on the discrimination result and the physical constraint loss term, the generator is iteratively optimized through the backpropagation algorithm until the preset iteration stopping condition is met, the iteration is stopped, the optimized generator is obtained, and virtual risk evolution scenario data is output based on the optimized generator.
[0080] Among them, the preset iteration stopping condition can be that the total loss function converges to a stable value, the maximum number of iterations is reached, or the quality of the generated data no longer improves significantly after being evaluated by a certain predefined index; the backpropagation algorithm is the core algorithm of deep learning and neural network training. By calculating the error in reverse and updating the parameters in forward, the neural network learns the correct mapping relationship from the data.
[0081] For example, the core of the multi-dimensional discrimination result generated by the discriminator is the probability that the discriminator considers the generated data to be "fake," i.e., the adversarial loss, which, along with the obtained physical constraint loss term, is incorporated into a comprehensive objective function. Typically, this total loss function is a weighted sum of these two losses and may also include other auxiliary loss terms. Using a backpropagation algorithm, the gradient of the total loss function with respect to all network parameters of the generator is calculated. This gradient indicates the direction and magnitude of parameter adjustments so that the generated data can simultaneously better "deceive" the discriminator (reducing adversarial loss) and better conform to physical laws (reducing physical constraint loss) in the next iteration. Based on the calculated gradient, an adaptive optimization algorithm is used to update the generator's weight parameters. This process is repeated cyclically, using the updated generator to generate new data again from step S201 and perform a new round of discrimination and physical verification until a preset iteration stopping condition is met. The iteration stops, and the resulting optimized generator has been sufficiently optimized, having learned how to generate high-quality data that can both deceive the multi-objective discriminator with high confidence and strictly adhere to predefined physical laws. Running the generator at this point will output a large amount of high-fidelity virtual risk evolution scenario data that is both highly realistic and strictly follows the laws of physical evolution. Among these, adaptive optimization algorithms are a class of optimization methods that can dynamically adjust their own parameters or strategies. They are used to address the poor adaptability of traditional fixed-parameter algorithms in complex scenarios. For example, traditional algorithms are prone to getting stuck in local optima or converging slowly when faced with changing data distributions or complex objective functions (such as non-convex or noisy conditions). Adaptive algorithms, by sensing feedback information such as gradient changes, error magnitude, and data characteristics in real time during the optimization process, automatically adjust key parameters such as step size and search direction, thereby improving optimization efficiency and robustness.
[0082] In this embodiment, a hybrid architecture generator is used to fuse randomness and physical conditionality to generate preliminary scene evolution data. A multi-objective discriminator then comprehensively examines this data, rigorously controlling its overall realism, temporal dynamics, and variable correlations. A physical constraint loss term based on predefined physical laws is introduced. By integrating the discriminator's judgment results and the physical constraint loss term into the generator's learning objective, it drives continuous self-improvement. Finally, the optimized generator outputs high-fidelity virtual risk evolution scene data. This effectively solves the most challenging "small sample" problem in confined space accident risk assessment, enabling large-scale generation of virtual risk scenarios with both statistical realism and physical credibility, thus enriching the training samples for hazardous states.
[0083] In one embodiment, a physical constraint loss term is generated based on a preliminary multivariate time series and predefined physical laws, including:
[0084] Step S301: Based on predefined physical laws, establish simplified physical equations applicable to confined spaces.
[0085] For example, one or more core physical laws closely related to the evolution of potential accidents within a confined space are selected and expressed in a mathematical form suitable for numerical calculation. These laws need to be reasonably simplified according to the specific application scenario (e.g., assessing the risk of flammable gas leaks and explosions or the risk of poisoning from toxic gas diffusion) to establish a computable simplified physical equation applicable to the current problem. For instance, for gas diffusion problems, Fick's second law is the fundamental theoretical basis, and its general form describes the relationship between concentration changes over time and the spatial distribution (diffusion) of concentration and source / sink terms. By assuming reasonable conditions such as a constant diffusion coefficient and fluid stillness, it can be simplified into a more manageable partial differential equation form:
[0086]
[0087] in, This represents the rate of change of the concentration of a certain gas or hazardous substance over time. C represents the concentration of the gas or hazardous substance, which is the key state variable to be evaluated; t represents time; and D is the diffusion coefficient, a physical parameter determined by the properties of the substance itself and the medium environment, which can usually be obtained from manuals or experiments. is the Laplace operator, used to calculate the second derivative of concentration in three-dimensional space, characterizing the diffusion driving force caused by spatial non-uniformity of concentration; S is the source term, used to describe the rate of generation or disappearance of the substance at a specific location and time, and in simulating leakage accidents, it represents the leakage source strength.
[0088] Step S302: Substitute the relevant variable values in the preliminary multivariate time series into the simplified physical equation and calculate the difference between the left and right sides of the simplified physical equation; the difference is used to characterize the deviation between the relevant variable values in the preliminary multivariate time series and the corresponding physical laws.
[0089] For example, the relevant variable values from the initial multivariate time series generated by the generator are specifically substituted into the established simplified physical equations. For instance, for each time step and each spatial grid point simulated in the generated data, we extract its gas concentration value. The tilde here indicates that it is generated data, not actual measurement value, and then the rate of change of concentration over time is calculated. This can be approximated by calculating the difference between the concentration value at the current time step and the concentration value at the next time step; secondly, the spatial second derivative of the concentration needs to be calculated. This can be approximated by examining the concentration difference between the grid point and its neighboring grid points, reflecting the spatial distribution curvature of the concentration, i.e., the diffusion trend. The known physical parameter, the diffusion coefficient D, and the preset source term S are substituted into the equation. If simulating a leak, S is non-zero at the leak point and during the leak period. After substitution, the values on the left side of the simplified physical equation (i.e., ...) are calculated respectively. ) and the value on the right (i.e. Ideally, if the generated data perfectly conforms to Fick's diffusion law, then the values on both sides of the equation should be equal, and the difference should be zero. However, since the generator has not learned the physical laws in the initial stage, the generated data may not satisfy the equation, resulting in a non-zero difference. This difference characterizes the degree of deviation between the generated data and the ideal state predicted by the physical laws at a specific point in time and spatial location.
[0090] Step S303: By calculating the L2 norm of the difference, the physical constraint loss term is obtained: whereby the physical constraint loss term is used to penalize the generator for producing data that violates physical laws during the training process.
[0091] For example, the difference between each calculated time step and the corresponding spatial grid point is squared. This ensures that the squared value is positive regardless of whether the difference is positive or negative, and it amplifies the weight of larger deviations. Then, all squared differences are summed, and finally, the sum is squared to obtain the physical constraint loss term.
[0092]
[0093] in, It is the physical constraint loss term, a non-negative scalar value used to comprehensively reflect the severity of the overall violation of specific physical laws by the generated sequence data; the larger its value, the more physically unreasonable and unreliable the generated data is.
[0094] In this embodiment, a simplified physical equation is established, and the generated data is substituted into this simplified physical equation to calculate the difference. The global deviation is then aggregated into a physical constraint loss term using the L2 norm. This effectively avoids absurd results that may occur in traditional generative models, which violate fundamental principles such as the conservation of mass and energy, and greatly improves the fidelity and reliability of the generated virtual risk evolution scenario.
[0095] In one embodiment, a balanced augmented training dataset is constructed based on virtual risk evolution scenario data and real historical data, including:
[0096] Step S401: Obtain the accident evolution process of virtual risk evolution scenario data and real historical data, and based on the accident evolution process, perform risk level labeling on the virtual risk evolution scenario data and real historical data to form a labeled dataset.
[0097] For example, real historical data is collected from historical records, and a deep understanding of the accident evolution process represented by this real historical data and virtual risk evolution scenario data is obtained. For example, in a gas leak scenario, it is necessary to clarify its initial stage, diffusion process, concentration accumulation stage, and the complete chain of reaching the danger threshold. Based on a deep understanding of this evolution process, a set of systematic rules or based on expert knowledge are used to label each data sequence, whether virtual or real, with a corresponding risk level label. For example, it can be divided into different levels such as safe, low risk, medium risk, and high risk. The labeling is based on the position of the state reflected by the data in the accident evolution chain and its degree of proximity to danger, ultimately forming a labeled dataset.
[0098] Step S402: Extract time-domain statistical features and frequency-domain transform features from the labeled dataset, and construct an initial high-dimensional feature set based on the time-domain statistical features and frequency-domain transform features.
[0099] For example, for each multivariate time series sample in a labeled dataset, in-depth feature engineering is performed: First, a series of statistical features are extracted from the time domain perspective. For example, the mean reflects the average level of sensor readings, variance and standard deviation characterize the volatility of the data, maximum and minimum values indicate extreme cases, and trend slope indicates the overall direction of change in physical quantities (such as whether the temperature is rising continuously or remaining stable). Then, transformations are performed from the frequency domain perspective, for example, by using wavelet transform to convert the time series signal to the frequency domain, thereby extracting frequency domain features. These features are used to reveal potential periodic fluctuations, main frequency components, and detailed information at different time scales in the data, which are often not directly captured by time domain statistics. These numerous features extracted from the time and frequency domains are then combined to form an initial high-dimensional feature set. Among them, wavelet transform uses wavelets, which are finite-length, rapidly decaying oscillating signals, to replace the sine waves in Fourier transform, thus solving the problem that Fourier transform cannot accurately locate both time and frequency at the same time. Fourier transform is a mathematical tool that transforms a signal from the time domain (describing the law of signal change over time) to the frequency domain (describing which frequency components the signal is composed of). The core idea is that any complex periodic signal can be decomposed into a superposition of a series of sine / cosine waves with different frequencies and amplitudes.
[0100] Step S403: Select features that meet the preset conditions from the initial high-dimensional feature set, and summarize the features to form a feature subset.
[0101] Among them, the preset conditions are pre-set and must be met or assumed to be true. For example, select the top K features in terms of importance, or select features whose importance scores exceed a certain threshold.
[0102] For example, given an initial high-dimensional feature set, a filtering-based feature selection method can be used. This method calculates the mutual information value between each feature and the risk level label, sets a threshold, retains features with mutual information values exceeding the threshold, and removes features that do not meet the threshold. These selected important features are then aggregated to form a subset of features most relevant to the risk level prediction task. The filtering-based feature selection method refers to selecting features solely based on the strength of their association with the target label (e.g., "risk level") without relying on subsequent learning models. It is a simple and efficient pre-screening approach. The core logic assumes that "features with a stronger association with the target label are more useful for model prediction," while those with a weaker association are redundant or irrelevant features. For example, features like "user ID," which are unrelated to "risk level," can be removed. The mutual information value is suitable for scenarios where features or labels are categorical, measuring the amount of information they "share." A larger value indicates that the feature's distribution reflects the label's distribution, indicating a stronger association.
[0103] Step S404: Based on the feature subset and combined with the grid mapping relationship at different spatial scales, construct a balanced and enhanced training dataset.
[0104] For example, based on the obtained optimized feature subset, samples in the labeled dataset are represented using the features contained in this feature subset, thus forming the core content of the dataset. Furthermore, to meet the needs of different spatial granularity analyses in risk assessment—for example, assessing both the macro-level risk of the entire region and the micro-level risk of specific equipment—it is necessary to introduce grid mapping relationships at different spatial scales. For instance, a correspondence matrix between coarse-grained grids (e.g., a 10m x 10m area) and fine-grained grids (e.g., 1m x 1m points) needs to be established. When constructing the dataset, it is necessary to ensure that data samples are associated with their corresponding spatial scale information. Finally, the data represented by the feature subset, the corresponding risk level labels, and the spatial scale mapping information are integrated to construct the final balanced augmented training dataset. This dataset not only significantly increases the sample size due to the addition of virtual data and achieves a balance between positive and negative samples, but also features have been optimized and selected, and contain multi-scale spatial information.
[0105] In this embodiment, a labeled dataset is generated by analyzing the accident evolution process using virtual risk evolution scenario data and real historical data. Features are extracted from the labeled dataset, and features that meet certain criteria are selected to form a feature subset. Combined with grid mapping relationships at different spatial scales, a balanced and enhanced training dataset is constructed. This effectively solves the problems of scarce model training data and class imbalance caused by the limited number of real accident samples, significantly improving the data's representational ability and information density.
[0106] In one embodiment, a pre-defined spatiotemporal risk assessment model is trained using a balanced augmented training dataset to obtain a trained spatiotemporal risk assessment model, including:
[0107] Step S501: Construct a spatiotemporal risk assessment model; wherein, the network architecture of the spatiotemporal risk assessment model includes a shared feature extraction network, a coarse-grained risk assessment branch, and a fine-grained risk assessment branch.
[0108] Among them, the shared feature extraction network is the foundation of the spatiotemporal risk assessment model. It is responsible for learning and extracting representative low-level and mid-level features from complex input data. These features are the common basis for effective risk assessment. By sharing these network parameters, the total number of model parameters can be significantly reduced, training efficiency can be improved, and the risk of overfitting can be reduced. The coarse-grained risk assessment branch usually has a relatively simple structure. Its goal is to make a macroscopic assessment of the overall safety status of the entire confined space or a large area (such as a process unit or room) based on the features output by the shared feature extraction network, and output a regional risk probability distribution. The fine-grained risk assessment branch may require a more complex structure or a higher resolution feature mapping. Its responsibility is to focus on specific points or small devices (such as a valve) in the space and output a point-level risk probability distribution, thereby achieving accurate risk location.
[0109] For example, a dedicated neural network architecture capable of simultaneously handling multi-scale risk assessment tasks is designed and initialized. The spatiotemporal risk assessment model adopts an advanced paradigm of multi-task learning, and its network architecture mainly comprises three key components: a shared feature extraction network, a branch dedicated to coarse-grained risk assessment, and a branch dedicated to fine-grained risk assessment. This architecture design enables the model to complete risk assessment tasks at different spatial scales in parallel.
[0110] Step S502: Input the balanced augmented training dataset into the shared feature extraction network of the spatiotemporal risk assessment model, and output the fused spatiotemporal feature vector; wherein, the shared feature extraction network includes a convolutional neural network and a long short-term memory network.
[0111] For example, the balanced augmented training dataset is input into the spatiotemporal risk assessment model, and transformed into an abstract feature representation rich in spatiotemporal information through a shared feature extraction network: the convolutional neural network uses its convolutional kernels to perform sliding window operations on the spatial dimension of the data. Through the characteristics of local connectivity and weight sharing, it effectively captures the local spatial correlation patterns between sensor deployment points, such as the specific change patterns of surrounding pressure sensors that may accompany a temperature increase in a certain area; then, the long short-term memory network receives the time-ordered feature sequence processed by the convolutional neural network, and uses its unique gating mechanism (input gate, forget gate, output gate) to selectively remember or forget information, thereby effectively learning the long-term dependencies and dynamic evolution laws of the data in the time dimension, such as identifying the cumulative trend of a continuous increase in gas concentration. After the collaborative processing of the convolutional neural network and the long short-term memory network, the original augmented training data is encoded into a highly condensed spatiotemporal feature vector that integrates spatial local features and temporal context information. The sliding window approach maintains a dynamically changing interval (window) to efficiently solve substring / subarray related problems (such as finding the longest / shortest substring) in linear data structures such as arrays / strings, avoiding the O(n²) complexity of brute-force enumeration.
[0112] Step S503: Input the spatiotemporal feature vectors into the coarse-grained risk assessment branch and the fine-grained risk assessment branch respectively, and output the regional-level risk probability distribution and the point-level risk probability distribution within the confined space.
[0113] For example, the obtained fused spatiotemporal feature vectors are input into two independent risk assessment branches. The coarse-grained risk assessment branch receives the spatiotemporal feature vectors, performs nonlinear transformation and feature integration through one or more fully connected layers, and outputs a probability distribution vector through a Softmax activation function. Each dimension of this vector represents the probability that the coarse-grained region (e.g., the entire reactor area) belongs to a specific risk level (e.g., safe, low-risk, high-risk). Simultaneously, the fine-grained risk assessment branch also receives the same spatiotemporal feature vectors, but its network structure may need adjustment to adapt to the needs of finer localization. For example, an upsampling operation may be introduced after feature extraction to restore spatial details. Finally, it also outputs another probability distribution vector through similar fully connected layers and a Softmax function. Each dimension of this vector represents the probability that a specific point (e.g., a feed inlet of the reactor) belongs to a different risk level. Here, the nonlinear transformation is a variable mapping relationship that does not satisfy superposition and homogeneity; that is, there is no proportional, easily superimposed linear relationship between the input and output. Simply put, if the transformation is understood as "input (x) obtains output (y) through rules," the linear transformation is... "These are intuitive linear relationships, while the input-output relationships of nonlinear transformations can exhibit curves, abrupt changes, or complex correlations, such as: common function forms:" (Quadratic curve); Feature integration refers to combining multiple scattered features into a more representative comprehensive feature through methods such as combination, filtering, and weighting, allowing the model to utilize multi-dimensional information at once; The Softmax activation function is a core component of multi-classification tasks in deep learning, used to convert the raw output of the last layer of the model into a probability distribution;
[0114] Step S504: Based on the regional risk probability distribution and the location-level risk probability distribution, the model parameters are iteratively optimized by minimizing the overall loss function of the spatiotemporal risk assessment model until the model converges, thus obtaining the trained spatiotemporal risk assessment model; wherein, the overall loss function is obtained by weighted calculation of coarse-grained assessment loss, fine-grained assessment loss and regularization term.
[0115] For example, a total loss function for a spatiotemporal risk assessment model is defined, which is calculated by weighting coarse-grained assessment loss, fine-grained assessment loss, and a regularization term. The coarse-grained and fine-grained assessment losses typically employ cross-entropy loss functions to effectively measure the difference between the probability distribution predicted by the model and the true risk level label distribution; the smaller the difference, the smaller the loss value. The regularization term (such as L2 regularization) penalizes the magnitude of the model parameters, aiming to constrain the model's complexity and prevent overfitting on the training data, thereby improving its generalization ability on new data. During training, forward propagation is performed on a batch of training data based on the current model parameters to obtain prediction results, and the total loss value is calculated. Then, the gradient of the loss function with respect to each model parameter is calculated using the backpropagation algorithm. This gradient indicates the direction and magnitude of parameter adjustment to reduce the loss. Finally, an adaptive optimization algorithm is used to update the model's weights and bias parameters based on the calculated gradient. This process is repeated until the model's performance on the validation set no longer improves significantly or the preset number of iterations is reached. At this point, the model is considered to have converged, and a well-trained spatiotemporal risk assessment model is obtained.
[0116] In this embodiment, a dedicated network architecture employing shared low-level feature extraction and multi-task output branch collaboration learns risk representation patterns applicable to different spatial scales in parallel from enhanced training data rich in spatiotemporal information. Finally, end-to-end fine-tuning is performed through an optimization objective that integrates multi-task loss and regularization constraints to obtain the spatiotemporal risk assessment model of the training number. This enables multi-granular, comprehensive, and high-precision dynamic assessment of accident risks within confined spaces, improving the accuracy of risk warnings and the effectiveness of decision support.
[0117] In one embodiment, multi-source heterogeneous spatiotemporal sequence data is collected through an IoT sensor network deployed in a confined space, and a spatiotemporal data cube is constructed based on the multi-source heterogeneous spatiotemporal sequence data:
[0118] Step S601: Collect raw spatiotemporal sequence data through an IoT sensor network deployed in a confined space, and fill in missing values in the raw spatiotemporal sequence data to generate a preliminary spatiotemporal sequence dataset.
[0119] For example, continuous data acquisition is achieved through a pre-optimized IoT sensor network deployed in a confined space. These sensors operate at different sampling frequencies, generating multi-source heterogeneous raw spatiotemporal sequence data containing timestamps, spatial location information, and measurements. Due to sensor malfunctions, signal interference, or network transmission problems, the acquired raw data inevitably contains missing data points. Therefore, missing value imputation processing is necessary to ultimately form a preliminary spatiotemporal sequence dataset that is continuous and complete in the sequence. Missing value imputation processing refers to filling in the missing values of some fields (features) in the dataset using appropriate methods to preserve data integrity and reduce distortion of the original data. A commonly used method is spatiotemporal kriging interpolation. This method considers not only data from neighboring sensors at the same time point (spatial correlation) but also historical data from the same sensor at different time points (temporal correlation). By calculating the spatiotemporal variogram between the point to be imputed and known data points, the weights are determined, thereby generating a more reasonable estimate in both spatiotemporal dimensions to fill the missing positions.
[0120] Step S602: Denoise the preliminary spatiotemporal sequence dataset to obtain clean spatiotemporal sequence data.
[0121] For example, wavelet transform can be used to decompose the signal at different scales (corresponding to different frequencies) and analysis locations using a set of oscillating waveforms called wavelet basis functions. Since noise usually manifests as high-frequency components, while real physical process signals are mostly concentrated in low frequencies or specific frequency bands, the wavelet coefficients representing noise can be suppressed or reduced to zero by setting a noise threshold. Then, the processed wavelet coefficients are inversely transformed to reconstruct the signal, thereby effectively filtering out noise while retaining the main features of the signal, and finally obtaining a set of cleaner spatiotemporal sequence data that is smoother and better reflects the changes of real physical phenomena.
[0122] Step S603: Perform spatiotemporal alignment processing on the clean spatiotemporal sequence data to generate spatiotemporal aligned data.
[0123] Time alignment refers to the operation of keeping multiple related objects (such as data) synchronized or corresponding in the time dimension by using a unified time base.
[0124] For example, for cleanroom spatiotemporal sequence data, the first step is time alignment. Since different types of sensors may collect data at different frequencies (e.g., temperature once per second, equipment status once every 5 seconds), an interpolation algorithm is needed to unify the data sequences from all sensors to the same timestamp, typically the highest sampling frequency or a commonly defined time grid. Secondly, spatial alignment is performed, mapping the physical installation coordinates or measurement positions of all sensors to a unified three-dimensional coordinate system. For coordinates acquired by mobile sensors (such as personnel-carried positioning tags), calibration with the coordinates of fixed sensors is required to ensure all data points have a consistent spatial reference. The interpolation algorithm, when a set of discrete data points is known, constructs a continuous function that passes through all known data points, thereby estimating the unknown function value at any position between these discrete points.
[0125] Step S604: Based on spatiotemporal alignment, the confined space is divided into grids to obtain multiple grid cells.
[0126] Among them, gridding is a discretization method that breaks down a continuous space or complex object into regular / irregular small units (i.e., grids).
[0127] For example, based on the completed spatiotemporal alignment, the entire confined three-dimensional region is divided into regular grids according to a certain resolution (e.g., a 1m x 1m x 1m cube), discretizing the continuous space into a large number of small, regular spatial units. Each grid unit is the basic unit for subsequent data processing and analysis. The grid division precision (i.e., the grid size) is an important parameter that needs to be balanced between computational complexity and spatial resolution. Finer grids provide more accurate location information but increase the amount of data and computational burden, while coarser grids have the opposite effect. Through this division, the complex continuous space is transformed into a discrete set composed of a finite number of grid units.
[0128] Step S605: Perform data fusion on the spatiotemporal aligned data within each grid cell to obtain the grid cell data value.
[0129] For example, for each grid cell, the spatiotemporal alignment data generated in S603 by all sensors falling within or affecting that cell are retrieved. Since multiple sensors of the same or different types may exist within or around a grid cell, their readings may differ slightly. Therefore, an inverse distance weighting method can be used to synthesize these data and calculate a single data value representing the state of that cell at that point in time. The technical principle of the inverse distance weighting method is that the closer a sensor is to the grid center, the more representative its measurement is to that grid cell, and the greater its weight. Specifically, a weight is assigned to the reading of each relevant sensor, which is inversely proportional to the p-th power of the distance from the sensor to the center point of the grid cell (usually p=2). Then, each sensor reading is multiplied by its weight, summed, and divided by the total weight to obtain the fused data value for that grid cell. This process is repeated for each grid cell, ultimately calculating a unified data value that fuses multi-source information for all grid cells at all points in time.
[0130] Step S606: Construct a spatiotemporal data cube based on all grid cell data values; wherein the spatiotemporal data cube includes spatial dimension, time dimension and numerical dimension.
[0131] Among them, the spatial dimension corresponds to the index or coordinate of the grid cell, such as the X-axis, Y-axis, and Z-axis index; the time dimension corresponds to the time points or time steps arranged in sequence; and the numerical dimension corresponds to the measurement types of different sensors, such as temperature values, pressure values, and concentration values of a certain gas.
[0132] For example, based on the data values of all grid cells at all time points, they are constructed into a spatiotemporal data cube with three dimensions: spatial dimension, temporal dimension, and numerical dimension.
[0133] In this embodiment, data is continuously collected within a confined space, missing data is filled in, and the filled data is denoised and spatiotemporally aligned to generate a spatiotemporally aligned dataset. Based on the spatiotemporal alignment, the confined space is spatially gridded, and the spatiotemporally aligned data within each grid cell is fused. Finally, the data from all grid cells are integrated to obtain a spatiotemporal data cube. This provides the regularized input required for the subsequent physically constrained generative adversarial network to learn the real data distribution, and also provides a direct and reliable data foundation for training and running the spatiotemporal risk assessment model, thereby ensuring the data quality and reliability of the entire risk assessment method and processing flow.
[0134] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0135] Based on the same inventive concept, this application also provides an IoT-based confined space accident risk dynamic assessment system for implementing the aforementioned IoT-based confined space accident risk dynamic assessment method. The solution provided by this system is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more IoT-based confined space accident risk dynamic assessment system embodiments provided below can be found in the limitations of the IoT-based confined space accident risk dynamic assessment method described above, and will not be repeated here.
[0136] In one exemplary embodiment, such as Figure 3 As shown, a confined space accident risk dynamic assessment system 300 based on the Internet of Things is provided, including:
[0137] The data acquisition module 301 is used to acquire multi-source heterogeneous spatiotemporal sequence data through an Internet of Things sensor network deployed in a confined space, and to construct a spatiotemporal data cube based on the multi-source heterogeneous spatiotemporal sequence data;
[0138] Data processing module 302 is used to input spatiotemporal data cubes into a physically constrained spatiotemporal generative adversarial network and output virtual risk evolution scenario data; wherein, the physically constrained spatiotemporal generative adversarial network includes a generator and a discriminator;
[0139] Dataset construction module 303 is used to construct a balanced and enhanced training dataset based on virtual risk evolution scenario data and real historical data;
[0140] The model training module 304 is used to train the preset spatiotemporal risk assessment model using a balanced augmented training dataset to obtain a trained spatiotemporal risk assessment model.
[0141] The risk assessment module 305 is used to dynamically assess the accident risk in a confined space based on a trained spatiotemporal risk assessment model and real-time IoT data stream, and obtain the dynamic assessment result of the accident risk.
[0142] In one embodiment, the data processing module 302 is further configured to:
[0143] A random noise vector and a condition vector describing the physical properties of a confined space are input into the generator of a spatiotemporal generative adversarial network with physical constraints to generate a preliminary multivariate time series. The generator is a hybrid architecture of a convolutional long short-term memory network and a Transformer encoder. The condition vector includes space volume, ventilation conditions, and types of hazardous substances.
[0144] Based on spatiotemporal data cubes, a discriminator using a spatiotemporal generative adversarial network with physical constraints is used to discriminate the multidimensional properties of preliminary multivariate time series, and the discriminant results are obtained. The multidimensional properties include overall authenticity, temporal dynamic rationality, and physical correlation between variables.
[0145] Based on preliminary multivariate time series and predefined physical laws, a physical constraint loss term is generated;
[0146] Based on the discrimination results and physical constraint loss terms, the generator is iteratively optimized using the backpropagation algorithm until the preset iteration stopping condition is met, at which point the iteration stops, resulting in an optimized generator. Based on the optimized generator, virtual risk evolution scenario data is output.
[0147] In one embodiment, the data processing module 302 is further configured to:
[0148] Based on predefined physical laws, simplified physical equations applicable to confined spaces are established;
[0149] Substitute the relevant variable values from the preliminary multivariate time series into the simplified physical equation and calculate the difference between the left and right sides of the simplified physical equation; the difference is used to characterize the deviation between the relevant variable values and the corresponding physical laws in the preliminary multivariate time series.
[0150] By calculating the L2 norm of the difference, the physical constraint loss term is obtained: the physical constraint loss term is used to penalize the generator for producing data that violates physical laws during the training process.
[0151] In one embodiment, the dataset construction module 303 is further configured to:
[0152] The accident evolution process is obtained from virtual risk evolution scenario data and real historical data. Based on the accident evolution process, risk level labels are applied to the virtual risk evolution scenario data and real historical data to form a labeled dataset.
[0153] Extract time-domain statistical features and frequency-domain transform features from the labeled dataset, and construct an initial high-dimensional feature set based on the time-domain statistical features and frequency-domain transform features;
[0154] Features that meet preset conditions are selected from the initial high-dimensional feature set, and these features are then aggregated to form a feature subset.
[0155] Based on feature subsets and combined with grid mapping relationships at different spatial scales, a balanced and enhanced training dataset is constructed.
[0156] In one embodiment, the model training module 304 is further configured to:
[0157] A spatiotemporal risk assessment model is constructed; the network architecture of the spatiotemporal risk assessment model includes a shared feature extraction network, a coarse-grained risk assessment branch, and a fine-grained risk assessment branch.
[0158] The balanced augmented training dataset is input into the shared feature extraction network of the spatiotemporal risk assessment model, and the output is a fused spatiotemporal feature vector; the shared feature extraction network includes a convolutional neural network and a long short-term memory network.
[0159] The spatiotemporal feature vectors are input into the coarse-grained risk assessment branch and the fine-grained risk assessment branch, respectively, and the regional-level risk probability distribution and the point-level risk probability distribution within the confined space are output.
[0160] Based on the regional and location-level risk probability distributions, the model parameters are iteratively optimized by minimizing the overall loss function of the spatiotemporal risk assessment model until the model converges, resulting in a well-trained spatiotemporal risk assessment model. The overall loss function is calculated by weighting the coarse-grained assessment loss, the fine-grained assessment loss, and the regularization term.
[0161] In one embodiment, the data acquisition module 301 is further configured to:
[0162] Raw spatiotemporal sequence data is collected by deploying an IoT sensor network in a confined space, and missing values are filled in to generate a preliminary spatiotemporal sequence dataset.
[0163] Denoising is performed on the initial spatiotemporal sequence dataset to obtain clean spatiotemporal sequence data;
[0164] Spatiotemporal alignment processing is performed on clean spatiotemporal sequence data to generate spatiotemporally aligned data;
[0165] Based on spatiotemporal alignment, the confined space is divided into grids to obtain multiple grid cells;
[0166] Data fusion is performed on the spatiotemporally aligned data within each grid cell to obtain the grid cell data value;
[0167] A spatiotemporal data cube is constructed based on the data values of all grid cells; the spatiotemporal data cube includes spatial dimension, time dimension and numerical dimension.
[0168] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the IoT-based dynamic risk assessment method for confined spaces as described above.
[0169] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0170] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0171] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.
Claims
1. A method for dynamic assessment of accident risks in confined spaces based on the Internet of Things, characterized in that, The method includes: Multi-source heterogeneous spatiotemporal sequence data is collected by an IoT sensor network deployed in a confined space, and a spatiotemporal data cube is constructed based on the multi-source heterogeneous spatiotemporal sequence data. The spatiotemporal data cube is input into a physically constrained spatiotemporal generative adversarial network (PGAN) to output virtual risk evolution scenario data; wherein, the physically constrained spatiotemporal GAN includes a generator and a discriminator; Based on the virtual risk evolution scenario data and real historical data, a balanced enhanced training dataset is constructed. The pre-defined spatiotemporal risk assessment model is trained using the balanced augmented training dataset to obtain a trained spatiotemporal risk assessment model. Based on the trained spatiotemporal risk assessment model and real-time IoT data stream, the accident risk within the confined space is dynamically assessed to obtain the dynamic assessment result of the accident risk.
2. The method according to claim 1, characterized in that, The process involves inputting the spatiotemporal data cube into a physically constrained spatiotemporal generative adversarial network (PGAN) to output virtual risk evolution scenario data. The physically constrained spatiotemporal PGAN includes a generator and a discriminator, comprising: A random noise vector and a condition vector describing the physical properties of a confined space are input into the generator of a spatiotemporal generative adversarial network with physical constraints to generate a preliminary multivariate time series. The generator is a hybrid architecture of a convolutional long short-term memory network and a Transformer encoder. The condition vector includes space volume, ventilation conditions, and types of hazardous substances. Based on the spatiotemporal data cube, the discriminator of the spatiotemporal generative adversarial network with physical constraints is used to judge the multidimensional properties of the preliminary multivariate time series and obtain the judgment result; the multidimensional properties include overall authenticity, temporal dynamic rationality and physical correlation between variables; Based on the preliminary multivariate time series and predefined physical laws, a physical constraint loss term is generated; Based on the discrimination result and the physical constraint loss term, the generator is iteratively optimized using the backpropagation algorithm until the preset iteration stop condition is met, at which point the iteration stops, and the optimized generator is obtained. Based on the optimized generator, virtual risk evolution scenario data is output.
3. The method according to claim 2, characterized in that, The generation of a physical constraint loss term based on the preliminary multivariate time series and predefined physical laws includes: Based on predefined physical laws, simplified physical equations applicable to the confined space are established; Substitute the relevant variable values from the preliminary multivariate time series into the simplified physical equation and calculate the difference between the left and right sides of the simplified physical equation; the difference is used to characterize the deviation between the relevant variable values and the corresponding physical laws in the preliminary multivariate time series. By calculating the L2 norm of the difference, a physical constraint loss term is obtained: wherein the physical constraint loss term is used to penalize the generator for producing data that violates physical laws during the training process.
4. The method according to claim 1, characterized in that, The process of constructing a balanced augmented training dataset based on the virtual risk evolution scenario data and real historical data includes: The accident evolution process of the virtual risk evolution scenario data and the real historical data is obtained, and based on the accident evolution process, the virtual risk evolution scenario data and the real historical data are labeled with risk level labels to form a labeled dataset; Temporal statistical features and frequency domain transformation features are extracted from the labeled dataset, and an initial high-dimensional feature set is constructed based on the temporal statistical features and the frequency domain transformation features. Features that meet preset conditions are selected from the initial high-dimensional feature set, and the features are summarized to form a feature subset; Based on the aforementioned feature subset, and combined with grid mapping relationships at different spatial scales, a balanced augmented training dataset is constructed.
5. The method according to claim 1, characterized in that, The step of training a pre-defined spatiotemporal risk assessment model using the balanced augmented training dataset to obtain a trained spatiotemporal risk assessment model includes: A spatiotemporal risk assessment model is constructed; wherein, the network architecture of the spatiotemporal risk assessment model includes a shared feature extraction network, a coarse-grained risk assessment branch, and a fine-grained risk assessment branch; The balanced enhanced training dataset is input into the shared feature extraction network of the spatiotemporal risk assessment model, and the fused spatiotemporal feature vector is output; wherein, the shared feature extraction network includes a convolutional neural network and a long short-term memory network; The spatiotemporal feature vectors are input into the coarse-grained risk assessment branch and the fine-grained risk assessment branch, respectively, and the regional-level risk probability distribution and the point-level risk probability distribution within the confined space are output. Based on the regional-level risk probability distribution and the location-level risk probability distribution, the model parameters are iteratively optimized by minimizing the overall loss function of the spatiotemporal risk assessment model until the model converges, thus obtaining a trained spatiotemporal risk assessment model; wherein, the overall loss function is obtained by weighted calculation of coarse-grained assessment loss, fine-grained assessment loss and regularization term.
6. The method according to claim 1, characterized in that, The process of collecting multi-source heterogeneous spatiotemporal sequence data through an IoT sensor network deployed in a confined space, and constructing a spatiotemporal data cube based on the multi-source heterogeneous spatiotemporal sequence data, includes: Raw spatiotemporal sequence data is collected by an IoT sensor network deployed in a confined space, and missing values are filled in the raw spatiotemporal sequence data to generate a preliminary spatiotemporal sequence dataset. The preliminary spatiotemporal sequence dataset is denoised to obtain clean spatiotemporal sequence data; The clean spatiotemporal sequence data is spatiotemporally aligned to generate spatiotemporally aligned data; Based on spatiotemporal alignment, the confined space is divided into grids to obtain multiple grid cells; Data fusion is performed on the spatiotemporally aligned data within each grid cell to obtain the grid cell data value; Based on all the grid cell data values, a spatiotemporal data cube is constructed; wherein the spatiotemporal data cube includes spatial dimension, time dimension and numerical dimension.
7. A dynamic risk assessment system for confined spaces based on the Internet of Things, characterized in that, The system includes: The data acquisition module is used to collect multi-source heterogeneous spatiotemporal sequence data through an Internet of Things sensor network deployed in a confined space, and to construct a spatiotemporal data cube based on the multi-source heterogeneous spatiotemporal sequence data; The data processing module is used to input the spatiotemporal data cube into a physically constrained spatiotemporal generative adversarial network and output virtual risk evolution scenario data; wherein, the physically constrained spatiotemporal generative adversarial network includes a generator and a discriminator; The dataset construction module is used to construct a balanced and enhanced training dataset based on the virtual risk evolution scenario data and real historical data. The model training module is used to train the preset spatiotemporal risk assessment model using the balanced augmented training dataset to obtain the trained spatiotemporal risk assessment model. The risk assessment module is used to dynamically assess the accident risk within the confined space based on the trained spatiotemporal risk assessment model and real-time IoT data stream, and obtain the dynamic assessment result of the accident risk.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.