CN-121691491-B - Multi-protocol conversion method, system, equipment and medium between fire alarm devices
Abstract
The invention discloses a multi-protocol conversion method, a system, equipment and a medium between fire alarm devices, which belong to the technical field of communication, wherein the method comprises the following steps of S1 loading a protocol template, S2 establishing communication with source devices, S3 analyzing and converting original data, S4 writing data into a database in a standardized manner, S5 standardizing data mapping and frame construction, S6 establishing communication with targets, and the system part comprises a protocol configuration module, a data acquisition and analysis engine, a data standardization and database module, a data mapping and packaging engine and a data sending engine, wherein the protocol configuration module is used for storing and managing template information of all converted protocols, the data acquisition and analysis engine is used for establishing communication with the source devices, the data standardization and database module is used as a data transfer hub of the system, the data mapping and packaging engine is used for preparing communication data for the target devices, and the data sending engine is used for communicating with the target devices.
Inventors
- FENG SHENGKUI
- ZHONG YONG
- CAI JUNJIE
- ZHANG GANG
- LIU YONG
- CHEN JIARONG
- JIANG PENG
Assignees
- 诺盾博达控股集团有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260212
Claims (9)
- 1. The multi-protocol conversion method between the fire alarm devices is characterized by comprising the following steps: s1, loading protocol templates, and loading corresponding protocol templates from template information of all converted protocols; S2, establishing communication with source equipment, and acquiring data which at least comprises alarm information, equipment state and control instruction data and is uploaded by the source equipment on the basis of an RS-485 or Ethernet communication physical interface and a corresponding protocol template in real time; S3, analyzing and converting the original data, analyzing the original data stream according to the protocol template rule based on the data acquired by establishing communication in the S2, extracting effective state points, and converting the effective state points into a uniform intermediate format; S4, writing the data into a database in a standardized manner, storing the data which is analyzed in the S3 and is converted into the intermediate format into a structured database, and converting the data into a predefined standardized data model; S5, standardized data mapping and frame construction, wherein standardized data is read from the standardized data model, fields in the standardized data model are mapped to specific addresses and formats required by a private protocol of target equipment according to a pre-configured data mapping table, and message framing is completed based on a target protocol template; S6, establishing communication with a target, and transmitting framing data to target fire-fighting equipment through an RS-485 interface based on a target protocol template, wherein ninth bit data is simulated by utilizing a parity bit dynamic switching mode in the data transmission process, so that simulation of special hardware specifications is realized, and compatibility is realized on a general hardware platform; when transmitting data, defining whether the ninth bit is 1 according to a protocol template, calculating a parity check value of the transmitted data, and matching the parity check value with the ninth bit value defined by a protocol by dynamically switching a check mode; in the serial communication supporting the SPACE/MARK check standard eight-bit data bit hardware, the ninth address frame is simulated to be 1 by dynamically setting the check bit of the serial port to be MARK, and the ninth data frame is simulated to be 0 by dynamically setting the check bit of the serial port to be SPACE.
- 2. The multi-protocol conversion method between fire alarm devices according to claim 1, wherein the loading protocol template stores the protocol template through a protocol library configuration file in JSON format, and supports dynamic addition and modification.
- 3. The method for multi-protocol conversion between fire alarm devices according to claim 1, wherein the raw data stream parsing process logic is as follows: frame synchronization, namely positioning a complete message through a frame header and a frame tail identifier defined by a protocol template; The field extraction, namely analyzing the key information of the loop number, the address number and the event type required in the data field according to the loaded protocol template; verifying the integrity of the message through the verification in the protocol template and the algorithm rule, and requesting retransmission when the verification fails; format conversion, namely converting the extracted information into an intermediate format and eliminating source protocol differences.
- 4. The multi-protocol conversion method between fire alarm devices according to claim 1, wherein the message framing is performed by loading a target protocol template and according to rules of the target protocol template, and the message framing process is as follows: Filling a frame header and a frame tail; Writing the mapped function code and the data field; writing a check value according to a target protocol check mode; For special scenes, adding priority identification in the message.
- 5. The method for converting multiple protocols between fire alarm devices according to claim 1, wherein the standardized data model at least comprises an alarm event table, a device state table and a control instruction table, and is used for unified management of multiple protocol data.
- 6. The multi-protocol conversion method between fire alarm devices according to claim 1, wherein the process of sending the group frame data to the target fire alarm device is required to strictly follow the communication time sequence including the sending interval and the response waiting time in the protocol template; and the target fire-fighting equipment returns a response message after receiving the data, the response message is compared with the sent data in content, and if the comparison verification is not matched, a retransmission mechanism is triggered, wherein the comparison verification is not matched at least comprises response overtime and content mismatch.
- 7. A multi-protocol conversion system between fire alarm devices, comprising: the protocol configuration module is used for storing and managing template information of all converted protocols, and comprises a protocol library configuration file, wherein each protocol template defines communication parameters including baud rate, data bits, stop bits and check bits and message formats including frame header, data field length, function codes and check sum algorithm; the data acquisition and analysis engine is used for establishing communication with the source equipment, acquiring data uploaded by the fire alarm host in real time through a physical interface according to the corresponding protocol template loaded in the protocol configuration module; the data standardization and database module is used as a data transfer hub of the system, and mainly uses the data stored after the analysis in the data acquisition and analysis engine as a database and converts the data into a standardized data model, wherein the database is a buffer area for protocol conversion and a source of the standardized data model, so that the differences among different host protocols are shielded; the data mapping and packaging engine is used for preparing communication data for the target equipment, reading the standardized data from the database module, completing mapping from fields in the standardized data model to specific addresses and formats of the private protocol of the target equipment, and completing message framing based on the target protocol template; The data transmission engine is used for communicating with the target fire-fighting equipment, simulating ninth-bit data by adopting a parity check bit dynamic switching mode, and transmitting group frame data to the target fire-fighting equipment based on the target protocol template to realize communication.
- 8. The multi-protocol conversion device between fire alarm devices is characterized by comprising a processor and at least one group of memories, wherein the memories store computer executable programs, and the processor executes the computer executable programs to complete the multi-protocol conversion method between the fire alarm devices according to any one of claims 1-6.
- 9. A multiprotocol conversion medium between fire alarm devices, wherein a computer executable program is stored in the medium, and the computer executable program is executed by a computer to perform the multiprotocol conversion method between fire alarm devices according to any one of claims 1 to 6.
Description
Multi-protocol conversion method, system, equipment and medium between fire alarm devices Technical Field The invention belongs to the technical field of communication, and particularly relates to a multi-protocol conversion method, a system, equipment and a medium between fire alarm equipment. Background The fire automatic alarm system is used as an important component of a building fire-fighting facility and is widely applied to various buildings. With the development of fire protection technology, fire alarm devices of different brands and different periods adopt various communication protocols. While new devices employ standard protocols, old devices use a large number of manufacturer proprietary protocols that vary widely in frame structure, data definition, physical layer parameters. The protocols are not disclosed and have poor compatibility, so that the new equipment and the old equipment are difficult to directly interconnect. Protocol conversion not only involves application layer data parsing, but also often encounters hard barriers to physical layer incompatibility. As a typical example, the RS-485 protocol used by many older devices employs a non-standard 9-bit data bit format, for which modern general-purpose hardware and standard communication libraries support very little, forming an integrated technical barrier. If the heterogeneous device state information is to be accessed into a modern internet of things platform or a central monitoring system, an independent interface needs to be developed for each protocol, so that the system architecture is complex, and the development and maintenance costs are high. Currently in engineering practice, common solutions include: bridging between new and old protocols is realized through a manufacturer special adapter or a conversion module, but the mode relies on hardware, and has limited expansibility and universality; the old equipment is replaced to adapt to the new host, but the modification cost is high, the construction period is long, and the stability of the system can be influenced; some software schemes can only support certain brands of protocols, lacking the ability to be generic across brands. Therefore, how to realize the intercommunication of new and old fire alarm devices without large-scale replacement of the devices is still a general requirement of the industry. Disclosure of Invention The invention provides a multi-protocol conversion method and a system between fire alarm devices, provides a configurable protocol conversion method, can adapt to private protocols or standard protocols of fire alarm devices of various brands and types, reduces the complexity and cost of system integration, does not depend on software solutions of special hardware, particularly solves the problem that a non-standard physical layer protocol such as 9-bit data bits adopted by old devices is not compatible with modern general hardware, realizes standardization and centralized storage of heterogeneous data by constructing a data hub taking a database as a core, provides a unified and efficient data service interface for upper-layer application, and solves the problems that protocols between new and old fire alarm devices are not compatible, lack of flexible conversion mechanisms, cannot be compatible with a host of various brands and old devices and are difficult to be accessed into an Internet of things platform in the prior art. In order to achieve the technical purpose, the invention is realized by the following technical scheme: the multi-protocol conversion method between fire alarm devices comprises the following steps: s1, loading protocol templates, and loading corresponding protocol templates from template information of all converted protocols; S2, establishing communication with source equipment, and acquiring data which at least comprises alarm information, equipment state and control instruction data and is uploaded by the source equipment on the basis of an RS-485 or Ethernet communication physical interface and a corresponding protocol template in real time; S3, analyzing and converting the original data, analyzing the original data stream according to the protocol template rule based on the data acquired by establishing communication in the S2, extracting effective state points, and converting the effective state points into a uniform intermediate format; S4, writing the data into a database in a standardized manner, storing the data which is analyzed in the S3 and is converted into the intermediate format into a structured database, and converting the data into a predefined standardized data model; S5, standardized data mapping and frame construction, wherein standardized data is read from the standardized data model, fields in the standardized data model are mapped to specific addresses and formats required by a private protocol of target equipment according to a pre-configured data mapping table, and message framing is completed based on