Search

CN-119402133-B - Dedicated line coding method, dedicated line decoding method, device and dedicated line control system

CN119402133BCN 119402133 BCN119402133 BCN 119402133BCN-119402133-B

Abstract

The embodiment of the application provides a special line coding method, a special line decoding device and a special line control system, and relates to the technical field of fire control. The method comprises the steps that the first special line board carries out binary coding on a first control instruction to be sent to obtain data to be sent, the first special line board respectively determines code elements corresponding to all binary numbers in the data to be sent according to the corresponding relation between the preset binary numbers and the code elements, any code element comprises a data part with a first duration, the duration of the data part of the code elements corresponding to 0 and 1 in the corresponding relation between the binary numbers and the code elements is different, the first special line board generates determined code elements on the first pin, and after the first special line board receives a level signal generated by the first special line board, the first special line board determines the control instruction represented by the received level signal based on the corresponding relation between the binary numbers and the code elements. Thus, the stability of dedicated line control is improved.

Inventors

  • PEI SHULONG
  • ZHOU JIAN
  • ZHAO XINGLIANG
  • ZHAO XIANLIN
  • ZHAO GONGWEI

Assignees

  • 杭州海康消防科技有限公司

Dates

Publication Date
20260505
Application Date
20241012

Claims (17)

  1. 1. The special line coding method is characterized by being applied to a first special line board, wherein a first pin of the first special line board is connected with a first special line module through a special line, and the method comprises the following steps: binary coding is carried out on a first control instruction to be sent to obtain data to be sent; The method comprises the steps of respectively determining symbols corresponding to binary numbers in data to be transmitted according to a preset corresponding relation between the binary numbers and the symbols, wherein any symbol comprises a first time length data part, in the corresponding relation between the binary numbers and the symbols, the time length of the data part of the symbols corresponding to 0 and 1 is different, when the type of a first control instruction is that the control equipment is started, the determined level of the data part of each symbol comprises a starting level of the equipment, when the type of the first control instruction is that the control equipment is stopped, the determined level of the data part of each symbol is that the maintenance level of the equipment is lower than the starting level, the corresponding relation between the binary numbers and the symbols comprises a first corresponding relation under the condition that the type of the control instruction is that the control equipment is started, and a second corresponding relation under the condition that the type of the control instruction is that the control equipment is stopped; And generating each determined code element at the first pin, so that the first special line module determines a control instruction represented by the received level signal based on the corresponding relation between the binary number and the code element after receiving the level signal generated by the first special line board.
  2. 2. The method according to claim 1, wherein the determining the symbol corresponding to each binary number in the data to be transmitted according to the preset corresponding relationship between the binary number and the symbol includes: if the type of the first control instruction is that the control equipment is started, respectively determining code elements corresponding to binary numbers in the data to be transmitted in the first corresponding relation; and if the type of the first control instruction is that the control equipment is stopped, respectively determining code elements corresponding to binary numbers in the data to be transmitted in the second corresponding relation.
  3. 3. The method of claim 1 wherein any symbol further comprises a flag portion of a fourth duration, the flag portion characterizing a level of zero and the fourth duration being no more than 1 millisecond, the flag portion of any symbol being earlier in time sequence than the data portion of the symbol.
  4. 4. The method of claim 1, wherein after the first pin generates the determined symbols, the method further comprises: if the type of the first control instruction is that the control equipment is started, outputting the starting level through the first pin; and if the type of the first control instruction is that the control equipment is stopped, outputting the maintenance level through the first pin.
  5. 5. The method of claim 4, wherein outputting the enable level via the first pin comprises: Outputting the starting level through the first pin until a preset duration is reached from the starting time of each symbol determined in the last generation of the first pin, and returning to the step of executing each symbol determined in the generation of the first pin; And/or the number of the groups of groups, The outputting the sustain level through the first pin includes: Outputting the maintenance level through the first pin until a preset duration is reached from the last time the determined code element is generated at the first pin, and returning to execute the step of generating the determined code element at the first pin.
  6. 6. The method according to claim 2, wherein the method further comprises: If the type of the first control instruction is that the control equipment is started, equipment information uploaded by the first special line module is read through the first pin in a time period corresponding to a fourth time length of the data part of each generated code element; And if the type of the first control instruction is that the control equipment is stopped, reading the equipment information uploaded by the first special line module through the first pin in a partial time period corresponding to the first time length of the data part of each generated code element.
  7. 7. The method of claim 6, wherein the second pin of the first line module is connected to the first pin of the first line board through the line; the reading, by the first pin, the device information uploaded by the first private line module includes: The current value of the current output by the first special line module on the second pin is read through the first pin, wherein the current value of the current output by the second pin is determined by the first special line module based on a third corresponding relation between a preset binary number and the current value and binary data corresponding to equipment information to be uploaded; And decoding the read current value according to the third corresponding relation to obtain the equipment information uploaded by the first special line module.
  8. 8. The special line decoding method is characterized by being applied to a first special line module, wherein a second pin of the first special line module is connected with a first pin of a first special line board through a special line, and the method comprises the following steps: Receiving a level signal generated by the first special line board at the first pin through the second pin, and taking the level signal as a level signal to be decoded; According to each code element contained in the level signal to be decoded and the corresponding relation between the preset binary number and the code element, determining the binary number corresponding to each code element as control instruction data; The control command data are used for controlling equipment to start, the received level represented by the data part of each symbol comprises the starting level of the equipment, when the control command data are used for controlling the equipment to stop, the received level represented by the data part of each symbol is the maintenance level of the equipment and is lower than the starting level, the corresponding relation between the binary number and the symbol comprises a first corresponding relation under the condition that the type of the control command is the starting of the control equipment and a second corresponding relation under the condition that the type of the control command is the stopping of the control equipment, wherein the first corresponding relation comprises the starting level of the second time and the maintenance level of the third time, and the sum value of the second time and the third time is the first time; and binary decoding is carried out on the control instruction data to obtain a control instruction corresponding to the level signal to be decoded.
  9. 9. The method of claim 8 wherein any symbol further comprises a flag portion of a fourth duration, the flag portion characterized by a level of zero and the fourth duration being no more than 1 millisecond; before determining the binary number corresponding to each symbol according to each symbol contained in the level signal to be decoded and the corresponding relation between the preset binary number and the symbol, and using the binary number as control instruction data, the method further comprises: And taking the moment of receiving each mark part as a starting point of one code element respectively, and decoding each code element from the level signal to be decoded.
  10. 10. The method of claim 8, wherein the first dedicated line module is configured to control a first device; The method further comprises the steps of: And uploading the equipment information of the first equipment to the first special line board when the appointed time corresponding to each code element is reached in the process of receiving each code element contained in the level signal to be decoded, wherein the duration between the appointed time corresponding to each code element and the starting time of the data part receiving the code element is the appointed duration, and the level of the appointed time corresponding to the code element is the maintenance level.
  11. 11. The method of claim 10, wherein uploading the device information of the first device to the first dedicated line board when the specified time corresponding to each symbol is reached, comprises: Acquiring data to be uploaded, which is obtained by binary encoding equipment information of first equipment to be uploaded; Based on a third corresponding relation between preset binary numbers and current values, respectively determining the current values corresponding to the binary numbers in the data to be uploaded; and controlling the second pin to output current according to the determined current value corresponding to each binary number.
  12. 12. The method according to claim 8, wherein after said binary decoding of the control instruction data to obtain a control instruction corresponding to a level signal to be decoded, the method further comprises: If the type of the obtained control instruction is that the control equipment is started, controlling the equipment controlled by the first special line module to be started; And if the type of the obtained control instruction is that the control equipment is stopped, controlling the equipment controlled by the first special line module to stop.
  13. 13. The special line control system is characterized by comprising a first special line board and a first special line module; The first dedicated line board is configured to perform the dedicated line encoding method of any one of claims 1 to 7; the first dedicated line module is configured to perform the dedicated line decoding method according to any one of claims 8 to 12.
  14. 14. A special line coding device, characterized in that is applied to first special line board, first pin of first special line board links to each other with first special line module through the special line, the device includes: The first coding unit is used for binary coding the first control instruction to be sent to obtain data to be sent; The code element determining unit is used for respectively determining the code elements corresponding to each binary number in the data to be transmitted according to the corresponding relation between the preset binary number and the code elements; wherein any symbol comprises a data portion of a first duration; when the type of the first control instruction is that the control equipment starts, the determined level represented by the data part of each code element comprises a starting level of the equipment, when the type of the first control instruction is that the control equipment stops, the determined level represented by the data part of each code element is a maintenance level of the equipment and is lower than the starting level, the corresponding relation between the binary number and the code element comprises a first corresponding relation under the condition that the type of the control instruction is that the control equipment starts and a second corresponding relation under the condition that the type of the control instruction is that the control equipment stops, the data part of any code element comprises the starting level of the second time length and the maintenance level of the third time length in the first corresponding relation, and the sum value of the second time length and the third time length is that the first time length; And the code element generating unit is used for generating each determined code element at the first pin, so that the first special line module determines a control instruction represented by the received level signal based on the corresponding relation between the binary number and the code element after receiving the level signal generated by the first special line board.
  15. 15. A special line decoding device, characterized in that is applied to a first special line module, the second pin of first special line module passes through the special line and links to each other with the first pin of first special line board, the device includes: the signal receiving unit is used for receiving the level signal generated by the first special line board at the first pin through the second pin and taking the level signal as a level signal to be decoded; A control instruction data determining unit, configured to determine, as control instruction data, binary numbers corresponding to each symbol according to each symbol included in the level signal to be decoded and a preset correspondence between binary numbers and symbols; The control command data are used for controlling equipment to start, the received level represented by the data part of each symbol comprises the starting level of the equipment, when the control command data are used for controlling the equipment to stop, the received level represented by the data part of each symbol is the maintenance level of the equipment and is lower than the starting level, the corresponding relation between the binary number and the symbol comprises a first corresponding relation under the condition that the type of the control command is the starting of the control equipment and a second corresponding relation under the condition that the type of the control command is the stopping of the control equipment, wherein the first corresponding relation comprises the starting level of the second time and the maintenance level of the third time, and the sum value of the second time and the third time is the first time; and the first decoding unit is used for binary decoding the control instruction data to obtain a control instruction corresponding to the level signal to be decoded.
  16. 16. A special line board, comprising: a memory for storing a computer program; a processor for implementing the method of any of claims 1-7 when executing a program stored on a memory.
  17. 17. A private line module, comprising: a memory for storing a computer program; A processor for implementing the method of any of claims 8-12 when executing a program stored on a memory.

Description

Dedicated line coding method, dedicated line decoding method, device and dedicated line control system Technical Field The application relates to the technical field of fire control, in particular to a special line coding method, a special line decoding device and a special line control system. Background In the fire control field, the existing special line control system comprises a special line board and a special line module, and the special line board and the special line module are communicated through a special line so as to control fire control equipment corresponding to the special line module. For example, the fire-fighting equipment can be a fan, a fire pump or the like, and the special line module can control the fire-fighting equipment to stop or start correspondingly. In the related art, the communication between the special line board and the special line module is realized by means of on-off voltage. That is, the special line module controls the fire fighting equipment to start when the voltage output by the special line board is at a high level, and controls the fire fighting equipment to stop when the voltage output by the special line board is at a low level. However, in the above system, the start-stop of the fire-fighting equipment is completely dependent on the voltage on the line, and if the level is suddenly changed due to interference or the like, abnormal start-up and abnormal stop of the fire-fighting equipment may be caused, resulting in poor control stability. Therefore, how to improve the stability of dedicated line control is a problem to be solved. Disclosure of Invention The embodiment of the application aims to provide a special line coding method, a special line decoding device and a special line control system so as to improve the stability of special line control. The specific technical scheme is as follows: in a first aspect of the embodiment of the present application, there is provided a dedicated line coding method, applied to a first dedicated line board, where a first pin of the first dedicated line board is connected to a first dedicated line module through a dedicated line, the method including: binary coding is carried out on a first control instruction to be sent to obtain data to be sent; Determining symbols corresponding to binary numbers in the data to be transmitted respectively according to a preset corresponding relation between the binary numbers and the symbols, wherein any symbol comprises a data part with a first duration, the duration of the data part of the symbol corresponding to 0 and 1 in the corresponding relation between the binary numbers and the symbols is different, when the type of the first control instruction is that the control equipment is started, the determined level represented by the data part of each symbol comprises the starting level of the equipment, and when the type of the first control instruction is that the control equipment is stopped, the determined level represented by the data part of each symbol is that the maintenance level of the equipment is lower than the starting level; And generating each determined code element at the first pin, so that the first special line module determines a control instruction represented by the received level signal based on the corresponding relation between the binary number and the code element after receiving the level signal generated by the first special line board. In a second aspect of the embodiment of the present application, a dedicated line decoding method is provided and applied to a first dedicated line module, where a second pin of the first dedicated line module is connected to a first pin of a first dedicated line board through a dedicated line, and the method includes: Receiving a level signal generated by the first special line board at the first pin through the second pin, and taking the level signal as a level signal to be decoded; According to each code element contained in the level signal to be decoded and the corresponding relation between the preset binary number and the code element, determining the binary number corresponding to each code element as control instruction data; wherein, any code element comprises a data part with a first time length, and the time length of the data part of the code element corresponding to 0 and 1 in the corresponding relation between the binary number and the code element is different; when the control instruction data is used for controlling the equipment to stop, the level of the data part representation of each received code element is the maintenance level of the equipment, and the maintenance level is lower than the starting level; and binary decoding is carried out on the control instruction data to obtain a control instruction corresponding to the level signal to be decoded. In a third aspect of the embodiment of the present application, a private line control system is provided, where the private line control system include