Fire-fighting bus response method and system based on dynamic priority and conflict avoidance
The fire bus response method, which uses detectors to autonomously calculate dynamic response delay and backoff algorithms, solves the problems of slow response speed, insufficient alarm priority differentiation, and poor communication reliability in existing technologies, and realizes fast, reliable, and flexible communication in the fire bus system.
Patent Information
- Application Number
- CN202511819098.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-03-03
AI Technical Summary
Existing fire alarm bus communication methods are inadequate in terms of response speed, alarm priority differentiation, and communication reliability, and cannot meet the real-time and flexibility requirements of fire alarm systems.
A fire bus response method based on dynamic priority and conflict avoidance is adopted. By autonomously calculating the dynamic response delay and backoff algorithm of the detector, priority processing of alarm signals and high-reliability communication are achieved.
It achieves millisecond-level fast response, has high communication reliability and dynamic adaptive capabilities, and is suitable for a variety of scenarios.
Smart Images

Figure CN121603318A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of fire alarms, and in particular to a fire bus response method and system based on dynamic priority and conflict avoidance, which enables communication between the controller and multiple detectors in the fire bus system. Background Technology
[0002] In fire alarm systems, bus topology is widely used due to its simple wiring and low cost. Traditional fire bus communication often adopts a master-slave polling mechanism, where the controller queries each detector sequentially, and the detector only reports its status when it is queried. Although this mechanism is reliable, when there are a large number of detectors connected to the bus, the cycle of completing a full query is very long, resulting in poor system real-time response and failing to meet the strict requirement of "second-level response" for alarms.
[0003] To improve the efficiency of polling mechanisms, existing technologies have proposed several improvements. For example, patent document CN102739489B discloses a method for quickly querying device status on a synchronous bus. This method involves the communication host allocating fixed time slices to all terminals, and the terminals reporting information within the specified time slice. While this method reduces the overhead of addressing one by one, it still has the following inherent drawbacks: Scheduling bottleneck: This method relies on communication host scheduling, requiring the host to allocate time slices for each terminal and maintain strict global clock synchronization. This increases the computational burden on the controller, creating a single point of bottleneck in the system. Furthermore, when the number of detectors changes dynamically, the system needs to reconfigure the timing sequence, resulting in poor flexibility.
[0004] Inability to differentiate alarm priorities: This method fails to consider the varying degrees of urgency among different events in a fire alarm scenario. A normal fault signal and a critical alarm signal are treated equally in terms of response timing, failing to achieve priority reporting and rapid processing of alarm signals, which contradicts the core principles of fire alarm systems.
[0005] Insufficient robustness: Existing solutions generally lack effective conflict resolution mechanisms. When system anomalies occur (such as clock drift or signal delay), packet collisions may still occur, and the system itself lacks rapid self-recovery capabilities. Even with unique addresses, these non-ideal factors still threaten communication reliability.
[0006] Therefore, there is an urgent need in this field for a new fire bus communication method that can ensure high-speed response, distinguish alarm priorities, and is highly reliable, intelligent, and easily expandable. Summary of the Invention
[0007] To address the technical problem that existing fire bus response methods cannot distinguish priorities and thus cannot achieve priority reporting and rapid processing of alarm signals, this invention proposes a fire bus response method and system based on dynamic priority and conflict avoidance, which has fast response speed, can distinguish alarm priorities, and has high communication reliability.
[0008] To achieve the above objectives, the technical solution of the present invention is implemented as follows: a fire bus response method based on dynamic priority and conflict avoidance, comprising: The controller broadcasts a query command via the fire alarm bus; the query command contains information on the total number of connected addresses (Address_Total), the unit offset value (Unit_Offset), and the slot time (Slot_Time). After receiving the query command, each detector determines its priority base value Priority_Base based on the information of the total number of access detector addresses Address_Total and the unit offset value Unit_Offset, its own preset address and current status, and autonomously calculates a unique dynamic response delay time. Each detector is activated on a timer and monitors the fire alarm bus while waiting for the dynamic response delay time. If the fire bus is detected to be idle before its own dynamic response delay time expires, the detector sends a response message to the controller through the fire bus. If the detector detects that the fire bus is occupied before its own dynamic response delay time expires, the detector will pause the timer and execute the backoff algorithm, and wait for an additional waiting time before trying to send a response message. The controller listens to the bus, receives and parses the detector's response messages to determine the detector's status.
[0009] Preferably, before each broadcast query command, the controller dynamically calculates the unit offset value Unit_Offset and the total number of addresses Address_Total based on the current bus load, historical communication success rate, or preset strategy, and includes the unit offset value Unit_Offset and the total number of addresses Address_Total in the query command and broadcasts them to all detectors.
[0010] Preferably, when the system is initialized or a detector is connected, the controller obtains the total number of detectors currently connected to the bus through address registration, scanning or configuration table, and the total number of detectors is the total number of addresses Address_Total; The Unit_Offset value is a unit of time used for fine-tuning the order among detectors with the same state, ensuring that each detector has a unique response delay; Slot_Time is a unit of time used as the basic unit of time for backoff algorithm calculations.
[0011] Preferably, the model for determining the priority base value Priority_Base is as follows: Alarm status: Priority base value Priority_Base = 0 Fault status: Priority base value Priority_Base = Address_Total × Unit_Offset Normal state: Priority base value Priority_Base = Address_Total × Unit_Offset ×2.
[0012] Preferably, the dynamic response delay time T_delay is calculated using the formula T_delay = Priority_Base + Address × Unit_Offset, where: Priority_Base is the priority base value; Address is the detector's own preset address; and Unit_Offset is the time unit used for fine-tuning the sorting among detectors in the same state. Alarm-state detectors respond first; under the same state, detectors with smaller addresses respond first.
[0013] Preferably, the self-preset address is a unique address that each detector has in the system, which is set during installation through DIP switches, software configuration, or automatic allocation. The current status includes alarm, fault, and normal, which is determined autonomously by the detector based on sensor data; After receiving a query command, the detector starts an internal timer, with the duration set to the dynamic response delay time T_delay; The detector continuously monitors the bus level during the waiting period. If it detects a message transmission on the bus, it determines that the bus is "occupied"; otherwise, it is "idle". Bus idle determination: The bus is considered idle if it remains high for a continuous period of time or within a time slot (Slot_Time); the response message includes the detector address, status code, and checksum. The bus must not be occupied for more than the slot time (Slot_Time); the slot time (Slot_Time) is set to one message transmission time plus the signal propagation delay.
[0014] Preferably, the backoff algorithm is a binary exponential backoff algorithm, and the specific steps include: The detector maintains an internal collision counter C and increments it by one each time a backoff is performed. Calculate the upper limit of the backoff window K = 2 based on the current conflict count C. C ; Randomly select an integer R from the range [1, K]. The additional waiting time T_backoff is calculated using the formula T_backoff = R × Slot_Time, where Slot_Time is the preset time unit for the time slot. After the additional waiting time has elapsed, attempt to send the response message again.
[0015] Preferably, after broadcasting the query command, the controller switches to receiving mode, continuously monitors the fire bus, and after receiving the response message, parses the address and status fields in the message according to the preset communication protocol and updates the status record of the corresponding detector. The controller dynamically adjusts the base delay parameter in the next broadcast query command based on the historical communication success rate or bus load to optimize the overall system query cycle. The controller maintains a communication success rate statistics table. If the communication success rate is high and the load is light, the unit offset value Unit_Offset is reduced to shorten the query cycle; if conflicts are frequent and the load is heavy, the unit offset value Unit_Offset is increased to reduce the probability of collision.
[0016] A fire bus response system based on dynamic priority and conflict avoidance includes: A controller is used to broadcast query commands and receive and parse the detector's response messages; Multiple detectors are connected to the controller via a fire alarm bus; The detector has a built-in processing module for calculating the dynamic response delay based on its own address and real-time status, and has the function of listening to the fire bus and executing the backoff algorithm while waiting for the dynamic response delay. The controller's memory stores an algorithm program for adaptively adjusting the basic delay parameters in broadcast commands based on the bus communication quality.
[0017] Preferably, the processing module includes an instruction parsing module, a status detection module, an address storage module, a dynamic response delay calculation module, a timer module, a bus monitoring module, a conflict handling module, and a message generation module. The instruction parsing module, the status detection module, and the address storage module are all connected to the dynamic response delay calculation module. The conflict handling module and the dynamic response delay calculation module are both connected to the timer module. The bus monitoring module is connected to both the conflict handling module and the message generation module. The instruction parsing module receives query instructions from the fire protection bus, parses out parameters such as the total number of addresses, unit offset value, and time slot time, and passes them to the dynamic response delay calculation module. The status detection module monitors the detector's own status in real time and transmits the status information to the dynamic response delay calculation module; The address storage module stores the detector's unique preset address, which is then used by the dynamic response delay calculation module. The dynamic response delay calculation module calculates the dynamic response delay time based on the received parameters, status information, and preset address, and then starts the timer module. The timer module starts timing during the delay period and works in conjunction with the bus monitoring module. The bus monitoring module continuously monitors the bus status during the waiting period. If it detects that the bus is occupied, it notifies the conflict handling module to execute the backoff algorithm. The conflict resolution module calculates the additional waiting time based on the backoff algorithm and restarts the timer module; When the bus is idle and the timer expires, the message generation module generates a response message and sends it to the bus. The controller includes an instruction generation module, a message parsing module, a status recording module, and a parameter dynamic adjustment module. The parameter dynamic adjustment module is connected to the instruction generation module, and the message parsing module is connected to both the status recording module and the parameter dynamic adjustment module. The instruction generation module generates query instructions based on the dynamic parameters provided by the parameter adjustment module and broadcasts them via the bus. The message parsing module receives and parses the response messages returned by the detector, extracts the address and status information, and passes it to the status recording module; The status logging module updates and stores the status information of each detector for system query and alarm purposes. The parameter dynamic adjustment module dynamically adjusts the parameters in the next query command based on the communication success rate and bus load status fed back by the message parsing module.
[0018] Compared with the prior art, the beneficial effects of the present invention are as follows: Intelligent and rapid response: The terminal can autonomously calculate and preempt alarm signals in milliseconds.
[0019] Multiple communication reliability guarantees: Combining dynamic delay and backoff algorithms to form a multi-mechanism that combines active avoidance and passive recovery, resulting in extremely high robustness.
[0020] Dynamic self-adaptation: System parameters can be dynamically adjusted, with strong scalability and wide applicability. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart of the method of the present invention.
[0023] Figure 2 This is an overall structural diagram of the system of the present invention.
[0024] Figure 3 This is a schematic diagram of the system of the present invention. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] Example 1 like Figure 1 As shown, a fire bus response method based on dynamic priority and conflict avoidance includes the following steps: The controller broadcasts a query command via the fire alarm bus; the query command contains information such as the total number of connected addresses (Address_Total), the unit offset value (Unit_Offset), and the slot time (Slot_Time).
[0027] Address_Total: When the system initializes or a detector is connected, the controller obtains the total number of detectors currently connected to the bus through address registration, scanning, or configuration tables. Each detector has one address, and the total number of detectors is the total number of addresses Address_Total.
[0028] The Unit_Offset value is a time unit (such as milliseconds) used to fine-tune the order among detectors with the same status (such as alarm, fault, normal) to ensure that each detector has a unique response delay.
[0029] Slot_Time is a unit of time (such as milliseconds) used as the basic unit of time for backoff algorithm calculations.
[0030] Before each broadcast query command, the controller dynamically calculates the unit offset value Unit_Offset and the total number of addresses Address_Total based on the current bus load, historical communication success rate, or preset strategy, and includes them in the query command to broadcast to all detectors.
[0031] After receiving the query command, each detector determines its priority base value Priority_Base based on the information of the total number of access detector addresses (Address_Total) and unit offset value (Unit_Offset), its own preset address, and its current state, and autonomously calculates a unique dynamic response delay time.
[0032] The default address is a unique address that each detector has in the system, which is usually set during installation through DIP switches, software configuration, or automatic allocation.
[0033] Current status: including "alarm", "fault" and "normal", which is determined autonomously by the detector based on sensor data.
[0034] The model for determining the priority base value Priority_Base: Alarm status: Priority base value Priority_Base = 0 Fault status: Priority base value Priority_Base = Address_Total × Unit_Offset Normal state: Priority base value Priority_Base = Address_Total × Unit_Offset ×2 The dynamic response delay time T_delay is calculated using the formula T_delay = Priority_Base + Address × Unit_Offset, where: Priority_Base is the base priority value; Address is the detector's default address; and Unit_Offset is the time unit used for fine-tuning the order of detectors in the same state. Detectors in alarm states respond first; under the same state, detectors with smaller addresses respond first; this dual scheduling mechanism of "state priority + address fine-tuning" significantly improves alarm response speed.
[0035] The priority base value corresponding to the alarm state is configured to be less than the priority base values corresponding to the fault state and the normal state; the detector responds first in the alarm state; the priority base value is determined by the priority_Base model.
[0036] Each detector is activated on a timer and monitors the fire alarm bus while waiting for the dynamic response delay.
[0037] Timing setting: After receiving a query command, the detector starts an internal timer, and the duration is set to the dynamic response delay time T_delay.
[0038] Bus monitoring mechanism: The detector continuously monitors the bus level during the waiting period. If it detects that there is a message transmission on the bus (the bus is at a high level when there is no message), it is determined to be "occupied"; otherwise, it is "idle".
[0039] If the detector detects that the fire bus is idle before its own dynamic response delay time expires, the detector sends a response message to the controller through the fire bus.
[0040] Bus idle determination: The bus is considered idle if it remains high for a continuous period of time (such as a time slot Slot_Time). The response message includes the detector address, status code, checksum, etc.
[0041] For example: The controller sends a frame (hexadecimal): AA 01 64 14 05 XXXX 55, with details shown in the table below: Detector response frame (hexadecimal): 2F DA, details are shown in the table below: Note: The high 7 bits (0010 111) represent the device address, which is the decimal number 17. Bits 8-7 (11) represent the device status, which is the decimal number 3, indicating a device failure. The low 7 bits (1011010) represent the CRC7 checksum.
[0042] The above protocol frames are for illustrative purposes only.
[0043] If the detector detects that the fire bus is occupied before its own dynamic response delay time expires, it will pause the timing and execute the backoff algorithm, waiting for an additional waiting time before attempting to send a response message.
[0044] The bus must not be occupied for more than the slot time (Slot_Time), therefore the response message should be designed to be as short as possible.
[0045] The backoff algorithm is a binary exponential backoff algorithm, and the specific steps include: the detector maintains the count C of the internal collision counter and increments it by one each time backoff is performed; Calculate the upper limit of the backoff window K = 2 based on the current conflict count C. C The binary exponential backoff algorithm is adopted. As the number of collisions increases, the backoff window grows exponentially, which effectively disperses the retry time, avoids continuous collisions, and improves the system's recovery capability during congestion.
[0046] Randomly select an integer R from the range [1, K]. The additional waiting time T_backoff is calculated using the formula T_backoff = R × Slot_Time, where Slot_Time is the preset time unit for the time slot. The slot time (Slot_Time) is typically set to the message transmission time plus the signal propagation delay, for example, 5ms. This ensures that multiple detectors have different delays when they re-attempt to send after backoff, reducing the probability of secondary collisions.
[0047] After the additional waiting time has elapsed, attempt to send the response message again. Ensure the detector can reply with a response message normally to avoid the controller misinterpreting it as a disconnection (a communication failure between the controller and the detector).
[0048] The controller listens to the bus, receives and parses the detector's response messages to determine its status. After broadcasting a query command, the controller switches to receive mode, continuously listens to the bus, and upon receiving a response message, parses the address and status fields in the message according to a preset communication protocol, updating the status record of the corresponding detector.
[0049] The controller dynamically adjusts the base delay parameter in the next broadcast query command based on historical communication success rates or bus load conditions to optimize the overall system query cycle. The controller maintains a communication success rate statistics table. If the communication success rate is high and the load is light, the unit offset value (Unit_Offset) is appropriately reduced to shorten the query cycle; if collisions are frequent and the load is heavy, the unit offset value (Unit_Offset) is increased to reduce the probability of collisions. Optimization objective: Minimize the overall system query cycle while ensuring real-time response.
[0050] Example 2 like Figure 1 As shown, a fire bus response method based on dynamic priority and conflict avoidance includes the following steps: If 100 detectors are connected, with addresses 1-100, detectors 3#, 4#, and 100# will alarm, detectors 13#, 15#, and 99# will malfunction, and the remaining detectors will function normally.
[0051] The controller sends a broadcast query command carrying information about the total number of detector addresses (Address_Total), unit offset (Unit_Offset), and slot time (Slot_Time), where Address_Total=100, Unit_Offset=20ms, and Slot_Time=5ms; After receiving the query command, each detector, based on the obtained information of the total number of connected detectors (Address_Total) and the unit offset (Unit_Offset), its own preset address, and the priority base value (Priority_Base) determined by its current state, autonomously calculates a unique dynamic response delay time T_delay = Priority_Base + Address × Unit_Offset. In alarm mode, the priority base value is 0; in fault mode, the priority base value is Address_Total × Unit_Offset; in normal mode, the priority base value is Address_Total × Unit_Offset × 2. The dynamic response delay time of detector #3 is: T_delay = 0 + 3×20 = 60ms; The dynamic response delay time of detector #4 is: T_delay = 0 + 4×20 = 80ms; The dynamic response delay time of detector #100 is: T_delay = 0 + 100×20 = 2000ms; The dynamic response delay time of detector #13 is: T_delay = 100×20 + 13×20 = 2260ms; The dynamic response delay time of detector #15 is: T_delay = 100×20 + 15×20 = 2300ms; The dynamic response delay time of detector #99 is: T_delay = 100×20 + 99×20 = 3980ms; The dynamic response delay time of detector #1 is: T_delay = 100×20×2 + 1×20 = 4020ms; And so on.
[0052] Each detector starts on a timer and listens to the bus status while waiting for the dynamic response delay time; If the detector detects that the bus is idle before its own dynamic response delay time expires, the detector sends a response message to the controller through the fire protection bus. If the detector detects that the bus is occupied before its own dynamic response delay time expires, it will pause the timing and execute the backoff algorithm. After the additional waiting time determined by the backoff algorithm expires, it will try to send again. If detector #3 detects that the fire alarm bus is occupied by detector #4 before its dynamic response delay expires, the detector will pause its timer and execute the binary exponential backoff algorithm. The specific steps include: The detector maintains an internal collision counter C = 0 and increments it by one each time a backoff is performed; The upper limit of the backoff window is calculated based on the current conflict counter C: K = 2^1 = 2; Randomly select an integer R from the range [1, 2], and randomly select R=2; The additional backoff time (T_backoff) is calculated using the formula T_backoff = R × Slot_Time = 10ms, meaning that detector #3 will attempt to transmit again after a 10ms delay, with C being a maximum of 2. The preset slot time Slot_Time is 5ms.
[0053] Combining the above methods, if 100 detectors are connected and detector #3 alarms, using the traditional polling method, the maximum alarm time is 100 × 20 ms = 2000 ms. The 20 ms figure represents an ideal situation and is generally unrealistic. In industrial applications, most manufacturers use the standard Modbus-RTU protocol. Taking the common example of a master station reading a slave station's register, the master station needs 8 bytes to send a request, and the slave station returns a response of 5 + 2 × n bytes, where n is the number of registers. If the communication rate is 9600, with 1 start bit, 8 data bits, no parity, and 1 stop bit, the time required to transmit one byte of data is (8 + 1 + 1) / 9600 = 1.04 ms / Byte. Therefore, the time period from the master station sending a response to the slave station returning data is (8 + 5 + 2 × n) × 1.04 + T1 + T2, where n is the number of registers, T1 is the slave station's response time, and T2 is the communication margin, typically 20~50 ms. If 10 words of data are read and the slave station response time is 10ms, then the entire cycle is: (8+5+2×10)×1.04+10+50=94.32ms. Therefore, the polling time must be greater than 94.32ms, and can be set to more than 100ms. That is, the maximum alarm time is 100×100ms = 10000ms, while the invention only requires 60ms.
[0054] Example 3 like Figure 2 and Figure 3 As shown, a fire bus response system based on dynamic priority and conflict avoidance includes: A controller is used to broadcast query commands and receive and parse the detector's response messages; Multiple detectors are connected to the controller via a fire alarm bus; The detector has a built-in processing module for calculating the dynamic response delay based on its own address and real-time status. It also has the function of monitoring the fire alarm bus and executing backoff algorithms while waiting for the dynamic response delay. Alarm-state detectors respond first; under the same status, detectors with smaller addresses respond first; this implements a dual scheduling mechanism of "status priority + address fine-tuning," significantly improving alarm response speed.
[0055] The processing module includes an instruction parsing module, a status detection module, an address storage module, a dynamic response delay calculation module, a timer module, a bus monitoring module, a conflict handling module, and a message generation module. The instruction parsing module, status detection module, and address storage module are all connected to the dynamic response delay calculation module. The conflict handling module and the dynamic response delay calculation module are both connected to the timer module. The bus monitoring module is connected to both the conflict handling module and the message generation module.
[0056] The instruction parsing module receives query instructions from the fire protection bus, parses out parameters such as total number of addresses, unit offset value, and time slot time, and passes them to the dynamic response delay calculation module. The status detection module monitors the detector's own status (alarm / fault / normal) in real time and transmits the status information to the dynamic response delay calculation module; The address storage module stores the detector's unique preset address, which is then used by the dynamic response delay calculation module. The dynamic response delay calculation module calculates the dynamic response delay time based on the received parameters, status, and address, and then starts the timer module. The timer module starts timing during the delay period and works in conjunction with the bus monitoring module. The bus monitoring module continuously monitors the bus status during the waiting period. If it detects that the bus is occupied, it notifies the conflict handling module to execute the backoff algorithm. The conflict resolution module calculates the additional waiting time based on the backoff algorithm and restarts the timer module; When the bus is idle and the timer expires, the message generation module generates a response message and sends it to the bus.
[0057] The controller's memory stores an algorithm program for adaptively adjusting the basic delay parameters in broadcast commands based on bus communication quality. The basic delay parameters include the unit offset value (Unit_Offset) and the total number of addresses (Address_Total).
[0058] The controller maintains a communication success rate statistics table. Dynamic adjustment strategy: If the communication success rate is high and the load is light, appropriately decrease Unit_Offset to shorten the query cycle; if conflicts are frequent and the load is heavy, increase Unit_Offset to reduce the probability of collisions. Optimization goal: Minimize the overall system query cycle while ensuring real-time response.
[0059] The controller is equipped with an instruction generation module, a message parsing module, a status recording module, and a parameter dynamic adjustment module. The parameter dynamic adjustment module is connected to the instruction generation module, and the message parsing module is connected to both the status recording module and the parameter dynamic adjustment module.
[0060] The instruction generation module generates a query instruction based on the dynamic parameters (such as cell offset value and total number of addresses) provided by the parameter dynamic adjustment module, and broadcasts it through the bus. The message parsing module receives and parses the response messages returned by the detector, extracts the address and status information, and passes it to the status recording module; The status logging module updates and stores the status information of each detector for system query and alarm purposes. The parameter dynamic adjustment module dynamically adjusts the parameters in the next query command based on the communication success rate and bus load status fed back by the message parsing module.
[0061] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A fire bus response method based on dynamic priority and conflict avoidance, characterized in that, include: The controller broadcasts a query command via the fire alarm bus; the query command contains information on the total number of connected addresses (Address_Total), the unit offset value (Unit_Offset), and the slot time (Slot_Time). After receiving the query command, each detector determines its priority base value Priority_Base based on the information of the total number of access detector addresses Address_Total and the unit offset value Unit_Offset, its own preset address and current status, and autonomously calculates a unique dynamic response delay time. Each detector is activated on a timer and monitors the fire alarm bus while waiting for the dynamic response delay time. If the fire bus is detected to be idle before its own dynamic response delay time expires, the detector sends a response message to the controller through the fire bus. If the detector detects that the fire bus is occupied before its own dynamic response delay time expires, the detector will pause the timer and execute the backoff algorithm, and wait for an additional waiting time before trying to send a response message. The controller listens to the bus, receives and parses the detector's response messages to determine the detector's status.
2. The fire bus response method based on dynamic priority and conflict avoidance according to claim 1, characterized in that, Before each broadcast query command, the controller dynamically calculates the unit offset value (Unit_Offset) and the total number of addresses (Address_Total) based on the current bus load, historical communication success rate, or preset strategy, and includes the unit offset value (Unit_Offset) and the total number of addresses (Address_Total) in the query command and broadcasts them to all detectors.
3. The fire bus response method based on dynamic priority and conflict avoidance according to claim 2, characterized in that, When the system is initialized or a detector is connected, the controller obtains the total number of detectors currently connected to the bus through address registration, scanning or configuration table. The total number of detectors is the total number of addresses Address_Total. The Unit_Offset value is a unit of time used for fine-tuning the order among detectors with the same state, ensuring that each detector has a unique response delay; Slot_Time is a unit of time used as the basic unit of time for backoff algorithm calculations.
4. The fire bus response method based on dynamic priority and conflict avoidance according to any one of claims 1-3, characterized in that, The model for determining the priority base value Priority_Base is as follows: Alarm status: Priority base value Priority_Base = 0 Fault status: Priority base value Priority_Base = Address_Total × Unit_Offset Normal state: Priority base value Priority_Base = Address_Total × Unit_Offset × 2.
5. The fire bus response method based on dynamic priority and conflict avoidance according to claim 4, characterized in that, The dynamic response delay time T_delay is calculated using the formula T_delay = Priority_Base + Address × Unit_Offset, where: Priority_Base is the priority base value; Address is the detector's own preset address; and Unit_Offset is the time unit used for fine-tuning the sorting among detectors in the same state. Alarm-state detectors respond first; under the same state, detectors with smaller addresses respond first.
6. The fire bus response method based on dynamic priority and conflict avoidance according to claim 5, characterized in that, The self-preset address is a unique address that each detector has in the system, which is set during installation through DIP switches, software configuration, or automatic allocation. The current status includes alarm, fault, and normal, which is determined autonomously by the detector based on sensor data; After receiving a query command, the detector starts an internal timer, with the duration set to the dynamic response delay time T_delay; The detector continuously monitors the bus level during the waiting period. If it detects a message transmission on the bus, it determines that the bus is "occupied"; otherwise, it is "idle". Bus idle determination: The bus is considered idle if it remains high for a continuous period of time or within a time slot (Slot_Time); the response message includes the detector address, status code, and checksum. The bus must not be occupied for more than the slot time (Slot_Time); the slot time (Slot_Time) is set to one message transmission time plus the signal propagation delay.
7. The fire bus response method based on dynamic priority and conflict avoidance according to any one of claims 1-3, 5, and 6, characterized in that, The backoff algorithm is a binary exponential backoff algorithm, and its specific steps include: The detector maintains an internal collision counter C and increments it by one each time a backoff is performed. Calculate the upper limit of the backoff window K = 2 based on the current conflict count C. C ; Randomly select an integer R from the range [1, K]. The additional waiting time T_backoff is calculated using the formula T_backoff = R × Slot_Time, where Slot_Time is the preset time unit for the time slot. After the additional waiting time has elapsed, attempt to send the response message again.
8. The fire bus response method based on dynamic priority and conflict avoidance according to claim 7, characterized in that, After broadcasting the query command, the controller switches to receiving mode and continuously listens to the fire bus. Upon receiving a response message, it parses the address and status fields in the message according to the preset communication protocol and updates the status record of the corresponding detector. The controller dynamically adjusts the base delay parameter in the next broadcast query command based on the historical communication success rate or bus load to optimize the overall system query cycle. The controller maintains a communication success rate statistics table. If the communication success rate is high and the load is light, the unit offset value Unit_Offset is reduced to shorten the query cycle; if conflicts are frequent and the load is heavy, the unit offset value Unit_Offset is increased to reduce the probability of collision.
9. A fire bus response system based on dynamic priority and conflict avoidance, utilizing the fire bus response method based on dynamic priority and conflict avoidance as described in any one of claims 1-8, characterized in that, include: A controller is used to broadcast query commands and receive and parse the detector's response messages; Multiple detectors are connected to the controller via a fire alarm bus; The detector has a built-in processing module for calculating the dynamic response delay based on its own address and real-time status, and has the function of listening to the fire bus and executing the backoff algorithm while waiting for the dynamic response delay. The controller's memory stores an algorithm program for adaptively adjusting the basic delay parameters in broadcast commands based on the bus communication quality.
10. The fire bus response system based on dynamic priority and conflict avoidance according to claim 9, characterized in that, The processing module includes an instruction parsing module, a status detection module, an address storage module, a dynamic response delay calculation module, a timer module, a bus monitoring module, a conflict handling module, and a message generation module. The instruction parsing module, the status detection module, and the address storage module are all connected to the dynamic response delay calculation module. The conflict handling module and the dynamic response delay calculation module are both connected to the timer module. The bus monitoring module is connected to both the conflict handling module and the message generation module. The instruction parsing module receives query instructions from the fire protection bus, parses out parameters such as the total number of addresses, unit offset value, and time slot time, and passes them to the dynamic response delay calculation module. The status detection module monitors the detector's own status in real time and transmits the status information to the dynamic response delay calculation module; The address storage module stores the detector's unique preset address, which is then used by the dynamic response delay calculation module. The dynamic response delay calculation module calculates the dynamic response delay time based on the received parameters, status information, and preset address, and then starts the timer module. The timer module starts timing during the delay period and works in conjunction with the bus monitoring module. The bus monitoring module continuously monitors the bus status during the waiting period. If it detects that the bus is occupied, it notifies the conflict handling module to execute the backoff algorithm. The conflict resolution module calculates the additional waiting time based on the backoff algorithm and restarts the timer module; When the bus is idle and the timer expires, the message generation module generates a response message and sends it to the bus. The controller includes an instruction generation module, a message parsing module, a status recording module, and a parameter dynamic adjustment module. The parameter dynamic adjustment module is connected to the instruction generation module, and the message parsing module is connected to both the status recording module and the parameter dynamic adjustment module. The instruction generation module generates query instructions based on the dynamic parameters provided by the parameter adjustment module and broadcasts them via the bus. The message parsing module receives and parses the response messages returned by the detector, extracts the address and status information, and passes it to the status recording module; The status logging module updates and stores the status information of each detector for system query and alarm purposes. The parameter dynamic adjustment module dynamically adjusts the parameters in the next query command based on the communication success rate and bus load status fed back by the message parsing module.
Citation Information
Patent Citations
Method for quickly querying equipment state of synchronous bus
CN102739489B