Smoke alarm system based on big data
Through the big data smoke alarm system, sensors and video surveillance data are used to analyze in the cloud, a fire risk assessment model is built, which solves the problem that traditional smoke alarms cannot be early warning and have limited coverage, and achieves more accurate and reliable smoke detection and early warning .
Patent Information
- Application Number
- CN202411220586.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-12-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional smoke alarms cannot be early warning, the false alarm rate is high, and the sensor coverage is limited, so it is impossible to fully monitor the smoke condition of buildings or places.
A smoke alarm system based on big data is adopted to collect data in real time through sensors and cameras, upload it to the cloud for analysis, and combine video surveillance and intelligent devices to build a fire risk assessment model to trigger early warning.
It improves the smoke recognition rate, reduces false alarms and missed reports, and realizes scientific assessment and timely warning of fire risks.
Smart Images

Figure CN119206981A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and more specifically, to a smoke alarm system based on big data. Background Art
[0002] With the continuous development of science and technology, smoke alarms have become an indispensable part of the field of fire safety. However, traditional smoke alarms have some limitations. Based on fixed sensors and algorithms, they can only detect smoke events that have already occurred, but cannot provide early warnings. There are also problems such as high false alarm rates and inability to monitor in real time. In addition, the coverage of sensors is limited, and they can only detect smoke conditions in local areas, but cannot fully monitor smoke conditions in the entire building or venue. In order to solve these problems, a smoke alarm system based on big data came into being.
[0003] By using various sensors and monitoring equipment, smoke data in the environment is collected in real time and uploaded to the cloud for analysis and processing. Combining video surveillance with the smoke alarm system, by analyzing video images, it can detect whether smoke is generated, achieve early warning, and integrate with other smart devices to achieve remote monitoring and management, thereby improving the accuracy and reliability of the alarm. Summary of the invention
[0004] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a smoke alarm system based on big data to solve the problems raised in the above-mentioned background technology.
[0005] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a smoke alarm system based on big data, including a data acquisition module, a cloud data processing module, and an early warning and response module;
[0006] Data acquisition module: collects smoke data in the environment through sensors, captures video data with cameras, and transmits it to the cloud server;
[0007] Cloud data processing module: Establish a data warehouse on the cloud server to store sensor data and video data, and process and analyze the sensor data and video data;
[0008] Early warning and response module: Based on the analysis results of sensor data and video data, a fire risk assessment model is constructed to evaluate the fire risk level. When the risk level exceeds the preset threshold, an early warning is triggered.
[0009] In a preferred embodiment, the data acquisition module includes a sensor interface and a camera interface, collects smoke data in the environment through the sensor, captures real-time video data using the camera, and transmits it to the cloud server. The specific steps are as follows:
[0010] Step A1, data collection: using a smoke sensor to collect smoke concentration data in the air and record a timestamp, and using a camera to capture real-time video images;
[0011] Step A2, data transmission: Encode and compress the captured video image, and integrate the smoke concentration data collected by the sensor and the encoded and compressed video image into a data packet, and transmit it to the cloud server through the network.
[0012] In a preferred embodiment, in the data collection of step A1, a smoke sensor is used to collect smoke concentration data in the air and a timestamp is recorded, and a camera is used to capture real-time video images to detect the generation and spread of smoke, further comprising the following steps:
[0013] Step A101, sensor data acquisition: install the smoke sensor at a high place indoors, configure the working frequency and sampling time interval of the sensor, and connect the smoke sensor to the sensor interface of the data acquisition module to monitor the environmental data of smoke concentration, gas composition, temperature and humidity in real time, convert the analog signal into a digital signal through its internal analog-to-digital converter, and record the acquired timestamp and device ID;
[0014] Step A102, video data capture: connect the camera to the camera interface of the data acquisition module, continuously capture the video image stream of the environment through the camera, set the timer photo function, and automatically capture images every 5 minutes.
[0015] In a preferred embodiment, the cloud data processing module establishes a data warehouse on the cloud server to store sensor data and video data, and processes and analyzes the sensor data and video data. The specific steps are as follows:
[0016] Step B1, data storage: receiving data packets on a cloud server, decoding video streams, extracting smoke density data and video images, and preprocessing the received data, wherein the preprocessing includes processing missing values and outliers of sensor data, performing data standardization and normalization, ensuring data consistency and availability, and denoising images, and storing the preprocessed data in an established data warehouse;
[0017] Step B2, data analysis: using big data analysis technology to analyze sensor data and video data to identify smoke patterns. The sensor data analysis is to apply machine learning algorithms to identify smoke patterns; the video data analysis is to use convolutional neural networks to perform object detection and identify smoke patterns by analyzing the features of detected objects.
[0018] Step B3, data integration: Integrate the sensor data and video data together to create a data table containing time, location, sensor value, and video frame analysis results.
[0019] In a preferred embodiment, the sensor data analysis is to extract the change rate of smoke concentration and abnormal temperature fluctuations from the sensor data, and use them as input data to apply a machine learning algorithm to perform smoke pattern recognition. The specific steps are as follows:
[0020] Step S1, constructing a feature matrix: combining the extracted smoke concentration change rate and temperature abnormal fluctuation into a feature matrix X to form a training data set, where each row corresponds to a feature value at a time point;
[0021] The rate of change of smoke concentration is Among them, Rate smoke represents the rate of change of smoke concentration, x smoke (t) and x smoke (t-1) represents the smoke concentration value at time points t and t-1 respectively;
[0022] The abnormal temperature fluctuation is: Among them, Std temp Indicates the standard deviation of temperature, reflecting the degree of abnormal temperature fluctuation, T i represents the temperature measurement value at the i-th time point, is the average of all temperature measurements, and n is the total number of time points;
[0023] Step S2, data segmentation: assign a label y to each time point, define different smoke modes including "y = 0 for normal", "y = 1 for warning", "y = 2 for danger", and segment the feature matrix X and label y into a training set and a test set. Set the feature matrix and label of the training set to X train and train , the feature matrix and label of the test set are X test and test ;
[0024] Step S3, model training: using the feature matrix X of the training set train Training the gradient boosting tree model. During the training process, the model minimizes the loss function L(y train ,f(X train )) to optimize the prediction function, the specific calculation formula is as follows:
[0025]
[0026] Among them, f(X train ) is the prediction function on the training set, K is the total number of trees, γk is the weight of the kth tree, h k (X train ) is the predicted value of the kth tree for the training set, L(y train ,f(X train )) is the loss function, which measures the predicted value f(X train ) and the actual label y train The difference between.
[0027] In a preferred embodiment, the video data analysis is to save the image frames of the video data as a historical frame data set, use a convolutional neural network to perform object detection, and identify the smoke pattern by analyzing the features of the detected objects. The specific steps are as follows:
[0028] Step Y1, background modeling and subtraction: Use historical frame data to build a background model, subtract the background model from the current frame to detect foreground objects. For each pixel position (x, y), the specific calculation formula of the background model is as follows:
[0029]
[0030] F(x,y)=I current (x,y)-B(x,y)
[0031] Where M is the total number of historical frames, I i (x,y) is the pixel value at position (x,y) in the i-th frame, F(x,y) is the foreground image, I current (x, y) is the current captured frame image, B(x, y) is the background model;
[0032] Step Y2, object detection: Use a convolutional neural network to detect smoke in the image. The foreground image is used as input and passed into the convolutional neural network. The output feature map is F CNN , assuming that the structure of the convolutional neural network is L layers, the input and output of each layer are expressed as follows:
[0033] The feature map F of layer c c , by inputting the feature map F of the previous layer c-1 Perform convolution and nonlinear transformation:
[0034]
[0035] Among them, p is the radius of the convolution kernel, C c is the convolution kernel of layer c, * indicates the convolution operation, b c is the bias, σ is the activation function, α and β represent the offset from the current pixel position (x, y) in the horizontal and vertical directions respectively;
[0036] After L layers of processing, the final feature map FCNN Expressed as: F CNN (x,y)=F L (x,y), F L (x,y) The output feature map of the Lth layer;
[0037] Step Y3, smoke detection: Use the classification layer to classify the feature map F CNN Classify and output the probability of smoke and non-smoke as P(z|F CNN )=softmax(F CNN ), and set the threshold ζ, when P(z|F CNN )>ζ, judging whether there is smoke in the image, where z is the output category including “with smoke” and “without smoke”.
[0038] In a preferred embodiment, the early warning and response module constructs a fire risk assessment model based on the analysis results of sensor data and video data, assesses the fire risk level, and triggers an early warning when the risk level exceeds a preset threshold. The specific steps are as follows:
[0039] Step C1, sensor data risk score: assign corresponding risk scores according to sensor labels. When the sensor data label indicates normal, the risk score is assigned as Risk Score sensor =0; when the sensor data label indicates a warning, the risk score is assigned as Risk Score sensor = 1, when the sensor data label indicates a warning, the risk score is assigned as RiskScore sensor =2;
[0040] Step C2: Video data risk scoring: When P(z|F CNN )>ζ, it is determined that there is smoke and the risk score is assigned as RiskScore video =1; when P(z|F CNN )≤ζ, then it is determined that there is no smoke and the risk score is assigned as Risk Score video =0;
[0041] Step C3, comprehensive risk score: Combine the risk score of sensor data and the risk score of video data, and set weights for the risk scores of sensor data and video data, ω1 and ω2 respectively, to calculate the comprehensive risk score. The specific calculation formula is as follows:
[0042] Overall Risk Score=ω1·Risk Score sensor +ω2·Risk Score video
[0043] Among them, Overall Risk Score represents the comprehensive risk score, Risk Score sensor is the sensor data risk score, Risk Score video is the risk score of video data, ω1 and ω2 are the weights of the risk scores of sensor data and video data, respectively, and ω1+ω2=1;
[0044] Step C4, setting warning threshold: define the fire risk level according to the comprehensive risk score, and set different score intervals to represent low, medium and high risk levels. When the comprehensive risk score falls in the low risk interval, no warning is required, and the data is recorded and monitoring continues; when the comprehensive risk score falls in the medium or high risk interval, the warning is triggered, and medium and high-level warning notifications are generated, and all relevant personnel, including the fire department, are immediately notified to initiate emergency response;
[0045] The risk levels are defined as follows:
[0046] Risk levels with an overall risk score of 0 ≤ Overall Risk Score ≤ 0.5 are classified as low risk;
[0047] The risk level with an overall risk score of 0.5<Overall Risk Score<1.5 is classified as medium risk;
[0048] Risk levels with an Overall Risk Score ≥ 1.5 are classified as high risk.
[0049] The beneficial effects of the present invention are: collecting smoke data in the environment through sensors, capturing video data with cameras, and transmitting it to a cloud server, establishing a data warehouse on the cloud server to store sensor data and video data, and processing and analyzing the sensor data and video data, wherein sensor data analysis is to apply machine learning algorithms to recognize smoke patterns; video data analysis is to use convolutional neural networks for object detection, identifying smoke patterns by analyzing the features of detected objects, and constructing a fire risk assessment model based on the analysis results of sensor data and video data to assess the fire risk level. When the risk level exceeds a preset threshold, an early warning is triggered. The present invention integrates sensor data and video data for comprehensive analysis to establish a fire risk assessment model, which can scientifically assess fire risks in different environments, improve the recognition rate of smoke, and reduce false alarms and missed alarms. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a system flow chart of the present invention. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0052] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "plurality" means two or more, unless otherwise clearly and specifically defined.
[0053] In the description of the present application, the term "for example" is used to mean "used as an example, illustration or description". Any embodiment described as "for example" in the present application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid unnecessary details to obscure the description of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.
[0054] Example 1
[0055] This embodiment provides Figure 1 A smoke alarm system based on big data is shown, which specifically includes a data acquisition module, a cloud data processing module, and an early warning and response module;
[0056] Data acquisition module: collects smoke data in the environment through sensors, captures video data with cameras, and transmits it to the cloud server;
[0057] Cloud data processing module: Establish a data warehouse on the cloud server to store sensor data and video data, and process and analyze the sensor data and video data;
[0058] Early warning and response module: Based on the analysis results of sensor data and video data, a fire risk assessment model is constructed to evaluate the fire risk level. When the risk level exceeds the preset threshold, an early warning is triggered.
[0059] In this embodiment, the data acquisition module specifically needs to be explained. The data acquisition module includes a sensor interface and a camera interface. The smoke data in the environment is collected by the sensor, and the real-time video data is captured by the camera and transmitted to the cloud server. The specific steps are as follows:
[0060] Step A1, data collection: using a smoke sensor to collect smoke concentration data in the air and record a timestamp, and using a camera to capture real-time video images to detect the generation and spread of smoke, further comprising the following steps:
[0061] Step A101, sensor data acquisition: install the smoke sensor at a high place indoors, configure the working frequency and sampling time interval of the sensor, and connect the smoke sensor to the sensor interface of the data acquisition module to monitor the environmental data of smoke concentration, gas composition, temperature and humidity in real time, convert the analog signal into a digital signal through its internal analog-to-digital converter, and record the acquired timestamp and device ID;
[0062] Step A102, video data capture: connect the camera to the camera interface of the data acquisition module, continuously capture the video image stream of the environment through the camera, set the timer photo function, and automatically capture a frame of image every 5 minutes;
[0063] Step A2, data transmission: Encode and compress the captured video image, and integrate the smoke concentration data collected by the sensor and the encoded and compressed video image into a data packet, and transmit it to the cloud server through the network.
[0064] In this embodiment, the cloud data processing module specifically needs to be explained. The cloud data processing module establishes a data warehouse on the cloud server to store sensor data and video data, simplifies data management and backup processes, processes sensor data, analyzes video images, and improves the precision and accuracy of detection by analyzing sensor data and video images. The specific steps are as follows:
[0065] Step B1, data storage: receiving data packets on a cloud server, decoding video streams, extracting smoke density data and video images, and preprocessing the received data, wherein the preprocessing includes processing missing values and outliers of sensor data, performing data standardization and normalization, ensuring data consistency and availability, and denoising images, and storing the preprocessed data in an established data warehouse;
[0066] Step B2, data analysis: using big data analysis techniques to analyze sensor data and video data to identify smoke patterns and potential fire risks, further comprising the following steps:
[0067] Step B201, sensor data analysis: extract the change rate of smoke concentration and abnormal temperature fluctuations from the sensor data, and use them as input data to apply machine learning algorithms for smoke pattern recognition. The specific steps are as follows:
[0068] Step S1, constructing a feature matrix: combining the extracted smoke concentration change rate and temperature abnormal fluctuation into a feature matrix X to form a training data set, where each row corresponds to a feature value at a time point;
[0069] The rate of change of smoke concentration is Among them, Rate smoke represents the rate of change of smoke concentration, x smoke (t) and x smoke (t-1) represents the smoke concentration value at time points t and t-1 respectively;
[0070] The abnormal temperature fluctuation is: Among them, Std temp Indicates the standard deviation of temperature, reflecting the degree of abnormal temperature fluctuation, T i represents the temperature measurement value at the i-th time point, is the average of all temperature measurements, and n is the total number of time points;
[0071] Step S2, data segmentation: assign a label y to each time point, define different smoke modes including "y = 0 for normal", "y = 1 for warning", "y = 2 for danger", and segment the feature matrix X and label y into a training set and a test set. Set the feature matrix and label of the training set to X train and train , the feature matrix and label of the test set are X test and test ;
[0072] Step S3, model training: using the feature matrix X of the training set train Training the gradient boosting tree model. During the training process, the model minimizes the loss function L(y train ,f(X train )) to optimize the prediction function, the specific calculation formula is as follows:
[0073]
[0074] Among them, f(X train ) is the prediction function on the training set, K is the total number of trees, γ k is the weight of the kth tree, h k (X train ) is the predicted value of the kth tree for the training set, L(y train ,f(X train)) is the loss function, which measures the predicted value f(X train ) and the actual label y train The difference between
[0075] Step S4, model prediction: Use the trained model to predict the test set and calculate the accuracy. For the test set feature matrix X test , the model outputs the predicted label as in, is the model’s predicted label for the test set, X test is the feature matrix of the test set. The model performance is evaluated by calculating the accuracy of the model on the test set. The accuracy of the model is: Among them, Accuracy is the accuracy, n test is the number of samples in the test set, is the model’s predicted label for the jth test sample, y test,j is the actual label of the jth test sample, 1() is an indicator function that returns 1 when the condition is true, otherwise it returns 0;
[0076] Step B202, video data analysis: save the image frames of the video data as a historical frame data set, use a convolutional neural network to detect objects, and identify smoke patterns by analyzing the features of the detected objects. The specific steps are as follows:
[0077] Step Y1, background modeling and subtraction: Use historical frame data to build a background model, subtract the background model from the current frame to detect foreground objects. For each pixel position (x, y), the specific calculation formula of the background model is as follows:
[0078]
[0079] F(x,y)=I current (x,y)-B(x,y)
[0080] Where M is the total number of historical frames, I i (x,y) is the pixel value at position (x,y) in the i-th frame, F(x,y) is the foreground image, I current (x, y) is the current captured frame image, B(x, y) is the background model;
[0081] Step Y2, object detection: Use a convolutional neural network to detect smoke in the image. The foreground image is used as input and passed into the convolutional neural network. The output feature map is F CNN , assuming that the structure of the convolutional neural network is L layers, the input and output of each layer are expressed as follows:
[0082] The feature map F of layer c c , by inputting the feature map F of the previous layer c-1Perform convolution and nonlinear transformation:
[0083]
[0084] Among them, p is the radius of the convolution kernel, C c is the convolution kernel of layer c, * indicates the convolution operation, b c is the bias, σ is the activation function, α and β represent the offset from the current pixel position (x, y) in the horizontal and vertical directions respectively;
[0085] After L layers of processing, the final feature map F CNN Expressed as: F CNN (x,y)=F L (x,y), F L (x,y) The output feature map of the Lth layer;
[0086] Step Y3, smoke detection: Use the classification layer to classify the feature map F CNN Classify and output the probability of smoke and non-smoke as P(z|F CNN )=softmax(F CNN ), and set the threshold ζ, when P(z|F CNN )>ζ, judging whether there is smoke in the image, where z is the output category including "smoke" and "no smoke";
[0087] Step B3, data integration: Integrate the sensor data and video data together to create a data table containing time, location, sensor value, and video frame analysis results to facilitate subsequent processing and analysis.
[0088] In this embodiment, the early warning and response module specifically needs to be explained. The early warning and response module constructs a fire risk assessment model based on the analysis results of sensor data and video data, assesses the fire risk level, and triggers an early warning when the risk level exceeds a preset threshold. When the fire risk increases, an early warning can be issued in time to reduce response time and potential losses. The specific steps are as follows:
[0089] Step C1, sensor data risk score: assign corresponding risk scores according to sensor labels. When the sensor data label indicates normal, the risk score is assigned as Risk Score sensor =0; when the sensor data label indicates a warning, the risk score is assigned as Risk Score sensor = 1, when the sensor data label indicates a warning, the risk score is assigned as RiskScore sensor =2;
[0090] Step C2: Video data risk scoring: When P(z|F CNN)>ζ, it is determined that there is smoke and the risk score is assigned as RiskScore video =1; when P(z|F CNN )≤ζ, then it is determined that there is no smoke and the risk score is assigned as Risk Score video =0;
[0091] Step C3, comprehensive risk score: Combine the risk score of sensor data and the risk score of video data, and set weights for the risk scores of sensor data and video data, ω1 and ω2 respectively, to calculate the comprehensive risk score. The specific calculation formula is as follows:
[0092] Overall Risk Score=ω1·Risk Score sensor +ω2·Risk Score video
[0093] Among them, Overall Risk Score represents the comprehensive risk score, Risk Score sensor is the sensor data risk score, Risk Score video is the risk score of video data, ω1 and ω2 are the weights of the risk scores of sensor data and video data, respectively, and ω1+ω2=1;
[0094] Step C4, setting warning threshold: define the fire risk level according to the comprehensive risk score, and set different score intervals to represent low, medium and high risk levels. When the comprehensive risk score falls in the low risk interval, no warning is required, and the data is recorded and monitoring continues; when the comprehensive risk score falls in the medium or high risk interval, the warning is triggered, and medium and high-level warning notifications are generated, and all relevant personnel, including the fire department, are immediately notified to initiate emergency response, including evacuation and emergency rescue;
[0095] The risk levels are defined as follows:
[0096] Risk levels with an overall risk score of 0 ≤ Overall Risk Score ≤ 0.5 are classified as low risk;
[0097] The risk level with an overall risk score of 0.5<Overall Risk Score<1.5 is classified as medium risk;
[0098] Risk levels with an Overall Risk Score ≥ 1.5 are classified as high risk.
[0099] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0100] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented 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.
[0101] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0102] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0104] Although preferred embodiments of the present invention have been described, additional changes and modifications may be made to these embodiments by those skilled in the art once the basic inventive concept is known. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A smoke alarm system based on big data, characterized by: It includes data collection module, cloud data processing module, and early warning and response module; Data acquisition module: collects smoke data in the environment through sensors, captures video data with cameras, and transmits it to the cloud server; Cloud data processing module: Establish a data warehouse on the cloud server to store sensor data and video data, and process and analyze the sensor data and video data; Early warning and response module: Based on the analysis results of sensor data and video data, a fire risk assessment model is constructed to evaluate the fire risk level. When the risk level exceeds the preset threshold, an early warning is triggered.
2. The big data-based smoke alarm system according to claim 1, characterized in that: The data acquisition module includes a sensor interface and a camera interface. The sensor collects smoke data in the environment, the camera captures real-time video data, and transmits it to the cloud server. The specific steps are as follows: Step A1, data collection: using a smoke sensor to collect smoke concentration data in the air and record a timestamp, and using a camera to capture real-time video images; Step A2, data transmission: Encode and compress the captured video image, and integrate the smoke concentration data collected by the sensor and the encoded and compressed video image into a data packet, and transmit it to the cloud server through the network.
3. The big data based smoke alarm system according to claim 1, characterized in that: The cloud data processing module establishes a data warehouse on the cloud server to store sensor data and video data, and processes and analyzes the sensor data and video data. The specific steps are as follows: Step B1, data storage: receiving data packets on a cloud server, decoding video streams, extracting smoke concentration data and video images, and preprocessing the received data, wherein the preprocessing includes processing missing values and outliers of sensor data, performing data standardization and normalization, and denoising the images, and storing the preprocessed data in an established data warehouse; Step B2, data analysis: using big data analysis technology to analyze sensor data and video data to identify smoke patterns. The sensor data analysis is to apply machine learning algorithms to identify smoke patterns; the video data analysis is to use convolutional neural networks to perform object detection and identify smoke patterns by analyzing the features of detected objects. Step B3, data integration: Integrate the sensor data and video data together to create a data table containing time, location, sensor value, and video frame analysis results.
4. The big data based smoke alarm system according to claim 3 is characterized by: The sensor data analysis is to extract the change rate of smoke concentration and abnormal temperature fluctuations from the sensor data, and use them as input data to apply machine learning algorithms to perform smoke pattern recognition. The specific steps are as follows: Step S1, constructing a feature matrix: combining the extracted smoke concentration change rate and temperature abnormal fluctuation into a feature matrix X to form a training data set, where each row corresponds to a feature value at a time point; Step S2, data segmentation: assign a label y to each time point, define different smoke modes including "y = 0 for normal", "y = 1 for warning", "y = 2 for danger", and segment the feature matrix X and label y into a training set and a test set. Set the feature matrix and label of the training set to X train and train , the feature matrix and label of the test set are X test and test ; Step S3, model training: using the feature matrix X of the training set train Training the gradient boosting tree model. During the training process, the model minimizes the loss function L(y train ,f(X train )) to optimize the prediction function, the specific calculation formula is as follows: Among them, f(X train ) is the prediction function on the training set, K is the total number of trees, γ k is the weight of the kth tree, h k (X train ) is the predicted value of the kth tree for the training set, L(y train ,f(X train )) is the loss function, which measures the predicted value f(X train ) and the actual label y train The difference between.
5. The big data based smoke alarm system according to claim 4 is characterized by: The change rate of smoke concentration is Among them, Rate smoke represents the rate of change of smoke concentration, x smoke (t) and x smoke (t-1) represents the smoke concentration value at time points t and t-1 respectively; The abnormal temperature fluctuation is: Among them, Std temp Indicates the standard deviation of temperature, reflecting the degree of abnormal temperature fluctuation, T i represents the temperature measurement value at the i-th time point, is the average of all temperature measurements and n is the total number of time points.
6. The big data based smoke alarm system according to claim 3 is characterized by: The video data analysis is to save the image frames of the video data as a historical frame data set, use a convolutional neural network to detect objects, and identify smoke patterns by analyzing the features of the detected objects. The specific steps are as follows: Step Y1, background modeling and subtraction: Use historical frame data to build a background model, subtract the background model from the current frame to detect foreground objects. For each pixel position (x, y), the specific calculation formula of the background model is as follows: F(x,y)=I current (x,y)-B(x,y) Where M is the total number of historical frames, I i (x, y) is the pixel value at position (x, y) in the i-th frame, F(x, y) is the foreground image, I current (x, y) is the current captured frame image, B(x, y) is the background model; Step Y2, object detection: Use a convolutional neural network to detect smoke in the image. The foreground image is used as input and passed into the convolutional neural network. The output feature map is F CNN , assuming that the structure of the convolutional neural network is L layers, the input and output of each layer are expressed as follows: The feature map F of the cth layer c , by inputting the feature map F of the previous layer c-1 Perform convolution and nonlinear transformation: Among them, p is the radius of the convolution kernel, C c is the convolution kernel of layer c, * indicates the convolution operation, b c is the bias, σ is the activation function, α and β represent the offset from the current pixel position (x, y) in the horizontal and vertical directions respectively; After L layers of processing, the final feature map F CNN Expressed as: F CNN (x,y)=F L (x,y), F L (x,y) The output feature map of the Lth layer; Step Y3, smoke detection: Use the classification layer to classify the feature map F CNN Classify and output the probability of smoke and non-smoke as P(z|F CNN )=softmax(F CNN ), and set the threshold ζ, when P(z|F CNN )>ζ, judging whether there is smoke in the image, where softmax is the activation function and z is the output category including "with smoke" and "without smoke".
7. The big data based smoke alarm system according to claim 1, characterized in that: The early warning and response module constructs a fire risk assessment model based on the analysis results of sensor data and video data, assesses the fire risk level, and triggers an early warning when the risk level exceeds a preset threshold. The specific steps are as follows: Step C1, sensor data risk score: assign corresponding risk scores according to sensor labels. When the sensor data label indicates normal, the risk score is assigned as Risk Score sensor =0; when the sensor data label indicates a warning, the risk score is assigned as Risk Score sensor = 1, when the sensor data label indicates a warning, the risk score is assigned as RiskScore sensor =2; Step C2: Video data risk scoring: When P(z|F CNN )>ζ, it is determined that there is smoke and the risk score is assigned as RiskScore video =1; when P(z|F CNN )≤ζ, then it is determined that there is no smoke and the risk score is assigned as Risk Score video =0; Step C3, comprehensive risk score: Combine the risk score of sensor data and the risk score of video data, and set weights for the risk scores of sensor data and video data, ω1 and ω2 respectively, to calculate the comprehensive risk score. The specific calculation formula is as follows: Overall Risk Score=ω1·Risk Score sensor +ω2·Risk Score video Among them, Overall Risk Score represents the comprehensive risk score, Risk Score sensor is the sensor data risk score, Risk Score video is the risk score of video data, ω1 and ω2 are the weights of the risk scores of sensor data and video data, respectively, and ω1+ω2=1; Step C4, set warning threshold: define the fire risk level according to the comprehensive risk score, and set different score ranges to represent low, medium and high risk levels. When the comprehensive risk score falls in the low risk range, no warning is required, record data and continue monitoring; when the comprehensive risk score falls in the medium or high risk range, trigger the warning, generate medium or high-level warning notifications, and initiate emergency response.
8. The big data based smoke alarm system according to claim 7, characterized in that: Different score intervals are set to represent low, medium and high risk levels. The risk levels are defined as follows: Risk levels with an overall risk score of 0 ≤ Overall Risk Score ≤ 0.5 are classified as low risk; The risk level with an overall risk score of 0.5<Overall Risk Score<1.5 is classified as medium risk; Risk levels with an Overall Risk Score ≥ 1.5 are classified as high risk.
