Networking method and device of subway fire-fighting all-in-one machine, storage medium and program product

By adopting a master-slave networking configuration with TCP long connections in the subway fire protection system, the complexity and instability of the integrated fire protection unit networking problem has been solved, achieving rapid networking and system stability, and simplifying the operation of subway fire protection personnel.

CN120880894APending Publication Date: 2025-10-31BEIJING URBAN CONSTR INTELLIGENT CONTROL TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511192971.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Modifying the networking function of the integrated fire protection unit in the subway fire protection system is complex and the system is unstable, making it difficult to achieve rapid networking.

Method used

By obtaining the master-slave networking configuration, the networking between fire protection integrated machines is realized using TCP long connections. The master and slave establish and maintain the first TCP long connection to receive slave information, and the slave establishes and maintains the second TCP long connection to send local information. The networking roles and slave configurations are configured through the human-machine interface.

Benefits of technology

It enables rapid networking between integrated fire protection units, improves the convenience and stability of the network function of the subway fire protection system, and simplifies the operation process for subway fire protection personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120880894A_ABST
    Figure CN120880894A_ABST
Patent Text Reader

Abstract

The invention discloses a networking method and device of a subway fire-fighting all-in-one machine, a storage medium and a program product, relates to the technical field of software, is applied to a first fire-fighting all-in-one machine in a subway fire-fighting system, and obtains master-slave networking configuration of the first fire-fighting all-in-one machine, the networking role is a host or a slave, and when the networking role is the host, the master-slave networking configuration further comprises slave configuration; if the networking role is a host, establishing and maintaining a first TCP long connection with a second fire-fighting all-in-one machine as a slave according to slave configuration; receiving working information of the second fire-fighting all-in-one machine based on the first TCP long connection; if the networking role is a slave, establishing and maintaining a second TCP long connection with a third fire-fighting all-in-one machine as a host; and sending the working information of the machine to a third fire-fighting all-in-one machine based on the second TCP long connection. According to the invention, networking of TCP long connection between fire-fighting all-in-one machines is realized through master-slave networking configuration, and the purpose of rapid networking is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of software technology, and in particular to a networking method, device, storage medium and program product for an integrated subway fire protection system. Background Technology

[0002] In subway fire protection systems, a single subway station, especially a large transfer station, typically requires three or more integrated fire suppression systems to operate simultaneously. Additionally, if the subway fire protection system has a central fire control center, the operational information from the integrated fire suppression systems at different subway stations needs to be aggregated and transmitted to the central fire control center.

[0003] In subway fire protection systems, a master-slave network of integrated fire protection units is often used, with the slave unit sending operational information to the master unit, which then reports to its superior unit. However, in practice, this often presents challenges such as complex modifications to the network functionality and system instability. Summary of the Invention

[0004] In view of the above problems, this application provides a networking method, device, storage medium, and program product for integrated subway fire suppression systems to achieve rapid networking of integrated subway fire suppression systems. The specific solution is as follows:

[0005] The first aspect of this application provides a networking method for an integrated fire suppression system in a subway system. This networking method is applied to a subway fire suppression system, which includes multiple integrated fire suppression systems. The networking method is applied to a first integrated fire suppression system among the multiple integrated fire suppression systems. The networking method includes:

[0006] Obtain the master-slave network configuration of the local machine. The master-slave network configuration includes network roles. The network role is a master or a slave. When the network role is a master, the master-slave network configuration also includes slave configuration.

[0007] If the network role is the host, a first transmission control protocol TCP long connection is established and maintained with the second fire-fighting integrated machine as a slave according to the slave configuration; and the working information of the second fire-fighting integrated machine is received based on the first TCP long connection.

[0008] If the network role is slave, a second TCP long connection is established and maintained with the third fire protection integrated machine as the master; the working information of the local machine is sent to the third fire protection integrated machine based on the second TCP long connection. The second fire protection integrated machine and the third fire protection integrated machine are different fire protection integrated machines.

[0009] In one possible implementation, obtaining the master-slave network configuration of the local machine includes:

[0010] Obtain the network function status of the local machine based on the human-machine interface;

[0011] If the networking function is in the off state, disable the communication function of this machine;

[0012] If the networking function is enabled, the networking role is obtained based on the human-machine interface, and if the networking role is the master, the slave configuration is obtained based on the human-machine interface.

[0013] In one possible implementation, the slave configuration includes the controller number and Internet Protocol (IP) address of the second integrated fire protection unit;

[0014] The step of establishing and maintaining a first transmission control protocol TCP long connection with the second fire-fighting integrated machine, which is a slave, according to the slave configuration includes:

[0015] Traverse the controller numbers in the slave configuration to determine the target second integrated fire protection unit to be connected;

[0016] The first TCP long connection is established with the target second fire-fighting integrated machine based on the IP address of the target second fire-fighting integrated machine;

[0017] If the first TCP long connection is successfully established, a first network subscription frame is sent to the target second fire-fighting integrated machine based on the first TCP long connection;

[0018] If the first network subscription frame is successfully sent and the first subscription response frame of the target second fire-fighting integrated machine is received, the first heartbeat frame is sent to the target second fire-fighting integrated machine at regular intervals based on the first TCP long connection;

[0019] If the first heartbeat frame is successfully sent and the first heartbeat response frame of the target second fire-fighting integrated machine is received, return to the step of periodically sending the first heartbeat frame to the target second fire-fighting integrated machine based on the first TCP long connection.

[0020] In one possible implementation, the step of establishing and maintaining a first transmission control protocol TCP long connection with the second fire-fighting integrated machine, which is a slave, according to the slave configuration, further includes:

[0021] If the first TCP long connection fails to be established, the controller number of the target second fire-fighting integrated machine is added to the TCP reconnection queue.

[0022] In one possible implementation, the step of establishing and maintaining a first transmission control protocol TCP long connection with the second fire-fighting integrated machine, which is a slave, according to the slave configuration, further includes:

[0023] If the first network subscription frame fails to be sent, or if the first subscription response frame of the target second fire-fighting integrated machine is not received, the process returns to the step of sending the first network subscription frame to the target second fire-fighting integrated machine based on the first TCP long connection. When the number of times the first network subscription frame is sent reaches the corresponding first upper limit, the first TCP long connection is disconnected, and the controller number of the target second fire-fighting integrated machine is added to the TCP reconnection queue.

[0024] In one possible implementation, the step of establishing and maintaining a first transmission control protocol TCP long connection with the second fire-fighting integrated machine, which is a slave, according to the slave configuration, further includes:

[0025] If the first heartbeat frame fails to be sent, or if the first heartbeat response frame of the target second fire-fighting integrated machine is not received, the process returns to the step of periodically sending the first heartbeat frame to the target second fire-fighting integrated machine based on the first TCP long connection. When the number of times the first heartbeat frame is sent reaches the corresponding second upper limit, the first TCP long connection is disconnected, and the controller number of the target second fire-fighting integrated machine is added to the TCP reconnection queue.

[0026] In one possible implementation, the step of establishing and maintaining a first transmission control protocol TCP long connection with the second fire-fighting integrated machine, which is a slave, according to the slave configuration, further includes:

[0027] The controller number in the TCP reconnection queue is periodically traversed to determine the target second fire protection integrated machine to be connected to, and then the step of establishing the first TCP long connection with the target second fire protection integrated machine based on the IP address of the target second fire protection integrated machine is returned to be executed.

[0028] If the first heartbeat frame is successfully sent and the first heartbeat response frame of the target second fire-fighting integrated machine is received, the controller code of the target second fire-fighting integrated machine is deleted from the TCP reconnection queue.

[0029] In one possible implementation, the step of establishing and maintaining a first transmission control protocol TCP long connection with the second fire-fighting integrated machine, which is a slave, according to the slave configuration, further includes:

[0030] Monitor the operating status of the machine;

[0031] If the running status is a restart status, return to the step of traversing the controller numbers in the slave configuration to determine the target second fire protection integrated machine to be connected.

[0032] In one possible implementation, establishing and maintaining a second TCP long connection with the third integrated fire protection unit, which acts as the host, includes:

[0033] If the third fire-fighting integrated machine receives a second network subscription frame sent based on the second TCP long connection, retrieve the host whitelist of the local machine;

[0034] If the third fire-fighting integrated machine is in the host whitelist, a second subscription response frame is sent to the third fire-fighting integrated machine based on the second TCP long connection;

[0035] If a second heartbeat frame is received from the third fire-fighting integrated unit based on the second TCP long connection, a second heartbeat response frame is sent to the third fire-fighting integrated unit based on the second TCP long connection.

[0036] A second aspect of this application provides a networking device for an integrated fire suppression system in a subway system. The networking device is applied to a subway fire suppression system comprising multiple integrated fire suppression systems. The networking device is applied to a first integrated fire suppression system among the multiple integrated fire suppression systems. The networking device includes:

[0037] The configuration acquisition module is used to acquire the master-slave network configuration of the local machine. The master-slave network configuration includes network roles. The network role is a master or a slave. When the network role is a master, the master-slave network configuration also includes slave configuration.

[0038] The master-slave networking module is used to establish and maintain a first transmission control protocol TCP long connection with the second fire-fighting integrated machine as a slave, according to the slave configuration, if the networking role is master; to receive the working information of the second fire-fighting integrated machine based on the first TCP long connection; if the networking role is slave, to establish and maintain a second TCP long connection with the third fire-fighting integrated machine as master; and to send the working information of the machine to the third fire-fighting integrated machine based on the second TCP long connection, wherein the second fire-fighting integrated machine and the third fire-fighting integrated machine are different fire-fighting integrated machines.

[0039] A third aspect of this application provides a computer program product, including computer-readable instructions, which, when executed on a fire-fighting integrated machine, cause the fire-fighting integrated machine to implement the networking method of the subway fire-fighting integrated machine described in the first aspect or any implementation thereof.

[0040] The fourth aspect of this application provides a computer storage medium carrying one or more computer programs. When the one or more computer programs are executed by a fire-fighting integrated machine, the fire-fighting integrated machine can realize the networking method of the subway fire-fighting integrated machine described in the first aspect or any implementation thereof.

[0041] A fifth aspect of this application provides an integrated fire protection unit, comprising at least one computing board and a memory connected to the computing board, wherein:

[0042] The memory is used to store computer programs;

[0043] The computing board is used to execute the computer program so that the integrated fire protection unit can realize the networking method of the integrated subway fire protection unit of the first aspect or any implementation of the first aspect.

[0044] By utilizing the above technical solution, this application provides a networking method, device, storage medium, and program product for an integrated fire protection unit in a subway system. Applied to a first integrated fire protection unit in a subway fire protection system, it obtains its own master-slave networking configuration. This configuration includes networking roles, which can be either master or slave. When the role is master, the configuration also includes slave configuration. If the role is master, a first TCP long connection is established and maintained with a second integrated fire protection unit acting as a slave, based on the slave configuration. The system receives operational information from the second integrated fire protection unit based on this first TCP long connection. If the role is slave, a second TCP long connection is established and maintained with a third integrated fire protection unit acting as a master, based on this second TCP long connection. The system sends its own operational information to the third integrated fire protection unit via the second TCP long connection. The second and third integrated fire protection units are different fire protection units. This application achieves rapid networking between integrated fire protection units via TCP long connections through master-slave networking configuration, improving the convenience and stability of the networking function in the subway fire protection system. Attached Figure Description

[0045] 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.

[0046] Figure 1 A system structure diagram of a subway fire protection system provided in this application embodiment;

[0047] Figure 2 A flowchart illustrating a networking method for an integrated subway fire suppression system provided in this application embodiment;

[0048] Figure 3 A partial flowchart illustrating a networking method for an integrated subway fire suppression system provided in this application embodiment;

[0049] Figure 4 Another part of the flowchart of a networking method for an integrated subway fire fighting machine provided in the embodiments of this application;

[0050] Figure 5Another part of the flowchart of a networking method for an integrated subway fire fighting machine provided in the embodiments of this application;

[0051] Figure 6 A schematic diagram of the networking device for an integrated subway fire fighting machine provided in this application embodiment;

[0052] Figure 7 This is a structural schematic diagram of an integrated fire protection unit provided in an embodiment of this application. Detailed Implementation

[0053] 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.

[0054] 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.

[0055] 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.

[0056] See Figure 1 , Figure 1 This is a system structure diagram of a subway fire protection system provided as an embodiment of this application. Figure 1 As shown in the embodiment of this application, the subway fire protection system includes multiple integrated fire protection units. Figure 1 The example uses three integrated fire protection units. A single integrated fire protection unit mainly includes a computing board and a human machine interface (HMI), and connects to corresponding subway fire protection peripherals, enabling information display and control of the fire protection peripherals.

[0057] In this embodiment, the computing board is responsible for processing information from fire protection peripherals and uploading it to the human-machine interface (HMI) for display. It also receives commands from the HMI and connects to other integrated fire protection units to synchronize slave information with the master unit. The HMI displays the processed and uploaded information from the fire protection peripherals to subway firefighters. Simultaneously, subway firefighters can input master-slave network configurations through the HMI. It should be noted that the networking method for an integrated subway fire protection unit provided in this embodiment can be executed by the computing board.

[0058] In practical applications, before setting up the network for the integrated fire protection device, subway firefighters must successfully log in with an account and password that meet the operating permissions before they can input the master-slave network configuration into the human-machine interface of the integrated fire protection device.

[0059] It should be noted that fire protection peripherals mainly include smoke detectors, heat detectors, manual fire alarm buttons, input / output modules, isolation modules, and audible / visual alarms. In a subway fire protection system, when an abnormality occurs in a fire protection peripheral, such as a smoke detector detecting smoke exceeding its threshold, or a communication failure in the input / output module due to aging internal wiring, the peripheral will first report the relevant information to the integrated fire protection unit it is connected to. If the integrated fire protection unit is the master unit, it does not need to send information from the fire protection peripherals to slave units; however, if the integrated fire protection unit is a slave unit, after receiving the information reported by the master unit, it will synchronously send the information to the other integrated fire protection unit acting as its master unit. The master integrated fire protection unit can control the fire protection peripherals of the slave integrated fire protection units. Therefore, the networking of integrated fire protection units in the subway is crucial to the stability and ease of use of the subway fire protection system.

[0060] See Figure 2 , Figure 2 This is a flowchart illustrating a networking method for an integrated subway fire suppression system provided in an embodiment of this application. Figure 2 As shown in the embodiment of this application, a networking method for an integrated fire protection unit in a subway is provided. This networking method is applied to a subway fire protection system, which includes multiple integrated fire protection units. The networking method is applied to the first integrated fire protection unit (hereinafter referred to as integrated fire protection unit A) among the multiple integrated fire protection units, and may include steps S101 to S103. These steps are described in detail below.

[0061] S101, obtain the master-slave network configuration of the local machine. The master-slave network configuration includes the network role. The network role is either master or slave. When the network role is master, the master-slave network configuration also includes the slave configuration.

[0062] In this embodiment of the application, the subway fire-fighting integrated machine A can obtain the master-slave network configuration of the machine, which includes at least the network role (master or slave). If the network role is master, the master-slave network configuration also includes the slave configuration (specifically specifying the fire-fighting integrated machine as the slave). Conversely, if the network role is slave, it is not necessary to specify the fire-fighting integrated machine as the master.

[0063] In one possible implementation, subway firefighters can input master-slave network configuration information into the integrated fire-fighting unit A via its HMI (Human Machine Interface). See also... Figure 3 , Figure 3 This is a partial flowchart illustrating a networking method for an integrated subway fire suppression system provided in an embodiment of this application. Figure 3 As shown in the embodiment of this application, a networking method for an integrated subway fire fighting machine is provided. Step S101, "obtaining the master-slave networking configuration of the local machine", may include steps S201 to S203. These steps are described in detail below.

[0064] S201, obtain the networking status of the local machine based on the human-machine interface.

[0065] S202, If the networking function is off, disable the communication function of this machine.

[0066] S203, if the networking function is enabled, obtain the networking role based on the human-machine interface, and if the networking role is the master, obtain the slave configuration based on the human-machine interface.

[0067] In this embodiment, when subway firefighters input master-slave networking configuration into the human-machine interface of the integrated fire protection unit A, they can specify the networking function status of the integrated fire protection unit A by turning the networking function switch on or off. After turning on the networking function switch, the subway firefighters can further specify whether it is a master or a slave, and further specify a slave for the master. In response, the integrated fire protection unit A obtains its own networking function status by detecting the networking function switch, which is either on or off. If the networking function status is off, the integrated fire protection unit A disables its own communication function, that is, disconnects its communication with other integrated fire protection units, and thus disables the networking function. If the networking function status is on, the integrated fire protection unit A further obtains the networking role, and if the networking role is master, it obtains the slave configuration (specifically specifying the integrated fire protection unit to be used as a slave).

[0068] In other words, in this embodiment of the application, subway firefighters do not need to input host configuration for the fire-fighting integrated machine A, which is a slave machine. That is, when the fire-fighting integrated machine A is a slave machine, it can respond to the networking requirements of any fire-fighting integrated machine and can be a slave machine of any fire-fighting integrated machine.

[0069] It should be noted that if the integrated fire protection unit is the master unit, it does not need to send information about fire protection peripherals to the slave units; however, if the integrated fire protection unit is a slave unit, it will simultaneously send the information reported by the other integrated fire protection unit, which is its master unit, to the other integrated fire protection unit. The master integrated fire protection unit can control the fire protection peripherals of the slave integrated fire protection units. Therefore, the networking of integrated fire protection units in the subway is crucial to the stability and ease of use of the subway fire protection system.

[0070] S102, if the network role is the host, establish and maintain a first transmission control protocol TCP long connection with the second fire protection integrated machine as the slave according to the slave configuration; receive the working information of the second fire protection integrated machine based on the first TCP long connection.

[0071] In this embodiment of the application, if the networking role of the fire protection integrated machine A is the host, then the second fire protection integrated machine (hereinafter referred to as fire protection integrated machine B) is determined as its slave according to the slave configuration, and a TCP (Transmission Control Protocol) long connection (i.e. the first TCP long connection) is established and maintained with the fire protection integrated machine B, and the working information of the fire protection integrated machine B (including the fire protection peripheral information of the fire protection integrated machine B) is received based on the first TCP long connection.

[0072] In one possible implementation, the host can establish and maintain a long-lived TCP connection with the slave via network subscription frames and heartbeat frames. See also Figure 4 , Figure 4 This is another schematic flowchart illustrating a networking method for an integrated subway fire suppression system provided in this application embodiment. (See attached diagram.) Figure 4 As shown in the embodiment of this application, a networking method for a subway fire-fighting integrated machine is provided. The slave configuration includes the controller number and IP (Internet Protocol) address of the second fire-fighting integrated machine. Step S102, "establishing and maintaining a first transmission control protocol TCP long connection with the second fire-fighting integrated machine as a slave according to the slave configuration", may include steps S301 to S305. These steps are described in detail below.

[0073] S301, traverse the controller numbers in the slave configuration to determine the target second fire protection integrated machine to be connected.

[0074] In this embodiment, the fire protection integrated machine A traverses the controller numbers in its slave configuration and takes the fire protection integrated machine B corresponding to the currently traversed controller number as the target second fire protection integrated machine to be connected (hereinafter referred to as fire protection integrated machine BX).

[0075] S302, establish a first TCP long connection with the target second fire protection integrated unit based on the IP address of the target second fire protection integrated unit.

[0076] In this embodiment, based on the IP address of the integrated fire protection unit BX, integrated fire protection unit A can establish a first TCP long connection with integrated fire protection unit BX. Integrated fire protection unit A can subsequently obtain the establishment result of the first TCP long connection.

[0077] S303, if the first TCP long connection is successfully established, send the first network subscription frame to the target second fire protection integrated machine based on the first TCP long connection.

[0078] In this embodiment, if the first TCP long connection is successfully established, the fire protection integrated unit A sends a network subscription frame (i.e., the first network subscription frame) to the fire protection integrated unit BX based on the first TCP long connection. The fire protection integrated unit A can subsequently obtain the sending result of the first network subscription frame, as well as the subscription response frame (i.e., the first subscription response frame) returned by the fire protection integrated unit BX in response to the first network subscription frame.

[0079] Additionally, if the first TCP long connection fails to be established, the controller number of the target second fire-fighting integrated unit is added to the TCP reconnection queue. Specifically, in this embodiment, if the first TCP long connection fails to be established (e.g., the fire-fighting integrated unit BX is not powered on or the network is disconnected), the fire-fighting integrated unit A adds the controller number of the fire-fighting integrated unit BX to the TCP reconnection queue.

[0080] S304, if the first network subscription frame is successfully sent and the first subscription response frame of the target second fire protection integrated machine is received, the first heartbeat frame is sent to the target second fire protection integrated machine at regular intervals based on the first TCP long connection.

[0081] In this embodiment, if the first network subscription frame is successfully sent and the first subscription response frame of the fire protection integrated machine BX is received, the fire protection integrated machine A sends a heartbeat frame (i.e., the first heartbeat frame) to the fire protection integrated machine BX based on the first TCP long connection. The fire protection integrated machine A can subsequently obtain the sending result of the first heartbeat frame and the heartbeat response frame (i.e., the first heartbeat response frame) returned by the fire protection integrated machine BX in response to the first heartbeat frame.

[0082] Furthermore, if the first network subscription frame fails to be sent or the first subscription response frame of the target second fire-fighting integrated machine is not received, the process returns to step S303, which involves "sending the first network subscription frame to the target second fire-fighting integrated machine based on the first TCP long connection." When the number of times the first network subscription frame is sent reaches the corresponding first upper limit, the first TCP long connection is disconnected, and the controller number of the target second fire-fighting integrated machine is added to the TCP reconnection queue. Specifically, in this embodiment, if the first network subscription frame fails to be sent or the first subscription response frame of the fire-fighting integrated machine BX is not received, the fire-fighting integrated machine A attempts to send the first network subscription frame again, returning to step S304, which involves "sending the first network subscription frame to the target second fire-fighting integrated machine based on the first TCP long connection." Simultaneously, the number of times the first network subscription frame is sent is counted. If it reaches the corresponding first upper limit (e.g., 3 times), it is considered that the first TCP long connection with the fire-fighting integrated machine BX has been disconnected. The first TCP long connection is actively disconnected, and the controller number of the fire-fighting integrated machine BX is added to the TCP reconnection queue.

[0083] S305, if the first heartbeat frame is successfully sent and the first heartbeat response frame of the target second fire protection integrated machine is received, return to the execution of step S304, which is "sending the first heartbeat frame to the target second fire protection integrated machine at regular intervals based on the first TCP long connection".

[0084] In this embodiment, if the first heartbeat frame is successfully sent and a first heartbeat response frame is received from the fire-fighting integrated unit BX, the fire-fighting integrated unit A returns to step S304, "sending the first heartbeat frame to the target second fire-fighting integrated unit based on the first TCP long-term connection," thereby maintaining the first TCP long connection with the fire-fighting integrated unit BX. Of course, the fire-fighting integrated unit can also continue to traverse the controller numbers in the slave configuration to re-determine the target second fire-fighting integrated unit.

[0085] Furthermore, if the first heartbeat frame fails to be sent or the first heartbeat response frame from the target second fire-fighting integrated unit is not received, the process returns to step S304, which involves periodically sending the first heartbeat frame to the target second fire-fighting integrated unit based on the first TCP long connection. When the number of times the first heartbeat frame is sent reaches the corresponding second upper limit, the first TCP long connection is disconnected, and the controller number of the target second fire-fighting integrated unit is added to the TCP reconnection queue. Specifically, in this embodiment, if the first heartbeat frame fails to be sent or the first heartbeat response frame from the fire-fighting integrated unit BX is not received, the fire-fighting integrated unit A attempts to send the first heartbeat frame again, returning to step S306, which involves periodically sending the first heartbeat frame to the target second fire-fighting integrated unit. Simultaneously, the number of times the first heartbeat frame is sent is counted. If the number reaches the corresponding second upper limit (e.g., 3 times), it is considered that the first TCP long connection with the fire-fighting integrated unit BX has been disconnected, and the first TCP long connection is actively disconnected, and the controller number of the fire-fighting integrated unit BX is added to the TCP reconnection queue.

[0086] It should be noted that if the first heartbeat frame is successfully sent, but the first heartbeat response frame is not received multiple times in a row, it is considered that there is a deviation in the network image or the information sent by the slave device. The fire-fighting integrated machine A can report this situation to alert the subway fire-fighting personnel.

[0087] Based on this, if the host machine restarts during operation, a new TCP long connection can be established and maintained with the slave machine. In this regard, the networking method for a subway fire-fighting integrated machine provided in this application embodiment, wherein step S102 "establishing and maintaining a first transmission control protocol TCP long connection with the second fire-fighting integrated machine as a slave machine according to the slave machine configuration" may further include the following steps:

[0088] Monitor the running status of the machine; if the running status is restarted, return to step S301.

[0089] In this embodiment, the fire protection integrated machine A can monitor the operating status of the machine. If a restart, disconnection, power failure or other situation occurs, causing a restart and entering the restart state, it returns to step S301 to re-establish and maintain the first TCP long connection with the fire protection integrated machine as the slave machine.

[0090] In one possible implementation, a self-detection and reconnection mechanism can ensure a stable and accurate connection between the host and slave devices. In this regard, the networking method for a subway fire-fighting integrated machine provided in this application embodiment further includes the following steps:

[0091] The controller number in the TCP reconnection queue is periodically traversed to determine the target second fire protection integrated machine to be connected, and the process returns to step S302. If the first heartbeat frame is successfully sent and the first heartbeat response frame of the target second fire protection integrated machine is received, the controller code of the target second fire protection integrated machine is deleted from the TCP reconnection queue.

[0092] In this embodiment, the fire protection integrated machine A traverses the controller numbers in the TCP reconnection queue to determine the target second fire protection integrated machine to be connected, and then returns to step S302. If the first heartbeat frame is successfully sent and the first heartbeat response frame of the target second fire protection integrated machine is received, the controller code of the target second fire protection integrated machine is deleted from the TCP reconnection queue.

[0093] Furthermore, if the first long TCP connection establishment fails, the controller code of the target second fire protection integrated unit will remain in the TCP reconnection queue. If the first network subscription frame fails to be sent, or if the first subscription response frame from the target second fire protection integrated unit is not received, the process returns to step S304, "sending the first network subscription frame to the target second fire protection integrated unit based on the first long TCP connection." When the number of times the first network subscription frame is sent reaches the corresponding first upper limit, the first long TCP connection is disconnected, and the controller number of the target second fire protection integrated unit will remain in the TCP reconnection queue. If the first heartbeat frame fails, or if the first heartbeat response frame from the target second fire protection integrated unit is not received, the process returns to step S306, "sending the first heartbeat frame to the target second fire protection integrated unit based on the first long timed TCP connection." When the number of times the first heartbeat frame is sent reaches the second upper limit, the first long TCP connection is disconnected, and the controller number of the target second fire protection integrated unit will remain in the TCP reconnection queue.

[0094] S103, if the network role is slave, establish and maintain a second TCP long connection with the third fire protection integrated machine as the master; send the local working information to the third fire protection integrated machine based on the second TCP long connection. The second fire protection integrated machine and the third fire protection integrated machine are different fire protection integrated machines.

[0095] In this embodiment of the application, if the networking role of the fire protection integrated machine A is a slave machine, then the fire protection integrated machine (hereinafter referred to as fire protection integrated machine C) that subscribes to it can be used as the master machine, and a TCP long connection (i.e., the second TCP long connection) can be established and maintained with it. Based on the second TCP long connection, the working information of the machine (including the information of the machine's fire protection peripherals) is sent to the fire protection integrated machine C.

[0096] In one possible implementation, the slave device can select the master device using a whitelist. See also Figure 5 , Figure 5This is another schematic flowchart illustrating a networking method for an integrated subway fire suppression system provided in this application embodiment. (See attached diagram.) Figure 5 As shown in the embodiment of this application, a networking method for an integrated fire-fighting machine in a subway is provided. In step S103, "establishing and maintaining a second TCP long connection with the third integrated fire-fighting machine as the host" can include steps S401 to S403. These steps are described in detail below.

[0097] S401: If a second network subscription frame is received from the third fire protection integrated unit based on the second TCP long connection, the host whitelist of the local machine is retrieved.

[0098] In this embodiment, subway firefighters can configure a host whitelist for the integrated fire protection unit A according to the actual scenario. The whitelist can contain the controller number of the host. If the integrated fire protection unit A receives a network subscription frame (i.e., the second network subscription frame) sent by the integrated fire protection unit C based on the second TCP long connection, it will retrieve its own host whitelist.

[0099] S402, if the third fire protection integrated unit is in the host whitelist, send a second subscription response frame to the third fire protection integrated unit based on the second TCP long connection.

[0100] In this embodiment of the application, if the controller number of the fire protection integrated machine C is in the host whitelist, the fire protection integrated machine A sends a subscription response frame (i.e., the second subscription response frame) to the fire protection integrated machine C based on the second TCP long connection.

[0101] S403: If a second heartbeat frame is received from the third fire protection integrated unit based on the second TCP long connection, a second heartbeat response frame is sent to the third fire protection integrated unit based on the second TCP long connection.

[0102] In this embodiment of the application, if the fire protection integrated machine A receives a heartbeat frame (i.e., the second heartbeat frame) sent by the fire protection integrated machine C based on the second TCP long connection, then the fire protection integrated machine A sends a heartbeat response frame (i.e., the second heartbeat response frame) to the fire protection integrated machine C based on the second TCP long connection.

[0103] Based on the above description, the networking method for an integrated subway fire suppression system provided in this application embodiment achieves networking between integrated fire suppression systems via TCP long connections through master-slave networking configuration, realizing the purpose of rapid networking and improving the convenience and stability of the networking function of the subway fire suppression system. Furthermore, the networking function can be directly configured through a human-machine interface, which is simple, easy to use, and easy to modify for subway fire suppression personnel. In addition, the self-detection and reconnection mechanism ensures the stability and accuracy of the connection between the master and slave devices.

[0104] The above describes a networking method for an integrated subway fire fighting machine provided by the embodiments of this application. The following will describe the device for implementing the above-described networking method for an integrated subway fire fighting machine.

[0105] See Figure 6 , Figure 6 This is a schematic diagram of the networking device for a subway fire-fighting integrated machine, provided as an embodiment of this application. Figure 6 As shown in the embodiment of this application, a networking device for an integrated fire-fighting unit in a subway is applied to a subway fire-fighting system. The subway fire-fighting system includes multiple integrated fire-fighting units, and the networking device is applied to the first integrated fire-fighting unit among the multiple integrated fire-fighting units. The networking device for the integrated fire-fighting unit includes:

[0106] The configuration acquisition module 501 is used to acquire the master-slave network configuration of the local machine. The master-slave network configuration includes the network role. The network role is either a master or a slave. When the network role is a master, the master-slave network configuration also includes the slave configuration.

[0107] The master-slave networking module 502 is used to establish and maintain a first transmission control protocol TCP long connection with the second fire protection integrated machine, which is a slave, according to the slave configuration if the networking role is master; to receive the working information of the second fire protection integrated machine based on the first TCP long connection; and to establish and maintain a second TCP long connection with the third fire protection integrated machine, which is a master, if the networking role is slave; and to send the working information of the machine to the third fire protection integrated machine based on the second TCP long connection. The second fire protection integrated machine and the third fire protection integrated machine are different fire protection integrated machines.

[0108] In one possible implementation, the configuration acquisition module 501 is specifically used for:

[0109] The network function status of the local machine is obtained through the human-machine interface. If the network function status is off, the communication function of the local machine is turned off. If the network function status is on, the network role is obtained through the human-machine interface, and if the network role is the master, the slave configuration is obtained through the human-machine interface.

[0110] In one possible implementation, the slave configuration includes the controller number and Internet Protocol (IP) address of the second integrated fire alarm unit;

[0111] The master-slave networking module 502, used to establish and maintain a long TCP connection with the second fire-fighting integrated unit (which is a slave unit) based on the slave unit's configuration, is specifically used for:

[0112] Traverse the controller numbers in the slave device configuration to determine the target second fire protection integrated machine to be connected; establish a first TCP long connection with the target second fire protection integrated machine based on its IP address; if the first TCP long connection is successfully established, send a first network subscription frame to the target second fire protection integrated machine based on the first TCP long connection; if the first network subscription frame is successfully sent and a first subscription response frame is received from the target second fire protection integrated machine, periodically send a first heartbeat frame to the target second fire protection integrated machine based on the first TCP long connection; if the first heartbeat frame is successfully sent and a first heartbeat response frame is received from the target second fire protection integrated machine, return to the step of periodically sending the first heartbeat frame to the target second fire protection integrated machine based on the first TCP long connection.

[0113] In one possible implementation, the master-slave networking module 502, used to establish and maintain a long TCP connection with the second fire-fighting integrated unit (which is a slave unit) according to the slave unit configuration, is also used for:

[0114] If the first TCP long connection fails to be established, add the controller number of the target second fire-fighting integrated machine to the TCP reconnection queue.

[0115] In one possible implementation, the master-slave networking module 502, used to establish and maintain a long TCP connection with the second fire-fighting integrated unit (which is a slave unit) according to the slave unit configuration, is also used for:

[0116] If the first group of network subscription frames fails to be sent, or if the first subscription response frame of the target second fire protection integrated machine is not received, return to the step of sending the first group of network subscription frames to the target second fire protection integrated machine based on the first TCP long connection, and when the number of times the first group of network subscription frames are sent reaches the corresponding first limit, disconnect the first TCP long connection and add the controller number of the target second fire protection integrated machine to the TCP reconnection queue.

[0117] In one possible implementation, the master-slave networking module 502, used to establish and maintain a long TCP connection with the second fire-fighting integrated unit (which is a slave unit) according to the slave unit configuration, is also used for:

[0118] If the first heartbeat frame fails to be sent, or if the first heartbeat response frame of the target second fire protection integrated unit is not received, return to the step of periodically sending the first heartbeat frame to the target second fire protection integrated unit based on the first TCP long connection. When the number of times the first heartbeat frame is sent reaches the corresponding second upper limit, disconnect the first TCP long connection and add the controller number of the target second fire protection integrated unit to the TCP reconnection queue.

[0119] In one possible implementation, the master-slave networking module 502, used to establish and maintain a long TCP connection with the second fire-fighting integrated unit (which is a slave unit) according to the slave unit configuration, is also used for:

[0120] The controller number in the TCP reconnection queue is periodically traversed to determine the target second fire protection unit to be connected to, and then the step of establishing the first TCP long connection with the target second fire protection unit based on its IP address is returned. If the first heartbeat frame is successfully sent and the first heartbeat response frame of the target second fire protection unit is received, the controller code of the target second fire protection unit is deleted from the TCP reconnection queue.

[0121] In one possible implementation, the master-slave networking module 502, used to establish and maintain a long TCP connection with the second fire-fighting integrated unit (which is a slave unit) according to the slave unit configuration, is also used for:

[0122] Monitor the operating status of the machine; if the operating status is restarted, return to the step of traversing the controller numbers in the slave configuration to determine the target second fire protection integrated machine to be connected.

[0123] In one possible implementation, the master-slave networking module 502, used to establish and maintain a second TCP long connection with the third integrated fire protection unit (as the host), is specifically used for:

[0124] If a second network subscription frame is received from the third fire protection integrated unit based on the second TCP long connection, the host whitelist of the local machine is retrieved; if the third fire protection integrated unit is in the host whitelist, a second subscription response frame is sent to the third fire protection integrated unit based on the second TCP long connection; if a second heartbeat frame is received from the third fire protection integrated unit based on the second TCP long connection, a second heartbeat response frame is sent to the third fire protection integrated unit based on the second TCP long connection.

[0125] It should be noted that the detailed functions of each module in the embodiments of this application can be found in the corresponding disclosure of the above-mentioned network method embodiment of the integrated subway fire fighting machine, and will not be repeated here.

[0126] This application also provides an integrated fire-fighting unit in its embodiments. See also... Figure 7 , Figure 7 This is a structural schematic diagram of an integrated fire protection unit provided in an embodiment of this application. Figure 7 The fire-fighting integrated unit shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0127] like Figure 7As shown, the integrated fire suppression system may include a computing board 601, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 602 or programs loaded from storage device 608 into random access memory (RAM) 603. When the integrated fire suppression system is powered on, RAM 603 also stores various programs and data required for its operation. The processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0128] 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 the fire alarm control unit to communicate wirelessly or wiredly with other devices to exchange data. Although... Figure 6 The fire-fighting unit shown is equipped with various devices; however, 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 included alternatively.

[0129] This application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are run on the fire-fighting integrated machine, the fire-fighting integrated machine enables the fire-fighting integrated machine to implement any of the networking methods for subway fire-fighting integrated machines provided in this application.

[0130] 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 the fire-fighting integrated machine, the fire-fighting integrated machine can realize any of the networking methods of the subway fire-fighting integrated machine provided in this application.

[0131] 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.

[0132] 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.

[0133] In the above embodiments, the 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, in the form of a computer program product.

[0134] 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 networking method for an integrated subway fire suppression system, characterized in that, The networking method for the integrated fire suppression system in the subway is applied to a subway fire suppression system, which includes multiple integrated fire suppression systems. The networking method for the integrated fire suppression system in the subway is applied to the first integrated fire suppression system among the multiple integrated fire suppression systems. The networking method for the integrated fire suppression system in the subway includes: Obtain the master-slave network configuration of the local machine. The master-slave network configuration includes network roles. The network role is a master or a slave. When the network role is a master, the master-slave network configuration also includes slave configuration. If the network role is the host, a first transmission control protocol TCP long connection is established and maintained with the second fire-fighting integrated machine as a slave according to the slave configuration; and the working information of the second fire-fighting integrated machine is received based on the first TCP long connection. If the network role is slave, a second TCP long connection is established and maintained with the third fire protection integrated machine as the master; the working information of the local machine is sent to the third fire protection integrated machine based on the second TCP long connection. The second fire protection integrated machine and the third fire protection integrated machine are different fire protection integrated machines.

2. The networking method for a subway fire-fighting integrated machine according to claim 1, characterized in that, The process of obtaining the master-slave network configuration of the local machine includes: Obtain the network function status of the local machine based on the human-machine interface; If the networking function is in the off state, disable the communication function of this machine; If the networking function is enabled, the networking role is obtained based on the human-machine interface, and if the networking role is the master, the slave configuration is obtained based on the human-machine interface.

3. The networking method for an integrated subway fire suppression system according to claim 1, characterized in that, The slave device configuration includes the controller number and Internet Protocol (IP) address of the second integrated fire protection unit; The step of establishing and maintaining a first transmission control protocol TCP long connection with the second fire-fighting integrated machine, which is a slave, according to the slave configuration includes: Traverse the controller numbers in the slave configuration to determine the target second integrated fire protection unit to be connected; The first TCP long connection is established with the target second fire-fighting integrated machine based on the IP address of the target second fire-fighting integrated machine; If the first TCP long connection is successfully established, a first network subscription frame is sent to the target second fire-fighting integrated machine based on the first TCP long connection; If the first network subscription frame is successfully sent and the first subscription response frame of the target second fire-fighting integrated machine is received, the first heartbeat frame is sent to the target second fire-fighting integrated machine at regular intervals based on the first TCP long connection; If the first heartbeat frame is successfully sent and the first heartbeat response frame of the target second fire-fighting integrated machine is received, return to the step of periodically sending the first heartbeat frame to the target second fire-fighting integrated machine based on the first TCP long connection.

4. The networking method for an integrated subway fire suppression system according to claim 3, characterized in that, The step of establishing and maintaining a first transmission control protocol TCP long connection with the second fire-fighting integrated machine, which is a slave, according to the slave configuration, further includes: If the first TCP long connection fails to be established, the controller number of the target second fire-fighting integrated machine is added to the TCP reconnection queue.

5. The networking method for an integrated subway fire suppression system according to claim 3, characterized in that, The step of establishing and maintaining a first transmission control protocol TCP long connection with the second fire-fighting integrated machine, which is a slave, according to the slave configuration, further includes: If the first network subscription frame fails to be sent, or if the first subscription response frame of the target second fire-fighting integrated machine is not received, the process returns to the step of sending the first network subscription frame to the target second fire-fighting integrated machine based on the first TCP long connection. When the number of times the first network subscription frame is sent reaches the corresponding first upper limit, the first TCP long connection is disconnected, and the controller number of the target second fire-fighting integrated machine is added to the TCP reconnection queue.

6. The networking method for a subway fire-fighting integrated machine according to claim 3, characterized in that, The step of establishing and maintaining a first transmission control protocol TCP long connection with the second fire-fighting integrated machine, which is a slave, according to the slave configuration, further includes: If the first heartbeat frame fails to be sent, or if the first heartbeat response frame of the target second fire-fighting integrated machine is not received, the process returns to the step of periodically sending the first heartbeat frame to the target second fire-fighting integrated machine based on the first TCP long connection. When the number of times the first heartbeat frame is sent reaches the corresponding second upper limit, the first TCP long connection is disconnected, and the controller number of the target second fire-fighting integrated machine is added to the TCP reconnection queue.

7. A networking method for an integrated subway fire suppression system according to any one of claims 4 to 6, characterized in that, The step of establishing and maintaining a first transmission control protocol TCP long connection with the second fire-fighting integrated machine, which is a slave, according to the slave configuration, further includes: The controller number in the TCP reconnection queue is periodically traversed to determine the target second fire protection integrated machine to be connected to, and then the step of establishing the first TCP long connection with the target second fire protection integrated machine based on the IP address of the target second fire protection integrated machine is returned to be executed. If the first heartbeat frame is successfully sent and the first heartbeat response frame of the target second fire-fighting integrated machine is received, the controller code of the target second fire-fighting integrated machine is deleted from the TCP reconnection queue.

8. The networking method for an integrated subway fire suppression system according to claim 3, characterized in that, The step of establishing and maintaining a first transmission control protocol TCP long connection with the second fire-fighting integrated machine, which is a slave unit, according to the slave configuration, further includes: Monitor the operating status of the machine; If the running status is a restart status, return to the step of traversing the controller numbers in the slave configuration to determine the target second fire protection integrated machine to be connected.

9. The networking method for an integrated subway fire suppression system according to claim 1, characterized in that, The establishment and maintenance of a second TCP long connection with the third integrated fire protection unit, which acts as the host, includes: If the third fire-fighting integrated machine receives a second network subscription frame sent based on the second TCP long connection, retrieve the host whitelist of the local machine; If the third fire-fighting integrated machine is in the host whitelist, a second subscription response frame is sent to the third fire-fighting integrated machine based on the second TCP long connection; If a second heartbeat frame is received from the third fire-fighting integrated unit based on the second TCP long connection, a second heartbeat response frame is sent to the third fire-fighting integrated unit based on the second TCP long connection.

10. A networking device for an integrated subway fire suppression system, characterized in that, The networking device for the integrated subway fire suppression system is applied to a subway fire suppression system, which includes multiple integrated fire suppression systems. The networking device is applied to the first integrated fire suppression system among the multiple integrated fire suppression systems. The networking device for the integrated subway fire suppression system includes: The configuration acquisition module is used to acquire the master-slave network configuration of the local machine. The master-slave network configuration includes network roles. The network role is a master or a slave. When the network role is a master, the master-slave network configuration also includes slave configuration. The master-slave networking module is used to establish and maintain a first transmission control protocol TCP long connection with the second fire-fighting integrated machine as a slave, according to the slave configuration, if the networking role is master; to receive the working information of the second fire-fighting integrated machine based on the first TCP long connection; if the networking role is slave, to establish and maintain a second TCP long connection with the third fire-fighting integrated machine as master; and to send the working information of the machine to the third fire-fighting integrated machine based on the second TCP long connection, wherein the second fire-fighting integrated machine and the third fire-fighting integrated machine are different fire-fighting integrated machines.

11. A computer program product, characterized in that, It includes computer-readable instructions, which, when executed on the fire-fighting integrated machine, cause the fire-fighting integrated machine to implement the networking method of the subway fire-fighting integrated machine as described in any one of claims 1 to 9.

12. A computer storage medium, characterized in that, The storage medium carries one or more computer programs, which, when executed by the integrated fire protection unit, enable the integrated fire protection unit to implement the networking method of the integrated subway fire protection unit as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Many-to-many long connection network communication device and equipment

    CN110266778A

  • Equipment information synchronization method and synchronization device, main equipment and storage medium

    CN112235370A

  • Intelligent networking method based on fire-fighting automatic fire alarm system

    CN113542031A

  • Networking method and device, equipment and storage medium

    CN118042555A

  • Wireless networking method and system for multi-scene energy storage equipment, medium and equipment

    CN119364322A