Smart City Building Fire Monitoring and Early Warning System Based on Multimodal Data
By using multimodal data processing technology in building fire monitoring systems, dynamically adjusting the early warning threshold and analyzing the temperature change trend, the accuracy problem of traditional systems when distinguishing abnormal data caused by non-fire factors is solved, and a more accurate fire warning is achieved.
Patent Information
- Application Number
- CN202510295447.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-03-13
AI Technical Summary
Traditional building fire monitoring systems find it difficult to distinguish abnormal data caused by non-fire factors when judging fires, resulting in inaccurate early warnings.
The smart city building fire monitoring and early warning system based on multimodal data is adopted, and the warning threshold is dynamically adjusted through technical means such as data collection, adaptive window adjustment, index smoothing algorithm and temperature difference analysis, and the warning threshold is accurately captured short-term fluctuations of smoke data and the changing trends of temperature data.
It improves the accuracy of fire warnings, reduces the interference of non-fire factors on early warnings, and achieves more comprehensive and accurate fire monitoring and early warnings.
Smart Images

Figure CN119811056B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a smart city building fire monitoring and early warning system based on multi-modal data. Background Art
[0002] With the acceleration of the global urbanization process, the density of buildings has gradually increased, resulting in an increasing risk of fires. Fires are characterized by rapid spread and strong destructive power. If a fire cannot be detected in time and effectively controlled and handled, it is extremely likely to cause heavy casualties and property losses. Therefore, in the construction of smart cities, how to efficiently and accurately monitor and early warn of building fires has become an important part of urban safety management.
[0003] Since the exponential smoothing algorithm has strong accuracy under stable data, in the traditional method of monitoring building fires, a fixed early warning value is set. By installing smoke concentration and temperature sensors indoors, the exponential smoothing algorithm is used to predict future values for the relevant data collected by the sensors, and it is judged whether the future value exceeds the early warning value. If the early warning threshold is exceeded, an alarm is issued and personnel are notified to escape the scene in time. However, due to non-fire factors such as smoking or cooking activities, characteristic data similar to those in the initial stage of a fire will be generated, such as a rapid increase in smoke concentration within a short period of time, or the smoke concentration reaching the early warning threshold. The fixed early warning value cannot effectively distinguish these anomalies caused by non-fire factors, and there may be a large error in predicting future values, resulting in the inability to accurately early warn of fires.
[0004] Therefore, how to improve the accuracy of building fire early warning has become an urgent problem to be solved. Summary of the Invention
[0005] In view of this, an embodiment of the present invention provides a smart city building fire monitoring and early warning system based on multi-modal data to solve the problem of how to improve the accuracy of building fire early warning.
[0006] An embodiment of the present invention provides a smart city building fire monitoring and early warning system based on multi-modal data. The system includes the following steps:
[0007] A data acquisition module, configured to collect temperature data and smoke data at any position within a historical period in any building respectively, obtain corresponding temperature data sequences and smoke data sequences, and construct an initial window with a preset size using the last smoke data in the smoke data sequence as the last data point in the window;
[0008] A data analysis module, configured to adjust the length of the initial window according to the data fluctuations in the smoke data sequence, obtain an adaptive window including the last smoke data in the smoke data sequence, and obtain a trend value of the data change in the adaptive window according to the data change trend in the adaptive window;
[0009] A threshold acquisition module, configured to use an exponential smoothing algorithm to obtain a predicted value at a future moment according to the smoke data in the adaptive window, obtain the actual smoke data at the future moment, and adjust a preset initial warning value according to the difference between the actual smoke data and the predicted value and the trend value to obtain an adaptive warning value at the future moment;
[0010] An abnormal warning module, configured to, if the actual smoke data at the future moment is greater than the adaptive warning value, obtain the temperature data corresponding to each smoke data in the adaptive window in the temperature data sequence to obtain a temperature subsequence, and perform a fire warning on any building according to the first-order temperature difference sequence of the temperature subsequence.
[0011] Further, the step in the data analysis module of adjusting the length of the initial window according to the data fluctuations in the smoke data sequence to obtain an adaptive window including the last smoke data in the smoke data sequence includes:
[0012] Perform a first-order difference operation on all the smoke data in the initial window to obtain a first-order difference sequence, and calculate the standard deviation of the first-order difference sequence to obtain the noise coefficient of the initial window;
[0013] If the noise coefficient is greater than or equal to a preset noise coefficient threshold, in the smoke data sequence, expand the length of the initial window by a first preset multiple to obtain a target length. If the target length is an even number, round up the target length to obtain the length of the adaptive window. If the target length is an odd number, use the target length as the length of the adaptive window;
[0014] If the noise coefficient is less than the preset noise coefficient threshold, reduce the length of the initial window according to the data change trend in the initial window to obtain an adaptive window including the last smoke data in the smoke data sequence.
[0015] Further, the step in the data analysis module of reducing the length of the initial window according to the data change trend in the initial window to obtain an adaptive window including the last smoke data in the smoke data sequence includes:
[0016] Calculate the mean absolute deviation of the initial window based on all the data in the initial window, subtract the mean absolute deviation multiplied by a second preset multiple from the constant 1 to obtain the reduction factor of the initial window, take the product of the length of the initial window and the reduction factor as the target length, round up and round down the target length respectively, and select the odd terms from the rounding results as the length of the adaptive window.
[0017] Further, in the data analysis module, based on the data change trend in the adaptive window, obtain the trend value of the data change in the adaptive window, including:
[0018] In the smoke data sequence, form a smoke subsequence with a preset number of smoke data before the last smoke data in the adaptive window and the last smoke data in the adaptive window, obtain the first-order difference sequence of the smoke subsequence, calculate the absolute value of the average of all difference values in the first-order difference sequence of the smoke subsequence to obtain the first change trend index of the data change in the adaptive window, where the number of all data in the smoke subsequence is the product of the number of all data in the initial window and the preset time span coefficient;
[0019] Based on the difference between every two adjacent smoke data in the adaptive window, obtain the second change trend index of the data change in the adaptive window;
[0020] Obtain the average smoke value of all smoke data in the adaptive window, and based on the difference between each smoke data in the adaptive window and the average smoke value, obtain the third change trend index of the data change in the adaptive window;
[0021] Perform a weighted sum of the first change trend index, the second change trend index, and the third change trend index of the data change in the adaptive window to obtain the trend value of the data change in the adaptive window.
[0022] Further, in the data analysis module, based on the difference between every two adjacent smoke data in the adaptive window, obtain the second change trend index of the data change in the adaptive window, including:
[0023] In the adaptive window, for any two adjacent smoke data, calculate the absolute value of the difference between the any two adjacent smoke data to obtain the smoke difference index between the any two adjacent smoke data, and take the product of the smoke difference index and the preset exponential decay coefficient as the local fluctuation index between the any two adjacent smoke data;
[0024] Obtain the local fluctuation index between every two adjacent smoke data in the adaptive window, calculate the average value of all local fluctuation indexes, and obtain the second change trend index of the data change in the adaptive window.
[0025] Further, in the data analysis module, according to the difference between each smoke data in the adaptive window and the average smoke value, obtain the third change trend index of the data change in the adaptive window, including:
[0026] Take each smoke data in the adaptive window as the target data, obtain the middle position of the adaptive window, calculate the difference between the position of each target data in the adaptive window and the middle position, obtain the position coefficient of each target data, accumulate the squares of all position coefficients to obtain the accumulated position coefficient value, and calculate the ratio between the position coefficient of each target data and the accumulated position coefficient value to obtain the position weight of each target data.
[0027] For any target data, calculate the difference between the target data and the average smoke value to obtain the deviation of the target data. In the adaptive window, according to the position of the any target data, obtain the symmetric data symmetric to the target data about the middle position, and calculate the product of the position weight of the symmetric data and the deviation of the target data to obtain the weighted deviation of the target data.
[0028] Accumulate the weighted deviations of all target data to obtain the third change trend index of the data change in the adaptive window.
[0029] Further, in the threshold acquisition module, according to the difference between the actual smoke data and the predicted value, and the trend value, adjust the preset initial warning value to obtain the adaptive warning value at the future moment, including:
[0030] Calculate the absolute value of the difference between the actual smoke data and the predicted value. If the absolute value of the difference is greater than the trend value, calculate the product of the first preset warning adjustment coefficient and the absolute value of the difference, and take the sum of the product and the preset initial warning value as the adaptive warning value at the future moment.
[0031] If the absolute value of the difference is less than or equal to the trend value, calculate the product of the second preset warning adjustment coefficient and the absolute value of the difference, and take the sum of the product and the preset initial warning value as the adaptive warning value at the future moment.
[0032] Further, in the abnormal warning module, according to the first-order temperature difference sequence of the temperature subsequence, conduct a fire warning for any building, including:
[0033] Calculate the absolute value of the average of all difference values in the first-order difference sequence of the temperature subsequence to obtain the temperature change index of the temperature subsequence;
[0034] If the temperature change index is greater than the preset temperature change index threshold, a fire warning is issued for any of the buildings.
[0035] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:
[0036] The present invention provides a smart city building fire monitoring and warning system based on multi-modal data, including a data acquisition module for respectively acquiring temperature data and smoke data at any position within a historical period in any building to obtain corresponding temperature data sequences and smoke data sequences, and constructing an initial window with a preset size using the last smoke data in the smoke data sequence as the last data point in the window; a data analysis module for adjusting the length of the initial window according to the data fluctuations in the smoke data sequence to obtain an adaptive window containing the last smoke data in the smoke data sequence, and obtaining a trend value of the data change in the adaptive window according to the data change trend in the adaptive window; a threshold acquisition module for using the exponential smoothing algorithm to obtain a predicted value at a future moment according to the smoke data in the adaptive window, obtaining the actual smoke data at the future moment, and adjusting a preset initial warning value according to the difference between the actual smoke data and the predicted value and the trend value to obtain an adaptive warning value at the future moment; an abnormal warning module for, if the actual smoke data at the future moment is greater than the adaptive warning value, obtaining the temperature data corresponding to each smoke data in the adaptive window in the temperature data sequence to obtain a temperature subsequence, and issuing a fire warning for any of the buildings according to the first-order temperature difference sequence of the temperature subsequence. Among them, an adaptive window is obtained according to the data change trend in the smoke data sequence to accurately capture the data fluctuations in a short time, and at the same time, the fire-like characteristics caused by smoking can be leveled off; further, the exponential smoothing algorithm is used to obtain a predicted value at a future moment according to the data in the adaptive window, and the initial warning value is adjusted according to the difference between the smoothed value and the actual value to obtain an adaptive warning value. Considering that some non-fire factors will also cause the smoke data to be too high, when the actual value exceeds the adaptive warning value, the change trend of the temperature data corresponding to each smoke data in the adaptive window is further analyzed, and a fire warning is issued for any building according to the change trend of the temperature data to reduce the interference of non-fire factors such as smoking and cooking on the fire warning and achieve a more comprehensive and accurate fire warning effect. Description of the Drawings
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0038] Figure 1 is a structural block diagram of a smart city building fire monitoring and early warning system based on multi-modal data provided in Embodiment 1 of the present invention. Detailed implementation manners
[0039] The following will describe in detail the embodiments of the present disclosure. The examples of the embodiments are shown in the drawings. The embodiments described below with reference to the drawings are exemplary and are intended to explain the present disclosure, and should not be construed as a limitation to the present disclosure.
[0040] It should be noted that the terms "first", "second", etc. in the specification of the present disclosure and the above drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure.
[0041] To illustrate the technical solutions of the present invention, the following will be described through specific embodiments.
[0042] See Figure 1 , which is a structural block diagram of a smart city building fire monitoring and early warning system based on multi-modal data provided in Embodiment 1 of the present invention. As Figure 1 shown, the system may include:
[0043] A data acquisition module 11, configured to respectively acquire temperature data and smoke data at any position within a historical period in any building, obtain corresponding temperature data sequences and smoke data sequences, and construct an initial window with a preset size using the last smoke data in the smoke data sequence as the last data point in the window.
[0044] In any building, temperature data and smoke data within 60 seconds are collected through smoke sensors and temperature sensors at any location, with a sampling frequency of once per second. There is no restriction here, and implementers can set it according to specific scenarios to obtain corresponding temperature data sequences and smoke data sequences. Among them, the last data in the data sequence is the data at the current moment. To ensure the accuracy and consistency of each data item in the data sequence, after obtaining all data sequences, each data item in all data sequences is preprocessed to achieve the purpose of data cleaning for all data sequences. Among them, data preprocessing includes but is not limited to: removing noise and outliers to ensure data accuracy. For missing data points, the mean value can be used to fill them; the data is normalized to make variables in different ranges have consistent dimensions, facilitating subsequent analysis and processing. Among them, data preprocessing techniques belong to existing technologies and will not be elaborated here.
[0045] The data analysis module 12 is used to adjust the length of the initial window according to the data fluctuations in the smoke data sequence to obtain an adaptive window containing the last smoke data in the smoke data sequence, and obtain the trend value of the data change in the adaptive window according to the data change trend in the adaptive window.
[0046] During a fire, since the smoke sensor has a strong perception of the smoke emitted during the combustion of combustibles, the smoke concentration is used as the main feature for fire monitoring, and the exponential smoothing algorithm is used to predict the smoke data at future moments. However, during the process of using the exponential smoothing algorithm to predict the smoke data at future moments, since the smoke concentration often rises sharply in the initial stage of the fire, it is first necessary to dynamically adjust the size of the initial window according to the change trend of the smoke data to obtain an adaptive window to accurately capture the smoke fluctuations within a short period of time and improve the accuracy of using the exponential smoothing algorithm to predict the smoke data at future moments. The steps for obtaining the adaptive window are as follows:
[0047] Perform a first-order difference operation on all smoke data within the initial window to obtain a first-order difference sequence, and calculate the standard deviation of the first-order difference sequence to obtain the noise coefficient of the initial window;
[0048] If the noise coefficient is greater than or equal to the preset noise coefficient threshold, in the smoke data sequence, expand the length of the initial window by a first preset multiple to obtain a target length. If the target length is an even number, round up the target length to obtain the length of the adaptive window. If the target length is an odd number, use the target length as the length of the adaptive window;
[0049] If the noise coefficient is less than the preset noise coefficient threshold, the length of the initial window is reduced according to the data fluctuation trend in the initial window to obtain an adaptive window containing the last smoke data in the smoke data sequence.
[0050] In one embodiment, the size of the initial window is set to 10, which is not limited here, and the implementer can set it according to the implementation scenario. An initial window with a size of 10 is constructed in the smoke data sequence, that is, the initial window contains 10 smoke data. Among them, the last data point in the initial window is the last smoke data in the smoke data sequence, that is, the smoke data at the current moment. Considering that there may be more noise in the smoke data in the initial window, therefore, first perform a first-order difference operation on all the data in the initial window to obtain a first-order difference sequence, and obtain the noise coefficient of the initial window according to the first-order difference sequence, which is used to reflect the amount of noise contained in the initial window. The calculation formula for the noise coefficient of the initial window is:
[0051]
[0052] Where, represents the noise coefficient of the initial window, represents the number of all data in the initial window, represents the i-th smoke data in the initial window, represents the (i - 1)-th smoke data in the initial window, represents the mean value of all difference values in the first-order difference sequence of all smoke data in the initial window.
[0053] It should be noted that, the larger the value of is, the greater the difference between the difference value and the average value in the first-order difference sequence of all smoke data in the initial window, and the greater the fluctuation degree of the smoke data in the initial window. Furthermore,
[0054] the larger the value of is, the greater the possibility that the smoke data in the initial window is abnormal.
[0054] Set the preset noise coefficient threshold to 0.3, which is not limited here, and the implementer can set it according to the specific implementation scenario. If the noise coefficient of the initial window is greater than or equal to 0.3, it is considered that there is more noise in the initial window. At this time, the length of the initial window needs to be expanded in the smoke data sequence to increase the amount of data. Set the first preset multiple to 2, which is not limited here, and the implementer can set it according to the specific implementation scenario. If the noise coefficient of the initial window is greater than or equal to 0.3, the length of the initial window is expanded to that is, the target length is Since is an even number, so is rounded up to an odd number, that is, , take as the length of the adaptive window.
[0055] If the noise coefficient of the initial window is less than 0.3, it is considered that the noise value in the initial window is small. At this time, according to the change amplitude of the data in the initial window, the length of the initial window is reduced in the smoke data sequence to obtain an adaptive window to reduce the data volume and capture the details of data changes. The greater the change amplitude in the initial window, the greater the reduction degree of the initial window, so that it can capture the data changes in the short term more frequently. The steps to reduce the length of the initial window to obtain an adaptive window are as follows:
[0056] According to all the data in the initial window, calculate the mean absolute deviation of the initial window, subtract the second preset multiple of the mean absolute deviation from the constant 1 to obtain the reduction coefficient of the initial window, take the product between the length of the initial window and the reduction coefficient as the target length, round up and round down the target length respectively, and select the odd term in the rounding results as the length of the adaptive window.
[0057] In an embodiment, the calculation formula for obtaining the target length after reducing the length of the initial window is:
[0058]
[0059] Among them, represents the target length, that is, the number of all smoke data in the adaptive window, represents the length of the initial window, represents the second preset multiple, represents the i-th smoke data in the initial window, represents the average value of all smoke data in the initial window, 1 represents a constant, represents the absolute value symbol.
[0060] It should be noted that the second preset multiple is set to 0.1, which is not limited here, and the implementer can set it according to the specific implementation scenario. is the mean absolute deviation of the initial window, is the reduction coefficient of the initial window, and its result range is , the greater the mean absolute deviation, the greater the change amplitude of the data in the initial window. At this time, the reduction degree of the initial window is greater, and thus the value of the reduction coefficient is smaller, The value of is small, and the length of the initial window after reduction is smaller, that is, the reduction degree of the initial window is greater.
[0061] Since the calculated value of W is likely to be a decimal, the value of W is rounded up and rounded down respectively, and the odd term is selected from the rounding results as the length of the adaptive window.
[0062] At this point, an adaptive window containing the last smoke data in the smoke data sequence is obtained. The number of all smoke data in the adaptive window is odd, and the data in the adaptive window can reflect the change trend of the smoke data in a short period of time.
[0063] In the process of predicting the data at a future moment by using the exponential smoothing algorithm based on the data in the adaptive window, it is considered that the occurrence of smoke does not necessarily mean a fire. For example, someone smokes near the smoke sensor, or someone cooks near the smoke sensor. At this time, the smoke concentration rises rapidly in a short period of time, generating smoke similar to that in the event of a fire, and then reaching the warning threshold, resulting in a misjudgment of the fire situation. Therefore, the predicted value at a future moment obtained by using the exponential smoothing algorithm cannot fully reflect the fire trend. It is necessary to analyze the change trend of the smoke data at the current moment in the long term in the smoke data sequence based on the last smoke data (the smoke data at the current moment) in the adaptive window. By comprehensively analyzing the long-term and short-term change trends of the smoke data, the trend value of the data change in the adaptive window is obtained, which is used to characterize the degree of change of the smoke data at the current moment, so as to reduce the possibility of misjudgment caused by local extreme values or outliers, and adaptively adjust the warning value of the fire at a future moment according to the trend value. The steps for obtaining the trend value of the data change in the adaptive window are as follows:
[0064] (1) In the smoke data sequence, according to the data change trend of a preset number of smoke data before the last smoke data in the adaptive window, the first change trend index of the data change in the adaptive window is obtained.
[0065] In the smoke data sequence, a preset number of smoke data before the last smoke data in the adaptive window and the last smoke data in the adaptive window are combined to form a smoke subsequence. The first-order difference sequence of the smoke subsequence is obtained, and the absolute value of the average of all difference values in the first-order difference sequence of the smoke subsequence is calculated to obtain the first change trend index of the data change in the adaptive window, where the number of all data in the smoke subsequence is the product of the number of all data in the initial window and the preset time-span coefficient.
[0066] In an embodiment, it is assumed that the last smoke data in the adaptive window is the k-th smoke data in the smoke data sequence, and the preset time-span coefficient is set to 3. There is no limitation here, and the implementer can set it according to the specific scenario. Then the number of all data in the smoke subsequence is , that is, in the smoke data sequence, the 29 smoke data before the k-th smoke data and the k-th smoke data form a smoke subsequence. The first change trend index is obtained according to the first-order difference sequence of the smoke subsequence, which is used to characterize the change trend of the smoke data at the current moment in a long time. The calculation formula of the first change trend index is as follows:
[0067]
[0068] Wherein, represents the first change trend index, represents the n-th smoke data in the smoke subsequence, represents the (n - 1)-th smoke data in the smoke subsequence, represents the number of all data in the smoke subsequence, represents the absolute value symbol.
[0069] It should be noted that, the larger the value of , the greater the fluctuation degree of the smoke data in the long term. Furthermore,
[0070] (2) According to the difference between every two adjacent smoke data in the adaptive window, the second change trend index of the data change in the adaptive window is obtained.
[0071] In the adaptive window, for any two adjacent smoke data, calculate the absolute value of the difference between the any two adjacent smoke data to obtain the smoke difference index between the any two adjacent smoke data, and take the product of the smoke difference index and the preset exponential decay coefficient as the local fluctuation index between the any two adjacent smoke data;
[0072] Obtain the local fluctuation indexes between every two adjacent smoke data in the adaptive window, and calculate the average value of all local fluctuation indexes to obtain the second change trend index of the data change in the adaptive window.
[0073] In an embodiment, assume that the last smoke data in the adaptive window is the t-th smoke data in the adaptive window. The second change trend index is obtained according to the difference between every two adjacent smoke data in the adaptive window, which is used to characterize the change trend of the smoke data at the current moment in a short time. The calculation formula of the second change trend index is as follows:
[0074]
[0075] Wherein, represents the second change trend index, represents the quantity of all smoke data in the adaptive window, and j represents the position of each smoke data in the adaptive window. represents the th smoke data in the adaptive window. represents the th smoke data in the adaptive window. represents the preset exponential decay coefficient. represents the absolute value symbol.
[0076] It should be noted that is the smoke difference index between two adjacent smoke data in the adaptive window. is the local fluctuation index between two adjacent smoke data in the adaptive window. Set to be 0.9. There is no limit here, and the implementer can implement according to the specific scenario. The smaller the value of j, the closer the distance between the rd smoke data and the th smoke data and the tth smoke data (the smoke data at the current moment) in the adaptive window. A larger weight should be assigned to , and then is larger, enabling the change trend of smoke data to be captured more sensitively. The larger the smoke difference index, the greater the fluctuation degree of the smoke data in the adaptive window, and then the larger the local fluctuation index. is larger, indicating that the short-term data change trend of the smoke data at the current moment is greater, and the trend value of the data change in the adaptive window is greater.
[0077] (3) According to the difference between each smoke data in the adaptive window and the average smoke value, obtain the third change trend index of the data change in the adaptive window.
[0078] Take each smoke data in the adaptive window as the target data, obtain the middle position of the adaptive window, calculate the difference between the position of each target data in the adaptive window and the middle position, obtain the position coefficient of each target data, accumulate the squares of all position coefficients to obtain the accumulated position coefficient value, and calculate the ratio between the position coefficient of each target data and the accumulated position coefficient value to obtain the position weight of each target data.
[0079] Obtain the average smoke value of all smoke data in the adaptive window. For any target data, calculate the difference between the target data and the average smoke value to obtain the deviation of the target data. In the adaptive window, according to the position of the any target data, obtain the symmetric data symmetric to the target data about the middle position, and calculate the product of the position weight of the symmetric data and the deviation of the target data to obtain the weighted deviation of the target data;
[0080] Accumulate the weighted deviations of all target data to obtain the third change trend index of the data change in the adaptive window.
[0081] In one embodiment, considering that there is noise data in the adaptive window, in order to prevent the noise data from being amplified during the calculation and avoid unnecessary interference, calculate the average value of all smoke data in the adaptive window, denoted as the average smoke value, and reduce the unnecessary interference brought by the noise points through the difference between each smoke data and the average smoke value in the adaptive window.
[0082] At the same time, in order to avoid excessive deviation of the data at one end of the adaptive window from the result, obtain the middle position of the adaptive window, and obtain its position weight according to the difference between the position of each smoke data (target data) in the adaptive window and the middle position, so that the closer the noise data (target data) is to the middle position, the greater its corresponding position weight, to amplify the influence of the central position.
[0083] Therefore, according to the difference between each smoke data and the average smoke value in the adaptive window, and the position of each smoke data in the adaptive window, obtain the third change trend index, which is used to characterize the change trend of the smoke data at the current moment in a short time. Then the calculation formula of the third change trend index is:
[0084]
[0085] Among them, represents the third change trend index, represents the number of all smoke data in the adaptive window, represents the th smoke data in the adaptive window, represents the average smoke value, j represents the position of each smoke data in the adaptive window, represents the ceiling symbol.
[0086] It should be noted that, is the middle position of the adaptive window, is the position coefficient of the jth smoke data (target data) in the adaptive window, is the accumulated value of the position coefficient, is the position weight of the j-th smoke data (target data) in the adaptive window. The symmetric data of the -th smoke data symmetric about the middle position is the j-th smoke data. The closer the -th smoke data is to the middle position, the closer the j-th smoke data is to the middle position, and the greater its position weight; The larger the value of , the greater the difference between the -th smoke data in the adaptive window and the average smoke value, indicating a greater degree of fluctuation of the smoke data in the adaptive window. Furthermore,
[0087] (4) Combine the first change trend index, the second change trend index, and the third change trend index of the data change in the adaptive window to obtain the trend value of the data change in the adaptive window.
[0088] Specifically, perform a weighted sum of the first change trend index, the second change trend index, and the third change trend index of the data change in the adaptive window to obtain the trend value of the data change in the adaptive window.
[0089] In an embodiment, the first change trend index obtained in the above step is used to characterize the long-term change trend of the data, and the second change trend index and the third change trend index are used to characterize the short-term change trend of the data. Combining the long-term trend and the short-term trend of the data enables the result to reflect both short-term changes and capture long-term trends. Then the calculation formula for the trend value of the data change in the adaptive window is:
[0090]
[0091] Among them, represents the trend value of the data change in the adaptive window, represents the first change trend index, represents the second change trend index, represents the third change trend index, represents the first weight coefficient, represents the second weight coefficient, represents the third weight coefficient.
[0092] It should be noted that 6, , , there is no restriction here, and the implementer can set it according to the specific implementation scenario. The larger the value of The larger the value, the greater the trend value of the data change in the adaptive window; The larger the value, the greater the degree of fluctuation of the smoke data in the short term, and thus The larger the value, the greater the trend value of the data change in the adaptive window; The larger the value, the greater the short-term data change trend of the smoke data at the current moment, and thus The larger the value, the greater the trend value of the data change in the adaptive window.
[0093] Thus, the trend value of the data change in the adaptive window is obtained.
[0094] The threshold acquisition module 13 is used to obtain the predicted value at the future moment according to the smoke data in the adaptive window by using the exponential smoothing algorithm, obtain the actual smoke data at the future moment, and adjust the preset initial warning value according to the difference between the actual smoke data and the predicted value, and the trend value, to obtain the adaptive warning value at the future moment.
[0095] Using the exponential smoothing algorithm, the predicted value at the future moment is obtained according to the smoke data in the adaptive window. Among them, the exponential smoothing algorithm is an existing technology and will not be elaborated here. Due to the influence of non-fire factors, the predicted value cannot accurately reflect the smoke data at the future moment, that is, there is a difference between the predicted value and the actual value at the current moment. Therefore, it is necessary to compare the difference between the predicted value and the actual value at the current moment with the trend value, and adjust the fixed warning threshold according to the comparison result to obtain the adaptive warning value at the future moment, making it more accurate and reasonable. Then the specific method for obtaining the adaptive warning value at the future moment is:
[0096] Calculate the absolute value of the difference between the actual smoke data and the predicted value. If the absolute value of the difference is greater than the trend value, calculate the product of the first preset warning adjustment coefficient and the absolute value of the difference, and take the sum of the product and the preset initial warning value as the adaptive warning value at the future moment;
[0097] If the absolute value of the difference is less than or equal to the trend value, calculate the product of the second preset warning adjustment coefficient and the absolute value of the difference, and take the sum of the product and the preset initial warning value as the adaptive warning value at the future moment.
[0098] In an embodiment, the first preset warning adjustment coefficient is set to 0.1, the second preset warning adjustment coefficient is set to -0.1, and the preset initial warning value is set to 0.3. There is no limitation here, and the implementer can set according to the specific scenario. Then the calculation formula of the adaptive warning value is:
[0099]
[0100] Among them, represents the adaptive early warning value at a future moment, represents the preset initial early warning value. If , then , if , then , represents the actual smoke data at a future moment, represents the predicted value of the smoke data at a future moment, represents the absolute value symbol.
[0101] It should be noted that if , it indicates that the actual smoke data at a future moment fluctuates violently within its local range and does not show a stable upward trend. It may be affected by short-term noise or accidental events (such as smoking, cooking). At this time, the initial early warning value needs to be increased, that is , to avoid premature alarms;
[0102] If , it indicates that the actual smoke data at a future moment changes smoothly within its local range and shows an overall upward trend. This situation usually represents a potential fire. At this time, the initial early warning value needs to be decreased, that is , to enhance the sensitivity and facilitate early detection of the fire trend.
[0103] The abnormal early warning module 14 is used to, if the actual smoke data at the future moment is greater than the adaptive early warning value, obtain the temperature data corresponding to each smoke data in the adaptive window in the temperature data sequence to obtain a temperature subsequence, and perform a fire warning on any building according to the first-order temperature difference sequence of the temperature subsequence.
[0104] If the actual smoke data at a future moment is greater than the adaptive early warning value, it indicates that a fire may occur at this time. However, considering special situations such as someone smoking near the smoke sensor or someone cooking near the smoke sensor, these special situations will cause the smoke data to fluctuate and show an upward trend in the short term. At the same time, the temperature data will only rise in the short term and the rising amplitude is small, and then return to normal, or the temperature data will not change. But if a fire occurs, its temperature data grows slowly in the initial stage of the fire and may rise sharply in the middle or late stage of the fire. Therefore, it is necessary to obtain the temperature data corresponding to each smoke data in the adaptive window in the temperature data sequence to obtain a temperature subsequence, and characterize the change trend of the temperature data in the temperature subsequence through the first-order difference sequence of the temperature subsequence to obtain a temperature change index, and perform a fire warning on the building according to the temperature change index. The specific acquisition method of the temperature change index is as follows:
[0105] Calculate the absolute value of the average of all difference values in the first-order difference sequence of the temperature subsequence to obtain the temperature change index of the temperature subsequence.
[0106] In one embodiment, assume that the last temperature data in the temperature subsequence is the u-th temperature data in the temperature subsequence. The calculation formula for the temperature change index is:
[0107]
[0108] where Z represents the temperature change index, M represents the number of all data in the temperature subsequence, represents the -th temperature data in the temperature subsequence, represents the -th temperature data in the temperature subsequence, represents the absolute value symbol.
[0109] It should be noted that the larger the value of
[0110] , the greater the fluctuation of the temperature data within a period of time, and thus the larger the value of Z, the greater the possibility of a fire. Set the preset temperature change index threshold to 0.1. There is no limitation here, and the implementer can set it according to the specific scenario. If
[0111] In summary, the present invention provides a smart city building fire monitoring and early warning system based on multi-modal data, including a data acquisition module for collecting temperature data and smoke data at any position within any building during a historical period to obtain corresponding temperature data sequences and smoke data sequences. Using the last smoke data in the smoke data sequence as the last data point in the window, an initial window of a preset size is constructed; a data analysis module for adjusting the length of the initial window according to the data fluctuations in the smoke data sequence to obtain an adaptive window containing the last smoke data in the smoke data sequence, and obtaining a trend value of the data change in the adaptive window according to the data change trend in the adaptive window; a threshold acquisition module for using the exponential smoothing algorithm to obtain a predicted value for a future moment based on the smoke data in the adaptive window, obtaining the actual smoke data for the future moment, and adjusting a preset initial warning value according to the difference between the actual smoke data and the predicted value and the trend value to obtain an adaptive warning value for the future moment; an abnormal warning module for, if the actual smoke data for the future moment is greater than the adaptive warning value, obtaining the temperature data corresponding to each smoke data in the adaptive window in the temperature data sequence to obtain a temperature subsequence, and performing a fire warning on the any building according to the first-order temperature difference sequence of the temperature subsequence. Among them, an adaptive window is obtained according to the data change trend in the smoke data sequence to accurately capture the data fluctuations in a short period of time, and at the same time, the fire-like characteristics caused by smoking can be leveled off; further, using the exponential smoothing algorithm, a predicted value for a future moment is obtained based on the data in the adaptive window, and the initial warning value is adjusted according to the difference between the smoothed value and the actual value to obtain an adaptive warning value. Considering that some non-fire factors will also cause the smoke data to be too high, when the actual value exceeds the adaptive warning value, the change trend of the temperature data corresponding to each smoke data in the adaptive window is further analyzed, and a fire warning is performed on any building according to the change trend of the temperature data to reduce the interference of non-fire factors such as smoking and cooking on the fire warning and achieve a more comprehensive and accurate fire warning effect.
[0112] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements 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, and should all be included in the protection scope of the present invention.
Claims
1. A smart city building fire monitoring and early warning system based on multimodal data, characterized in that: The smart city building fire monitoring and early warning system based on multimodal data includes: A data collection module is used to collect temperature data and smoke data at any location in a historical period in any building, obtain corresponding temperature data sequences and smoke data sequences, and construct an initial window of a preset size by taking the last smoke data in the smoke data sequence as the last data point in the window; A data analysis module, configured to adjust the length of the initial window according to data fluctuations in the smoke data sequence, obtain an adaptive window containing the last smoke data in the smoke data sequence, and obtain a trend value of data change in the adaptive window according to a data change trend in the adaptive window; A threshold acquisition module, used to obtain a predicted value at a future time according to the smoke data in the adaptive window by using an exponential smoothing algorithm, obtain actual smoke data at a future time, and adjust a preset initial warning value according to the difference between the actual smoke data and the predicted value and the trend value to obtain an adaptive warning value at a future time; The abnormal warning module is used for obtaining the temperature data corresponding to each smoke data in the adaptive window in the temperature data sequence to obtain a temperature subsequence if the actual smoke data at the future moment is greater than the adaptive warning value, and issuing a fire warning for any building according to the first-order temperature difference sequence of the temperature subsequence; The threshold acquisition module adjusts the preset initial warning value according to the difference between the actual smoke data and the predicted value, and the trend value, to obtain an adaptive warning value at a future moment, including: Calculate the absolute value of the difference between the actual smoke data and the predicted value. If the absolute value of the difference is greater than the trend value, calculate the product of a first preset warning adjustment coefficient and the absolute value of the difference, and use the sum of the product and the preset initial warning value as the adaptive warning value at a future moment; the first preset warning adjustment coefficient is greater than 0; If the absolute value of the difference is less than or equal to the trend value, the product of the second preset warning adjustment coefficient and the absolute value of the difference is calculated, and the sum of the product and the preset initial warning value is used as the adaptive warning value at the future moment, and the second preset warning adjustment coefficient is less than 0.
2. The smart city building fire monitoring and early warning system based on multimodal data according to claim 1 is characterized in that: The data analysis module adjusts the length of the initial window according to the data fluctuation in the smoke data sequence to obtain an adaptive window containing the last smoke data in the smoke data sequence, including: Performing a first-order difference operation on all smoke data in the initial window to obtain a first-order difference sequence, calculating a standard deviation of the first-order difference sequence, and obtaining a noise coefficient of the initial window; If the noise coefficient is greater than or equal to a preset noise coefficient threshold, then in the smoke data sequence, the length of the initial window is expanded by a first preset multiple to obtain a target length, if the target length is an even number, the target length is rounded up to obtain the length of the adaptive window, if the target length is an odd number, the target length is used as the length of the adaptive window; If the noise coefficient is less than the preset noise coefficient threshold, the length of the initial window is reduced according to the data fluctuation trend in the initial window to obtain an adaptive window containing the last smoke data in the smoke data sequence.
3. The smart city building fire monitoring and early warning system based on multimodal data according to claim 2 is characterized in that: The data analysis module reduces the length of the initial window according to the data fluctuation trend in the initial window to obtain an adaptive window containing the last smoke data in the smoke data sequence, including: According to all the data in the initial window, the average absolute deviation of the initial window is calculated, and the reduction coefficient of the initial window is obtained by subtracting the average absolute deviation of the second preset multiple from the constant 1. The product of the length of the initial window and the reduction coefficient is used as the target length, and the target length is rounded up and rounded down respectively, and the odd number item in the rounding result is selected as the length of the adaptive window.
4. The smart city building fire monitoring and early warning system based on multimodal data according to claim 2 is characterized in that: The data analysis module obtains a trend value of data change in the adaptive window according to the data change trend in the adaptive window, including: In the smoke data sequence, a preset number of smoke data before the last smoke data in the adaptive window and the last smoke data in the adaptive window are combined into a smoke subsequence, a first-order difference sequence of the smoke subsequence is obtained, and the absolute value of the average value of all difference values in the first-order difference sequence of the smoke subsequence is calculated to obtain a first change trend indicator of the data change in the adaptive window, wherein the number of all data in the smoke subsequence is the product of the number of all data in the initial window and a preset time span coefficient; According to the difference between every two adjacent smoke data in the adaptive window, a second change trend indicator of the data change in the adaptive window is obtained; Obtaining an average smoke value of all smoke data in the adaptive window, and obtaining a third change trend indicator of data change in the adaptive window according to a difference between each smoke data in the adaptive window and the average smoke value; The first change trend indicator, the second change trend indicator and the third change trend indicator of the data change in the adaptive window are weightedly summed to obtain the trend value of the data change in the adaptive window.
5. The smart city building fire monitoring and early warning system based on multimodal data according to claim 4 is characterized in that: The data analysis module obtains a second change trend indicator of data change in the adaptive window according to the difference between every two adjacent smoke data in the adaptive window, including: In the adaptive window, for any two adjacent smoke data, the absolute value of the difference between the two adjacent smoke data is calculated to obtain a smoke difference index between the two adjacent smoke data, and the product of the smoke difference index and a preset exponential decay coefficient is used as a local fluctuation index between the two adjacent smoke data; A local fluctuation index between every two adjacent smoke data in the adaptive window is obtained, and an average value of all local fluctuation indexes is calculated to obtain a second change trend index of the data change in the adaptive window.
6. The smart city building fire monitoring and early warning system based on multimodal data according to claim 4 is characterized in that: The data analysis module obtains a third change trend indicator of data change in the adaptive window according to the difference between each smoke data in the adaptive window and the average smoke value, including: Taking each smoke data in the adaptive window as target data, obtaining the middle position of the adaptive window, calculating the difference between the position of each target data in the adaptive window and the middle position, obtaining the position coefficient of each target data, accumulating the squares of all position coefficients to obtain the position coefficient accumulation value, calculating the ratio between the position coefficient of each target data and the position coefficient accumulation value, and obtaining the position weight of each target data; For any target data, the difference between the target data and the average smoke value is calculated to obtain the deviation of the target data; in the adaptive window, according to the position of any target data, symmetric data of the target data about the middle position is obtained, and the product of the position weight of the symmetric data and the deviation of the target data is calculated to obtain the weighted deviation of the target data; The weighted deviations of all target data are accumulated to obtain a third change trend indicator of the data change in the adaptive window.
7. The smart city building fire monitoring and early warning system based on multimodal data according to claim 1 is characterized in that: The abnormal warning module performs a fire warning on any building according to the first-order temperature difference sequence of the temperature subsequence, including: Calculating the absolute value of the average value of all difference values in the first-order difference sequence of the temperature subsequence to obtain the temperature change index of the temperature subsequence; If the temperature change index is greater than a preset temperature change index threshold, a fire warning is issued for any of the buildings.
Citation Information
Patent Citations
Fire alarm condition prediction method and system, intelligent terminal and storage medium
CN111402538A
Full pipe operation early warning analysis method for sewage pipe network
CN119168322A
Energy storage cabinet with temperature detection and alarm functions
CN119360586A