Data communication method and device based on fire fighting system and electronic equipment

By converting the inspection commands into target arrays, and applying voltage values ​​based on the firefighting second bus, and using the sending timer to control the transmission time and timing of the voltage signal, the problem of reducing data communication accuracy caused by wiring errors in the firefighting system is solved, and more efficient data transmission and firefighting detection are achieved.

CN120201062AActive Publication Date: 2025-06-24BEIJING URBAN CONSTR INTELLIGENT CONTROL TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510687478.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-06-24
Estimated Expiration
2045-05-27

AI Technical Summary

Technical Problem

In the case of wiring errors in existing fire protection systems, the accuracy of data communication is reduced, especially in the wiring errors of tree structures or ring structures, where data transmission time is inconsistent or signal transmission is repeated.

Method used

By converting the inspection command into a target array, the elements in the target array correspond one by one to the bit bits in the inspection command, and the elements include the voltage value and duration. Then, the voltage value is applied based on the fire two bus, and the transmission time and timing of the voltage signal are accurately controlled by the transmission time and timing of the voltage signal.

Benefits of technology

It effectively solves the problem of tree structure incorrectly connecting to tree branch structures or ring structures incorrectly connecting to large traps and small circles, improves the accuracy of data communication, ensures the accuracy of fire detection, and thus improves the efficiency of fire rescue.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120201062A_ABST
    Figure CN120201062A_ABST
Patent Text Reader

Abstract

The invention provides a data communication method and device based on a fire fighting system and electronic equipment, and relates to the technical field of fire fighting, and the method comprises the steps: converting an inspection command into a target array, and setting the duration included in a first element of the target array as a first loading value of a sending timer; applying a voltage corresponding to the voltage value in the first element to the fire-fighting two-way bus, and timing based on the first loading value; and after the timing is finished, setting the duration included in the second element as a new first loading value, and applying a voltage corresponding to the voltage value in the second element to the fire-fighting two-way bus until the timing of the first loading value corresponding to the last element is finished. When the voltage is applied to the fire-fighting two-bus every time, the loading value is set based on the duration included in the corresponding element, so that the problem of inconsistent branch data transmission time or repeated signal transmission in a loop caused by wiring errors of a tree structure or an annular structure is effectively solved, and the accuracy of data communication is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of fire protection technology, and in particular, to a data communication method, device, and electronic device based on a fire protection system. Background Art

[0002] With the rapid development of urban intelligent automation, the intelligent fire protection system has become an indispensable intelligent control fire protection system for modern urban intelligent transportation and buildings due to its high reliability, stability, fast response, convenient construction and other technical advantages.

[0003] In the related art, during the wiring process of fire protection peripherals of the fire protection system, wiring deviations are inevitable, resulting in the tree-shaped wiring method finally being connected in the form of a branch structure, and the ring-shaped wiring method finally being connected in the form of a large circle enclosing a small circle. In this case of wiring errors, if the existing communication method of the fire protection two-wire bus is used for data communication, the accuracy of data communication will be reduced. Summary of the Invention

[0004] The present invention provides a data communication method, device, and electronic device based on a fire protection system to solve the defect of reducing the accuracy of data communication in the prior art.

[0005] The present invention provides a data communication method based on a fire protection system. The fire protection system includes a management circuit board and a plurality of fire protection peripherals. Each fire protection peripheral is connected to the management circuit board through a fire protection two-wire bus. The method is applied to the management circuit board and includes: Converting an inspection command into a target array, where elements in the target array correspond one-to-one to bit positions in the inspection command, and the elements include a voltage value and a duration of the voltage value; Starting from the first element in the target array, setting the duration included in the first element as the first loading value of a sending timer; Applying a voltage corresponding to the voltage value in the first element to the fire protection two-wire bus, and timing based on the first loading value through the sending timer; After the timing ends, stopping applying the voltage corresponding to the voltage value in the first element to the fire protection two-wire bus, setting the duration included in the second element in the target array as the new first loading value of the sending timer, and applying a voltage corresponding to the voltage value in the second element to the fire protection two-wire bus until the timing of the first loading value corresponding to the last element in the target array ends.

[0006] According to the data communication method based on a fire protection system provided by the present invention, the setting the duration included in the first element as the first loading value of the sending timer includes: After the transmission interval duration of the system timer arrives, start the transmission timer, and set the duration included in the first element as the first loading value of the transmission timer. The transmission interval duration is used to represent the interval duration for sending inspection commands.

[0007] According to a data communication method based on a fire protection system provided by the present invention, the conversion of the inspection command into a target array includes: When a target command is received and the priority of the target command is lower than the priority of the inspection command, convert the inspection command into the target array. The target command includes a setting command or a query command. When the priority of the target command is higher than the priority of the inspection command, after the target command is sent, convert the inspection command into the target array.

[0008] The present invention also provides a data communication method based on a fire protection system, which is applied to fire protection peripherals. The method includes: When the voltage applied to the fire protection two-wire bus is the target voltage value, perform voltage acquisition on the fire protection two-wire bus based on a preset time interval to obtain the target voltage. The voltage applied to the fire protection two-wire bus is the voltage applied based on the voltage value included in the first element after converting the inspection command into a target array and setting the duration included in the first element as the first loading value of the transmission timer.

[0009] According to a data communication method based on a fire protection system provided by the present invention, when the voltage applied to the fire protection two-wire bus is the target voltage value, performing voltage acquisition on the fire protection two-wire bus based on a preset time interval to obtain the target voltage includes: When the voltage applied to the fire protection two-wire bus is the target voltage value, perform voltage acquisition on the fire protection two-wire bus a preset number of times based on the preset time interval; When the current voltage value is acquired, perform amplitude limiting filtering processing on the current voltage value based on the previously acquired voltage value to obtain the processed current voltage value; Determine the target voltage based on each of the processed current voltage values.

[0010] According to a data communication method based on a fire protection system provided by the present invention, when the voltage applied to the fire protection two-wire bus is the target voltage value, performing voltage acquisition on the fire protection two-wire bus based on a preset time interval to obtain the target voltage includes: When the voltage applied to the fire protection two-wire bus is the target voltage value, start the reception timer and set the preset duration as the second loading value of the reception timer; Control the receiving timer to count based on the second load value; After the counting ends, collect the voltage of the fire two-wire bus based on the preset time interval to obtain the target voltage.

[0011] According to a data communication method based on a fire protection system provided by the present invention, the method further includes: Determine the received data based on the target voltages collected at each of the target voltage values; Perform parity check on the received data to obtain a first check result, and check the peripheral address and data content in the received data to obtain a second check result; When both the first check result and the second check result indicate successful check, upload the received data to the fire protection system through the CAN bus.

[0012] The present invention also provides a data communication device based on a fire protection system, including: A conversion unit, configured to convert an inspection command into a target array, where elements in the target array correspond one-to-one to bit positions in the inspection command, and the elements include voltage values and the duration of the voltage values; A setting unit, configured to start from the first element in the target array, and set the duration included in the first element as the first load value of the sending timer; A first application unit, configured to apply a voltage corresponding to the voltage value in the first element to the fire two-wire bus; A timing unit, configured to count through the sending timer based on the first load value; A second application unit, configured to, after the counting ends, stop applying the voltage corresponding to the voltage value in the first element to the fire two-wire bus, set the duration included in the second element in the target array as the new first load value of the sending timer, and apply the voltage corresponding to the voltage value in the second element to the fire two-wire bus until the counting of the first load value corresponding to the last element in the target array ends.

[0013] The present invention also provides a data communication device based on a fire protection system, including: An acquisition unit, configured to, when the voltage applied to the fire two-wire bus is a target voltage value, collect the voltage of the fire two-wire bus based on a preset time interval to obtain a target voltage, where the voltage applied to the fire two-wire bus is the voltage applied based on the voltage value included in the first element after converting an inspection command into a target array and setting the duration included in the first element as the first load value of the sending timer starting from the first element in the target array.

[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the data communication method based on the fire protection system as described in any one of the above is implemented.

[0015] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the data communication method based on the fire protection system as described in any one of the above is implemented.

[0016] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the data communication method based on the fire protection system as described in any one of the above is implemented.

[0017] The data communication method, device, and electronic device based on the fire protection system provided by the present invention convert an inspection command into a target array. The elements in the target array correspond one by one to the bit positions in the inspection command, and the elements include a voltage value and the duration of the voltage value. Starting from the first element in the target array, the duration included in the first element is set as the first loading value of the sending timer, a voltage corresponding to the voltage value in the first element is applied to the fire protection two-wire bus, and the sending timer is used to time based on the first loading value; after the timing ends, applying the voltage corresponding to the voltage value in the first element to the fire protection two-wire bus is stopped, and the duration included in the second element in the target array is set as the new first loading value of the sending timer, and a voltage corresponding to the voltage value in the second element is applied to the fire protection two-wire bus until the timing of the first loading value corresponding to the last element in the target array ends. It can be seen that in the present invention, each time a voltage is applied to the fire protection two-wire bus, the loading value of the sending timer is set based on the duration included in the corresponding element. The sending timer can accurately control the transmission time and timing of the voltage signal on the fire protection two-wire bus through the loading value set each time, effectively solving the problem that the data transmission time of each branch is inconsistent due to the tree structure being incorrectly connected into a branch structure, or the problem that the signal is repeatedly transmitted in the loop due to the ring structure being incorrectly connected into a large circle enclosing a small circle, thereby improving the accuracy of data communication. Description of the Drawings

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0019] Figure 1 is one of the flow diagrams of the data communication method based on the fire protection system provided by the embodiments of the present invention.

[0020] Figure 2 It is a schematic structural diagram of the fire protection system provided by an embodiment of the present invention.

[0021] Figure 3 It is a schematic diagram of the overall process of sending data based on the fire protection system provided by an embodiment of the present invention.

[0022] Figure 4 It is the second schematic diagram of the process of the data communication method based on the fire protection system provided by an embodiment of the present invention.

[0023] Figure 5 It is a schematic diagram of the overall process of receiving data based on the fire protection system provided by an embodiment of the present invention.

[0024] Figure 6 It is a schematic structural diagram of the data communication device based on the fire protection system provided by an embodiment of the present invention.

[0025] Figure 7 It is a schematic structural diagram of the entity of the electronic device provided by an embodiment of the present invention. Specific embodiments

[0026] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts shall fall within the protection scope of the present invention.

[0027] The fire protection system mainly includes: a Human-Machine Interface (HMI), a calculation module, a keypad, a Controller Area Network (CAN) conversion board, multiple management loop boards, a fire display panel device, and a variety of fire protection peripherals. For example, the fire protection peripherals are a temperature sensing module, a smoke sensing module, an isolation module, an input / output control module, a relay module, an input module, a manual alarm module, a fire hydrant module, a bus repeater module, etc. For different application scenarios, the layout of the fire protection system is different, and the number of configured and installed boards is also different.

[0028] There are two connection methods for the topological structure of a management loop board. One is a tree structure, which can connect 4 loops, and each loop can connect 220 fire protection peripherals. The other is a ring structure, which consists of 2 ring loops, and one of the ring loops is composed of 2 tree loops connected together.

[0029] During the wiring process in high-rise buildings or urban rails, the wiring method of the tree structure is a parallel mode for the lines between each fire-fighting peripheral, and at the same time, each fire-fighting peripheral in the loop is connected in series by the FBUS fire two-wire bus. Ideally, this is the standard wiring method. However, during the construction process, wiring deviations are inevitable, resulting in wiring errors. Therefore, the wiring method of the tree structure may ultimately be connected in the form of a tree structure, and the wiring method of the ring structure may ultimately be connected in the form of a large circle enclosing a small circle. In this case of the wiring of the fire-fighting line, if the existing communication method of the fire two-wire bus is used for data communication, the accuracy of data communication will be reduced.

[0030] Based on this, the present invention provides a data communication method based on a fire-fighting system. Each time a voltage is applied to the fire two-wire bus, the loading value of the sending timer is set based on the duration included in the corresponding element. The sending timer can precisely control the transmission time and timing of the voltage signal on the fire two-wire bus through the loading value set each time, effectively solving the problem that the data transmission time of each branch is inconsistent due to the incorrect connection of the tree structure into a tree-like structure, or the problem that the signal is repeatedly transmitted in the loop due to the incorrect connection of the ring structure into a large circle enclosing a small circle, thereby improving the accuracy of data communication.

[0031] The following combines Figures 1 - 5 to describe the data communication method based on the fire-fighting system of the present invention. The execution subject of the data communication method based on the fire-fighting system can be an electronic device such as a management loop board in the fire-fighting system, or a data communication device based on the fire-fighting system provided in the electronic device. The data communication device based on the fire-fighting system can be implemented through software, hardware, or a combination of both.

[0032] Figure 1 is one of the flow diagrams of the data communication method based on the fire-fighting system provided by the embodiments of the present invention. The fire-fighting system includes a management loop board and a plurality of fire-fighting peripherals. Each of the fire-fighting peripherals is connected to the management loop board through a fire two-wire bus and is applied to the management loop board, as Figure 1 shown. The data communication method based on the fire-fighting system includes the following steps: Step 101: Convert the inspection command into a target array. The elements in the target array correspond one-to-one with the bit positions in the inspection command. The elements include a voltage value and the duration of the voltage value.

[0033] Exemplarily, Figure 2 is the structural diagram of the fire-fighting system provided by the embodiments of the present invention. As Figure 2 shown, the fire-fighting system includes an HMI human-machine interface, a calculation board, a key board, a CAN communication board, a fire display panel device, a plurality of management loop boards, and a plurality of fire-fighting peripherals. The connection relationship between each module is asFigure 2 As shown in the figure, the management circuit board 1 includes circuit 1 and circuit 2, the management circuit board 2 includes circuit 3 and circuit 4, and the management circuit board n includes circuit n×2 - 1 and circuit n×2, where n is a positive integer. Among them, the HMI human-machine interface includes a network port and an RS485 interface, the computing board has 2 built-in CANs and a network port, the keypad board includes an RS485 interface, the CAN communication board includes a multi-channel CAN conversion interface board, the fire display panel device includes 1 CAN, 1 FBUS bus and 1 485 bus, the management circuit board includes 1 CAN, 2 RS485 buses and an FBUS communication interface, and the fire protection peripherals include an FBUS fire two-bus communication interface. For example, the fire protection peripherals can be smoke detectors, temperature detectors, fire hydrant modules, input / output modules, fire display panel devices, etc. Each circuit can be connected to 220 fire protection peripherals.

[0034] Exemplarily, due to the particularity of the FBUS fire two-bus protocol, the voltage value range sent changes between a first value and a second value, where the second value is greater than the first value. A voltage lasting for a first duration represents output 1, and a voltage lasting for a second duration represents output 0, and the first duration is greater than the second duration. Then, when the management circuit board needs to send an inspection command to the fire protection peripherals, it needs to first convert the inspection command into a target array. For example, the inspection command is to view the status information of fire protection peripheral 1. Assuming that the binary data 11001010 is used to represent this inspection command, for the first bit 1 in the binary data 11001010, the corresponding voltage value is the first value, and the duration of the voltage value of the first value is the first duration; for the second bit 1 in the binary data 11001010, the corresponding voltage value is the second value, and the duration of the voltage value of the second value is the first duration. For the third bit 0 in the binary data 11001010, the corresponding voltage value is the first value, and the duration of the voltage value of the first value is the second duration. For the fourth bit 0 in the binary data 11001010, the corresponding voltage value is the second value, and the duration of the voltage value of the second value is the second duration, and so on. Finally, the voltage value corresponding to each bit and the duration of the voltage value are used as elements in the target array, and the elements are arranged in the order of the bits. Finally, the target array corresponding to the inspection command is obtained, and the target array is added to the send data field in the send data structure of the FBUS fire two-bus protocol. The voltage values in the target array alternate between the first value and the second value, and the high level 1 and the low level 0 are characterized by the alternating first value and second value, as well as the durations of the first value and the second value.

[0035] It should be noted that in practical applications, the first value, the second value, the first duration, and the second duration in the present invention can be set based on requirements, and the present invention does not limit this.

[0036] It should be noted that in the FBUS fire two-bus protocol, it is usually stipulated that the number of data bits for sending data is 29 bits. Therefore, the above use of the binary data 11001010 to represent the inspection command is only an example. In actual applications, the number of bits of the binary data corresponding to the inspection command is 29 bits, and usually an idle bit is sent before the 29 bits, and the voltage value of the idle bit is the second value.

[0037] Step 102: Starting from the first element in the target array, set the duration included in the first element as the first loading value of the sending timer.

[0038] Exemplarily, configure a sending timer with an initial loading value of 600 us. After converting the inspection command into the target array, starting from the first element in the target array, set the duration included in the first element as the first loading value of the sending timer, that is, modify the initial loading value of the sending timer to the first loading value. For example, if the duration included in the first element in the target array is the first duration, then set the first duration as the first loading value of the sending timer.

[0039] Step 103: Apply the voltage corresponding to the voltage value in the first element to the fire two-bus, and time based on the first loading value through the sending timer.

[0040] Exemplarily, after setting the duration included in the first element as the first loading value of the sending timer, apply the voltage corresponding to the voltage value in the first element to the fire two-bus, and time based on the first loading value through the sending timer; for example, if the voltage value included in the first element in the target array is the first value and the duration of the voltage value is the first duration, then apply the first value voltage to the fire two-bus and time based on the first loading value for the first duration through the sending timer.

[0041] Step 104: After the timing ends, stop applying the voltage corresponding to the voltage value in the first element to the fire two-bus, set the duration included in the second element in the target array as the new first loading value of the sending timer, apply the voltage corresponding to the voltage value in the second element to the fire two-bus, until the timing of the first loading value corresponding to the last element in the target array ends.

[0042] Exemplarily, after the transmission timer times out based on the first load value, it indicates that the duration of applying the voltage corresponding to the voltage value in the first element to the fire-fighting two-wire bus has reached. Then, the voltage corresponding to the voltage value in the first element is no longer applied to the fire-fighting two-wire bus. At this time, the bit corresponding to the first element is sent successfully. Next, the duration included in the second element in the target array is set as the new first load value of the transmission timer, and the voltage corresponding to the voltage value in the second element is applied to the fire-fighting two-wire bus to send the bit corresponding to the second element, and so on, until the first load value corresponding to the last element in the target array times out, which indicates that all bits corresponding to the inspection command have been sent successfully, that is, the inspection command is sent successfully. For example, assume that the binary data 11001010 is used to represent the inspection command. The voltage value included in the first element in the target array is the first value, and the duration of the voltage value included in the first element is the first duration. Then, the first value voltage is applied to the fire-fighting two-wire bus, and the transmission timer times based on the first load value for the first duration. After the transmission timer times out based on the first load value for the first duration, it indicates that the bit corresponding to the first element is sent successfully, and then the first value voltage is no longer applied to the fire-fighting two-wire bus; start to send the second bit. The voltage value included in the second element in the target array is the second value, and the duration of the voltage value included in the second element is the first duration. Then, the second value voltage is applied to the fire-fighting two-wire bus, and the transmission timer times based on the new first load value for the first duration. After the transmission timer times out based on the new first load value for the first duration, it indicates that the bit corresponding to the second element is sent successfully, and then the second value voltage is no longer applied to the fire-fighting two-wire bus. Start to send the third bit. The voltage value included in the third element in the target array is the first value, and the duration of the voltage value included in the third element is the second duration. Then, the first value voltage is applied to the fire-fighting two-wire bus, and the transmission timer times based on the new first load value for the second duration. After the transmission timer times out based on the new first load value for the second duration, it indicates that the bit corresponding to the third element is sent successfully, and then the first value voltage is no longer applied to the fire-fighting two-wire bus, and so on, until the first load value corresponding to the last element in the target array times out, which indicates that all bits corresponding to the inspection command have been sent successfully, that is, the inspection command is sent successfully.

[0043] It should be noted that the present invention can also define transmission commands such as inspection commands in the form of macro definitions. According to the form of the transmission command, it is divided into a command with response and a command without response, and a hook function is used to process the corresponding transmission command. The present invention does not limit this.

[0044] The data communication method based on a fire protection system provided by the present invention converts an inspection command into a target array. The elements in the target array correspond one by one to the bit positions in the inspection command, and the elements include a voltage value and the duration of the voltage value. Starting from the first element in the target array, the duration included in the first element is set as the first loading value of a sending timer. A voltage corresponding to the voltage value in the first element is applied to the fire protection two-wire bus, and the sending timer is timed based on the first loading value. After the timing ends, the application of the voltage corresponding to the voltage value in the first element to the fire protection two-wire bus is stopped, and the duration included in the second element in the target array is set as the new first loading value of the sending timer. A voltage corresponding to the voltage value in the second element is applied to the fire protection two-wire bus until the timing of the first loading value corresponding to the last element in the target array ends. It can be seen that in the present invention, each time a voltage is applied to the fire protection two-wire bus, the loading value of the sending timer is set based on the duration included in the corresponding element. The sending timer can precisely control the transmission time and timing of the voltage signal on the fire protection two-wire bus through the loading value set each time, effectively solving the problem that the data transmission time of each branch is inconsistent due to the incorrect connection of the tree structure into a branch structure, or the problem that the signal is repeatedly transmitted in the loop due to the incorrect connection of the ring structure into a large loop enclosing a small loop, thereby improving the accuracy of data communication, improving the accuracy of fire protection detection, and further improving the efficiency of fire protection and rescue.

[0045] In one embodiment, setting the duration included in the first element as the first loading value of the sending timer in step 102 above can be specifically implemented in the following manner: After the sending interval duration of the system timer arrives, the sending timer is started, and the duration included in the first element is set as the first loading value of the sending timer. The sending interval duration is used to represent the interval duration for sending the inspection command.

[0046] Among them, the sending interval duration can be set based on requirements. For example, the sending interval duration is 40 ms, and the present invention does not limit this.

[0047] Exemplarily, usually, the inspection command is sent periodically. Therefore, it is necessary to time the sending interval duration of the inspection command through the system timer. After the sending interval duration of the system timer arrives, it indicates that it is necessary to start sending the inspection command. Then the sending timer is started, and the duration included in the first element is set as the first loading value of the sending timer. Furthermore, the sending timer is timed for each bit position transmission based on the first loading value until all the bit positions of the inspection command are sent. Then it is determined that one frame of data is sent. At this time, the sending timer can be turned off, and the system timer is used for timing again. When the next sending interval duration arrives, the next inspection command is sent.

[0048] In this embodiment, after the transmission interval duration of the system timer arrives, the transmission timer is started, and the duration included in the first element is set as the first load value of the transmission timer for timing, realizing the periodic transmission of the inspection command.

[0049] In one embodiment, step 101 above converts the inspection command into a target array, which can be specifically implemented in the following manner: When the target command is received and the priority of the target command is lower than the priority of the inspection command, the inspection command is converted into the target array, and the target command includes a setting command or a query command; when the priority of the target command is higher than the priority of the inspection command, after the target command is sent, the inspection command is converted into the target array.

[0050] Among them, the setting command is a command for the management circuit board to set the fire protection peripherals. For example, the setting command is to set the fire alarm module to start; the query command is a command sent when the management circuit board needs to query the information of the fire protection peripherals. For example, the query command is to query the temperature detected by the temperature sensor or the version number of the temperature sensor, etc.

[0051] Exemplarily, when an inspection command needs to be sent, if a target command is received, it is necessary to find the respective priorities of the inspection command and the target command from the pre-set priority list. When the priority of the inspection command is higher than the priority of the target command, the inspection command is first sent, so the inspection command needs to be converted into a target array. After the inspection command is sent, the target command is sent. When the priority of the target command is higher than the priority of the inspection command, the target command is inserted into the message queue including the inspection command, the target command is sent first, and after the target command is sent, the inspection command is sent, and the inspection command is converted into a target array.

[0052] It should be noted that the method for sending the target command is similar to the method for sending the above inspection command. The target command needs to be first converted into an array, and the elements in the array correspond one by one to the bit positions in the target command. The elements in the array include the voltage value and the duration of the voltage value. Starting from the first element in the array, set the duration included in the first element in the array as the loading value of the sending timer, apply the voltage corresponding to the voltage value in the first element in the array to the fire two-wire bus, and start timing by the sending timer based on the set loading value. After the timing ends, stop applying the voltage corresponding to the voltage value in the first element in the array to the fire two-wire bus, and set the duration included in the second element in the array as the new loading value of the sending timer, apply the voltage corresponding to the voltage value in the second element in the array to the fire two-wire bus, until the timing ends for the loading value corresponding to the last element in the array, then it is determined that the target command has been sent successfully.

[0053] In this embodiment, when the target command is received and the priority of the target command is lower than the priority of the inspection command, the inspection command is converted into a target array; when the priority of the target command is higher than the priority of the inspection command, after the target command is sent successfully, the inspection command is converted into a target array to ensure that the command with a higher priority is sent first, thereby improving the timeliness of the fire protection system.

[0054] Figure 3 is the overall flowchart of sending data based on the fire protection system provided by the embodiment of the present invention. As Figure 3 shown, first, initialize the system timer, sending timer and other timers, CAN peripherals and sending data structures of the fire protection system, determine whether a setting command or a query command is received. When the setting command or the query command is received and the priority of the setting command or the query command is higher than the priority of the inspection command, after the setting command or the query command is sent successfully, the inspection command is converted into a target array; when the priority of the setting command or the query command is lower than the priority of the inspection command, directly convert the inspection command into a target array; when the sending interval duration of the system timer arrives, start the sending timer, and set the duration included in the first element in the target array as the first loading value of the sending timer, apply the voltage corresponding to the voltage value in the first element to the fire two-wire bus, and start timing by the sending timer based on the first loading value. After the timing ends, stop applying the voltage corresponding to the voltage value in the first element to the fire two-wire bus, and set the duration included in the second element in the target array as the new first loading value of the sending timer, apply the voltage corresponding to the voltage value in the second element to the fire two-wire bus, and count the number of bits sent. When the number of bits sent reaches the total number of bits corresponding to the inspection command, it is determined that one frame of data has been sent, that is, the inspection command has been sent.

[0055] Figure 4 It is the second schematic flow chart of the data communication method based on the fire protection system provided by the embodiment of the present invention. As Figure 4 shown, it is applied to fire protection peripherals. The data communication method based on the fire protection system includes the following steps: Step 401: When the voltage applied to the fire protection two-wire bus is the target voltage value, collect the voltage of the fire protection two-wire bus based on a preset time interval to obtain the target voltage. The voltage applied to the fire protection two-wire bus is the voltage obtained by converting the inspection command into a target array, starting from the first element in the target array, setting the duration included in the first element as the first load value of the sending timer, and then applying the voltage based on the voltage value included in the first element.

[0056] Among them, the target voltage value can be the first value, and the preset time interval can be set based on requirements. For example, the preset time interval is 25 us, and the present invention does not make any limitations in this regard.

[0057] Exemplarily, according to the characteristics of the FBUS fire protection two-wire bus protocol, when the transmitted data is at the first value, it is used as the moment for receiving data within the overall protocol, and the analog-to-digital (AD) channel is pre-configured. When the voltage applied to the fire protection two-wire bus is the first value, the fire protection peripheral corresponding to the peripheral address included in the inspection command collects the voltage of the fire protection two-wire bus through the AD channel at a preset time interval of 25 us to obtain the target voltage.

[0058] The data communication method based on the fire protection system provided by the present invention converts the inspection command into a target array. The elements in the target array correspond one by one to the bit positions in the inspection command, and the elements include a voltage value and the duration of the voltage value. Starting from the first element in the target array, the duration included in the first element is set as the first loading value of the sending timer. A voltage corresponding to the voltage value in the first element is applied to the fire protection two-wire bus, and the sending timer is timed based on the first loading value; after the timing ends, the voltage corresponding to the voltage value in the first element is stopped from being applied to the fire protection two-wire bus, and the duration included in the second element in the target array is set as the new first loading value of the sending timer. A voltage corresponding to the voltage value in the second element is applied to the fire protection two-wire bus until the timing of the first loading value corresponding to the last element in the target array ends. The fire protection peripheral device collects the voltage of the fire protection two-wire bus at a preset time interval to obtain the target voltage. It can be seen that in the present invention, each time a voltage is applied to the fire protection two-wire bus, the loading value of the sending timer is set based on the duration included in the corresponding element. The sending timer can accurately control the transmission time and timing of the voltage signal on the fire protection two-wire bus through the loading value set each time, effectively solving the problem that the data transmission time of each branch is inconsistent due to the tree structure being incorrectly connected into a branch structure, or the problem that the signal is repeatedly transmitted in the loop due to the ring structure being incorrectly connected into a large loop enclosing a small loop, thereby improving the accuracy of data communication.

[0059] In an embodiment, when the voltage applied to the fire protection two-wire bus in step 401 is the target voltage value, the voltage of the fire protection two-wire bus is collected at a preset time interval to obtain the target voltage, which can be specifically implemented in the following manner: When the voltage applied to the fire protection two-wire bus is the target voltage value, the voltage of the fire protection two-wire bus is collected a preset number of times at the preset time interval; when the current voltage value is collected, the current voltage value is subjected to amplitude limiting filtering processing based on the previously collected voltage value to obtain the processed current voltage value; based on each of the processed current voltage values, the target voltage is determined.

[0060] Among them, the preset number of times can be determined based on the duration of the voltage. For example, the preset number of times is 12 times.

[0061] Exemplarily, when the voltage applied to the second fire bus is the first value, the fire peripherals corresponding to the peripheral addresses included in the inspection command collect the voltage of the second fire bus through the AD channel at a preset time interval of 25 μs, and the number of collections is 12 times. The method of amplitude-limiting filtering is used to confirm whether the difference between the voltage values collected twice is greater than the allowable maximum deviation. If the difference between the current voltage value and the previous voltage value is greater than the allowable maximum deviation, it is considered that the current voltage value is invalid, and the previous voltage value needs to be used to replace the current voltage value to obtain the processed current voltage value. Each time a voltage value is collected, it is compared with the previous processed voltage value until 12 times of collection are completed, and 12 voltage values are obtained. Some of these 12 voltage values have undergone amplitude-limiting filtering processing, and some have not. The average value of these 12 voltage values is taken or the final target voltage is obtained by voting. The target voltage is analyzed to obtain the corresponding level signal, and this level signal is a bit data received by the fire peripheral from the second fire bus. After a inspection command is sent, the fire peripheral receives all the bit data for this inspection command, that is, the received data corresponding to this inspection command.

[0062] In this embodiment, the voltage of the second fire bus is collected a preset number of times based on a preset time interval. When the current voltage value is collected, the current voltage value is subjected to amplitude-limiting filtering processing based on the previously collected voltage value to obtain the processed current voltage value. Finally, the target voltage is determined based on each processed current voltage value. This amplitude-limiting filtering method can effectively overcome the pulse interference caused by accidental factors, that is, it can overcome problems such as pulse interference caused when the tree structure is wrongly connected into a branch structure or the ring structure is wrongly connected into a form of large circle enclosing small circle, improving the accuracy of target voltage collection.

[0063] In one embodiment, when the voltage applied to the second fire bus in step 401 is the target voltage value, the voltage of the second fire bus is collected based on a preset time interval to obtain the target voltage, and it can also be implemented in the following manner: When the voltage applied to the second fire bus is the target voltage value, start the reception timer and set the preset duration as the second load value of the reception timer; control the reception timer to count based on the second load value; after the counting ends, collect the voltage of the second fire bus based on the preset time interval to obtain the target voltage.

[0064] Among them, since the shortest duration of receiving data is the second duration, the preset duration can be set to 100 μs.

[0065] For example, when the voltage applied to the second fire bus is the first value, the reception timer is started, and 100 μs is set as the second load value of the reception timer. The reception timer is controlled to count based on the second load value. After the second load value counts down to zero, the voltage of the second fire bus is collected by the AD module at preset time intervals to avoid collecting unstable signals or interference signals.

[0066] In this embodiment, when the voltage applied to the second fire bus is the target voltage value, the reception timer is started, and the preset duration is set as the second load value of the reception timer. The reception timer is controlled to count based on the second load value. After the counting ends, the voltage of the second fire bus is collected at preset time intervals to obtain the target voltage, so as to avoid collecting unstable signals or interference signals when the tree structure is wrongly connected into a branch structure or the ring structure is wrongly connected into a form of big circle enclosing small circle, that is, the unstable signals or interference signals are filtered by the preset duration, further improving the accuracy and effectiveness of the target voltage collection.

[0067] In one embodiment, after the above step 401, the data communication method based on the fire protection system further includes the following steps: Based on the target voltages collected at each of the target voltage values, the received data is determined; the received data is parity-checked to obtain a first check result, and the peripheral address and data content in the received data are checked to obtain a second check result; when both the first check result and the second check result indicate successful checks, the received data is uploaded to the fire protection system via the CAN bus.

[0068] For example, when obtaining the target voltages collected at each target voltage value for the inspection command, based on the voltage values of each target voltage and the duration of each target voltage, determine the level signals corresponding to each target voltage. For example, if the target voltage is the second value and the duration is the first duration, the corresponding level signal is 1; if the target voltage is the second value and the duration is the second duration, the corresponding level signal is 0. Combine the level signals corresponding to each target voltage in sequence to obtain the received data corresponding to this inspection command. If the FBUS fire two-wire protocol stipulates that even parity is used for parity check, determine the number of 1s in the received data. When the number of 1s is even, the parity bit is obtained as 0. If the received parity bit is also 0, the first verification result is verification success; taking the inspection command as an example of viewing the status information of the fire peripheral 1, parse the received data. If there is data on the bit representing the status information and the data on the bit representing the peripheral address is the same as the actual peripheral address of this fire peripheral, the second verification result is verification success. When both the first verification result and the second verification result are verification success, it indicates that the received data collected is correct. At this time, upload the received data to the fire system through the CAN bus for further processing; when the first verification result or the second verification result is verification failure, it indicates that the received data collected is incorrect.

[0069] In this embodiment, perform parity check on the received data to obtain the first verification result, and check the peripheral address and data content in the received data to obtain the second verification result. When both the first verification result and the second verification result indicate verification success, upload the received data to the fire system through the CAN bus to ensure the accuracy of the received data uploaded to the fire system, and further improve the accuracy and security of the control of the entire fire system.

[0070] Figure 5 is the overall flow diagram of the received data based on the fire system provided by the embodiment of the present invention, as Figure 5As shown in the figure, first, initialize the receiving timer of the fire protection system and the FBUS fire protection two-wire bus. Determine whether the voltage applied to the fire protection two-wire bus is the first value (target voltage value). When the voltage applied to the fire protection two-wire bus is not the first value, data acquisition is not performed; when the voltage applied to the fire protection two-wire bus is the first value, start the receiving timer, set the preset duration (100 us) as the second loading value of the receiving timer. After the second loading value timing ends, collect the voltage of the fire protection two-wire bus through the AD channel at a preset time interval (25 us), and the number of acquisitions is the preset number (12 times). And judge and process the voltage value collected each time through the processing method of limit filtering to obtain the received data corresponding to one bit. Since one inspection command corresponds to 29 bits, the 29 bits are represented by alternating first values and second values, and the first bit is represented by the first value, so there are 15 first values in the 29 bits. Therefore, when it is determined that 15 bits of data have been received, it is determined that the inspection command reception is completed, and the received data is verified. After the verification is successful, the received data is uploaded to the fire protection system through the CAN bus to perform subsequent steps.

[0071] The data communication device based on the fire protection system provided by the present invention will be described below. The data communication device based on the fire protection system described below can be mutually corresponding and referred to the data communication method based on the fire protection system described above.

[0072] Figure 6 is a schematic structural diagram of the data communication device based on the fire protection system provided by the embodiment of the present invention, as Figure 6 shown, the data communication device 600 based on the fire protection system includes a conversion unit 601, a setting unit 602, a first application unit 603, a timing unit 604, and a second application unit 605; wherein: The conversion unit 601 is used to convert the inspection command into a target array, and the elements in the target array correspond one-to-one with the bits in the inspection command, and the elements include voltage values and the duration of the voltage values; The setting unit 602 is used to start from the first element in the target array and set the duration included in the first element as the first loading value of the sending timer; The first application unit 603 is used to apply the voltage corresponding to the voltage value in the first element to the fire protection two-wire bus; The timing unit 604 is used to time based on the first loading value through the sending timer; A second application unit 605, configured to, after the timing ends, stop applying the voltage corresponding to the voltage value in the first element to the fire fighting two-wire bus, set the duration included in the second element in the target array as a new first loading value of the sending timer, and apply the voltage corresponding to the voltage value in the second element to the fire fighting two-wire bus until the timing of the first loading value corresponding to the last element in the target array ends.

[0073] The data communication device based on the fire fighting system provided by the present invention converts the inspection command into a target array. The elements in the target array correspond one by one to the bit positions in the inspection command, and each element includes a voltage value and the duration of the voltage value. Starting from the first element in the target array, set the duration included in the first element as the first loading value of the sending timer, apply the voltage corresponding to the voltage value in the first element to the fire fighting two-wire bus, and perform timing based on the first loading value through the sending timer; after the timing ends, stop applying the voltage corresponding to the voltage value in the first element to the fire fighting two-wire bus, set the duration included in the second element in the target array as a new first loading value of the sending timer, and apply the voltage corresponding to the voltage value in the second element to the fire fighting two-wire bus until the timing of the first loading value corresponding to the last element in the target array ends. It can be seen that in the present invention, each time a voltage is applied to the fire fighting two-wire bus, the loading value of the sending timer is set based on the duration included in the corresponding element. The sending timer can accurately control the transmission time and timing of the voltage signal on the fire fighting two-wire bus through the loading value set each time, effectively solving the problem that the incorrect connection of the tree structure into a branch structure leads to inconsistent data transmission times for each branch, or the problem that the incorrect connection of the ring structure into a large loop enclosing a small loop causes the signal to be repeatedly transmitted in the loop, thereby improving the accuracy of data communication.

[0074] Based on any of the above embodiments, the setting unit 602 is specifically configured to: After the sending interval duration of the system timer arrives, start the sending timer, and set the duration included in the first element as the first loading value of the sending timer, where the sending interval duration is used to represent the interval duration for sending the inspection command.

[0075] Based on any of the above embodiments, the conversion unit 601 is specifically configured to: When receiving a target command and the priority of the target command is lower than the priority of the inspection command, convert the inspection command into the target array, where the target command includes a setting command or a query command; When the priority of the target command is higher than the priority of the inspection command, after the target command is sent, convert the inspection command into the target array.

[0076] The data communication device based on the fire protection system provided by the embodiment of the present invention includes an acquisition unit; wherein: The acquisition unit is configured to, when the voltage applied to the fire protection two-wire bus is the target voltage value, collect the voltage of the fire protection two-wire bus based on a preset time interval to obtain a target voltage. The voltage applied to the fire protection two-wire bus is the voltage obtained by converting the inspection command into a target array, starting from the first element in the target array, setting the duration included in the first element as the first loading value of the transmission timer, and then applying the voltage based on the voltage value included in the first element.

[0077] The data communication device based on the fire protection system provided by the present invention converts the inspection command into a target array. The elements in the target array correspond one-to-one with the bit positions in the inspection command, and each element includes a voltage value and the duration of the voltage value. Starting from the first element in the target array, the duration included in the first element is set as the first loading value of the transmission timer, the voltage corresponding to the voltage value in the first element is applied to the fire protection two-wire bus, and the transmission timer is used to time based on the first loading value; after the timing ends, the voltage corresponding to the voltage value in the first element applied to the fire protection two-wire bus is stopped, and the duration included in the second element in the target array is set as the new first loading value of the transmission timer, and the voltage corresponding to the voltage value in the second element is applied to the fire protection two-wire bus until the timing of the first loading value corresponding to the last element in the target array ends. The fire protection peripheral device collects the voltage of the fire protection two-wire bus based on a preset time interval to obtain a target voltage. It can be seen that in the present invention, each time a voltage is applied to the fire protection two-wire bus, the loading value of the transmission timer is set based on the duration included in the corresponding element. The transmission timer can accurately control the transmission time and timing of the voltage signal on the fire protection two-wire bus through the loading value set each time, effectively solving the problem that the incorrect connection of the tree structure into a branch structure leads to inconsistent data transmission times for each branch, or the incorrect connection of the ring structure into a large loop enclosing a small loop resulting in the repeated transmission of signals in the loop, thereby improving the accuracy of data communication.

[0078] Based on any of the above embodiments, the acquisition unit is specifically configured to: When the voltage applied to the fire protection two-wire bus is the target voltage value, collect the voltage of the fire protection two-wire bus a preset number of times based on the preset time interval; When the current voltage value is collected, perform amplitude limiting filtering processing on the current voltage value based on the previously collected voltage value to obtain the processed current voltage value; Determine the target voltage based on each of the processed current voltage values.

[0079] Based on any of the above embodiments, the acquisition unit is specifically configured to: When the voltage applied to the second fire bus is the target voltage value, start the reception timer and set the preset duration as the second load value of the reception timer; Control the reception timer to count based on the second load value; After the counting ends, collect the voltage of the second fire bus based on the preset time interval to obtain the target voltage.

[0080] Based on any of the above embodiments, the data communication device based on the fire protection system further includes: A determination unit, configured to determine received data based on the target voltages collected under each of the target voltage values; A verification unit, configured to perform parity verification on the received data to obtain a first verification result, and verify the peripheral address and data content in the received data to obtain a second verification result; An upload unit, configured to upload the received data to the fire protection system through the CAN bus when both the first verification result and the second verification result indicate successful verification.

[0081] Figure 7 It is a schematic physical structure diagram of an electronic device provided by an embodiment of the present invention. As Figure 7 shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730, and a communication bus 740. Among them, the processor 710, the communication interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 can call the logical instructions in the memory 730 to execute the data communication method based on the fire protection system. The method includes: converting the inspection command into a target array, where the elements in the target array correspond one-to-one with the bit positions in the inspection command, and the elements include voltage values and the duration of the voltage values; Starting from the first element in the target array, set the duration included in the first element as the first load value of the transmission timer; Apply the voltage corresponding to the voltage value in the first element to the second fire bus, and count through the transmission timer based on the first load value; After the counting ends, stop applying the voltage corresponding to the voltage value in the first element to the second fire bus, and set the duration included in the second element in the target array as the new first load value of the transmission timer, and apply the voltage corresponding to the voltage value in the second element to the second fire bus until the counting of the first load value corresponding to the last element in the target array ends.

[0082] Or execute the following method: When the voltage applied to the second fire bus is the target voltage value, voltage acquisition is performed on the second fire bus based on a preset time interval to obtain the target voltage. The voltage applied to the second fire bus is obtained by converting the inspection command into a target array. Starting from the first element in the target array, after setting the duration included in the first element as the first load value of the transmission timer, the voltage is applied based on the voltage value included in the first element.

[0083] In addition, when the logical instructions in the above-mentioned memory 730 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs, etc., which can store program codes.

[0084] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the data communication method based on the fire protection system provided by the above-mentioned various methods. The method includes: converting the inspection command into a target array, where the elements in the target array correspond one-to-one with the bit positions in the inspection command, and the elements include a voltage value and the duration of the voltage value; Starting from the first element in the target array, setting the duration included in the first element as the first load value of the transmission timer; Applying the voltage corresponding to the voltage value in the first element to the second fire bus, and timing based on the first load value through the transmission timer; After the timing ends, stop applying the voltage corresponding to the voltage value in the first element to the second fire bus, and set the duration included in the second element in the target array as the new first load value of the transmission timer, and apply the voltage corresponding to the voltage value in the second element to the second fire bus until the timing of the first load value corresponding to the last element in the target array ends.

[0085] Alternatively, when the program instructions are executed by a computer, the computer can implement the following method: When the voltage applied to the fire protection two-wire bus is the target voltage value, voltage acquisition of the fire protection two-wire bus is performed at preset time intervals to obtain a target voltage. The voltage applied to the fire protection two-wire bus is the voltage obtained by converting an inspection command into a target array, starting from the first element in the target array, setting the duration included in the first element as the first load value of a transmission timer, and then applying the voltage based on the voltage value included in the first element.

[0086] In another aspect, the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is used to execute the data communication method based on a fire protection system provided by the above various methods. The method includes: converting an inspection command into a target array, where the elements in the target array correspond one-to-one with the bit positions in the inspection command, and the elements include a voltage value and the duration of the voltage value; Starting from the first element in the target array, setting the duration included in the first element as the first load value of a transmission timer; Applying the voltage corresponding to the voltage value in the first element to the fire protection two-wire bus, and timing based on the first load value through the transmission timer; After the timing ends, stopping applying the voltage corresponding to the voltage value in the first element to the fire protection two-wire bus, setting the duration included in the second element in the target array as the new first load value of the transmission timer, applying the voltage corresponding to the voltage value in the second element to the fire protection two-wire bus, until the timing of the first load value corresponding to the last element in the target array ends.

[0087] Alternatively, when the computer program is executed by a processor, it can implement the following method: When the voltage applied to the fire protection two-wire bus is the target voltage value, voltage acquisition of the fire protection two-wire bus is performed at preset time intervals to obtain a target voltage. The voltage applied to the fire protection two-wire bus is the voltage obtained by converting an inspection command into a target array, starting from the first element in the target array, setting the duration included in the first element as the first load value of a transmission timer, and then applying the voltage based on the voltage value included in the first element.

[0088] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative work.

[0089] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features. And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data communication method based on a fire protection system, characterized in that, The fire protection system includes a management circuit board and multiple fire protection peripherals. Each fire protection peripheral is connected to the management circuit board through a fire protection two-wire bus and is applied to the management circuit board. The method includes: Convert the inspection command into a target array, where the elements in the target array correspond one-to-one with the bit positions in the inspection command, and the element includes a voltage value and the duration of the voltage value; Starting from the first element in the target array, set the duration included in the first element as the first loading value of the sending timer; Apply the voltage corresponding to the voltage value in the first element to the fire protection two-wire bus, and time based on the first loading value through the sending timer; After the timing ends, stop applying the voltage corresponding to the voltage value in the first element to the fire protection two-wire bus, and set the duration included in the second element in the target array as the new first loading value of the sending timer, and apply the voltage corresponding to the voltage value in the second element to the fire protection two-wire bus until the timing of the first loading value corresponding to the last element in the target array ends.

2. The data communication method based on a fire protection system according to claim 1, wherein The setting the duration included in the first element as the first loading value of the sending timer includes: After the sending interval duration of the system timer arrives, start the sending timer, and set the duration included in the first element as the first loading value of the sending timer. The sending interval duration is used to represent the interval duration for sending inspection commands.

3. The data communication method based on a fire protection system according to claim 1, wherein, The converting the inspection command into a target array includes: When a target command is received and the priority of the target command is lower than the priority of the inspection command, convert the inspection command into the target array. The target command includes a setting command or a query command; When the priority of the target command is higher than the priority of the inspection command, after the target command is sent, convert the inspection command into the target array.

4. A data communication method based on a fire protection system, characterized in that, Applied to the fire protection peripheral, the method includes: When the voltage applied to the fire protection two-wire bus is the target voltage value, collect the voltage of the fire protection two-wire bus at a preset time interval to obtain the target voltage. The voltage applied to the fire protection two-wire bus is the voltage applied based on the voltage value included in the first element after converting the inspection command into a target array and setting the duration included in the first element as the first loading value of the sending timer.

5. The data communication method based on a fire protection system according to claim 4, wherein The collecting the voltage of the fire protection two-wire bus at a preset time interval to obtain the target voltage when the voltage applied to the fire protection two-wire bus is the target voltage value includes: When the voltage applied to the fire protection two-wire bus is the target voltage value, collect the voltage of the fire protection two-wire bus a preset number of times at the preset time interval; When the current voltage value is collected, perform a clipping filtering process on the current voltage value based on the previously collected voltage value to obtain the processed current voltage value; Based on each of the processed current voltage values, determine the target voltage.

6. The data communication method based on a fire protection system according to claim 4, wherein When the voltage applied to the fire two-wire bus is the target voltage value, voltage acquisition of the fire two-wire bus is performed based on a preset time interval to obtain a target voltage, including: When the voltage applied to the fire two-wire bus is the target voltage value, start a receiving timer and set a preset duration as the second load value of the receiving timer; Control the receiving timer to count based on the second load value; After the counting ends, voltage acquisition of the fire two-wire bus is performed based on the preset time interval to obtain the target voltage.

7. The data communication method based on a fire protection system according to any one of claims 4-6, characterized in that The method further includes: Determine received data based on the target voltage acquired at each target voltage value; Perform parity check on the received data to obtain a first check result, and perform check on the peripheral address and data content in the received data to obtain a second check result; When both the first check result and the second check result indicate successful check, upload the received data to the fire protection system via the CAN bus.

8. A data communication device based on a fire protection system, characterized in that, Including: A conversion unit for converting an inspection command into a target array, where the elements in the target array correspond one-to-one to the bit positions in the inspection command, and the elements include a voltage value and the duration of the voltage value; A setting unit for starting from the first element in the target array, setting the duration included in the first element as the first load value of a sending timer; A first application unit for applying a voltage corresponding to the voltage value in the first element to the fire two-wire bus; A timing unit for counting through the sending timer based on the first load value; A second application unit for, after the counting ends, stopping applying the voltage corresponding to the voltage value in the first element to the fire two-wire bus, setting the duration included in the second element in the target array as the new first load value of the sending timer, and applying the voltage corresponding to the voltage value in the second element to the fire two-wire bus until the counting of the first load value corresponding to the last element in the target array ends.

9. A data communication device based on a fire protection system, characterized in that, Including: An acquisition unit for, when the voltage applied to the fire two-wire bus is the target voltage value, performing voltage acquisition of the fire two-wire bus based on a preset time interval to obtain a target voltage, where the voltage applied to the fire two-wire bus is the voltage applied based on the voltage value included in the first element after converting the inspection command into a target array and setting the duration included in the first element as the first load value of the sending timer.

10. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the data communication method based on the fire protection system according to any one of claims 1 to 3, or implements the data communication method based on the fire protection system according to any one of claims 4 to 7.

11. A non-transitory computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by a processor, it implements the data communication method based on the fire protection system according to any one of claims 1 to 3, or implements the data communication method based on the fire protection system according to any one of claims 4 to 7.

12. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the data communication method based on a fire protection system according to any one of claims 1 to 3, or implements the data communication method based on a fire protection system according to any one of claims 4 to 7.

Citation Information

Patent Citations

  • Communication method and system of fire-fighting equipment based on two buses

    CN110430109A

  • Two-bus coding method, two-bus decoding method, equipment, system and medium

    CN117692272A

  • Ring bus fire alarm system, control method, electronic equipment and storage medium

    CN118470929A

  • Fire alarm system, method and device

    CN118747946A

  • Fire-fighting power two-bus power supply and communication method and device based on PWM

    CN119484173A