Master-slave switching control method and related device for rail vehicle pyrotechnic alarm system
By detecting detector faults and the status of the integrated power supply and communication dual-bus in the smoke and fire alarm system of rail vehicles, intelligent switching between master and slave devices is realized, solving the problem that the system cannot operate normally when the master device fails in the existing technology, and improving the accuracy of fault judgment and the reliability of operation of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CRRC CHANGCHUN RAILWAY VEHICLES CO LTD
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-30
AI Technical Summary
The existing master-slave switching trigger condition in the smoke and fire alarm system of rail vehicles is too simple. It cannot effectively switch when the master's own CAN communication is normal but other functions are malfunctioning. The slave cannot take over in time, which leads to the system failing to operate normally.
By detecting at least two detectors in a fault state and ensuring that the integrated power supply and communication dual bus is not open-circuited when the host is sending a heartbeat signal normally, a switching signal is sent to the slave to control the slave to switch to the working state. After the host fault is recovered, verification and back-switch operations are performed to ensure seamless system connection.
It enables timely takeover of the slave unit in the event of a master unit failure, avoiding monitoring interruption, improving the accuracy of fault diagnosis and the reliability of system operation, ensuring the continuity and effectiveness of fire monitoring of rail vehicles, and eliminating the need for additional hardware modules.
Smart Images

Figure CN122308043A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of fire monitoring technology for rail vehicles, and in particular to a master-slave switching control method and related devices in a smoke and fire alarm system for rail vehicles. Background Technology
[0002] The smoke and fire alarm system of rail vehicles is a core fire-fighting device to ensure the safe operation of trains. To improve system reliability, the smoke and fire alarm system is usually configured with a master unit and slave units for redundant control. Under normal operating conditions, the master unit is in working state, supplying power and communicating with all detectors used to detect smoke and fire signals, while the slave unit is in standby state, only receiving the master unit's heartbeat signal via the CAN bus. When the slave unit does not receive the heartbeat signal, it determines that the master unit has completely failed and switches to working state.
[0003] The existing technology has the following drawbacks: the master-slave switching trigger condition is singular, and it can only be triggered by the heartbeat signal. When the master's own CAN communication is normal (i.e. it can send a heartbeat signal to the slave) but other functions are malfunctioning, the slave cannot trigger the switching because it can receive the heartbeat signal, which affects the normal operation of the smoke and fire alarm system of the rail vehicle. Summary of the Invention
[0004] In view of the above problems, this application provides a master-slave switching control method and related device in a rail vehicle smoke and fire alarm system, so as to achieve the purpose of switching the slave to the working state even if the master itself is faulty, provided that the master can normally send heartbeat signals to the slave. The specific solution is as follows:
[0005] The first aspect of this application provides a master-slave switching control method for a smoke and fire alarm system for rail vehicles, applied to a master unit, including:
[0006] When the master unit is normally sending heartbeat signals to the slave unit, if at least two detectors are detected to be in a fault state and the power supply and communication integrated dual bus used to connect the detectors is in an open circuit state, a switching signal is sent to the slave unit; the switching signal is used to control the slave unit to switch to the working state.
[0007] Control the host to switch to standby mode.
[0008] One possible implementation also includes:
[0009] Obtain the on / off status of the integrated power supply and communication dual bus fed back by the slave device;
[0010] The operating status of each detector connected to the integrated power supply and communication bus is obtained.
[0011] In one possible implementation, after the step of controlling the host to switch to standby mode, the method further includes:
[0012] If the host recovers from the fault, it sends a fault recovery verification signal to the slave device; the fault recovery verification signal is used to control the slave device to detect the current on / off status of the integrated power supply and communication dual bus and the acquisition status of each detector.
[0013] If the current on / off state reported by the slave device is no open circuit, and the slave device has collected the collection status of each of the detectors, a switchback command is sent to the slave device; the switchback command is used to control the slave device to switch to standby mode.
[0014] The host is controlled to switch to the working state; the host in the working state is used to supply power to each of the detectors and to collect the working status of each detector.
[0015] In one possible implementation, the host and the slave interact with the heartbeat signal and the switching signal via a Controller Area Network (CAN) bus.
[0016] In one possible implementation, the bus interface of the host and the bus interface of the slave are bidirectionally electrically connected through the integrated power supply and communication bus, and each of the detectors is connected in parallel on the integrated power supply and communication bus.
[0017] The second aspect of this application provides a master-slave switching control method for a smoke and fire alarm system for rail vehicles, applied to the slave unit, including:
[0018] If the slave device receives a switching signal while normally receiving the heartbeat signal from the master device, it switches to the working state.
[0019] The switching signal is obtained by the host when it detects that at least two detectors are in a fault state and the power supply and communication integrated dual bus used to connect the detectors is in an open circuit state; the slave device in the working state is used to supply power to each of the detectors and collect the working status of each of the detectors respectively.
[0020] One possible implementation also includes:
[0021] If the voltage of the integrated power supply and communication bus is detected to be lower than a preset threshold when the slave device does not supply power to the detector, the on / off state of the integrated power supply and communication bus is determined to be open circuit.
[0022] If the voltage of the integrated power supply and communication bus is greater than or equal to the preset threshold when the slave device is not supplying power to the detector, the on / off state of the integrated power supply and communication bus is determined to be an open circuit state.
[0023] One possible implementation also includes:
[0024] When the host is in the working state and the slave is in the standby state, if the power supply and communication integrated dual bus is detected to be in the open circuit state, the slave is controlled to switch to the working state.
[0025] When the power supply and communication integrated dual bus is in the open circuit state, both the host and the slave are in the working state.
[0026] In one possible implementation, after the slave device switches to the working state, the following is also included:
[0027] At preset intervals, the slave device is controlled to stop supplying power to the detector and to detect the on / off status of the integrated power supply and communication dual bus;
[0028] If the power supply and communication integrated dual bus is in an open circuit state, the slave device resumes power supply to the detector.
[0029] If the power supply and communication integrated dual bus is in an open circuit state, switch to standby state.
[0030] A third aspect of this application provides a master-slave switching control device for a smoke and fire alarm system in a rail vehicle, applied to a master unit, comprising:
[0031] The first transmitting module is used to send a switching signal to the slave device when the master device is normally sending a heartbeat signal to the slave device, and if at least two detectors are detected to be in a fault state and the power supply and communication integrated two-wire bus used to connect the detectors is in an open circuit state; the switching signal is used to control the slave device to switch to the working state.
[0032] The first control module is used to control the host to switch to standby mode.
[0033] The fourth aspect of this application provides a master-slave switching control device for a smoke and fire alarm system for rail vehicles, applied to the slave unit, comprising:
[0034] The second control module is used to switch to the working state if a switching signal is received when the slave device is normally receiving the heartbeat signal sent by the master device.
[0035] The switching signal is obtained by the host when it detects that at least two detectors are in a fault state and the power supply and communication integrated dual bus used to connect the detectors is in an open circuit state; the slave device in the working state is used to supply power to each of the detectors and collect the working status of each of the detectors respectively.
[0036] The fifth aspect of this application provides a computer program product, including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement the master-slave switching control method in the rail vehicle smoke and fire alarm system described in the first aspect or any implementation thereof.
[0037] A sixth aspect of this application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0038] The memory is used to store computer programs;
[0039] The processor is used to execute the computer program so that the electronic device can implement the master-slave switching control method in the rail vehicle smoke and fire alarm system described in the first aspect or any implementation thereof.
[0040] The seventh aspect of this application provides a computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to perform a master-slave switching control method in a rail vehicle smoke and fire alarm system as described in the first aspect or any implementation thereof.
[0041] By employing the above technical solution, this application provides a master-slave switching control method in a rail vehicle smoke and fire alarm system. Under the premise that the master unit is sending a heartbeat signal normally, it uses the low-probability phenomenon of "at least two detectors failing simultaneously" as the core judgment criterion. Combined with the premise of "integrated power supply and communication dual-bus with no open circuit," it can accurately eliminate external causes of detector failure due to bus open circuits, uniquely pinpointing the root cause of the master unit's own failure. It then actively sends a switching signal to the slave unit to trigger the slave unit to take over the work, while simultaneously controlling itself to switch to standby mode. This completely avoids invalid fault reports caused by the master unit misjudging multiple detector failures due to its own failure, and achieves seamless connection between detector power supply and status acquisition through the timely takeover of the slave unit. It eliminates monitoring interruption problems caused by master unit failure, effectively improving the accuracy of fault judgment, operational reliability, and redundant control capabilities of the rail vehicle smoke and fire alarm system, ensuring the continuity and effectiveness of rail vehicle fire monitoring. Furthermore, it requires no additional hardware modules and can be implemented based on the existing master-slave architecture, balancing practicality and economy. Attached Figure Description
[0042] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0043] Figure 1 This application provides a schematic diagram of the architecture of a smoke and fire alarm system for rail vehicles.
[0044] Figure 2 A flowchart illustrating a master-slave switching control method in a smoke and fire alarm system for rail vehicles, provided in an embodiment of this application;
[0045] Figure 3 A flowchart illustrating a master-slave switching control method in a smoke and fire alarm system for rail vehicles, provided in an embodiment of this application;
[0046] Figure 4 A schematic diagram of the master-slave switching control device for a rail vehicle smoke and fire alarm system applied to a host, provided in an embodiment of this application;
[0047] Figure 5 A schematic diagram of the master-slave switching control device applied in a rail vehicle smoke and fire alarm system provided in this application embodiment;
[0048] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0049] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0050] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0051] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0052] This application can be applied to the fields of fire monitoring of rail vehicles, industrial fire alarm, or vehicle safety control. The following will introduce several application scenarios that have been implemented in the product, taking the rail vehicle smoke and fire alarm system as an example.
[0053] See Figure 1 , Figure 1 A schematic diagram of the architecture of a smoke and fire alarm system for rail vehicles is shown. The smoke and fire alarm system for rail vehicles may include: a host 101, a slave 102, a power and communication bus (PCB) 103, a CAN (Controller Area Network) bus 104, multiple detectors 105, and a TCMS (Train Control and Management System) system 106.
[0054] For example, the host 101 and the slave 102 are respectively located in the driver's cab at both ends of the train. The communication interface of the host 101 is connected to the communication interface of the slave 102 through the CAN bus 104; the bus interface of the host 101 is connected to the bus interface of the slave 102 through the PCB 103.
[0055] Multiple detectors 105 are connected in parallel on PCB 103.
[0056] Understandably, multiple detectors can be deployed in different carriages. For example, multiple detectors can be deployed in a trailer with a driver's cab (Tc), a motor car with a pantograph (Mp), or a motor car (M).
[0057] The detector refers to the smoke and fire detection terminal installed in each monitoring area of the rail vehicle. It is used to sense smoke, temperature and other smoke and fire signals, and to upload the working status through the integrated power supply and communication dual bus.
[0058] The host 101 includes, but is not limited to, a two-wire power supply module, a two-wire communication module, a CAN bus communication module, and an MVB (Multifunction Vehicle Bus) bus communication module. The two-wire power supply module supplies power to the detectors connected in parallel to PCB103; the two-wire communication module collects the acquisition status of the detectors connected in parallel to PCB103. The MVB bus communication module uploads the information collected by the host to the TCMS. The CAN bus communication module interacts with the CAN bus communication module of the slave 102.
[0059] Slave device 102 includes, but is not limited to: a two-wire power supply module, a two-wire communication module, a CAN bus communication module, a two-wire voltage detection module, and an MVB bus communication module. The functions of each module are the same as those in host device 101, and will not be repeated here. The two-wire voltage detection module is used to detect the voltage of PCB 103 when the slave device is not supplying power to the detector, i.e., when the two-wire power supply module is paused or not started. If the voltage of the PCB is lower than a preset threshold, such as 0, the continuity of the PCB is determined to be open circuit; if the voltage of the PCB (such as the rated voltage) is higher than or equal to the preset threshold, the continuity of the PCB is determined to be non-open circuit.
[0060] For example, the slave device 102 in standby mode has its two-wire power supply module and two-wire communication module disabled, but still has two-wire voltage detection function, CAN bus communication function and MVB bus communication function.
[0061] For example, the host 101 in standby mode has the functions of the two-bus power supply module and the two-bus communication module turned off, but still has the functions of CAN bus communication and MVB bus communication.
[0062] For example, the host 101 is equipped with an MVB bus communication interface, which enables bidirectional electrical and signal connection with the MVB bus communication node of the TCMS system via the MVB bus. When the host is in operation, the host 101 uploads information such as the host or slave device's operating mode (working state or standby state), detector acquisition status, and fire alarm signals to the TCMS system through the MVB bus communication interface.
[0063] For example, slave device 102 is equipped with an MVB bus communication interface. The MVB bus communication interface of slave device 102 achieves bidirectional electrical and signal connection with the MVB bus communication node of the TCMS system of the rail vehicle through the MVB bus.
[0064] For example, when the slave device is in the working state, the slave device 102 uploads the operating mode (working state or standby state), the acquisition status of the detector, smoke signal / fire alarm signal obtained based on smoke signal, etc. to the TCMS system through the MVB bus communication interface.
[0065] For example, when the slave device is in the working state, the slave device 102 sends the operating mode (working state or standby state) of the master or slave device, the acquisition status of the detector, the smoke signal / fire alarm signal obtained based on the smoke signal, etc. to the master device 101.
[0066] In summary, the PCB103, CAN bus104, and MVB bus in the rail vehicle smoke and fire alarm system form a three-layer independent bus architecture.
[0067] The master unit 101 can send a heartbeat signal to the slave unit 102 at set intervals via the CAN bus. If the slave unit 102 does not receive a heartbeat signal within the set interval, it considers the master unit 101 to have malfunctioned, and the slave unit 102 switches from standby mode to working mode. After the master unit 101 recovers, the slave unit 102 switches back to standby mode.
[0068] It is understandable that when the on / off state of PCB103 is open circuit, the entire PCB is divided into two sub-bus segments with no electrical connection. The communication link of the PCB is completely interrupted. If there is no CAN bus connection between the master and slave, the master and slave cannot communicate. Therefore, the PCB is equivalent to the terminal acquisition service link in the smoke and fire alarm system of the rail vehicle, and the CAN bus is equivalent to the pure communication link, that is, the redundant control link inside the system.
[0069] It is understandable that when the on / off state of PCB103 is open circuit, the entire PCB is divided into two sub-bus segments with no electrical connection. The master can supply power to the detectors connected in parallel in the sub-bus segment connected to itself and collect the detectors' data acquisition status. The slave can supply power to the detectors connected in parallel in the sub-bus segment connected to itself and collect the detectors' data acquisition status.
[0070] In existing technology, if the slave device does not receive a heartbeat signal from the master device for a set period of time, it will switch from standby mode to working mode. However, if the master device's CAN bus communication module is in normal condition, but other functions are in faulty condition, such as a faulty dual-bus communication module, meaning the master device cannot collect the acquisition status of multiple detectors, the master device can still send heartbeat signals to the slave device normally. The slave device will not switch to working mode, causing the rail vehicle smoke and fire alarm system to malfunction.
[0071] To address the aforementioned problems, this application provides a master-slave switching control method for a smoke and fire alarm system in a rail vehicle. The master-slave switching control method for a smoke and fire alarm system in a rail vehicle according to this application will be described in detail below with reference to the accompanying drawings.
[0072] Reference Figure 2 , Figure 2 This is a flowchart illustrating a master-slave switching control method in a smoke and fire alarm system for rail vehicles, as provided in an embodiment of this application. Figure 2 As shown in the embodiment of this application, a master-slave switching control method is provided in a smoke and fire alarm system for rail vehicles. This method can be applied to a master unit and may include steps S201 to S202. These steps are described in detail below.
[0073] Step S201: When the host is sending a heartbeat signal to the slave normally, if at least two detectors are detected to be in a fault state and the power supply and communication integrated dual bus used to connect the detectors is in an open circuit state, a switching signal is sent to the slave.
[0074] The switching signal is used to control the slave device to switch to the working state; the slave device in the working state is used to supply power to each of the detectors and to collect the working state of each of the detectors respectively.
[0075] For example, the heartbeat signal is a status confirmation signal that is periodically sent between the master and slave devices via the CAN bus, indicating that the master is in a normal power-on and normal operation state.
[0076] If the detector's acquisition status is faulty, it means that the host cannot establish normal communication with the detector through the PCB, or the detector itself reports a fault.
[0077] "At least two detectors are in a fault state" means that at the same time, the host detects that two or more detectors are simultaneously in a fault state. Two or more detectors being in a fault state simultaneously may be due to the following reasons: Reason 1, the PCB is disconnected, causing multiple detectors to be unable to communicate normally with the host; Reason 2, the host itself malfunctions, such as an abnormality in the host's two-bus communication module.
[0078] The second reason is explained in detail below. The possible causes of a fault in the host unit itself are as follows: unstable output voltage of the two-bus power supply module or partial abnormality in the data transmission and reception link of the two-bus communication module. It is understood that the host's two-bus power supply module is responsible for powering all detectors connected in parallel on the two-bus, and the two-bus communication module is responsible for data exchange with the detectors. If the output voltage of the two-bus power supply module is unstable or there is a partial abnormality in the data transmission and reception link of the two-bus communication module, some detectors may be in a faulty state.
[0079] The statement that "the host is sending heartbeat signals to the slave normally" indicates that the host has not failed as a whole, ruling out the possibility of the host completely crashing. The power supply and communication integrated dual bus used to connect the detectors is in an open-circuit state, ruling out the possibility that "multiple detectors cannot communicate normally with the host due to a broken PCB". If "at least two detectors are in a faulty state", since it is almost impossible for multiple detectors to fail simultaneously in reality, the fault is determined to be not in the detectors, but in the host itself.
[0080] For example, the on / off status of the integrated power supply and communication bus can be detected by the slave device and fed back to the master device.
[0081] The integrated power supply and communication dual-bus system differs from ordinary buses such as power supply buses (power supply only) and communication buses (communication only). If an ordinary bus is used, it is impossible to determine whether the cause of "detector failure" is an open circuit by simply checking the on / off status of a single bus. For example, an open circuit in the power supply bus will cause the detector to lose power, and an open circuit in the communication bus will cause the detector to fail to communicate.
[0082] Step S202: Control the host to switch to standby mode.
[0083] Since the host is in a faulty state, the host is taken out of operation.
[0084] This application provides a master-slave switching control method for a rail vehicle smoke and fire alarm system. Under the premise that the master unit is sending a heartbeat signal normally, it uses the low-probability phenomenon of "at least two detectors failing simultaneously" as the core judgment criterion. Combined with the premise of "integrated power supply and communication dual-bus with no open circuit," it can accurately eliminate external causes of detector failure due to bus open circuits, pinpointing only the root cause of the master unit's own failure. It then actively sends a switching signal to the slave unit to trigger the slave unit to take over the operation, while simultaneously controlling itself to switch to standby mode. This completely avoids invalid fault reports caused by the master unit misjudging multiple detector failures due to its own failure, and achieves seamless connection between detector power supply and status acquisition through the timely takeover of the slave unit. It eliminates monitoring interruptions caused by master unit failure, effectively improving the accuracy of fault diagnosis, operational reliability, and redundant control capabilities of the rail vehicle smoke and fire alarm system, ensuring the continuity and effectiveness of rail vehicle fire monitoring. Furthermore, it requires no additional hardware modules and can be implemented based on the existing master-slave architecture, balancing practicality and economy.
[0085] Understandably, after step S202, the fault existing in the host can be recovered. If the host fault is recovered, a fault recovery verification signal can be sent to the slave device via the CAN bus. After receiving the fault recovery verification signal, the slave device will feed back the current system status signal, providing a basis for the host to determine whether the switchback trigger condition is met. Specifically, this includes the following steps A1 to A3.
[0086] Step A1: If the fault of the host is recovered, a fault recovery verification signal is sent to the slave; the fault recovery verification signal is used to control the slave to detect the current on / off status of the integrated power supply and communication bus and the acquisition status of each detector.
[0087] The current system status signal includes the current on / off status and the acquisition status of each of the detectors.
[0088] Understandably, the core reason for the master-slave switchover triggered by the host in this application is a PCB disconnection or a fault in the host itself, such as a fault in the two-bus communication module or a fault in the two-bus power supply module. Therefore, the self-test judgment for fault recovery is specifically targeted at these two core modules. The host's periodic self-test is the only triggering condition for subsequent fault recovery verification and master-slave switchover procedures. Only when both two two-bus communication modules fail and the two-bus power supply modules are restored to normal operation does the host have the hardware foundation to take over the system again.
[0089] The host performs periodic self-tests. If it confirms that the host's two-bus communication module and two-bus power supply module have returned to normal, then its fault has been resolved. To ensure the safety and effectiveness of the switchback operation, the host can send a fault recovery verification signal to the slave device via the CAN bus. This signal triggers the slave device to detect and provide feedback on the on / off status of the PCB and the acquisition status of all detectors.
[0090] Step A2: If the current on / off state reported by the slave device is no open circuit state, and the slave device has collected the collection status of each of the detectors, a switchback command is sent to the slave device; the switchback command is used to control the slave device to switch to standby state.
[0091] The current on / off state is "no open circuit" which means that the slave device detects that the PCB has a normal rated voltage, determines that the PCB is intact, electrically connected, and has no breakpoint, that is, the PCB is in a normal closed state.
[0092] If the slave device can collect the acquisition status of each detector, it means that each detector is online and can communicate normally with the slave device.
[0093] Understandably, after the slave device switches to standby mode, it returns control to the master device.
[0094] Step A3: Control the host to switch to working state.
[0095] After confirming that the slave device has switched to standby mode and is no longer supplying power or communicating with the detectors on the PCB, the master device synchronously turns on its own two-bus power supply module and two-bus communication module, restores power supply to all detectors and the acquisition status of the detectors, resumes the master control function, and restores the entire rail vehicle smoke and fire alarm system to the default normal operation mode of master control and slave standby.
[0096] For example, the host and the slave interact with the heartbeat signal and the switching signal via a Controller Area Network (CAN) bus.
[0097] For example, the bus interface of the host and the bus interface of the slave are bidirectionally electrically connected through the integrated power supply and communication bus, and each of the detectors is connected in parallel on the integrated power supply and communication bus.
[0098] Understandably, when PCB103 is in an open-circuit state, the entire PCB is divided into two non-electrically connected sub-bus segments. The master device can supply power and communicate with the detectors connected in parallel within its sub-bus segment, and the slave device can also supply power and communicate with the detectors connected in parallel within its sub-bus segment. At this time, all detectors can function normally. However, when the PCB fault is resolved and it returns to an open-circuit state, both the master and slave devices still simultaneously acquire the detector's status and supply power to the detectors. Interference during communication or power supply causes all detectors to report an offline status or other faults.
[0099] To address the aforementioned problems, this application provides a master-slave switching control method for a smoke and fire alarm system in a rail vehicle. The master-slave switching control method for a smoke and fire alarm system in a rail vehicle according to this application will be described in detail below with reference to the accompanying drawings.
[0100] This application provides a master-slave switching control method in a smoke and fire alarm system for rail vehicles. This method can be applied to the slave unit and may include steps B1 to B4, which are described in detail below.
[0101] Step B1: When the host is in working state and the slave is in standby state, if the power supply and communication integrated dual bus is detected to be in an open circuit state, the slave is controlled to switch to working state.
[0102] When the power supply and communication integrated dual bus is in the open circuit state, both the host and the slave are in the working state.
[0103] It is understandable that when the on / off state of PCB103 is open circuit, the entire PCB is divided into two sub-bus segments with no electrical connection. The master can supply power and communicate with the detectors connected in parallel in the sub-bus segment connected to itself, and the slave can supply power and communicate with the detectors connected in parallel in the sub-bus segment connected to itself.
[0104] For example, the host's two-bus power supply module and two-bus communication module are connected in parallel with the detectors in the sub-bus segment connected to them for power supply and communication; the slave's two-bus power supply module and two-bus communication module are connected in parallel with the detectors in the sub-bus segment connected to them for power supply and communication.
[0105] Step B2: At preset intervals, control the slave device to stop supplying power to the detector and detect the on / off status of the integrated power supply and communication bus.
[0106] For example, controlling the slave device to stop supplying power to the detector can be done by controlling the two-bus power supply module in the slave device to pause power supply.
[0107] For example, if the voltage of the integrated power supply and communication bus is detected to be lower than a preset threshold when the slave device is not supplying power to the detector, the on / off state of the integrated power supply and communication bus is determined to be an open circuit state; if the voltage of the integrated power supply and communication bus is detected to be greater than or equal to the preset threshold when the slave device is not supplying power to the detector, the on / off state of the integrated power supply and communication bus is determined to be a non-open circuit state.
[0108] For example, if the PCB is in an open-circuit state, the voltage is the rated voltage; if the PCB is in an open-circuit state, the voltage is close to or equal to 0.
[0109] For example, the preset threshold can be determined based on the actual situation, and there is no limitation here.
[0110] For example, step S302 can be executed once every preset time interval.
[0111] Understandably, step B2 is crucial for accurately determining whether the open-circuit fault on the PCB has been eliminated, avoiding misjudgments of the PCB's continuity status due to the slave device's own power supply. The specific process is as follows: at preset intervals, the slave device shuts down its own two-bus power supply module. During this time, the detectors connected to the sub-bus segment connected to the slave device temporarily cease operation. Subsequently, the slave device activates its own two-bus voltage detection module to perform passive detection on the two buses (not relying on its own power supply, but only collecting the PCB voltage). By detecting whether the PCB has a rated voltage, the current continuity status of the PCB is determined (voltage indicates no open circuit, no voltage indicates an open circuit), providing the sole basis for determining whether to restore power or switch to standby mode.
[0112] Step B3: If the power supply and communication integrated dual bus is in an open circuit state, restore the slave device to continue supplying power to the detector.
[0113] After the slave device detects that the PCB is in an open circuit state through voltage detection, it immediately determines that "PCB fault has not been eliminated". If the power supply is continuously stopped at this time, the detectors connected to the sub-bus segment connected to the slave device will not work and will lose the ability to monitor smoke signals. Therefore, the slave device immediately restarts the two-bus power supply module to restore the rated voltage output to the PCB, restore the power supply to the detector, and ensure that the detector restarts and collects working status normally. At the same time, the slave device continues to maintain the working state and continuously detects the continuity of the PCB until the PCB fault is eliminated, so as to avoid system failure due to PCB open circuit.
[0114] Step B4: If the on / off state of the integrated power supply and communication bus is no open circuit, switch to standby state.
[0115] The purpose of step B4 is to achieve a seamless handover of system control and avoid power supply / communication conflicts between the master and slave devices. The specific process is as follows: After the slave device determines that the PCB is in a non-open-circuit state through its two-bus voltage detection module, it immediately determines that "the PCB has returned to normal and is ready for master takeover." Subsequently, the slave device shuts down its two-bus communication module (stopping communication with the detector to avoid communication conflicts with the master) and its two-bus power supply module (stopping power supply to the bus to avoid power supply conflicts with the master). After the above is completed, the slave device officially switches to standby mode. After switching to standby mode, the slave device only retains basic functions (such as PCB voltage detection, CAN communication, and MVB communication), waiting for subsequent instructions to ensure that the master can smoothly take over the power supply and communication of the PCB, restoring the system to the normal operating condition of "master working, slave in standby."
[0116] Please see Figure 3 A master-slave switching control method applied to a rail vehicle smoke and fire alarm system includes the following steps: S301: When the slave device is normally receiving the heartbeat signal sent by the master device, if a switching signal is received, it switches to the working state.
[0117] The switching signal is obtained by the host when it detects that at least two detectors are in a fault state and the power supply and communication integrated dual bus used to connect the detectors is in an open circuit state; the slave device in the working state is used to supply power to each of the detectors and collect the working status of each of the detectors respectively.
[0118] The above describes a master-slave switching control method in a rail vehicle smoke and fire alarm system provided by the embodiments of this application. The following will describe the apparatus for implementing the master-slave switching control method in the rail vehicle smoke and fire alarm system described above.
[0119] Please see Figure 4 , Figure 4 This is a schematic diagram of a master-slave switching control device applied in a rail vehicle smoke and fire alarm system, as provided in an embodiment of this application. Figure 4 As shown, the master-slave switching control device in the smoke and fire alarm system for rail vehicles includes:
[0120] The first transmitting module 401 is used to send a switching signal to the slave device when the master device is normally sending a heartbeat signal to the slave device, and if at least two detectors are detected to be in a fault state and the power supply and communication integrated two-wire bus used to connect the detectors is in an open circuit state; the switching signal is used to control the slave device to switch to the working state.
[0121] The first control module 402 is used to control the host to switch to standby mode.
[0122] In one alternative implementation, it also includes:
[0123] The first acquisition module is used to acquire the on / off status of the integrated power supply and communication dual bus fed back by the slave device;
[0124] The second acquisition module is used to acquire the working status of each of the detectors connected to the integrated power supply and communication bus.
[0125] In one alternative implementation, it also includes:
[0126] The second transmitting module is used to send a fault recovery verification signal to the slave device if the fault of the host device is recovered; the fault recovery verification signal is used to control the slave device to detect the current on / off status of the integrated power supply and communication bus and the acquisition status of each detector.
[0127] The third transmitting module is used to send a switchback command to the slave device if the current on / off state reported by the slave device is no open circuit state and the slave device has collected the collection status of each of the detectors; the switchback command is used to control the slave device to switch to standby state.
[0128] The third control module is used to control the host to switch to the working state; the host in the working state is used to supply power to each of the detectors and collect the working status of each of the detectors respectively.
[0129] In an alternative implementation, the host and the slave interact with the heartbeat signal and the switching signal via a Controller Area Network (CAN) bus.
[0130] In one optional implementation, the bus interface of the host and the bus interface of the slave are bidirectionally electrically connected through the integrated power supply and communication bus, and each of the detectors is connected in parallel on the integrated power supply and communication bus.
[0131] Please see Figure 5 , Figure 5 This is a schematic diagram of a master-slave switching control device applied in a rail vehicle smoke and fire alarm system, provided as an embodiment of this application. Figure 5 As shown, the master-slave switching control device in the smoke and fire alarm system for rail vehicles includes:
[0132] The second control module 501 is used to switch to the working state if a switching signal is received when the slave device is normally receiving the heartbeat signal sent by the master device.
[0133] The switching signal is obtained by the host when it detects that at least two detectors are in a fault state and the power supply and communication integrated dual bus used to connect the detectors is in an open circuit state; the slave device in the working state is used to supply power to each of the detectors and collect the working status of each of the detectors respectively.
[0134] In one alternative implementation, it also includes:
[0135] The first determining module is used to determine that the on / off state of the integrated power supply and communication bus is open circuit if the voltage of the integrated power supply and communication bus is detected to be lower than a preset threshold when the slave device does not supply power to the detector.
[0136] The second determining module is used to determine that the on / off state of the integrated power supply and communication bus is an open circuit state if the voltage of the integrated power supply and communication bus is greater than or equal to the preset threshold when the slave device does not supply power to the detector.
[0137] In one alternative implementation, it also includes:
[0138] The fourth control module is used to control the slave device to switch to the working state when the master device is in the working state and the slave device is in the standby state, if the power supply and communication integrated two-wire bus is detected to be in the open circuit state.
[0139] When the power supply and communication integrated dual bus is in the open circuit state, both the host and the slave are in the working state.
[0140] In one alternative implementation, it also includes:
[0141] The detection module is used to control the slave device to stop supplying power to the detector at preset intervals and to detect the on / off status of the integrated power supply and communication bus.
[0142] The recovery module is used to restore the slave device to continue supplying power to the detector if the on / off state of the integrated power supply and communication bus is open.
[0143] The switching module is used to switch to standby mode if the on / off state of the integrated power supply and communication bus is not open.
[0144] This application also provides an electronic device in its embodiments. (See reference...) Figure 6 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0145] like Figure 6 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. When the electronic device is powered on, the RAM 603 also stores various programs and data required for the operation of the electronic device. The processing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0146] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, memory cards, hard drives, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have instead.
[0147] This application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device enables the electronic device to implement any of the master-slave switching control methods provided in the rail vehicle smoke and fire alarm system of this application.
[0148] This application also provides a computer-readable storage medium carrying one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the master-slave switching control methods provided in the rail vehicle smoke and fire alarm system of this application.
[0149] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0150] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0151] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0152] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A master-slave switching control method in a smoke and fire alarm system for rail vehicles, characterized in that, Applied to the host, including: When the master unit is normally sending heartbeat signals to the slave unit, if at least two detectors are detected to be in a fault state and the power supply and communication integrated dual bus used to connect the detectors is in an open circuit state, a switching signal is sent to the slave unit; the switching signal is used to control the slave unit to switch to the working state. Control the host to switch to standby mode.
2. The master-slave switching control method in the rail vehicle smoke and fire alarm system according to claim 1, characterized in that, Also includes: Obtain the on / off status of the integrated power supply and communication dual bus fed back by the slave device; The operating status of each detector connected to the integrated power supply and communication bus is obtained.
3. The master-slave switching control method in the rail vehicle smoke and fire alarm system according to claim 1, characterized in that, After the step of controlling the host to switch to standby mode, the method further includes: If the host recovers from the fault, it sends a fault recovery verification signal to the slave device; the fault recovery verification signal is used to control the slave device to detect the current on / off status of the integrated power supply and communication dual bus and the acquisition status of each detector. If the current on / off state reported by the slave device is no open circuit, and the slave device has collected the collection status of each of the detectors, a switchback command is sent to the slave device; the switchback command is used to control the slave device to switch to standby mode. The host is controlled to switch to the working state; the host in the working state is used to supply power to each of the detectors and to collect the working status of each detector.
4. The master-slave switching control method in the rail vehicle smoke and fire alarm system according to any one of claims 1 to 3, characterized in that, The host and the slave interact with each other via the CAN bus of the controller local area network, which transmits the heartbeat signal and the switching signal.
5. The master-slave switching control method in the rail vehicle smoke and fire alarm system according to claim 4, characterized in that, The bus interface of the host and the bus interface of the slave are bidirectionally electrically connected through the integrated power supply and communication bus, and each of the detectors is connected in parallel on the integrated power supply and communication bus.
6. A master-slave switching control method in a smoke and fire alarm system for rail vehicles, characterized in that, Applied to slave devices, including: If the slave device receives a switching signal while normally receiving the heartbeat signal from the master device, it switches to the working state. The switching signal is obtained by the host when it detects that at least two detectors are in a fault state and the power supply and communication integrated dual bus used to connect the detectors is in an open circuit state; the slave device in the working state is used to supply power to each of the detectors and collect the working status of each of the detectors respectively.
7. The master-slave switching control method in the rail vehicle smoke and fire alarm system according to claim 6, characterized in that, Also includes: If the voltage of the integrated power supply and communication bus is detected to be lower than a preset threshold when the slave device does not supply power to the detector, the on / off state of the integrated power supply and communication bus is determined to be open circuit. If the voltage of the integrated power supply and communication bus is greater than or equal to the preset threshold when the slave device is not supplying power to the detector, the on / off state of the integrated power supply and communication bus is determined to be an open circuit state.
8. The master-slave switching control method in the rail vehicle smoke and fire alarm system according to claim 6 or 7, characterized in that, Also includes: When the host is in the working state and the slave is in the standby state, if the power supply and communication integrated dual bus is detected to be in the open circuit state, the slave is controlled to switch to the working state. When the power supply and communication integrated dual bus is in the open circuit state, both the host and the slave are in the working state.
9. The master-slave switching control method in the rail vehicle smoke and fire alarm system according to claim 8, characterized in that, After the slave device switches to the working state, the following is also included: At preset intervals, the slave device is controlled to stop supplying power to the detector and to detect the on / off status of the integrated power supply and communication dual bus; If the power supply and communication integrated dual bus is in an open circuit state, the slave device resumes power supply to the detector. If the power supply and communication integrated dual bus is in an open circuit state, switch to standby state.
10. A master-slave switching control device in a rail vehicle smoke and fire alarm system, characterized in that, Applied to the host, including: The first transmitting module is used to send a switching signal to the slave device when the master device is normally sending a heartbeat signal to the slave device, and if at least two detectors are detected to be in a fault state and the power supply and communication integrated two-wire bus used to connect the detectors is in an open circuit state; the switching signal is used to control the slave device to switch to the working state. The first control module is used to control the host to switch to standby mode.
11. A master-slave switching control device in a rail vehicle smoke and fire alarm system, characterized in that, Applied to slave devices, including: The second control module is used to switch to the working state if a switching signal is received when the slave device is normally receiving the heartbeat signal sent by the master device. The switching signal is obtained by the host when it detects that at least two detectors are in a fault state and the power supply and communication integrated dual bus used to connect the detectors is in an open circuit state; the slave device in the working state is used to supply power to each of the detectors and collect the working status of each of the detectors respectively.
12. A computer program product, characterized in that, The system includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the master-slave switching control method in a rail vehicle smoke and fire alarm system as described in any one of claims 1 to 9.
13. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the master-slave switching control method in the rail vehicle smoke and fire alarm system as described in any one of claims 1 to 9.
14. A computer storage medium, characterized in that, The storage medium carries one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the master-slave switching control method in the rail vehicle smoke and fire alarm system as described in any one of claims 1 to 9.