Building fire-fighting diagnosis system based on Internet of Things and artificial intelligence
By using second-level, minute-level, and hour-level link electrical data processing models and a CNN-LSTM architecture, a fire communication protocol prediction model was constructed. This solved the problem of adapting to diverse communication environments in building fire protection scenarios and improved the communication stability and data transmission reliability of the fire diagnostic system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WEIFANG UNIVERSITY
- Filing Date
- 2026-04-15
- Publication Date
- 2026-05-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies cannot effectively adapt to the diverse communication environments of building fire protection scenarios, making it difficult to dynamically balance communication packet loss rate, latency and communication integrity, thus affecting the timeliness and reliability of fire diagnosis.
We employ second-level, minute-level, and hour-level link electrical data processing models, combined with a CNN-LSTM architecture, to construct a fire communication protocol prediction model. We evaluate communication quality using indicators such as signal-to-noise ratio, bit error rate, and packet loss recovery rate, and generate the optimal communication protocol.
This improved the communication stability of the IoT-based building fire protection diagnostic system, avoided the adaptation bias caused by a single time scale, enhanced the prediction accuracy and generalization ability of the communication protocol, and ensured the timely transmission of fire protection data.
Smart Images

Figure CN122024435A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic digital data processing, and in particular to a building fire protection diagnostic system based on the Internet of Things and artificial intelligence. Background Technology
[0002] With the acceleration of urbanization and the increasing complexity of building functions, the demand for intelligent and precise building fire safety is becoming increasingly prominent. The deep integration of Internet of Things (IoT) technology and Artificial Intelligence (AI) technology provides core support for the upgrading of building fire diagnosis. Collecting electrical digital data such as the operating status of fire equipment and communication link parameters through IoT terminals, and combining them with artificial intelligence models to achieve data analysis and intelligent decision-making has become the mainstream development direction of building fire diagnosis systems.
[0003] The application of IoT technology in building fire protection diagnostic systems hinges on leveraging low-power wide-area communication protocols like LoRa and NB-IoT to interconnect fire gateways, sensors, and controllers, constructing a fire data acquisition network covering the entire building. However, due to the complex environment, dispersed equipment, and dynamically changing communication needs of building fire protection scenarios, the communication stability of the fire IoT gateway, as the core hub for data transmission, directly determines the real-time performance and reliability of fire data. Therefore, it's necessary to process the electrical and digital data related to the link communication status, including packet loss rate, latency, integrity, signal strength, number of connected devices, and data throughput, to determine the optimal communication protocol under the current building fire condition. This ensures the timeliness of fire diagnosis results and prevents critical data such as smoke concentration and temperature from failing to be transmitted in time due to packet loss or delays, leading to delayed alarms and missed opportunities for optimal response.
[0004] Currently, most existing technologies deploy IoT fire gateways using fixed communication protocols or adjust communication protocols based on simple parameter thresholds, failing to consider the specific characteristics of building fire protection scenarios. On one hand, the wireless communication environments in different areas of high-rise buildings and underground parking garages vary significantly, resulting in varying signal obstruction and interference intensity. Fixed communication protocols cannot adapt to diverse communication scenarios, making it difficult to achieve a dynamic balance between packet loss rate, latency, and communication integrity. On the other hand, existing solutions lack systematic processing of electrical data in fire protection communication links, evaluating communication quality only through single parameters or simple algorithms. They lack accurate utility evaluation models and cannot generate optimal communication protocol labels adapted to real-time scenarios, leading to blind protocol selection.
[0005] In summary, how to adapt the electronic digital data of IoT communication to the evaluation of the communication effectiveness of building fire diagnosis, and then determine the optimal communication protocol for building fire diagnosis in order to improve the communication stability of IoT building fire diagnosis, is a technical problem that needs to be solved. Summary of the Invention
[0006] To address this, the present invention provides a building fire safety diagnostic system based on the Internet of Things (IoT) and artificial intelligence (AI). Through a link electrical data evaluation and processing model at the second, minute, and hour levels, it achieves precise control over the communication quality of IoT gateway communication protocols, from immediate response to long-term steady-state communication. This avoids the adaptation bias in building fire safety diagnostic scenarios caused by a single time scale. Combined with CNN-LSTM, it improves the prediction accuracy and generalization ability of the communication protocol, thereby enhancing the communication stability of IoT-based building fire safety diagnostics by determining the optimal communication protocol.
[0007] To achieve the above objectives, this invention proposes a building fire safety diagnostic system based on the Internet of Things and artificial intelligence, comprising:
[0008] The second-level link electrical data processing module is used to process the second-level communication electrical data of the acquired building fire protection IoT gateway through the second-level fire diagnosis utility evaluation model to generate an instant IoT fire diagnosis utility degree. The second-level communication electrical data includes effective signal-to-noise ratio and bit error rate. The second-level fire diagnosis utility evaluation model includes a signal-to-noise ratio instantaneous success probability fitting formula.
[0009] The minute-level link electrical data processing module is used to process the acquired session communication electrical data of the building fire protection IoT gateway through the minute-level fire diagnosis utility evaluation model to generate the minute IoT fire diagnosis utility score. The session communication electrical data includes signal-to-interference-plus-noise ratio, packet loss recovery rate and protocol keep-alive message transmission interval.
[0010] The hourly link electrical data processing module is used to process the accumulated value of electrical data from the building fire protection IoT gateway through the hourly fire diagnosis utility evaluation model to generate the hourly IoT fire diagnosis utility, wherein the accumulated value of electrical data includes the number of times the routing is out of control, the packet integrity rate, and the cross-modal data association gain.
[0011] The fire communication protocol prediction module is used to construct a sample set for optimizing and training the fire communication protocol prediction model based on the real-time IoT fire diagnosis utility, minute IoT fire diagnosis utility, and hourly IoT fire diagnosis utility. The trained fire communication protocol prediction model is then used to generate the optimal prediction communication protocol. The fire communication protocol prediction model is constructed based on the CNN-LSTM architecture.
[0012] Furthermore, the second-level link electrical data processing module includes:
[0013] The fire diagnosis basic value calculation unit is used to calculate the fire diagnosis basic value based on the data type transmitted by the building fire protection IoT gateway and the rate of change of fire conditions.
[0014] The signal-to-noise ratio instantaneous success probability fitting calculation unit is used to calculate the instantaneous success probability based on the effective signal-to-noise ratio using the signal-to-noise ratio instantaneous success probability fitting formula.
[0015] A short-term link quality consistency calculation unit is used to calculate the short-term link quality consistency based on the bit error rate and the bit error rate threshold.
[0016] The fusion computing unit is used to calculate the utility of the real-time IoT fire diagnosis based on the product of the basic value of the fire diagnosis, the instantaneous success probability and the short-term consistency of the link quality.
[0017] The second-level fire diagnostic utility evaluation model includes a signal-to-noise ratio instantaneous success probability fitting formula.
[0018] Furthermore, the signal-to-noise ratio instantaneous success probability fitting calculation unit includes:
[0019] The fitting formula generates a sub-unit to obtain the data packet reception success rate of the building fire protection IoT gateway through a spectrum analyzer, and inputs the effective signal-to-noise ratio and the data packet reception success rate into the signal-to-noise ratio instantaneous success probability fitting formula to fit and determine the slope factor and target threshold of the signal-to-noise ratio instantaneous success probability fitting formula, wherein the signal-to-noise ratio instantaneous success probability fitting formula is constructed based on the Sigmoid function format;
[0020] The fitting formula calculation sub-unit is used to calculate the instantaneous success probability by fitting the effective signal-to-noise ratio to the fitted instantaneous success probability formula.
[0021] Furthermore, the minute-level link electrical data processing module includes:
[0022] An anti-interference calculation unit is used to calculate the anti-interference level based on the ratio of the signal-to-interference-plus-noise ratio and the interference threshold indicator function value to the burst duration.
[0023] The packet loss recovery efficiency calculation unit is used to calculate the packet loss recovery efficiency based on the ratio of the packet loss recovery rate to the total packet loss recovery time.
[0024] The protocol keep-alive cost calculation unit is used to calculate the protocol keep-alive cost based on the exponential value of the ratio of the protocol keep-alive message transmission interval to the basic no-interaction timeout benchmark threshold.
[0025] The weighted fusion calculation unit is used to calculate the minute IoT fire diagnosis utility based on the weighted summation calculation of the anti-interference degree, packet loss recovery efficiency and protocol maintenance cost.
[0026] Furthermore, the hourly link electrical data processing module includes:
[0027] The long-term security calculation unit is used to calculate the long-term security by multiplying the exponential value of the number of times the route is out of control by a set time window by the protocol security value.
[0028] The data asset accumulation value calculation unit is used to calculate the data asset accumulation value based on the product of the data packet integrity rate and the cross-modal data association gain.
[0029] The long-term weighted fusion computing unit is used to perform weighted calculations on the long-term security level and the accumulated value of data assets to generate the hourly IoT fire diagnosis utility level.
[0030] Furthermore, the fire communication protocol prediction module includes:
[0031] The scoring calculation unit is used to calculate the instant score, session score, and long-term score based on the ratio of the current value and range of the instant IoT fire diagnostic utility, minute IoT fire diagnostic utility, and hourly IoT fire diagnostic utility in the protocol routing network.
[0032] The optimal protocol calculation unit for the sample set is used to determine the optimal protocol for the sample set based on the Pareto dominance of the immediate score, session score, and long-term score.
[0033] The loss function calculation unit is used to optimize and train the fire communication protocol prediction model based on the optimal protocol by combining loss functions.
[0034] Furthermore, the loss function calculation unit includes:
[0035] The log-likelihood term calculation subunit is used to calculate the log-likelihood term based on the optimal protocol, second-level communication electrical data, session communication electrical data, and cumulative electrical data value.
[0036] The KL divergence calculation subunit is based on the predicted optimal communication protocol and the KL divergence calculation of the optimal protocol to construct the KL divergence term.
[0037] The combined loss function calculation subunit is used to perform a weighted summation of the log-likelihood term and the KL divergence term to construct the combined loss function;
[0038] The sample set also includes second-level communication electrical data, session communication electrical data, and accumulated value of electrical data.
[0039] Furthermore, the fire communication protocol prediction module also includes:
[0040] A convolutional network feature extraction unit is used to pass the second-level communication electrical data, session communication electrical data, and accumulated electrical data value through a convolutional network to generate fused time-scale features;
[0041] The LSTM temporal modeling unit is used to pass the fused time-scale features through the LSTM network to generate temporal enhancement features;
[0042] A decision mapping unit is used to pass the temporal enhancement features through the output layer to generate the predicted optimal communication protocol;
[0043] The fire communication protocol prediction model includes a convolutional network, an LSTM network, and an output layer.
[0044] Furthermore, the convolutional network feature extraction unit includes:
[0045] The multi-scale convolutional feature extraction subunit is used to pass the input tensor through multi-scale convolutional layers to generate multi-time-scale extracted features;
[0046] The feature splicing subunit is used to splice the features extracted from the multiple time scales to generate time scale spliced features.
[0047] The channel attention subunit is used to generate the fused time-scale features by passing the time-scale splicing features through the channel attention mechanism.
[0048] The input tensor includes second-level communication electrical data, session communication electrical data, and accumulated electrical data value; the convolutional network includes multi-scale convolutional layers and a channel attention mechanism.
[0049] Furthermore, the LSTM timing modeling unit includes:
[0050] The LSTM temporal feature extraction subunit is used to pass the fused time-scale features through the LSTM layer to generate temporal features;
[0051] The temporal attention mechanism subunit is used to process the temporal features through the temporal attention mechanism to generate the temporal enhancement features;
[0052] The LSTM network includes LSTM layers and a temporal attention mechanism.
[0053] Compared with existing technologies, the beneficial effects of this invention are that it constructs a dedicated evaluation model and utility index for fire communication needs and data characteristics at different time scales, achieving full-cycle communication quality coverage from emergency instantaneous to long-term steady state. Compared with traditional single-time-scale evaluation schemes, the accuracy of link state characterization and scenario adaptability are significantly improved, avoiding the adaptation bias of building fire diagnosis scenarios caused by a single time scale. Combined with CNN-LSTM, the prediction accuracy and prediction generalization ability of communication protocols are improved, thereby enhancing the communication stability of IoT building fire diagnosis by determining the optimal communication protocol for building fire diagnosis.
[0054] In particular, this invention uses a fire diagnostic fundamental value calculation unit to anchor core demand weights based on the transmitted data type and fire situation change rate. It accurately outputs the instantaneous success probability corresponding to the effective signal-to-noise ratio using a fitting formula based on the Sigmoid function format. The link quality short-term consistency calculation unit quantifies link stability based on the bit error rate and set thresholds, enabling rapid capture of communication fluctuations in the early stages of a fire and during sudden equipment failures. This provides highly reliable feedback for emergency command transmission, reducing the risk of command delays or loss due to instantaneous anomalies. Minute-level link electrical data processing accurately assesses the overall communication performance within a single session cycle, significantly improving the accuracy of link status characterization and scenario adaptability. Attached Figure Description
[0055] Figure 1 This is a schematic diagram of the structure of the building fire protection diagnostic system based on the Internet of Things and artificial intelligence according to an embodiment of the present invention;
[0056] Figure 2 This is a flowchart illustrating the building fire protection diagnostic system based on the Internet of Things and artificial intelligence, according to an embodiment of the present invention.
[0057] Figure 3 This is a flowchart illustrating the second-level link electrical data evaluation and processing model of the building fire protection diagnostic system based on the Internet of Things and artificial intelligence, according to an embodiment of the present invention.
[0058] Figure 4 This is a flowchart illustrating the fire communication protocol prediction model of the building fire diagnosis system based on the Internet of Things and artificial intelligence, according to an embodiment of the present invention. Detailed Implementation
[0059] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0060] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0061] It should be noted that in the description of this invention, the terms "upper", "lower", "left", "right", "inner", "outer", etc., which indicate directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings. This is only for the convenience of description and is not intended to indicate or imply that the device or element must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation of this invention.
[0062] Furthermore, it should be noted that, in the description of this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0063] like Figures 1 to 4 As shown, this invention provides a building fire protection diagnostic system based on the Internet of Things (IoT) and artificial intelligence (AI). Through a link electrical data evaluation and processing model at the second, minute, and hour levels, it achieves precise control over the communication quality of IoT gateway communication protocols, from immediate response to long-term steady-state communication. This avoids the adaptation bias of building fire protection diagnostic scenarios caused by a single time scale. Combined with CNN-LSTM, it improves the prediction accuracy and prediction generalization ability of communication protocols. Furthermore, by determining the optimal communication protocol for building fire protection diagnostics, it enhances the communication stability of IoT building fire protection diagnostics.
[0064] like Figure 1 and 2 As shown, this embodiment proposes a building fire protection diagnostic system based on the Internet of Things and artificial intelligence, including:
[0065] The second-level link electrical data processing module is used to process the second-level communication electrical data of the acquired building fire protection IoT gateway through the second-level fire diagnosis utility evaluation model to generate an instant IoT fire diagnosis utility degree. The second-level communication electrical data includes effective signal-to-noise ratio and bit error rate. The second-level fire diagnosis utility evaluation model includes a signal-to-noise ratio instantaneous success probability fitting formula.
[0066] The minute-level link electrical data processing module is used to process the acquired session communication electrical data of the building fire protection IoT gateway through the minute-level fire diagnosis utility evaluation model to generate the minute IoT fire diagnosis utility score. The session communication electrical data includes signal-to-interference-plus-noise ratio, packet loss recovery rate and protocol keep-alive message transmission interval.
[0067] The hourly link electrical data processing module is used to process the accumulated value of electrical data from the building fire protection IoT gateway through the hourly fire diagnosis utility evaluation model to generate the hourly IoT fire diagnosis utility, wherein the accumulated value of electrical data includes the number of times the routing is out of control, the packet integrity rate, and the cross-modal data association gain.
[0068] The fire communication protocol prediction module is used to construct a sample set for optimizing and training the fire communication protocol prediction model based on the real-time IoT fire diagnosis utility, minute IoT fire diagnosis utility, and hourly IoT fire diagnosis utility. The trained fire communication protocol prediction model is then used to generate the optimal prediction communication protocol. The fire communication protocol prediction model is constructed based on the CNN-LSTM architecture.
[0069] Specifically, the predicted optimal communication protocol is NB-IoT, LoRa, or Dual. Dual means dual-transmission mode, which transmits the same key data simultaneously through two independent wireless channels, NB-IoT and LoRa. In fire emergency scenarios, time is of the essence. A well-trained CNN-LSTM model, like an experienced communications expert, can synthesize all complex information in a very short time and make high-quality decisions based on the network weights trained during training. This eliminates the need for complex on-site calculations of real-time, minute-by-minute, and hourly IoT fire diagnostic utility. While it's understandable that IoT fire diagnostic utility can calculate the current optimal communication protocol, it cannot predict the possible optimal communication protocol under trends based on the implicit knowledge of current communication data. For example, in the southeast corner of the second-level underground parking garage, although the load of the NB-IoT base station is low in the early morning, there are occasional sudden interferences, while LoRa, although slower, is extremely stable at this time. For instance, a trained fire communication protocol prediction model can ensure that when a temperature alarm is triggered in the underground parking garage area, although the latency of NB-IoT is slightly higher, its stability ensures that the alarm will be delivered. Therefore, NB-IoT is preferred, while the more economical LoRa is used for routine inspection images of the same area.
[0070] like Figure 3 As shown, the second-level link electrical data processing module further includes:
[0071] The fire diagnosis basic value calculation unit is used to calculate the fire diagnosis basic value based on the data type transmitted by the building fire protection IoT gateway and the rate of change of fire conditions.
[0072] The signal-to-noise ratio instantaneous success probability fitting calculation unit is used to calculate the instantaneous success probability based on the effective signal-to-noise ratio using the signal-to-noise ratio instantaneous success probability fitting formula.
[0073] A short-term link quality consistency calculation unit is used to calculate the short-term link quality consistency based on the bit error rate and the bit error rate threshold.
[0074] The fusion computing unit is used to calculate the utility of the real-time IoT fire diagnosis based on the product of the basic value of the fire diagnosis, the instantaneous success probability and the short-term consistency of the link quality.
[0075] The second-level fire diagnostic utility evaluation model includes a signal-to-noise ratio instantaneous success probability fitting formula.
[0076] Furthermore, the signal-to-noise ratio instantaneous success probability fitting calculation unit includes:
[0077] The fitting formula generates a sub-unit to obtain the data packet reception success rate of the building fire protection IoT gateway through a spectrum analyzer, and inputs the effective signal-to-noise ratio and the data packet reception success rate into the signal-to-noise ratio instantaneous success probability fitting formula to fit and determine the slope factor and target threshold of the signal-to-noise ratio instantaneous success probability fitting formula, wherein the signal-to-noise ratio instantaneous success probability fitting formula is constructed based on the Sigmoid function format;
[0078] The fitting formula calculation sub-unit is used to calculate the instantaneous success probability by fitting the effective signal-to-noise ratio to the fitted instantaneous success probability formula.
[0079] Specifically, the process of calculating the instantaneous success probability can be expressed as:
[0080] ,
[0081] In the formula, Indicates the instantaneous success probability. The effective signal-to-noise ratio of gateway protocol k at time t is represented by the conventional calculation process of logarithmic summation. Let represent the slope factor and the target threshold, respectively. By having the transmitter of the building fire protection IoT gateway send data packets with constant communication parameters such as data packet length, transmission power, coding rate, and spreading factor, and setting the SNR through a programmable attenuator, and at the receiver, determining whether the data packets were successfully received using a spectrum analyzer, the instantaneous success probability of the experimental fitting data is defined as the number of successfully received packets divided by the total number of transmitted packets. The SNR of the experimental fitting data is approximated to the ESNR. The experimental fitting data is then fitted using the Python SciPy library with the coefficient of determination as the goodness of fit index to determine the slope factor and the target threshold.
[0082] Understandably, calculating the instantaneous success probability using the Sigmoid function format aligns with the cliff effect in communication; the larger the value, the steeper the curve. Once the SNR exceeds the threshold, the success rate will rapidly rise to 100%. The calculation of the slope factor and the target threshold eliminates other interfering factors from the source, ensuring the purity of the fitted data, which is the fundamental prerequisite for accurate calibration of subsequent model parameters.
[0083] Specifically, the process of calculating the short-term consistency of link quality can be expressed as:
[0084] ,
[0085] In the formula, Indicates the short-term consistency of link quality. This represents the bit error rate of gateway protocol k at time ti in history. This represents the bit error rate threshold; data exceeding this value is considered unreliable. H represents the length of the historical review time window, which is preferably 20. This indicates decreasing weights, with Hi being the preferred value to assign higher weights to more recent times. This is understandable. It achieves a non-linear conversion between bit error rate and link qualification, perfectly aligning with the safety baseline of fire protection scenarios. A 20-second time window filters out instantaneous random noise without causing delays in link degradation warnings due to excessively long windows, perfectly meeting the requirements of second-level fire protection diagnostics that are neither misjudged nor delayed. The linearly decreasing weight (Hi) adapts to the strong time-dependent nature of link quality changes; the closer the link status is to the current moment, the higher its reference value for current fire protection data transmission, while older historical data has lower reference value. The linearly decreasing weight perfectly matches this timing logic, sensitively capturing recent trends in link quality degradation.
[0086] Specifically, the process of calculating the utility of real-time IoT fire diagnosis involves multiplying the basic value of fire diagnosis, the instantaneous success probability, and the short-term consistency of link quality to generate the real-time IoT fire diagnosis utility of the candidate protocol at the current moment. Therefore, this product-fusion logic implements a triple constraint of value, reliability, and stability. Only when the core value of the fire data is high, the instantaneous transmission success rate of the link is high, and the short-term quality is stable and qualified, will the real-time utility reach a high value. Deterioration in any one of these indicators will directly lower the final utility, perfectly meeting the requirement for stable and reliable transmission of high-value fire communication data at the second-level.
[0087] Therefore, calculating the instantaneous success probability based on the Effective Signal-to-Noise Ratio (ESNR) allows continuous signal quality to be mapped to the success probability of the IoT physical layer. The sigmoid function format smooths the evaluation results near the target threshold, avoiding the decision-making abrupt changes and instability caused by hard threshold decisions. The slope factor controls the steepness of the curve, simulating the cliff effect of different modulation and coding schemes. Calculating the short-term consistency of link quality based on historical bit error rates (BER) labels links based on their BER performance over the past H time points, penalizing links with inconsistent performance or sudden interference, effectively preventing the selection of unstable channels with fleeting success. A weighted average with decreasing weights gives higher weight to recent performance. The fundamental value of fire safety diagnostics reflects the criticality of fire safety services.
[0088] Furthermore, the minute-level link electrical data processing module includes:
[0089] An anti-interference calculation unit is used to calculate the anti-interference level based on the ratio of the signal-to-interference-plus-noise ratio and the interference threshold indicator function value to the burst duration.
[0090] The packet loss recovery efficiency calculation unit is used to calculate the packet loss recovery efficiency based on the ratio of the packet loss recovery rate to the total packet loss recovery time.
[0091] The protocol keep-alive cost calculation unit is used to calculate the protocol keep-alive cost based on the exponential value of the ratio of the protocol keep-alive message transmission interval to the basic no-interaction timeout benchmark threshold.
[0092] The weighted fusion calculation unit is used to calculate the minute IoT fire diagnosis utility based on the weighted summation calculation of the anti-interference degree, packet loss recovery efficiency and protocol maintenance cost.
[0093] Specifically, the process of calculating the minute-by-minute IoT fire diagnostic effectiveness is as follows: First, using a Boolean indicator function, the total number of times within a statistical window of the burst duration that the signal-to-interference-plus-noise ratio (SNR) of the candidate protocol is lower than the interference threshold is counted; then, this statistical result is divided by the burst duration to obtain the proportion of time the link is interfered with within the window; finally, 1 is subtracted from this proportion of time interfered with to obtain the anti-interference degree corresponding to the candidate protocol; the packet loss recovery rate corresponding to the candidate protocol is compared with the total time taken for the protocol to complete packet loss recovery to obtain the packet loss recovery efficiency corresponding to the candidate protocol, thus achieving a joint quantification of the completeness and speed of packet loss recovery; first, the protocol's... The ratio of the protocol keep-alive message sending interval to the baseline no-interaction timeout threshold is used to perform a natural exponential operation on the negative value of this ratio. Then, the result of the natural exponential operation is subtracted from 1 to obtain the quantified value of the protocol keep-alive cost corresponding to the candidate protocol. The anti-interference degree, packet loss recovery efficiency, and protocol keep-alive cost quantified values are weighted and summed to generate the final minute IoT fire diagnosis utility. The weights of the summation are 0.5, 0.4, and 0.1 in the periodic status inspection mode, 0.6, 0.4, and 0 in the fire mode, and 0.3, 0.3, and 0.4 in the post-event monitoring mode.
[0094] Specifically, packet loss recovery efficiency reflects the adaptive data rate of the LoRa IoT communication protocol and the HARQ mechanism of NB-IoT. The protocol keep-alive message transmission interval is determined by sending the AT+CEREG command to the NB-IoT module and parsing the period value in the returned information for NB-IoT; for LoRa, it is determined by checking the heartbeat interval set in the device firmware. The basic no-interaction timeout benchmark threshold is a protocol-level common parameter configured on the network side.
[0095] Understandably, the periodic status inspection mode, as the normal operating mode of a building fire protection system, aims to routinely identify potential hazards, monitor the health of the fire protection system throughout its entire lifecycle, and identify hidden risks in advance. It does not require real-time emergency response and prioritizes stable links, complete data, and long-term operational efficiency. First, interference resistance is a prerequisite for link stability. Only when the link is not interrupted by sudden interference can the operational data of fire protection equipment be continuously acquired. Therefore, a maximum weight of 0.5 is assigned as the core anchor point for session quality. Second, packet loss recovery efficiency directly determines the integrity of inspection data and is the foundation for hazard identification. Therefore, a second-highest weight of 0.4 is assigned to ensure the complete transmission of equipment operational data. Finally, protocol keep-alive cost is only an optimization indicator. Under normal circumstances, the bandwidth and computing resources of the fire protection IoT are sufficient, and the resource overhead of keep-alive messages is not a core issue. Therefore, only a fallback weight of 0.1 is assigned to avoid excessively frequent keep-alive messages consuming too many resources.
[0096] Understandably, fire mode represents the highest priority emergency response state for fire protection systems. The goal is reliable transmission of fire alarm data and emergency response commands, ensuring the real-time nature and accessibility of emergency responses. Non-core cost optimization needs are completely disregarded. The link's resilience to sudden interference directly determines whether fire alarm signals can be uploaded on time and emergency commands can be issued—it's the first line of defense in fire emergencies. Therefore, the interference resistance weight is increased from the normal 0.5 to 0.6, becoming the absolute dominant indicator to ensure session link continuity under extreme interference environments. Packet loss recovery efficiency is the second core bottom line for emergency response; even if packet loss occurs, it must be recovered quickly and completely, otherwise it will directly affect on-site emergency response decisions and effectiveness. Therefore, a weight of 0.4 is maintained. The protocol maintainability cost corresponding to keep-alive message resource overhead is completely non-core in fire emergency scenarios; therefore, its corresponding weight is 0.
[0097] Understandably, the post-event monitoring mode is the source tracing and review stage after the fire emergency response is completed. There is no rigid requirement for real-time emergency response and routine inspection. The core requirements have changed from stable links and complete data to complete backtracking and optimization. Therefore, the anti-interference degree and packet loss recovery efficiency, which were previously bottom-line indicators, have changed from the core of decision-making to an equivalent dimension of backtracking analysis, each assigned a weight of 0.3. Meanwhile, the protocol maintenance cost, which was previously non-core, has become the core goal of long-term system optimization, assigned the highest weight of 0.4.
[0098] Therefore, the system assesses the resilience of IoT device sessions to transient interference such as vehicle passage and device start-up / stop. Packet loss recovery efficiency measures the effectiveness and speed of the link-layer retransmission mechanism. Protocol keep-alive cost quantifies the overhead of maintaining connections and ensuring liveness. These parameters are then weighted to calculate the minute-by-minute IoT fire diagnostic utility, meeting the varying indicator requirements at different fire-fighting stages. Furthermore, all of these parameters can be directly obtained from IoT network logs and protocol stack logs.
[0099] Furthermore, the hourly link electrical data processing module includes:
[0100] The long-term security calculation unit is used to calculate the long-term security by multiplying the exponential value of the number of times the route is out of control by a set time window by the protocol security value.
[0101] The data asset accumulation value calculation unit is used to calculate the data asset accumulation value based on the product of the data packet integrity rate and the cross-modal data association gain.
[0102] The long-term weighted fusion computing unit is used to perform weighted calculations on the long-term security level and the accumulated value of data assets to generate the hourly IoT fire diagnosis utility level.
[0103] Specifically, the process of calculating the hourly IoT fire diagnostic utility is as follows: First, calculate the ratio of the number of times the candidate protocol's routing is out of control to the set time window. Then, take the negative value of this ratio and perform a natural exponentiation operation. Finally, multiply the result of the natural exponentiation operation by the protocol's security value to obtain the long-term security level corresponding to the candidate protocol. Therefore, the more times the protocol's routing is out of control, the smaller the result of the natural exponentiation operation, and the lower the final long-term security level, thus achieving a reverse quantitative characterization of the protocol's routing security risk. The candidate protocol k... The corresponding data packet integrity rate is directly multiplied by the cross-modal data association gain corresponding to the protocol to obtain the data asset accumulation value corresponding to the candidate protocol, realizing the joint quantification of the protocol data transmission quality and data application value. The long-term security is multiplied by its corresponding preset weight coefficient, the data asset accumulation value is multiplied by its corresponding preset weight coefficient, and the two weighted results are summed to finally generate the hourly IoT fire diagnosis utility corresponding to the candidate protocol. The weight coefficients corresponding to the long-term security and data asset accumulation value are 0.4 and 0.6 respectively in the periodic status inspection mode, 0.2 and 0.1 respectively in the fire mode, and 0 in the post-event monitoring mode.
[0104] Therefore, the periodic status inspection mode, as the normal working mode of building fire protection systems, aims to conduct routine hazard investigations, monitor the health of the fire protection system throughout its entire life cycle, and identify hidden risks in advance. It does not have the pressure of real-time emergency response. Its value comes from the continuous accumulation and diagnostic analysis of high-quality fire protection data. The value of cross-modal data asset accumulation determines whether multi-source heterogeneous data such as smoke detectors, temperature detectors, water pressure detectors, electrical fire detectors, and video surveillance can be integrated to achieve accurate identification of equipment aging, link attenuation, and hidden faults. Therefore, the value of data asset accumulation has a higher priority and is allocated a dominant weight of 0.6. Long-term security and controllability of links are the bottom line of compliance for fire protection systems. It is necessary to avoid problems such as uncontrolled routing, link disconnection, and data leakage during normal operation. Therefore, a weight of 0.4 is allocated to long-term security to achieve a balance between bottom-line protection and functional priority.
[0105] Understandably, the fire mode represents the highest priority emergency response state of a fire protection system. Its goal is the reliable transmission of fire alarm data and emergency response commands, ensuring the real-time nature and accessibility of the emergency response. All design parameters must prioritize emergency response. As long as the current link can stably transmit fire alarm data and emergency commands, it is considered a valid protocol. Only a long-term security weight of 0.2 is reserved as a safety net in extreme scenarios to prevent malicious attacks and complete loss of control during a fire. The accumulation and fusion of full data is a task for post-event traceability; therefore, a minimum weight of 0.1 for data asset accumulation value is allocated to ensure only the basic integrity of core data.
[0106] Understandably, the post-fire monitoring mode is located after the fire has been dealt with. The fire emergency response has been completed, and the system no longer needs to perform dynamic protocol optimization and adjustment. The protocol decision-making requirement has completely disappeared. Therefore, both weights are set to 0, so that the hourly utility output is 0, and the system completely exits the decision-making link of protocol prediction.
[0107] Therefore, long-term security can assess the security of the communication protocol itself, namely the protocol's encryption strength, authentication mechanism, and replay attack prevention capabilities. Packet integrity rate can ensure the integrity of fire data sets, avoiding analytical biases caused by packet loss. Cross-modal data correlation gain can assess data correlation gain, enhance the value of multi-source data fusion, and improve diagnostic accuracy. Furthermore, the accumulated value of data assets can penalize routes frequently exposed to public networks, reduce attack windows, and lower the risk of continuous reconnaissance. These factors are weighted to calculate the hourly IoT fire diagnostic utility, reflecting the strategic intent of the IoT system under different fire situations.
[0108] Furthermore, the fire communication protocol prediction module includes:
[0109] The scoring calculation unit is used to calculate the instant score, session score, and long-term score based on the ratio of the current value and range of the instant IoT fire diagnostic utility, minute IoT fire diagnostic utility, and hourly IoT fire diagnostic utility in the protocol routing network.
[0110] The optimal protocol calculation unit for the sample set is used to determine the optimal protocol for the sample set based on the Pareto dominance of the immediate score, session score, and long-term score.
[0111] The loss function calculation unit is used to optimize and train the fire communication protocol prediction model based on the optimal protocol by combining loss functions.
[0112] Furthermore, the loss function calculation unit includes:
[0113] The log-likelihood term calculation subunit is used to calculate the log-likelihood term based on the optimal protocol, second-level communication electrical data, session communication electrical data, and cumulative electrical data value.
[0114] The KL divergence calculation subunit is based on the predicted optimal communication protocol and the KL divergence calculation of the optimal protocol to construct the KL divergence term.
[0115] The combined loss function calculation subunit is used to perform a weighted summation of the log-likelihood term and the KL divergence term to construct the combined loss function;
[0116] The sample set includes second-level communication electrical data, session communication electrical data, and accumulated value of electrical data.
[0117] Specifically, the process of calculating the combined loss function is as follows: Step S1, for the three types of IoT fire diagnosis utility in the protocol routing network, range normalization is performed respectively, and they are mapped to standardized scores in the [0,1] interval; Step S2, based on the three types of standardized scores, the optimal protocol of the sample set is determined by a two-step method of Pareto dominance screening and weighted summation optimization; Step S3, using the optimal protocol of the sample as the supervision signal, a combined loss function containing log-likelihood term and KL divergence term is constructed for the optimization training of the fire communication protocol prediction model.
[0118] Step S1 includes: determining the minimum and maximum values among the instant IoT fire diagnosis utility, minute IoT fire diagnosis utility, and hourly IoT fire diagnosis utility; subtracting the minimum value from the instant IoT fire diagnosis utility, minute IoT fire diagnosis utility, and hourly IoT fire diagnosis utility to obtain the numerator difference; subtracting the minimum and maximum values to obtain the denominator difference; and using the ratio of the numerator difference to the denominator difference as the instant score, session score, and long-term score.
[0119] Step S2 includes: for any two protocols k1 and k2 in the candidate protocol set, if they simultaneously satisfy the condition that k1's score is not lower than k2 in all dimensions, and k1's score is strictly higher than k2 in at least one dimension, then k1 Pareto dominates k2; based on the above dominance relationship, protocols in the candidate protocol set that are not dominated by any other protocol are selected to form the Pareto optimal protocol set at the current moment; within the Pareto optimal protocol set, the final sample optimal protocol is determined by the weighted sum maximization rule, with the weights of the weighted sum set as follows: immediate score weight 0.3, session score weight 0.4, and long-term score weight 0.3. The core requirement of fire communication, connection continuity, is given the highest weight, reflecting the principle of prioritizing stability and reliability. The immediate score weight of 0.3 reflects the current transmission quality, which is important but not the only factor; the session score weight of 0.4 reflects connection continuity and recovery capability, the core requirement of fire communication; and the long-term score weight of 0.3 reflects system health and resource optimization, which need to be considered but are not the primary factor.
[0120] Step S3 includes: passing the input data through a fire communication protocol prediction model to obtain the probability of the optimal protocol for the predicted samples; calculating the negative value of the sum of the logarithms of the probabilities of the optimal protocols for the predicted samples at all times, which is used to measure the model's fit to the optimal protocols for the samples; obtaining the distribution of the optimal protocols for the predicted samples predicted by all models in the dataset, as well as the target probability distribution defined based on the Pareto optimal protocol set, and calculating the KL divergence between the distribution of the optimal protocols for the predicted samples and the target probability distribution to obtain the KL divergence term; and performing a weighted summation of the log-likelihood term and the KL divergence term to construct the final combined loss function. In this weighted summation, the weights of the log-likelihood term and the KL divergence term are 1 and 0.01, respectively, to reflect that the negative log-likelihood term serves as the main objective of accurately fitting the optimal fire communication protocol at the sample level, while the KL divergence term serves as an auxiliary constraint objective to guide the model's predicted distribution to align with the Pareto optimal feasible region and improve the model's generalization ability, thus achieving a balance between prioritizing the main objective and providing a fallback for the auxiliary constraint.
[0121] Therefore, by calculating the Pareto optimal set, i.e., the non-dominated solution set of Pareto dominance relations, we avoid single-dimensional outliers from dominating decisions, ensuring that candidate protocols perform well in at least one dimension. This also avoids being misled by non-Pareto solutions, i.e., solutions that are extremely poor in one dimension but have a high weighted total score. The combined loss function is a dual-supervised loss function. The log-likelihood term filters out protocols with serious weaknesses, achieving accurate supervised learning of the model. The KL divergence term prevents overfitting and improves the model's generalization ability. When environmental changes cause the optimal protocol to no longer be absolutely optimal, the model still has backup options.
[0122] like Figure 4 As shown, the fire communication protocol prediction module further includes:
[0123] A convolutional network feature extraction unit is used to pass the second-level communication electrical data, session communication electrical data, and accumulated electrical data value through a convolutional network to generate fused time-scale features;
[0124] The LSTM temporal modeling unit is used to pass the fused time-scale features through the LSTM network to generate temporal enhancement features;
[0125] A decision mapping unit is used to pass the temporal enhancement features through the output layer to generate the predicted optimal communication protocol;
[0126] The fire communication protocol prediction model includes a convolutional network, an LSTM network, and an output layer.
[0127] like Figure 4 As shown, the convolutional network feature extraction unit further includes:
[0128] The multi-scale convolutional feature extraction subunit is used to pass the input tensor through multi-scale convolutional layers to generate multi-time-scale extracted features;
[0129] The feature splicing subunit is used to splice the features extracted from the multiple time scales to generate time scale spliced features.
[0130] The channel attention subunit is used to generate the fused time-scale features by passing the time-scale splicing features through the channel attention mechanism.
[0131] The input tensor includes second-level communication electrical data, session communication electrical data, and accumulated electrical data value; the convolutional network includes multi-scale convolutional layers and a channel attention mechanism.
[0132] Specifically, invalid data is first removed from second-level communication electrical data, session communication electrical data, and cumulative electrical data value, and then Min-Max normalization is used to generate the input tensor.
[0133] like Figure 4 As shown, the LSTM timing modeling unit further includes:
[0134] The LSTM temporal feature extraction subunit is used to pass the fused time-scale features through the LSTM layer to generate temporal features;
[0135] The temporal attention mechanism subunit is used to process the temporal features through the temporal attention mechanism to generate the temporal enhancement features;
[0136] The LSTM network includes LSTM layers and a temporal attention mechanism.
[0137] Specifically, the fire communication protocol prediction model is as follows: One-dimensional convolutions with kernel sizes of 5, 3, and 1 are used to extract features from the input tensor at the current time t. After each convolution operation, a nonlinear transformation is performed using the ReLU activation function, and the output results are used as multi-timescale features. These three sets of multi-timescale features are concatenated along the channel dimension to generate time-scale concatenated features. A channel attention mechanism is applied to the time-scale concatenated features to strengthen key channel features and suppress redundant channel features, ultimately generating fused time-scale features. Temporal dependencies are extracted through an LSTM layer, and then key time-step features are strengthened through a temporal attention mechanism to generate temporally enhanced features. Based on the temporally enhanced features, the result predicting the optimal communication protocol is output through the output layer.
[0138] Understandably, the one-dimensional convolution with a kernel size of 1 processes each time step independently, without fusing information from previous and subsequent steps. It can extract instantaneous features such as extremely low signal strength and critically low battery at the current moment, preserving the precise alignment of the time series, avoiding temporal aliasing, and responding fastest to abrupt events. The one-dimensional convolution with a kernel size of 3 fuses information from the current moment and two future moments in each output, capturing the slope of changes over three consecutive time points, such as signal attenuation over three seconds or packet loss with an initial rise followed by a fall. It has smoothing and pattern recognition capabilities for short-term fluctuations caused by brief vehicle obstructions, making it suitable for capturing early warning signs. The one-dimensional convolution with a kernel size of 5 is suitable for capturing device polling interference with a 5-second cycle and has a stronger suppression effect on random noise.
[0139] Specifically, the channel attention mechanism involves the following steps: global average pooling (AvgPool) is performed on the temporal scale concatenated features to compress the spatial dimension; the pooled features are then passed sequentially through the first fully connected layer, the ReLU activation function, and the second fully connected layer, and then mapped by the Sigmoid function to generate channel attention weights; the temporal scale concatenated features are multiplied element-wise with the channel attention weights to obtain the channel attention weighted features; the channel attention weighted features are then subjected to a one-dimensional convolution with a kernel size of 1×1 to adjust the feature dimension; and the convolution result is then normalized (LayerNorm) to finally generate the fused temporal scale features.
[0140] Understandably, the channel attention mechanism allows the network to automatically learn the importance weights of each feature channel, thereby strengthening key features and suppressing irrelevant or redundant features. The aforementioned global average pooling compresses the time series of each channel into a scalar, representing the global response of that channel. The two fully connected network layers learn the nonlinear interaction between channels and output normalized weights, which are then weighted channel by channel. The weights are broadcast to the entire time dimension, scaling the original features. This enables the network to adaptively determine which scale is most relevant to the routing decision among the output features of the three one-dimensional convolutions with different kernel sizes, and to strengthen the features at that scale.
[0141] Understandably, LSTM (Long Short-Term Memory) layers can remember key information for a long time and can automatically learn how long to remember historical information. Therefore, they can remember the pattern of continuous signal deterioration in the past 30 seconds, predict possible future interruptions, associate the causal relationship between low battery and recent frequent retransmissions, and provide high-quality hidden state sequences for temporal attention.
[0142] Specifically, the temporal attention mechanism operates as follows: Temporal features are linearly transformed through a fully connected layer, then activated by the tanh activation function, and multiplied by the transpose of the query vector. Finally, the attention score at time t is generated by combining this with the temporal enhancement features. Softmax normalization is applied to the attention scores at all time steps to obtain the attention weight for each time step. The temporal features at each time step are multiplied by their corresponding attention weights and summed to generate a context vector. This context vector is then concatenated with the original temporal features along the feature dimension, linearly transformed through a fully connected layer, and then normalized using LayerNorm to generate the temporal enhancement features. Therefore, the temporal enhancement features aggregate information from key time steps.
[0143] Understandably, the temporal attention mechanism allows the network to automatically identify which moments in the time series are most important for the current decision and assign higher weights to these moments. Therefore, the temporal attention mechanism automatically identifies the most important historical moments for decision-making, such as the moment an alarm is triggered or the point of signal change, and assigns low weights to unimportant or noisy time steps to reduce interference.
[0144] Therefore, by using multi-scale convolution in parallel to extract long-term stability, medium-term periodicity, and instantaneous burst patterns in fire communication, information loss from single-scale convolution is avoided. The channel attention mechanism automatically identifies the feature channels most important for current decision-making. During fire alarms, attention may focus on signal strength and data urgency channels, while during routine inspections, more attention may be paid to energy consumption and link load channels. LSTM learns the long-term dependencies of feature sequences, and the temporal attention mechanism automatically focuses on critical moments, such as the moment when the signal first drops sharply. By fusing time-scale features, the weighted features of the temporal attention mechanism and temporal features are combined to take into account both the overall trend and the latest situation. LayerNorm is used for stable training to accelerate convergence, and the final output layer generates the predicted optimal communication protocol.
[0145] Specifically, gateway link electrical data from fire protection IoT systems in office buildings, shopping malls, and residences were continuously collected for 30 days. Sampling granularity included: effective signal-to-noise ratio and bit error rate sampled every second; signal-to-interference-plus-noise ratio, packet loss recovery rate, and protocol keep-alive message transmission interval calculated every minute; and hourly aggregation of: number of uncontrolled routing instances, data packet integrity rate, and cross-modal data correlation gain. Fire protection communication experts labeled the optimal communication protocol for each real-time network state. The optimal communication protocol options were NB-IoT, LoRa, and Dual (a dual-transmission mode of NB-IoT and LoRa), resulting in 1000 labeled sample sets.
[0146] Model A (traditional LSTM) is an LSTM model trained using only minute-level single-timescale data; Model B (CNN and single-scale LSTM) is an LSTM model trained using only minute-level data after feature extraction via CNN; Model C (CNN-LSTM model in this embodiment) is based on the CNN-LSTM architecture and integrates second-level, minute-level, and hour-level multi-timescale data. Its F1 score (%) is 80.1, 85.9, and 93.3 respectively, and its average bit error rate (%), reflecting communication stability, is 1.23, 0.87, and 0.35 respectively. The accuracy (%) of Model C in office buildings, shopping malls, and residences is 94.5, 93.8, and 94.1 respectively.
[0147] As can be seen, the fire communication protocol prediction model based on the CNN-LSTM architecture in this embodiment, i.e., model C, significantly outperforms the comparative model in terms of F1 score, verifying the enhancing effect of multi-timescale data fusion and the CNN-LSTM architecture on protocol prediction accuracy. The average bit error rate of the fire communication protocol prediction model in this embodiment is reduced to 0.35%, significantly improving the reliability of fire IoT communication. In different building types, the accuracy of the fire communication protocol prediction model in this embodiment remains above 93.8%, demonstrating its good scenario adaptability and generalization ability.
[0148] In this embodiment, a dedicated evaluation model and utility index are constructed for fire communication needs and data characteristics at different time scales, achieving full-cycle communication quality coverage from emergency instantaneous to long-term steady state. Compared with traditional single-time-scale evaluation schemes, the accuracy of link state characterization and scenario adaptability are significantly improved, avoiding the adaptation bias of building fire diagnosis scenarios caused by a single time scale. Combined with CNN-LSTM, the prediction accuracy and prediction generalization ability of the communication protocol are improved, thereby enhancing the communication stability of IoT building fire diagnosis by determining the optimal communication protocol for building fire diagnosis. The fire diagnosis basic value calculation unit anchors the core demand weights by combining the transmitted data type and the fire change rate, and accurately outputs the instantaneous success probability corresponding to the effective signal-to-noise ratio based on the fitting formula of the Sigmoid function format. The short-term consistency calculation unit of link quality quantifies link stability based on the bit error rate and set thresholds, which can quickly capture communication fluctuations in the early stage of a fire and during sudden equipment failures, providing highly reliable feedback for emergency command transmission and reducing the risk of command delay or loss caused by instantaneous anomalies. Minute-level link electrical data processing can accurately evaluate the comprehensive communication performance within a single session cycle, achieving a significant improvement in the accuracy of link state characterization and scenario adaptability. Based on real-time acquisition of three-level time-series electrical data and various time-related costs, the system dynamically outputs the optimal communication protocol adapted to the current scenario. In fire emergency scenarios, it improves the relevance of protocol adaptation, ensures that emergency commands and alarm data are transmitted without delay or loss, and achieves precise control over the communication quality of IoT gateway communication protocols from immediate response to long-term steady state.
[0149] Those skilled in the art will recognize that the modules and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0150] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
[0151] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A building fire protection diagnostic system based on the Internet of Things and artificial intelligence, characterized in that, include: The second-level link electrical data processing module is used to process the second-level communication electrical data of the acquired building fire protection IoT gateway through the second-level fire diagnosis utility evaluation model to generate an instant IoT fire diagnosis utility degree. The second-level communication electrical data includes effective signal-to-noise ratio and bit error rate. The second-level fire diagnosis utility evaluation model includes a signal-to-noise ratio instantaneous success probability fitting formula. The minute-level link electrical data processing module is used to process the acquired session communication electrical data of the building fire protection IoT gateway through the minute-level fire diagnosis utility evaluation model to generate the minute IoT fire diagnosis utility score. The session communication electrical data includes signal-to-interference-plus-noise ratio, packet loss recovery rate and protocol keep-alive message transmission interval. The hourly link electrical data processing module is used to process the accumulated value of electrical data from the building fire protection IoT gateway through the hourly fire diagnosis utility evaluation model to generate the hourly IoT fire diagnosis utility, wherein the accumulated value of electrical data includes the number of times the routing is out of control, the packet integrity rate, and the cross-modal data association gain. The fire communication protocol prediction module is used to construct a sample set for optimizing and training the fire communication protocol prediction model based on the real-time IoT fire diagnosis utility, minute IoT fire diagnosis utility, and hourly IoT fire diagnosis utility. The trained fire communication protocol prediction model is then used to generate the optimal prediction communication protocol. The fire communication protocol prediction model is constructed based on the CNN-LSTM architecture.
2. The building fire protection diagnostic system based on the Internet of Things and artificial intelligence according to claim 1, characterized in that, The second-level link electrical data processing module includes: The fire diagnosis basic value calculation unit is used to calculate the fire diagnosis basic value based on the data type transmitted by the building fire protection IoT gateway and the rate of change of fire conditions. The signal-to-noise ratio instantaneous success probability fitting calculation unit is used to calculate the instantaneous success probability based on the effective signal-to-noise ratio using the signal-to-noise ratio instantaneous success probability fitting formula. A short-term link quality consistency calculation unit is used to calculate the short-term link quality consistency based on the bit error rate and the bit error rate threshold. The fusion computing unit is used to calculate the utility of the real-time IoT fire diagnosis based on the product of the basic value of the fire diagnosis, the instantaneous success probability, and the short-term consistency of the link quality.
3. The building fire protection diagnostic system based on the Internet of Things and artificial intelligence according to claim 2, characterized in that, The signal-to-noise ratio instantaneous success probability fitting calculation unit includes: The fitting formula generates a sub-unit to obtain the data packet reception success rate of the building fire protection IoT gateway through a spectrum analyzer, and inputs the effective signal-to-noise ratio and the data packet reception success rate into the signal-to-noise ratio instantaneous success probability fitting formula to fit and determine the slope factor and target threshold of the signal-to-noise ratio instantaneous success probability fitting formula, wherein the signal-to-noise ratio instantaneous success probability fitting formula is constructed based on the Sigmoid function format; The fitting formula calculation sub-unit is used to calculate the instantaneous success probability by fitting the effective signal-to-noise ratio to the fitted instantaneous success probability formula.
4. The building fire protection diagnostic system based on the Internet of Things and artificial intelligence according to claim 1, characterized in that, The minute-level link electrical data processing module includes: An anti-interference calculation unit is used to calculate the anti-interference level based on the ratio of the signal-to-interference-plus-noise ratio and the interference threshold indicator function value to the burst duration. The packet loss recovery efficiency calculation unit is used to calculate the packet loss recovery efficiency based on the ratio of the packet loss recovery rate to the total packet loss recovery time. The protocol keep-alive cost calculation unit is used to calculate the protocol keep-alive cost based on the exponential value of the ratio of the protocol keep-alive message transmission interval to the basic no-interaction timeout benchmark threshold. The weighted fusion calculation unit is used to calculate the minute IoT fire diagnosis utility based on the weighted summation calculation of the anti-interference degree, packet loss recovery efficiency and protocol maintenance cost.
5. The building fire protection diagnostic system based on the Internet of Things and artificial intelligence according to claim 1, characterized in that, The hourly link electrical data processing module includes: The long-term security calculation unit is used to calculate the long-term security by multiplying the exponential value of the number of times the route is out of control by a set time window by the protocol security value. The data asset accumulation value calculation unit is used to calculate the data asset accumulation value based on the product of the data packet integrity rate and the cross-modal data association gain. The long-term weighted fusion computing unit is used to perform weighted calculations on the long-term security level and the accumulated value of data assets to generate the hourly IoT fire diagnosis utility level.
6. The building fire protection diagnostic system based on the Internet of Things and artificial intelligence according to claim 1, characterized in that, The fire communication protocol prediction module includes: The scoring calculation unit is used to calculate the instant score, session score, and long-term score based on the ratio of the current value and range of the instant IoT fire diagnostic utility, minute IoT fire diagnostic utility, and hourly IoT fire diagnostic utility in the protocol routing network. The optimal protocol calculation unit for the sample set is used to determine the optimal protocol for the sample set based on the Pareto dominance of the immediate score, session score, and long-term score. The loss function calculation unit is used to optimize and train the fire communication protocol prediction model based on the optimal protocol by combining loss functions.
7. The building fire protection diagnostic system based on the Internet of Things and artificial intelligence according to claim 6, characterized in that, The loss function calculation unit includes: The log-likelihood term calculation subunit is used to calculate the log-likelihood term based on the optimal protocol, second-level communication electrical data, session communication electrical data, and cumulative electrical data value. The KL divergence calculation subunit is based on the predicted optimal communication protocol and the KL divergence calculation of the optimal protocol to construct the KL divergence term. The combined loss function calculation subunit is used to perform a weighted summation of the log-likelihood term and the KL divergence term to construct the combined loss function; The sample set also includes second-level communication electrical data, session communication electrical data, and accumulated value of electrical data.
8. The building fire protection diagnostic system based on the Internet of Things and artificial intelligence according to any one of claims 1 to 7, characterized in that, The fire communication protocol prediction module also includes: A convolutional network feature extraction unit is used to pass the second-level communication electrical data, session communication electrical data, and accumulated electrical data value through a convolutional network to generate fused time-scale features; The LSTM temporal modeling unit is used to pass the fused time-scale features through the LSTM network to generate temporal enhancement features; A decision mapping unit is used to pass the temporal enhancement features through the output layer to generate the predicted optimal communication protocol; The fire communication protocol prediction model includes a convolutional network, an LSTM network, and an output layer.
9. The building fire protection diagnostic system based on the Internet of Things and artificial intelligence according to claim 8, characterized in that, The convolutional network feature extraction unit includes: The multi-scale convolutional feature extraction subunit is used to pass the input tensor through multi-scale convolutional layers to generate multi-time-scale extracted features; The feature splicing subunit is used to splice the features extracted from the multiple time scales to generate time scale spliced features. The channel attention subunit is used to generate the fused time-scale features by passing the time-scale splicing features through the channel attention mechanism. The input tensor includes second-level communication electrical data, session communication electrical data, and accumulated electrical data value; the convolutional network includes multi-scale convolutional layers and a channel attention mechanism.
10. The building fire protection diagnostic system based on the Internet of Things and artificial intelligence according to claim 8, characterized in that, The LSTM timing modeling unit includes: The LSTM temporal feature extraction subunit is used to pass the fused time-scale features through the LSTM layer to generate temporal features; The temporal attention mechanism subunit is used to process the temporal features through the temporal attention mechanism to generate the temporal enhancement features; The LSTM network includes LSTM layers and a temporal attention mechanism.