Chemical laboratory safety early warning method and system based on multi-source data analysis
By combining deep multi-metric learning with Pareto sequential sampling optimization, a chemical laboratory safety early warning system was constructed, which solved the problems of multi-source data fusion and complex risk identification, and achieved high-precision and efficient laboratory safety early warning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-12
- Publication Date
- 2026-03-20
AI Technical Summary
Existing chemical laboratory safety management systems lack effective fusion mechanisms for multi-source data, and risk identification models often employ single linear measurement methods, which are difficult to adapt to nonlinear data distributions and local specific characteristics, resulting in insufficient accuracy in identifying complex risks and limited model generalization performance.
A composite risk identification model is constructed by combining deep multimetric learning (DMML) with Pareto sequential sampling optimization (PSS). Through multi-source data fusion, nonlinear feature extraction, and dynamic parameter optimization, a comprehensive analysis and real-time early warning of chemical laboratory environment, instrument, reagent, sample, and personnel operation data are achieved.
It significantly improves the accuracy of identifying complex risk patterns, reduces the false alarm rate, enhances the model's generalization ability and response speed, and adapts to chemical laboratory scenarios of different sizes and types.
Smart Images

Figure CN121502616B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of laboratory safety management and data intelligent analysis, in particular to a chemical laboratory safety early warning method and system based on multi-source data analysis. BACKGROUND
[0002] Chemical laboratories, as the core places for scientific research and teaching, involve various high-risk reagents, precision instruments and complex operation processes, and their safety risks have the characteristics of multi-source, suddenness and complexity. Traditional laboratory safety management relies on manual inspection, fixed threshold alarm and other methods, which has the problems of response lag, single risk identification and high false alarm and missed alarm rates.
[0003] With the development of sensor technology and the Internet of Things, some laboratories have begun to introduce data acquisition systems to realize real-time monitoring of environmental parameters, instrument status and other data, but the existing technology still has significant limitations: first, multi-source data (environment, instrument, reagent, personnel, etc.) lack effective fusion mechanism, it is difficult to capture the complex risks formed by the superposition of multiple factors; second, the risk identification model mostly uses single linear measurement method, which cannot adapt to non-linear data distribution and local specificity characteristics, resulting in insufficient complex risk pattern recognition accuracy; third, model parameter optimization mostly relies on manual parameter tuning or traditional optimization algorithms, which is easy to fall into local optimum and difficult to cope with new complex risks, and the generalization performance is limited.
[0004] Existing metric learning methods mostly focus on single distance metric learning, which is difficult to adapt to local information of heterogeneous data sets; and traditional optimization algorithms have deficiencies in balancing global exploration and local utilization, resulting in poor model optimization effect.
[0005] Therefore, there is an urgent need for a safety early warning technology that can effectively fuse multi-source data, accurately identify complex risks, and improve model generalization ability through efficient parameter optimization to solve the pain points of existing laboratory safety management. SUMMARY
[0006] In view of the deficiencies of the prior art, the core purpose of the present application is to provide a chemical laboratory safety early warning method and system based on multi-source data analysis, which combines deep multi-metric learning (DMML) and Pareto order sequential sampling optimization (PSS) to realize the fusion analysis of multi-source data such as chemical laboratory environment, instrument, reagent, sample and personnel operation and accurate early warning of complex risks, and solves the technical problems of multi-source data fusion, complex risk identification and model generalization.
[0007] To achieve the above purpose, the following technical solutions are implemented:
[0008] In a first aspect, the present application provides a chemical laboratory safety early warning method based on multi-source data analysis, comprising the following steps:
[0009] S1, collecting multi-source data of a chemical laboratory, the multi-source data including environmental data, instrument equipment data, reagent management data, sample management data and personnel operation data;
[0010] S2, preprocessing the multi-source data, including data cleaning, data standardization and data correlation annotation based on time, space and logical relationship, to form a multi-dimensional correlation data set;
[0011] S3, constructing a composite risk identification model based on deep multi-metric learning, and using the multi-dimensional correlation data set to end-to-end train the composite risk identification model combined with an adversarial sample enhancement strategy; the composite risk identification model includes a deep feature extraction network for extracting nonlinear features from input data, and a deep multi-metric learning module connected after the deep feature extraction network and composed of multiple parallel and independent metric learners; the multiple metric learners respectively perform specific metric learning on different sub-feature groups of the nonlinear features to capture local patterns of composite risks;
[0012] S4, using a sequential sampling heuristic optimization algorithm based on the Pareto principle to automatically globally optimize key parameters in the composite risk identification model;
[0013] S5, inputting multi-source data collected and correlated in real time into the optimized composite risk identification model for risk matching analysis, determining a risk level according to an output risk matching degree, and triggering a warning information corresponding to the risk level.
[0014] Further, in step S1, the environmental data includes temperature, humidity, harmful gas concentration, smoke concentration, and water and electricity parameters;
[0015] The instrument equipment data includes running status, operation log, fault and maintenance record;
[0016] The reagent management data includes reagent procurement, warehousing, storage, taking, use and disposal information;
[0017] The sample management data includes sample registration, storage, taking, consumption, warehouse withdrawal and processing information;
[0018] The personnel operation data includes personnel access record, operation compliance record, safety training record and irregular operation record.
[0019] Further, in step S2, the data cleaning includes removing outliers using the 3σ criterion, and filling in or marking missing values; the data standardization includes establishing a unified data dictionary and uniformly converting the units and time formats of the multi-source data; and the data correlation labeling includes correlating multi-type data having the same time period, the same region, or logical correlation after the multi-source data is cleaned and standardized, to form a multi-dimensional correlation data set.
[0020] Further, in step S3, the deep feature extraction network is a residual convolutional neural network having a multi-scale receptive field, and includes a plurality of residual blocks connected in sequence; at least some of the residual blocks are configured with different convolution kernel sizes, for simultaneously extracting local dependent features of different time spans from time series data in the multi-dimensional correlation data set; and a global average pooling layer is provided at the end of the network, for outputting a fixed-dimension feature vector.
[0021] The multi-metric learning module is configured to divide the extracted feature vectors into a plurality of non-overlapping sub-feature groups, and configure an independent metric learner for each sub-feature group; each metric learner learns a transformation matrix to map the corresponding sub-feature group to an embedding space based on Mahalanobis distance, and calculates the metric distance between samples.
[0022] Further, in step S3, the end-to-end training of the composite risk identification model based on the multi-dimensional correlation data set includes:
[0023] Constructing a training sample set: extracting a data window associated in time with a historical safety accident from the multi-dimensional correlation data set to construct a labeled accident sample, and generating a synthetic sample of a simulated risk scenario according to a preset risk rule, to jointly constitute a training sample set with risk labels;
[0024] Dynamic adversarial sample enhancement: in each training iteration, for each metric learner currently trained, an adversarial hard-negative sample generation module is used to add specific perturbations to original negative samples to generate hard-negative samples, to reduce the correlation between different metric learners;
[0025] Joint backpropagation optimization: taking a joint loss function as an optimization objective, the trainable parameters of the deep feature extraction network, all metric learners in the multi-metric learning module, and the perturbation generator in the adversarial hard-negative sample generation module are simultaneously updated by a backpropagation algorithm.
[0026] Further, the dynamic adversarial sample enhancement specifically includes:
[0027] For the kth metric learner trained at present, an anchor sample and an original negative sample are selected, a specific disturbance signal is calculated through a corresponding disturbance generator, the disturbance signal is added to the original negative sample in a controlled amplitude, and then a hard negative sample is synthesized;
[0028] The disturbance generator is trained to optimize the target that the hard negative sample is reduced in distance with the anchor sample in the feature embedding space of the current metric learner, while the distance with the original negative sample is increased.
[0029] Further, the joint loss function is composed of a metric loss function and an auxiliary Softmax classification loss function weighted sum: the metric loss function is constructed based on the boosting structure loss, which is used to optimize the model to make the same class risk samples closer and the different class risk samples farther apart according to the distance of the sample pairs on each metric learner; the auxiliary Softmax classification loss is used to prevent the metric space from degenerating and ensure that the optimization direction is consistent with the risk classification task.
[0030] Further, in step S4, the execution process of the sequential sampling heuristic optimization algorithm based on the Pareto principle includes:
[0031] S41, initialize algorithm parameters and define parameter search domain;
[0032] S42, generate an initial population by Monte Carlo sampling in the parameter search domain;
[0033] S43, iterative optimization: calculate the fitness of each parameter combination in the current population and determine the current optimal solution; if the current optimal solution is better than the historical optimal solution, update the advantage search domain centered on the current optimal solution, and the bandwidth of the advantage search domain is dynamically tightened with the increase of the iteration number; generate a new population, and for each parameter, sample from the advantage search domain with a probability of α and sample from the global parameter search domain with a probability of 1-α;
[0034] S44, terminate the optimization when the maximum number of iterations is reached or the fitness meets the preset threshold, and output the optimal parameter combination for configuring the composite risk identification model.
[0035] Further, in step S5, the risk levels include at least "negligible risk", "controlled acceptable risk", "unwanted risk" and "unacceptable risk"; the warning information is synchronously published through the laboratory local audible and visual alarm device, the management personnel mobile terminal and the central management platform, and the warning information includes risk type, level, location, associated data index and disposal suggestion.
[0036] In a second aspect, the embodiments of the present application also provide a chemical laboratory safety early warning system based on multi-source data analysis, comprising:
[0037] a data acquisition module, configured to acquire multi-source data of the chemical laboratory, wherein the multi-source data comprises environmental data, instrument and equipment data, reagent management data, sample management data and personnel operation data;
[0038] a data preprocessing module, configured to preprocess the multi-source data, including data cleaning, data standardization and data correlation annotation based on time, space and logical relationship, to form a multi-dimensional correlation data set;
[0039] a model construction module, configured to construct a composite risk identification model based on deep multi-metric learning, and to perform end-to-end training on the composite risk identification model by using the multi-dimensional correlation data set and combining an adversarial sample enhancement strategy; the composite risk identification model comprises a deep feature extraction network for extracting nonlinear features from input data, and a deep multi-metric learning module connected thereto and composed of multiple parallel and independent metric learners; the multiple metric learners perform specific metric learning on different sub-feature groups of the nonlinear features respectively, to capture local patterns of the composite risk;
[0040] a model optimization module, configured to perform automatic global optimization on key parameters in the composite risk identification model by using a sequential sampling heuristic optimization algorithm based on the Pareto principle;
[0041] a risk early warning module, configured to input multi-source data collected and correlated in real time into the optimized composite risk identification model for risk matching analysis, to determine a risk level according to an output risk matching degree, and to trigger early warning information corresponding to the risk level.
[0042] Compared with the prior art, the present application has the following beneficial effects:
[0043] 1. High precision of composite risk identification: the DMML model adopted by the present application combines nonlinear feature extraction with multi-metric learning, effectively captures local specificity and nonlinear relationship of multi-source data, and significantly improves the identification precision of composite risk patterns such as explosion, fire and poisoning, with a false positive rate reduced by more than 30% and a false negative rate controlled within 5% compared with traditional single-metric models.
[0044] 2. Strong model generalization ability: the PSS global parameter optimization algorithm dynamically adjusts the search domain based on the Pareto principle, balances global exploration and local utilization, and can adaptively optimize the key parameters of the model, so that the model still maintains stable identification performance when facing new types of composite risks, and the generalization performance is improved by more than 40% compared with artificial parameter tuning models, and is suitable for different scales and types of chemical laboratory scenes.
[0045] 3. Multi-source data fusion effect is good: A full-dimensional data collection and preprocessing process covering environment, instruments, reagents, samples and personnel is constructed, effective fusion of multi-source heterogeneous data is realized through time, space and logical three-dimensional correlation annotation, and the problems of data isolation and difficulty in identifying complex risks in traditional methods are solved.
[0046] 4. Real-time and efficient early warning response: The model adopts an end-to-end training and real-time inference architecture, the data collection frequency is 1 time / minute, the risk identification and early warning response delay is controlled within seconds, and the response speed is improved by tens of times compared with traditional manual inspection, which provides sufficient time for laboratory safety emergency disposal.
[0047] 5. Strong practicability and scalability: The system deployment is flexible, the sensor and instrument device docking mode is compatible with existing mainstream interfaces, the model parameters can be adaptively adjusted according to the actual risk characteristics of the laboratory, and the system supports flexible expansion of function modules (such as adding risk type identification and emergency disposal process linkage), which is suitable for various scenes such as scientific research laboratories and teaching laboratories.
[0048] It should be understood that the content described in the summary section is not intended to limit the key or important features of the embodiments of the present application, nor to limit the scope of the present application. Other features of the present application will become apparent through the following description. BRIEF DESCRIPTION OF DRAWINGS
[0049] The above and other features, advantages, and aspects of embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings that illustrate, by way of example, the principles of the application. The drawings serve to better understand the present application, and do not constitute a limitation thereof. In the drawings, the same or similar reference numerals refer to the same or similar elements, and:
[0050] Figure 1 is a flowchart of a chemical laboratory safety early warning method based on multi-source data analysis provided by an embodiment of the present application;
[0051] Figure 2 is a structural diagram of a complex risk identification model (DMML) of the present application;
[0052] Figure 3 is a flowchart of a sequential sampling heuristic optimization algorithm (PSS) based on the Pareto principle of the present application;
[0053] Figure 4 is a module diagram of a chemical laboratory safety early warning system based on multi-source data analysis of an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments but not all of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0055] In addition, the term "and / or" herein merely describes an association relationship of associated objects, and indicates that there can be three relationships, for example, A and / or B can represent three cases of A existing alone, A and B existing simultaneously, and B existing alone. In addition, the character " / " herein generally represents an "or" relationship between the front and rear associated objects.
[0056] Figure 1 is a flowchart of a chemical laboratory safety early warning method based on multi-source data analysis. As shown in Figure 1 The chemical laboratory safety early warning method based on multi-source data analysis 100 includes the following steps:
[0057] S1, collecting multi-source data of a chemical laboratory, wherein the multi-source data includes environmental data, instrument and equipment data, reagent management data, sample management data and personnel operation data;
[0058] Step S1 is used for realizing multi-source data collection:
[0059] 1. Environmental data collection
[0060] Temperature sensors, humidity sensors, harmful gas concentration sensors (for benzene series, heavy metal steam, etc.), smoke concentration sensors, and water and electricity parameter sensors (voltage, current, water pressure) are arranged in different functional areas (reagent storage area, instrument operation area, sample processing area, etc.) of the laboratory. The collection frequency is set to 1 time / minute. The sensors upload real-time monitoring data to the data processing center through the LoRa / Wi-Fi wireless transmission module, to ensure the real-time and stability of data transmission.
[0061] 2. Instrument and equipment data collection
[0062] Through RS485, Ethernet and other interfaces, 46 typical instruments and equipment of five categories (pretreatment, spectrum, chromatogram, mass spectrum and X-ray) are connected. The instrument running state (on / off state, running parameters), operation log (operator, operation time, operation steps), fault record (fault code, fault occurrence time, fault location), maintenance record (maintenance time, maintenance content, maintenance personnel) and other data are collected to build an instrument and equipment full life cycle data set.
[0063] 3. Reagent management data collection
[0064] The docking chemical reagent usage guide database and monitoring system collects reagent full-process data. The details include procurement information (reagent name, CAS number, hazard category, procurement quantity, supplier), storage information (storage time, storage location, acceptance condition), storage environment (storage temperature and humidity, ventilation condition), use record (user, use time, use quantity), usage, remaining quantity, disposal record (disposal method, disposal time, disposer), etc.
[0065] 4. Sample management data collection
[0066] The sample full-process data is extracted from the detection sample safety management system. The information covers sample registration (sample name, specification and model, hazard level, sample arrival date, commissioning unit), storage and warehousing (storage location, storage condition, warehousing person, warehousing date), sample taking (sample taker, sample taking date), consumption and warehouse return (consumption quantity, damage quantity, complete quantity, return person, return date), sample processing after detection (processing method, processing time, processor), etc.
[0067] 5. Personnel operation data collection
[0068] Through the access control system, operation recorder and other equipment, the entry / exit time and entry area of laboratory personnel are recorded. Through the operation compliance verification module, the operation process execution situation (whether it conforms to the standard procedure) is recorded. The personnel safety training record (training time, training content, examination result) is collected by docking the safety training management system. Through video monitoring and operation log analysis, the irregular operation record (irregular type, irregular time, irregular personnel) is recorded to form the personnel operation behavior data set.
[0069] S2, preprocessing the multi-source data, including data cleaning, data standardization, and data correlation annotation based on time, space and logical relationship, to form a multi-dimensional correlation data set;
[0070] Step S2 is used to realize multi-source data preprocessing, specifically including the following steps:
[0071] Step S2.1: data cleaning
[0072] The 3σ criterion is used to eliminate sensor outliers. For missing values in the instrument log, if the missing proportion is less than 5%, linear interpolation is used for supplementation, and if it is higher than 5%, it is marked as data missing and feedback verification; delete the repeatedly collected data, mark the abnormal data obviously deviating from the normal range (such as temperature far exceeding the reagent storage requirement threshold), and manually verify the related area equipment and operation data.
[0073] Step S2.2: data standardization
[0074] A unified data dictionary is established to standardize data of different sources and formats. The gas concentration unit is uniformly converted to mg / m 3 , the temperature unit is uniformly converted to ℃, the humidity unit is uniformly converted to %RH, and the time format is uniformly converted to ISO standard time stamp (YYYY-MM-DDHH:MM:SS), so as to ensure that the multi-source data formats are consistent and comparable.
[0075] Step S2.3: data association annotation
[0076] For the multi-source data after data cleaning and data standardization, the multi-source data is associated based on time, space and logical relationship: multi-dimensional associated data sets are formed by associating multi-type data of the same time period, the same area or having logical correlation. Specifically, in the time dimension, environmental data, instrument operation data, reagent use data and personnel operation data in the same time period (such as within 1 hour) are associated; in the space dimension, various types of data in the same area (such as a reagent storage area) are associated; in the logical dimension, reagent taking and corresponding instrument operation, sample processing data are associated to form multi-dimensional associated data sets.
[0077] The present application constructs a multi-dimensional data acquisition and fusion analysis framework through steps S1 and S2, realizes comprehensive acquisition, preprocessing and association analysis of multi-source data of environment, instrument, reagent, sample and personnel operation, provides data support for composite risk identification, and finally realizes accurate and real-time early warning of chemical laboratory safety risk.
[0078] S3, a composite risk identification model based on deep multi-metric learning is constructed, and the multi-dimensional associated data set is used to train the composite risk identification model end to end combined with an adversarial sample enhancement strategy; the composite risk identification model comprises a deep feature extraction network for extracting nonlinear features from input data, and a deep multi-metric learning module connected after the deep feature extraction network and composed of a plurality of parallel and independent metric learners; the plurality of metric learners respectively perform specific metric learning on different sub-feature groups of the nonlinear features to capture local patterns of composite risks.
[0079] Step S3 is used for constructing a composite risk identification model and training the model. Figure 2 is a structural diagram of the composite risk identification model (DMML) of the present application, as shown in Figure 2 , comprising the following steps:
[0080] Step S3.1: composite risk identification model construction
[0081] The application proposes to construct a composite risk identification model by using a deep multi-metric learning (DMML) method. The model extracts nonlinear features of multi-source data through a deep feature extraction network (convolution network component), and simultaneously captures data local specificity by using multi-metric learning, thereby improving the composite risk pattern recognition capability.
[0082] Step S3.1.1: Nonlinear feature extraction
[0083] The deep feature extraction network is a convolutional neural network containing multiple residual blocks, which is used to extract nonlinear features from time series data in a multi-dimensional correlation data set and output a nonlinear feature vector. Specifically:
[0084] A residual convolutional neural network is constructed as a nonlinear feature extractor, which is composed of 3 residual blocks, each of which contains multiple convolutional layers, a total of 9 convolutional layers. The convolution kernel length of each residual block is set to 8, 5, and 3 respectively, and the number of convolution kernels is 128. The local dependence and global features of time series data (such as environmental parameter time series data and instrument running parameter time series data) are captured through multiple layers of convolution, and a nonlinear feature vector with a dimension of
[0085] Residual convolutional neural network: nonlinear feature extractor, containing 9 convolutional layers, 1 global average pooling layer and 3 residual blocks, used to capture local dependence and global features from time series data.
[0086] Convolution kernel length: the size of the convolution kernel in the residual block, the convolution kernel length of the three residual blocks is set to 8, 5 and 3 respectively, which is used to adapt to feature extraction of different scales. The purpose is to enable it to capture local dependence patterns and trends of different time spans in time series data like a multi-focal lens.
[0087] Number of convolution kernels: the number of convolution kernels of each convolutional layer, which is uniformly set to 128, providing sufficient expression capacity for feature extraction and improving the expression ability of feature extraction.
[0088] Output processing: a global average pooling layer is used at the end of the network as the output layer of the residual convolutional neural network, which performs average pooling on the feature map output by the convolutional layer in the time dimension, aggregates the feature map in the time dimension into a fixed dimension (r-dimensional) feature vector, and outputs the entire network.
[0089] Time series data: laboratory multi-source time series data, including environmental parameter time series data (temperature, humidity, etc. data changing with time), instrument running parameter time series data (instrument running state, parameter data changing with time), etc.
[0090] : nonlinear feature extraction function, extracting features from a single pre-processed data sample by residual convolutional neural network with output dimension of .
[0091] : single pre-processed data sample, covering any one type of pre-processed data among environmental data, instrument data, reagent management data, sample management data, or personnel operation data. : dimension of feature vector, i.e. dimension of residual convolutional neural network output feature, determined by network structure design.
[0092] This deep feature extraction network structure is designed specifically for processing time series data such as sensor readings and instrument operation logs in laboratory environment, aiming to automatically extract effective and hierarchical nonlinear features for risk identification from these time series signals.
[0093] Step S3.1.2: Feature grouping and multi-metric learning
[0094] Multi-metric learning module, used to divide the extracted feature vector into multiple non-overlapping sub-feature groups, and configure an independent metric learner for each sub-feature group. Each metric learner learns a transformation matrix to map the corresponding sub-feature group to an embedding space based on Mahalanobis distance, and calculates the metric distance between samples. The metric learner is an independent distance metric model constructed based on the sub-feature group, and each sub-feature group corresponds to a metric learner for learning the exclusive distance metric rule of the feature group. Mahalanobis distance is the distance calculation basis of the metric learner, which can more accurately measure the similarity between samples by considering the correlation between features. The specific implementation is as follows:
[0095] Divide the feature vector into non-overlapping sub-feature groups , each corresponding to an independent metric learner. Each metric learner is constructed based on Mahalanobis distance, and through learning a transformation matrix , the sub-features are mapped to an embedding space. The distance of the th group is defined as:
[0096]
[0097] : number of feature groups, i.e. number of non-overlapping sub-feature groups divided from the feature vector , the optimal value range is . : the th sub-feature group, which is a feature vector The first non-overlapping sub-feature set corresponds to a specific type of risk feature dimension. The first transformation matrix of the metric learner, learned through model training, is used to map the first sub-feature group to the embedding space, optimizing the distance distribution between samples. The sample The metric distance on the first sub-feature group is constructed based on the Mahalanobis distance, which is used to quantify the similarity of two samples in this sub-feature group. The corresponding contrast sample is also a pre-processed valid data sample, used to construct a sample pair to train the metric learner. The matrix transpose operation is used to satisfy the matrix multiplication rule in the Mahalanobis distance calculation. The square root operation is used to convert the square value of the distance to the actual metric distance. , , where i and j are the i-th and j-th samples in the data set (i, j ∈ {1, 2,..., N}); k is the index of the metric learner, usually ranging from 1 to the number of feature groups K.
[0098] Step S3.1.3: Adversarial hard-negative sample generation
[0099] To reduce the correlation between metric learners, an adversarial hard-negative sample generation method is designed. The adversarial hard-negative sample generation module: a functional module for synthesizing hard-negative samples, which reduces the correlation between multiple metric learners by adding targeted perturbations to the original negative samples, and improves the model generalization ability.
[0100] Based on the original training data and the current metric learner output, a small perturbation is added to the existing negative sample by the perturbation generator. The original training data is the existing, labeled training data set, which contains normal anchor samples and corresponding original negative samples from different risk categories. Specifically, for the k-th metric learner being trained, an anchor sample and an original negative sample are selected, and a specific perturbation signal is calculated by the corresponding perturbation generator . The specific perturbation signal is added to the original negative sample with a controlled amplitude, and then a hard-negative sample is synthesized:
[0101]
[0102] : No. Each metric learner corresponds to a synthetic hard negative sample, obtained by processing the original negative sample. The addition of small perturbations enhances the metric learner's ability to identify complex risk patterns. Original negative sample, i.e., the sample with anchor point Samples belonging to different risk categories or not meeting the similarity requirements (such as a combination of fire risk samples and normal state samples). : Perturbation amplitude control parameter, used to control the perturbation amplitude of the original negative sample. The perturbation intensity should be adjusted to avoid excessive perturbation leading to sample distortion; the optimal value range is [value range missing]. . : No. Each metric learner has a perturbation generator with three fully connected layers. The output dimension is the same as the input sample length, and it is used to generate a perturbation signal specific to the current metric learner.
[0103] Disturbance generator Trained to optimize for the following objective: making hard-to-bear samples In the feature embedding space of the current metric learner, with anchor samples The feature representation distance is reduced, while also being compared with the original negative sample. The feature representation increases the distance. Specifically, the generator's loss function is:
[0104]
[0105] : The loss function of the perturbation generator is used to optimize the generation effect of hard negative samples, so that the synthesized samples are both close to the anchor samples and far away from the original negative samples. : No. The feature mapping operation of the metric learner will transform the sample's _th _th_ ... Sub-characteristics By transforming the matrix Mapped to the embedding space. The square operation of the L2 norm is used to calculate the squared distance between two feature vectors in the embedding space, quantifying the similarity between vectors. This makes the synthesized sample approximate the anchor sample in the embedding space. Anchor sample: i.e. , serving as a benchmark sample for generating difficult-to-bear samples, is used to define the proximity target of synthetic samples. The synthesized samples are kept away from the original negative samples to ensure that the generated samples are misleading to the current metric.
[0106] Disturbance generator It is not fixed, and its goal is to generate samples that can "confuse" the current (kth) training metric learner. The generator The loss function of the generator directly uses the parameters of the current metric learner and the feature mapping to calculate the distance, meaning that the "attack target" of the generator (i.e., the current metric learner) is dynamically changing during training.
[0107] The subsequent metric learners are jointly trained on the original samples and the pre-generated hard-negative samples. The pre-generated hard-negative samples: the hard-negative samples synthesized by the perturbation generator of the previous metric learner, used for the joint training of the subsequent metric learners, to reduce the correlation between the metric learners.
[0108] Step S3.1.4: Loss function design
[0109] Further, the joint loss function is composed of a metric loss function and an auxiliary Softmax classification loss function: the metric loss function is based on the lifted structured loss, which is used to optimize the model to make the distance between same-risk samples closer and the distance between different-risk samples farther apart according to the distance of the sample pairs on each metric learner; the auxiliary Softmax classification loss is used to prevent metric degradation and ensure that the optimization direction is consistent with the risk classification task. Specifically as follows:
[0110] The lifted structured loss (Lifted Structured Loss) is used as the metric loss, and the auxiliary Softmax loss is introduced to avoid metric degradation, and the joint loss function is:
[0111]
[0112]
[0113] : Joint loss function, used to optimize the overall performance of the deep multi-metric learning (DMML) model, combining the metric loss and the auxiliary loss, balancing the risk pattern recognition accuracy and the metric stability. : Metric loss, based on the lifted structured loss (Lifted Structured Loss), used to optimize the distance measurement effect of the multi-metric learner, making the distance between same-risk samples closer and the distance between different-risk samples farther apart. : Auxiliary Softmax loss, used to avoid metric degradation and ensure that the model optimization direction is related to the classification task, improving the effectiveness of risk classification. : Balance factor, used to adjust the weight ratio of the metric loss and the auxiliary loss, with the optimal value range being . : Positive sample pair set, which consists of sample pairs composed of samples of the same risk (such as a combination of samples that are all related to fire risk), used to train the model to narrow the distance between samples of the same type. : Set of positive sample pairs The number of elements, i.e. the total number of risk sample pairs of the same type. Anchor samples are the benchmark samples used in loss calculation, derived from preprocessed multi-source data (environmental, instrumental, reagent, etc.). : with anchor point sample Corresponding similar samples, and Together they constitute a positive sample pair . The margin parameter sets a threshold for the distance between outlier samples and samples of the same type. It is fixed at 1 to ensure that the distance between outlier samples is greater than this threshold to achieve effective separation. Negative sample pair set: a sample pair composed of risk samples of different classes (such as a combination of fire risk samples and poisoning risk samples) used to train the model to reduce the distance between samples of different classes. : with anchor point sample Corresponding outlier samples, and Together they constitute negative sample pairs . Anchor point sample Compared with outlier samples In the The metric distance on the metric learner, i.e., the distance between the two on the metric learner. Similarity metric values across sub-feature groups. Anchor point sample Compared with similar samples In the The metric distance on the metric learner, i.e., the distance between the two on the metric learner. Similarity metric values across sub-feature groups. : Maximization function, used to limit the loss value to non-negativity, only when Losses occur during this process, driving model optimization to ensure that the distance between out-of-class samples meets the threshold requirement. The square operation is used to amplify the difference in loss values and enhance the model's optimization power for sample pairs that do not meet the distance requirements. Minimum value operation, used to filter anchor point samples. With negative sample set The minimum metric distance among all samples, i.e., the distance between the samples and the target sample. Distance to the most similar out-of-class sample.
[0114] Step S3.2: Model Training
[0115] With historical safety accident data (explosion, fire, poisoning, mechanical injury, corrosion burn, etc. Accident records and associated data), simulated risk scenario data (such as high-risk reagent storage temperature and humidity exceeding standard, instrument failure operation, violation of operation, etc. Simulation data) as training samples, combined with supplementary samples synthesized by the generated module of the difficult negative sample, input into the composite risk identification model for end-to-end training. During the training process, the parameters of the feature extraction network, the multi-metric learner and the difficult negative sample generator are optimized through back propagation to improve the recognition accuracy of the model to the composite risk pattern. The end-to-end training process of the composite risk identification model based on the multi-dimensional correlation data set includes:
[0116] S3.2.1, construct a training sample set: from the multi-dimensional correlation data set, extract the data window associated with the historical safety accident in time to construct the labeled accident sample, and generate the synthetic sample of the simulated risk scene according to the preset risk rule, together constitute the training sample set with risk label;
[0117] Specifically, the construction process of the training data set includes:
[0118] (1) Historical accident sample construction: From the continuously updated multi-dimensional correlation data set, retrieve the data window associated with each historical safety accident record (such as explosion, fire record) in time. The data window should cover the accident precursor stage to the accident occurrence point, extract all associated environmental, instrument, reagent, sample and personnel operation data in this window to form a positive sample with the accident type label. At the same time, extract similar data segments from the normal period without accidents to form negative samples.
[0119] (2) Simulated risk sample generation: Based on the chemical laboratory safety regulations and risk knowledge base, program the risk scene. For example, in the simulation of "high-risk reagent leakage" scene, at a specific timestamp, modify the concentration data of a specific harmful gas in the reagent storage area to an over-standard value, and associate the temperature and humidity data of the area in this period, the related reagent use record and the information of the possible personnel in the area, to generate a synthetic sample with the corresponding risk label.
[0120] (3) Data set division: divide the constructed sample set (including historical accident samples, simulated risk samples and corresponding normal samples) into training set, validation set and test set according to the preset proportion (such as 7:2:1), and ensure that the samples of each category are evenly distributed in the division.
[0121] S3.2.2, dynamic adversarial sample enhancement: in each training iteration, for each metric learner of the current training, through the adversarial difficult negative sample generation module, add specific perturbation to the original negative sample to generate difficult negative sample, so as to reduce the correlation between different metric learners;
[0122] In this step S3.2.2, the specific process design of model training is as follows:
[0123] Initialization: The parameters of the composite risk identification model are initialized using the Kaiming normal distribution method. The parameters of the perturbation generator in the adversarial difficult negative sample generation module are randomly initialized.
[0124] Training cycle: In each training cycle (Epoch), sample pairs (including anchor samples, positive samples, and original negative samples) are extracted from the training set in batches (Batch).
[0125] Dynamic synthesis and integration of adversarial samples: For each anchor sample- original negative sample pair in the current batch, according to the current state of each metric learner, the corresponding perturbation generator is called in real time to generate difficult negative samples. These newly generated difficult negative samples are immediately included in the training calculation of the current batch.
[0126] End-to-end joint optimization: Use the adaptive matrix estimation optimizer to target the aforementioned joint loss function (L) ). Through the backpropagation algorithm, the gradient flows through and updates the following three parts of parameters simultaneously:
[0127] (1) All convolution kernel weights and biases of the residual convolution feature extraction network;
[0128] (2) The transformation matrix of all metric learners;
[0129] (3) The fully connected layer parameters of all perturbation generators .
[0130] Training monitoring and adjustment: During the training process, after a certain number of rounds, the comprehensive performance of the model (such as accuracy, false positive rate) is evaluated on the validation set. If the validation set loss does not decrease for consecutive multiple cycles, the early stopping mechanism is triggered to prevent overfitting. At the same time, learning rate decay strategies can be used to improve optimization accuracy.
[0131] In a preferred embodiment, the adaptive matrix estimation optimizer uses the Adam optimizer, with an initial learning rate set to 0.001 and a weight decay coefficient of 1e-4. The learning rate decay strategy uses round-by-round decay, with the learning rate multiplied by 0.5 every 30 training cycles. The early stopping mechanism is set to terminate training when the validation set loss does not decrease for 10 consecutive training cycles.
[0132] Model saving: During the entire training process, save the model parameter snapshot with the best performance on the validation set as the final trained model.
[0133] Training goal: Through the above training process, the model learns to extract the most effective nonlinear feature representation for identifying complex risk from complex multi-dimensional correlated data, and makes multiple metric learners focus on different aspects of risk feature differences, ultimately achieving high-precision and low-false alarm recognition ability for new and unknown complex risk patterns.
[0134] The application introduces the above-mentioned adversarial difficult negative sample generation module, synthesizes targeted supplementary samples, reduces the correlation between metric learners, enhances the recognition ability of the model for fuzzy risk samples, and avoids metric degradation through auxiliary Softmax loss, ensuring that the model optimization direction is consistent with the classification task.
[0135] S3.2.3, joint back propagation optimization: taking the joint loss function as the optimization target, synchronously updating the trainable parameters of the deep feature extraction network, all metric learners in the multi-metric learning module, and the disturbance generator in the adversarial difficult negative sample generation module through the back propagation algorithm.
[0136] Step S3.3: risk level division
[0137] Based on the risk evaluation index matrix method, combined with the risk feature matching degree output by the model, the risk is divided into five levels. Among them, the risk can be ignored (no harm), the risk can be accepted without review (the quality fluctuation is within the controlled range, and there is no personnel injury), the controlled acceptable risk (the test quality can be compensated and salvaged, and the personnel is slightly injured), the undesirable risk (the test quality is uncontrollable and salvaged, and the personnel is injured), and the unacceptable risk (the test quality is illegal and rules are violated, and the personnel is dead), and the corresponding warning threshold is set for each level.
[0138] In step S3 of the application, a deep multi-metric learning (DMML) method is used to construct a complex risk identification model, nonlinear features of multi-source data are extracted through a convolution network component, and feature vectors are divided into multiple non-overlapping sub-feature groups, an independent metric learner is constructed for each group, local specificity of data is captured, the problem of single metric not being able to adapt to complex risk data is solved, and the complex risk pattern recognition ability is improved.
[0139] S4, a sequential sampling heuristic optimization algorithm based on the Pareto principle is used to automatically globally optimize the key parameters in the complex risk identification model, and the optimization algorithm balances global exploration and local utilization in the parameter search process by dynamically adjusting the advantage search domain.
[0140] Step S4 is used to realize the parameter optimization of the risk identification model. The specific process is as follows:
[0141] The application proposes to use a Pareto-like sequential sampling heuristic optimization (PSS) algorithm to perform global parameter optimization on a composite risk identification model. The algorithm is based on the Pareto principle (80 / 20 rule) and balances global exploration and local utilization by dynamically tightening the advantage search domain, thereby improving the model's ability to identify new composite risks and its generalization performance. Further, the specific process of the Pareto-like sequential sampling heuristic optimization algorithm includes: initializing algorithm parameters and defining parameter search domains; generating an initial population using Monte Carlo sampling within the parameter search domain; performing iterative optimization: calculating the fitness of each parameter combination in the current population and determining the current optimal solution; if the current optimal solution is better than the historical optimal solution, updating the advantage search domain centered on the current optimal solution, and dynamically tightening the bandwidth of the advantage search domain as the number of iterations increases; generating a new population, for each parameter, sampling from the advantage search domain with a probability of alpha and from the global parameter search domain with a probability of 1-alpha; terminating optimization when the maximum number of iterations is reached or the fitness meets the preset threshold, and outputting the optimal parameter combination for configuring the composite risk identification model. Figure 3 is a flowchart of the sequential sampling heuristic optimization algorithm (PSS) based on the Pareto principle of the application, as shown in Figure 3 , specifically including the following steps:
[0142] Step S4.1: Optimization target and parameter definition
[0143] The risk identification accuracy, false positive rate, and false negative rate of the composite risk identification model are used as optimization targets, and the parameters to be optimized include: the number of feature groupings of the DMML model , the embedding dimension (optimal range ), the balance factor , the disturbance amplitude , and the transformation matrix parameter of the metric learner.
[0144] Risk identification accuracy: one of the core optimization targets of the composite risk identification model, refers to the proportion of samples correctly identified by the model as various types of risks (explosion, fire, poisoning, etc.) in the total samples, and the goal is to maximize this indicator.
[0145] False positive rate: one of the core optimization targets of the composite risk identification model, refers to the proportion of risk-free samples misjudged by the model as risky samples, and the goal is to minimize this indicator.
[0146] False negative rate: one of the core optimization targets of the composite risk identification model, refers to the proportion of risky samples misjudged by the model as risk-free samples, and the goal is to minimize this indicator.
[0147] : The number of feature groupings of the DMML model (meaning in step S3), i.e., the number of non-overlapping sub-feature groups of the feature vector splitting, is a parameter to be optimized.
[0148] : The embedding dimension of the DMML model, i.e., the dimension of the embedding space after the sub-feature mapping by the metric learner, has an optimal value range of , and is a parameter to be optimized.
[0149] : The balance factor of the DMML model (meaning in step S3), used to adjust the weight proportion of the metric loss and the auxiliary loss, is a parameter to be optimized.
[0150] : The perturbation amplitude control parameter of the DMML model (meaning in step S3), used to control the perturbation intensity of the generation of difficult negative samples, is a parameter to be optimized.
[0151] : The transformation matrix of the th metric learner in the DMML model (meaning in step S3), used for mapping of sub-features to embedding space, whose elements are parameters to be optimized.
[0152] Step S4.2: Constructing the PSS algorithm optimization process
[0153] Step S4.2.1: Initialization setting
[0154] Set algorithm parameters, including population size (default 30), maximum number of iterations , acceptance probability (default 0.95, which can be adjusted to for multimodal risk data). Define the parameter search domain ( is the total number of parameters to be optimized), whose boundary is .
[0155] : The population size of the PSS algorithm, i.e., the number of parameter combinations optimized simultaneously in each iteration process, has a default value of 30.
[0156] : The maximum number of iterations of the PSS algorithm, i.e., the maximum number of iterations before the algorithm terminates, is used to control the total amount of calculation in the optimization process.
[0157] : The acceptance probability of the PSS algorithm, used to control the proportion of sampling from the superior search domain, has a default value of 0.95, which can be adjusted to for multimodal risk data scenarios.
[0158] The parameter search domain of the PSS algorithm, i.e., the set of values for the parameter to be optimized, satisfies... ,in This represents the total number of parameters to be optimized.
[0159] The total number of parameters to be optimized, i.e. and The total number of all elements to be optimized.
[0160] : Parameter search domain The lower bound vector.
[0161] : Parameter search domain The upper bound vector.
[0162] Step S4.2.2: Initial population sampling
[0163] The initial population is generated using the Monte Carlo sampling method. Each individual in the population corresponds to a set of parameters to be optimized. The generation formula is as follows:
[0164]
[0165] in, This represents the minimum value of the b-th parameter to be optimized; Indicates the first The maximum value of each parameter to be optimized; This represents the initial value of the b-th parameter in the a-th individual (i.e., the a-th parameter combination) of the initial population generated during the initialization of the PSS algorithm. β is a random number uniformly distributed in the range [0, 1]; a represents the index of an individual in the population (a = 1, 2, ..., β); b represents the dimension index of the parameter to be optimized (b = 1, 2, ..., n). This formula ensures that the initial population is uniformly distributed within the preset parameter search range, providing a good starting point for subsequent iterative optimization.
[0166] Step S4 of this invention employs a Pareto-type sequential sampling heuristic algorithm (PSS) to optimize the global parameters of the composite risk identification model. Based on the Pareto principle (80 / 20 rule), it balances global exploration and local utilization by dynamically tightening the dominant search domain, automatically optimizing key parameters such as the number of feature groups, embedding dimension, and balance factor of the model. This solves the problem that traditional optimization algorithms are prone to getting trapped in local optima, and improves the model's ability to identify new composite risks and its generalization performance.
[0167] S5, input the multi-source data collected and associated in real time into the composite risk identification model optimized in step S4 for risk matching analysis, determine a risk level according to a risk matching degree output, and trigger early warning information corresponding to the risk level.
[0168] Further, in step S5, the risk level at least includes negligible risk, controlled accepted risk, undesired risk and unacceptable risk; the early warning information is synchronously published through a laboratory local sound-light alarm device, a management personnel mobile terminal and a central management platform, and the early warning information includes a risk type, a level, a position, associated data index and disposal suggestion.
[0169] Figure 4 is a module schematic diagram of the chemical laboratory safety early warning system based on multi-source data analysis according to the embodiment of the application. As shown in Figure 4 the system 200 includes a data acquisition module 210, a data preprocessing module 220, a model construction module 230, a model optimization module 240 and a risk early warning module 250:
[0170] The data acquisition module 210 is used for acquiring multi-source data of a chemical laboratory, and the multi-source data includes environmental data, instrument equipment data, reagent management data, sample management data and personnel operation data.
[0171] The data preprocessing module 220 is used for preprocessing the multi-source data, including data cleaning, data standardization and data association annotation based on time, space and logical relationship, to form a multi-dimensional associated data set.
[0172] The model construction module 230 is used for constructing a composite risk identification model based on deep multi-metric learning, and performing end-to-end training on the composite risk identification model by using the multi-dimensional associated data set and combining an adversarial sample enhancement strategy; the composite risk identification model includes a deep feature extraction network for extracting nonlinear features from input data, and a deep multi-metric learning module connected after the deep feature extraction network and composed of multiple parallel and independent metric learners; the multiple metric learners respectively perform specific metric learning on different sub-feature groups of the nonlinear features, to capture local patterns of the composite risk.
[0173] The model optimization module 240 is used for performing automatic global optimization on key parameters in the composite risk identification model by using a sequential sampling heuristic optimization algorithm based on the Pareto principle.
[0174] The risk early warning module 250 is used for inputting multi-source data collected and associated in real time into the composite risk identification model optimized in step S4 for risk matching analysis, determining a risk level according to a risk matching degree output, and triggering early warning information corresponding to the risk level.
[0175] The chemical laboratory safety early warning system based on multi-source data analysis provided in the embodiments of the present application can execute the chemical laboratory safety early warning method based on multi-source data analysis provided in any of the embodiments of the present application, has the corresponding functions and beneficial effects of executing the chemical laboratory safety early warning method based on multi-source data analysis, and the detailed process is described in the foregoing embodiments of the chemical laboratory safety early warning method based on multi-source data analysis, which will not be described here.
[0176] According to the chemical laboratory safety early warning method and system based on multi-source data analysis provided in the embodiments of the present application, high-precision identification of complex risks such as explosion, fire, and poisoning is achieved, and the false positive and false negative rates are effectively reduced; the early warning response is improved to real-time seconds from the traditional manual inspection or fixed threshold lag; the system has strong generalization ability and modular scalability, and can adapt to chemical laboratories of different scales and different scenes, and provides reliable technical support for the transition from “passive response” to “active intelligent early warning” for laboratory safety management.
[0177] It should be noted that the embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part.
[0178] It should also be noted that the relationship terms such as first and second in the embodiments of the present application are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms “include”, “contain” or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment. Without more limitations, the element defined by the statement “including a” does not exclude the presence of another identical element in the process, method, article or equipment including the element.
[0179] The above description of disclosed embodiments enables one of ordinary skill in the art to make or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A chemical laboratory safety early warning method based on multi-source data analysis, characterized in that, include: S1. Collect multi-source data from the chemical laboratory, including environmental data, instrument and equipment data, reagent management data, sample management data, and personnel operation data; S2. Preprocess the multi-source data, including data cleaning, data standardization, and data association labeling based on time, space, and logical relationships, to form a multi-dimensional associated dataset; S3. Construct a composite risk identification model based on deep multi-metric learning, and use the multi-dimensional associated dataset to perform end-to-end training on the composite risk identification model in combination with adversarial sample augmentation strategy. The composite risk identification model includes: a deep feature extraction network for extracting nonlinear features from input data, and a deep multi-metric learning module consisting of multiple parallel and independent metric learners connected thereto; the multiple metric learners perform specific metric learning on different sub-feature groups of the nonlinear features to capture local patterns of composite risks. The end-to-end training of the composite risk identification model includes: Constructing a training sample set: Extract data windows that are temporally associated with historical safety incidents from the multi-dimensional associated dataset to construct labeled incident samples, and generate synthetic samples simulating risk scenarios according to preset risk rules, which together constitute a risk-labeled training sample set; Dynamic adversarial sample augmentation: In each training iteration, for each metric learner currently being trained, the adversarial hard negative sample generation module adds specific perturbations to the original negative samples to generate hard negative samples, thereby reducing the correlation between different metric learners. Joint backpropagation optimization: Taking the joint loss function as the optimization objective, the trainable parameters of the deep feature extraction network, all metric learners in the deep multi-metric learning module, and the perturbation generator in the adversarial hard negative sample generation module are updated synchronously through the backpropagation algorithm. S4. A sequential sampling heuristic optimization algorithm based on the Pareto principle is used to automatically and globally optimize the key parameters in the composite risk identification model. S5. Collect and integrate multi-source data in real time, input the optimized composite risk identification model for risk matching analysis, determine the risk level based on the output risk matching degree, and trigger the early warning information corresponding to the risk level.
2. The chemical laboratory safety early warning method based on multi-source data analysis according to claim 1, characterized in that, In step S1, the environmental data includes temperature, humidity, concentration of harmful gases, smoke concentration, and water and electricity parameters; The data from the instruments and equipment includes operating status, operation logs, fault and maintenance records; The reagent management data includes information on reagent procurement, warehousing, storage, requisition, use, and disposal. The sample management data includes information on sample registration, storage, requisition, consumption, return to the warehouse, and processing. The personnel operation data includes personnel entry and exit records, operation compliance records, safety training records, and violation operation records.
3. The chemical laboratory safety early warning method based on multi-source data analysis according to claim 1, characterized in that, In step S2, the data cleaning includes removing outliers using the 3σ criterion and imputing or marking missing values; the data standardization includes establishing a unified data dictionary and uniformly converting the units and time formats of multi-source data. The data association annotation includes: associating multiple types of data from the same time period, the same region, or with logical relationships with the multi-source data after data cleaning and standardization to form a multi-dimensional associated dataset.
4. The chemical laboratory safety early warning method based on multi-source data analysis according to claim 1, characterized in that, In step S3, the deep feature extraction network is a residual convolutional neural network with a multi-scale receptive field, which includes multiple residual blocks connected in sequence; wherein, at least some residual blocks are configured with different convolutional kernel scales, for synchronously extracting local dependency features of different time spans from the time series data in the multi-dimensional associated dataset; the end of the network is provided with a global average pooling layer, for outputting a feature vector of fixed dimensions. The deep multi-metric learning module is used to divide the extracted feature vectors into multiple non-overlapping sub-feature groups, and configure an independent metric learner for each sub-feature group. Each metric learner is based on Mahalanobis distance, learns a transformation matrix to map the corresponding sub-feature group to the embedding space, and calculates the metric distance between samples.
5. The chemical laboratory safety early warning method based on multi-source data analysis according to claim 1, characterized in that, The dynamic adversarial sample enhancement specifically includes: For the k-th metric learner currently being trained, an anchor sample and an original negative sample are selected. A specific perturbation signal is calculated using a corresponding perturbation generator. The perturbation signal is then added to the original negative sample with a controlled amplitude to synthesize a difficult negative sample. The perturbation generator is trained to optimize for the following objective: reducing the distance between the hard negative sample and the feature representation of the anchor sample in the feature embedding space of the current metric learner, while increasing the distance between the hard negative sample and the feature representation of the original negative sample.
6. The chemical laboratory safety early warning method based on multi-source data analysis according to claim 1, characterized in that, The joint loss function is a weighted sum of a metric loss function and an auxiliary Softmax classification loss function: the metric loss function is constructed based on the lifting structure loss and is used to optimize the model based on the distance between sample pairs on each metric learner, so that the distance between similar risk samples is shortened and the distance between dissimilar risk samples is widened; the auxiliary Softmax classification loss is used to prevent metric space degradation and ensure that the optimization direction is consistent with the risk classification task.
7. The chemical laboratory safety early warning method based on multi-source data analysis according to claim 1, characterized in that, In step S4, the execution process of the Pareto principle-based sequential sampling heuristic optimization algorithm includes: S41. Initialize algorithm parameters and define the parameter search domain; S42. Use Monte Carlo sampling to generate an initial population within the parameter search domain; S43. Perform iterative optimization: Calculate the fitness of each parameter combination in the current population and determine the current optimal solution; if the current optimal solution is better than the historical optimal solution, update the dominant search domain centered on the current optimal solution, and the bandwidth of the dominant search domain is dynamically tightened as the number of iterations increases; generate a new population, and for each parameter, sample from the dominant search domain with probability α and sample from the global parameter search domain with probability 1-α. S44. When the maximum number of iterations is reached or the fitness meets the preset threshold, the optimization is terminated, and the optimal parameter combination is output for configuring the composite risk identification model.
8. The chemical laboratory safety early warning method based on multi-source data analysis according to claim 1, characterized in that, In step S5, the risk level includes at least negligible risk, controllable acceptable risk, undesirable risk, and unacceptable risk; the warning information is simultaneously released through the laboratory's local audible and visual alarm device, the mobile terminal of the management personnel, and the central management platform, and the warning information includes the risk type, level, location, related data index, and handling suggestions.
9. A chemical laboratory safety early warning system based on multi-source data analysis, characterized in that, include: The data acquisition module is used to collect multi-source data from the chemical laboratory, including environmental data, instrument and equipment data, reagent management data, sample management data, and personnel operation data. The data preprocessing module is used to preprocess the multi-source data, including data cleaning, data standardization, and data association annotation based on time, space, and logical relationships, to form a multi-dimensional associated dataset; The model building module is used to build a composite risk identification model based on deep multi-metric learning, and to perform end-to-end training of the composite risk identification model using the multi-dimensional associated dataset and adversarial sample augmentation strategy. The composite risk identification model includes: a deep feature extraction network for extracting nonlinear features from input data, and a deep multi-metric learning module consisting of multiple parallel and independent metric learners connected thereto; the multiple metric learners perform specific metric learning on different sub-feature groups of the nonlinear features to capture local patterns of composite risks. The end-to-end training of the composite risk identification model includes: Constructing a training sample set: Extract data windows that are temporally associated with historical safety incidents from the multi-dimensional associated dataset to construct labeled incident samples, and generate synthetic samples simulating risk scenarios according to preset risk rules, which together constitute a risk-labeled training sample set; Dynamic adversarial sample augmentation: In each training iteration, for each metric learner currently being trained, the adversarial hard negative sample generation module adds specific perturbations to the original negative samples to generate hard negative samples, thereby reducing the correlation between different metric learners. Joint backpropagation optimization: Taking the joint loss function as the optimization objective, the trainable parameters of the deep feature extraction network, all metric learners in the deep multi-metric learning module, and the perturbation generator in the adversarial hard negative sample generation module are updated synchronously through the backpropagation algorithm. The model optimization module is used to automatically and globally optimize the key parameters in the composite risk identification model using a sequential sampling heuristic optimization algorithm based on the Pareto principle. The risk warning module is used to input multi-source data collected in real time and fused together into the optimized composite risk identification model for risk matching analysis, determine the risk level based on the output risk matching degree, and trigger warning information corresponding to the risk level.
Citation Information
Patent Citations
Laboratory instrument management system based on artificial intelligence
CN120493118A
Hazardous chemical substance transportation risk prediction system and method based on big data analysis
CN120634225A