Fire alarm prediction method and device based on Gaussian process
Through the Gaussian process-based fire alarm prediction method, the dependence problem of large amounts of data and complex neural network models in the prior art is solved, efficient and accurate fire alarm prediction on small data sets is achieved, and the model parameter adjustment process is simplified.
Patent Information
- Application Number
- CN202510041208.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2045-01-10
AI Technical Summary
The prior art relies on large amounts of data and complex neural network models in long-term fire alarm prediction, resulting in easy overfitting on small data sets, and hyperparameter adjustment is cumbersome, increasing time cost.
The Gaussian process-based fire alarm prediction method is adopted, without the need for a large amount of data and neural network model construction, and by determining the number of alarms of fire equipment in different time periods, a Gaussian process model is established for prediction.
It improves the accuracy and reliability of fire alarm prediction, reduces dependence on sudden abnormal events, simplifies the model parameter adjustment process, and adapts to changes in data patterns, especially in long-term prediction.
Smart Images

Figure CN119476645A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of fire safety management technology, and in particular to a fire alarm prediction method and device based on Gaussian process. Background Art
[0002] With the acceleration of urbanization and the increase in building density, the risk of fire is increasing day by day. The rational dispatch of firefighting resources and the precise implementation of preventive measures have become crucial. In the context of high incidence of fires, the long-term prediction of fire alarms is particularly critical. By making long-term predictions of historical alarm data, relevant departments can discover high-risk areas and fire trends in advance, thereby optimizing emergency plans, deploying firefighting forces in advance, and minimizing casualties and property losses.
[0003] At present, the industry mainly uses IoT technology and neural network models to achieve long-term prediction of fire alarms. Sensors are connected to the Internet through IoT technology, collect environmental parameter data (such as temperature, humidity, smoke concentration, etc.) in real time, and transmit the data to the data processing system. After receiving the data from the sensor, the data processing system uses a neural network model to model the data. The neural network model can be of various types, such as multi-layer perceptron (MLP), convolutional neural network (CNN) or recurrent neural network (RNN). The appropriate model is selected according to the specific situation. The trained and optimized neural network model converts the input data into the probability of a fire alarm. This probability is based on the model's learning and prediction of the data and can be expressed as a quantitative indicator of the possibility of fire. The obtained fire alarm probability needs to be further processed to meet actual needs. For example, the alarm can be triggered according to the threshold setting, or combined with other data for more complex analysis and judgment.
[0004] However, this method relies on a large amount of data. Traditional neural network models require a large amount of known data for training. However, in actual situations, it is difficult to obtain large-scale alarm data, especially for situations where a small number of alarms are generated at a fixed location over a period of time. This causes the neural network to easily overfit on small data sets, which affects its performance on new data. In addition, hyperparameter adjustment is cumbersome. Neural network models have many hyperparameters that need to be adjusted, including learning rate, number of layers, number of neurons, etc. Selecting an appropriate combination of hyperparameters is a challenge and usually requires a lot of experiments and experience, which increases the tediousness and time cost of parameter adjustment.
[0005] Therefore, there is an urgent need for a method to achieve long-term prediction of fire alarms without the need for large amounts of data and the construction of neural network models. Summary of the invention
[0006] In view of this, the present application provides a fire alarm prediction method and device based on Gaussian process, which does not require a large amount of data and the construction of a neural network model to achieve long-term prediction of fire alarms.
[0007] Specifically, the present application is implemented through the following technical solutions: The first aspect of the present application provides a fire alarm prediction method based on Gaussian process, the method comprising: determining a first length of time based on fire alarm device status data within the first area and status data within the first area; Obtain the number of fire equipment alarms in the first time period in the first area, and generate alarm time series data, wherein the alarm time series data is vector data generated by arranging the number of fire equipment alarms in chronological order, and the time length of the first time period is the first time length; Wherein, a third time period identical to the second time period is determined according to the status data in the first area within the second time period, the time length of the third time period is greater than the first time length, the time of the first time length closest to the current time within the third time period is taken as the first time period, and the second time period is the time period corresponding to the number of fire equipment alarms predicted based on the Gaussian process; Establishing a Gaussian process model according to the alarm time series data; The number of fire equipment alarms in a second time period within the first area is predicted based on the learned Gaussian process model, and the length of the second time period is longer than that of the first time period.
[0008] The second aspect of the present application provides a fire alarm prediction device based on Gaussian process, the device includes a determination module, a generation module, a building module and a prediction module; wherein, The determination module is used to determine the first time length based on the fire alarm equipment status data in the first area and the status data in the first area; The generating module is used to obtain the number of fire equipment alarms in the first time period in the first area, and generate alarm time series data, wherein the alarm time series data is vector data generated by arranging the number of fire equipment alarms in chronological order, and the time length of the first time period is the first time length; Wherein, a third time period identical to the second time period is determined according to the status data in the first area within the second time period, the time length of the third time period is greater than the first time length, the time of the first time length closest to the current time within the third time period is taken as the first time period, and the second time period is the time period corresponding to the number of fire equipment alarms predicted based on the Gaussian process; The establishment module is used to establish a Gaussian process model according to the alarm time series data; The prediction module is used to predict the number of fire equipment alarms in a second time period in the first area based on the learned Gaussian process model, and the length of the second time period is longer than the length of the first time period.
[0009] The fire alarm prediction method and device based on Gaussian process provided by the present application, in the first aspect, the number of fire equipment alarms in the first time period is determined based on the first time length, and the third time period is determined based on the second time period and the first time period, and the first time period closest to the current time is selected from the third time period. By determining the first time period, the second time period and the third time period, and comparing and analyzing them, the patterns and trends in the alarm time series data can be more accurately captured, and the accuracy of fire alarm prediction can be improved. In the second aspect, when determining the first time period from the third time period, the first time period closest to the current time is selected based on the current time. This can ensure that the alarm time series data of the first time period based on the prediction of the number of fire equipment alarms in the second time period can more accurately reflect the latest trends and current patterns, provide more relevant information, help reduce prediction errors, improve the accuracy and reliability of predictions, and ensure that the prediction and analysis results are consistent with the actual situation. In the third aspect, in the alarm time series data, the environment and alarm patterns will fluctuate over time. For example, the number of fire equipment alarms may change significantly in a specific season, holiday or when a specific event occurs. By dynamically adjusting the time period for data acquisition, these changes can be adapted to improve the prediction ability of the Gaussian process model. Especially for long-term prediction, the Gaussian process model needs to follow the changes in data patterns and continuously update the historical data it uses. In addition, due to the particularity of alarm time series data, the trend of longer time periods is more stable. In general time series prediction, short-term predictions are usually more accurate, but alarm time series data often have potential cyclical trends and are significantly affected by seasons, population activities, etc. Since the fixed time period may make the Gaussian process model unable to effectively adapt to new patterns or long-term trend changes, dynamically adjusting the time period allows the model to better capture new data features. By extending the time period setting, the Gaussian process model can better eliminate the interference of small fluctuations in data and grasp the overall trend of changes. This not only improves the robustness of the prediction, but also reduces the reliance on sudden abnormal events or occasional alarms. By continuously updating and extending the time period setting, the Gaussian process model can eliminate the influence of small fluctuations in different situations, thereby more accurately predicting the trend of alarm time series data in the long term. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 A flowchart of Embodiment 1 of a fire alarm prediction method based on Gaussian process provided in this application; Figure 2 This is a structural diagram of Example 1 of a fire alarm prediction device based on Gaussian process provided in this application. DETAILED DESCRIPTION
[0011] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.
[0012] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more associated listed items.
[0013] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0014] Specific embodiments are given below to introduce the technical solution of the present application in detail.
[0015] Figure 1 This is a flowchart of the first embodiment of the fire alarm prediction method based on Gaussian process provided by this application. Please refer to Figure 1 , the method provided in this embodiment may include: S101. Determine a first time length based on fire alarm equipment status data in a first area and status data in the first area.
[0016] Specifically, the first area is set according to actual needs. In this embodiment, this is not limited. It should be noted that in this application, the acquisition of the number of fire equipment alarms and the prediction of the number of fire equipment alarms are both for the first area. For example, in one embodiment, the first area is XX City. The fire alarm equipment status data characterizes the working status of the fire alarm equipment, including alarm records, equipment operating status, equipment maintenance records, equipment response time, sensor data, etc. The status data characterizes the regional environmental conditions and external factors of the fire alarm equipment, including environmental conditions (temperature, humidity, air pressure), regional activities (personnel activities, equipment usage), building structure and layout, external events (weather conditions, construction, decoration), etc.
[0017] In a specific implementation, the first time length is determined based on the status data of the fire alarm equipment in the first area and the status data in the first area, including: analyzing the status data and the status data of the fire alarm equipment in the first area based on a time series analysis method, determining the status changes of the fire alarm equipment and the behavior changes related to the fire alarm in the first area, and obtaining a first change trend; determining the change time point based on the first change trend; determining the first time length based on the longest interval between the first change trend and the change time point.
[0018] Specifically, the state data and status data of the fire alarm equipment in the first area are analyzed based on the time series analysis method (moving average, exponential smoothing, seasonal decomposition, etc.), and the state changes of the fire alarm equipment (changes in the alarm frequency and alarm intensity of the fire alarm equipment) and the behavioral changes related to the fire alarm (increase or decrease in activities in the first area) are identified, and the first change trend (long-term trend, seasonal change and periodic pattern) is determined based on the state change and behavioral change. Further, the change time point is determined based on the first change trend, that is, the time point when the alarm frequency of the fire alarm equipment suddenly increases or decreases, the time point when the environmental conditions in the first area change significantly (such as a sharp change in temperature), and the time point when the activity pattern of people in the first area changes significantly (such as the peak period of holidays). Based on the intervals between all the change time points, the two change time points with the longest interval are determined, and the interval between the two change time points is determined as the first time length.
[0019] The method provided in this embodiment, on the one hand, can identify the periodicity and long-term trends in the data by analyzing the fire alarm equipment status data and status data in the first area, which helps to ensure that the first time length can adapt to the natural periodic changes of the data and reduce the prediction errors caused by the mismatch of periodic changes. On the other hand, when determining the first time length, the longest interval between the change time points is determined as the first time length, which can ensure that the selected first time length can cover the main change trends in the data and avoid potential problems caused by too short or too long time periods.
[0020] S102. Obtain the number of fire equipment alarms in the first time period in the first area, and generate alarm time series data. The alarm time series data is vector data generated by arranging the number of fire equipment alarms in chronological order. The time length of the first time period is the first time length.
[0021] Among them, a third time period that is the same as the second time period is determined based on the status data in the first area within the second time period, the time length of the third time period is greater than the first time length, and the time of the first time length closest to the current time within the third time period is taken as the first time period, and the second time period is the time period corresponding to the number of fire equipment alarms predicted based on the Gaussian process.
[0022] Specifically, the time length of the first time period is the first time length. The second time period is the time period corresponding to the number of fire equipment alarms predicted based on the Gaussian process, which is set according to actual needs. In this embodiment, it is not limited to this. It should be noted that the time length of the second time period is greater than the first time length, and the time length of the third time period is greater than the first time length. The alarm time series data is the vector data generated after the number of fire equipment alarms is arranged in chronological order.
[0023] In a specific implementation, the obtaining of the number of fire equipment alarms in the first area in the first time period and generating alarm time series data includes: (1) Based on the first time length, obtaining the number of fire equipment alarms in a first time period in the first area; wherein the time length of the first time period is the first time length.
[0024] In the specific implementation, a target data file is obtained, which records the number of fire equipment alarms in different areas and different time periods. The target data file is filtered based on the equipment number of the fire equipment to obtain the target data file corresponding to the fire equipment. Further, the number of fire equipment alarms in the first area and the first time length in the target data file corresponding to the fire equipment is read.
[0025] (2) Based on the status data in the first area within the second time period and the first time length, determining a third time period that is the same as the status data; wherein the time length of the third time period is greater than the first time length.
[0026] Specifically, in combination with the above description, the second time period is set according to actual needs, and is not limited in this embodiment.
[0027] In specific implementation, status data in the first area within the second time period is obtained, the status data is analyzed, and target status data that is the same as the status data in the first area within the second time period and has a time length greater than the first time length is selected from the status data in the first area. The time period corresponding to the target status data is the third time period.
[0028] Optionally, the determining of a third time period that is the same as the status data based on the status data in the first area within the second time period and the first time length includes: determining the number of fire-fighting equipment and the working status of the fire-fighting equipment in the first area within the second time period as the status data of the fire alarm equipment in the first area within the second time period; determining a third time period in the first area that is the same as the status data of the fire alarm equipment; correcting the status data of the fire alarm equipment in the third time period within the first area based on abnormal activities in the third time period within the first area, the abnormal activities being activities that affect the number of fire-fighting equipment and the working status of the fire-fighting equipment; and taking the time period in the corrected fire alarm equipment status data that is still the same as the status data of the fire alarm equipment in the second time period within the first area as the final third time period.
[0029] Specifically, abnormal activities refer to activities that may affect the number of fire-fighting equipment and the working status of the fire-fighting equipment in the first area. For example, abnormal activities may include major events, exercises, entertainment activities, etc.
[0030] The method provided in this embodiment first determines the fire alarm equipment status data in the first area in the third time period based on the fire alarm equipment status data in the first area in the second time period, and then identifies and corrects the fire alarm equipment status data affected by abnormal activities, which can eliminate abnormal fluctuations caused by these abnormal activities. The corrected fire alarm equipment status data can provide more reliable information and reflect a more realistic fire equipment status and number of fire equipment. This correction ensures that the third time period finally selected more realistically reflects the working status and number of fire equipment under normal circumstances, thereby improving the accuracy of the prediction model, so that the prediction model can more robustly respond to similar situations that may occur in the future, and ensure that the prediction results are not affected by short-term abnormalities.
[0031] (3) Based on the third time period, determine a first time period in the third time period whose time length is equal to the first time length and is closest to the current time.
[0032] In specific implementation, the third time period is traversed to determine all time periods with the first time length contained in the third time period, and the time period with the closest start time to the current time is determined as the first time period.
[0033] Optionally, after determining, based on the third time period, the first time period in the third time period whose time length is the first time length and is closest to the current time, the method further includes: performing outlier processing on the alarm time series data of the first time period in the first area to determine the abnormal point; the difference between the number of fire equipment alarms corresponding to the abnormal point and the number of fire equipment alarms corresponding to the change time point is greater than a preset value; replacing the number of fire equipment alarms corresponding to the abnormal point based on the first data in the first area to obtain updated alarm time series data; the first data includes the number of fire equipment alarms at the time corresponding to the abnormal point.
[0034] Specifically, the abnormal point refers to the number of fire equipment alarms that protrude from the first change trend in the alarm time series data, that is, the difference between the number of fire equipment alarms corresponding to the abnormal point and the number of fire equipment alarms corresponding to the change time point is greater than the preset value, wherein the preset value is set according to actual needs and is not limited to this in this embodiment.
[0035] In a specific implementation, the alarm time series data of the first time period in the first region are traversed, and the abnormal points in the alarm time series data are determined based on the difference between the number of fire equipment alarms and the change time point under each alarm time series data. Further, the number of fire equipment alarms corresponding to each abnormal point is replaced with the first data in the first region, wherein the first data includes the number of fire equipment alarms at the time corresponding to each abnormal point, and the first data is normal data in the first region, which does not contain abnormal data.
[0036] The method provided in this embodiment can ensure that the generated alarm time series data does not contain abnormal data by performing outlier processing on the alarm time series data in the first time period in the first area, and ensure that the alarm time series data can more accurately reflect the latest trends and current patterns, provide more relevant information, help reduce prediction errors, improve the accuracy and reliability of fire alarm predictions, and ensure that the prediction and analysis results are consistent with the actual situation.
[0037] Optionally, after obtaining the number of fire equipment alarms in the first time period within the first area and generating the alarm time series data, the method further includes: traversing the alarm time series data to determine the value of the number of fire equipment alarms corresponding to each time point; determining a value range of the number of fire equipment alarms based on the value of the number of fire equipment alarms corresponding to each time point; determining a preset value based on the value range; the preset value is a positive number; adding the number of fire equipment alarms corresponding to each time point to the preset value, performing logarithmic operation on the added value, and obtaining the alarm time series data.
[0038] Specifically, the preset value is set according to actual needs, and is not limited in this embodiment. It should be noted that the preset value is a positive number, for example, in one embodiment, the preset value is 0.5.
[0039] In specific implementation, the alarm time series data is traversed to determine the number of fire equipment alarms at each time point in the alarm time series data. Based on the number of fire equipment alarms at each time point, the value range of the number of fire equipment alarms is determined. Based on the minimum value in the value range, the preset value is determined, that is, the sum of the preset value and the minimum value is greater than 0. Further, the number of fire equipment alarms at each time point in the alarm time series data is added to the preset value, and a logarithmic operation is performed to obtain the updated alarm time series data.
[0040] The alarm time series data can be obtained according to the following formula: ; Among them, the is the updated alarm time series data; is the alarm time series data before updating, , is the length of the alarm time series data; is the default value.
[0041] S103: Establish a Gaussian process model according to the alarm time series data.
[0042] Specifically, the Gaussian process model is used to predict the number of fire equipment alarms in the second time period in the first area based on the alarm time series data in the first time period in the first area. The Gaussian process model includes a mean function and a covariance function. The mean function characterizes the overall change trend of the alarm time series data, and the covariance function characterizes the correlation between adjacent data in the alarm time series data; the covariance function calculates the correlation between adjacent data based on the time difference between different times corresponding to adjacent data in the alarm time series data.
[0043] Furthermore, the covariance function includes an exponential covariance function, a periodic covariance function, a rational quadratic covariance function, and a noise covariance function; the exponential covariance function is used to capture the smooth changes in the alarm time series data and obtain the changing trend of the number of fire equipment alarms at different times; the periodic covariance function is used to capture the regularity of the repeated occurrence of the number of fire equipment alarms in the alarm time series data; the rational quadratic covariance function is used to capture the sudden changes in the number of fire equipment alarms in the alarm time series data; the noise covariance function is used for the random noise in the alarm time series data.
[0044] It should be noted that the exponential covariance function is widely used in various forecasting tasks due to its smoothness, and is suitable for simulating continuous and smoothly changing data. The periodic covariance function is specifically used to simulate data with periodic changes, and can capture repetitive patterns in time series. The periodic covariance function can simulate alarm situations with periodic regularity. The rational quadratic covariance function can reduce the impact of abnormal points in an alarm time series (there may be a sudden change in the data at a certain point in time). The noise covariance function is used to add independent and identically distributed noise to the Gaussian process model, which helps to deal with random fluctuations in the data, thereby improving the adaptability of the Gaussian process model to actual data.
[0045] Among them, the exponential covariance function is calculated based on the alarm data at two adjacent time points of the alarm time series data, the overall fluctuation intensity of the alarm time series data, and the smoothness parameter of the alarm time series data; the periodic covariance function is calculated based on the alarm data at two adjacent time points of the alarm time series data, the time interval of repeated occurrence of fire equipment alarms in the alarm time series data, the overall fluctuation intensity of the alarm time series data, and the smoothness parameter of the alarm time series data; the rational quadratic covariance function is calculated based on the alarm data at two adjacent time points of the alarm time series data, the overall fluctuation intensity of the alarm time series data, the smoothness parameter of the alarm time series data, and the weight of the sudden change in the number of fire equipment alarms in the alarm event sequence data; the noise covariance function is calculated based on the alarm data at two adjacent time points of the alarm time series data and the random noise in the alarm time series data.
[0046] In the specific implementation, the alarm time series data is regarded as satisfying the Gaussian random process, that is: ; Among them, the is the alarm time series data; is a Gaussian process model; is the mean function; is the covariance function.
[0047] ; Among them, the is the covariance function; , , , is the weight of the covariance function; , , , is the internal parameter of the covariance function; is the exponential covariance function; is the periodic covariance function; is a rational quadratic covariance function; is the noise covariance function.
[0048] Furthermore, assuming , , , are polynomial coefficients, is the alarm time series data, then .
[0049] S104. Predict the number of fire equipment alarms in a second time period in the first area based on the learned Gaussian process model, where the second time period is longer than the first time period.
[0050] Specifically, the learned Gaussian process model representation optimizes the parameters of the Gaussian process model to obtain the optimal model parameters of the Gaussian process model (including the weights of the covariance function , , , , internal parameters , , , And the polynomial coefficients ), and the learned Gaussian process model is obtained based on the optimal model parameters.
[0051] In the specific implementation, it is assumed that the optimal model parameters are independent of each other, and the parameter optimization problem is transformed into a multidimensional optimization problem. The optimal model parameters can be effectively determined by maximizing the marginal likelihood function (in the Gaussian process model, the marginal likelihood function evaluates the probability of data generation given the model parameters and data points). In order to determine the optimal model parameters, the model parameters are adjusted to maximize the marginal likelihood function, that is, to minimize the negative log-likelihood. The Powell method (a conjugate gradient algorithm suitable for multivariable optimization problems) is used for optimization. After setting the appropriate iteration parameters, the parameter space will be exhaustively searched and iterated until the optimal parameter combination that maximizes the marginal likelihood is determined.
[0052] Specifically, the marginal likelihood function can be expressed as: ; Among them, the is the alarm time series data; is the marginal likelihood function; for time; are polynomial coefficients; is the weight of the covariance function; is the internal parameter of the covariance function; is a polynomial matrix, , is the column of the polynomial matrix; is the covariance function; is the length of the alarm time series data.
[0053] Furthermore, maximizing the marginal likelihood function is to minimize the negative log-likelihood: ; Among them, the are polynomial coefficients; is the weight of the covariance function; is the internal parameter of the covariance function; is the alarm time series data; is the marginal likelihood function; For time.
[0054] Furthermore, Powell’s method is used to solve the problem of minimizing the negative log-likelihood using optimization libraries such as Adam and l-brgs, and the optimal model parameters of the Gaussian process model are obtained.
[0055] In specific implementation, the alarm time series data (the number of fire equipment alarms in the first time period in the first area) is input into the learned Gaussian process model to obtain the number of fire equipment alarms in the second time period in the first area, and fire safety management is performed on the first area based on the number of fire equipment alarms in the second time period in the first area.
[0056] The method provided in this embodiment, in the first aspect, determines the number of fire equipment alarms in the first time period based on the first time length, and then determines the third time period based on the second time period and the first time period, and selects the first time period closest to the current time from the third time period. By determining the first time period, the second time period and the third time period, and comparing and analyzing them, the patterns and trends in the alarm time series data can be captured more accurately, and the accuracy of fire alarm prediction can be improved. In the second aspect, when determining the first time period from the third time period, the first time period closest to the current time is selected based on the current time. This can ensure that the alarm time series data of the first time period based on the prediction of the number of fire equipment alarms in the second time period can more accurately reflect the latest trends and current patterns, provide more relevant information, help reduce prediction errors, improve the accuracy and reliability of predictions, and ensure that the prediction and analysis results are consistent with the actual situation. In the third aspect, in the alarm time series data, the environment and alarm patterns will fluctuate over time. For example, the number of fire equipment alarms may change significantly in a specific season, holiday or when a specific event occurs. By dynamically adjusting the time period for data acquisition, these changes can be adapted to improve the prediction ability of the Gaussian process model. Especially for long-term predictions, the Gaussian process model needs to follow the changes in the data pattern and continuously update the historical data used. In addition, due to the particularity of the alarm time series data, the trend of a longer time period is more stable. In general time series predictions, short-term predictions are usually more accurate, but the alarm time series data often have potential cyclical trends and are significantly affected by seasons, population activities, etc. Because the fixed time period may not be able to effectively adapt to the new pattern or long-term trend changes, the dynamic adjustment of the time period allows the model to better capture new data features. By lengthening the time period setting, the Gaussian process model can better eliminate the interference of small fluctuations in data and grasp the overall trend of change. This not only improves the robustness of the prediction, but also reduces the dependence on sudden abnormal events or occasional alarms. By continuously updating and lengthening the time period setting, the Gaussian process model can eliminate the influence of small fluctuations in different situations, thereby more accurately predicting the trend of alarm time series data in the long term. In the fourth aspect, when constructing the Gaussian process model, the present application combines four covariance functions, effectively grasps the direction of fire alarm prediction, and makes the training of data more reasonable. In this way, even with a relatively small data set, effective training can be achieved, avoiding the overfitting problem that traditional neural networks are prone to on small data sets. Fifthly, compared with traditional neural network methods, this application does not require repeated and cumbersome hyperparameter adjustments to the neural network. Simply adjusting the covariance function and mean function in the Gaussian process model can achieve a better fitting effect, greatly simplifying the process of model parameter adjustment.This makes the present invention easier to implement, reduces the impact of human factors on model performance, and improves the accuracy and stability of prediction.
[0057] Corresponding to the aforementioned embodiment of a fire alarm prediction method based on Gaussian process, the present application also provides an embodiment of a fire alarm prediction device based on Gaussian process.
[0058] Figure 2 This is a structural diagram of the first embodiment of the fire alarm prediction device based on Gaussian process provided by this application. Figure 2 The device provided in this embodiment includes a determination module 210, a generation module 220, an establishment module 230 and a prediction module 240; wherein, The determination module 210 is used to determine a first time length based on the fire alarm device status data in the first area and the status data in the first area; The generating module 220 is used to obtain the number of fire equipment alarms in the first time period in the first area, and generate alarm time series data, wherein the alarm time series data is vector data generated by arranging the number of fire equipment alarms in chronological order, and the time length of the first time period is the first time length; Wherein, a third time period identical to the second time period is determined according to the status data in the first area within the second time period, the time length of the third time period is greater than the first time length, the time of the first time length closest to the current time within the third time period is taken as the first time period, and the second time period is the time period corresponding to the number of fire equipment alarms predicted based on the Gaussian process; The establishment module 230 is used to establish a Gaussian process model according to the alarm time series data; The prediction module 240 is used to predict the number of fire equipment alarms in a second time period in the first area based on the learned Gaussian process model, and the length of the second time period is longer than the length of the first time period.
[0059] The device of this embodiment can be used to perform Figure 1 The steps, specific implementation principles and implementation processes of the method embodiment shown are similar and will not be repeated here.
[0060] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0061] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0062] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A fire alarm prediction method based on Gaussian process, characterized in that: The method comprises: determining a first length of time based on fire alarm device status data within the first area and status data within the first area; Obtain the number of fire equipment alarms in the first time period in the first area, and generate alarm time series data, wherein the alarm time series data is vector data generated by arranging the number of fire equipment alarms in chronological order, and the time length of the first time period is the first time length; Wherein, a third time period identical to the second time period is determined according to the status data in the first area within the second time period, the time length of the third time period is greater than the first time length, the time of the first time length closest to the current time within the third time period is taken as the first time period, and the second time period is the time period corresponding to the number of fire equipment alarms predicted based on the Gaussian process; Establishing a Gaussian process model according to the alarm time series data; The number of fire equipment alarms in a second time period within the first area is predicted based on the learned Gaussian process model, and the length of the second time period is longer than that of the first time period.
2. The method according to claim 1, characterized in that The determining of the first time length based on the fire alarm device status data in the first area and the status data in the first area comprises: Analyze the fire alarm device status data and state data in the first area based on a time series analysis method, determine the state change of the fire alarm device and the behavior change related to the fire alarm in the first area, and obtain a first change trend; Determining a change time point based on the first change trend; A first time length is determined based on the first change trend and the longest interval between the change time points.
3. The method according to claim 1, characterized in that: The obtaining of the number of fire equipment alarms in the first area in the first time period and generating alarm time series data includes: Based on the first time length, obtaining the number of fire equipment alarms in the first time period in the first area; wherein the time length of the first time period is the first time length; Based on the status data in the first area within the second time period and the first time length, determining a third time period that is the same as the status data; wherein the time length of the third time period is greater than the first time length; Based on the third time period, a first time period in the third time period having a time length equal to the first time length and closest to the current time is determined.
4. The method according to claim 3, characterized in that After determining, based on the third time period, that the time length of the third time period is the first time length and the first time period closest to the current time, the method further includes: Performing outlier processing on the alarm time series data in the first time period within the first area to determine an outlier point; the difference between the number of fire equipment alarms corresponding to the outlier point and the number of fire equipment alarms corresponding to the change time point is greater than a preset value; The number of fire equipment alarms corresponding to the abnormal point is replaced based on the first data in the first area to obtain updated alarm time series data; the first data includes the number of fire equipment alarms at the time corresponding to the abnormal point.
5. The method according to claim 1, characterized in that The Gaussian process model includes a mean function and a covariance function, wherein the mean function represents the overall change trend of the alarm time series data, and the covariance function represents the correlation between adjacent data in the alarm time series data; The covariance function calculates the correlation between adjacent data based on the time difference between different times corresponding to adjacent data in the alarm time series data.
6. The method according to claim 5, characterized in that The covariance function includes an exponential covariance function, a periodic covariance function, a rational quadratic covariance function, and a noise covariance function; the exponential covariance function is used to capture the smooth changes in the alarm time series data and obtain the changing trend of the number of fire equipment alarms at different times; the periodic covariance function is used to capture the regularity of the repeated occurrence of the number of fire equipment alarms in the alarm time series data; the rational quadratic covariance function is used to capture the sudden changes in the number of fire equipment alarms in the alarm time series data; and the noise covariance function is used for random noise in the alarm time series data.
7. The method according to claim 6, characterized in that The exponential covariance function is calculated based on the alarm data at two adjacent time points of the alarm time series data, the overall fluctuation intensity of the alarm time series data, and the smoothness parameter of the alarm time series data; the periodic covariance function is calculated based on the alarm data at two adjacent time points of the alarm time series data, the time interval of repeated occurrence of fire equipment alarms in the alarm time series data, the overall fluctuation intensity of the alarm time series data, and the smoothness parameter of the alarm time series data; the rational quadratic covariance function is calculated based on the alarm data at two adjacent time points of the alarm time series data, the overall fluctuation intensity of the alarm time series data, the smoothness parameter of the alarm time series data, and the weight of the sudden change in the number of fire equipment alarms in the alarm event sequence data; the noise covariance function is calculated based on the alarm data at two adjacent time points of the alarm time series data and the random noise in the alarm time series data.
8. The method according to claim 1, characterized in that After obtaining the number of fire equipment alarms in the first time period in the first area and generating alarm time series data, the method further includes: Traversing the alarm time series data, determining the value of the number of fire equipment alarms corresponding to each time point; Determine the value range of the number of fire equipment alarms based on the values of the number of fire equipment alarms corresponding to each time point; Based on the value range, determine a preset value; the preset value is a positive number; The number of fire equipment alarms corresponding to each time point is added to the preset value, and a logarithmic operation is performed on the added value to obtain alarm time series data.
9. The method according to claim 3, characterized in that: The determining, based on the status data in the first area within the second time period and the first time length, of a third time period that is the same as the status data includes: Determine the number of fire-fighting equipment and the working status of the fire-fighting equipment in the first area during the second time period as the fire alarm equipment status data in the first area during the second time period; Determine a third time period in the first area that is the same as the state data of the fire alarm device; According to the abnormal activities in the third time period in the first area, modifying the fire alarm equipment status data in the third time period in the first area, wherein the abnormal activities are activities that affect the number of the fire alarm equipment and the working status of the fire alarm equipment; The time period in the revised fire alarm device status data that is still the same as the fire alarm device status data in the second time period in the first area is used as the final third time period.
10. A fire alarm prediction device based on Gaussian process, characterized in that: The device comprises a determination module, a generation module, a creation module and a prediction module; wherein, The determination module is used to determine the first time length based on the fire alarm equipment status data in the first area and the status data in the first area; The generating module is used to obtain the number of fire equipment alarms in the first time period in the first area, and generate alarm time series data, wherein the alarm time series data is vector data generated by arranging the number of fire equipment alarms in chronological order, and the time length of the first time period is the first time length; Wherein, a third time period identical to the second time period is determined according to the status data in the first area within the second time period, the time length of the third time period is greater than the first time length, the time of the first time length closest to the current time within the third time period is taken as the first time period, and the second time period is the time period corresponding to the number of fire equipment alarms predicted based on the Gaussian process; The establishment module is used to establish a Gaussian process model according to the alarm time series data; The prediction module is used to predict the number of fire equipment alarms in a second time period in the first area based on the learned Gaussian process model, and the length of the second time period is longer than the length of the first time period.
Citation Information
Patent Citations
Prediction method and device for alarm in service operation and maintenance and electronic equipment
CN111124840A
Index time sequence anomaly detection method and system and storage medium
CN112148768A
Water environment monitoring and intelligent early warning system
CN117973613A
Safety early warning method and system for outdoor personnel
CN118658623A
Building intelligent fire safety monitoring method, system and device
CN119049257A