Machine learning-based electrical fire early warning method and system
By integrating multiple sensors and LSTM models, the electrical fire early warning system solves the real-time and accuracy problems of traditional electrical fire monitoring systems, realizing real-time and comprehensive monitoring and dynamic early warning of electrical equipment, and improving the accuracy and response speed of electrical fire early warning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2026-03-31
AI Technical Summary
Traditional electrical fire monitoring systems rely on manual inspections and fixed threshold alarms, which cannot achieve real-time monitoring. They suffer from problems such as delayed early warning, monitoring blind spots, and high false alarm rates, making it difficult to identify potential electrical fire hazards.
It employs multiple sensors (temperature, smoke, current, and voltage sensors) combined with an embedded microcontroller and a central processing unit, and achieves real-time data acquisition and processing through a GPRS/4G communication module. It uses an LSTM model for data prediction and normalization, dynamically adjusts the detection estimate, and forms a multi-level early warning mechanism.
It enables real-time and comprehensive monitoring of electrical equipment, reduces missed and false alarms, improves the accuracy and response speed of early warnings, and can identify potential fire risks in advance.
Smart Images

Figure CN120526557B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent early warning technology, and more specifically, to an electrical fire early warning method and system based on machine learning. Background Technology
[0002] With the development of society and the economy and the widespread use of electrical equipment, the risk of electrical fires has gradually increased. Especially in petroleum engineering and other industrial sectors, fires caused by electrical faults occur frequently, resulting in serious property damage and casualties. Therefore, real-time monitoring of the operating status of electrical equipment and timely warnings when anomalies occur are crucial means to reduce the occurrence of fires.
[0003] Currently, the main causes of electrical fires include current overload, aging wiring, short circuits, and electrical equipment failures. These factors can lead to abnormal changes in voltage and current, or generate abnormally high temperatures and smoke. Traditional fire equipment monitoring systems mainly rely on fixed smoke detectors, temperature detectors, and other sensing devices, combined with manual inspections. However, relying on regular manual inspections cannot achieve real-time monitoring of electrical equipment, resulting in delayed warnings and untimely responses. Sensor deployment is usually limited to specific areas, making large-scale real-time monitoring difficult in complex industrial environments or power facilities, easily creating monitoring blind spots. Furthermore, traditional systems mainly rely on simple threshold alarm mechanisms, triggering an alarm once data reaches a set value, failing to fully utilize data analysis and pattern recognition technologies, leading to a high false alarm rate and affecting the reliability of the early warning system. Moreover, relying primarily on static thresholds to assess fire risk cannot be based on data-driven trend prediction, making it difficult to identify potential electrical fire hazards in a timely manner.
[0004] Therefore, it is necessary to design an electrical fire early warning method and system based on machine learning to solve the problems existing in the current technology. Summary of the Invention
[0005] In view of this, the present invention proposes an electrical fire early warning method and system based on machine learning, aiming to solve the problems of long manual detection cycle, limited monitoring coverage, lack of data analysis and lack of prediction methods.
[0006] In one aspect, the present invention proposes an electrical fire early warning system based on machine learning, comprising:
[0007] The sensor module includes a temperature sensor, a smoke sensor, and current and voltage sensors;
[0008] An embedded microcontroller is connected to the sensor module. The embedded microcontroller is used to acquire sensor data in real time and preprocess the sensor data. The preprocessing includes outlier removal and missing value filling.
[0009] The central processing unit (CPU) is connected to the embedded microcontroller via a GPRS / 4G communication module. The CPU includes a data acquisition unit, a judgment unit, a processing unit, an adjustment unit, and an early warning unit.
[0010] The acquisition unit is configured to acquire preprocessed sensor data and obtain the total data volume of all sensors, and determine the cyclic judgment period based on the total data volume.
[0011] The judgment unit is configured to collect sensor data within the cyclic judgment period, obtain the maximum change of each data based on the sensor data, and determine the detection estimate based on the maximum change of each data and the threshold of each data change.
[0012] The processing unit is configured to input sensor data within the cyclic judgment period into an LSTM (Long Short-Term Memory) model to obtain sensor prediction data, normalize the sensor prediction data, obtain a predicted sum based on the normalization result, compare the predicted sum with an adjustment threshold, and determine whether to adjust the detection estimate based on the comparison result.
[0013] When it is determined that the detection estimate needs to be adjusted, the adjustment unit is configured to determine a feature vector based on the normalization processing result, compare the feature vector with the historical adjustment dataset, determine an adjustment coefficient based on the comparison result, adjust the detection estimate, and obtain the final detection estimate.
[0014] The early warning unit is configured to determine the early warning level based on the final detection estimate.
[0015] Furthermore, when the embedded microcontroller preprocesses the sensor data, it includes:
[0016] The embedded microcontroller arranges each type of data in the sensor data into a b*b matrix according to the time sequence from left to right and from top to bottom. The sensor data includes temperature data, smoke concentration data, and current and voltage data.
[0017] The embedded microcontroller can randomly select any point in the matrix as a detection point;
[0018] Determine the detection radius as r, and then determine the detection range based on the detection radius;
[0019] The detection judgment mean is determined according to the detection range, and the detection point difference is obtained according to the data corresponding to the detection point and the detection judgment mean. The detection point difference is the difference between the data corresponding to the detection point and the detection judgment mean.
[0020] When the data corresponding to the detection point is a missing value, the mean of the detection judgment is taken as the data corresponding to the detection point;
[0021] The difference between the detection points is compared with the difference threshold, and the data corresponding to the detection points is determined to be an outlier based on the comparison result.
[0022] When the difference between the detection points is greater than the difference threshold, the data corresponding to the detection point is determined to be an outlier, the outlier is removed, and the data corresponding to the detection point is replaced with the detection judgment mean.
[0023] Furthermore, when the embedded microcontroller preprocesses the sensor data, it also includes:
[0024] The average value of the detection judgment is obtained by the following formula:
[0025] ;
[0026] in, The value represents the average value of the detection judgment, and r represents the detection radius. Indicates the coordinates of the detection point. In the matrix The data value of the point.
[0027] Furthermore, when the acquisition unit determines the cyclic judgment period based on the total data volume, it includes:
[0028] The acquisition unit compares the total data volume with a first preset data volume and a second preset data volume, respectively, and determines the loop judgment period based on the comparison results; the first preset data volume is less than the second preset data volume.
[0029] When the total data volume is less than or equal to a first preset data volume, the acquisition unit determines the cyclic judgment period as a first period; when the total data volume is greater than the first preset data volume and less than or equal to a second preset data volume, the acquisition unit determines the cyclic judgment period as a second period; when the total data volume is greater than the second preset data volume, the acquisition unit determines the cyclic judgment period as a third period; wherein, the first period is greater than the second period, and the second period is greater than the third period.
[0030] Furthermore, when the judgment unit determines the detection estimate based on the maximum change of each data and the threshold of each data change, it includes: the maximum change of each data includes the maximum change of temperature, the maximum change of smoke concentration, the maximum change of current, and the maximum change of voltage; the threshold of each data change includes the threshold of temperature change, the threshold of smoke concentration change, the threshold of current change, and the threshold of voltage change.
[0031] ;
[0032] Wherein, G represents the detection estimate, Wmax represents the maximum temperature change, Nmax represents the maximum smoke concentration change, Imax represents the maximum current change, Umax represents the maximum voltage change, W0 represents the temperature change threshold, N0 represents the smoke concentration change threshold, I0 represents the current change threshold, and U0 represents the voltage change threshold.
[0033] Furthermore, when the processing unit inputs the sensor data within the cyclic judgment period into the LSTM model to obtain sensor prediction data, it includes:
[0034] Forget gates for building LSTM models:
[0035] ;
[0036] Input Gate:
[0037] ;
[0038] ;
[0039] Cell status update:
[0040] ;
[0041] Output gate:
[0042] ;
[0043] ;
[0044] in, Indicates the output of the forget gate. The weight matrix represents the forget gate, and its values range from [-1, 1]. This indicates the hidden state at the previous moment. Indicates input data, The bias term representing the forget gate. For the sigmoid function, Indicates the input gate output. This represents the candidate cell state, with a value range of (-1, 1). This represents the weight matrix of the input gate, with values ranging from [-1, 1]. The weight matrix represents the candidate cell state, and its values range from [-1, 1]. , These represent the bias terms for the input gate and the candidate cell state, respectively. This indicates the current state of the cell. This indicates the cell state at the previous moment. Indicates the output of the output gate. This represents the predicted data. This represents the weight matrix of the output gate, with values ranging from [-1, 1]. This represents the bias term of the output gate;
[0045] The processing unit divides each type of data in the sensor data within the cyclic judgment period into windows according to the time series as input data to obtain the sensor prediction data.
[0046] Furthermore, when the processing unit compares the predicted sum with the adjustment threshold and determines whether to adjust the detection estimate based on the comparison result, it includes:
[0047] ;
[0048] Where Ri represents the normalization result of the i-th type of data in the sensor data, R0 represents the final predicted data of the i-th type of data in the sensor data, Rmin represents the minimum value of the predicted data of the i-th type of data and the data within the cyclic judgment period, and Rmax represents the maximum value of the predicted data of the i-th type of data and the data within the cyclic judgment period.
[0049] The predicted sum is obtained by summing the normalized results of all types of data in the sensor data;
[0050] When the predicted sum is greater than the adjustment threshold, it is determined that the detection estimate should be adjusted.
[0051] When the predicted sum is less than or equal to the adjustment threshold, it is determined that the detection estimate will not be adjusted, and the detection estimate will be used as the final detection estimate.
[0052] Furthermore, when the adjustment unit adjusts the detection estimate based on the comparison results and determines the adjustment coefficient, it includes:
[0053] The historical adjustment dataset includes several historical feature vectors and several historical adjustment coefficients, with each historical feature vector corresponding to each historical adjustment coefficient.
[0054] When there is data in the historical adjustment dataset that has a similarity greater than the similarity threshold with the feature vector, the historical adjustment coefficient of the historical feature vector corresponding to the maximum similarity is used as the adjustment coefficient to adjust the detection estimate;
[0055] When the similarity between all historical feature vectors in the historical adjustment dataset and the feature vector is less than or equal to the similarity threshold, the detection estimate is adjusted based on the feature vector by determining the adjustment coefficient.
[0056] The final detection estimate is the product of the adjustment coefficient and the detection estimate;
[0057] ;
[0058] Where T represents the adjustment coefficient, n represents the total number of data types in the feature vector, and Ri represents the normalization result of the i-th type of data in the sensor data.
[0059] Furthermore, when the early warning unit determines the early warning level based on the final detection estimate, it includes:
[0060] The early warning unit compares the final detection estimate with each early warning threshold, and determines the early warning level based on the comparison results. The early warning level is directly proportional to the final detection estimate.
[0061] Compared with existing technologies, the advantages of this invention are as follows: It integrates multiple sensors (temperature sensor, smoke sensor, current sensor, and voltage sensor) to collect key parameters of electrical equipment in real time. An embedded microcontroller preprocesses the collected data, improving its integrity and reliability, and avoiding misjudgments due to data anomalies. GPRS / 4G communication technology ensures stable, low-latency transmission of sensor data to the central processor, enabling remote monitoring and centralized processing. Sensor data within a cyclic judgment period is input into an LSTM model, using deep learning algorithms to predict future trends, and the prediction results are normalized to obtain more accurate early warning assessments. Dynamic analysis of data change trends allows for early identification of potential fire risks, effectively reducing missed and false alarms. The adjustment unit extracts feature vectors and compares them with historical adjustment datasets, automatically adjusting the detection estimate, improving the adaptability and accuracy of the prediction. The early warning unit determines the early warning level based on the adjusted detection estimate and promptly reminds management personnel to take measures through audible and visual alarms, remote notifications, etc., improving the detection accuracy and response speed of electrical fires.
[0062] On the other hand, this application also provides a machine learning-based electrical fire early warning method for applying the above-mentioned machine learning-based electrical fire early warning system, including:
[0063] Collect preprocessed sensor data and obtain the total data volume of all sensors; determine the cyclic judgment period based on the total data volume.
[0064] Collect sensor data within the cyclic judgment period, obtain the maximum change of each data based on the sensor data, and determine the detection estimate based on the maximum change of each data and the threshold of each data change.
[0065] The sensor data within the cyclic judgment period is input into the LSTM model to obtain sensor prediction data. The sensor prediction data is normalized, and the prediction sum is obtained based on the normalization result. The prediction sum is compared with the adjustment threshold, and the detection estimate is adjusted based on the comparison result.
[0066] When it is determined that the detection estimate needs to be adjusted, a feature vector is determined based on the normalization processing result, the feature vector is compared with the historical adjustment dataset, and an adjustment coefficient is determined based on the comparison result to adjust the detection estimate and obtain the final detection estimate.
[0067] The warning level is determined based on the final detection estimate.
[0068] It is understandable that the aforementioned machine learning-based electrical fire early warning methods and systems have the same beneficial effects, and will not be elaborated upon here. Attached Figure Description
[0069] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0070] Figure 1 A structural block diagram of an electrical fire early warning system based on machine learning provided in an embodiment of the present invention;
[0071] Figure 2 A flowchart illustrating a machine learning-based electrical fire early warning method provided in an embodiment of the present invention. Detailed Implementation
[0072] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, embodiments and features in the embodiments of the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0073] In some embodiments of this application, see Figure 1 As shown, an electrical fire early warning system based on machine learning includes:
[0074] The sensor module includes a temperature sensor, a smoke sensor, and current and voltage sensors.
[0075] An embedded microcontroller connects to the sensor module. The embedded microcontroller is used to acquire sensor data in real time and preprocess the sensor data, including outlier removal and missing value filling.
[0076] The central processing unit (CPU) is connected to the embedded microcontroller via a GPRS / 4G communication module. The CPU includes an acquisition unit, a judgment unit, a processing unit, an adjustment unit, and an early warning unit.
[0077] The acquisition unit is configured to acquire preprocessed sensor data and obtain the total data volume of all sensors, and determine the cyclic judgment period based on the total data volume.
[0078] The judgment unit is configured to collect sensor data within the cyclic judgment period, obtain the maximum change of each data point based on the sensor data, and determine the detection estimate based on the maximum change of each data point and the threshold of each data point change.
[0079] The processing unit is configured to input sensor data within the cyclic judgment period into the LSTM model to obtain sensor prediction data, normalize the sensor prediction data, obtain the predicted sum based on the normalization result, compare the predicted sum with the adjustment threshold, and determine whether to adjust the detection estimate based on the comparison result.
[0080] When it is determined that the detection estimate needs to be adjusted, the adjustment unit is configured to determine the feature vector based on the normalization result, compare the feature vector with the historical adjustment dataset, determine the adjustment coefficient based on the comparison result, adjust the detection estimate, and obtain the final detection estimate.
[0081] The early warning unit is configured to determine the early warning level based on the final detection estimate.
[0082] Specifically, a sensor module consisting of temperature, smoke, current, and voltage sensors is used to monitor the operating status of electrical equipment in real time, ensuring the comprehensiveness and accuracy of the data. An embedded microcontroller is responsible for collecting this sensor data and performing preprocessing, including outlier removal and missing value imputation, to ensure data stability and integrity. The collected data is transmitted to a central processing unit (CPU) via a GPRS / 4G wireless communication module. The CPU integrates a data acquisition unit, a judgment unit, a processing unit, an adjustment unit, and an early warning unit for intelligent processing and decision-making. The acquisition unit determines a cyclic judgment period and collects sensor data within that period. The judgment unit calculates the maximum change in each data point based on the collected data and, by comparing it with a change threshold, preliminarily determines the risk level, forming a detection estimate. The processing unit further performs machine learning modeling analysis on the detection estimate. LSTM is used to learn historical patterns from time-series data and predict future trends. The LSTM-processed sensor data is normalized to obtain predicted values, which are then compared with a set adjustment threshold to determine whether the detection estimate needs adjustment. If the comparison results indicate that the detection estimate needs adjustment, the adjustment unit extracts the normalized feature vector and compares it with the historical adjustment dataset to determine the adjustment coefficient, optimize the detection estimate, and ultimately obtain a more accurate final detection estimate. The early warning unit determines the early warning level based on the final detection estimate and triggers the alarm system. When an early warning is triggered, all monitoring data, alarm information, and video surveillance footage can be presented to the user through a graphical interface. Users can view the equipment operating status, fire warning information, and historical records through the visual interface, enabling rapid decision-making.
[0083] Understandably, compared to traditional alarm triggering methods that rely on fixed thresholds, the LSTM predictive model can predict future trends based on historical data, thus issuing early warnings before abnormal situations occur and reducing fire hazards. It possesses adaptive adjustment capabilities; the adjustment unit can dynamically optimize detection estimates based on historical data comparisons, improving the accuracy of warnings and reducing false alarms and missed alarms. The introduction of wireless communication technology enables remote data transmission, supporting access from PCs and mobile devices, allowing for monitoring of system status anytime, anywhere, and improving monitoring flexibility.
[0084] In some embodiments of this application, the embedded microcontroller preprocesses sensor data, including:
[0085] The embedded microcontroller arranges each type of data in the sensor data into a b*b matrix from left to right and from top to bottom according to the time sequence. The sensor data includes temperature data, smoke concentration data, and current and voltage data.
[0086] The embedded microcontroller can select any point in the matrix as the detection point.
[0087] Determine the detection radius as r, and then determine the detection range based on the detection radius.
[0088] The detection judgment mean is determined based on the detection range. The difference between the detection point and the detection judgment mean is obtained based on the data corresponding to the detection point. The difference between the detection point and the detection judgment mean is the difference between the data corresponding to the detection point and the detection judgment mean.
[0089] When the data corresponding to the detection point is a missing value, the mean of the detection judgment is used as the data corresponding to the detection point.
[0090] The difference between the detection points is compared with the difference threshold, and the comparison result is used to determine whether the data corresponding to the detection point is an outlier.
[0091] When the difference between detection points exceeds the difference threshold, the data corresponding to the detection point is determined to be an outlier, the outlier is removed, and the data corresponding to the detection point is replaced with the detection judgment mean.
[0092] In some embodiments of this application, when the embedded microcontroller preprocesses the sensor data, it further includes:
[0093] The mean value for detection and judgment is calculated using the following formula:
[0094] ;
[0095] in, The value represents the average value of the detection judgment, and r represents the detection radius. Indicates the coordinates of the detection point. In the matrix The data value of the point.
[0096] Understandably, intelligently filling in missing data using the detection and judgment mean avoids prediction bias caused by data loss. The detection and judgment mean calculated based on local statistical features can effectively identify sudden outliers, preventing single-point data anomalies from affecting the overall data trend. Adaptive difference threshold determination accurately identifies abnormal data, avoiding false alarms or missed alarms due to fixed thresholds, thus improving system stability. This ensures stronger temporal consistency of the data input to the LSTM prediction model, thereby improving the accuracy and lead time of electrical fire risk prediction.
[0097] In some embodiments of this application, when the acquisition unit determines the cycle judgment period based on the total data volume, the method includes: the acquisition unit comparing the total data volume with a first preset data volume and a second preset data volume, and determining the cycle judgment period based on the comparison results. The first preset data volume is less than the second preset data volume.
[0098] Specifically, when the total data volume is less than or equal to a first preset data volume, the acquisition unit determines the cyclic judgment period as the first period. When the total data volume is greater than the first preset data volume but less than or equal to a second preset data volume, the acquisition unit determines the cyclic judgment period as the second period. When the total data volume is greater than the second preset data volume, the acquisition unit determines the cyclic judgment period as the third period. The first period is greater than the second period, and the second period is greater than the third period.
[0099] Understandably, with low data volumes, the system automatically adjusts to a longer cycle to reduce unnecessary computation and lower the load on the embedded microcontroller and CPU. With high data volumes, it automatically adjusts to a shorter cycle to ensure high-frequency monitoring and improve the system's response to sudden anomalies. By dynamically adjusting the cyclic judgment cycle, the system can accelerate its early warning response as data volumes increase, detect anomalies more quickly, and reduce the delayed identification of electrical fire hazards. Under normal operating conditions, low-frequency monitoring is maintained to reduce resource consumption. Under high load or abnormal conditions, it automatically adjusts to high-frequency monitoring to ensure a rapid response to potential fire risks and improve safety. Dynamically adjusting the cycle based on data volume avoids data loss or false alarms caused by fixed-cycle judgments in traditional systems, making early warnings more accurate and reliable.
[0100] In some embodiments of this application, when the determination unit determines the detection estimate based on the maximum change of each data and the threshold of each data change, the following are included: the maximum change of each data includes the maximum change of temperature, the maximum change of smoke concentration, the maximum change of current, and the maximum change of voltage; the threshold of each data change includes the threshold of temperature change, the threshold of smoke concentration change, the threshold of current change, and the threshold of voltage change.
[0101] .
[0102] Wherein, G represents the detection estimate, Wmax represents the maximum temperature change, Nmax represents the maximum smoke concentration change, Imax represents the maximum current change, Umax represents the maximum voltage change, W0 represents the temperature change threshold, N0 represents the smoke concentration change threshold, I0 represents the current change threshold, and U0 represents the voltage change threshold.
[0103] In some embodiments of this application, when the processing unit inputs sensor data within a cyclic judgment period into the LSTM model to obtain sensor prediction data, it includes:
[0104] Forget gates for building LSTM models:
[0105] .
[0106] Input Gate:
[0107] .
[0108] .
[0109] Cell status update:
[0110] .
[0111] Output gate:
[0112] .
[0113] .
[0114] in, Indicates the output of the forget gate. The weight matrix represents the forget gate, and its values range from [-1, 1]. This indicates the hidden state at the previous moment. Indicates input data, The bias term representing the forget gate. For the sigmoid function, Indicates the input gate output. This represents the candidate cell state, with a value range of (-1, 1). This represents the weight matrix of the input gate, with values ranging from [-1, 1]. The weight matrix represents the candidate cell state, and its values range from [-1, 1]. , These represent the bias terms for the input gate and the candidate cell state, respectively. This indicates the current state of the cell. This indicates the cell state at the previous moment. Indicates the output of the output gate. This represents the predicted data. This represents the weight matrix of the output gate, with values ranging from [-1, 1]. This represents the bias term of the output gate. The processing unit divides each type of sensor data within the loop decision period into windows according to the time series and uses this as input data to obtain sensor prediction data.
[0115] In some embodiments of this application, when the processing unit compares the predicted sum with an adjustment threshold and determines whether to adjust the detection estimate based on the comparison result, the following steps are included:
[0116] .
[0117] Where Ri represents the normalized result of the i-th type of data in the sensor data, R0 represents the final predicted data of the i-th type of data in the sensor data, Rmin represents the minimum value of the predicted data of the i-th type of data and the data within the cyclic judgment period, and Rmax represents the maximum value of the predicted data of the i-th type of data and the data within the cyclic judgment period.
[0118] Specifically, the predicted sum is obtained by summing the normalized results of all data types in the sensor data. When the predicted sum is greater than an adjustment threshold, it is determined that the detection estimate should be adjusted. When the predicted sum is less than or equal to the adjustment threshold, it is determined that the detection estimate should not be adjusted, and the detection estimate is used as the final detection estimate.
[0119] Specifically, the threshold can be adjusted according to actual needs. In some embodiments of this application... The value ranges from 0.6 to 0.9. The value ranges from 0.4 to 0.8. The value ranges from 0.3 to 0.7. The value ranges from 0.5 to 0.9.
[0120] Understandably, combining real-time data changes with LSTM prediction trends effectively captures potential fire hazards, improves the accuracy of the early warning system, and reduces false alarms and missed alarms. By comparing LSTM prediction results with adjustment thresholds, the detection estimate G is dynamically adjusted, allowing for more flexible adaptation to different electrical environments and avoiding misjudgments caused by a single threshold method. Combining maximum change detection (anomaly monitoring), LSTM prediction, and normalization adjustment forms a multi-layered intelligent early warning mechanism, enhancing the reliability of fire risk assessment.
[0121] In some embodiments of this application, when the adjustment unit adjusts the detection estimate by determining the adjustment coefficient based on the comparison result, it includes: the historical adjustment dataset includes several historical feature vectors and several historical adjustment coefficients, and each historical feature vector corresponds to each historical adjustment coefficient.
[0122] Specifically, when there are data in the historical adjustment dataset whose similarity to the feature vector is greater than the similarity threshold, the historical adjustment coefficient of the historical feature vector corresponding to the maximum similarity is used as the adjustment coefficient to adjust the detection estimate. When the similarity between all historical feature vectors in the historical adjustment dataset and the feature vector is less than or equal to the similarity threshold, the adjustment coefficient is determined based on the feature vector to adjust the detection estimate.
[0123] The final detection estimate is the product of the adjustment factor and the detection estimate.
[0124] .
[0125] Where T represents the adjustment coefficient, n represents the total number of data types in the feature vector, and Ri represents the normalization result of the i-th type of data in the sensor data.
[0126] In some embodiments of this application, when the early warning unit determines the early warning level based on the final detection estimate, it includes: the early warning unit comparing the final detection estimate with each of the early warning thresholds, and determining the early warning level based on the comparison results, wherein the early warning level is directly proportional to the final detection estimate.
[0127] Understandably, by using historical adjustment datasets and feature vector similarity matching, the adjustment coefficients are automatically optimized under different environmental and equipment conditions, reducing errors and making the detected estimates closer to the actual fire risk. Through dynamic calculation of the adjustment coefficients, it can continuously learn and optimize to adapt to the fire warning needs of different equipment and environments, making it more intelligent than the fixed threshold method. By comparing the final detected estimate with the warning threshold, a multi-level fire risk warning system is formed, avoiding the problem of a single alarm mechanism being too sensitive or too insensitive, making the alarm strategy more accurate and efficient. The introduction of historical data matching and dynamic adjustment mechanisms reduces false alarms caused by environmental changes, while improving sensitivity to abnormal trends and reducing the risk of missed alarms.
[0128] The above embodiments integrate multiple sensors (temperature sensor, smoke sensor, current sensor, and voltage sensor) to collect key parameters of electrical equipment in real time. An embedded microcontroller preprocesses the collected data to improve its integrity and reliability, avoiding misjudgments due to data anomalies. GPRS / 4G communication technology ensures stable, low-latency transmission of sensor data to the central processor, enabling remote monitoring and centralized processing. Sensor data within a cyclic judgment period is input into an LSTM model, using deep learning algorithms to predict future trends. The prediction results are then normalized for more accurate early warning assessments. Dynamic analysis of data change trends allows for early identification of potential fire risks, effectively reducing missed and false alarms. An adjustment unit extracts feature vectors and compares them with historical adjustment datasets to automatically adjust detection estimates, improving the adaptability and accuracy of predictions. The early warning unit determines the warning level based on the adjusted detection estimates and promptly alerts management personnel through audible and visual alarms, remote notifications, etc., improving the accuracy and response speed of electrical fire detection.
[0129] In another preferred embodiment based on the above embodiments, see [reference] Figure 2 As shown, this embodiment provides a machine learning-based electrical fire early warning method, applied to the aforementioned machine learning-based electrical fire early warning system, including:
[0130] S100: Collect pre-processed sensor data and obtain the total data volume of all sensors, and determine the cycle judgment period based on the total data volume.
[0131] S200: Collect sensor data within the cyclic judgment period, obtain the maximum change of each data point based on the sensor data, and determine the detection estimate based on the maximum change of each data point and the threshold of each data change.
[0132] S300: Input the sensor data within the cyclic judgment period into the LSTM model to obtain sensor prediction data, normalize the sensor prediction data, obtain the prediction sum based on the normalization result, compare the prediction sum with the adjustment threshold, and determine whether to adjust the detection estimate based on the comparison result.
[0133] S400: When it is determined that the detection estimate needs to be adjusted, the feature vector is determined based on the normalization result, the feature vector is compared with the historical adjustment dataset, and the adjustment coefficient is determined based on the comparison result to adjust the detection estimate and obtain the final detection estimate.
[0134] S500: The warning level is determined based on the final detection estimate.
[0135] Understandably, multiple sensors (temperature, smoke, current, and voltage sensors) are integrated to collect key parameters of electrical equipment in real time. An embedded microcontroller preprocesses the collected data to improve its integrity and reliability, avoiding misjudgments due to data anomalies. GPRS / 4G communication technology ensures stable, low-latency transmission of sensor data to the central processor, enabling remote monitoring and centralized processing. Sensor data within a cyclic judgment period is input into an LSTM model, using deep learning algorithms to predict future trends. The prediction results are then normalized for more accurate early warning assessments. Dynamic analysis of data trends allows for early identification of potential fire risks, effectively reducing missed and false alarms. An adjustment unit extracts feature vectors and compares them with historical adjustment datasets to automatically adjust detection estimates, improving the adaptability and accuracy of predictions. The early warning unit determines the warning level based on the adjusted detection estimates and promptly alerts management personnel through audible and visual alarms, remote notifications, etc., improving the accuracy and response speed of electrical fire detection.
[0136] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program goods. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program goods embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0137] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program goods according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0138] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0139] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0140] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A machine learning based electrical fire warning system, characterized in that, The application relates to a fire risk early warning system, comprising: a sensor module comprising a temperature sensor, a smoke sensor and a current and voltage sensor; an embedded microcontroller connected with the sensor module, the embedded microcontroller being used for collecting sensor data in real time and pre-processing the sensor data, the pre-processing including outlier rejection and missing value filling; a central processor connected with the embedded microcontroller through a GPRS / 4G communication module, the central processor comprising a collection unit, a judgment unit, a processing unit, an adjustment unit and a warning unit; the collection unit is configured to collect the pre-processed sensor data, obtain the total data volume of all sensors and determine a cycle judgment period according to the total data volume; the judgment unit is configured to collect sensor data in the cycle judgment period, obtain each data maximum change value according to the sensor data and determine a detection estimate value according to the each data maximum change value and each data change value threshold; the processing unit is configured to input the sensor data in the cycle judgment period into an LSTM model, obtain sensor prediction data, perform normalization processing on the sensor prediction data, obtain a prediction sum value according to the normalization processing result, compare the prediction sum value with an adjustment threshold and judge whether to adjust the detection estimate value according to the comparison result; when it is determined to adjust the detection estimate value, the adjustment unit is configured to determine a feature vector according to the normalization processing result, compare the feature vector with a historical adjustment data set, determine an adjustment coefficient according to the comparison result, adjust the detection estimate value and obtain a final detection estimate value; the warning unit is configured to determine a warning level according to the final detection estimate value; when the processing unit compares the prediction sum value with the adjustment threshold and judges whether to adjust the detection estimate value according to the comparison result, the method comprises the following steps: ; wherein Ri represents the normalization result of the i-th data in the sensor data, R0 represents the final prediction data of the i-th data in the sensor data, Rmin represents the minimum value of the i-th data prediction data and the data in the cycle judgment period and Rmax represents the maximum value of the i-th data prediction data and the data in the cycle judgment period; the prediction sum value is obtained by summing the normalization results of all data in the sensor data; when the prediction sum value is greater than the adjustment threshold, it is determined to adjust the detection estimate value; when the prediction sum value is less than or equal to the adjustment threshold, it is determined not to adjust the detection estimate value, and the detection estimate value is taken as the final detection estimate value; when the adjustment unit adjusts the detection estimate value according to the comparison result, the method comprises the following steps: the historical adjustment data set comprises a plurality of historical feature vectors and a plurality of historical adjustment coefficients, and each historical feature vector corresponds to each historical adjustment coefficient; when there is data in the historical adjustment data set that has a similarity greater than a similarity threshold with the feature vector, the historical adjustment coefficient of the historical feature vector corresponding to the maximum similarity is taken as the adjustment coefficient for adjusting the detection estimate value. when similarity between all historical feature vectors in the historical adjustment data set and the feature vector is less than or equal to a similarity threshold, adjusting the detection estimate according to the feature vector based on an adjustment coefficient; the final detection estimate is a product of the adjustment coefficient and the detection estimate; ; wherein T represents an adjustment coefficient, n represents a total number of data types in the feature vector, and Ri represents a normalized result of the i-th type of data in the sensor data; when the warning unit determines a warning level based on the final detection estimate, the method comprises: The warning unit compares the final detection estimate with each warning threshold respectively, and determines a warning level based on the comparison result, wherein the warning level is in a positive correlation with the final detection estimate.
2. The machine learning based electrical fire warning system as claimed in claim 1, wherein, When the embedded microcontroller pre-processes the sensor data, the method comprises: The embedded microcontroller arranges each type of data in the sensor data in a b*b matrix from left to right and from top to bottom in time sequence, wherein the sensor data comprises temperature data, smoke concentration data, and current and voltage data. The embedded microcontroller selects a detection point in the matrix; determines a detection radius r, and determines a detection range based on the detection radius; determines a detection judgment mean value based on the detection range, obtains a detection point difference value based on the detection point corresponding data and the detection judgment mean value, wherein the detection point difference value is a difference between the detection point corresponding data and the detection judgment mean value; when the detection point corresponding data is a missing value, the detection judgment mean value is used as the detection point corresponding data; compares the detection point difference value with a difference threshold value, and determines whether the detection point corresponding data is an abnormal value based on the comparison result; when the detection point difference value is greater than the difference threshold value, it is determined that the detection point corresponding data is an abnormal value, the abnormal value is removed, and the detection point corresponding data is replaced with the detection judgment mean value.
3. The machine learning based electrical fire warning system as claimed in claim 2, wherein, When the embedded microcontroller pre-processes the sensor data, the method further comprises: The detection judgment mean value is obtained by the following formula: ; wherein, represents a detection judgment mean value, r represents a detection radius, represents a coordinate of a detection point, represents a data value of a point in a matrix point in a matrix 4. The machine learning based electrical fire warning system as claimed in claim 3, wherein, When the collection unit determines a cycle judgment period based on the total data amount, the method comprises: The collection unit compares the total data amount with a first preset data amount and a second preset data amount respectively, and determines a cycle judgment period based on the comparison result; the first preset data amount is less than the second preset data amount when the total data amount is less than or equal to the first preset data amount, the collection unit determines that the cycle judgment period is a first period; when the total data amount is greater than the first preset data amount and less than or equal to the second preset data amount, the collection unit determines that the cycle judgment period is a second period; when the total data amount is greater than the second preset data amount, the collection unit determines that the cycle judgment period is a third period; wherein the first period is greater than the second period, and the second period is greater than the third period.
5. The machine learning based electrical fire warning system as claimed in claim 4, wherein, The determination unit determines the detection estimate value according to the maximum change amount of each data and the change amount threshold value of each data, wherein the maximum change amount of each data includes the maximum change amount of temperature, the maximum change amount of smoke concentration, the maximum change amount of current and the maximum change amount of voltage, and the change amount threshold value of each data includes the change amount threshold value of temperature, the change amount threshold value of smoke concentration, the change amount threshold value of current and the change amount threshold value of voltage. ; Wherein, G represents the detection estimate value, Wmax represents the maximum change amount of temperature, Nmax represents the maximum change amount of smoke concentration, Imax represents the maximum change amount of current, Umax represents the maximum change amount of voltage, W0 represents the change amount threshold value of temperature, N0 represents the change amount threshold value of smoke concentration, I0 represents the change amount threshold value of current, and U0 represents the change amount threshold value of voltage.
6. The machine learning based electrical fire warning system as claimed in claim 5, wherein, The processing unit inputs the sensor data in the cycle determination period into the LSTM model to obtain sensor prediction data, and the method comprises the following steps: The forget gate of the LSTM model is constructed as follows: ; The input gate is constructed as follows: ; ; The cell state update is constructed as follows: ; The output gate is constructed as follows: ; ; wherein, denotes the forget gate output, denotes the weight matrix of the forget gate, and the value range is [-1, 1], denotes the hidden state of the previous moment, denotes the input data, denotes the bias term of the forget gate, is a sigmoid function, denotes the input gate output, denotes the candidate cell state, and the value range is (-1, 1), denotes the weight matrix of the input gate, and the value range is [-1, 1], denotes the weight matrix of the candidate cell state, and the value range is [-1, 1], , denote the bias terms of the input gate and the candidate cell state, respectively, denotes the cell state of the current moment, denotes the cell state of the previous moment, denotes the output gate output, denotes the predicted data, denotes the weight matrix of the output gate, and the value range is [-1, 1], denotes the bias term of the output gate; The processing unit divides each type of data in the sensor data in the cycle determination period into a window according to a time sequence to obtain input data, and obtains the sensor prediction data.
7. A machine learning based electrical fire warning method applied to the machine learning based electrical fire warning system according to any one of claims 1-6, characterized in that, The method comprises the following steps: Collecting the preprocessed sensor data, obtaining the total data amount of all sensors, and determining the cycle determination period according to the total data amount; Collecting the sensor data in the cycle determination period, obtaining the maximum change amount of each data according to the sensor data, and determining the detection estimate value according to the maximum change amount of each data and the change amount threshold value of each data; Inputting the sensor data in the cycle determination period into the LSTM model to obtain sensor prediction data, performing normalization processing on the sensor prediction data, obtaining a prediction sum value according to the normalization processing result, comparing the prediction sum value with an adjustment threshold value, and determining whether to adjust the detection estimate value according to the comparison result; When it is determined to adjust the detection estimate value, determining a feature vector according to the normalization processing result, comparing the feature vector with historical adjustment data set, determining an adjustment coefficient according to the comparison result, adjusting the detection estimate value according to the adjustment coefficient, and obtaining a final detection estimate value; Determining a warning level according to the final detection estimate value.
Citation Information
Patent Citations
Fire early warning system based on electrical informatization
CN118587833A
Multispectral satellite fire prevention method and system based on data identification
CN119495033A