Bluetooth multi-connection method for security system

By using Bluetooth multi-connection, a system of identification based on MAC address and custom number, and a dynamic threshold algorithm, the problem of unstable communication in existing security systems is solved. This enables parallel management and coordinated control of multiple terminals, improving the real-time performance and reliability of the system.

CN121728443APending Publication Date: 2026-03-24BEIJING HUIXINTONG ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-08
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing security systems, communication between alarm terminals and control equipment suffers from problems such as cumbersome construction, high cost, response delay, high hardware cost, high power consumption, compatibility risks, and unstable data transmission, making it difficult to meet the real-time, reliability, and multi-terminal collaborative linkage requirements of complex security scenarios.

Method used

The system employs a Bluetooth multi-connection approach, configuring the mobile phone Bluetooth host and the master controller Bluetooth host in master mode, while the alarm terminal's Bluetooth slave module is in slave mode. It uses a unique identifier combining a MAC address and a custom number to establish independent parameter configuration links and measurement and control links. Combined with dynamic alarm threshold algorithms and multi-sensor fusion confidence calculation, it achieves parallel management and linkage control of multiple terminals.

Benefits of technology

It achieves parallel and efficient operation of configuration and monitoring, avoids communication congestion, supports accurate identification and stable management of multiple terminals, reduces false alarm rate, and has comprehensive advantages such as reliable communication, rapid response, high level of intelligence and strong scalability, forming a complete security closed loop.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121728443A_ABST
    Figure CN121728443A_ABST
Patent Text Reader

Abstract

The invention discloses a Bluetooth multi-connection method for a security and protection system, and relates to the technical field of security and protection system communication, and the method comprises the following steps: configuring a mobile phone and a master controller as a Bluetooth host, configuring an alarm terminal with a dual-slave module, and presetting a unique identifier; the mobile phone is connected with the first slave to establish a parameter configuration link; the master controller is connected with each terminal second slave to establish an independent measurement and control link; the terminal collects multi-sensor data and sends the multi-sensor data to the master controller through the measurement and control link; the main controller calculates a dynamic threshold value based on historical data, if the current data exceeds the threshold value, the fusion confidence coefficient is calculated, and if the Call is greater than or equal to 1, an alarm is confirmed; the main controller issues a first alarm instruction to the trigger terminal, generates a second linkage instruction and issues the second linkage instruction to the associated terminal; and the associated terminal executes a linkage action, and the main controller generates an alarm log and uploads the alarm log to the cloud. According to the invention, parallel and efficient operation of configuration and monitoring is realized through a dual-channel physical isolation architecture, and communication congestion of a single channel is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology for security systems, and in particular to a Bluetooth multi-connection method for security systems. Background Technology

[0002] In existing security alarm systems, communication between alarm terminals and control devices mainly adopts wired connections (such as RS485 and Ethernet) or a single Bluetooth connection mode. Wired solutions require the laying of dedicated lines, which presents problems such as cumbersome construction, high cost, damage to the original structure, and difficult maintenance. On the other hand, a single Bluetooth connection only supports one-to-one communication and cannot simultaneously meet the dual requirements of mobile phone parameter configuration and real-time monitoring and control by the main controller. If time-sharing connection is used, it will lead to response delay. Some systems need to add an extra communication module to accommodate dual functions, but this will increase hardware costs, power consumption, and compatibility risks. In addition, existing solutions lack efficient communication control protocols, and data transmission is prone to packet loss and parsing errors, resulting in delayed response of linkage control. It is difficult to meet the real-time, reliability, and multi-terminal collaborative linkage requirements of complex security scenarios. Summary of the Invention

[0003] To address the aforementioned issues, this application provides a Bluetooth multi-connection method for security systems.

[0004] This application provides a Bluetooth multi-connection method for a security system, which adopts the following technical solution:

[0005] A Bluetooth multi-connection method for a security system includes the following steps:

[0006] S1, configure the mobile phone Bluetooth host and the main controller Bluetooth host to master mode, configure the two Bluetooth slave modules of each alarm terminal to slave mode, and preset different device identifiers for each slave module;

[0007] S2, the mobile Bluetooth host scans and identifies the device identifier of the first slave module of the target alarm terminal, initiates a connection request and completes pairing, and establishes a parameter configuration link;

[0008] S3, the master controller Bluetooth host scans and identifies the device identifier of the second slave module of all alarm terminals in the system, initiates connection requests in sequence and completes pairing, and establishes multiple independent measurement and control links. Among them, the parameter configuration link runs independently and in parallel with each measurement and control link.

[0009] S4, through the measurement and control link, each alarm terminal sends the periodically collected local multi-sensor data to the main controller Bluetooth host. The main controller Bluetooth host receives and parses the sensor data, and performs dynamic alarm judgment for each alarm terminal.

[0010] S5. First, based on the historical sensor data sequence of the alarm terminal, calculate the dynamic alarm threshold T_{dynamic} of the current environment. The calculation formula is as follows: T_{dynamic}=α*T_{base}+β*(μ_{history}+k*σ_{history}), where T_{base} is the preset fixed base threshold, μ_{history} and σ_{history} are the mean and standard deviation of the terminal's recent historical data (excluding alarm points), respectively, and α, β, and k are configurable weights and sensitivity coefficients, and α+β=1. Second, compare the current sensor data S_{current} with T_{dynamic}. If S_{current}>T_{dynamic}, it is initially judged to be a local anomaly.

[0011] Next, for the initial abnormal terminal, the multi-sensor fusion alarm confidence C_{alarm} is calculated, with the formula: C_{alarm}=Σ(w_i*(D_i / T_i)), where D_i is the real-time measurement value of the i-th sensor (such as smoke concentration, temperature change rate, infrared signal intensity), T_i is the dynamic threshold corresponding to this type of sensor, w_i is the weight of this type of sensor, and Σw_i=1. If C_{alarm}≥1, then the alarm is finally confirmed to be triggered, and the first alarm control command for the terminal is generated.

[0012] S6, when any alarm terminal is confirmed to have triggered an alarm, the main controller Bluetooth host performs a coordinated linkage operation, and sends the first alarm control command to the terminal that triggered the alarm through the corresponding measurement and control link, drives its local alarm actuator to act, generates a second linkage command, and sends it to one or more pre-set associated alarm terminals in the system through the measurement and control link;

[0013] S7, the associated alarm terminal receives the second linkage command and drives its local alarm actuator to perform the preset linkage action. The main controller Bluetooth host generates an alarm log containing the trigger terminal ID, confidence level C_{alarm} and associated action records, and uploads it to the cloud monitoring platform.

[0014] As a preferred technical solution of this application, the second linkage instruction includes a linkage mode instruction, and the linkage mode includes at least:

[0015] Full-field alarm mode: Instructs all online alarm terminals to activate the highest level alarm;

[0016] Regional progressive mode: Centered on the trigger terminal, it controls related terminals at different distance levels to activate alarms of different intensities according to preset geographical or logical levels;

[0017] Logical Follow Mode: Only terminals with a preset logical binding relationship with the triggering terminal are controlled to start the alarm.

[0018] As a preferred technical solution of this application, the sensor data is collected by at least two of the smoke sensor, infrared sensor and temperature sensor controlled by the microcontroller unit (MCU) of the alarm terminal, and the smoke sensor data is given the highest weight w_smoke in the confidence level C_{alarm} calculation.

[0019] As a preferred technical solution of this application, the alarm actuator includes at least one of a buzzer, an LED light, a relay-controlled sprinkler system, or an audible and visual alarm, and the first alarm control command and the second linkage command can drive the same or different types of alarm actuators.

[0020] As a preferred technical solution of this application, the parameters sent by the mobile phone Bluetooth host to the alarm terminal through the parameter configuration link include: coefficients α, β, k in the dynamic alarm threshold formula, weights w_i of each sensor, and a list of device identifiers of associated terminals.

[0021] As a preferred technical solution of this application, the communication protocol used on the measurement and control link is a custom protocol, which includes at least a reading protocol for reading sensor data, a first alarm control protocol for issuing local control commands, and a second linkage protocol for issuing linkage commands. The protocol frames of the reading protocol, the first alarm control protocol, and the second linkage protocol all contain a frame header, source / destination device address, command code, data field, and check bit.

[0022] As a preferred technical solution of this application, the instruction code of the reading protocol is 0x01, the instruction code of the first alarm control protocol is 0x02, and the instruction code of the second linkage protocol is 0x03.

[0023] In summary, this application includes at least one of the following beneficial technical effects of the Bluetooth multi-connection method for security systems:

[0024] This application achieves parallel and efficient operation of configuration and monitoring through a dual-channel physical isolation architecture, avoiding communication congestion on a single channel. It employs a unique identification system combining MAC addresses and custom numbers, along with polling scanning and priority connection mechanisms, to achieve accurate identification and stable management of multiple terminals. Through dynamic threshold algorithms and multi-sensor fusion confidence calculation, the system can adapt to environmental changes, comprehensively utilizing multi-dimensional data such as smoke, temperature, and infrared to reduce false alarm rates. When an alarm is triggered, the system supports three linkage modes: full-field alarm, area-based progressive alarm, and logic-following alarm. It rapidly issues control commands via a custom protocol to drive local actuators and uploads alarm logs to the cloud platform in real time, forming a complete security closed loop. This system boasts comprehensive advantages such as reliable communication, rapid response, high intelligence, and strong scalability. Attached Figure Description

[0025] Figure 1 This is a flowchart of the Bluetooth multi-connection method of this application. Detailed Implementation

[0026] The following is in conjunction with the appendix Figure 1 This application will be described in further detail.

[0027] See Figure 1 A Bluetooth multi-connection method for security systems includes the following steps:

[0028] S1, configure the mobile phone Bluetooth host and the main controller Bluetooth host to master mode, configure the two Bluetooth slave modules of each alarm terminal to slave mode, and preset different device identifiers for each slave module;

[0029] The system adopts a dual-channel Bluetooth architecture, in which the mobile phone Bluetooth host is responsible for parameter configuration, the master controller Bluetooth host is responsible for measurement and control communication, and the alarm terminal is equipped with two independent Bluetooth slave modules corresponding to the connection requirements of the two hosts respectively. The device identification is generated by combining the MAC address and the custom number to ensure that each slave module in the system has unique identifiability, and the identification information is stored in the non-volatile memory of the terminal MCU for easy subsequent scanning, identification and connection pairing.

[0030] The master mode configuration of the mobile phone Bluetooth host and the master controller Bluetooth host enables them to actively initiate connections, while the slave mode configuration of the alarm terminal slave module enables them to be discovered and connected. The independent settings of the two slave modules realize the physical isolation between the parameter configuration link and the measurement and control link, avoiding communication congestion and command conflicts in a single channel. The differentiated preset of device identification provides the prerequisite for target identification and accurate connection in subsequent steps, ensuring that the system can distinguish different terminals and their functional modules and realize multi-terminal parallel management.

[0031] When the system powers on, each Bluetooth module loads the standard Bluetooth protocol stack and initializes its role according to the preset master-slave mode flag. The mobile phone Bluetooth host and the master controller Bluetooth host set their GAP (Generic Access Profile) role to Central and the slave modules to Peripheral. A unique device identifier is written to each slave module through AT commands or firmware programming. This identifier contains a 16-byte Bluetooth MAC address and a 4-byte custom number, where the custom number is encoded in the format of "terminal type code + terminal serial number + module function code". After each module completes initialization, the slave module begins to broadcast its own device identifier and service UUID, waiting for the master to scan and connect. The dual-channel master-slave architecture design ensures the independence of configuration and measurement and control, and the uniqueness of the device identifier realizes the scalability and precise control of the system.

[0032] S2, the mobile Bluetooth host scans and identifies the device identifier of the first slave module of the target alarm terminal, initiates a connection request and completes pairing, and establishes a parameter configuration link; the parameters sent by the mobile Bluetooth host to the alarm terminal through the parameter configuration link include: the coefficients α, β, k in the dynamic alarm threshold formula, the weights w_i of each sensor, and the list of device identifiers of associated terminals.

[0033] The mobile Bluetooth host obtains broadcast data packets from surrounding Bluetooth devices through active scanning, and parses out the device identifier and service UUID of each slave module. After the user selects the target terminal through the mobile APP interface, the system initiates a connection request based on the preset configuration link service UUID (such as 0xFFE0). The pairing process adopts the LE SecureConnections pairing method of Bluetooth 4.2 and above to ensure communication security. After the parameter configuration link is established, the mobile Bluetooth host sends the dynamic alarm threshold formula coefficients (α, β, k), the weights of each sensor (w_i), and the device identifier list of associated terminals to the alarm terminal through a custom configuration protocol. These parameters are stored in the Flash memory of the terminal MCU as the basis for subsequent alarm judgment and linkage control.

[0034] The parameter configuration link is independent of the subsequent measurement and control link, allowing the system configuration to be dynamically adjusted without affecting normal monitoring. The distribution of dynamic alarm threshold formula coefficients enables the system to adapt to different environmental application requirements. For example, a higher α value can be set in industrial plants to reduce the impact of environmental fluctuations, while a higher β value can be increased in residential environments to enhance sensitivity. The configuration of sensor weights reflects differentiated emphasis on different types of sensors. For instance, setting the weight of the smoke sensor w_smoke to the highest (e.g., 0.5), the temperature sensor weight to 0.3, and the infrared sensor weight to 0.2 reflects a "smoke-first" safety strategy. The configuration of the associated terminal device identifier list establishes a logical relationship network between terminals, providing target guidance for subsequent collaborative linkage.

[0035] During the scanning and discovery phase, the mobile Bluetooth host calls the Bluetooth scanning API of the Android / iOS system, sets the scanning filter to only receive broadcast packets containing a specific service UUID (0xFFE0), thereby quickly identifying slave modules that can be used for parameter configuration. The connection and pairing phase uses a Passkey. In the Entry pairing method, the mobile phone displays a 6-digit random number. The user enters the same number on the terminal button to complete two-way authentication and establish an encrypted BLE connection. During the parameter sending phase, a custom configuration protocol frame format is used. The frame header is 0xAA55, the source address is the mobile phone's Bluetooth MAC address, the destination address is the target terminal's first slave module device identifier, and the instruction code is 0x10 (parameter configuration instruction). The data field includes coefficients α, β, and k (each occupying 1 byte, with a value range of 0-100, and the actual value is the transmitted value / 100), the weights w_i of each sensor (each occupying 1 byte, with a sum of 100), and a list of associated terminal device identifiers (each identifier occupies 20 bytes, supporting up to 10 associated terminals). After receiving the parameters, the terminal calculates the checksum and compares it with the frame tail checksum. If there is no error, it returns an ACK response frame (instruction code 0x11); otherwise, it returns NAK to request retransmission, ensuring the reliability of the parameter configuration.

[0036] S3, the master controller Bluetooth host scans and identifies the device identifier of the second slave module of all alarm terminals in the system, initiates connection requests in sequence and completes pairing, and establishes multiple independent measurement and control links. Among them, the parameter configuration link runs independently and in parallel with each measurement and control link.

[0037] The master controller Bluetooth host adopts a polling scanning strategy, periodically (e.g., every 5 seconds) scanning for surrounding Bluetooth devices. By parsing the device identifier and service UUID (e.g., 0xFFE1) in the broadcast packet, it identifies the second slave module of each alarm terminal. For each identified slave module, the master controller initiates connection requests sequentially according to the preset connection priority order (e.g., by device identifier number). The Just Works pairing method simplifies the connection process. After the connection is established, the master controller allocates an independent communication handle and buffer for the link, forming a measurement and control channel that runs in parallel with the parameter configuration link. The system supports maintaining multiple active measurement and control links simultaneously (e.g., up to 32 links). The connection state machine manages the connection, disconnection, and reconnection process of each link to ensure the real-time and continuous monitoring.

[0038] Multiple independent monitoring and control links enable point-to-point communication between the main controller and each alarm terminal, avoiding the unreliability and conflict issues of broadcast communication. The physical isolation between the monitoring and control links and the parameter configuration links ensures the high real-time performance of monitoring data. Even when configuring parameters, normal alarm judgment and linkage control will not be affected. The polling and scanning mechanism of the main controller enables the system to have dynamic expansion capabilities. New terminals can be automatically identified and included in the monitoring network simply by powering on and broadcasting, without manual intervention. The connection priority design ensures that key terminals (such as main entrances and exits, important equipment rooms) can establish connections first and obtain more timely monitoring responses.

[0039] The device discovery module uses the Bluetooth GAP protocol. The main controller is set to a scanning interval of 100ms and a scanning window of 50ms. It extracts information such as device identifier, RSSI (Received Signal Strength Index), and device name from the scan response packet, and filters out legitimate terminals with a service UUID of 0xFFE1. The connection management module maintains a terminal connection queue and initiates connections in order of priority. Each connection process includes steps such as LL layer connection request, L2CAP channel establishment, and ATT protocol service discovery. The complete connection establishment time is controlled within 500ms. The link maintenance module monitors the connection status of each link in real time. It detects link activity by sending heartbeat packets (command code 0x00) periodically (e.g., every 30 seconds). For abnormally disconnected links, it initiates an exponential backoff reconnection mechanism (initial reconnection interval of 1 second, maximum interval of 64 seconds). At the same time, it caches the commands to be sent during the connection interruption and resends them immediately after the connection is restored. This design ensures the stable operation of the system in complex wireless environments. Even if individual terminals are temporarily offline, it will not affect the overall monitoring function.

[0040] S4, via the measurement and control link, each alarm terminal periodically sends locally collected multi-sensor data to the main controller Bluetooth host. The main controller Bluetooth host receives and parses the sensor data, and performs dynamic alarm judgment for each alarm terminal. The sensor data is collected by at least two of the smoke sensor, infrared sensor, and temperature sensor controlled by the microcontroller unit (MCU) of the alarm terminal, and the smoke sensor data is given the highest weight w_smoke in the confidence level C_{alarm} calculation. The communication protocol used on the measurement and control link is a custom protocol, which includes at least a reading protocol for reading sensor data, a first alarm control protocol for issuing local control commands, and a second linkage protocol for issuing linkage commands. The protocol frames of the reading protocol, the first alarm control protocol, and the second linkage protocol all contain a frame header, source / destination device address, command code, data field, and check bit. The command code of the reading protocol is 0x01, the command code of the first alarm control protocol is 0x02, and the command code of the second linkage protocol is 0x03.

[0041] The microcontroller unit (such as the STM32F103 series) of the alarm terminal sequentially reads raw data from the smoke sensor (such as MQ-2), infrared sensor (such as HC-SR501), and temperature sensor (such as DS18B20) via I2C or ADC interface according to a preset sampling period (such as 10 seconds). The smoke concentration is converted into a percentage value (0-100%), the infrared signal is converted into the presence or absence of a human detection marker (0 / 1), and the temperature is converted into a Celsius value (accuracy 0.1℃). The MCU performs moving average filtering (window size 5) and threshold limiting on the raw data to eliminate sudden interference. The processed data is encapsulated into a read protocol frame according to a custom communication protocol and sent to the master controller Bluetooth host through the established measurement and control link. The protocol frame includes a frame header (0x55AA), source address (device identifier of the second slave module of the terminal), destination address (master controller Bluetooth MAC address), instruction code (0x01), data fields (smoke concentration 1 byte, temperature 2 bytes, infrared marker 1 byte), and check bits (accumulation and inversion). The data length of a single frame is fixed at 32 bytes, using BLE. ATT_MTU (default 23 bytes) fragmented transmission, which is reassembled and parsed completely at the receiving end;

[0042] Multi-sensor collaborative acquisition provides multi-dimensional environmental monitoring capabilities. Smoke sensors detect early fire characteristics, temperature sensors capture abnormal temperature rises, and infrared sensors assist in determining whether there is human activity, comprehensively improving alarm accuracy. The design of assigning different weights to sensor data (with w_smoke being the highest) reflects a "smoke-first" safety strategy. In subsequent alarm judgments, smoke anomalies will have a greater impact on decision-making. The design of the custom protocol optimizes wireless transmission efficiency, the fixed-length frame structure facilitates parsing and processing, the verification mechanism ensures the integrity of data transmission, and the fragmented transmission mechanism adapts to the BLE protocol's limitation on the length of a single data transmission.

[0043] S5. First, based on the historical sensor data sequence of the alarm terminal, calculate the dynamic alarm threshold T_{dynamic} of the current environment. The calculation formula is as follows: T_{dynamic}=α*T_{base}+β*(μ_{history}+k*σ_{history}), where T_{base} is the preset fixed base threshold, μ_{history} and σ_{history} are the mean and standard deviation of the terminal's recent historical data (excluding alarm points), respectively, and α, β, and k are configurable weights and sensitivity coefficients, and α+β=1. Second, compare the current sensor data S_{current} with T_{dynamic}. If S_{current}>T_{dynamic}, it is initially judged to be a local anomaly.

[0044] Next, for the initial abnormal terminal, the multi-sensor fusion alarm confidence C_{alarm} is calculated, with the formula: C_{alarm}=Σ(w_i*(D_i / T_i)), where D_i is the real-time measurement value of the i-th sensor (such as smoke concentration, temperature change rate, infrared signal intensity), T_i is the dynamic threshold corresponding to this type of sensor, w_i is the weight of this type of sensor, and Σw_i=1. If C_{alarm}≥1, then the alarm is finally confirmed to be triggered, and the first alarm control command for the terminal is generated.

[0045] The main controller maintains a historical data buffer (e.g., capacity 100 samples) for each alarm terminal, storing recent normal sensor data sequences (excluding alarmed points). When new sensor data S_{current} is received, the dynamic alarm threshold T_{dynamic} for that terminal is first calculated using the formula T_{dynamic}=α*T_{base}+β*(μ_{history}+k*σ_{history}), where T_{base} is the preset base threshold (e.g., smoke concentration 30%), μ_{history} and σ_{history} are the mean and standard deviation of the historical data, respectively, and α, β, and k are configuration coefficients sent by the mobile phone (default α=0.3, β=0.7, k=2). If S_{current} exceeds T_{dynamic}, it is initially determined to be a local anomaly. Then, the multi-sensor fusion alarm confidence score C_{alarm}=Σ(w_i*(D_i / T_i)) is calculated for the terminal with the initial anomaly. Where D_i is the current value of each sensor, T_i is the corresponding dynamic threshold (smoke T_{smoke}=T_{dynamic}, temperature T_{temp}=10℃ / min change rate, infrared T_ir=1), and w_i is the sensor weight (w_smoke=0.5, w_temp=0.3, w_ir=0.2). If C_{alarm}≥1, the alarm is finally confirmed to be triggered, and the first alarm control command containing the terminal ID, confidence score, and timestamp is generated.

[0046] Dynamic threshold calculation enables the system to adapt to environmental changes, reducing the false alarm rate in stable environments (reflecting the baseline level through the historical mean μ_{history}) and increasing sensitivity in fluctuating environments (reflecting the fluctuation amplitude through the standard deviation σ_{history}). The configuration of coefficients α and β achieves a balance between fixed thresholds and dynamic adjustments, while the k value controls the system's sensitivity to abnormal fluctuations. Multi-sensor fusion confidence calculation integrates multiple environmental characteristics, avoiding false alarms caused by single sensor false alarms. Weight allocation reflects the differences in importance of different sensors in fire judgment. The judgment condition C_{alarm}≥1 is equivalent to requiring at least two sensors to be abnormal simultaneously (e.g., smoke exceeds the threshold and temperature rises rapidly), or a single sensor to be severely abnormal (e.g., smoke concentration far exceeds the high threshold), thereby improving the system's reliability and robustness.

[0047] S6, when any alarm terminal is confirmed to have triggered an alarm, the main controller Bluetooth host performs a coordinated linkage operation. Through the corresponding measurement and control link, it sends the first alarm control command to the terminal that triggered the alarm, drives its local alarm actuator to act, generates a second linkage command, and sends it to one or more preset associated alarm terminals in the system through the measurement and control link. The second linkage command includes linkage mode commands, and the linkage modes include at least: full-field alarm mode: instructs all online alarm terminals to start the highest level alarm; area progressive mode: with the triggering terminal as the center, controls associated terminals at different distance levels to start alarms of different intensities according to preset geographical or logical levels; logic follow mode: only controls terminals with preset logical binding relationships with the triggering terminal to start alarms.

[0048] S7, the associated alarm terminal receives the second linkage command and drives its local alarm actuator to perform the preset linkage action. The main controller Bluetooth host generates an alarm log containing the trigger terminal ID, confidence level C_{alarm} and associated action record, and uploads it to the cloud monitoring platform. The alarm actuator includes at least one of a buzzer, LED light, relay-controlled sprinkler system or audible and visual alarm. The first alarm control command and the second linkage command can drive the same or different types of alarm actuators.

[0049] When the main controller confirms that an alarm terminal has triggered an alarm, it immediately sends the first alarm control command to the terminal through the corresponding measurement and control link. The command format includes a frame header (0x55AA), source address (main controller MAC), destination address (trigger terminal ID), command code (0x02), data fields (1 byte for alarm level, 1 byte for actuator type, 2 bytes for execution parameters), and a checksum. After receiving the command, the trigger terminal's MCU parses the command and drives the local alarm actuator to perform actions, such as activating the buzzer (frequency 2kHz, duty cycle 50%), lighting up the red LED (blinking frequency 1Hz), and activating the relay to control the sprinkler system (continuously powered on for 5 minutes). At the same time, the main controller generates a second linkage command according to the preset linkage strategy and sends it to the associated terminal through the measurement and control link. The command format is similar to the first alarm control command, but the command code is 0x02. 03. The data field additionally includes the linkage mode code (1 byte) and linkage level parameters (1 byte). After receiving the second linkage command, the associated terminal executes the corresponding action according to the linkage mode. For example, in the full-field alarm mode, all terminals activate the audible and visual alarms. In the area progressive mode, the level closest to the trigger terminal (e.g., within a radius of 10 meters) activates a strong alarm (full audible and visual alarm), the next level (10-20 meters) activates a medium alarm (audible alarm only), and the outer level (beyond 20 meters) activates a weak alarm (visual alarm only). The main controller records alarm events in real time and generates alarm logs containing information such as the trigger terminal ID, confidence level C_{alarm}, timestamp, list of linked terminals, and executed actions. These logs are uploaded to the cloud monitoring platform via Wi-Fi or 4G module. After parsing, the platform displays the alarm location, level, and handling suggestions, and pushes notifications to the administrator's mobile APP.

[0050] This application achieves parallel and efficient operation of configuration and monitoring through a dual-channel physical isolation architecture, avoiding communication congestion on a single channel. It employs a unique identification system combining MAC addresses and custom numbers, along with polling scanning and priority connection mechanisms, to achieve accurate identification and stable management of multiple terminals. Through dynamic threshold algorithms and multi-sensor fusion confidence calculation, the system can adapt to environmental changes, comprehensively utilizing multi-dimensional data such as smoke, temperature, and infrared to reduce false alarm rates. When an alarm is triggered, the system supports three linkage modes: full-field alarm, area-based progressive alarm, and logic-following alarm. It rapidly issues control commands via a custom protocol to drive local actuators and uploads alarm logs to the cloud platform in real time, forming a complete security closed loop. This system boasts comprehensive advantages such as reliable communication, rapid response, high intelligence, and strong scalability.

[0051] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.

Claims

1. A Bluetooth multi-connection method for a security system, characterized in that, Includes the following steps: S1, configure the mobile phone Bluetooth host and the main controller Bluetooth host to master mode, configure the two Bluetooth slave modules of each alarm terminal to slave mode, and preset different device identifiers for each slave module; S2, the mobile Bluetooth host scans and identifies the device identifier of the first slave module of the target alarm terminal, initiates a connection request and completes pairing, and establishes a parameter configuration link; S3, the master controller Bluetooth host scans and identifies the device identifier of the second slave module of all alarm terminals in the system, initiates connection requests in sequence and completes pairing, and establishes multiple independent measurement and control links. Among them, the parameter configuration link runs independently and in parallel with each measurement and control link. S4, through the measurement and control link, each alarm terminal sends the periodically collected local multi-sensor data to the main controller Bluetooth host. The main controller Bluetooth host receives and parses the sensor data, and performs dynamic alarm judgment for each alarm terminal. S5. First, based on the historical sensor data sequence of the alarm terminal, calculate the dynamic alarm threshold T_{dynamic} of the current environment. The calculation formula is as follows: T_{dynamic}=α*T_{base}+β*(μ_{history}+k*σ_{history}), where T_{base} is the preset fixed base threshold, μ_{history} and σ_{history} are the mean and standard deviation of the terminal's recent historical data (excluding alarm points), respectively, and α, β, and k are configurable weights and sensitivity coefficients, and α+β=1. Second, compare the current sensor data S_{current} with T_{dynamic}. If S_{current}>T_{dynamic}, it is initially judged to be a local anomaly. Next, for the initial abnormal terminal, the multi-sensor fusion alarm confidence C_{alarm} is calculated, with the formula: C_{alarm}=Σ(w_i*(D_i / T_i)), where D_i is the real-time measurement value of the i-th sensor (such as smoke concentration, temperature change rate, infrared signal intensity), T_i is the dynamic threshold corresponding to this type of sensor, w_i is the weight of this type of sensor, and Σw_i=1. If C_{alarm}≥1, then the alarm is finally confirmed to be triggered, and the first alarm control command for the terminal is generated. S6, when any alarm terminal is confirmed to have triggered an alarm, the main controller Bluetooth host performs a coordinated linkage operation, and sends the first alarm control command to the terminal that triggered the alarm through the corresponding measurement and control link, drives its local alarm actuator to act, generates a second linkage command, and sends it to one or more pre-set associated alarm terminals in the system through the measurement and control link; S7, the associated alarm terminal receives the second linkage command and drives its local alarm actuator to perform the preset linkage action. The main controller Bluetooth host generates an alarm log containing the trigger terminal ID, confidence level C_{alarm} and associated action records, and uploads it to the cloud monitoring platform.

2. The Bluetooth multi-connection method for a security system according to claim 1, characterized in that, The second linkage command includes linkage mode commands, and the linkage modes include at least: Full-field alarm mode: Instructs all online alarm terminals to activate the highest level alarm; Regional progressive mode: Centered on the trigger terminal, it controls related terminals at different distance levels to activate alarms of different intensities according to preset geographical or logical levels; Logical Follow Mode: Only terminals with a preset logical binding relationship with the triggering terminal are controlled to start the alarm.

3. The Bluetooth multi-connection method for a security system according to claim 1, characterized in that, Sensor data is collected by at least two of the smoke sensor, infrared sensor and temperature sensor controlled by the microcontroller unit (MCU) of the alarm terminal, and the smoke sensor data is given the highest weight w_smoke in the confidence level C_{alarm} calculation.

4. The Bluetooth multi-connection method for a security system according to claim 1, characterized in that, The alarm actuator includes at least one of a buzzer, an LED light, a relay-controlled sprinkler system, or an audible and visual alarm. The first alarm control command and the second linkage command can drive the same or different types of alarm actuators.

5. The Bluetooth multi-connection method for a security system according to claim 1, characterized in that, The parameters sent by the mobile Bluetooth host to the alarm terminal through the parameter configuration link include: coefficients α, β, and k in the dynamic alarm threshold formula, the weights w_i of each sensor, and the device identifier list of associated terminals.

6. The Bluetooth multi-connection method for a security system according to claim 1, characterized in that, The communication protocol used on the measurement and control link is a custom protocol, which includes at least a reading protocol for reading sensor data, a first alarm control protocol for issuing local control commands, and a second linkage protocol for issuing linkage commands. The protocol frames of the reading protocol, the first alarm control protocol, and the second linkage protocol all contain a frame header, source / destination device address, command code, data field, and check bit.

7. A Bluetooth multi-connection method for a security system according to claim 6, characterized in that, The instruction code for reading the protocol is 0x01, and the instruction code for the first alarm control protocol is 0x02.

8. A Bluetooth multi-connection method for a security system according to claim 6, characterized in that, The instruction code for the second linkage protocol is 0x03.