Data communication method, device and electronic equipment based on fire protection system
By converting inspection commands into target arrays in the fire protection system and setting the loading value of the transmission timer on the fire protection bus, the problem of inconsistent data transmission caused by wiring errors was solved, thereby improving the accuracy of data communication and the efficiency of fire protection detection.
Patent Information
- Application Number
- CN202510687478.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-05-27
AI Technical Summary
In existing fire protection systems, wiring errors can cause tree-like structures to become branch-like structures or ring-like structures to become large loops containing smaller loops, reducing the accuracy of data communication.
By converting inspection commands into target arrays and setting the loading value of the transmission timer based on the duration of the corresponding element when applying voltage to the fire protection bus, the transmission time and timing of the voltage signal are precisely controlled, ensuring that the transmission time and timing of the voltage signal are consistent each time.
It improved the accuracy of data communication, solved the problem of inconsistent data transmission caused by wiring errors, and improved the accuracy of fire detection and rescue efficiency.
Smart Images

Figure CN120201062B_ABST
Abstract
Description
Technical Field
[0001] This 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 smart city automation, smart fire protection systems have become an indispensable intelligent control fire protection system for modern urban smart transportation and buildings due to their high reliability, stability, rapid response, and convenient construction.
[0003] In related technologies, during the wiring process of fire protection system peripherals, wiring deviations are inevitable. This can cause tree-like wiring to end up as branching tree structures, or loop-like wiring to end up as large loops containing smaller loops. In cases of such wiring errors, using the existing communication methods of the fire protection two-wire bus for data communication will reduce the accuracy of data communication. Summary of the Invention
[0004] This invention provides a data communication method, device, and electronic device based on a fire protection system to address the shortcomings of existing technologies that reduce the accuracy of data communication.
[0005] This invention provides a data communication method based on a fire protection system. The fire protection system includes a management loop board and multiple fire protection peripherals. Each fire protection peripheral is connected to the management loop board via a fire protection two-wire bus and is applied to the management loop board. The method includes:
[0006] The inspection command is converted into a target array, and the elements in the target array correspond one-to-one with the bits in the inspection command. The elements include the voltage value and the duration of the voltage value.
[0007] Starting from the first element in the target array, set the duration included in the first element as the first load value of the sending timer;
[0008] The voltage corresponding to the voltage value in the first element is applied to the fire protection bus, and the transmission timer is used to time the event based on the first loaded value.
[0009] After the timing ends, stop applying the voltage corresponding to the voltage value in the first element to the fire protection bus, and set the duration included in the second element of 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 protection bus until the timing of the first loading value corresponding to the last element in the target array ends.
[0010] According to a data communication method based on a fire protection system provided by the present invention, setting the duration included in the first element as the first loaded value of the transmission timer includes:
[0011] After the system timer's transmission interval duration is reached, the transmission timer is started, and the duration included in the first element is set as the first load value of the transmission timer. The transmission interval duration is used to characterize the interval duration for sending inspection commands.
[0012] According to a data communication method based on a fire protection system provided by the present invention, the step of converting inspection commands into a target array includes:
[0013] Upon receiving a target command, and if the priority of the target command is lower than that of the inspection command, the inspection command is converted into the target array, wherein the target command includes a setting command or a query command.
[0014] If the priority of the target command is higher than that of the inspection command, the inspection command is converted into the target array after the target command is sent.
[0015] This invention also provides a data communication method based on a fire protection system, applied to fire protection peripherals, the method comprising:
[0016] When the voltage applied on the fire protection bus is the target voltage value, the voltage of the fire protection bus is collected based on a preset time interval to obtain the target voltage. The voltage applied on the fire protection bus is the voltage applied based on the voltage value of the first element after 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.
[0017] 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 secondary bus is a target voltage value, voltage acquisition is performed on the fire protection secondary bus based on a preset time interval to obtain the target voltage, including:
[0018] When the voltage applied to the fire protection bus is the target voltage value, the voltage of the fire protection bus is collected a preset number of times based on the preset time interval;
[0019] When the current voltage value is acquired, the current voltage value is subjected to amplitude limiting and filtering based on the previously acquired voltage value to obtain the processed current voltage value.
[0020] The target voltage is determined based on the current voltage value after each of the aforementioned processes.
[0021] 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 secondary bus is a target voltage value, voltage acquisition is performed on the fire protection secondary bus based on a preset time interval to obtain the target voltage, including:
[0022] When the voltage applied to the fire-fighting bus is the target voltage value, the receiving timer is started and the preset duration is set to the second loading value of the receiving timer;
[0023] The receive timer is controlled to start timing based on the second load value;
[0024] After the timing ends, the voltage of the fire protection bus is collected based on the preset time interval to obtain the target voltage.
[0025] According to a data communication method based on a fire protection system provided by the present invention, the method further includes:
[0026] Based on the target voltage collected at each of the aforementioned target voltage values, the received data is determined;
[0027] 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.
[0028] If both the first and second verification results indicate successful verification, the received data is uploaded to the fire protection system via the CAN bus.
[0029] The present invention also provides a data communication device based on a fire protection system, comprising:
[0030] A conversion unit is used to convert an inspection command into a target array, wherein the elements in the target array correspond one-to-one with the bits in the inspection command, and the elements include a voltage value and the duration of the voltage value.
[0031] The setting unit is configured to set the duration included in the first element of the target array as the first load value of the sending timer, starting from the first element in the target array.
[0032] The first application unit is used to apply the voltage corresponding to the voltage value in the first element to the fire protection bus;
[0033] A timing unit is used to perform timing based on the first loading value using the transmission timer;
[0034] The second application unit is used to stop applying the voltage corresponding to the voltage value in the first element to the fire-fighting bus after the timing ends, and to set the duration included in the second element of 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-fighting bus until the timing of the first loading value corresponding to the last element in the target array ends.
[0035] The present invention also provides a data communication device based on a fire protection system, comprising:
[0036] The acquisition unit is used to acquire the voltage of the fire protection bus based on a preset time interval when the voltage applied on the fire protection bus is the target voltage value. The voltage applied on the fire protection bus is the voltage applied based on the voltage value of the first element after 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 to the first load value of the sending timer.
[0037] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the data communication method based on the fire protection system as described above.
[0038] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data communication method based on the fire protection system as described above.
[0039] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the data communication method based on the fire protection system as described above.
[0040] The present invention provides a data communication method, device, and electronic device based on a fire protection system. The method converts inspection commands into a target array, where each element corresponds one-to-one with a bit in the inspection command. Each element includes a voltage value and its duration. Starting with the first element in the target array, the duration of the first element is set as the first load value of a transmission timer. The voltage corresponding to the voltage value in the first element is applied to the fire protection bus, and the transmission timer counts based on the first load value. After the countdown ends, the application of the voltage corresponding to the voltage value in the first element to the fire protection bus is stopped. The duration of the second element in the target array is then 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 protection bus until the countdown for the first load value corresponding to the last element in the target array ends. As can be seen, this invention sets the loading value of the transmission timer based on the duration of the corresponding element each time voltage is applied to the fire protection bus. The transmission timer can accurately control the transmission time and timing of the voltage signal on the fire protection bus by setting the loading value each time. This effectively solves the problem of inconsistent data transmission time of each branch due to incorrect connection of the tree structure into a branch structure, or the problem of repeated signal transmission in the loop due to incorrect connection of the ring structure into a large loop containing a small loop, thereby improving the accuracy of data communication. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0042] Figure 1 This is one of the flowcharts illustrating the data communication method based on a fire protection system provided in this embodiment of the invention.
[0043] Figure 2 This is a structural schematic diagram of the fire protection system provided in an embodiment of the present invention.
[0044] Figure 3 This is a schematic diagram of the overall process of sending data based on a fire protection system provided in an embodiment of the present invention.
[0045] Figure 4 This is the second flowchart illustrating the data communication method based on a fire protection system provided in this embodiment of the invention.
[0046] Figure 5 This is a schematic diagram of the overall process of receiving data based on a fire protection system, provided in an embodiment of the present invention.
[0047] Figure 6This is a schematic diagram of the structure of a data communication device based on a fire protection system provided in an embodiment of the present invention.
[0048] Figure 7 This is a schematic diagram of the physical structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0050] A fire protection system mainly includes: a Human-Machine Interface (HMI), computing modules, keypads, Controller Area Network (CAN) conversion boards, multiple management loop boards, fire display panels, and various fire protection peripherals, such as temperature sensors, smoke sensors, isolation modules, input / output control modules, relay modules, input modules, manual call points, fire hydrant modules, and bus repeater modules. The layout and number of boards installed vary depending on the application scenario.
[0051] There are two topology connection methods for 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, one of which is composed of 2 tree loops connected together.
[0052] In the wiring process of high-rise buildings or urban rail transit, the tree-structure wiring method involves parallel connection of each fire protection peripheral device, while the FBUS fire protection bus connects each peripheral device in series within the loop. Ideally, this is the standard wiring method. However, due to inevitable deviations during construction, wiring errors can occur. Therefore, the tree-structure wiring method may eventually result in a branch-like structure, and the ring-structure wiring method may eventually result in a large loop containing smaller loops. In such fire protection wiring scenarios, using the existing communication methods of the fire protection bus for data communication will reduce the accuracy of data communication.
[0053] Based on this, the present invention provides a data communication method based on a fire protection system. Each time voltage is applied to the fire protection bus, the loading value of the transmission timer is set based on the duration of the corresponding element. The transmission timer can precisely control the transmission time and timing of the voltage signal on the fire protection bus by setting the loading value each time. This effectively solves the problem of inconsistent data transmission time of each branch due to incorrect connection of a tree structure into a branch structure, or the problem of repeated signal transmission in the loop due to incorrect connection of a ring structure into a large loop containing a small loop, thereby improving the accuracy of data communication.
[0054] The following is combined Figures 1-5 This invention describes a data communication method based on a fire protection system. The executing entity of this data communication method can be an electronic device such as a management loop board in the fire protection system, or a data communication device based on the fire protection system installed in the electronic device. This data communication device can be implemented through software, hardware, or a combination of both.
[0055] Figure 1 This is one of the flowcharts illustrating a data communication method based on a fire protection system provided in this embodiment of the invention. The fire protection system includes a management loop board and multiple fire protection peripherals. Each of the fire protection peripherals is connected to the management loop board via a fire protection secondary bus and is applied to the management loop board, such as... Figure 1 As shown, the data communication method based on the fire protection system includes the following steps:
[0056] Step 101: Convert the inspection command into a target array. The elements in the target array correspond one-to-one with the bits in the inspection command. The elements include the voltage value and the duration of the voltage value.
[0057] For example, Figure 2 This is a structural schematic diagram of the fire protection system provided in an embodiment of the present invention, such as... Figure 2 As shown, the fire protection system includes an HMI (Human-Machine Interface), calculation boards, keypad boards, CAN communication boards, fire display panels, multiple management loop boards, and multiple fire protection peripherals. The connection relationships between the modules are as follows: Figure 2As shown, management loop board 1 includes loop 1 and loop 2, management loop board 2 includes loop 3 and loop 4, and management loop board n includes loop n×2-1 and loop n×2, where n is a positive integer. The HMI (Human Machine Interface) includes a network port and an RS485 interface. The computing board has two built-in CAN ports and a network port. The button board includes an RS485 interface. The CAN communication board includes a multi-channel CAN conversion interface board. The fire display panel includes one CAN port, one FBUS bus, and one RS485 bus. The management loop board includes one CAN port, two RS485 buses, and an FBUS communication interface. The fire peripherals include an FBUS fire two-bus communication interface. For example, the fire peripherals can be smoke detectors, heat detectors, fire hydrant modules, input / output modules, and fire display panels, etc. Each loop can connect 220 fire peripherals.
[0058] For example, due to the special nature of the FBUS fire protection bus protocol, the transmitted voltage value varies between a first value and a second value, where the second value is greater than the first value. A voltage duration of the first duration represents an output of 1, and a voltage duration of the second duration represents an output of 0. Since the first duration is greater than the second duration, when the management loop board needs to send an inspection command to the fire protection peripheral, it must first convert the inspection command into a target array. For example, if the inspection command is to check the status information of fire protection peripheral 1, assuming the binary data 11001010 is used to represent this command, then for the first bit 1 in the binary data 11001010, the corresponding voltage value is the first value, and the duration of the first voltage 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 second voltage value is... The first duration is determined by the voltage value corresponding to the third bit 0 in the binary data 11001010. The duration of the first voltage value is the second duration. Similarly, the voltage value corresponding to the fourth bit 0 in the binary data 11001010 is the second voltage value, and the duration of the second voltage value is the second duration. This process is repeated, and the voltage value and duration of each bit are used as elements in the target array. The elements are then arranged according to the bit order to obtain the target array corresponding to the inspection command. This target array is then added to the transmit data field of the transmit data structure of the FBUS fire protection bus protocol. The voltage values in the target array alternate between the first and second values. The alternation of the first and second values, as well as the duration of the first and second values, represents the high level 1 and the low level 0.
[0059] It should be noted that, in practical applications, the first value, the second value, the first duration, and the second duration in this invention can be set based on requirements, and this invention does not limit them.
[0060] It should be noted that in the FBUS fire protection bus protocol, the data bits for transmitting data are usually specified as 29 bits. Therefore, the above example of using binary data 11001010 to represent the inspection command is only an example. In actual applications, the binary data corresponding to the inspection command is 29 bits, and an idle bit is usually sent before the 29th bit. The voltage value of the idle bit is the second value.
[0061] Step 102: Starting from the first element in the target array, set the duration included in the first element as the first load value of the sending timer.
[0062] For example, configure a send timer with an initial load value of 600us. After converting the inspection command into a target array, starting from the first element of the target array, set the duration of the first element to the first load value of the send timer. In other words, modify the initial load value of the send timer to the first load value. For instance, if the duration of the first element in the target array is the first duration, then set the first duration to the first load value of the send timer.
[0063] Step 103: Apply the voltage corresponding to the voltage value in the first element to the fire protection bus, and start timing based on the first loaded value using the transmission timer.
[0064] For example, after setting the duration of the first element to the first load value of the transmit timer, the voltage corresponding to the voltage value in the first element is applied to the fire protection bus, and the transmit timer is used to start timing based on the first load value; for example, if the voltage value of the first element in the target array is a first value and the duration of the voltage value is a first duration, then the first value voltage is applied to the fire protection bus, and the transmit timer is used to start timing based on the first load value and the first duration.
[0065] Step 104: After the timing ends, stop applying the voltage corresponding to the voltage value in the first element to the fire protection bus, and set the duration included in the second element of 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 protection bus until the timing of the first loading value corresponding to the last element in the target array ends.
[0066] For example, after the sending timer finishes timing based on the first load value, it indicates that the duration of the voltage corresponding to the voltage value in the first element applied to the fire protection bus has been reached. Therefore, the application of the voltage corresponding to the voltage value in the first element to the fire protection bus is stopped. At this time, the bit corresponding to the first element is sent. Then, the duration included in the second element of the target array is set as the new first load value of the sending timer, and the voltage corresponding to the voltage value in the second element is applied to the fire protection bus to send the bit corresponding to the second element. This process continues until the timing of the first load value corresponding to the last element in the target array ends. This indicates that all bits corresponding to the inspection command have been sent, that is, the inspection command has been sent. For example, assuming the inspection command is represented by binary data 11001010, and the voltage value of the first element in the target array is a first value, and the duration of the voltage value in the first element is a first duration, then the first value voltage is applied to the fire protection bus, and a timer is used to count the time based on the first load value and the first duration. After the timer finishes counting the time based on the first load value and the first duration, it indicates that the bit corresponding to the first element has been sent, and the application of the first value voltage to the fire protection bus stops. Then, the second bit is sent, and the voltage value of the second element in the target array is a second value, and the duration of the voltage value in the second element is the first duration. Then, the second value voltage is applied to the fire protection bus, and a timer is used to count the time based on the new first load value and the first duration. After the timer finishes counting the time based on the new first load value and the first duration, it indicates that the bit corresponding to the second element has been sent, and the application of the second value voltage to the fire protection bus stops. The third bit is sent. The voltage value of the third element in the target array is the first value, and the duration of the voltage value in the third element is the second duration. The first value voltage is applied to the fire protection bus, and the sending timer is used to count down based on the new first load value and the second duration. When the sending timer finishes counting down based on the new first load value and the second duration, it means that the bit corresponding to the third element has been sent, and the application of the first value voltage to the fire protection bus stops. This process continues until the first load value corresponding to the last element in the target array finishes counting down, which means that all bits corresponding to the inspection command have been sent, and the inspection command has been sent.
[0067] It should be noted that the present invention can also define inspection commands and other sending commands using a macro definition mode, and classify them into commands with and without response according to the form of the sending commands, and use hook functions to process the corresponding sending commands. The present invention does not limit this.
[0068] The data communication method based on a fire protection system provided by this invention converts inspection commands into a target array. Each element in the target array corresponds one-to-one with a bit in the inspection command, and each element includes a voltage value and its duration. Starting from the first element in the target array, the duration of the first element is set as the first load value of a transmission timer. The voltage corresponding to the voltage value in the first element is applied to the fire protection bus, and the transmission timer is used to keep track based on the first load value. After the timer finishes, the application of the voltage corresponding to the voltage value in the first element to the fire protection bus is stopped, and the duration of the second element in the target array is set as the new first load value of the transmission timer. The voltage corresponding to the voltage value in the second element is applied to the fire protection bus, and this process continues until the timer for the first load value corresponding to the last element in the target array ends. As can be seen, this invention sets the loading value of the transmission timer based on the duration of the corresponding element each time voltage is applied to the fire protection bus. The transmission timer can precisely control the transmission time and timing of the voltage signal on the fire protection bus by setting the loading value each time. This effectively solves the problem of inconsistent data transmission time of each branch due to incorrect connection of the tree structure into a branch structure, or the problem of repeated signal transmission in the loop due to incorrect connection of the ring structure into a large loop containing a small loop. This improves the accuracy of data communication, thereby improving the accuracy of fire detection and further improving the efficiency of fire rescue.
[0069] In one embodiment, the duration included in the first element in step 102 is set as the first load value of the transmission timer, which can be implemented in the following way:
[0070] After the system timer's transmission interval duration is reached, the transmission timer is started, and the duration included in the first element is set as the first load value of the transmission timer. The transmission interval duration is used to characterize the interval duration for sending inspection commands.
[0071] The transmission interval can be set according to requirements, for example, the transmission interval is 40ms, but this invention does not limit it.
[0072] For example, inspection commands are typically sent periodically. Therefore, a system timer is used to time the interval between inspection command transmissions. When the system timer's transmission interval expires, it indicates that the inspection command needs to be sent. The transmission timer is then started, and the duration included in the first element is set as the first load value of the transmission timer. The transmission timer then times the transmission of each bit based on the first load value until all bits of the inspection command have been sent. This indicates that one frame of data has been sent. At this point, the transmission timer can be turned off, and the system timer can be used to start timing again. When the next transmission interval expires, the next inspection command is sent.
[0073] In this embodiment, after the system timer's transmission interval duration is reached, 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, thereby realizing the periodic transmission of inspection commands.
[0074] In one embodiment, step 101 above converts the inspection command into a target array, which can be implemented in the following way:
[0075] When a 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, the inspection command is converted into the target array after the target command is sent.
[0076] Among them, the setting command is the command sent by the management loop board to configure the fire protection peripherals, such as setting the fire alarm module to start; the query command is the command sent by the management loop board when it needs to query the information of the fire protection peripherals, such as querying the temperature detected by the heat detector or the version number of the heat detector.
[0077] For example, when an inspection command needs to be sent, if a target command is received, the priorities of the inspection command and the target command need to be looked up from a pre-set priority list. If the priority of the inspection command is higher than that of the target command, the inspection command is sent first, requiring it to be converted into a target array. After the inspection command is sent, the target command is sent. If the priority of the target command is higher than that of the inspection command, the target command is inserted into the message queue containing inspection commands, the target command is sent first, and after the target command is sent, the inspection command is sent, converting it into a target array.
[0078] It should be noted that the method for sending the target command is similar to that for sending the inspection command described above. The target command needs to be converted into an array, with each element corresponding to a bit in the target command. Each element includes a voltage value and its duration. Starting with the first element, the duration of the first element is set as the load value for the sending timer. The voltage corresponding to the voltage value in the first element is applied to the fire alarm bus, and the sending timer starts timing based on the set load value. After the timing ends, the application of the voltage corresponding to the voltage value in the first element is stopped, and the duration of the second element is set as the new load value for the sending timer. The voltage corresponding to the voltage value in the second element is applied to the fire alarm bus again until the timing of the load value corresponding to the last element in the array ends, at which point the target command transmission is considered complete.
[0079] In this embodiment, when a target command is received and its priority is lower than that of the inspection command, the inspection command is converted into a target array; when the priority of the target command is higher than that of the inspection command, the inspection command is converted into a target array after the target command is sent, so as to ensure that commands with higher priority are sent first, thereby improving the timeliness of the fire protection system.
[0080] Figure 3 This is a schematic diagram of the overall process of sending data based on a fire protection system provided in an embodiment of the present invention, such as... Figure 3 As shown, the system timer and transmission timer of the fire protection system, as well as the CAN peripheral and transmission data structure, are first initialized. It is then determined whether a setting command or a query command has been received. If a setting command or query command is received, and its priority is higher than that of the inspection command, the inspection command is converted into a target array after the setting command or query command is sent. If the priority of the setting command or query command is lower than that of the inspection command, the inspection command is directly converted into a target array. After the transmission interval of the system timer is reached, the transmission timer is started, and the duration included in the first element of the target array is set as the first load value of the transmission timer. The voltage corresponding to the voltage value in the first element is applied to the fire protection bus, and the transmission timer is used to count based on the first load value. After the countdown ends, the application of the voltage corresponding to the voltage value in the first element to the fire protection bus is stopped, and the duration included in the second element of the target array is set as the new first load value of the transmission timer. The voltage corresponding to the voltage value in the second element is applied to the fire protection bus, and the transmitted bits are counted. When the number of transmitted bits reaches the total number of bits corresponding to the inspection command, the transmission of one frame of data is determined to be complete, i.e., the transmission of the inspection command ends.
[0081] Figure 4 This is a second schematic flowchart of a data communication method based on a fire protection system provided in an embodiment of the present invention, as shown below. Figure 4 As shown, this data communication method based on the fire protection system, applied to fire protection peripherals, includes the following steps:
[0082] Step 401: When the voltage applied to the fire protection bus is the target voltage value, the voltage of the fire protection bus is collected based on a preset time interval to obtain the target voltage. The voltage applied to the fire protection bus is the voltage applied based on the voltage value of the first element after 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.
[0083] The target voltage value can be a first value, and the preset time interval can be set according to the requirements. For example, the preset time interval is 25µs. This invention does not limit this.
[0084] For example, according to the characteristics of the FBUS fire protection bus protocol, when the transmitted data is at the first value, it is the moment of receiving data within the overall protocol. The analog-to-digital (AD) conversion channel is configured in advance. When the voltage applied on the fire protection bus is at the first value, the fire protection peripherals corresponding to the peripheral addresses included in the inspection command collect the voltage of the fire protection bus through the AD channel at a preset time interval of 25us to obtain the target voltage.
[0085] The data communication method based on a fire protection system provided by this invention converts inspection commands into a target array. Each element in the target array corresponds one-to-one with a bit in the inspection command, and each element includes a voltage value and its duration. Starting from the first element in the target array, the duration of the first element is set as the first load value of a sending timer. The voltage corresponding to the voltage value in the first element is applied to the fire protection bus, and the sending timer is used to time the event based on the first load value. After the timer finishes, the application of the voltage corresponding to the voltage value in the first element to the fire protection bus is stopped, and the duration of the second element in the target array is set as the new first load value of the sending timer. The voltage corresponding to the voltage value in the second element is applied to the fire protection bus until the timer for the first load value corresponding to the last element in the target array ends. The fire protection peripherals collect voltage data from the fire protection bus based on a preset time interval to obtain the target voltage. As can be seen, this invention sets the loading value of the transmission timer based on the duration of the corresponding element each time voltage is applied to the fire protection bus. The transmission timer can accurately control the transmission time and timing of the voltage signal on the fire protection bus by setting the loading value each time. This effectively solves the problem of inconsistent data transmission time of each branch due to incorrect connection of the tree structure into a branch structure, or the problem of repeated signal transmission in the loop due to incorrect connection of the ring structure into a large loop containing a small loop, thereby improving the accuracy of data communication.
[0086] In one embodiment, when the voltage applied to the fire protection bus in step 401 is the target voltage value, the target voltage is obtained by acquiring the voltage of the fire protection bus based on a preset time interval. This can be achieved in the following way:
[0087] When the voltage applied to the fire protection bus is the target voltage value, the fire protection bus is sampled a preset number of times based on the preset time interval; when the current voltage value is sampled, the current voltage value is subjected to amplitude limiting filtering based on the previous voltage value to obtain the processed current voltage value; based on each of the processed current voltage values, the target voltage is determined.
[0088] 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.
[0089] For example, when the voltage applied to the fire protection 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 bus at a preset time interval of 25µs via the AD channel, with 12 collections. An amplitude-limiting filter is used to confirm whether the difference between two collected voltage values is greater than the maximum allowable deviation. If the difference between the current voltage value and the previous voltage value is greater than the maximum allowable deviation, the current voltage value is considered invalid, and the previous voltage value is used to replace the current voltage value, resulting in a processed current voltage value. Each time a voltage value is collected, it is compared with the previous value... The voltage values after each processing are compared until 12 samples are collected, resulting in 12 voltage values. Some of these 12 voltage values have undergone amplitude limiting filtering, while others have not. The final target voltage is obtained by averaging these 12 voltage values or by voting. The target voltage is then analyzed to obtain the corresponding level signal. This level signal is a bit of data received by the fire protection peripheral from the fire protection bus. After an inspection command is sent, the fire protection peripheral receives all the bit data corresponding to that inspection command, which is the received data corresponding to that inspection command.
[0090] In this embodiment, the voltage of the fire protection 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 based on the previous 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 pulse interference caused by accidental factors, that is, it can overcome the pulse interference caused by incorrect connection of tree structure into branch structure or incorrect connection of ring structure into large circle into small circle, thus improving the accuracy of target voltage collection.
[0091] In one embodiment, when the voltage applied to the fire-fighting secondary bus is the target voltage value in step 401 above, the voltage of the fire-fighting secondary bus is acquired based on a preset time interval to obtain the target voltage. This can also be achieved in the following ways:
[0092] When the voltage applied to the fire protection bus is the target voltage value, a receiving timer is started and a preset duration is set as the second loading value of the receiving timer; the receiving timer is controlled to count based on the second loading value; after the counting ends, the voltage of the fire protection bus is collected based on the preset time interval to obtain the target voltage.
[0093] Since the shortest data reception time is the second duration, the preset duration can be set to 100us.
[0094] For example, when the voltage applied to the fire protection bus is the first value, the receiving timer is started and 100us is set as the second loading value of the receiving timer. The receiving timer is controlled to count down based on the second loading value. After the second loading value counts down, the voltage of the fire protection bus is collected by the AD module based on a preset time interval to avoid collecting unstable or interference signals.
[0095] In this embodiment, when the voltage applied to the fire protection bus is the target voltage value, a receiving timer is started, and a preset duration is set as the second loading value of the receiving timer. The receiving timer is controlled to count based on the second loading value. After the countdown ends, the voltage of the fire protection bus is collected based on a preset time interval to obtain the target voltage. This avoids collecting unstable or interference signals when the tree structure is incorrectly connected as a branch structure or the ring structure is incorrectly connected as a large loop containing a small loop. That is, the preset duration filters out unstable or interference signals, further improving the accuracy and effectiveness of target voltage acquisition.
[0096] In one embodiment, after step 401 above, the data communication method based on the fire protection system further includes the following steps:
[0097] Based on the target voltage collected at each of the target voltage values, the received data is determined; parity checking is performed on the received data 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; if both the first check result and the second check result indicate successful verification, the received data is uploaded to the fire protection system via the CAN bus.
[0098] For example, when the target voltages collected under each target voltage value in response to the inspection command are obtained, the corresponding level signal for each target voltage is determined based on the voltage value and duration of each target voltage. For instance, 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. The level signals corresponding to each target voltage are combined sequentially to obtain the received data corresponding to the inspection command. If the FBUS fire protection bus protocol specifies even parity checking, the number of 1s in the received data is determined. When the number of 1s is even, the parity bit is obtained. If the received check bit is also 0, the first check result is a successful check. Taking the inspection command to view the status information of fire peripheral 1 as an example, the received data is parsed. If there is data in the bit representing the status information, and the data in the bit representing the peripheral address is the same as the actual peripheral address of the fire peripheral, the second check result is a successful check. If both the first and second check results are successful, it means that the received data is correct. At this time, the received data is uploaded to the fire protection system via the CAN bus for further processing. If either the first or second check result is a failed check, it means that the received data is incorrect.
[0099] In this embodiment, parity checking is performed on the received data to obtain a first verification result, and the peripheral address and data content in the received data are verified to obtain a second verification result. When both the first and second verification results indicate successful verification, the received data is uploaded to the fire protection system via the CAN bus to ensure the accuracy of the received data uploaded to the fire protection system, thereby further improving the accuracy and security of the entire fire protection system control.
[0100] Figure 5 This is a schematic diagram of the overall process of receiving data based on a fire protection system provided in an embodiment of the present invention, such as... Figure 5As shown, the receiving timer and FBUS fire protection bus of the fire protection system are first initialized. It is determined whether the voltage applied to the fire protection bus is the first value (target voltage value). If the voltage applied to the fire protection bus is not the first value, no data acquisition is performed. If the voltage applied to the fire protection bus is the first value, the receiving timer is started, and the preset duration (100us) is set as the second loading value of the receiving timer. After the second loading value ends, the voltage of the fire protection bus is acquired through the AD channel at a preset time interval (25us), and the number of acquisitions is the preset number (12 times). The voltage value acquired each time is judged and processed by the amplitude limiting filter to obtain the received data corresponding to one bit. Since one inspection command corresponds to 29 bits, and the 29 bits are represented by alternating first and second values, and the first bit is represented by the first value, 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 has been received. The received data is verified. After successful verification, the received data is uploaded to the fire protection system through the CAN bus to execute subsequent steps.
[0101] The data communication device based on the fire protection system provided by the present invention is described below. The data communication device based on the fire protection system described below and the data communication method based on the fire protection system described above can be referred to in correspondence.
[0102] Figure 6 This is a schematic diagram of the structure of a data communication device based on a fire protection system provided in an embodiment of the present invention, as shown below. Figure 6 As 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:
[0103] The conversion unit 601 is used to convert the inspection command into a target array, wherein 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.
[0104] Setting unit 602 is configured to set the duration included in the first element of the target array as the first load value of the sending timer, starting from the first element in the target array.
[0105] The first application unit 603 is used to apply the voltage corresponding to the voltage value in the first element to the fire protection bus;
[0106] Timing unit 604 is used to perform timing based on the first loading value through the transmission timer;
[0107] The second application unit 605 is used to stop applying the voltage corresponding to the voltage value in the first element to the fire-fighting bus after the timing ends, and set the duration included in the second element of 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-fighting bus until the timing of the first loading value corresponding to the last element in the target array ends.
[0108] The data communication device based on a fire protection system provided by this invention converts inspection commands into a target array. The elements in the target array correspond one-to-one with the bits 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 of the first element is set as the first load value of the transmission timer. The voltage corresponding to the voltage value in the first element is applied to the fire protection bus, and the transmission timer is used to time the event based on the first load value. After the timer finishes, the application of the voltage corresponding to the voltage value in the first element to the fire protection bus is stopped, and the duration of the second element in the target array is set as the new first load value of the transmission timer. The voltage corresponding to the voltage value in the second element is applied to the fire protection bus, until the timer for the first load value corresponding to the last element in the target array ends. As can be seen, this invention sets the loading value of the transmission timer based on the duration of the corresponding element each time voltage is applied to the fire protection bus. The transmission timer can accurately control the transmission time and timing of the voltage signal on the fire protection bus by setting the loading value each time. This effectively solves the problem of inconsistent data transmission time of each branch due to incorrect connection of the tree structure into a branch structure, or the problem of repeated signal transmission in the loop due to incorrect connection of the ring structure into a large loop containing a small loop, thereby improving the accuracy of data communication.
[0109] Based on any of the above embodiments, the setting unit 602 is specifically used for:
[0110] After the system timer's transmission interval duration is reached, the transmission timer is started, and the duration included in the first element is set as the first load value of the transmission timer. The transmission interval duration is used to characterize the interval duration for sending inspection commands.
[0111] Based on any of the above embodiments, the conversion unit 601 is specifically used for:
[0112] Upon receiving a target command, and if the priority of the target command is lower than that of the inspection command, the inspection command is converted into the target array, wherein the target command includes a setting command or a query command.
[0113] If the priority of the target command is higher than that of the inspection command, the inspection command is converted into the target array after the target command is sent.
[0114] The data communication device based on a fire protection system provided in this embodiment of the invention includes a data acquisition unit; wherein:
[0115] The acquisition unit is used to acquire the voltage of the fire protection bus based on a preset time interval when the voltage applied on the fire protection bus is the target voltage value. The voltage applied on the fire protection bus is the voltage applied based on the voltage value of the first element after 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 to the first load value of the sending timer.
[0116] The data communication device based on the fire protection system provided by this invention converts inspection commands into a target array. The elements in the target array correspond one-to-one with the bits 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 of the first element is set as the first load value of the transmission timer. The voltage corresponding to the voltage value in the first element is applied to the fire protection bus, and the transmission timer is used to keep track based on the first load value. After the timer finishes, the application of the voltage corresponding to the voltage value in the first element to the fire protection bus is stopped, and the duration of the second element in the target array is set as the new first load value of the transmission timer. The voltage corresponding to the voltage value in the second element is applied to the fire protection bus until the timer for the first load value corresponding to the last element in the target array ends. The fire protection peripherals collect voltage data from the fire protection bus based on a preset time interval to obtain the target voltage. As can be seen, this invention sets the loading value of the transmission timer based on the duration of the corresponding element each time voltage is applied to the fire protection bus. The transmission timer can accurately control the transmission time and timing of the voltage signal on the fire protection bus by setting the loading value each time. This effectively solves the problem of inconsistent data transmission time of each branch due to incorrect connection of the tree structure into a branch structure, or the problem of repeated signal transmission in the loop due to incorrect connection of the ring structure into a large loop containing a small loop, thereby improving the accuracy of data communication.
[0117] Based on any of the above embodiments, the acquisition unit is specifically used for:
[0118] When the voltage applied to the fire protection bus is the target voltage value, the voltage of the fire protection bus is collected a preset number of times based on the preset time interval;
[0119] When the current voltage value is acquired, the current voltage value is subjected to amplitude limiting and filtering based on the previously acquired voltage value to obtain the processed current voltage value.
[0120] The target voltage is determined based on the current voltage value after each of the aforementioned processes.
[0121] Based on any of the above embodiments, the acquisition unit is specifically used for:
[0122] When the voltage applied to the fire-fighting bus is the target voltage value, the receiving timer is started and the preset duration is set to the second loading value of the receiving timer;
[0123] The receive timer is controlled to start timing based on the second load value;
[0124] After the timing ends, the voltage of the fire protection bus is collected based on the preset time interval to obtain the target voltage.
[0125] Based on any of the above embodiments, the data communication device based on the fire protection system further includes:
[0126] The determining unit is used to determine the received data based on the target voltage collected at each of the target voltage values;
[0127] The verification unit is used to perform parity verification on the received data to obtain a first verification result, and to verify the peripheral address and data content in the received data to obtain a second verification result.
[0128] The uploading unit is used to upload the received data to the fire protection system via the CAN bus when both the first verification result and the second verification result indicate successful verification.
[0129] Figure 7 This is a schematic diagram of the physical structure of the electronic device provided in the embodiments of the present invention, such as... Figure 7 As shown, the electronic device may include: a processor 710, a communications interface 720, a memory 730, and a communication bus 740, wherein the processor 710, the communications interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 can call logical instructions in the memory 730 to execute a data communication method based on a fire protection system. This method includes: converting an inspection command into a target array, wherein the elements in the target array correspond one-to-one with the bits in the inspection command, and the elements include a voltage value and the duration of the voltage value.
[0130] Starting from the first element in the target array, set the duration included in the first element as the first load value of the sending timer;
[0131] The voltage corresponding to the voltage value in the first element is applied to the fire protection bus, and the transmission timer is used to time the event based on the first loaded value.
[0132] After the timing ends, stop applying the voltage corresponding to the voltage value in the first element to the fire protection bus, and set the duration included in the second element of 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 protection bus until the timing of the first loading value corresponding to the last element in the target array ends.
[0133] Alternatively, you can use the following method:
[0134] When the voltage applied on the fire protection bus is the target voltage value, the voltage of the fire protection bus is collected based on a preset time interval to obtain the target voltage. The voltage applied on the fire protection bus is the voltage applied based on the voltage value of the first element after 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.
[0135] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the 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 to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0136] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being able to be stored on a non-transitory computer-readable storage medium, the computer program being executed by a processor, the computer being able to execute the data communication method based on the fire protection system provided by the above methods, the method including: converting an inspection command into a target array, the elements in the target array corresponding one-to-one with the bits in the inspection command, the elements including a voltage value and the duration of the voltage value;
[0137] Starting from the first element in the target array, set the duration included in the first element as the first load value of the sending timer;
[0138] The voltage corresponding to the voltage value in the first element is applied to the fire protection bus, and the transmission timer is used to time the event based on the first loaded value.
[0139] After the timing ends, stop applying the voltage corresponding to the voltage value in the first element to the fire protection bus, and set the duration included in the second element of 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 protection bus until the timing of the first loading value corresponding to the last element in the target array ends.
[0140] Alternatively, when the program instructions are executed by the computer, the computer can implement the following method:
[0141] When the voltage applied on the fire protection bus is the target voltage value, the voltage of the fire protection bus is collected based on a preset time interval to obtain the target voltage. The voltage applied on the fire protection bus is the voltage applied based on the voltage value of the first element after 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.
[0142] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data communication method based on the fire protection system provided by the above methods, the method comprising: converting an inspection command into a target array, wherein the elements in the target array correspond one-to-one with the bits in the inspection command, and the elements include a voltage value and the duration of the voltage value;
[0143] Starting from the first element in the target array, set the duration included in the first element as the first load value of the sending timer;
[0144] The voltage corresponding to the voltage value in the first element is applied to the fire protection bus, and the transmission timer is used to time the event based on the first loaded value.
[0145] After the timing ends, stop applying the voltage corresponding to the voltage value in the first element to the fire protection bus, and set the duration included in the second element of 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 protection bus until the timing of the first loading value corresponding to the last element in the target array ends.
[0146] Alternatively, when the computer program is executed by the processor, it implements the following method:
[0147] When the voltage applied on the fire protection bus is the target voltage value, the voltage of the fire protection bus is collected based on a preset time interval to obtain the target voltage. The voltage applied on the fire protection bus is the voltage applied based on the voltage value of the first element after 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.
[0148] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0149] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to 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 via a fire protection two-wire bus. The method is applied to the management circuit board, and the method includes: The inspection command is converted into a target array, and the elements in the target array correspond one-to-one with the bits in the inspection command. The elements include the 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 load value of the sending timer; The voltage corresponding to the voltage value in the first element is applied to the fire protection bus, and the transmission timer is used to time the event based on the first loaded value. After the timing ends, stop applying the voltage corresponding to the voltage value in the first element to the fire protection bus, and set the duration included in the second element of 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 protection 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, characterized in that, Setting the duration included in the first element as the first load value of the sending timer includes: After the system timer's transmission interval duration is reached, the transmission timer is started, and the duration included in the first element is set as the first load value of the transmission timer. The transmission interval duration is used to characterize the interval duration for sending inspection commands.
3. The data communication method based on a fire protection system according to claim 1, characterized in that, The process of converting inspection commands into target arrays includes: Upon receiving a target command, and if the priority of the target command is lower than that of the inspection command, the inspection command is converted into the target array, wherein the target command includes a setting command or a query command; If the priority of the target command is higher than that of the inspection command, the inspection command is converted into the target array after the target command is sent.
4. A data communication method based on a fire protection system, characterized in that, Applied to fire protection peripherals, the method includes: When the voltage applied to the fire protection bus is the target voltage value, the voltage of the fire protection bus is collected based on a preset time interval to obtain the target voltage. The voltage applied to the fire protection bus is obtained by converting the inspection command into a target array. Starting from the first element in the target array, the duration included in the first element is set as the first load value of the sending timer. The voltage corresponding to the voltage value in the first element is applied to the fire protection bus, and the sending timer is used to time the timer based on the first load value. After the timer ends, the application of the voltage corresponding to the voltage value in the first element to the fire protection bus is stopped, and the duration included in the second element of the target array is set as the new first load value of the sending timer. The voltage corresponding to the voltage value in the second element is applied to the fire protection bus until the timer for the first load value corresponding to the last element in the target array ends. The fire protection peripheral device collects the voltage of the fire protection bus based on the preset time interval to obtain the target voltage.
5. The data communication method based on a fire protection system according to claim 4, characterized in that, When the voltage applied to the fire protection bus is the target voltage value, the voltage of the fire protection bus is acquired based on a preset time interval to obtain the target voltage, including: When the voltage applied to the fire protection bus is the target voltage value, the voltage of the fire protection bus is collected a preset number of times based on the preset time interval; When the current voltage value is acquired, the current voltage value is subjected to amplitude limiting and filtering based on the previously acquired voltage value to obtain the processed current voltage value. The target voltage is determined based on the current voltage value after each of the aforementioned processes.
6. The data communication method based on a fire protection system according to claim 4, characterized in that, When the voltage applied to the fire protection bus is the target voltage value, the voltage of the fire protection bus is acquired based on a preset time interval to obtain the target voltage, including: When the voltage applied to the fire-fighting bus is the target voltage value, the receiving timer is started and the preset duration is set to the second loading value of the receiving timer; The receive timer is controlled to start timing based on the second load value; After the timing ends, the voltage of the fire protection bus is collected 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: Based on the target voltage collected at each of the aforementioned 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. If both the first and second verification results indicate successful verification, the received data is uploaded to the fire protection system via the CAN bus.
8. A data communication device based on a fire protection system, characterized in that, include: A conversion unit is used to convert an inspection command into a target array, wherein the elements in the target array correspond one-to-one with the bits in the inspection command, and the elements include a voltage value and the duration of the voltage value. The setting unit is configured to set the duration included in the first element of the target array as the first load value of the sending timer, starting from the first element in the target array. The first application unit is used to apply the voltage corresponding to the voltage value in the first element to the fire protection bus; A timing unit is used to perform timing based on the first loading value using the transmission timer; The second application unit is used to stop applying the voltage corresponding to the voltage value in the first element to the fire-fighting bus after the timing ends, and to set the duration included in the second element of 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-fighting bus until the timing of the first loading 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, include: The acquisition unit is used to acquire voltage data from the fire protection secondary bus based on a preset time interval when the voltage applied to the fire protection secondary bus is the target voltage value. The voltage applied to the fire protection secondary bus is determined by converting the inspection command into a target array. Starting from the first element of the target array, the duration included in the first element is set as the first load value of the sending timer. The voltage corresponding to the voltage value in the first element is then applied to the fire protection secondary bus, and the sending timer is used to time the timing based on the first load value. After the timing ends, the application of the voltage corresponding to the voltage value in the first element to the fire protection secondary bus is stopped, and the duration included in the second element of the target array is set as the new first load value of the sending timer. The voltage corresponding to the voltage value in the second element is then applied to the fire protection secondary bus until the timing of the first load value corresponding to the last element of the target array ends. The fire protection peripheral device acquires voltage data from the fire protection secondary bus based on the preset time interval to obtain the target voltage.
10. An electronic device comprising a memory, a processor, and a computer program stored in 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 as described in any one of claims 1 to 3, or implements the data communication method based on the fire protection system as described in any one of claims 4 to 7.
11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the data communication method based on the fire protection system as described in any one of claims 1 to 3, or implements the data communication method based on the fire protection system as described in 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 the processor, it implements the data communication method based on the fire protection system as described in any one of claims 1 to 3, or implements the data communication method based on the fire protection system as described in 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