Gas hazard prediction method fusing multi-sensor data

By using dynamic time warping algorithm and game theory model to time align and weight multi-sensor data, combined with a multi-layer time series prediction network, the problem of sensor data inconsistency is solved, and efficient and stable prediction of gas detection systems in complex environments is achieved.

CN120748530AInactive Publication Date: 2025-10-03BEIJING ZHONGDING YUANCHENG TECHNOLOGY DEVELOPMENT CO LTD

Patent Information

Application Number
CN202510831527.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-10-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In existing gas detection systems, differences in response speed, sampling frequency, and stability among various types of sensors lead to inconsistent data on the timeline and inability to effectively align them. This is especially true in scenarios of rapid gas leakage or sudden changes in concentration. The prediction model makes judgments with lags or errors, and the static weighted fusion method cannot adapt to sudden interference and abnormal signals, affecting the robustness and reliability of the system.

Method used

An improved dynamic time warping algorithm is used to time-align multi-type sensor data. A game theory model is used to dynamically evaluate sensor credibility and adjust weights. A multi-layer time series prediction network with an attention mechanism is used to predict gas concentration and generate visual gas diffusion heat maps and decision-making assistance suggestions.

Benefits of technology

It achieves high-precision synchronous fusion of multi-source data in scenarios of rapid gas diffusion or sudden leakage, improves response speed and timing modeling accuracy, and enhances the system's robustness and predictive stability in the face of complex interference and hardware changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120748530A_ABST
    Figure CN120748530A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of toxic gas detection, and discloses a gas hazard prediction method fusing multi-sensor data, which comprises the following steps: step 1, collecting original environment data from various heterogeneous sensors in a target area; step 2, carrying out time alignment processing on the original environment data by adopting an improved dynamic time warping algorithm, so that multiple types of sensor data are aligned on a unified event timeline; and step 3, performing perception conflict detection based on the aligned data, judging whether the output of the plurality of groups of sensors has trend difference or not, when the difference exists, constructing a confrontation revenue function, and using each sensor as a strategy participant by using a game theory model. According to the technical scheme, the improved dynamic time warping algorithm is adopted to carry out event-level time alignment on multi-class heterogeneous sensor data, and the technical effect of realizing high-precision synchronous fusion of multi-source data in a gas rapid diffusion or sudden leakage scene is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of poisonous gas detection, and in particular to a gas hazard prediction method that fuses multi-sensor data. Background Art

[0002] The growth and leakage of toxic gases often lead to economic losses and environmental damage. Therefore, real-time monitoring of the growth or leakage of toxic gases is very important for maintaining production environment safety and environmental protection.

[0003] At present, gas sensors are often used to monitor the growth and leakage of toxic gases. However, in harsh environments such as underground pipelines, sensors are prone to failure and errors, making the data generated by the sensors uncertain. As a result, traditional toxic gas prediction models are unable to distinguish the growth or leakage of toxic gases.

[0004] For example, the Chinese invention application with publication number CN118747345A discloses a method for predicting gas hazards by fusing multi-sensor data, comprising: obtaining gas acquisition data from sensor nodes, standardizing the gas acquisition data to obtain standardized data; constructing a gas identification framework for the sensor nodes, and constructing a basic confidence function based on the gas identification framework; performing a confidence combination operation on the gas identification framework of the sensor nodes using a preset combination rule to obtain a sensor node combined confidence; filtering abnormal nodes in the sensor nodes based on the sensor node combined confidence, and performing gas hazard prediction using a preset fusion model to obtain a gas hazard prediction result. The present invention proposes a gas hazard prediction device, equipment, and storage medium that fuses multi-sensor data. The present invention can improve the efficiency of gas hazard prediction by fusing multi-sensor data.

[0005] For example, the Chinese invention application with publication number CN110836954B discloses a toxic gas leakage hazard prediction system and method based on PLC control. The prediction system includes a gas concentration acquisition module, an atmospheric stability acquisition module and a prediction model evaluation module. The gas concentration acquisition module and the atmospheric stability acquisition module are both connected to the prediction model evaluation module. The gas concentration acquisition module is used to obtain gas concentration parameters, and the atmospheric stability acquisition module is used to obtain atmospheric stability parameters. The prediction model evaluation module predicts and evaluates the toxic gas leakage hazards based on the gas concentration parameters and the atmospheric stability parameters. The gas concentration acquisition module includes a main collection point generation module, a first auxiliary collection point generation module, a second auxiliary collection point generation module, a timing module, a gas concentration collection module, a concentration average value comparison module, a gas concentration first parameter output module, a concentration change value calculation module, and a concentration change value comparison module.

[0006] The shortcomings of the above patents are:

[0007] Existing gas detection systems typically deploy multiple sensor types simultaneously. These sensors vary in response speed, sampling frequency, and stability, easily leading to inconsistent data across timelines. When asynchronous data is used for unified gas diffusion trend modeling, the timing information cannot be effectively aligned. This can lead to delays or even errors in the prediction model's assessment of actual diffusion trends, particularly in scenarios with rapid gas leaks or sudden concentration changes, reducing system accuracy and response speed.

[0008] During a gas leak, multiple sensors may simultaneously provide conflicting data due to differences in their environment, installation location, or state. For example, one sensor may detect a sharp increase in concentration while others remain stable. Existing systems often use static weighting or fixed rules for data fusion, lacking a mechanism for dynamically assessing and adjusting the credibility of sensor data. This rigid fusion approach is unable to adapt to sudden interference, abnormal signals, or false alarm triggering, thus compromising the robustness and reliability of the system in practical applications.

[0009] To this end, the present invention proposes a gas hazard prediction method that integrates multi-sensor data to solve the above-mentioned problems. Summary of the Invention

[0010] In view of the shortcomings of the existing technology, the present invention provides a gas hazard prediction method that integrates multi-sensor data to solve the problems raised in the above background technology.

[0011] To achieve the above objectives, the present invention is implemented through the following technical solutions: A gas hazard prediction method integrating multi-sensor data, comprising:

[0012] Step 1: Collect raw environmental data from multiple types of heterogeneous sensors in the target area;

[0013] Step 2: Using an improved dynamic time warping algorithm to perform time alignment processing on the raw environmental data, so that multiple types of sensor data are aligned on a unified event timeline;

[0014] Step 3: Perform sensor conflict detection based on the aligned data to determine whether there are trend differences in the outputs of multiple sensor groups. If there are differences, construct an adversarial payoff function and use a game theory model to treat each sensor as a strategic participant. The optimal decision weight of each participant is solved through Nash equilibrium.

[0015] Step 4: Input the fused data into the gas hazard prediction model to output the gas risk level of the current environment and the future estimated gas diffusion trend;

[0016] Step 5, iteratively optimizing the window parameters and the adversarial reward function parameters in the dynamic time warping algorithm based on the error between the actual feedback result and the historical prediction result;

[0017] Step 6: Update the system configuration parameters based on the optimization results, and output a visualized gas diffusion heat map and decision-making assistance suggestions.

[0018] Preferably, the step 1 further comprises:

[0019] Sub-step 1.1, initialize the sensor network and set sampling configuration parameters;

[0020] Set the initial operating parameters of the infrared gas concentration sensor, electrochemical detector, temperature and humidity sensor, and wind speed sensor, including the sampling period T i , response delay τ i and measurement accuracy σ i ,where i is the sensor number;

[0021] According to the regional layout, a multi-point sampling node set S = {s1, s2, ..., s i}, sampling node s i Corresponding to specific sensor types and environmental monitoring locations;

[0022] Sub-step 1.2: execute synchronous sampling request according to sensor configuration and record raw time series data;

[0023] After the unified sampling instruction is triggered, each node s i According to the configured sampling period T i Collect the environment variable value x at the current time point i (t), forming the original data sequence x i :

[0024] x i ={x i (t0),x i (t0+T i ),...,x i (t0+mT i )},

[0025] Among them, x i (t0), x i (t0+T i ), x i (t0+mT i ) are nodes s i At time t0, t0+T i t0+mT i The environmental variables collected at , m is the number of sampling points of the sensor;

[0026] Sub-step 1.3: perform data validity judgment and interference elimination processing to screen available data segments;

[0027] For each original time series x i Validity judgment is performed, and a sliding window mean-variance model is used for preliminary filtering. The judgment criteria are as follows:

[0028] Assume that the sliding window length is w, at any time t k , calculate the local mean μ within the window i (t k ) and standard deviation σ i (t k ):

[0029]

[0030] Among them, t k is the current time point, j is the sub-time point number in the sliding window;

[0031] Determine whether the sampled value is within the credible range. If so:

[0032] |x i (t k )-μ i (t k )|>θ·σ i (t k ), the sampling points are marked as outliers,

[0033] Where θ is a configurable confidence threshold parameter;

[0034] All data points that meet the above conditions constitute a valid sampling data set It is the valid sampling data sequence retained after anomaly detection for subsequent time alignment processing;

[0035] If the sensor is abnormal within M consecutive windows, the diagnostic module is triggered to record that the sensor is in an abnormal working state.

[0036] Preferably, the step 2 further comprises:

[0037] Sub-step 2.1, based on the valid dataset selected in step 1 Calculate the similarity score matrix D between multiple groups of time series;

[0038] Define the Euclidean distance metric between time series:

[0039] For any time series and

[0040] At the time point (t k ,t l ) on the local distance d ij (t k ,t l ) is expressed as:

[0041]

[0042] Construct the initial similarity matrix D:

[0043] Assume T i and T j is the set of sampling time points of the time series, and the matrix D is defined as:

[0044] D={d ij (t k ,t l )|t k ∈T i ,t l ∈T j},

[0045] Among them, d ij Quantify the difference in data at a time point. is the effective time series data of the i-th sensor, x j (t l ) is the jth sensor at time point t l The sampling value of x i (t k ) is the i-th sensor at time point t k The sampling value of is the effective time series data of the jth sensor, T i is the time sampling point set of the i-th sensor, T j is the set of time sampling points of the jth sensor, D is the similarity distance matrix,

[0046] d ij (t k ,t l ) is the time point t between the i-th and j-th sensors k With t l The Euclidean distance metric of the difference in sample values;

[0047] Sub-step 2.2: Based on the distance matrix D in sub-step 2.1, use dynamic programming technology to search for the best regularized path P, and the optimal matching solution for mapping multi-source heterogeneous time series to a unified timeline;

[0048] Cumulative cost function definition:

[0049] Assume that the time point pair (t k ,t l) has a cumulative cost of C ij (t k ,t l ), the recursive relationship is:

[0050]

[0051] The initial conditions are:

[0052] C ij (t1,t1)=d ij (t1,t1),

[0053] Search for the best alignment path P: trace back from the end of matrix D to the starting point to find the path with the minimum cumulative cost:

[0054] P={(t k ,t l )∣minimize

[0055] Where P is the dynamic time warping path;

[0056] Sub-step 2.3: Based on the optimal alignment path obtained in sub-step 2.2, all time series are fused using a weighted strategy to form a joint input dataset X with time synchronization characteristics. sync ;

[0057] Weighted fusion formula:

[0058] Aligned data points At time t k The weighted value is:

[0059]

[0060] Among them, w i is the data weight of sensor i;

[0061] Generate joint dataset X sync :

[0062]

[0063] in, is the time point t after multi-sensor weighted average fusion k The data value above.

[0064] Preferably, the step 3 further comprises:

[0065] Sub-step 3.1: Perform trend consistency measurement and construct conflict determination indicators

[0066] Based on the time-aligned dataset X generated in step 2 sync, extract the original output data of each sensor on the same time axis Calculate the consistency score η of each sensor relative to the overall trend i ;

[0067] Define the sensor trend vector: for each sensor i, in the time window Construct the local differential trend vector:

[0068] Δx i =[x i (t2)-x i (t1),x i (t3)-x i (t2),...,x i (t K )-x i (t K-1 )],

[0069] Construct a fused trend vector as a baseline:

[0070]

[0071] Calculate cosine similarity as a consistency indicator:

[0072]

[0073] Where Δx i is the output increment sequence of sensor i at consecutive time points, is the unified time series x obtained by aligning and fusion sync The local difference trend, η i For sensor i and overall trend The cosine similarity of is the time point t after multi-sensor weighted average fusion k The data value on x i (t k ) is the i-th sensor at time point t k The sampling value of

[0074] Set the conflict determination threshold θ c , determine whether there is a perception conflict:

[0075] If there exists a sensor i that satisfies η i <θ c , where θ c To set a threshold, determine that a perception conflict exists, and trigger the adversarial modeling in sub-step 3.2;

[0076] Sub-step 3.2, construct the sensor adversarial benefit function and model the weighted competition behavior;

[0077] When a conflict is detected in sub-step 3.1, that is, η i Below the threshold θ c , then construct the profit function U for each sensor i (w i ), which is used to describe the level of benefits in the data fusion process and based on which the game process is defined;

[0078] Define the adversarial payoff function:

[0079] Among them, w i is the assigned weight of sensor i, η i For sensor i and overall trend The cosine similarity of ,λ is the penalty factor for controlling deviation from the average weight, Average weight for all sensors;

[0080] Game modeling goal: On the sensor set S = {1,2,...,n}, construct a non-cooperative game model G = (S, {U i (w i )}), each sensor selection strategy w i To maximize one's own benefits U i ;

[0081] Sub-step 3.3, solve Nash equilibrium to determine the optimal sensor weight distribution. Based on the non-cooperative game model G in sub-step 3.2, find the Nash equilibrium of the payoff function of all sensors and determine the optimal weight of each sensor. Used to guide weighted calculations in the data fusion phase;

[0082] Definition of equilibrium condition: at Nash equilibrium point Next, meet:

[0083]

[0084] in, is the balancing strategy for all sensors except i, is the possible alternative strategy of sensor i under non-equilibrium state;

[0085] Solve constrained optimization based on Lagrange multiplier method:

[0086] Introducing constraints Define the Lagrangian function:

[0087]

[0088] Among them, L(w1,...,w n ,μ) is the Lagrangian objective function, U i (w i) is the adversarial reward function of sensor i, μ is the Lagrange multiplier;

[0089] For each w i and μ to find the partial derivative and solve the simultaneous equations to find the optimal solution

[0090] Weight update formula: When η i When >0, the final weight solution is approximately:

[0091] This formula shows that the final weight is proportional to the consistency score of the sensor, achieving dynamic adjustment.

[0092] Preferably, the step 4 further comprises:

[0093] Sub-step 4.1: Construct a time series modeling network for gas concentration prediction based on the fused data generated in step 3 Design a multi-layer time series prediction network with attention mechanism θ , used to estimate the gas concentration change trend in the future time period;

[0094] Define the input sequence window and prediction target: set the historical observation window length to w p , the prediction step is h, then the input sample at time t is:

[0095]

[0096] The prediction target is the gas concentration vector at the next time h:

[0097]

[0098] in, is the gas concentration value predicted at time t+h, X t is the historical input sequence, is the current fusion gas concentration value, predicting series for future concentrations;

[0099] Model structure design: Model f θ It includes an input layer, a bidirectional LSTM encoder, an attention layer, and a decoder module. The parameter set θ includes all weights and bias terms, and the training goal is to minimize the prediction error.

[0100] Sub-step 4.2, calculate the current gas risk level index and classify the output according to the prediction results in sub-step 4.1 With the current observation Define gas risk level classification rules based on concentration thresholds set by national safety standards;

[0101] Risk scoring function definition: Let the gas concentration safety threshold be x safe , the risk score function R(t) is expressed as:

[0102]

[0103] Among them, R(t) means the concentration has exceeded the standard;

[0104] Risk level classification standard: According to the size of the risk score R(t), the gas hazard level L(t) is divided into five levels:

[0105] Level 0, R(t)<0.2, safe;

[0106] Level 1, 0.2≤R(t)<0.5, slight risk;

[0107] Level 2, 0.5≤R(t)<0.8, moderate risk;

[0108] Level 3, 0.8≤R(t)<1.0, high risk;

[0109] Level 4, R(t) ≥ 1.0, serious exceeding of the standard alarm;

[0110] If any of the future prediction values ​​of satisfy Automatically trigger early warning signals;

[0111] Sub-step 4.3, generate a future diffusion trend map and output a predicted heat map;

[0112] Based on the future gas concentration series predicted in sub-step 4.1 Combined with the geographical distribution information of sensor nodes, a spatial diffusion trend map is generated;

[0113] Constructing a spatial interpolation grid: Assume that the sensor node position set is Each predicted value Mapped to geographic space points, inverse distance weighted interpolation is used to generate a two-dimensional concentration distribution map:

[0114] Among them, d i (x,y) represents the Euclidean distance from the grid point (x,y) to the i-th sensor, and p is the distance power exponent;

[0115] Generate time series heat map H(t+k): Generate a corresponding two-dimensional concentration heat map H(t+k) for each predicted time t+k, and output an animation or image sequence of h consecutive frames to represent the dynamic trend of future gas diffusion;

[0116] Joint output: The risk level L(t) and heat map H(t+k) are output to the decision module to provide a prediction credibility score to assist the dispatch system in implementing responses.

[0117] Preferably, the step 5 further comprises:

[0118] Sub-step 5.1, evaluate the forecast error and construct the error sensitivity matrix

[0119] Based on the prediction results generated in step 4 and the actual feedback observation value Construct a set of error metrics and a sensitivity matrix to guide subsequent parameter updates;

[0120] Define the prediction error vector: For each moment within the prediction step h, calculate the prediction error:

[0121]

[0122] Get the error vector: ε=[ε1,ε2,...,ε h ],

[0123] Construct the mean square error metric:

[0124] Among them, ε k is the k-th step prediction error, x real (t+k) is the actual gas concentration collected by the sensor at time t+k in the real environment, k is the prediction step index, h is the prediction step length, ε is the prediction error vector, MSE t is the mean square error,

[0125] is the prediction model f θ After inputting the historical sequence at time t, the predicted gas concentration value at the kth step in the future is obtained;

[0126] Construct the error sensitivity matrix S:

[0127] To associate error sources with model parameter configuration, set the sensitivity matrix element s ij is the parameter p j Forecast error ε i The partial derivative estimate of :

[0128]

[0129] Among them, p j is the parameter to be optimized in the model, is the partial derivative, s ij is the parameter p j For the i-th prediction error component ε i sensitivity;

[0130] Sub-step 5.2: Update the dynamic time warping window parameters to improve the alignment accuracy;

[0131] Based on the error sensitivity matrix in sub-step 5.1, identify the parameter dimensions that are strongly correlated with the error and focus on adjusting the time warping parameter ω to improve the accuracy of sequence alignment and subsequent prediction stability;

[0132] Define the update objective function: J align (ω)=MSE t +α·Var(η i ),

[0133] Among them, ω is the window half width, α is the balance term coefficient, Var(η i ) is the conflict degree of the aligned data, J align Optimize the objective function for alignment;

[0134] Optimize the ω parameter using gradient descent:

[0135] Based on the error sensitivity estimate s i,ω , iteratively update ω:

[0136]

[0137] Among them, γ is the learning rate parameter, ω (k+1) is the k+1th iteration value of the time warping window, ω (k) is the kth iteration value of the time warping window;

[0138] Sub-step 5.3, adjust the penalty factor in the adversarial reward function to optimize the fusion strategy

[0139] According to the sensor benefit function U in step 3 i (w i ), combined with the error feedback in sub-step 5.1, optimize the setting of the penalty factor λ;

[0140] Define the fusion strategy loss function:

[0141]

[0142] in, is the objective function for optimizing the fusion strategy, λ is the penalty factor for controlling the discreteness in the adversarial benefit function, and w i is the current weight of the i-th sensor, is the weight mean, β is the regularization control parameter;

[0143] Update the λ value based on the MSE gradient:

[0144] Estimate the gradient using error backpropagation:

[0145]

[0146] Among them, γ′ is the update step size, λ (k+1) is the k+1th iteration value of the penalty factor, λ (k) is the kth iteration value of the penalty factor.

[0147] Preferably, the step 6 further comprises:

[0148] Sub-step 6.1, system configuration parameter synchronization update mechanism

[0149] Based on the time warping window parameter ω* and adversarial penalty factor λ* optimized in step 5, update the core configuration of the gas prediction system involving data alignment and fusion strategies;

[0150] Build update parameter set: Define system configuration parameter set:

[0151] P sys ={ω,λ,θ,β},

[0152] Among them, ω is the half-width of the time alignment window, λ is the penalty term coefficient in the adversarial benefit function, θ is the gas prediction model parameter set, and β is the regularization term control coefficient of the fusion strategy;

[0153] Update strategy judgment condition: set threshold δ param represents the parameter stability convergence criterion, if:

[0154] The parameters are considered to have converged and the configuration is frozen.

[0155] Otherwise, continue to perform periodic updates and record the update logs of each iteration for subsequent audits;

[0156] Sub-step 6.2, generate the optimized spatial-temporal joint heat map output;

[0157] Based on the predicted heat map H(t+k) in step 4.3 and the high-precision prediction results generated by the optimized parameters in step 5, a multi-dimensional heat map output sequence is constructed to reflect the joint evolution trend of gas concentration changes in time and space;

[0158] Construct a three-dimensional time series heat map tensor: Define the heat map tensor:

[0159]

[0160] in, is the spatial distribution evolution trend, H(t+h) is the two-dimensional heat map at the prediction time t+h;

[0161] High-concentration cluster area marking judgment conditions: If a grid point (x, y) meets the following conditions within a continuous Δt period:

[0162] Marked as a high-risk gathering area;

[0163] Heatmap output format specification: Heatmap tensor Export to standard geographic information format with prediction error confidence interval graph For upper-level systems or platforms to call;

[0164] Sub-step 6.3, generating multi-strategy decision-making assistance recommendations;

[0165] Combining the high-risk area identification results in step 6.2 with the prediction error characteristics in step 5, a multi-strategy recommendation output module is designed to assist manual or automatic systems in responding effectively.

[0166] Construct response priority function: For high risk area R i , calculate the response priority score:

[0167]

[0168] Among them, A i is the area of ​​the risk region, is the maximum predicted concentration value in the region, D i is the predicted duration, w r 、w c 、w t Manually set weight coefficients;

[0169] If P i ≥P thresh , then the area will be included in the key disposal list;

[0170] Generate decision suggestion structure:

[0171] Output structured proposal set D suggest , contains the following fields:

[0172] zone id Number the risk areas;

[0173] start time 、end time Risk period

[0174] expected peak is the predicted maximum concentration;

[0175] response level is the suggested response level;

[0176] recommended action For specific suggestions;

[0177] Output format and interface specifications: Recommended set D suggest The data is output synchronously in JSON / XML dual formats. The interface supports real-time API calls and periodic message push modes, and is suitable for edge computing terminals and central scheduling systems.

[0178] Preferably, the heterogeneous sensors in step 1 include an infrared gas concentration sensor, an electrochemical gas detector, a temperature and humidity sensor, and a wind speed sensor;

[0179] The prediction result includes a risk level label and a diffusion trend curve, and the diffusion trend curve represents the spatial expansion distribution of gas concentration within a preset time range in the future.

[0180] Preferably, the feedback optimization includes calculating a prediction error index, and using the error as input to adjust the sliding window length in the dynamic time warping algorithm;

[0181] The feedback optimization further includes adjusting a consistency weight parameter in the adversarial reward function.

[0182] Preferably, the gas hazard prediction method can generate an optimization recommendation report after each step is completed, which is used to support on-site gas leakage response and equipment configuration adjustment decisions.

[0183] The present invention provides a gas hazard prediction method that integrates multi-sensor data. It has the following beneficial effects:

[0184] 1. The present invention adopts an improved dynamic time warping algorithm to perform event-level time alignment on multiple types of heterogeneous sensor data, achieving the technical effect of high-precision synchronous fusion of multi-source data in scenarios of rapid gas diffusion or sudden leakage. Compared with the time alignment solutions commonly used in the prior art, which use static time windows or interpolation resampling, this solution solves the problem of being unable to align in real time in a highly dynamic gas field environment, causing prediction delays and misjudgments, and effectively improves the model's response speed to abnormal mutation scenarios and the accuracy of time series modeling.

[0185] 2. The present invention adopts the perception conflict modeling based on game theory and the optimal decision weight calculation mechanism driven by the adversarial benefit function, so as to achieve the technical effect of dynamically evaluating the credibility and adaptively allocating the fusion weight when there are significant differences in the sensor output. Compared with the fixed weighting or rule-based fusion method used in the prior art, it solves the defect that the weights of abnormal signals and false triggering data cannot be dynamically adjusted, and significantly enhances the system's fusion robustness and prediction stability when facing complex interference and hardware status changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0186] Figure 1 Flowchart of the present invention. DETAILED DESCRIPTION

[0187] To help those skilled in the art understand the present invention, the following will provide a clear and complete description of the technical solutions in the embodiments of the present invention, in conjunction with the accompanying drawings. Obviously, the described embodiments are only partial embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0188] The present invention is described in detail below with reference to the accompanying drawings:

[0189] Example:

[0190] Please see the attached Figure 1 The embodiment of the present invention provides a gas hazard prediction method by fusing multi-sensor data, comprising:

[0191] Step 1: Collect raw environmental data from multiple types of heterogeneous sensors in the target area;

[0192] Sub-step 1.1, initialize the sensor network and set sampling configuration parameters;

[0193] Set the initial operating parameters of the infrared gas concentration sensor, electrochemical detector, temperature and humidity sensor, and wind speed sensor, including the sampling period T i , response delay τ i and measurement accuracy σ i ,where i is the sensor number;

[0194] According to the regional layout, a multi-point sampling node set S = {s1, s2, ..., s i}, sampling node s i Corresponding to specific sensor types and environmental monitoring locations;

[0195] Sub-step 1.2: execute synchronous sampling request according to sensor configuration and record raw time series data;

[0196] After the unified sampling instruction is triggered, each node s i According to the configured sampling period T i Collect the environment variable value x at the current time point i (t), forming the original data sequence x i :

[0197] x i ={x i (t0),x i (t0+T i ),...,xi (t0+mT i )},

[0198] Among them, x i (t0), x i (t0+T i ), x i (t0+mT i ) are nodes s i At time t0, t0+T i t0+mT i The environmental variables collected at , m is the number of sampling points of the sensor;

[0199] Sub-step 1.3: perform data validity judgment and interference elimination processing to screen available data segments;

[0200] For each original time series x i Validity judgment is performed, and a sliding window mean-variance model is used for preliminary filtering. The judgment criteria are as follows:

[0201] Assume that the sliding window length is w, at any time t k , calculate the local mean μ within the window i (t k ) and standard deviation σ i (t k ):

[0202]

[0203] Among them, t k is the current time point, j is the sub-time point number in the sliding window;

[0204] Determine whether the sampled value is within the credible range. If so:

[0205] |x i (t k )-μ i (t k )|>θ·σ i (t k ), the sampling points are marked as outliers,

[0206] Where θ is a configurable confidence threshold parameter;

[0207] All data points that meet the above conditions constitute a valid sampling data set It is the valid sampling data sequence retained after anomaly detection for subsequent time alignment processing;

[0208] If the sensor is abnormal within M consecutive windows, the diagnostic module is triggered to record the sensor as abnormal working state;

[0209] Step 2: Use the improved dynamic time warping algorithm to perform time alignment on the original environmental data, so that the multi-type sensor data are aligned on the unified event timeline;

[0210] Sub-step 2.1, based on the valid dataset selected in step 1 Calculate the similarity score matrix D between multiple groups of time series;

[0211] Define the Euclidean distance metric between time series:

[0212] For any time series and

[0213] At the time point (t k ,t l ) on the local distance d ij (t k ,t l ) is expressed as:

[0214]

[0215] Construct the initial similarity matrix D:

[0216] Assume T i and T j is the set of sampling time points of the time series, and the matrix D is defined as:

[0217] D={d ij (t k ,t l )|t k ∈T i ,t l ∈T j},

[0218] Among them, d ij Quantify the difference in data at a time point. is the effective time series data of the i-th sensor, x j (t l ) is the jth sensor at time point t l The sampling value of x i (t k ) is the i-th sensor at time point t k The sampling value of is the effective time series data of the jth sensor, T i is the time sampling point set of the i-th sensor, T j is the set of time sampling points of the jth sensor, D is the similarity distance matrix,

[0219] dij (t k ,t l ) is the time point t between the i-th and j-th sensors k With t l The Euclidean distance metric of the difference in sample values;

[0220] Sub-step 2.2: Based on the distance matrix D in sub-step 2.1, use dynamic programming technology to search for the best regularized path P, and the optimal matching solution for mapping multi-source heterogeneous time series to a unified timeline;

[0221] Cumulative cost function definition:

[0222] Assume that the time point pair (t k ,t l ) has a cumulative cost of C ij (t k ,t l ), the recursive relationship is:

[0223]

[0224] The initial conditions are:

[0225] C ij (t1,t1)=d ij (t1,t1),

[0226] Search for the best alignment path P: trace back from the end of matrix D to the starting point to find the path with the minimum cumulative cost:

[0227] P={(t k ,t l )∣minimize

[0228] Where P is the dynamic time warping path;

[0229] Sub-step 2.3, based on the optimal alignment path obtained in sub-step 2.2, all time series are fused using a weighted strategy to form a joint input dataset x with time synchronization characteristics. sync ;

[0230] Weighted fusion formula:

[0231] Aligned data points At time t k The weighted value is:

[0232]

[0233] Among them, w i is the data weight of sensor i;

[0234] Generate joint dataset xsync :

[0235]

[0236] in, is the time point t after multi-sensor weighted average fusion k The data value on ;

[0237] Step 3: Perform sensor conflict detection based on the aligned data to determine whether there are trend differences in the outputs of multiple sensor groups. If there are differences, construct an adversarial payoff function and use a game theory model to treat each sensor as a strategic participant. The optimal decision weight of each participant is solved through Nash equilibrium.

[0238] Sub-step 3.1: Perform trend consistency measurement and construct conflict determination indicators

[0239] According to the time-aligned dataset x generated in step 2 sync , extract the original output data of each sensor on the same time axis Calculate the consistency score η of each sensor relative to the overall trend i ;

[0240] Define the sensor trend vector: for each sensor i, in the time window Construct the local differential trend vector:

[0241] Δx i =[x i (t2)-x i (t1),x i (t3)-x i (t2),...,x i (t K )-x i (t K-1 )],

[0242] Construct a fused trend vector as a baseline:

[0243]

[0244] Calculate cosine similarity as a consistency indicator:

[0245]

[0246] Where Δx i is the output increment sequence of sensor i at consecutive time points, is the unified time series x obtained by aligning and fusion sync The local difference trend, η i For sensor i and overall trend The cosine similarity of is the time point t after multi-sensor weighted average fusion k The data value on x i (t k ) is the i-th sensor at time point t k The sampling value of

[0247] Set the conflict determination threshold θ c , determine whether there is a perception conflict:

[0248] If there exists a sensor i that satisfies η i <θ c , where θ c To set a threshold, determine that a perception conflict exists, and trigger the adversarial modeling in sub-step 3.2;

[0249] Sub-step 3.2, construct the sensor adversarial benefit function and model the weighted competition behavior;

[0250] When a conflict is detected in sub-step 3.1, that is, η i Below the threshold θ c , then construct the profit function U for each sensor i (w i ), which is used to describe the level of benefits in the data fusion process and based on which the game process is defined;

[0251] Define the adversarial payoff function:

[0252] Among them, w i is the assigned weight of sensor i, η i For sensor i and overall trend The cosine similarity of ,λ is the penalty factor for controlling deviation from the average weight, Average weight for all sensors;

[0253] Game modeling goal: On the sensor set S = {1,2,...,n}, construct a non-cooperative game model G = (S, {U i (w i )}), each sensor selection strategy w i To maximize one's own benefits U i ;

[0254] Sub-step 3.3, solve Nash equilibrium to determine the optimal sensor weight distribution. Based on the non-cooperative game model G in sub-step 3.2, find the Nash equilibrium of the payoff function of all sensors and determine the optimal weight of each sensor. Used to guide weighted calculations in the data fusion phase;

[0255] Definition of equilibrium condition: at Nash equilibrium point Next, meet:

[0256]

[0257] in, is the balancing strategy for all sensors except i, is the possible alternative strategy of sensor i under non-equilibrium state;

[0258] Solve constrained optimization based on Lagrange multiplier method:

[0259] Introducing constraints Define the Lagrangian function:

[0260]

[0261] Among them, L(w1,...,w n ,μ) is the Lagrangian objective function, U i (w i ) is the adversarial reward function of sensor i, μ is the Lagrange multiplier;

[0262] For each w i and μ to find the partial derivative and solve the simultaneous equations to find the optimal solution

[0263] Weight update formula: When η i When >0, the final weight solution is approximately:

[0264] This formula shows that the final weight is proportional to the consistency score of the sensor, achieving dynamic adjustment;

[0265] Step 4: Input the fused data into the gas hazard prediction model to output the gas risk level of the current environment and the future estimated gas diffusion trend;

[0266] Sub-step 4.1: Construct a time series modeling network for gas concentration prediction based on the fused data generated in step 3 Design a multi-layer time series prediction network with attention mechanism θ , used to estimate the gas concentration change trend in the future time period;

[0267] Define the input sequence window and prediction target: set the historical observation window length to w p , the prediction step is h, then the input sample at time t is:

[0268]

[0269] The prediction target is the gas concentration vector at the next time h:

[0270]

[0271] in, is the gas concentration value predicted at time t+h, X t is the historical input sequence, is the current fusion gas concentration value, predicting series for future concentrations;

[0272] Model structure design: Model f θ It includes an input layer, a bidirectional LSTM encoder, an attention layer, and a decoder module. The parameter set θ includes all weights and bias terms, and the training goal is to minimize the prediction error.

[0273] Sub-step 4.2, calculate the current gas risk level index and classify the output according to the prediction results in sub-step 4.1 With the current observation Define gas risk level classification rules based on concentration thresholds set by national safety standards;

[0274] Risk scoring function definition: Let the gas concentration safety threshold be x safe , the risk score function R(t) is expressed as:

[0275]

[0276] Among them, R(t) means the concentration has exceeded the standard;

[0277] Risk level classification standard: According to the size of the risk score R(t), the gas hazard level L(t) is divided into five levels:

[0278] Level 0, R(t)<0.2, safe;

[0279] Level 1, 0.2≤R(t)<0.5, slight risk;

[0280] Level 2, 0.5≤R(t)<0.8, moderate risk;

[0281] Level 3, 0.8≤R(t)<1.0, high risk;

[0282] Level 4, R(t) ≥ 1.0, serious exceeding of the standard alarm;

[0283] If any of the future prediction values ​​of satisfy Automatically trigger early warning signals;

[0284] Sub-step 4.3, generate a future diffusion trend map and output a predicted heat map;

[0285] Based on the future gas concentration series predicted in sub-step 4.1 Combined with the geographical distribution information of sensor nodes, a spatial diffusion trend map is generated;

[0286] Constructing a spatial interpolation grid: Assume that the sensor node position set is Each predicted value Mapped to geographic space points, inverse distance weighted interpolation is used to generate a two-dimensional concentration distribution map:

[0287] Among them, d i (x,y) represents the Euclidean distance from the grid point (x,y) to the i-th sensor, and p is the distance power exponent;

[0288] Generate time series heat map H(t+k): Generate a corresponding two-dimensional concentration heat map H(t+k) for each predicted time t+k, and output an animation or image sequence of h consecutive frames to represent the dynamic trend of future gas diffusion;

[0289] Joint output: The risk level L(t) and heat map H(t+k) are output to the decision module to provide a prediction credibility score to assist the dispatch system in implementing responses;

[0290] Step 5: Based on the error between the actual feedback results and the historical prediction results, iteratively optimize the window parameters and the adversarial reward function parameters in the dynamic time warping algorithm;

[0291] Sub-step 5.1, evaluate the forecast error and construct the error sensitivity matrix

[0292] Based on the prediction results generated in step 4 and the actual feedback observation value Construct a set of error metrics and a sensitivity matrix to guide subsequent parameter updates;

[0293] Define the prediction error vector: For each moment within the prediction step h, calculate the prediction error:

[0294]

[0295] Get the error vector: ε=[ε1,ε2,...,ε h ],

[0296] Construct the mean square error metric:

[0297] Among them, ε k is the k-th step prediction error, x real (t+k) is the actual gas concentration collected by the sensor at time t+k in the real environment, k is the prediction step index, h is the prediction step length, ε is the prediction error vector, MSE t is the mean square error,

[0298] is the prediction model f θ After inputting the historical sequence at time t, the predicted gas concentration value at the kth step in the future is obtained;

[0299] Construct the error sensitivity matrix S:

[0300] To associate error sources with model parameter configuration, set the sensitivity matrix element s ij is the parameter p j Forecast error ε i The partial derivative estimate of :

[0301]

[0302] Among them, p j is the parameter to be optimized in the model, is the partial derivative, s ij is the parameter p j For the i-th prediction error component ε i sensitivity;

[0303] Sub-step 5.2: Update the dynamic time warping window parameters to improve the alignment accuracy;

[0304] Based on the error sensitivity matrix in sub-step 5.1, identify the parameter dimensions that are strongly correlated with the error and focus on adjusting the time warping parameter ω to improve the accuracy of sequence alignment and subsequent prediction stability;

[0305] Define the update objective function: J align (ω)=MSE t +α·Var(η i ),

[0306] Among them, ω is the window half width, α is the balance term coefficient, Var(η i ) is the conflict degree of the aligned data, J align Optimize the objective function for alignment;

[0307] Optimize the ω parameter using gradient descent:

[0308] Based on the error sensitivity estimate s i,ω , iteratively update ω:

[0309]

[0310] Among them, γ is the learning rate parameter, ω (k+1) is the k+1th iteration value of the time warping window, ω (k) is the kth iteration value of the time warping window;

[0311] Sub-step 5.3, adjust the penalty factor in the adversarial reward function to optimize the fusion strategy

[0312] According to the sensor benefit function U in step 3 i (w i ), combined with the error feedback in sub-step 5.1, optimize the setting of the penalty factor λ;

[0313] Define the fusion strategy loss function:

[0314]

[0315] in, is the objective function for optimizing the fusion strategy, λ is the penalty factor for controlling the discreteness in the adversarial benefit function, and w i is the current weight of the i-th sensor, is the weight mean, β is the regularization control parameter;

[0316] Update the λ value based on the MSE gradient:

[0317] Estimate the gradient using error backpropagation:

[0318]

[0319] Among them, γ′ is the update step size, λ (k+1) is the k+1th iteration value of the penalty factor, λ (k) is the kth iteration value of the penalty factor;

[0320] Step 6: Update system configuration parameters based on the optimization results, and output a visualized gas diffusion heat map and decision-making assistance suggestions;

[0321] Sub-step 6.1, system configuration parameter synchronization update mechanism

[0322] Based on the time warping window parameter ω* and adversarial penalty factor λ* optimized in step 5, update the core configuration of the gas prediction system involving data alignment and fusion strategies;

[0323] Build update parameter set: Define system configuration parameter set:

[0324] P sys ={ω,λ,θ,β},

[0325] Among them, ω is the half-width of the time alignment window, λ is the penalty term coefficient in the adversarial benefit function, θ is the gas prediction model parameter set, and β is the regularization term control coefficient of the fusion strategy;

[0326] Update strategy judgment condition: set threshold δ param represents the parameter stability convergence criterion, if:

[0327] The parameters are considered to have converged and the configuration is frozen.

[0328] Otherwise, continue to perform periodic updates and record the update logs of each iteration for subsequent audits;

[0329] Sub-step 6.2, generate the optimized spatial-temporal joint heat map output;

[0330] Based on the predicted heat map H(t+k) in step 4.3 and the high-precision prediction results generated by the optimized parameters in step 5, a multi-dimensional heat map output sequence is constructed to reflect the joint evolution trend of gas concentration changes in time and space;

[0331] Construct a three-dimensional time series heat map tensor: Define the heat map tensor:

[0332]

[0333] in, is the spatial distribution evolution trend, H(t+h) is the two-dimensional heat map at the prediction time t+h;

[0334] High-concentration cluster area marking judgment conditions: If a grid point (x, y) meets the following conditions within a continuous Δt period:

[0335] Marked as a high-risk gathering area;

[0336] Heatmap output format specification: Heatmap tensor Export to standard geographic information format with prediction error confidence interval graph For upper-level systems or platforms to call;

[0337] Sub-step 6.3, generating multi-strategy decision-making assistance recommendations;

[0338] Combining the high-risk area identification results in step 6.2 with the prediction error characteristics in step 5, a multi-strategy recommendation output module is designed to assist manual or automatic systems in responding effectively.

[0339] Construct response priority function: For high risk area R i , calculate the response priority score:

[0340]

[0341] Among them, A i is the area of ​​the risk region, is the maximum predicted concentration value in the region, D i is the predicted duration, w r 、w c 、w t Manually set weight coefficients;

[0342] If P i ≥P thresh , then the area will be included in the key disposal list;

[0343] Generate decision suggestion structure:

[0344] Output structured proposal set D suggest , contains the following fields:

[0345] zone id Number the risk areas;

[0346] start time 、end time Risk period

[0347] expected peak is the predicted maximum concentration;

[0348] response level is the suggested response level;

[0349] recommended action For specific suggestions;

[0350] Output format and interface specifications: Recommended set D suggest The data is output synchronously in JSON / XML dual formats. The interface supports real-time API calls and periodic message push modes, and is suitable for edge computing terminals and central scheduling systems.

[0351] The benefits of Step 1 are: By systematically initializing and configuring the heterogeneous sensor network and designing a synchronous sampling mechanism, we ensure high consistency and traceability of the raw data collection process across multiple environmental factors, improving the integrity and standardization of the multi-source data foundation. Using sliding windows and statistical analysis models to automatically identify invalid or anomalous data segments significantly improves the stability and accuracy of subsequent modeling and analysis, avoids misjudgments or false alarms caused by raw data anomalies, and enhances the system's adaptability and robustness to complex field environments.

[0352] The benefits of step 2 are that by introducing an improved dynamic time warping algorithm and combining it with an event-driven time alignment strategy, asynchronous, heterogeneous sensor data can be aligned with high precision on a unified timeline, effectively resolving data timing misalignment issues caused by sampling delays and inconsistent responses in traditional methods. By leveraging similarity metrics and dynamic planning path optimization, the ability to jointly model multidimensional environmental data is enhanced while preserving true data trends. This provides a highly consistent time base for subsequent data fusion and prediction, improving the overall system's collaborative analysis efficiency and prediction accuracy.

[0353] The benefits of step 3 are that the fusion strategy, combining game theory with an adversarial payoff function, effectively identifies and dynamically addresses potential trend conflicts and credibility discrepancies among multiple sensors, achieving a shift from static fusion rules to adaptive weight allocation. By optimizing trend consistency metrics and game models, sensor data can be integrated to form a stable and reliable fusion result even when interference or local anomalies occur. This enhances the system's recognition accuracy and response decision-making reliability in abnormal scenarios, and improves the intelligence and robustness of the perception layer in complex real-world environments.

[0354] The benefits of Step 4 are that by building a multi-layer time series prediction model with an attention mechanism, the ability to model future gas concentration trends is significantly improved, balancing sensitivity to local fluctuations with the ability to perceive long-term trends. Furthermore, gas risk levels are graded and assessed based on concentration predictions. Dynamic heat maps are generated based on the geographic layout of sensors, achieving joint visualization output across spatial and temporal dimensions. This provides forward-looking warning information and intuitive reference for the emergency response system, enhancing the practicality of the prediction system and its decision-making support capabilities.

[0355] The benefits of step 5 are that by introducing an adaptive optimization mechanism based on prediction error feedback, key system parameters are dynamically adjusted and iteratively updated, enabling refined control of core parameters such as the time warping window and the penalty factor in the fusion strategy. Through error sensitivity analysis and a gradient-driven update path, the convergence and generalization capabilities of the overall model are effectively improved, enabling the system to maintain high prediction accuracy and stability despite sensor performance aging, environmental disturbances, or data drift, thereby building an intelligent gas prediction system with continuous learning and self-optimization capabilities.

[0356] The benefits of step 6 include synchronously updating system-level configuration parameters and enhancing the accuracy of heat map output results. Combined with optimized modeling parameters, this provides a high-resolution, multi-dimensional visualization of future gas diffusion trends, effectively enhancing the user's intuitive perception of risk situations and the timeliness of their responses. Furthermore, by generating a multi-strategy, hierarchical decision-making recommendation output structure and building a comprehensive response recommendation system that integrates multiple sources of information, including risk level, predicted concentration, and regional characteristics, this provides comprehensive, intelligent, and implementable auxiliary support for the actual dispatch system, enhancing the system's overall closed-loop performance and application implementation capabilities.

[0357] The heterogeneous sensors in step 1 include an infrared gas concentration sensor, an electrochemical gas detector, a temperature and humidity sensor, and a wind speed sensor;

[0358] The prediction results include risk level labels and diffusion trend curves. The diffusion trend curves represent the spatial distribution of gas concentrations within a preset time range in the future.

[0359] Feedback optimization involves calculating a prediction error metric and using the error as input to adjust the sliding window length in the dynamic time warping algorithm.

[0360] Feedback optimization further includes adjusting the consistency weight parameter in the adversarial payoff function;

[0361] The gas hazard prediction method can generate an optimization recommendation report after each step is completed to support on-site gas leak response and equipment configuration adjustment decisions.

[0362] In summary, this invention systematically addresses the issues of asynchronous sampling, uncontrollable sensor conflicts, and unsustainable prediction accuracy among heterogeneous sensors through the innovative introduction of improved dynamic time warping, game-theoretic fusion weight modeling, and feedback-based parameter self-optimization. This approach builds a gas hazard prediction system with high-precision prediction, robust fusion, and highly visual output capabilities. This approach improves the system's response speed and accuracy to sudden leaks, and offers continuous adaptive optimization and intelligent decision-making support, significantly outperforming existing solutions.

[0363] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A gas hazard prediction method integrating multi-sensor data, characterized in that: include: Step 1: Collect raw environmental data from multiple types of heterogeneous sensors in the target area; Step 2: Using an improved dynamic time warping algorithm to perform time alignment processing on the raw environmental data, so that multiple types of sensor data are aligned on a unified event timeline; Step 3: Perform sensor conflict detection based on the aligned data to determine whether there are trend differences in the outputs of multiple sensor groups. If there are differences, construct an adversarial payoff function and use a game theory model to treat each sensor as a strategic participant. The optimal decision weight of each participant is solved through Nash equilibrium. Step 4: Input the fused data into the gas hazard prediction model to output the gas risk level of the current environment and the future estimated gas diffusion trend; Step 5, iteratively optimizing the window parameters and the adversarial reward function parameters in the dynamic time warping algorithm based on the error between the actual feedback result and the historical prediction result; Step 6: Update the system configuration parameters based on the optimization results, and output a visualized gas diffusion heat map and decision-making assistance suggestions.

2. The method for predicting gas hazards by fusing multi-sensor data according to claim 1, characterized in that: The step 1 further comprises: Sub-step 1.1, initialize the sensor network and set sampling configuration parameters; Set the initial operating parameters of the infrared gas concentration sensor, electrochemical detector, temperature and humidity sensor, and wind speed sensor, including the sampling period T i , response delay τ i and measurement accuracy σ i ,where i is the sensor number; According to the regional layout, a multi-point sampling node set S = {s1, s2, ..., s i }, sampling node s i Corresponding to specific sensor types and environmental monitoring locations; Sub-step 1.2: execute synchronous sampling request according to sensor configuration and record raw time series data; After the unified sampling instruction is triggered, each node s i According to the configured sampling period T i Collect the environment variable value x at the current time point i (t), forming the original data sequence Among them, x i (t0), x i (t0+T i ), x i (t0+mT i ) are nodes s i At time t0, t0+T i t0+mT i The environmental variables collected at , m is the number of sampling points of the sensor; Sub-step 1.3: perform data validity judgment and interference elimination processing to screen available data segments; For each original time series Validity judgment is performed, and a sliding window mean-variance model is used for preliminary filtering. The judgment criteria are as follows: Assume that the sliding window length is w, at any time t k , calculate the local mean μ within the window i (t k ) and standard deviation σ i (t k ): Among them, t k is the current time point, j is the sub-time point number in the sliding window; Determine whether the sampled value is within the credible range. If so: |x i (t k )-μ i (t k )|>θ·σ i (t k ), the sampling points are marked as outliers, Where θ is a configurable confidence threshold parameter; All data points that meet the above conditions constitute a valid sampling data set It is the valid sampling data sequence retained after anomaly detection for subsequent time alignment processing; If the sensor is abnormal within M consecutive windows, the diagnostic module is triggered to record that the sensor is in an abnormal working state.

3. The method for predicting gas hazards by fusing multi-sensor data according to claim 1, characterized in that: The step 2 further includes: Sub-step 2.1, based on the valid dataset selected in step 1 Calculate the similarity score matrix D between multiple groups of time series; Define the Euclidean distance metric between time series: For any time series and At the time point (t k ,t l ) on the local distance d ij (t k ,t l ) is expressed as: Construct the initial similarity matrix D: Assume T i and T j is the set of sampling time points of the time series, and the matrix D is defined as: D={d ij (t k ,t l )∣t k ∈T i ,t l ∈T j }, Among them, d ij Quantify the difference in data at a time point. is the effective time series data of the i-th sensor, x j (t l ) is the jth sensor at time point t l The sampling value of x i (t k ) is the i-th sensor at time point t k The sampling value of is the effective time series data of the jth sensor, T i is the time sampling point set of the i-th sensor, T j is the set of time sampling points of the jth sensor, D is the similarity distance matrix, d ij (t k ,t l ) is the time point t between the i-th and j-th sensors k With t l The Euclidean distance metric of the difference in sample values; Sub-step 2.2: Based on the distance matrix D in sub-step 2.1, use dynamic programming technology to search for the best regularized path P, and the optimal matching solution for mapping multi-source heterogeneous time series to a unified timeline; Cumulative cost function definition: Assume that the time point pair (t k ,t l ) has a cumulative cost of C ij (t k ,t l ), the recursive relationship is: The initial conditions are: C ij (t1,t1)=d ij (t1,t1), Search for the best alignment path P: trace back from the end of matrix D to the starting point to find the path with the minimum cumulative cost: Where P is the dynamic time warping path; Sub-step 2.3: Based on the optimal alignment path obtained in sub-step 2.2, all time series are fused using a weighted strategy to form a joint input dataset with time synchronization characteristics. Weighted fusion formula: Aligned data points At time t k The weighted value is: Among them, w i is the data weight of sensor i; Generate joint dataset in, is the time point t after multi-sensor weighted average fusion k The data value above.

4. The method for predicting gas hazards by fusing multi-sensor data according to claim 1, characterized in that: The step 3 further includes: Sub-step 3.1: Perform trend consistency measurement and construct conflict determination indicators Based on the time-aligned dataset generated in step 2 Extract the raw output data of each sensor on the same time axis Calculate the consistency score η of each sensor relative to the overall trend i ; Define the sensor trend vector: for each sensor i, in the time window Construct the local differential trend vector: Δx i =[x i (t2)-x i (t1),x i (t3)-x i (t2),...,x i (t K )-x i (t K-1 )], Construct a fused trend vector as a baseline: Calculate cosine similarity as a consistency indicator: Where Δx i is the output increment sequence of sensor i at consecutive time points, To align the fusion of the unified time series The local difference trend, η i For sensor i and overall trend The cosine similarity of is the time point t after multi-sensor weighted average fusion k The data value on x i (t k ) is the i-th sensor at time point t k The sampling value of Set the conflict determination threshold θ c , determine whether there is a perception conflict: If there exists a sensor i that satisfies η i <θ c , where θ c To set a threshold, determine that a perception conflict exists, and trigger the adversarial modeling in sub-step 3.2; Sub-step 3.2, construct the sensor adversarial benefit function and model the weighted competition behavior; When a conflict is detected in sub-step 3.1, that is, η i Below the threshold θ c , then construct the profit function U for each sensor i (w i ), which is used to describe the level of benefits in the data fusion process and based on which the game process is defined; Define the adversarial payoff function: Among them, w i is the assigned weight of sensor i, η i For sensor i and overall trend The cosine similarity of ,λ is the penalty factor for controlling deviation from the average weight, Average weight for all sensors; Game modeling goal: On the sensor set S = {1,2,...,n}, construct a non-cooperative game model G = (S, {U i (w i )}), each sensor selection strategy w i To maximize one's own benefits U i ; Sub-step 3.3, solve Nash equilibrium to determine the optimal sensor weight distribution. Based on the non-cooperative game model G in sub-step 3.2, find the Nash equilibrium of the payoff function of all sensors and determine the optimal weight of each sensor. Used to guide weighted calculations in the data fusion phase; Definition of equilibrium condition: at Nash equilibrium point Next, meet: in, is the balancing strategy for all sensors except i, is the possible alternative strategy of sensor i under non-equilibrium state; Solve constrained optimization based on Lagrange multiplier method: Introducing constraints Define the Lagrangian function: Among them, L(w1,...,w n ,μ) is the Lagrangian objective function, U i (w i ) is the adversarial reward function of sensor i, μ is the Lagrange multiplier; For each w i and μ to find the partial derivative and solve the simultaneous equations to find the optimal solution Weight update formula: When η i When >0, the final weight solution is approximately: This formula shows that the final weight is proportional to the consistency score of the sensor, achieving dynamic adjustment.

5. The method for predicting gas hazards by fusing multi-sensor data according to claim 1, characterized in that: The step 4 further comprises: Sub-step 4.1: Construct a time series modeling network for gas concentration prediction based on the fused data generated in step 3 Design a multi-layer time series prediction network with attention mechanism θ , used to estimate the gas concentration change trend in the future time period; Define the input sequence window and prediction target: set the historical observation window length to w p , the prediction step is h, then the input sample at time t is: The prediction target is the gas concentration vector at the next time h: in, is the gas concentration value predicted at time t+h, X t is the historical input sequence, is the current fusion gas concentration value, predicting series for future concentrations; Model structure design: Model f θ It includes an input layer, a bidirectional LSTM encoder, an attention layer, and a decoder module. The parameter set θ includes all weights and bias terms, and the training goal is to minimize the prediction error. Sub-step 4.2, calculate the current gas risk level index and classify the output according to the prediction results in sub-step 4.1 With the current observation Define gas risk level classification rules based on concentration thresholds set by national safety standards; Risk scoring function definition: Let the gas concentration safety threshold be x safe , the risk score function R(t) is expressed as: Among them, R(t) means the concentration has exceeded the standard; Risk level classification standard: According to the size of the risk score R(t), the gas hazard level L(t) is divided into five levels: Level 0, R(t)<0.2, safe; Level 1, 0.2≤R(t)<0.5, slight risk; Level 2, 0.5≤R(t)<0.8, moderate risk; Level 3, 0.8≤R(t)<1.0, high risk; Level 4, R(t) ≥ 1.0, serious exceeding of the standard alarm; If any of the future prediction values ​​of satisfy Automatically trigger early warning signals; Sub-step 4.3, generate a future diffusion trend map and output a predicted heat map; Based on the future gas concentration series predicted in sub-step 4.1 Combined with the geographical distribution information of sensor nodes, a spatial diffusion trend map is generated; Constructing a spatial interpolation grid: Assume that the sensor node position set is Each predicted value Mapped to geographic space points, inverse distance weighted interpolation is used to generate a two-dimensional concentration distribution map: Among them, d i (x,y) represents the Euclidean distance from the grid point (x,y) to the i-th sensor, and p is the distance power exponent; Generate time series heat map H(t+k): Generate a corresponding two-dimensional concentration heat map H(t+k) for each predicted time t+k, and output an animation or image sequence of h consecutive frames to represent the dynamic trend of future gas diffusion; Joint output: The risk level L(t) and heat map H(t+k) are output to the decision module to provide a prediction credibility score to assist the dispatch system in implementing responses.

6. The method for predicting gas hazards by fusing multi-sensor data according to claim 1, characterized in that: The step 5 further includes: Sub-step 5.1, evaluate the forecast error and construct the error sensitivity matrix Based on the prediction results generated in step 4 and the actual feedback observation value Construct a set of error metrics and a sensitivity matrix to guide subsequent parameter updates; Define the prediction error vector: For each moment within the prediction step h, calculate the prediction error: Get the error vector: ε=[ε1,ε2,...,ε h ], Construct the mean square error metric: Among them, ε k is the k-th step prediction error, x real (t+k) is the actual gas concentration collected by the sensor at time t+k in the real environment, k is the prediction step index, h is the prediction step length, ε is the prediction error vector, MSE t is the mean square error, is the prediction model f θ After inputting the historical sequence at time t, the predicted gas concentration value at the kth step in the future is obtained; Construct the error sensitivity matrix S: To associate error sources with model parameter configuration, set the sensitivity matrix element s ij is the parameter p j Forecast error ε i The partial derivative estimate of : Among them, p j is the parameter to be optimized in the model, is the partial derivative, s ij is the parameter p j For the i-th prediction error component ε i sensitivity; Sub-step 5.2: Update the dynamic time warping window parameters to improve the alignment accuracy; Based on the error sensitivity matrix in sub-step 5.1, identify the parameter dimensions that are strongly correlated with the error and focus on adjusting the time warping parameter ω to improve the accuracy of sequence alignment and subsequent prediction stability; Define the update objective function: J align (ω)=MSE t +α·Var(η i ), Among them, ω is the window half width, α is the balance term coefficient, Var(η i ) is the conflict degree of the aligned data, J align Optimize the objective function for alignment; Optimize the ω parameter using gradient descent: Based on the error sensitivity estimate s i,ω , iteratively update ω: Among them, γ is the learning rate parameter, ω (k+1) is the k+1th iteration value of the time warping window, ω (k) is the kth iteration value of the time warping window; Sub-step 5.3, adjust the penalty factor in the adversarial reward function to optimize the fusion strategy According to the sensor benefit function U in step 3 i (w i ), combined with the error feedback in sub-step 5.1, optimize the setting of the penalty factor λ; Define the fusion strategy loss function: in, is the objective function for optimizing the fusion strategy, λ is the penalty factor for controlling the discreteness in the adversarial benefit function, and w i is the current weight of the i-th sensor, is the weight mean, β is the regularization control parameter; Update the λ value based on the MSE gradient: Estimate the gradient using error backpropagation: Among them, γ′ is the update step size, λ (k+1) is the k+1th iteration value of the penalty factor, λ (k) is the kth iteration value of the penalty factor.

7. The method for predicting gas hazards by fusing multi-sensor data according to claim 1, characterized in that: The step 6 further includes: Sub-step 6.1, system configuration parameter synchronization update mechanism Based on the time warping window parameter ω* and adversarial penalty factor λ* optimized in step 5, update the core configuration of the gas prediction system involving data alignment and fusion strategies; Build update parameter set: Define system configuration parameter set: P sys ={ω,λ,θ,β}, Among them, ω is the half-width of the time alignment window, λ is the penalty term coefficient in the adversarial benefit function, θ is the gas prediction model parameter set, and β is the regularization term control coefficient of the fusion strategy; Update strategy judgment condition: set threshold δ param represents the parameter stability convergence criterion, if: The parameters are considered to have converged and the configuration is frozen. Otherwise, continue to perform periodic updates and record the update logs of each iteration for subsequent audits; Sub-step 6.2, generate the optimized spatial-temporal joint heat map output; Based on the predicted heat map H(t+k) in step 4.3 and the high-precision prediction results generated by the optimized parameters in step 5, a multi-dimensional heat map output sequence is constructed to reflect the joint evolution trend of gas concentration changes in time and space; Construct a three-dimensional time series heat map tensor: Define the heat map tensor: in, is the spatial distribution evolution trend, H(t+h) is the two-dimensional heat map at the prediction time t+h; High-concentration cluster area marking judgment conditions: If a grid point (x, y) meets the following conditions within a continuous Δt period: γ ≥ 1.2, marked as high-risk cluster area; Heatmap output format specification: Heatmap tensor Export to standard geographic information format with prediction error confidence interval graph For upper-level systems or platforms to call; Sub-step 6.3, generating multi-strategy decision-making assistance recommendations; Combining the high-risk area identification results in step 6.2 with the prediction error characteristics in step 5, a multi-strategy recommendation output module is designed to assist manual or automatic systems in responding effectively. Construct response priority function: For high risk area R i , calculate the response priority score: Among them, A i is the area of ​​the risk region, is the maximum predicted concentration value in the region, D i is the predicted duration, w r 、w c 、w t Manually set weight coefficients; If P i ≥P thresh , then the area will be included in the key disposal list; Generate decision suggestion structure: Output structured proposal set D suggest , contains the following fields: zone id Number the risk areas; start time 、end time Risk period expected peak is the predicted maximum concentration; response level is the suggested response level; recommended action For specific suggestions; Output format and interface specifications: Recommended set D suggest The data is output synchronously in JSON / XML dual formats. The interface supports real-time API calls and periodic message push modes, and is suitable for edge computing terminals and central scheduling systems.

8. The method for predicting gas hazards by fusing multi-sensor data according to claim 1, characterized in that: The heterogeneous sensors in step 1 include an infrared gas concentration sensor, an electrochemical gas detector, a temperature and humidity sensor, and a wind speed sensor; The prediction result includes a risk level label and a diffusion trend curve, and the diffusion trend curve represents the spatial expansion distribution of gas concentration within a preset time range in the future.

9. The method for predicting gas hazards by fusing multi-sensor data according to claim 1, characterized in that: The feedback optimization includes calculating a prediction error index and adjusting the sliding window length in the dynamic time warping algorithm using the error as input; The feedback optimization further includes adjusting a consistency weight parameter in the adversarial reward function.

10. The method for predicting gas hazards by fusing multi-sensor data according to claim 1, characterized in that: The gas hazard prediction method can generate an optimization recommendation report after each step is completed to support on-site gas leak response and equipment configuration adjustment decisions.

Citation Information

Patent Citations

  • A PLC-controlled system and method for predicting the hazards of toxic gas leaks

    CN110836954B

  • Gas hazard prediction method, device and equipment fusing multi-sensor data

    CN118747345A

Cited By

  • Multi-component gas monitoring device and method based on unmanned aerial vehicle carried sensor array

    CN121299053A

  • Intelligent storage abnormity early warning method driven by multi-device state perception

    CN121616212A