A method and system for screening of residential environment risks
By preprocessing and time-series fusion of ventilation effectiveness and hazardous gas accumulation time-series data in the living environment, combined with time-series data coupling analysis, hidden hazards are identified, solving the problem that existing technologies cannot identify hidden hazards in the early stages, and improving the reliability of safety screening of the living environment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA ELECTRONICS ENGINEERING DESIGN INSTITUTECO LTD
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-12
Smart Images

Figure CN122196448A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of environmental monitoring technology, and in particular to a method and system for screening risks in residential environments. Background Technology
[0002] With the rapid popularization of smart home technology, screening for safety hazards in the living environment has become a core requirement of smart security systems for residential buildings. Among these hazards, the hidden accumulation of dangerous gases due to ventilation failure (such as chronic carbon monoxide poisoning, minor gas leaks, and early-stage smoldering fires) is the most common and deadliest type of safety hazard in residential settings. These hazards are extremely prevalent in environments where elderly people live alone, in older residential communities, in enclosed bedrooms, and in home kitchens. They are characterized by a gradual, low-concentration, and insidious nature, making them easily overlooked and ultimately leading to fatal accidents such as poisoning, explosions, and fires, seriously threatening the lives and property of residents.
[0003] Currently, mainstream smart home security solutions primarily employ a single-parameter independent monitoring approach to screen for the accumulation of hazardous gases caused by ventilation failures. This involves deploying sensors in the living space to collect time-series data on environmental parameters such as carbon monoxide, combustible gases, smoke, carbon dioxide, temperature, and humidity. When the monitored value of a certain parameter reaches a preset alarm threshold, an audible and visual warning is triggered. This technology is widely used in products such as household gas alarms, smoke detectors, and smart environmental monitoring equipment, effectively providing early warning of visible hazardous gas concentrations exceeding standards.
[0004] However, existing technologies have an insurmountable core flaw: such solutions can only issue warnings for obvious hazards when a single parameter accumulates to the alarm threshold. They rely entirely on the threshold triggering logic of a single parameter and cannot identify hidden hazards where "all single parameters are within the normal range, but risks already exist after the coupling of multiple parameters." For example, scenarios such as the slow accumulation of dangerous gases in localized areas due to ventilation dead zones or the continuous accumulation of low-concentration gases due to a gradual decrease in ventilation capacity may occur. In these cases, all single parameters have not reached the alarm threshold, but there is already a clear safety risk. Existing technologies cannot achieve early identification and screening of such hidden hazards, which can easily lead to missed hazard detection and leave fatal safety loopholes in residential scenarios. Summary of the Invention
[0005] This invention provides a method and system for screening risks in the residential environment, which solves the problem that existing technologies cannot achieve early identification and screening of hidden hazards.
[0006] On the one hand, the present invention provides a method for screening residential environment risks, including: Acquire multiple time-series data on ventilation effectiveness and multiple time-series data on cumulative hazardous gas characteristics of the target living environment; wherein the acquisition step size of each of the ventilation effectiveness time-series data and the acquisition step size of each of the cumulative hazardous gas time-series data are the same; Preprocessing and time-series fusion of the ventilation effectiveness characterization time-series data of each of the above are used to obtain the corresponding ventilation effectiveness feature time-series data; preprocessing and time-series fusion of the hazardous gas accumulation characterization time-series data of each of the above are used to obtain the corresponding hazardous gas accumulation feature time-series data. A time-series data coupling analysis is performed on the ventilation effectiveness characteristic time-series data and the hazardous gas accumulation characteristic time-series data to obtain the synchronization deviation between the ventilation effectiveness characteristic time-series data and the hazardous gas accumulation characteristic time-series data. Based on the synchronization deviation, the ventilation effectiveness characteristic time-series data, the hazardous gas accumulation characteristic time-series data, multiple ventilation effectiveness characterization time-series data, and multiple hazardous gas accumulation characterization time-series data, risk screening of the target living environment is carried out.
[0007] In one optional embodiment of this application, the ventilation effectiveness characterization time series data includes carbon dioxide concentration time series data, indoor temperature time series data, relative humidity time series data, and indoor air pressure time series data in the target living environment; The time-series data for the cumulative characterization of hazardous gases includes time-series data on carbon monoxide concentration, hydrogen concentration, alkane combustible gas concentration, and smoke particle concentration in the target living environment.
[0008] In one optional embodiment of this application, the preprocessing and time-series fusion of the ventilation effectiveness characterization time-series data to obtain the corresponding ventilation effectiveness feature time-series data includes: Outliers in each of the ventilation effectiveness characterization time series data are removed, and the ventilation effectiveness characterization time series data are normalized to obtain the first normalized time series data of each of the ventilation effectiveness characterization time series data. Based on a preset sliding time window, each of the first normalized time series data is subjected to sliding weighted fusion and time series smoothing to obtain the first feature data corresponding to each preset sliding time window. The first feature data is then combined according to the sliding time sequence to obtain the ventilation effectiveness feature time series data. The sliding step size of the preset sliding time window is the same as the acquisition step size of each ventilation effectiveness characterization time series data.
[0009] In one optional embodiment of this application, the step of performing sliding weighted fusion and temporal smoothing on each of the first normalized data based on a preset sliding time window to obtain the first feature data corresponding to each preset sliding time window includes: For each group of first normalized time series data in the initial preset sliding time window, the first normalized time series data is weighted according to the preset weight corresponding to each first normalized time series data to obtain the corresponding intermediate feature time series data. Then, the average of each intermediate feature time series data is calculated to obtain the corresponding basic feature data, and the basic feature data is used as the first feature data of the initial preset sliding time window. For each group of first normalized time series data in a non-initial preset sliding time window, the current weight of each first normalized time series data is determined based on the fluctuation amplitude of each first normalized time series data in the current preset sliding time window. Then, the first normalized time series data is weighted based on the current weight to obtain the corresponding intermediate feature time series data. Then, the average of each intermediate feature time series data is calculated to obtain the corresponding basic feature data. Finally, time series smoothing is performed based on the basic feature data and the ventilation effectiveness feature time series data corresponding to the previous preset sliding time window to obtain the time series feature data of the non-initial preset sliding time window.
[0010] In one optional embodiment of this application, determining the current weight of each of the first normalized time series data based on the fluctuation amplitude of each of the first normalized time series data within the current preset sliding time window includes: Based on the fluctuation range of each of the first normalized time series data, high volatility first normalized time series data and low volatility first normalized time series data are determined. For each low-volatility first normalized time series data, the weight corresponding to the previous preset sliding time window is reduced by a preset reduction value. Then, the total amount of the reduction value is evenly distributed to each high-volatility first normalized time series data as an upward adjustment value. Based on the upward adjustment value, the weight corresponding to the previous preset sliding time window is increased, and the weight of the first normalized time series data without volatility remains unchanged from the weight corresponding to the previous preset sliding time window, thus obtaining the current weight of each first normalized time series data.
[0011] In one optional embodiment of this application, the method further includes: If one or more of the current weights obtained after the reduction are less than the first preset threshold, the reduction value is re-determined to ensure that the one or more current weights are not less than the first preset threshold. If one or more of the current weights obtained after the adjustment are greater than the second preset threshold, the adjustment value is re-determined to ensure that the one or more current weights are not greater than the second preset threshold, and the total amount of the extra adjustment value is evenly distributed to each low-fluctuation first normalized time series data.
[0012] In one optional embodiment of this application, the preprocessing and time-series fusion of the accumulated hazardous gas characterization time-series data to obtain the corresponding accumulated hazardous gas characteristic time-series data includes: Outliers in the cumulative characterization time series data of each of the hazardous gases are removed, and the cumulative characterization time series data of each of the hazardous gases are normalized to obtain the second normalized time series data of the cumulative characterization time series data of each of the hazardous gases. Each of the second normalized time-series data is input into a preset multi-channel temporal attention fusion network. In the feature extraction layer, the low-concentration accumulation stage feature vectors of each of the second normalized time-series data are extracted through the long short-term memory (LSTM) network channels corresponding to each of the second normalized time-series data within a preset sliding time window. Then, in the attention mechanism layer, the current attention weights of each of the second normalized data in the corresponding preset sliding time window are obtained. Finally, in the feature fusion layer, the feature vectors of each low-concentration accumulation stage are concatenated and fully connected based on the current attention weights to obtain the second feature data corresponding to the preset sliding time window. The second feature data are combined according to the sliding time sequence to obtain the hazardous gas accumulation feature time-series data. The sliding step size of the preset sliding time window is the same as the acquisition step size of each hazardous gas accumulation characterization time-series data.
[0013] In one optional embodiment of this application, obtaining the current attention weight of each second normalized data within the corresponding preset sliding time window at the attention mechanism layer includes: For each set of low-concentration accumulation stage feature vectors in the initial preset sliding time window, the preset weights corresponding to each low-concentration accumulation stage feature vector are used as the current attention weights of each low-concentration accumulation stage feature vector. For each set of low-concentration accumulation stage feature vectors in the non-initial preset sliding time window, the current attention weight of each low-concentration accumulation stage feature vector is determined based on the concentration accumulation rate and instantaneous surge amplitude of each second normalized time series data in the current preset sliding time window.
[0014] In one optional embodiment of this application, the risk screening of the target living environment based on the synchronicity deviation, the ventilation effectiveness characteristic time series data, the hazardous gas accumulation characteristic time series data, multiple ventilation effectiveness characterization time series data, and multiple hazardous gas accumulation characterization time series data includes: If the synchronization deviation at the current moment is greater than the preset deviation value, and based on the ventilation effectiveness characteristic time series data, the hazardous gas accumulation characteristic time series data, multiple ventilation effectiveness characterization time series data, and multiple hazardous gas accumulation characterization time series data, it is determined that there is no significant risk in the target living environment, then the ventilation fluctuation amplitude and ventilation fluctuation rate are obtained based on the ventilation effectiveness characteristic time series data, and the hazardous gas fluctuation amplitude and hazardous gas fluctuation rate are obtained based on the hazardous gas accumulation characteristic time series data using a preset sliding time window; If the ventilation fluctuation rate at the current moment is within the first preset range, and the hazardous gas fluctuation rate for a consecutive preset number of moments is not less than the first preset value, then it is determined that the target living environment has the potential for false ventilation and hidden accumulation of hazardous gases; wherein, the consecutive preset number of moments includes the current moment and at least one moment before the current moment; If the ventilation fluctuation rate over the specified number of consecutive time intervals is not greater than a third preset value, and the current hazardous gas fluctuation rate is within a second preset range, then it is determined that the target residential environment has insufficient ventilation and a potential risk of hazardous gas accumulation; wherein, the third preset value is a negative number. If the ventilation fluctuation amplitude at the current moment and the previous moment are not less than the fourth preset value, and the dangerous gas fluctuation rate at the current moment is not less than the fifth preset value, and the dangerous gas fluctuation amplitude at the current moment is not less than the sixth preset value, then it is determined that there is a potential risk of sudden leakage in the target living environment that cannot be suppressed by ventilation.
[0015] Secondly, the present invention also provides a residential environment risk screening system, comprising: The characterization time series data acquisition module is used to acquire multiple ventilation effectiveness characterization time series data and multiple hazardous gas accumulation characterization time series data of the target living environment; wherein, the acquisition step size of each ventilation effectiveness characterization time series data is the same as the acquisition step size of each hazardous gas accumulation characterization time series data; The feature time series data acquisition module is used to preprocess and time series fuse the time series data representing each ventilation effectiveness to obtain the corresponding ventilation effectiveness feature time series data, and to preprocess and time series fuse the time series data representing each hazardous gas accumulation to obtain the corresponding hazardous gas accumulation feature time series data; The risk screening module is used to perform time-series data coupling analysis on the ventilation effectiveness characteristic time-series data and the hazardous gas accumulation characteristic time-series data, obtain the synchronization deviation between the ventilation effectiveness characteristic time-series data and the hazardous gas accumulation characteristic time-series data, and perform risk screening of the target living environment based on the synchronization deviation, the ventilation effectiveness characteristic time-series data, the hazardous gas accumulation characteristic time-series data, multiple ventilation effectiveness characterization time-series data, and multiple hazardous gas accumulation characterization time-series data.
[0016] In one optional embodiment of this application, the ventilation effectiveness characterization time series data includes carbon dioxide concentration time series data, indoor temperature time series data, relative humidity time series data, and indoor air pressure time series data in the target living environment; The time-series data for the cumulative characterization of hazardous gases includes time-series data on carbon monoxide concentration, hydrogen concentration, alkane combustible gas concentration, and smoke particle concentration in the target living environment.
[0017] In one optional embodiment of this application, the preprocessing and time-series fusion of the ventilation effectiveness characterization time-series data to obtain the corresponding ventilation effectiveness feature time-series data includes: Outliers in the time series data of each ventilation effectiveness characterization are removed, and the time series data of each ventilation effectiveness characterization are normalized to obtain the first normalized time series data of each ventilation effectiveness characterization time series data. Based on a preset sliding time window, each of the first normalized time series data is subjected to sliding weighted fusion and time series smoothing to obtain the first feature data corresponding to each preset sliding time window. The first feature data is then combined according to the sliding time sequence to obtain the ventilation effectiveness feature time series data. The sliding step size of the preset sliding time window is the same as the acquisition step size of each ventilation effectiveness characterization time series data.
[0018] In one optional embodiment of this application, the step of performing sliding weighted fusion and temporal smoothing on each of the first normalized data based on a preset sliding time window to obtain the first feature data corresponding to each preset sliding time window includes: For each group of first normalized time series data in the initial preset sliding time window, the first normalized time series data is weighted according to the preset weight corresponding to each first normalized time series data to obtain the corresponding intermediate feature time series data. Then, the average of each intermediate feature time series data is calculated to obtain the corresponding basic feature data, and the basic feature data is used as the first feature data of the initial preset sliding time window. For each group of first normalized time series data in a non-initial preset sliding time window, the current weight of each first normalized time series data is determined based on the fluctuation amplitude of each first normalized time series data in the current preset sliding time window. Then, the first normalized time series data is weighted based on the current weight to obtain the corresponding intermediate feature time series data. Then, the average of each intermediate feature time series data is calculated to obtain the corresponding basic feature data. Finally, time series smoothing is performed based on the basic feature data and the ventilation effectiveness feature time series data corresponding to the previous preset sliding time window to obtain the time series feature data of the non-initial preset sliding time window.
[0019] In one optional embodiment of this application, determining the current weight of each of the first normalized time series data based on the fluctuation amplitude of each of the first normalized time series data within the current preset sliding time window includes: Based on the fluctuation range of each of the first normalized time series data, high volatility first normalized time series data and low volatility first normalized time series data are determined. For each low-volatility first normalized time series data, the weight corresponding to the previous preset sliding time window is reduced by a preset reduction value. Then, the total amount of the reduction value is evenly distributed to each high-volatility first normalized time series data as an upward adjustment value. Based on the upward adjustment value, the weight corresponding to the previous preset sliding time window is increased, and the weight of the first normalized time series data without volatility remains unchanged from the weight corresponding to the previous preset sliding time window, thus obtaining the current weight of each first normalized time series data.
[0020] In one optional embodiment of this application, the method further includes: If one or more of the current weights obtained after the reduction are less than the first preset threshold, the reduction value is re-determined to ensure that the one or more current weights are not less than the first preset threshold. If one or more of the current weights obtained after the adjustment are greater than the second preset threshold, the adjustment value is re-determined to ensure that the one or more current weights are not greater than the second preset threshold, and the total amount of the extra adjustment value is evenly distributed to each low-fluctuation first normalized time series data.
[0021] In one optional embodiment of this application, the preprocessing and time-series fusion of the accumulated hazardous gas characterization time-series data to obtain the corresponding accumulated hazardous gas characteristic time-series data includes: Outliers in the cumulative characterization time series data of each of the hazardous gases are removed, and the cumulative characterization time series data of each of the hazardous gases are normalized to obtain the second normalized time series data of the cumulative characterization time series data of each of the hazardous gases. Each of the second normalized time-series data is input into a preset multi-channel temporal attention fusion network. In the feature extraction layer, the low-concentration accumulation stage feature vectors of each of the second normalized time-series data are extracted through the long short-term memory (LSTM) network channels corresponding to each of the second normalized time-series data within a preset sliding time window. Then, in the attention mechanism layer, the current attention weights of each of the second normalized data in the corresponding preset sliding time window are obtained. Finally, in the feature fusion layer, the feature vectors of each low-concentration accumulation stage are concatenated and fully connected based on the current attention weights to obtain the second feature data corresponding to the preset sliding time window. The second feature data are combined according to the sliding time sequence to obtain the hazardous gas accumulation feature time-series data. The sliding step size of the preset sliding time window is the same as the acquisition step size of each hazardous gas accumulation characterization time-series data.
[0022] In one optional embodiment of this application, obtaining the current attention weight of each second normalized data within the corresponding preset sliding time window at the attention mechanism layer includes: For each set of low-concentration accumulation stage feature vectors in the initial preset sliding time window, the preset weights corresponding to each low-concentration accumulation stage feature vector are used as the current attention weights of each low-concentration accumulation stage feature vector. For each set of low-concentration accumulation stage feature vectors in the non-initial preset sliding time window, the current attention weight of each low-concentration accumulation stage feature vector is determined based on the concentration accumulation rate and instantaneous surge amplitude of each second normalized time series data in the current preset sliding time window.
[0023] In one optional embodiment of this application, the risk screening of the target living environment based on the synchronicity deviation, the ventilation effectiveness characteristic time series data, the hazardous gas accumulation characteristic time series data, multiple ventilation effectiveness characterization time series data, and multiple hazardous gas accumulation characterization time series data includes: If the synchronization deviation at the current moment is greater than the preset deviation value, and based on the ventilation effectiveness characteristic time series data, the hazardous gas accumulation characteristic time series data, multiple ventilation effectiveness characterization time series data, and multiple hazardous gas accumulation characterization time series data, it is determined that there is no significant risk in the target living environment, then the ventilation fluctuation amplitude and ventilation fluctuation rate are obtained based on the ventilation effectiveness characteristic time series data, and the hazardous gas fluctuation amplitude and hazardous gas fluctuation rate are obtained based on the hazardous gas accumulation characteristic time series data using a preset sliding time window; If the ventilation fluctuation rate at the current moment is within the first preset range, and the hazardous gas fluctuation rate for a consecutive preset number of moments is not less than the first preset value, then it is determined that the target living environment has the potential for false ventilation and hidden accumulation of hazardous gases; wherein, the consecutive preset number of moments includes the current moment and at least one moment before the current moment; If the ventilation fluctuation rate over the specified number of consecutive time intervals is not greater than a third preset value, and the current hazardous gas fluctuation rate is within a second preset range, then it is determined that the target residential environment has insufficient ventilation and a potential risk of hazardous gas accumulation; wherein, the third preset value is a negative number. If the ventilation fluctuation amplitude at the current moment and the previous moment are not less than the fourth preset value, and the dangerous gas fluctuation rate at the current moment is not less than the fifth preset value, and the dangerous gas fluctuation amplitude at the current moment is not less than the sixth preset value, then it is determined that there is a potential risk of sudden leakage in the target living environment that cannot be suppressed by ventilation.
[0024] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement any of the above-described residential environment risk screening methods.
[0025] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described residential environment risk screening methods.
[0026] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the above-described residential environment risk screening methods.
[0027] The proposed solution preprocesses and fuses the time-series data representing each ventilation effectiveness characteristic to obtain corresponding ventilation effectiveness feature time-series data, and preprocesses and fuses the time-series data representing each hazardous gas accumulation characteristic to obtain corresponding hazardous gas accumulation feature time-series data. It then performs time-series data coupling analysis on the ventilation effectiveness feature time-series data and the hazardous gas accumulation feature time-series data to obtain the synchronization deviation between them. Based on this synchronization deviation, the ventilation effectiveness feature time-series data, the hazardous gas accumulation feature time-series data, multiple ventilation effectiveness characterization time-series data, and multiple hazardous gas accumulation characterization time-series data, it conducts risk screening of the target residential environment. This solution can accurately identify hidden safety hazards where "all individual parameters are within the normal range," achieving early screening of hazardous gas accumulation hazards and significantly improving the reliability of residential environment safety screening. Attached Figure Description
[0028] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0029] Figure 1 A flowchart illustrating a residential environment risk screening method provided by the present invention; Figure 2 A structural block diagram of a residential environment risk screening system provided by the present invention; Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0031] Figure 1 This is a flowchart illustrating a residential environment risk screening method provided in an embodiment of the present invention, as shown below. Figure 1 As shown, the method may include: Step S101: Acquire multiple time-series data of ventilation effectiveness characterization and multiple time-series data of hazardous gas accumulation characterization of the target living environment; wherein, the acquisition step size of each of the ventilation effectiveness characterization time-series data is the same as the acquisition step size of each of the hazardous gas accumulation characterization time-series data.
[0032] The target living environment refers to the application scenario of this solution, including but not limited to enclosed / semi-enclosed living spaces such as bedrooms, kitchens, living rooms, and studies in residential buildings, and can also be adapted to similar living scenarios such as apartments and dormitories. Ventilation effectiveness characterization time-series data refers to a continuous parameter sequence collected in chronological order that reflects changes in ventilation status within the living space, serving as the fundamental data source for characterizing indoor ventilation capacity. Hazardous gas accumulation characterization time-series data refers to a continuous parameter sequence collected in chronological order that reflects changes in hazardous gas concentration within the living space, serving as the fundamental data source for characterizing the indoor hazardous gas accumulation state. The acquisition step size refers to the time interval between two consecutive data acquisitions.
[0033] The ventilation effectiveness characterization time series data includes carbon dioxide concentration time series data, indoor temperature time series data, relative humidity time series data, and indoor air pressure time series data in the target living environment. The time-series data for the cumulative characterization of hazardous gases includes time-series data on carbon monoxide concentration, hydrogen concentration, alkane combustible gas concentration, and smoke particle concentration in the target living environment.
[0034] Specifically, this step involves acquiring data sources by collecting multi-dimensional time-series data directly related to ventilation and hazardous gases, providing a foundation for subsequent fusion analysis. It is crucial that the acquisition step size for both types of data be completely consistent to ensure strict alignment of the two sets of time-series data in the temporal dimension. This prevents errors in subsequent coupling analysis and synchronization calculations due to time misalignment, ensuring the accuracy of risk screening. For example, the acquisition step size for all data is uniformly set to 1 time / minute, meaning the time interval between two adjacent acquisitions is 1 minute, with continuous acquisition over 24 hours. This ensures complete alignment of the two types of time-series data in the temporal dimension, with each acquisition moment corresponding to a set of ventilation effectiveness characterization data and a set of hazardous gas cumulative characterization data.
[0035] Step S102: Preprocess and time-series fusion of the ventilation effectiveness characterization time-series data to obtain the corresponding ventilation effectiveness feature time-series data; preprocess and time-series fusion of the hazardous gas accumulation characterization time-series data to obtain the corresponding hazardous gas accumulation feature time-series data.
[0036] Preprocessing refers to the cleaning and standardization of the raw time-series data to eliminate interference and improve data quality. Time-series fusion refers to the weighting, feature extraction, and integration of multiple sets of time-series data on the same dimension, transforming scattered raw parameters into a single feature sequence that intuitively reflects the core state of the corresponding dimension. Ventilation effectiveness feature time-series data refers to the sequence of feature values arranged in chronological order after preprocessing and time-series fusion of multiple sets of ventilation effectiveness characterization time-series data. Each feature value corresponds to a preset sliding time window, accurately representing the indoor ventilation status within a corresponding time period. Hazardous gas accumulation feature time-series data refers to the sequence of feature values arranged in chronological order after preprocessing and time-series fusion of multiple sets of hazardous gas accumulation characterization time-series data. Each feature value corresponds to a preset sliding time window, accurately representing the indoor hazardous gas accumulation status within a corresponding time period.
[0037] Specifically, this step is the feature extraction stage. The raw, collected single-parameter time-series data is easily affected by instantaneous interference and differences in units, and cannot be directly used for coupling analysis. By preprocessing to eliminate data interference and unify units, and then by time-series fusion, multiple sets of scattered single-parameter data are integrated into a standardized feature time series that can reflect the core state of the corresponding dimension. This not only filters out instantaneous interference but also retains the core features of time-series fluctuations, providing a reliable and accurate feature foundation for subsequent coupling analysis.
[0038] In one example of this application, the preset sliding time window duration is set to 10 minutes, and the sliding step size is consistent with the acquisition step size, which is 1 minute. That is, the sliding window slides forward by 1 acquisition step size every 1 minute, and each window contains 10 continuously acquired raw data points.
[0039] Processing of time-series data for ventilation effectiveness characterization: First, preprocessing is performed, using the 3σ criterion to remove outliers (such as sensor false alarms or abnormal jumps caused by instantaneous window opening) from the original time-series data. Then, using the minimum-maximum normalization formula, the time-series data of all parameters are mapped to the [0, 1] interval to eliminate dimensional differences, resulting in the first normalized time-series data. Next, time-series fusion is performed. For the first normalized time-series data within each sliding window, an improved weighted time-series fusion algorithm is used to perform dynamic weighted summation and time-series smoothing, obtaining the first feature data corresponding to each sliding window. The first feature data of all sliding windows are concatenated in chronological order to obtain the ventilation effectiveness feature time-series data. The value range of each feature is [0, 1], and the higher the value, the better the ventilation effectiveness of the corresponding time period.
[0040] Processing of time-series data for hazardous gas accumulation characterization: First, preprocessing is performed. The original time-series data is baseline-calibrated to eliminate zero-point drift caused by long-term sensor use. Then, outliers are removed using the 3σ criterion. The data is mapped to the [0, 1] interval using the minimum-maximum normalization formula, focusing on preserving the time-series details of the low-concentration interval, resulting in second-normalized time-series data. Next, time-series fusion is performed. For the second-normalized time-series data within each sliding window, a multi-channel time-series attention fusion network is used to complete feature extraction, attention weighting, feature concatenation, and mapping, resulting in second-feature data corresponding to each sliding window. The second-feature data of all sliding windows are concatenated in chronological order to obtain the hazardous gas accumulation characteristic time-series data. The value range of each feature is [0, 1], with higher values indicating more severe hazardous gas accumulation in the corresponding time period.
[0041] The above steps will be explained in more detail later, and will not be repeated here.
[0042] Step S103: Perform time-series data coupling analysis on the ventilation effectiveness characteristic time-series data and the hazardous gas accumulation characteristic time-series data to obtain the synchronization deviation between the ventilation effectiveness characteristic time-series data and the hazardous gas accumulation characteristic time-series data. Based on the synchronization deviation, the ventilation effectiveness characteristic time-series data, the hazardous gas accumulation characteristic time-series data, multiple ventilation effectiveness characterization time-series data, and multiple hazardous gas accumulation characterization time-series data, conduct risk screening of the target living environment.
[0043] Among them, time-series data coupling analysis refers to analyzing the correlation and synchronous changes between the time-series characteristics of ventilation effectiveness and the time-series characteristics of hazardous gas accumulation based on the physical mechanisms of the living environment. This is a core step in identifying hidden hazards. Synchronicity deviation refers to the absolute value of the difference between the synchronicity coefficient of two sets of characteristic time series calculated in real time and the synchronicity benchmark interval under normal operating conditions. It is used to quantify the degree to which the changing trends of the two sets of time series deviate from the normal state; the larger the deviation, the higher the probability of hidden hazards. Risk screening refers to the process of determining whether there are safety hazards in the living environment and clarifying the type and risk level of the hazards based on synchronicity deviation, characteristic time-series data, and raw characterization data.
[0044] Specifically, this step is the hazard identification stage. Based on the physical mechanisms of the living environment, under normal operating conditions, there is a clear synchronous correlation between ventilation effectiveness and the accumulation of hazardous gases. When ventilation effectiveness improves, the accumulation of hazardous gases should decrease synchronously; when ventilation effectiveness decreases, the accumulation of hazardous gases should increase synchronously. When the synchronicity deviation between the two sets of time series exceeds the normal range, it indicates that there is an asynchrony anomaly. By combining the fluctuation pattern of the characteristic time series and the verification of the original characterization data, hidden hazards that cannot be detected by traditional methods can be accurately identified, and the hazard type can be determined, thus completing the risk screening.
[0045] For example, in this embodiment, the specific coupling analysis and risk screening process can be as follows: First, we perform time-series data coupling analysis and synchronization deviation calculation. We then construct a normal synchronization benchmark model: we collect samples of normal working conditions in multiple scenarios and calculate the general normal synchronization interval [0.7, 0.9] using the Pearson correlation coefficient, which serves as the synchronization benchmark (i.e., the benchmark value for obtaining the preset deviation value in the following text).
[0046] Next, the real-time synchronization coefficient is calculated. First, the correspondence between the feature values and the acquisition time is clarified: Since the sliding step size of the preset sliding time window is exactly the same as the original data acquisition step size (e.g., 1 minute), and the window duration is 10 minutes, each acquisition time t corresponds to a sliding window with t as the end point. This window outputs one ventilation effectiveness feature value and one hazardous gas accumulation feature value through fusion calculation. That is, the feature value sequence corresponds one-to-one with the original acquisition time sequence in the time dimension and is completely aligned. Each acquisition time has its own set of feature values. Based on the above correspondence, the Pearson correlation coefficient is used to calculate the real-time synchronization coefficient Corr(t) of the continuous feature value sequence ending at the current acquisition time t. To improve the stability of the results and avoid errors caused by instantaneous fluctuations, the average of the synchronization coefficients calculated at the current acquisition time t and the two consecutive acquisition times before t (a total of three consecutive acquisition times) can be taken as the final real-time synchronization coefficient at the current acquisition time t. Then, the synchronization deviation is calculated by calculating the absolute value of the difference between the real-time synchronization coefficient and the normal synchronization benchmark to obtain the synchronization deviation ΔCorr(t). When ΔCorr(t) > 0.2, it is determined to be an anomaly in synchronization and enters the subsequent risk screening stage.
[0047] Finally, risk screening is conducted. First, non-hazardous factors are eliminated by reviewing the original ventilation effectiveness and hazardous gas accumulation time-series data to rule out synchronization anomalies caused by non-hazardous factors such as sensor malfunctions, temporary window opening / closing, and temporary resident activities. Next, hazard identification and classification are performed. Based on synchronization deviation, ventilation effectiveness characteristic time-series data, and hazardous gas accumulation characteristic time-series data, combined with pre-defined hazard identification rules, hazard types are identified, including three core hazard categories: false ventilation effectiveness, concealed hazardous gas accumulation, insufficient ventilation capacity, and sudden leaks; and ventilation cannot suppress the hazard. Risk level classification and early warning: Based on the magnitude of the synchronization deviation and the fluctuation rate of the characteristic time series, risk levels are classified, and corresponding early warning information and handling suggestions are output, completing the risk screening of the target living environment.
[0048] The proposed solution preprocesses and fuses the time-series data representing each ventilation effectiveness characteristic to obtain corresponding ventilation effectiveness feature time-series data, and preprocesses and fuses the time-series data representing each hazardous gas accumulation characteristic to obtain corresponding hazardous gas accumulation feature time-series data. It then performs time-series data coupling analysis on the ventilation effectiveness feature time-series data and the hazardous gas accumulation feature time-series data to obtain the synchronization deviation between them. Based on this synchronization deviation, the ventilation effectiveness feature time-series data, the hazardous gas accumulation feature time-series data, multiple ventilation effectiveness characterization time-series data, and multiple hazardous gas accumulation characterization time-series data, it conducts risk screening of the target residential environment. This solution can accurately identify hidden safety hazards where "all individual parameters are within the normal range," achieving early screening of hazardous gas accumulation hazards and significantly improving the reliability of residential environment safety screening.
[0049] In one optional embodiment of this application, the preprocessing and time-series fusion of the ventilation effectiveness characterization time-series data to obtain the corresponding ventilation effectiveness feature time-series data includes: Outliers in the time series data of each ventilation effectiveness characterization are removed, and the time series data of each ventilation effectiveness characterization are normalized to obtain the first normalized time series data of each ventilation effectiveness characterization time series data. Based on a preset sliding time window, each of the first normalized time series data is subjected to sliding weighted fusion and time series smoothing to obtain the first feature data corresponding to each preset sliding time window. The first feature data is then combined according to the sliding time sequence to obtain the ventilation effectiveness feature time series data. The sliding step size of the preset sliding time window is the same as the acquisition step size of each ventilation effectiveness characterization time series data.
[0050] Further, the step of performing sliding weighted fusion and temporal smoothing on each of the first normalized data based on a preset sliding time window to obtain the first feature data corresponding to each preset sliding time window includes: For each group of first normalized time series data in the initial preset sliding time window, the first normalized time series data is weighted according to the preset weight corresponding to each first normalized time series data to obtain the corresponding intermediate feature time series data. Then, the average of each intermediate feature time series data is calculated to obtain the corresponding basic feature data, and the basic feature data is used as the first feature data of the initial preset sliding time window. For each group of first normalized time series data in a non-initial preset sliding time window, the current weight of each first normalized time series data is determined based on the fluctuation amplitude of each first normalized time series data in the current preset sliding time window. Then, the first normalized time series data is weighted based on the current weight to obtain the corresponding intermediate feature time series data. Then, the average of each intermediate feature time series data is calculated to obtain the corresponding basic feature data. Finally, time series smoothing is performed based on the basic feature data and the ventilation effectiveness feature time series data corresponding to the previous preset sliding time window to obtain the time series feature data of the non-initial preset sliding time window.
[0051] Further, determining the current weight of each of the first normalized time series data based on the fluctuation amplitude of each of the first normalized time series data within the current preset sliding time window includes: Based on the fluctuation range of each of the first normalized time series data, high volatility first normalized time series data and low volatility first normalized time series data are determined. For each low-volatility first normalized time series data, the weight corresponding to the previous preset sliding time window is reduced by a preset reduction value. Then, the total amount of the reduction value is evenly distributed to each high-volatility first normalized time series data as an upward adjustment value. Based on the upward adjustment value, the weight corresponding to the previous preset sliding time window is increased, and the weight of the first normalized time series data without volatility remains unchanged from the weight corresponding to the previous preset sliding time window, thus obtaining the current weight of each first normalized time series data.
[0052] Furthermore, the method also includes: If one or more of the current weights obtained after the reduction are less than the first preset threshold, the reduction value is re-determined to ensure that the one or more current weights are not less than the first preset threshold. If one or more of the current weights obtained after the adjustment are greater than the second preset threshold, the adjustment value is re-determined to ensure that the one or more current weights are not greater than the second preset threshold, and the total amount of the extra adjustment value is evenly distributed to each low-fluctuation first normalized time series data.
[0053] Specifically, the time series data representing the ventilation effectiveness are preprocessed and fused to obtain the corresponding ventilation effectiveness feature time series data. The key steps include: preprocessing, weighted fusion and time series smoothing based on a preset sliding time window, and dynamic adjustment of weights during the weighted fusion process.
[0054] First, in the preprocessing process, outliers in each ventilation effectiveness characterization time series data are removed using the 3σ criterion. For the i-th (i=1, 2, 3, 4) group of ventilation effectiveness characterization time series data, the mean of the time series data over a continuous 24 hours is calculated. with standard deviation Remove those outside the range Abnormal data (such as sensor false alarms, parameter jumps caused by instantaneous window opening / closing, and invalid data caused by poor sensor contact) are supplemented by linear interpolation to ensure the continuity of time series data. By removing outliers, invalid interference signals in the original data can be filtered out, avoiding distortion of subsequent fusion results caused by outliers and improving the authenticity and reliability of the data. Then, the min-max normalization method is used to map all ventilation effectiveness characterization time series data after removing outliers to the [0, 1] interval, eliminating the dimensional differences of different parameters (such as carbon dioxide concentration in ppm and temperature in ℃), and obtaining the first normalized time series data of each ventilation effectiveness characterization time series data. The normalization formula is:
[0055] in, This is the first normalized data of the i-th group of ventilation effectiveness characterization time series data at acquisition time t; This represents the raw data of the i-th group of ventilation effectiveness characterization time series data after removing outliers at acquisition time t. Let i be the minimum reasonable value of the time series data characterizing the ventilation effectiveness of the i-th group in a residential scenario, for example, 350 ppm carbon dioxide, 10°C temperature, 10% relative humidity, and 95 kPa indoor air pressure. Let be the maximum reasonable value of the time series data characterizing the ventilation effectiveness of the i-th group in a residential setting, for example, carbon dioxide 5000ppm, temperature 35℃, relative humidity 100%, and indoor air pressure 105kPa.
[0056] Normalization can eliminate the differences in the dimensions of different parameters, ensuring that all input data are within the same numerical range, providing a unified calculation benchmark for subsequent weighted fusion, and avoiding weight failure due to differences in the magnitude of parameter values.
[0057] Second, in the weighted fusion and temporal smoothing process based on a preset sliding time window, for the fusion calculation of the initial preset sliding time window, which refers to the first sliding window in the time series without feature data and weight references from a preceding window, a preset initial weight is used to complete the fusion calculation. The specific process is as follows: 1. Preset Initial Weights: Based on the priority of each parameter in representing ventilation effectiveness, preset initial weights are set for the four sets of first normalized time-series data. The sum of all weights is always 1. Specifically, the initial weights for carbon dioxide concentration time-series data can be: Initial weights of indoor temperature time series data Initial weights of relative humidity time series data Initial weights of indoor air pressure time series data .
[0058] 2. Calculation of intermediate feature time series data: For each group of first normalized time series data within the initial preset sliding time window, weighted calculation is performed using the corresponding preset initial weights to obtain the intermediate feature data corresponding to each acquisition time within the window. All intermediate feature data are arranged in chronological order to form intermediate feature time series data. The calculation formula for intermediate feature data at a single time moment is as follows:
[0059] in, This represents the intermediate feature data at the k-th acquisition time within the window. The time of data collection within the window. The preset initial weights for the i-th group of data. For the i-th set of data in The first normalized data at any given moment.
[0060] 3. Basic Feature Data Calculation: Calculate the arithmetic mean of the intermediate feature data at all times within the window to obtain the basic feature data corresponding to the initial preset sliding time window. The formula is:
[0061] in, The basic feature data for the starting window is N, which is the number of collection points within the window (for example, if the sliding time window is 10 minutes and the collection compensation is 1 minute, then N=10).
[0062] 4. First Feature Data Output: The basic feature data is directly used as the first feature data for the initial preset sliding time window, i.e. ,in, The first feature data is the initial preset sliding time window. This is the end time of the data collection in the starting window.
[0063] The feature calculation of the first window is completed by setting the initial weights, which ensures the stability and rationality of the initial fusion results, conforms to the physical characterization of each parameter on the ventilation effectiveness, and provides a benchmark for the dynamic weight adjustment of subsequent non-starting windows.
[0064] For fusion calculations using non-initial preset sliding time windows (referring to all sliding windows after the initial window), dynamic weighted fusion and temporal smoothing can be achieved based on the weights and feature data of the previous window, combined with the fluctuations of parameters within the current window. The specific process is as follows: 1. Dynamic adjustment of current window weight: Based on the fluctuation range of each first normalized time series data in the current preset sliding time window, the current weight of each data is determined. The specific implementation process will be explained in detail later.
[0065] 2. Calculation of intermediate feature time series data and basic feature data: Using the same calculation logic as the starting window, the adjusted current weights are used to replace the preset initial weights to calculate the basic feature data of the current window.
[0066] 3. Temporal Smoothing Processing: Based on the basic feature data of the current window and the first feature data of the previous preset sliding time window, temporal smoothing is performed to obtain the first feature data of the current non-starting window. The formula is as follows:
[0067] in, Collect the first feature data corresponding to time t at the end of the current window; The end point of the previous window for data collection time. The corresponding first feature data; This is the time series smoothing coefficient, with a value ranging from 0.1 to 0.3, for example, it can be 0.2; This is the basic feature data for the current window.
[0068] 4. First feature data output: The result after time series smoothing is used as the first feature data of the current non-initial preset sliding time window.
[0069] In the above process, dynamic weight adjustment is used to adapt to the real-time ventilation status changes of the current window, thereby improving the relevance of the fusion results; temporal smoothing is used to avoid abrupt changes in the feature values of adjacent windows, filter out instantaneous fluctuations, ensure the continuity and stability of the feature time sequence, and at the same time fully preserve the long-term trend of ventilation status changes.
[0070] All the first feature data corresponding to the preset sliding time windows are concatenated and combined in the time sequence of the window sliding to obtain complete ventilation effectiveness feature time series data. In this time series data, each collection time corresponds to a first feature data, with a value range of [0, 1]. The higher the value, the better the indoor ventilation effectiveness at the corresponding time, and the lower the value, the weaker the ventilation capacity.
[0071] Multiple sets of scattered original parameters are transformed into a single, standardized sequence of ventilation state characteristics. This not only filters out the interference of the original data but also fully preserves the temporal fluctuation characteristics of the ventilation state, which can be directly used as input data for subsequent coupled analysis.
[0072] Third, during the dynamic adjustment of weights in the weighted fusion process, parameters sensitive to changes in ventilation status are identified by the amplitude of parameter fluctuations. The weight allocation is then dynamically adjusted to strengthen the characterization of sensitive parameters and weaken the interference of parameters without fluctuations. At the same time, upper and lower limits of weights are constrained to avoid imbalance in weight allocation. The specific implementation process is as follows: 1. Fluctuation Amplitude Calculation: For each group of first normalized time series data within the current preset sliding time window, calculate its fluctuation amplitude within the window. The formula is:
[0073] in, This represents the fluctuation range of the first normalized time series data in the i-th group within the current window; This represents the first normalized data for the i-th data set at the end time t of the current window; Let t be the first normalized data of the i-th group of data at the start time tT of the current window; T is the duration of the preset sliding time window, for example, 10 minutes.
[0074] 2. High / Low Volatility Data Classification: Data groups are classified based on volatility amplitude. High volatility first normalized time series data: for example, volatility amplitude The data was identified as high-volatility first-normalized time series data, indicating that this parameter is sensitive to changes in ventilation status within the current window and has a stronger characterization effect on ventilation effectiveness; low-volatility first-normalized time series data: the fluctuation amplitude... The data was identified as low-volatility, first-normalized data, indicating that the parameter shows no significant fluctuation within the current window and has a weak representation of changes in ventilation status; no fluctuation data: fluctuation amplitude The weights remain consistent with the previous window and are not adjusted.
[0075] 3. Dynamic weight adjustment, for example, setting the preset downward adjustment value to 0.05, with the following adjustment rules: For each set of low-volatility first-normalized time-series data, the weight is reduced by 0.05 based on the corresponding weight in the previous window, and the total reduction value of all low-volatility data is calculated. This total reduction value is then evenly distributed among all high-volatility first-normalized time-series data, serving as the upward adjustment value for each set of high-volatility data. For each set of high-volatility first-normalized time-series data, the corresponding upward adjustment value is added to the weight corresponding to the previous window. The weights of data without volatility remain consistent with the previous window and are not adjusted. After the weight adjustments are completed, the sum of the current weights of all data is guaranteed to be constant at 1. For example, in the current window, the carbon dioxide concentration data has a volatility of 0.12 (high volatility), the relative humidity data has a volatility of 0.01 (low volatility), and the other two sets of data have no volatility. In this case, the relative humidity weight is reduced by 0.05, the total reduction of 0.05 is evenly distributed among the carbon dioxide data, the carbon dioxide weight is increased by 0.05, the weights of the other two sets remain unchanged, and the sum of all weights after the adjustment is still 1.
[0076] By dynamically adjusting the weights, the weights are tilted towards parameters that are more sensitive to changes in ventilation status, thereby strengthening the representation role of core parameters and weakening the interference of parameters without fluctuations. This solves the problem that traditional fixed-weighted fusion cannot adapt to real-time changes in ventilation status and significantly improves the accuracy of the fusion results in representing the ventilation status.
[0077] 4. Weight upper and lower limit constraints: To avoid distortion of the fusion result due to unbalanced weight distribution, the first preset threshold (lower weight limit) is set to 0.1, and the second preset threshold (upper weight limit) is set to 0.4. The constraint rules are as follows: If the current weight of a certain group of data is less than 0.1 after the reduction, the reduction of the weight of that group of data will be stopped, and the reduction value and the total reduction amount of the remaining low volatility data will be recalculated to ensure that the current weight of all data is not less than 0.1. If the current weight of a certain group of data is greater than 0.4 after the adjustment, the adjustment of the weight of that group of data will be stopped, the adjustment value of the remaining high volatility data will be recalculated, and the total amount of the extra adjustment value will be evenly distributed to all low volatility data to ensure that the current weight of all data is not greater than 0.4. After the constraint adjustment is completed, verify again that the sum of all weights is always 1.
[0078] To avoid the fusion result becoming overly reliant on a single parameter due to excessively high weighting of a single parameter, or the core parameter failing to represent the function due to excessively low weighting, it is necessary to ensure the rationality and stability of weight allocation and further improve the reliability of the fusion result.
[0079] In one optional embodiment of this application, the preprocessing and time-series fusion of the accumulated hazardous gas characterization time-series data to obtain the corresponding accumulated hazardous gas characteristic time-series data includes: Outliers in the cumulative characterization time series data of each of the hazardous gases are removed, and the cumulative characterization time series data of each of the hazardous gases are normalized to obtain the second normalized time series data of the cumulative characterization time series data of each of the hazardous gases. Each of the second normalized time-series data is input into a preset multi-channel temporal attention fusion network. In the feature extraction layer, the low-concentration accumulation stage feature vectors of each of the second normalized time-series data are extracted through the long short-term memory (LSTM) network channels corresponding to each of the second normalized time-series data within a preset sliding time window. Then, in the attention mechanism layer, the current attention weights of each of the second normalized data in the corresponding preset sliding time window are obtained. Finally, in the feature fusion layer, the feature vectors of each low-concentration accumulation stage are concatenated and fully connected based on the current attention weights to obtain the second feature data corresponding to the preset sliding time window. The second feature data are combined according to the sliding time sequence to obtain the hazardous gas accumulation feature time-series data. The sliding step size of the preset sliding time window is the same as the acquisition step size of each hazardous gas accumulation characterization time-series data.
[0080] Further, the step of obtaining the current attention weights of each second normalized data point within the corresponding preset sliding time window at the attention mechanism layer includes: For each set of low-concentration accumulation stage feature vectors in the initial preset sliding time window, the preset weights corresponding to each low-concentration accumulation stage feature vector are used as the current attention weights of each low-concentration accumulation stage feature vector. For each set of low-concentration accumulation stage feature vectors in the non-initial preset sliding time window, the current attention weight of each low-concentration accumulation stage feature vector is determined based on the concentration accumulation rate and instantaneous surge amplitude of each second normalized time series data in the current preset sliding time window.
[0081] Specifically, the key steps for preprocessing and time-series fusion of the cumulative characterization time-series data of each hazardous gas to obtain the corresponding hazardous gas cumulative feature time-series data include: preprocessing and time-series fusion based on a preset multi-channel time-series attention fusion network.
[0082] First, during the preprocessing process, the original collected hazardous gas time series data are cleaned, baseline calibrated, and standardized to eliminate interference caused by sensor zero-point drift and dimensional differences. At the same time, the time series details in the low concentration range are preserved to provide high-quality input data for subsequent fusion calculations.
[0083] 1. Outlier Removal and Baseline Calibration: First, the 3σ criterion is used to remove outliers (such as sensor false alarms or jumps caused by transient interference) from the cumulative characterization time series data of each hazardous gas. Missing data after removal is supplemented using linear interpolation to ensure the continuity of the time series data. To address the issue of zero-point drift that easily occurs with long-term use of hazardous gas sensors, baseline calibration is performed on the time series data after outlier removal to eliminate errors caused by reference value offset. The calibration formula is:
[0084] in, The calibrated data for the cumulative characterization time series data of the j-th group of hazardous gases at acquisition time t; This is the raw data of the cumulative characterization time series data of the j-th group of hazardous gases at time t after removing outliers; is the baseline value of the hazardous gas parameters in group j, and is the average value of the time-series data collected continuously for 24 hours under risk-free operating conditions.
[0085] Filter out invalid interference signals in the raw data, eliminate reference deviations caused by sensor zero-point drift, ensure the authenticity of data in the low concentration range, and avoid masking early accumulation features caused by reference offset.
[0086] 2. Normalization processing employs a minimum-maximum normalization method, mapping all calibrated hazardous gas cumulative characterization time-series data to the [0, 1] interval to eliminate dimensional differences between different parameters (e.g., CO is measured in ppm, and alkane combustible gases in %LEL). Simultaneously, it prioritizes preserving the time-series details within the 0-50% alarm threshold range, resulting in the second normalized time-series data for each hazardous gas cumulative characterization time-series. The normalization formula is:
[0087] in, This is the second normalized data of the cumulative characterization time series data of the j-th group of hazardous gases at acquisition time t; The calibrated data for the cumulative characterization time series data of the j-th group of hazardous gases at acquisition time t; The minimum reasonable value of the parameters of the j-th group of hazardous gases is taken as 0 in this embodiment (the baseline value under risk-free operating conditions). Let be the alarm threshold for the parameters of the j-th group of hazardous gases, for example: CO is 50 ppm, hydrogen is 1000 ppm, alkane combustible gases are 10% LEL, and smoke particles are 0.3 mg / m³.
[0088] By eliminating the dimensional differences of different parameters and using the alarm threshold as the upper limit of normalization, the signal details in the low-concentration accumulation stage are amplified, solving the problem that traditional normalization methods easily mask early hidden danger characteristics, and laying the foundation for subsequent low-concentration accumulation feature extraction.
[0089] Second, based on the temporal fusion of a pre-defined multi-channel temporal attention fusion network, the accumulated feature time-series data of hazardous gases is obtained. This step is the core of hazardous gas accumulated feature extraction. It employs a multi-channel temporal attention fusion network that weights and differentiates the data with respect to the ventilation dimension. Multiple sets of second-normalized temporal data within each pre-defined sliding time window are transformed into second-feature data for the corresponding window, and finally concatenated to obtain complete hazardous gas accumulated feature time-series data. This network consists of three core modules: a feature extraction layer, an attention mechanism layer, and a feature fusion layer.
[0090] 1. Feature Extraction Layer: Feature Vector Extraction in the Low-Concentration Accumulation Stage For the four sets of second-normalized time-series data, four independent Long Short-Term Memory (LSTM) network channels were constructed, each corresponding to a set of hazardous gas parameters. This enabled the independent extraction of the time-series features of each parameter, avoiding interference between features from different risk sources. Simultaneously, a low-concentration feature enhancement module was designed to amplify early hazard signals. The specific process is as follows: Single-channel temporal feature extraction: Each LSTM channel has 32 neurons, and a dropout layer (dropout rate set to 0.2) is added to avoid overfitting. The input is the second normalized temporal data within the current preset sliding time window, and the output is the original feature vector of the corresponding parameters. The dimension is 1×32. The long-term dependence of hazardous gas concentration time series is captured by LSTM network, and the trend features of low concentration accumulation stage are accurately extracted. The multi-channel independent design retains the independent risk characteristics of different hazardous gases, avoids the mutual masking of signals of different hazard types, and solves the problem that traditional single-channel fusion is prone to missing specific types of hazards.
[0091] Low-concentration feature enhancement: Targeting the core characteristic of "low concentration, not exceeding the standard" for hidden hazards, a feature enhancement module is designed to amplify the feature vector in the low-concentration range, enhancing the identification of early-accumulation features. The enhancement formula is as follows:
[0092] in, The feature vector of the enhanced j-th group of parameters; The original feature vectors output by the LSTM channels; The enhancement factor has a value range of 0.3-0.5, for example, it can be 0.4; This represents the second normalized data for the j-th group of parameters at the end time t of the current window. This corresponds to the low concentration range where the concentration is below the 50% alarm threshold. The characteristic signals in this low concentration range are amplified in a targeted manner, with the amplification factor increasing as the concentration decreases. This emphasizes the early accumulation characteristics of hidden hazards, addressing the problem that traditional fusion technologies are insensitive to low concentration signals and prone to missing early hazards.
[0093] 2. Attention Mechanism Layer: Current attention weights are determined. This module is the core adaptive adjustment stage of the network. Based on the risk level and real-time changes of each parameter, it dynamically adjusts the attention weights of each channel feature, tilting the weights towards high-risk and highly variable parameters to improve the sensitivity of the fusion result to potential problems.
[0094] The attention weights for the initial preset sliding time window are determined. The initial preset sliding time window refers to the first sliding window in the time series, without any preceding window weight reference. Therefore, a preset initial weight based on the lethality priority of hazardous gases is used, and the sum of all weights is always 1. For example, the initial attention weights for CO concentration time series data... Initial attention weights for hydrogen concentration time series data Initial attention weights for time series data on alkane combustible gas concentrations Initial attention weights for time-series data on smoke particle concentration By pre-setting initial weights to prioritize more lethal hazardous gases, the initial fusion results are ensured to meet the core requirements of residential environment safety screening, providing a benchmark for subsequent dynamic weight adjustments outside the initial window.
[0095] The attention weights for non-initial preset sliding time windows are determined. These non-initial preset sliding time windows refer to all sliding windows after the initial window. Based on the concentration accumulation rate and instantaneous surge amplitude of each second normalized time-series data within the current window, the current attention weights for each channel are dynamically adjusted. The specific process is as follows: 2.1 Calculation of core indicators Concentration accumulation rate calculation, used to characterize the continuous accumulation trend of hazardous gases, is formulated as follows:
[0096] in, This represents the concentration accumulation rate of the j-th parameter within the current window, in % / 10min. This is the second normalized data of the j-th group of parameters at the end time t of the current window; For the j-th group of parameters at the start time t of the current window The second normalized data for T; The preset duration of the sliding time window can be 10 minutes; The alarm threshold for the j-th group of parameters is consistent with the value obtained in the normalization step.
[0097] The instantaneous surge amplitude calculation is used to capture instantaneous signals of sudden leaks, smoldering flames, and other emergency hazards. The formula is as follows:
[0098] Let be the instantaneous surge magnitude of the j-th group of parameters at the current acquisition time t; This represents the second normalized data of the j-th group of parameters at the current acquisition time t; This represents the second normalized data of the j-th group of parameters at the previous acquisition time t-1.
[0099] 2.2 Dynamic weight adjustment rules, which are illustrated below with specific examples: Low concentration cumulative weight adjustment: when the concentration accumulation rate of a certain parameter... When the concentration accumulation exceeds 5% of the alarm threshold within 10 minutes (the preset sliding time window), the attention weight of this parameter is increased from the initial value to... This strengthens the representational role of early, continuous accumulation features.
[0100] Instantaneous spike weight adjustment: When the instantaneous spike in a parameter... When the fluctuation exceeds 10% (a single fluctuation exceeds the alarm threshold by 10%), the attention weight of this parameter will be temporarily increased. It continuously operates a sliding window, focusing on capturing emergency hazard signals such as sudden leaks and early smoldering.
[0101] No-fluctuation weighting: When a parameter shows no significant fluctuation in the low concentration stage (cumulative rate) When this happens, the attention weight of this parameter is reduced from its initial value to... This reduces interference from risk-free parameters.
[0102] Weight Constraint: After adjustment, the sum of the current attention weights of all parameters remains constant at 1. The principle of "prioritizing key parameters and reducing them evenly" is adopted. The portion of the weight increase for a particular parameter is proportionally reduced across the remaining parameters to ensure a reasonable weight distribution. For example, if the cumulative rate of CO concentration within the current window is 6.2% / 10min (meeting the condition for increasing low-concentration accumulation), and the other three parameters show no significant fluctuations, then the attention weight of CO is increased to 0.3. The 0.05 increase is then evenly reduced across the other three parameters, with each parameter decreasing by approximately 0.017. After adjustment, the sum of all weights remains 1.
[0103] By capturing persistent hidden dangers through the concentration accumulation rate and capturing sudden emergency dangers through the instantaneous surge amplitude, adaptive weight adjustment is achieved for different types of dangers. The weights are tilted towards high-risk parameters, which greatly improves the sensitivity of the fusion results to early hidden dangers and solves the problem that traditional fixed-weight fusion cannot adapt to different types of dangers.
[0104] 2.3 Feature Fusion Layer: Second Feature Data Output and Feature Temporal Generation This module integrates and maps multi-channel features, outputs the second feature data corresponding to each window, and finally generates complete time-series data of hazardous gas cumulative features. The specific process is as follows: Feature concatenation and fully connected mapping: The attention-weighted 4-channel enhanced feature vectors are concatenated to obtain a fused feature vector, as shown in the formula:
[0105] in, This is the concatenated fused feature vector, with a dimension of 1×128; , , , These are the current attention weights for each group of parameters; , , , These are the feature vectors after parameter enhancement for each group.
[0106] The fused feature vector is input into a single fully connected layer (output dimension 1), which maps it to the second feature data corresponding to the current preset sliding time window, as shown in the formula:
[0107] in, Collect the second feature data corresponding to time t at the end of the current window; This is the weight matrix of the fully connected layer, with a dimension of 1×128; This is the bias term for the fully connected layer, with a dimension of 1×1.
[0108] Generation of Hazardous Gas Accumulation Feature Time Series Data: The second feature data corresponding to all preset sliding time windows are concatenated and combined according to the time sequence of the window sliding to obtain complete hazardous gas accumulation feature time series data. In this time series data, each acquisition time corresponds to a second feature data, with a value range of [0, 1]. Higher values indicate more severe indoor hazardous gas accumulation at the corresponding time, while lower values indicate lower accumulation risk. Integrating multi-channel independent features into a single, standardized hazardous gas accumulation characterization sequence not only preserves the independent features of different hazard types but also achieves unified quantification of overall risk. This sequence can be directly paired with the ventilation effectiveness feature time series data mentioned earlier as input data for subsequent coupled analysis.
[0109] Through the above processing, the accuracy of feature extraction is greatly improved. By using multi-channel independent feature extraction and low-concentration feature enhancement, the feature recognition sensitivity of early low-concentration accumulation hazards is improved by 40% compared with traditional fusion technology. The hazard adaptability is strong: by adjusting the dynamic attention weight based on the accumulation rate and the sudden increase amplitude, it can adaptively adapt to different types of hazards such as continuous accumulation type and sudden leakage type, solving the problem of poor generalization of traditional fusion technology for different hazard types.
[0110] In one optional embodiment of this application, the risk screening of the target living environment based on the synchronicity deviation, the ventilation effectiveness characteristic time series data, the hazardous gas accumulation characteristic time series data, multiple ventilation effectiveness characterization time series data, and multiple hazardous gas accumulation characterization time series data includes: If the synchronization deviation at the current moment is greater than the preset deviation value, and based on the ventilation effectiveness characteristic time series data, the hazardous gas accumulation characteristic time series data, multiple ventilation effectiveness characterization time series data, and multiple hazardous gas accumulation characterization time series data, it is determined that there is no significant risk in the target living environment, then the ventilation fluctuation amplitude and ventilation fluctuation rate are obtained based on the ventilation effectiveness characteristic time series data, and the hazardous gas fluctuation amplitude and hazardous gas fluctuation rate are obtained based on the hazardous gas accumulation characteristic time series data using a preset sliding time window; If the ventilation fluctuation rate at the current moment is within the first preset range, and the hazardous gas fluctuation rate for a consecutive preset number of moments is not less than the first preset value, then it is determined that the target living environment has the potential for false ventilation and hidden accumulation of hazardous gases; wherein, the consecutive preset number of moments includes the current moment and at least one moment before the current moment; If the ventilation fluctuation rate over the specified number of consecutive time intervals is not greater than a third preset value, and the current hazardous gas fluctuation rate is within a second preset range, then it is determined that the target residential environment has insufficient ventilation and a potential risk of hazardous gas accumulation; wherein, the third preset value is a negative number. If the ventilation fluctuation amplitude at the current moment and the previous moment are not less than the fourth preset value, and the dangerous gas fluctuation rate at the current moment is not less than the fifth preset value, and the dangerous gas fluctuation amplitude at the current moment is not less than the sixth preset value, then it is determined that there is a potential risk of sudden leakage in the target living environment that cannot be suppressed by ventilation.
[0111] The preset deviation value (denoted as ΔCorrth) is the critical threshold for distinguishing between normal operating condition synchronicity fluctuations and abnormal desynchronization. It refers to the maximum absolute difference between the reasonable fluctuation boundary of the synchronicity coefficient of ventilation effectiveness and hazardous gas accumulation under normal operating conditions and the synchronicity benchmark center value. When the real-time synchronicity deviation ΔCorr(t) > ΔCorrth, it is judged as an abnormal synchronicity. Based on the physical laws of normal operating conditions in the living environment, the synchronicity coefficient (Pearson correlation coefficient) under normal operating conditions follows a normal distribution. The 95% confidence interval method is used to determine the maximum reasonable fluctuation range of the synchronicity coefficient under normal operating conditions. The maximum difference between the boundary of this range and the benchmark center value is the preset deviation value. The core advantage of this method is that the 95% confidence interval covers the vast majority of random fluctuations under normal operating conditions. Synchronicity coefficients exceeding this interval are low-probability events (probability ≤ 5%), which can accurately identify abnormal desynchronization scenarios with an extremely low false positive rate, balancing the sensitivity and stability of risk screening.
[0112] Specifically, in conducting risk screening, this application's solution first performs a preliminary screening. This involves determining the magnitude of the current synchronization deviation from a preset deviation value and identifying any single hazardous gas warning. If the current synchronization deviation exceeds the preset deviation value, and no single hazardous gas warning is detected (i.e., a synchronization anomaly exists, but no single hazardous gas is present), then the risk screening continues. In other words, if the current synchronization deviation exceeds the preset deviation value, and based on the ventilation effectiveness characteristic time-series data, the hazardous gas cumulative characteristic time-series data, multiple ventilation effectiveness characterization time-series data, and multiple hazardous gas cumulative characterization time-series data, it is determined that the target living environment does not pose a significant risk, thus proceeding to the hidden risk screening stage.
[0113] Specifically, this application's solution, after completing the preliminary screening of potential risks based on synchronization deviation, accurately identifies three types of hidden safety hazards by matching the fluctuation characteristics of ventilation and hazardous gases. This solves the problem that traditional technologies cannot identify hidden hazards where "no single parameter exceeds the standard, but multiple parameters are coupled and pose a risk." At the same time, it clarifies the type of hazard, providing an explanatory basis for subsequent handling.
[0114] Step 1: Preliminary screening and calculation of core volatility indicators This step is a preliminary step in risk screening, which involves stratifying normal operating conditions and potential risk scenarios, and calculating the core quantitative indicators required for hazard identification.
[0115] 1.1 Determination of Synchronization Deviation and Preset Deviation Value The preset deviation value, in this embodiment, can be 0.2. This value is determined statistically based on the normal operating condition synchronization reference range [0.7, 0.9] mentioned above: Under normal operating conditions, the maximum reasonable deviation between the real-time synchronization coefficient and the reference center value is 0.2. Exceeding this value indicates that the changes in ventilation and hazardous gas trends have significantly lost synchronization. The complete judgment process is as follows: If the synchronization deviation ΔCorr(t) at the current acquisition time t is less than or equal to 0.2 (less than or equal to the preset deviation value), and the original ventilation effectiveness characterization time series data and the original hazardous gas cumulative characterization time series data are back-tracked to confirm that there are no parameters exceeding the standard and no significant abnormal fluctuations, it is determined that there is no significant risk at present, and the process proceeds to the subsequent fluctuation index calculation stage to continuously monitor trend changes.
[0116] If the synchronization deviation ΔCorr(t) at the current acquisition time t is greater than 0.2 (greater than the preset deviation value), and the condition is met for two consecutive acquisition times, it is determined to be an anomaly in synchronization, and the process directly enters the hidden danger judgment stage without the need for additional pre-calculation.
[0117] The formula for calculating synchronization deviation is as follows:
[0118] in, The synchronization deviation at the current moment, The number of feature values in the current calculation time period. This represents the ventilation effectiveness characteristic value at the k-th time point within the current time period. This represents the cumulative characteristic value of hazardous gases at the k-th time point within the current time period. This represents the average value of the ventilation effectiveness characteristic within the current time period. This represents the average cumulative characteristic value of hazardous gases within the current time period. The current time period can also be calculated using the preset sliding time window mentioned earlier; for example, it could be 10 minutes. It's understood that the current time period can also be other lengths depending on the requirements.
[0119] Risk stratification is achieved by setting a pre-defined deviation value. For normal operating conditions, only continuous trend monitoring is performed to reduce the amount of calculation. For scenarios with synchronous anomalies, the risk identification is directly entered into the hazard judgment, which improves the response rate of risk identification. At the same time, continuous verification at all times avoids misjudgment caused by instantaneous fluctuations.
[0120] 1.2 Calculation of Core Volatility Indicators For ease of explanation, this section uses a preset sliding time window, with the acquisition time t as the endpoint, to calculate the fluctuation rate and fluctuation amplitude at the corresponding time. All formulas and parameters are consistent with the logic above and have clear meanings: The formula for calculating the rate of change (quantifying the trend and speed of change of eigenvalues):
[0121]
[0122] in, The ventilation fluctuation rate is the rate of change at time t, expressed in 1 / 10 min. A positive value indicates an increase in ventilation effectiveness, while a negative value indicates a decrease in ventilation effectiveness. The value represents the rate of hazardous gas fluctuation at the time t, expressed in 1 / 10 min. A positive value indicates an accumulated increase in hazardous gas, while a negative value indicates an accumulated decrease in hazardous gas. , These are the ventilation effectiveness characteristic value and the hazardous gas accumulation characteristic value corresponding to the data collection time t, respectively. , These are the feature values corresponding to the acquisition time tT (the start time of the current window); T is the preset sliding time window duration, which can be 10 minutes.
[0123] Formula for calculating volatility (quantifying the degree of volatility of eigenvalues):
[0124]
[0125] The ventilation fluctuation amplitude corresponding to the acquisition time t is dimensionless and ranges from [0, 1]. The larger the value, the more severe the ventilation fluctuation. The value represents the fluctuation amplitude of hazardous gas at the time of data collection t. It is dimensionless and ranges from [0, 1]. The larger the value, the more intense the fluctuation of the cumulative state of hazardous gas.
[0126] The fluctuation rate and fluctuation amplitude are calculated by using a unified sliding window, which is fully aligned with the window logic of feature fusion mentioned above, ensuring data consistency. At the same time, the trend is quantified by rate and the degree of fluctuation is quantified by amplitude, providing accurate quantitative basis for subsequent hazard judgment and avoiding misjudgment caused by subjective judgment.
[0127] Step 2: Identification of Three Types of Hidden Hazards The number of consecutive preset time periods can be 3 consecutive collection time periods, including the current collection time t, and the two consecutive collection time periods t-1 and t-2 before t. This value is determined based on the temporal characteristics of potential hazards in the living environment. The stable trend of 3 consecutive time periods can effectively eliminate the interference of instantaneous fluctuations and ensure the stability of hazard judgment.
[0128] 2.1 Category 1 Hazard: Ventilation is not effective, and hazardous gases accumulate in a concealed manner. The first preset range can be [-0.02, 0.02] / 10min. This range indicates that the ventilation fluctuation rate is extremely small and the ventilation status is stable within the normal range, which corresponds to the core premise of "falsely effective ventilation" (stable and normal surface ventilation). The first preset value can be 0.05 / 10min. This value is determined based on the statistical upper limit of the fluctuation rate of hazardous gases under normal operating conditions. Values greater than or equal to this value indicate that the hazardous gases show a continuous upward trend, which corresponds to the core characteristic of hidden accumulation.
[0129] Preliminary verification: First, verify the ventilation effectiveness characteristic value at the current acquisition time t. (The normal ventilation range identified above), and all the original cumulative characterization time series data of hazardous gases did not reach the alarm threshold, which meets the core characteristics of "hidden hidden dangers" (no single parameter exceeded the standard). Core condition verification: ① Ventilation fluctuation rate at the current acquisition time t (Within the first preset range), indicating stable ventilation with no significant rise or fall; ② The hazardous gas fluctuation rate at three consecutive sampling times (t-2, t-1, t) all meet the requirements. (Not less than the first preset value), indicating a continuous and stable upward accumulation trend of hazardous gases; Final judgment: If all the above conditions are met simultaneously, it is determined that the target living environment has a hidden danger of ineffective ventilation and accumulation of hazardous gases.
[0130] By locking in the premise of "stable and normal ventilation" in the first preset interval, and verifying the core characteristic of "continuous gas accumulation" through rate verification at a preset number of consecutive time intervals, the system accurately identifies the hidden danger of "normal surface ventilation but actual gas accumulation" that traditional technologies cannot detect. At the same time, it eliminates misjudgments caused by instantaneous fluctuations through continuous time-lapse verification.
[0131] 2.2 Second type of hazard: Insufficient ventilation, accumulation of hazardous gases: The third preset value can be -0.05 / 10min. A negative value indicates that the ventilation effectiveness continues to decline. If it is not greater than this value (i.e., ≤-0.05 / 10min), it indicates that the ventilation capacity is showing a continuous downward trend, which corresponds to the core premise of "insufficient ventilation capacity". The second preset range can be [-0.02, 0.02] / 10min. This range indicates that the fluctuation rate of hazardous gas is extremely small and there is no obvious downward trend, which corresponds to the core feature of "ventilation decreases but gas is not discharged synchronously".
[0132] Preliminary verification: First, verify the ventilation effectiveness characteristic value at the current acquisition time t. (Below the lower limit of the normal ventilation range, insufficient ventilation capacity), and all original hazardous gas cumulative characterization time series data have not reached the alarm threshold, which meets the characteristics of hidden hidden dangers; Core condition verification: ① The ventilation fluctuation rate at three consecutive data collection times (t-2, t-1, t) all meet the requirements. (Not greater than the third preset value), indicating that the ventilation capacity shows a continuous and stable downward trend; ② The rate of change of hazardous gas at the current sampling time t. (In the second preset range), it indicates that the dangerous gas has not decreased significantly, has not been discharged synchronously with the decrease in ventilation capacity, and is in a state of slow accumulation; Final judgment: If all the above conditions are met, it is determined that the target living environment has insufficient ventilation and potential hazards of dangerous gas accumulation.
[0133] By verifying the rate at a predetermined number of consecutive time intervals, the core premise of "continuous decline in ventilation capacity" is locked in. By confirming the asynchronous characteristic of "no significant decrease in gas volume" through a second predetermined interval, the hidden and cumulative hidden dangers caused by progressive ventilation failure are accurately identified, solving the problem that traditional technologies can only identify complete ventilation failure and cannot identify progressive failure.
[0134] 2.3 Third type of hidden danger: Sudden leakage that cannot be contained by ventilation. The fourth preset value can be 0.1. This value is determined based on the statistical upper limit of the ventilation fluctuation amplitude under normal working conditions. It is not less than this value to indicate that the ventilation status fluctuates violently, corresponding to the scenario of residents actively ventilating (such as repeatedly opening and closing windows), that is, the premise that "ventilation action exists". The fifth preset value can be 0.05 / 10min; a value not less than this indicates that the hazardous gas is showing an upward trend. The sixth preset value can be 0.1. A value not less than this indicates a sudden and significant increase in the amount of hazardous gas, which corresponds to the core characteristic of a sudden leak.
[0135] Complete decision logic: Preliminary verification: All original cumulative hazardous gas characterization time series data did not reach the alarm threshold, which is consistent with the characteristics of a hidden hazard (not developed into an overt leak). Core condition verification: ① The ventilation fluctuation amplitudes at the current acquisition time t and the previous acquisition time t-1 both meet the requirements. (Not less than the fourth preset value), indicating that the ventilation status fluctuates drastically and residents are actively ventilating; ② The rate of change of hazardous gas at the current sampling time t. (Not less than the fifth preset value), indicating that the hazardous gas is showing an upward trend; ③ The fluctuation range of hazardous gas at the current sampling time t (Not less than the sixth preset value), indicating a sudden and significant increase in the amount of hazardous gas; Final determination: If all the above conditions are met simultaneously, it is determined that there is a potential hazard of sudden leakage in the target living environment that cannot be contained by ventilation.
[0136] By identifying the premise of "active ventilation" through ventilation fluctuation amplitude, and confirming the core characteristic of "uncontrollable sudden increase" through dual quantification of the rate and amplitude of hazardous gases, the system can accurately identify potential early leaks and solve the problem that traditional technologies can only identify excessive leaks but cannot identify early sudden leaks, thus allowing sufficient time for emergency response.
[0137] Figure 2 This invention provides a residential environment risk screening system, such as... Figure 2 As shown, it includes: The characterization time series data acquisition module 201 is used to acquire multiple ventilation effectiveness characterization time series data and multiple hazardous gas accumulation characterization time series data of the target living environment; wherein, the acquisition step size of each ventilation effectiveness characterization time series data is the same as the acquisition step size of each hazardous gas accumulation characterization time series data; The feature time series data acquisition module 202 is used to preprocess and time series fuse the time series data representing each ventilation effectiveness to obtain the corresponding ventilation effectiveness feature time series data, and to preprocess and time series fuse the time series data representing each hazardous gas accumulation to obtain the corresponding hazardous gas accumulation feature time series data; The risk screening module 203 is used to perform time-series data coupling analysis on the ventilation effectiveness characteristic time-series data and the hazardous gas accumulation characteristic time-series data, obtain the synchronization deviation between the ventilation effectiveness characteristic time-series data and the hazardous gas accumulation characteristic time-series data, and perform risk screening of the target living environment based on the synchronization deviation, the ventilation effectiveness characteristic time-series data, the hazardous gas accumulation characteristic time-series data, multiple ventilation effectiveness characterization time-series data and multiple hazardous gas accumulation characterization time-series data.
[0138] The solution provided in this application preprocesses and fuses the time-series data representing the ventilation effectiveness characteristics to obtain corresponding time-series data of ventilation effectiveness features, and preprocesses and fuses the time-series data representing the accumulation of hazardous gases to obtain corresponding time-series data of hazardous gas accumulation features. It then performs time-series data coupling analysis on the time-series data of ventilation effectiveness features and the time-series data of hazardous gas accumulation features to obtain the synchronization deviation between them. Based on the synchronization deviation, the time-series data of ventilation effectiveness features, the time-series data of hazardous gas accumulation features, multiple time-series data of ventilation effectiveness characteristics, and multiple time-series data of hazardous gas accumulation characteristics, it performs risk screening of the target residential environment. This solution can accurately identify hidden safety hazards where "all single parameters are within the normal range," achieving early screening of hazardous gas accumulation hazards and significantly improving the reliability of residential environment safety screening.
[0139] In one optional embodiment of this application, the ventilation effectiveness characterization time series data includes carbon dioxide concentration time series data, indoor temperature time series data, relative humidity time series data, and indoor air pressure time series data in the target living environment; The time-series data for the cumulative characterization of hazardous gases includes time-series data on carbon monoxide concentration, hydrogen concentration, alkane combustible gas concentration, and smoke particle concentration in the target living environment.
[0140] In one optional embodiment of this application, the preprocessing and time-series fusion of the ventilation effectiveness characterization time-series data to obtain the corresponding ventilation effectiveness feature time-series data includes: Outliers in the time series data of each ventilation effectiveness characterization are removed, and the time series data of each ventilation effectiveness characterization are normalized to obtain the first normalized time series data of each ventilation effectiveness characterization time series data. Based on a preset sliding time window, each of the first normalized time series data is subjected to sliding weighted fusion and time series smoothing to obtain the first feature data corresponding to each preset sliding time window. The first feature data is then combined according to the sliding time sequence to obtain the ventilation effectiveness feature time series data. The sliding step size of the preset sliding time window is the same as the acquisition step size of each ventilation effectiveness characterization time series data.
[0141] In one optional embodiment of this application, the step of performing sliding weighted fusion and temporal smoothing on each of the first normalized data based on a preset sliding time window to obtain the first feature data corresponding to each preset sliding time window includes: For each group of first normalized time series data in the initial preset sliding time window, the first normalized time series data is weighted according to the preset weight corresponding to each first normalized time series data to obtain the corresponding intermediate feature time series data. Then, the average of each intermediate feature time series data is calculated to obtain the corresponding basic feature data, and the basic feature data is used as the first feature data of the initial preset sliding time window. For each group of first normalized time series data in a non-initial preset sliding time window, the current weight of each first normalized time series data is determined based on the fluctuation amplitude of each first normalized time series data in the current preset sliding time window. Then, the first normalized time series data is weighted based on the current weight to obtain the corresponding intermediate feature time series data. Then, the average of each intermediate feature time series data is calculated to obtain the corresponding basic feature data. Finally, time series smoothing is performed based on the basic feature data and the ventilation effectiveness feature time series data corresponding to the previous preset sliding time window to obtain the time series feature data of the non-initial preset sliding time window.
[0142] In one optional embodiment of this application, determining the current weight of each of the first normalized time series data based on the fluctuation amplitude of each of the first normalized time series data within the current preset sliding time window includes: Based on the fluctuation range of each of the first normalized time series data, high volatility first normalized time series data and low volatility first normalized time series data are determined. For each low-volatility first normalized time series data, the weight corresponding to the previous preset sliding time window is reduced by a preset reduction value. Then, the total amount of the reduction value is evenly distributed to each high-volatility first normalized time series data as an upward adjustment value. Based on the upward adjustment value, the weight corresponding to the previous preset sliding time window is increased, and the weight of the first normalized time series data without volatility remains unchanged from the weight corresponding to the previous preset sliding time window, thus obtaining the current weight of each first normalized time series data.
[0143] In one optional embodiment of this application, the method further includes: If one or more of the current weights obtained after the reduction are less than the first preset threshold, the reduction value is re-determined to ensure that the one or more current weights are not less than the first preset threshold. If one or more of the current weights obtained after the adjustment are greater than the second preset threshold, the adjustment value is re-determined to ensure that the one or more current weights are not greater than the second preset threshold, and the total amount of the extra adjustment value is evenly distributed to each low-fluctuation first normalized time series data.
[0144] In one optional embodiment of this application, the preprocessing and time-series fusion of the accumulated hazardous gas characterization time-series data to obtain the corresponding accumulated hazardous gas characteristic time-series data includes: Outliers in the cumulative characterization time series data of each of the hazardous gases are removed, and the cumulative characterization time series data of each of the hazardous gases are normalized to obtain the second normalized time series data of the cumulative characterization time series data of each of the hazardous gases. Each of the second normalized time-series data is input into a preset multi-channel temporal attention fusion network. In the feature extraction layer, the low-concentration accumulation stage feature vectors of each of the second normalized time-series data are extracted through the long short-term memory (LSTM) network channels corresponding to each of the second normalized time-series data within a preset sliding time window. Then, in the attention mechanism layer, the current attention weights of each of the second normalized data in the corresponding preset sliding time window are obtained. Finally, in the feature fusion layer, the feature vectors of each low-concentration accumulation stage are concatenated and fully connected based on the current attention weights to obtain the second feature data corresponding to the preset sliding time window. The second feature data are combined according to the sliding time sequence to obtain the hazardous gas accumulation feature time-series data. The sliding step size of the preset sliding time window is the same as the acquisition step size of each hazardous gas accumulation characterization time-series data.
[0145] In one optional embodiment of this application, obtaining the current attention weight of each second normalized data within the corresponding preset sliding time window at the attention mechanism layer includes: For each set of low-concentration accumulation stage feature vectors in the initial preset sliding time window, the preset weights corresponding to each low-concentration accumulation stage feature vector are used as the current attention weights of each low-concentration accumulation stage feature vector. For each set of low-concentration accumulation stage feature vectors in the non-initial preset sliding time window, the current attention weight of each low-concentration accumulation stage feature vector is determined based on the concentration accumulation rate and instantaneous surge amplitude of each second normalized time series data in the current preset sliding time window.
[0146] In one optional embodiment of this application, the risk screening of the target living environment based on the synchronicity deviation, the ventilation effectiveness characteristic time series data, the hazardous gas accumulation characteristic time series data, multiple ventilation effectiveness characterization time series data, and multiple hazardous gas accumulation characterization time series data includes: If the synchronization deviation at the current moment is greater than the preset deviation value, and based on the ventilation effectiveness characteristic time series data, the hazardous gas accumulation characteristic time series data, multiple ventilation effectiveness characterization time series data, and multiple hazardous gas accumulation characterization time series data, it is determined that there is no significant risk in the target living environment, then the ventilation fluctuation amplitude and ventilation fluctuation rate are obtained based on the ventilation effectiveness characteristic time series data, and the hazardous gas fluctuation amplitude and hazardous gas fluctuation rate are obtained based on the hazardous gas accumulation characteristic time series data using a preset sliding time window; If the ventilation fluctuation rate at the current moment is within the first preset range, and the hazardous gas fluctuation rate for a consecutive preset number of moments is not less than the first preset value, then it is determined that the target living environment has the potential for false ventilation and hidden accumulation of hazardous gases; wherein, the consecutive preset number of moments includes the current moment and at least one moment before the current moment; If the ventilation fluctuation rate over the specified number of consecutive time intervals is not greater than a third preset value, and the current hazardous gas fluctuation rate is within a second preset range, then it is determined that the target residential environment has insufficient ventilation and a potential risk of hazardous gas accumulation; wherein, the third preset value is a negative number. If the ventilation fluctuation amplitude at the current moment and the previous moment are not less than the fourth preset value, and the dangerous gas fluctuation rate at the current moment is not less than the fifth preset value, and the dangerous gas fluctuation amplitude at the current moment is not less than the sixth preset value, then it is determined that there is a potential risk of sudden leakage in the target living environment that cannot be suppressed by ventilation.
[0147] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340. The processor 310 can call logic instructions in the memory 330 to execute a residential environment risk screening method. This method includes: acquiring multiple ventilation effectiveness characterization time-series data and multiple hazardous gas accumulation characterization time-series data for a target residential environment; wherein the acquisition step size of each ventilation effectiveness characterization time-series data is the same as the acquisition step size of each hazardous gas accumulation characterization time-series data; preprocessing and time-series fusion of each ventilation effectiveness characterization time-series data to obtain corresponding ventilation effectiveness feature time-series data, and preprocessing and time-series fusion of each hazardous gas accumulation characterization time-series data to obtain corresponding hazardous gas accumulation feature time-series data; performing time-series data coupling analysis on the ventilation effectiveness feature time-series data and the hazardous gas accumulation feature time-series data to obtain the synchronization deviation between the ventilation effectiveness feature time-series data and the hazardous gas accumulation feature time-series data, and performing risk screening of the target residential environment based on the synchronization deviation, the ventilation effectiveness feature time-series data, the hazardous gas accumulation feature time-series data, the multiple ventilation effectiveness characterization time-series data, and the multiple hazardous gas accumulation characterization time-series data.
[0148] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0149] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the residential environment risk screening method provided by the above methods. This method includes: acquiring multiple ventilation effectiveness characterization time-series data and multiple hazardous gas cumulative characterization time-series data of a target residential environment; wherein the acquisition step size of each ventilation effectiveness characterization time-series data is the same as the acquisition step size of each hazardous gas cumulative characterization time-series data; and preprocessing and time-series fusion of each ventilation effectiveness characterization time-series data to obtain a... The corresponding ventilation effectiveness characteristic time series data are used to preprocess and time series fuse the cumulative characterization time series data of each hazardous gas to obtain the corresponding cumulative characteristic time series data of hazardous gases. Time series data coupling analysis is performed on the ventilation effectiveness characteristic time series data and the cumulative characteristic time series data of hazardous gases to obtain the synchronization deviation between the ventilation effectiveness characteristic time series data and the cumulative characteristic time series data of hazardous gases. Based on the synchronization deviation, the ventilation effectiveness characteristic time series data, the cumulative characteristic time series data of hazardous gases, multiple ventilation effectiveness characterization time series data, and multiple cumulative characterization time series data of hazardous gases, risk screening of the target living environment is carried out.
[0150] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the residential environment risk screening method provided by the above methods. The method includes: acquiring multiple ventilation effectiveness characterization time-series data and multiple hazardous gas accumulation characterization time-series data of a target residential environment; wherein the acquisition step size of each ventilation effectiveness characterization time-series data is the same as the acquisition step size of each hazardous gas accumulation characterization time-series data; preprocessing and time-series fusing the ventilation effectiveness characterization time-series data to obtain corresponding ventilation effectiveness feature time-series data, and preprocessing and time-series fusing the hazardous gas accumulation characterization time-series data to obtain corresponding hazardous gas accumulation feature time-series data; performing time-series data coupling analysis on the ventilation effectiveness feature time-series data and the hazardous gas accumulation feature time-series data to obtain the synchronization deviation between the ventilation effectiveness feature time-series data and the hazardous gas accumulation feature time-series data, and performing risk screening of the target residential environment based on the synchronization deviation, the ventilation effectiveness feature time-series data, the hazardous gas accumulation feature time-series data, the multiple ventilation effectiveness characterization time-series data, and the multiple hazardous gas accumulation characterization time-series data.
[0151] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0152] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for screening risks in a residential environment, characterized in that, include: Acquire multiple time-series data on ventilation effectiveness and multiple time-series data on cumulative hazardous gas characteristics of the target living environment; wherein the acquisition step size of each of the ventilation effectiveness time-series data and the acquisition step size of each of the cumulative hazardous gas time-series data are the same; Preprocessing and time-series fusion of the ventilation effectiveness characterization time-series data of each of the above are used to obtain the corresponding ventilation effectiveness feature time-series data; preprocessing and time-series fusion of the hazardous gas accumulation characterization time-series data of each of the above are used to obtain the corresponding hazardous gas accumulation feature time-series data. A time-series data coupling analysis is performed on the ventilation effectiveness characteristic time-series data and the hazardous gas accumulation characteristic time-series data to obtain the synchronization deviation between the ventilation effectiveness characteristic time-series data and the hazardous gas accumulation characteristic time-series data. Based on the synchronization deviation, the ventilation effectiveness characteristic time-series data, the hazardous gas accumulation characteristic time-series data, multiple ventilation effectiveness characterization time-series data, and multiple hazardous gas accumulation characterization time-series data, risk screening of the target living environment is carried out.
2. The method according to claim 1, characterized in that, The time-series data characterizing the ventilation effectiveness includes time-series data of carbon dioxide concentration, indoor temperature, relative humidity, and indoor air pressure in the target living environment. The time-series data for the cumulative characterization of hazardous gases includes time-series data on carbon monoxide concentration, hydrogen concentration, alkane combustible gas concentration, and smoke particle concentration in the target living environment.
3. The method according to claim 2, characterized in that, The preprocessing and time-series fusion of the time-series data representing the ventilation effectiveness of each of the aforementioned data to obtain the corresponding time-series data of ventilation effectiveness features includes: Outliers in the time series data of each ventilation effectiveness characterization are removed, and the time series data of each ventilation effectiveness characterization are normalized to obtain the first normalized time series data of each ventilation effectiveness characterization time series data. Based on a preset sliding time window, each of the first normalized time series data is subjected to sliding weighted fusion and time series smoothing to obtain the first feature data corresponding to each preset sliding time window. The first feature data is then combined according to the sliding time sequence to obtain the ventilation effectiveness feature time series data. The sliding step size of the preset sliding time window is the same as the acquisition step size of each ventilation effectiveness characterization time series data.
4. The method according to claim 3, characterized in that, The first feature data corresponding to each preset sliding time window is obtained by performing sliding weighted fusion and time smoothing on each of the first normalized time series data based on a preset sliding time window, including: For each group of first normalized time series data in the initial preset sliding time window, the first normalized time series data is weighted according to the preset weight corresponding to each first normalized time series data to obtain the corresponding intermediate feature time series data. Then, the average of each intermediate feature time series data is calculated to obtain the corresponding basic feature data, and the basic feature data is used as the first feature data of the initial preset sliding time window. For each group of first normalized time series data in a non-initial preset sliding time window, the current weight of each first normalized time series data is determined based on the fluctuation amplitude of each first normalized time series data in the current preset sliding time window. Then, the first normalized time series data is weighted based on the current weight to obtain the corresponding intermediate feature time series data. Then, the average of each intermediate feature time series data is calculated to obtain the corresponding basic feature data. Finally, time series smoothing is performed based on the basic feature data and the ventilation effectiveness feature time series data corresponding to the previous preset sliding time window to obtain the time series feature data of the non-initial preset sliding time window.
5. The method according to claim 4, characterized in that, The step of determining the current weight of each of the first normalized time series data based on the fluctuation amplitude of each of the first normalized time series data within the current preset sliding time window includes: Based on the fluctuation range of each of the first normalized time series data, high volatility first normalized time series data and low volatility first normalized time series data are determined. For each low-volatility first normalized time series data, the weight corresponding to the previous preset sliding time window is reduced by a preset reduction value. Then, the total amount of the reduction value is evenly distributed to each high-volatility first normalized time series data as an upward adjustment value. Based on the upward adjustment value, the weight corresponding to the previous preset sliding time window is increased, and the weight of the first normalized time series data without volatility remains unchanged from the weight corresponding to the previous preset sliding time window, thus obtaining the current weight of each first normalized time series data.
6. The method according to claim 5, characterized in that, The method further includes: If one or more of the current weights obtained after the reduction are less than the first preset threshold, the reduction value is re-determined to ensure that the one or more current weights are not less than the first preset threshold. If one or more of the current weights obtained after the adjustment are greater than the second preset threshold, the adjustment value is re-determined to ensure that the one or more current weights are not greater than the second preset threshold, and the total amount of the extra adjustment value is evenly distributed to each low-fluctuation first normalized time series data.
7. The method according to claim 2, characterized in that, The process of preprocessing and time-series fusion of the accumulated characterization time-series data of each of the aforementioned hazardous gases to obtain the corresponding accumulated characteristic time-series data of hazardous gases includes: Outliers in the cumulative characterization time series data of each of the hazardous gases are removed, and the cumulative characterization time series data of each of the hazardous gases are normalized to obtain the second normalized time series data of the cumulative characterization time series data of each of the hazardous gases. Each of the second normalized time-series data is input into a preset multi-channel temporal attention fusion network. In the feature extraction layer, the low-concentration accumulation stage feature vectors of each of the second normalized time-series data are extracted through the long short-term memory (LSTM) network channels corresponding to each of the second normalized time-series data within a preset sliding time window. Then, in the attention mechanism layer, the current attention weights of each of the second normalized data in the corresponding preset sliding time window are obtained. Finally, in the feature fusion layer, the feature vectors of each low-concentration accumulation stage are concatenated and fully connected based on the current attention weights to obtain the second feature data corresponding to the preset sliding time window. The second feature data are combined according to the sliding time sequence to obtain the hazardous gas accumulation feature time-series data. The sliding step size of the preset sliding time window is the same as the acquisition step size of each hazardous gas accumulation characterization time-series data.
8. The method according to claim 7, characterized in that, The step of obtaining the current attention weight of each second normalized data in the corresponding preset sliding time window at the attention mechanism layer includes: For each set of low-concentration accumulation stage feature vectors in the initial preset sliding time window, the preset weights corresponding to each low-concentration accumulation stage feature vector are used as the current attention weights of each low-concentration accumulation stage feature vector. For each set of low-concentration accumulation stage feature vectors in the non-initial preset sliding time window, the current attention weight of each low-concentration accumulation stage feature vector is determined based on the concentration accumulation rate and instantaneous surge amplitude of each second normalized time series data in the current preset sliding time window.
9. The method according to claim 2, characterized in that, The risk screening of the target living environment based on the synchronicity deviation, the time-series data of ventilation effectiveness characteristics, the time-series data of hazardous gas accumulation characteristics, multiple time-series data of ventilation effectiveness characterization, and multiple time-series data of hazardous gas accumulation characterization includes: If the synchronization deviation at the current moment is greater than the preset deviation value, and based on the ventilation effectiveness characteristic time series data, the hazardous gas accumulation characteristic time series data, multiple ventilation effectiveness characterization time series data, and multiple hazardous gas accumulation characterization time series data, it is determined that there is no significant risk in the target living environment, then the ventilation fluctuation amplitude and ventilation fluctuation rate are obtained based on the ventilation effectiveness characteristic time series data, and the hazardous gas fluctuation amplitude and hazardous gas fluctuation rate are obtained based on the hazardous gas accumulation characteristic time series data using a preset sliding time window; If the ventilation fluctuation rate at the current moment is within the first preset range, and the hazardous gas fluctuation rate for a consecutive preset number of moments is not less than the first preset value, then it is determined that the target living environment has the potential for false ventilation and hidden accumulation of hazardous gases; wherein, the consecutive preset number of moments includes the current moment and at least one moment before the current moment; If the ventilation fluctuation rate over the specified number of consecutive time intervals is not greater than a third preset value, and the current hazardous gas fluctuation rate is within a second preset range, then it is determined that the target residential environment has insufficient ventilation and a potential risk of hazardous gas accumulation; wherein, the third preset value is a negative number. If the ventilation fluctuation amplitude at the current moment and the previous moment are not less than the fourth preset value, and the dangerous gas fluctuation rate at the current moment is not less than the fifth preset value, and the dangerous gas fluctuation amplitude at the current moment is not less than the sixth preset value, then it is determined that there is a potential risk of sudden leakage in the target living environment that cannot be suppressed by ventilation.
10. A residential environment risk screening system, characterized in that, include: The characterization time series data acquisition module is used to acquire multiple ventilation effectiveness characterization time series data and multiple hazardous gas accumulation characterization time series data of the target living environment; wherein, the acquisition step size of each ventilation effectiveness characterization time series data is the same as the acquisition step size of each hazardous gas accumulation characterization time series data; The feature time series data acquisition module is used to preprocess and time series fuse the time series data representing each ventilation effectiveness to obtain the corresponding ventilation effectiveness feature time series data, and to preprocess and time series fuse the time series data representing each hazardous gas accumulation to obtain the corresponding hazardous gas accumulation feature time series data; The risk screening module is used to perform time-series data coupling analysis on the ventilation effectiveness characteristic time-series data and the hazardous gas accumulation characteristic time-series data, obtain the synchronization deviation between the ventilation effectiveness characteristic time-series data and the hazardous gas accumulation characteristic time-series data, and perform risk screening of the target living environment based on the synchronization deviation, the ventilation effectiveness characteristic time-series data, the hazardous gas accumulation characteristic time-series data, multiple ventilation effectiveness characterization time-series data, and multiple hazardous gas accumulation characterization time-series data.