Special line coding method, special line decoding method, special line coding device, special line decoding device and special line control system
By using the dedicated line encoding method in the dedicated line control system, the control instructions are converted into symbols, and the equipment abnormality caused by level changes is solved and the stability of the control system is improved.
Patent Information
- Application Number
- CN202411427490.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-10-12
AI Technical Summary
The existing dedicated line control system causes abnormal start or stop of fire-fighting equipment when the level suddenly changes, resulting in poor control stability.
The dedicated line encoding method is adopted to binary code the control instructions, and symbols are generated based on the corresponding relationship between the preset binary number and symbols to ensure that the dedicated line module can accurately receive and decode the level signal.
Through encoding and decoding methods, the stability of the dedicated line control system is improved, and abnormal starting or stopping of the device caused by level mutations is avoided.
Smart Images

Figure CN119402133A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of fire control technology, and in particular to a dedicated line encoding method, a dedicated line decoding method, a device, and a dedicated line control system. Background Art
[0002] In the field of fire protection, the existing dedicated line control system includes a dedicated line board and a dedicated line module. The dedicated line board and the dedicated line module communicate through a dedicated line to control the fire protection equipment corresponding to the dedicated line module. For example, the fire protection equipment can be: a fan, or a fire pump, etc. Correspondingly, the dedicated line module can control the fire protection equipment to stop or start.
[0003] In the related art, the communication between the dedicated line board and the dedicated line module is achieved by switching on and off the voltage. That is, when the voltage output by the dedicated line board is at a high level, the dedicated line module controls the fire-fighting equipment to start, and when the voltage output by the dedicated line board is at a low level, the dedicated line module controls the fire-fighting equipment to stop. However, in the above system, the start and stop of the fire-fighting equipment is completely dependent on the voltage on the line. If the voltage level suddenly changes due to interference or other reasons, it will cause abnormal start and stop of the fire-fighting equipment, resulting in poor control stability.
[0004] Therefore, how to improve the stability of dedicated line control has become an urgent problem to be solved. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a dedicated line encoding method, a dedicated line decoding method, a device, and a dedicated line control system to improve the stability of dedicated line control. The specific technical solution is as follows:
[0006] In a first aspect of an embodiment of the present application, a dedicated line encoding method is first provided, which is applied to a first dedicated line board, wherein a first pin of the first dedicated line board is connected to a first dedicated line module through a dedicated line, and the method includes:
[0007] Binary-code the first control instruction to be sent to obtain data to be sent;
[0008] According to the preset correspondence between binary numbers and code elements, the code elements corresponding to the binary numbers in the data to be sent are respectively determined; wherein any code element includes a data portion of a first duration; in the correspondence between the binary numbers and code elements, the duration of the data portion of the code elements corresponding to 0 and 1 is different; when the type of the first control instruction is to control the device to start, the level represented by the data portion of each code element determined includes the start level of the device; when the type of the first control instruction is to control the device to stop, the level represented by the data portion of each code element determined is the maintenance level of the device, and the maintenance level is lower than the start level;
[0009] The determined code elements are generated at the first pin, so that after the first dedicated line module receives the level signal generated by the first dedicated line board, it determines the control instruction represented by the received level signal based on the corresponding relationship between the binary number and the code element.
[0010] According to a second aspect of an embodiment of the present application, a dedicated line decoding method is provided, which is applied to a first dedicated line module, wherein 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:
[0011] receiving, through the second pin, a level signal generated by the first dedicated line board at the first pin as a level signal to be decoded;
[0012] According to each code element contained in the to-be-decoded level signal and the corresponding relationship between the preset binary number and the code element, the binary number corresponding to each code element is determined as the control instruction data;
[0013] Wherein, any code element includes a data portion of a first duration, and in the correspondence between the binary number and the code element, the duration of the data portion of the code element corresponding to 0 and 1 is different; when the control instruction data is used to control the startup of the device, the level represented by the data portion of each received code element includes the startup level of the device; when the control instruction data is used to control the stop of the device, the level represented by the data portion of each received code element is the maintenance level of the device, and the maintenance level is lower than the startup level;
[0014] The control instruction data is binary decoded to obtain a control instruction corresponding to the level signal to be decoded.
[0015] According to a third aspect of the embodiments of the present application, a dedicated line control system is provided, the dedicated line control system comprising: a first dedicated line board and a first dedicated line module;
[0016] The first dedicated line board is used to execute the dedicated line encoding method described in any one of the first aspects above;
[0017] The first dedicated line module is used to execute the dedicated line decoding method described in any one of the second aspects above.
[0018] In a fourth aspect of an embodiment of the present application, a dedicated line encoding device is provided, which is applied to a first dedicated line board, wherein a first pin of the first dedicated line board is connected to a first dedicated line module via a dedicated line, and the device includes:
[0019] A first encoding unit, used for performing binary encoding on a first control instruction to be sent to obtain data to be sent;
[0020] A code element determination unit, configured to determine the code elements corresponding to the binary numbers in the data to be sent, respectively, according to a preset correspondence between binary numbers and code elements; wherein any code element includes a data portion of a first duration; in the correspondence between binary numbers and code elements, the durations of the data portions of code elements corresponding to 0 and 1 are different; when the type of the first control instruction is to control the device to start, the level represented by the data portion of each code element determined includes the start level of the device; when the type of the first control instruction is to control the device to stop, the level represented by the data portion of each code element determined is the maintenance level of the device, and the maintenance level is lower than the start level;
[0021] The code element generation unit is used to generate each determined code element at the first pin so that after the first dedicated line module receives the level signal generated by the first dedicated line board, it determines the control instruction represented by the received level signal based on the correspondence between the binary number and the code element.
[0022] In a fifth aspect of an embodiment of the present application, a dedicated line decoding device is provided, which is applied to a first dedicated line module, wherein 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 device includes:
[0023] A signal receiving unit, configured to receive, through the second pin, a level signal generated by the first dedicated line board at the first pin as a level signal to be decoded;
[0024] A control instruction data determination unit, configured to determine the binary number corresponding to each code element as control instruction data according to each code element included in the to-be-decoded level signal and a preset correspondence relationship between the binary number and the code element;
[0025] Wherein, any code element includes a data portion of a first duration, and in the correspondence between the binary number and the code element, the duration of the data portion of the code element corresponding to 0 and 1 is different; when the control instruction data is used to control the startup of the device, the level represented by the data portion of each received code element includes the startup level of the device; when the control instruction data is used to control the stop of the device, the level represented by the data portion of each received code element is the maintenance level of the device, and the maintenance level is lower than the startup level;
[0026] The first decoding unit is used to perform binary decoding on the control instruction data to obtain a control instruction corresponding to the level signal to be decoded.
[0027] According to a sixth aspect of the embodiments of the present application, a dedicated line board is provided, including:
[0028] Memory, used to store computer programs;
[0029] The processor is used to implement any of the above-mentioned dedicated line encoding methods when executing the program stored in the memory.
[0030] According to a seventh aspect of the embodiments of the present application, a dedicated line module is provided, including:
[0031] Memory, used to store computer programs;
[0032] The processor is used to implement any of the above-mentioned dedicated line decoding methods when executing the program stored in the memory.
[0033] An embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute any of the dedicated line encoding methods or dedicated line decoding methods described above.
[0034] Beneficial effects of the embodiments of the present application:
[0035] The embodiment of the present application provides a dedicated line encoding method, and the dedicated line board (i.e., the first dedicated line board) can perform binary encoding on the first control instruction to be sent to obtain data to be sent that can represent the first control instruction, that is, the data to be sent is a combination of binary numbers (0 and 1). Furthermore, the code elements corresponding to each binary number in the data to be sent can be determined according to the preset correspondence between the binary number and the code element. Since in the preset correspondence between the binary number and the code element, when the type of the first control instruction is to control the device to start, the level represented by the data part of each code element determined includes the start level of the device, when the type of the first control instruction is to control the device to stop, the level represented by the data part of each code element determined is the maintenance level of the device, and the duration of the data part in the code element corresponding to the binary number 0 is different from the duration of the data part in the code element corresponding to the binary number 1. Therefore, the first dedicated line board can be encoded according to the above-mentioned preset correspondence between the binary number and the code element to generate each determined code element on the first pin. Correspondingly, after receiving the level signal generated by the first dedicated line board, the first dedicated line module can determine the binary numbers corresponding to the various code elements contained in the received level signal according to the corresponding relationship between the preset binary numbers and the code elements, and perform binary decoding to obtain the control instructions corresponding to the received level signal. In this way, in the present application, the control instructions can be encoded by the dedicated line board to obtain the level signal (i.e., each code element), and the dedicated line module can decode the level signal to obtain the control instruction, thereby realizing the transmission of the control instructions between the dedicated line board and the dedicated line module. Compared with the method of controlling the device by turning on and off the voltage, the dedicated line encoding method provided by the present application does not simply rely on the level at a certain moment to control the device, which can improve the stability of the control to a certain extent, and avoid the influence of the sudden level change caused by interference and other reasons on the stop and start state of the device.
[0036] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0038] Figure 1 Schematic diagram of the dedicated line control system provided for this application;
[0039] Figure 2 A first flow chart of a dedicated line encoding method provided in an embodiment of the present application;
[0040] Figure 3 A schematic diagram of a code element provided in an embodiment of the present application;
[0041] FIG4( a) is a schematic diagram of a code element corresponding to a binary number 0 provided in an embodiment of the present application;
[0042] FIG4( b ) is a schematic diagram of a code element corresponding to a binary number 1 provided in an embodiment of the present application;
[0043] Figure 5 A second flow chart of the dedicated line encoding method provided in an embodiment of the present application;
[0044] FIG6( a) is a schematic diagram of a code element corresponding to a binary number 0 in a first corresponding relationship provided in an embodiment of the present application;
[0045] FIG6( b ) is a schematic diagram of a code element corresponding to a binary number 1 in a first corresponding relationship provided in an embodiment of the present application;
[0046] FIG. 7( a) is a schematic diagram of a code element corresponding to a binary number 0 in a second corresponding relationship provided in an embodiment of the present application;
[0047] FIG7( b) is a schematic diagram of a code element corresponding to a binary number 1 in a second corresponding relationship provided in an embodiment of the present application;
[0048] FIG8( a ) is a schematic diagram of the structure of a frame for transmitting a control instruction to start a control device according to an embodiment of the present application;
[0049] FIG8( b ) is a schematic diagram of the structure of a frame for transmitting a control instruction for controlling a device to stop, provided in an embodiment of the present application;
[0050] Fig. 9 A schematic diagram of a process of sending and receiving code elements provided in an embodiment of the present application;
[0051] Fig.10 A first flow chart of a dedicated line decoding method provided in an embodiment of the present application;
[0052] FIG11( a ) is a schematic diagram of reporting device information in one code element when the type of the first control instruction is to control device startup, provided by an embodiment of the present application;
[0053] FIG11( b ) is a schematic diagram of reporting device information in one code element when the type of the first control instruction is to control the device to stop, provided by an embodiment of the present application;
[0054] Fig.12 A structural diagram of a dedicated line encoding device provided in an embodiment of the present application;
[0055] Fig.13 A structural diagram of a dedicated line decoding device provided in an embodiment of the present application;
[0056] Fig.14 A structural diagram of a dedicated line board provided in an embodiment of the present application;
[0057] Fig.15 A structural diagram of a dedicated line module provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0059] In the field of fire control technology, the wiring methods between fire fighting equipment (eg, fans, fire pumps, etc.) and control devices for controlling the fire fighting equipment can be divided into multi-line and bus systems.
[0060] The existing dedicated line control system includes a dedicated line board and a dedicated line module. The dedicated line board and the dedicated line module communicate via a dedicated line to control the fire fighting equipment corresponding to the dedicated line module. Accordingly, the dedicated line module can control the fire fighting equipment to stop or start.
[0061] In the related art, the communication between the dedicated line board and the dedicated line module is achieved by switching on and off the voltage. That is, when the voltage output by the dedicated line board is at a high level, the dedicated line module controls the fire-fighting equipment to start, and when the voltage output by the dedicated line board is at a low level, the dedicated line module controls the fire-fighting equipment to stop. However, in the above system, the start and stop of the fire-fighting equipment is completely dependent on the voltage on the line. If the voltage level suddenly changes due to interference or other reasons, it will cause abnormal start and stop of the fire-fighting equipment, resulting in poor control stability.
[0062] Therefore, how to ensure the stability of dedicated line control has become an urgent problem to be solved.
[0063] The dedicated line encoding method provided in the present application is particularly suitable for multi-line scenarios. In multi-line scenarios, each fire-fighting device (i.e., the device in the present application) is connected to the dedicated line board through an independent physical line (i.e., the dedicated line in the present application), that is, only the fire-fighting device and the dedicated line board are connected to the physical line.
[0064] In the present application, a fire fighting device is controlled by a dedicated line module, and a pin of the dedicated line module is connected to a pin of a dedicated line board. It is understandable that a dedicated line board can be connected to multiple dedicated line modules through multiple pins, and each dedicated line module controls a corresponding fire fighting device.
[0065] An embodiment of the present application provides a dedicated line encoding method, which can be 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 via a dedicated line.
[0066] The first dedicated line board can be any dedicated line board in the dedicated line control system. The dedicated line control system includes: dedicated line boards and dedicated line modules. Figure 1 , Figure 1 A schematic diagram of a dedicated line control system provided in the present application. A dedicated line control system 100 comprises: at least one dedicated line board 101 and at least one dedicated line module 102 , and a dedicated line module 102 is used to control a fire-fighting device 200 .
[0067] See also Figure 2 , Figure 2 A first flow chart of a dedicated line encoding method provided in an embodiment of the present application, the method comprising the following steps:
[0068] S201: Binary-code the first control instruction to be sent to obtain data to be sent.
[0069] S202: According to a preset correspondence relationship between binary numbers and code elements, respectively determine the code elements corresponding to the binary numbers in the data to be sent.
[0070] Among them, any code element includes a data part of a first duration; in the correspondence between binary numbers and code elements, the duration of the data part of the code elements corresponding to 0 and 1 is different; when the type of the first control instruction is to control the start-up of the device, the level represented by the data part of each code element determined includes the start-up level of the device; when the type of the first control instruction is to control the stop of the device, the level represented by the data part of each code element determined is the maintenance level of the device, and the maintenance level is lower than the start-up level.
[0071] S203: Generate the determined code elements at the first pin, so that after receiving the level signal generated by the first dedicated line board, the first dedicated line module determines the control instruction represented by the received level signal based on the corresponding relationship between the binary number and the code element.
[0072] The embodiment of the present application provides a dedicated line encoding method, and the dedicated line board (i.e., the first dedicated line board) can perform binary encoding on the first control instruction to be sent to obtain data to be sent that can represent the first control instruction, that is, the data to be sent is a combination of binary numbers (0 and 1). Furthermore, the code elements corresponding to each binary number in the data to be sent can be determined according to the preset correspondence between the binary number and the code element. Since in the preset correspondence between the binary number and the code element, when the type of the first control instruction is to control the device to start, the level represented by the data part of each code element determined includes the start level of the device, when the type of the first control instruction is to control the device to stop, the level represented by the data part of each code element determined is the maintenance level of the device, and the duration of the data part in the code element corresponding to the binary number 0 is different from the duration of the data part in the code element corresponding to the binary number 1. Therefore, the first dedicated line board can be encoded according to the above-mentioned preset correspondence between the binary number and the code element to generate each determined code element on the first pin. Correspondingly, after receiving the level signal generated by the first dedicated line board, the first dedicated line module can determine the binary numbers corresponding to the various code elements contained in the received level signal according to the corresponding relationship between the preset binary numbers and the code elements, and perform binary decoding to obtain the control instructions corresponding to the received level signal. In this way, in the present application, the control instructions can be encoded by the dedicated line board to obtain the level signal (i.e., each code element), and the dedicated line module can decode the level signal to obtain the control instruction, thereby realizing the transmission of the control instructions between the dedicated line board and the dedicated line module. Compared with the method of controlling the device by turning on and off the voltage, the dedicated line encoding method provided by the present application does not simply rely on the level at a certain moment to control the device, which can improve the stability of the control to a certain extent, and avoid the influence of the sudden level change caused by interference and other reasons on the stop and start state of the device.
[0073] For step S201, the first control instruction to be sent may be a control instruction for a device (which may be referred to as a first device), and the dedicated line module that controls the first device is the first dedicated line module in this application. Among them, a pin (i.e., the first pin) of the first dedicated line board is connected to a pin (i.e., the second pin) of the first dedicated line module through a dedicated line.
[0074] In one implementation, the user may interact with the dedicated control system through the first dedicated board. For example, the first dedicated board may include a physical button, a display screen, and other devices for receiving user control instructions. Accordingly, the user may trigger a control instruction for the first device at the first dedicated board, that is, a first control instruction. For example, the user may trigger a control instruction to instruct the first device to turn on, or a control instruction to instruct the first device to stop.
[0075] After obtaining the first control instruction to be sent, the first dedicated line board can perform binary encoding on the first control instruction to be sent to obtain the data to be sent. That is, the first dedicated line board can convert the first control instruction into binary data (i.e., a sequence of 0 and 1) according to the type of the first control instruction as the data to be sent. The number of binary numbers contained in the data to be sent is preset by the technician according to actual needs, such as the data to be sent can be a 2-bit or 6-bit binary number.
[0076] For example, taking the example that the number of binary numbers contained in the data to be sent is 6, when the type of the first control instruction is to control the device to start, the data to be sent may be 100100; when the type of the first control instruction is to control the device to stop, the data to be sent may be 100101.
[0077] With respect to step S202, the first dedicated line board may determine the code element corresponding to each binary number in the data to be sent according to the order of each binary number in the data to be sent and according to the preset correspondence between the binary number and the code element.
[0078] For a code element, the code element can be divided into a data part and a flag part, the data part of the code element is used to distinguish the binary number corresponding to the code element, and the flag part of the code element is used to distinguish the code element from other code elements in the level signal. Among them, the level represented by the data part of a code element is not a zero level.
[0079] In the embodiment of the present application, the level output by the first dedicated line board can be divided into three levels, as shown in the following table (1):
[0080] Table (1)
[0081] Level Grading Level value effect Logic Level High level 27V Power supply, code sending 1 Low level 10V answer 1 Zero Level 0V Send code 0
[0082] Among them, the level value of the high level is 27V (volts), the level value of the low level is 10V, and the level value of the zero level is 0V. The logic level corresponding to the high level and the low level is 1, and the logic level corresponding to the zero level is 0. The high level corresponds to power supply and code element transmission (i.e., code transmission), the low level corresponds to answering, and the zero level corresponds to code transmission. The specific power supply, code transmission and answering process will be described in the subsequent embodiments.
[0083] See also Figure 3 , Figure 3 A schematic diagram of a symbol provided for an embodiment of the present application. The level signal in the T1 time period corresponds to the data portion of the symbol, T1 represents the first duration, and the level signal in the T1 time period corresponds to a logic level 1 (i.e., logic 1). The level signal in the T4 time period corresponds to the mark portion of the symbol, T4 represents the fourth duration, and the level signal in the T4 time period corresponds to a logic level 0 (i.e., logic 0).
[0084] For each binary number in the data to be sent, the duration of the data part of the code element corresponding to the binary number (i.e., the first duration) can be determined according to the value of the binary number (0 or 1) in the corresponding relationship between the binary number and the code element. The duration of the data part of the code elements corresponding to 0 and 1 is different. For example, if a binary number is 0, the duration of the data part of the code element corresponding to the binary number can be determined to be 5 milliseconds; if a binary number is 1, the duration of the data part of the code element corresponding to the binary number can be determined to be 6 milliseconds. At this time, the duration of the data part of the code element corresponding to 1 is greater than the duration of the data part of the code element corresponding to 0. Alternatively, the duration of the data part of the code element corresponding to 1 may also be less than the duration of the data part of the code element corresponding to 0. The first duration corresponding to each binary number is not specifically limited in this application, and the first duration corresponding to each binary number can meet actual needs.
[0085] Referring to FIG. 4(a) and FIG. 4(b), FIG. 4(a) is a schematic diagram of a code element corresponding to a binary number 0 provided in an embodiment of the present application, wherein a logic level 0 (i.e., logic 0) of 1ms corresponds to the mark portion of the code element, and a logic level 1 (i.e., logic 1) of 5ms corresponds to the data portion of the code element. FIG. 4(b) is a schematic diagram of a code element corresponding to a binary number 1 provided in an embodiment of the present application, wherein a logic level 0 (i.e., logic 0) of 1ms corresponds to the mark portion of the code element, and a logic level 1 (i.e., logic 1) of 6ms corresponds to the data portion of the code element.
[0086] When the type of the first control instruction is to control the startup of the device, the first pin of the first dedicated line board needs to output the startup level of the first device to control the startup of the first device. Therefore, when the type of the first control instruction is to control the startup of the device, for each code element corresponding to a binary number in the data to be sent, the level represented by the data portion of the determined code element includes the startup level of the device (i.e., the level required to start the device). The duration of the startup level contained in the data portion of the code element can be referred to as the second duration. That is, the second duration is not greater than the first duration. Among them, the startup level of the device is determined based on the actual performance of the fire-fighting equipment in the scene, and the startup level of the device corresponds to the high level in the above table (1) (i.e., the level used for power supply and code transmission).
[0087] When the type of the first control instruction is to control the device to stop, the first pin of the first dedicated line board needs to output a level lower than the start-up level of the first device to control the first device to stop. Therefore, when the type of the first control instruction is to control the device to stop, for each binary number in the data to be sent, the level represented by the data part of the code element is determined to be the maintenance level of the device, that is, when the first pin of the first dedicated line board generates the data part of the code element, the first pin outputs the maintenance level of the first duration. Among them, the maintenance level of the device is lower than the start-up level of the device, and the maintenance level of the device is: the minimum level required for the device to communicate with the first dedicated line board. At this time, the maintenance level output by the first pin of the first dedicated line board cannot control the startup of the first device, and the first device can communicate with the first dedicated line board when the received level signal is the maintenance level. Correspondingly, the maintenance level of the device is also determined according to the actual performance of the fire-fighting equipment in the scene. Usually, the maintenance level of a device is lower than the start-up level of the device, and the maintenance level of the device corresponds to the low level (i.e., the level used for answering) in the above table (1).
[0088] For step S203, after respectively determining the code elements corresponding to each binary number in the data to be sent, the first dedicated line board can generate code elements corresponding to each determined binary number on the first pin according to the sequence of each binary number in the data to be sent, that is, generate a level signal containing multiple code elements.
[0089] Furthermore, after receiving the level signal generated by the first dedicated line board, the first dedicated line module can determine the control instruction represented by the received level signal based on the correspondence between the binary number and the code element. The specific process will be described in subsequent embodiments.
[0090] In some embodiments, the dedicated line communication between a dedicated line board and a dedicated line module adopts a two-bus technology, that is, signal transmission and power supply share a physical line. The basic communication principle of the two-bus technology is downstream voltage and upstream current, downstream is code sending, and upstream is code return. Correspondingly, the correspondence between binary numbers and code elements includes: a first correspondence under the condition that the type of control instruction is the control device startup, and a second correspondence under the condition that the type of control instruction is the control device stop.
[0091] In the first corresponding relationship, the data part of any code element includes a start level of the second duration and a maintenance level of the third duration, and the sum of the second duration and the third duration is the first duration; the maintenance level included in the data part of the code element is used to instruct the dedicated line module to upload the device information of the controlled device within the time period when the maintenance level in the data part is received; in the second corresponding relationship, the data part of any code element is a maintenance level lasting for the first duration, which is used to instruct the dedicated line module to upload the device information of the controlled device within the partial time period corresponding to the receipt of the data part.
[0092] See also Figure 5 , Figure 5 A second flow chart of the dedicated line encoding method provided in the embodiment of the present application, Figure 2 On the basis of, step S202 comprises:
[0093] S2021: If the type of the first control instruction is to control the device to start, then in the first corresponding relationship, the code elements corresponding to the binary numbers in the data to be sent are respectively determined.
[0094] S2022: If the type of the first control instruction is to control the device to stop, then in the second corresponding relationship, the code elements corresponding to the binary numbers in the data to be sent are respectively determined.
[0095] In the embodiment of the present application, the correspondence between the binary number and the code element can be divided into: a first correspondence and a second correspondence according to the type of the control instruction. The first correspondence represents: the correspondence between the binary number and the code element under the condition that the type of the control instruction is to control the device to start. The second correspondence represents: the correspondence between the binary number and the code element under the condition that the type of the control instruction is to control the device to stop.
[0096] In the first corresponding relationship, for each code element corresponding to a binary number in the data to be sent, the data portion of the code element includes a start level of the second duration and a maintenance level of the third duration. At this time, the sum of the second duration and the third duration is the first duration, and the portion of the code element corresponding to the second duration is located before the portion corresponding to the third duration. Correspondingly, the first dedicated line module can upload the device information of the controlled device (i.e., the first device) by means of a pull-up current (i.e., controlling the current value of the current output by the second pin of the first dedicated line module) during the time period corresponding to the maintenance level in the data portion of the code element output by the first pin of the first dedicated line board. The specific uploading process will be described in subsequent embodiments.
[0097] In one implementation, the second duration and the third duration may be determined in the following manner:
[0098]
[0099] Among them, T1 represents the first duration, T2 represents the second duration, and T3 represents the third duration. Indicates rounding up. Indicates rounding down.
[0100] Referring to Figures 6(a) and 6(b), Figure 6(a) is a schematic diagram of a code element corresponding to the binary number 0 in the first corresponding relationship provided in an embodiment of the present application, the duration of the mark part of the code element is 1ms, and the mark part of the code element is a zero level (0V) of the fourth duration (1ms); the duration of the data part of the code element is 5ms, and the data part of the code element includes a start level (27V) of the second duration (3ms) and a maintenance level (10V) of the third duration (2ms).
[0101] Figure 6(b) is a schematic diagram of a code element corresponding to the binary number 1 in the first corresponding relationship provided in an embodiment of the present application, wherein the duration of the mark part of the code element is 1ms, and the mark part of the code element is a zero level (0V) of the fourth duration (1ms); the duration of the data part of the code element is 6ms, and the data part of the code element includes a start level (27V) of the second duration (3ms) and a maintenance level (10V) of the third duration (3ms).
[0102] It can be understood that, since the maximum output power (denoted as P) of the first dedicated line board is fixed, and P=I×V, where I is the current value and V is the voltage value. If the first dedicated line module pulls up the current value on the dedicated line when the level value (i.e., voltage) output by the first pin is the start-up level, it may cause the actual power of the first dedicated line board to exceed the maximum output power, triggering the power protection of the first dedicated line board and powering off. For example, if the maximum output power of the first dedicated line board is 27W (watts), the start-up level is 27V, and the current on the dedicated line is 1A (ampere) when the first pin of the first dedicated line board outputs the start-up level, at this time, if the first dedicated line module pulls up the current value on the dedicated line, it will cause the actual power of the first dedicated line board to exceed the maximum output power, and then cause the first dedicated line board to be powered off. Therefore, in order to ensure the safety of the circuit, in the embodiment of the present application, the first dedicated line module will only pull up the current value on the dedicated line during the time period when the level value (i.e., voltage) output by the first pin of the first dedicated line board is the maintenance level.
[0103] In some embodiments, the method further comprises:
[0104] If the type of the first control instruction is to control the device to start, within the time period corresponding to the fourth time length of the data part of each generated code element, the device information uploaded by the first dedicated line module is read through the first pin.
[0105] In the embodiment of the present application, if the type of the first control instruction is to control the device to start up, then the level output by the first pin in the time period corresponding to the fourth duration of the data portion of each code element is a maintenance level.
[0106] In one implementation, when the first dedicated line board generates each code element at the first pin, the first dedicated line board can read the device information uploaded by the first dedicated line module (i.e., the current value of the current on the first pin) when the designated time corresponding to the code element is reached. For each code element, the time corresponding to the designated time length after the start time of generating the code element can be used as the designated time corresponding to the code element, and the level at the designated time corresponding to the code element is the maintenance level.
[0107] Accordingly, the second duration and the third duration of the code element corresponding to the binary number 0, and the second duration and the third duration of the code element corresponding to the binary number 1 can be obtained, and then the specified duration can be determined. The specified duration is greater than the second duration of the code element corresponding to the binary number 0, greater than the second duration of the code element corresponding to the binary number 1, less than the first duration of the code element corresponding to the binary number 0, and less than the first duration of the code element corresponding to the binary number 1. In this way, it can be ensured that for each code element, the level at the specified moment corresponding to the code element is the maintenance level.
[0108] For example, in the first corresponding relationship, if the first duration of the code element corresponding to the binary number 0 is 5 milliseconds, then the second duration corresponding to the binary number 0 is 3 milliseconds, and the third duration corresponding to the binary number 0 is 2 milliseconds. The first duration of the code element corresponding to the binary number 1 is 6 milliseconds, then the second duration corresponding to the binary number 1 is 3 milliseconds, and the third duration corresponding to the binary number 0 is 3 milliseconds. Accordingly, for each code element, the designated time of the code element may be: the time corresponding to 3 milliseconds after the start time of generating the code element.
[0109] In this way, the control of the subordinate device by the upper device (i.e., controlling the device through the first dedicated line board) and the reporting of the device information of the subordinate device to the upper device (i.e., the first dedicated line module uploads the device information of the first device) can be completed in one code element. In this way, the control and reporting are completed synchronously in the same code element. While the upper device controls the subordinate device, the subordinate device can upload the device information of the device, and the signal transmission and power supply are realized on one physical line, thereby improving the working efficiency of the link.
[0110] In the second corresponding relationship, the data part of any symbol is a maintenance level that lasts for the first time period. Accordingly, for each symbol, the first dedicated line module can upload the device information of the controlled device within a partial time period corresponding to the data part of the symbol received.
[0111] Refer to Figures 7(a) and 7(b). Figure 7(a) is a schematic diagram of a code element corresponding to the binary number 0 in the second corresponding relationship provided in an embodiment of the present application. The duration of the mark part of the code element is 1ms (millisecond), and the mark part of the code element is a zero level (0V) of the fourth duration (1ms); the duration of the data part of the code element is 5ms (millisecond), and the data part of the code element is a maintenance level (10V) of the first duration (5ms).
[0112] Figure 7(b) is a schematic diagram of a code element corresponding to the binary number 1 in the second corresponding relationship provided in an embodiment of the present application, wherein the duration of the mark part of the code element is 1ms (millisecond), and the mark part of the code element is a zero level (0V) of the fourth duration (1ms); the duration of the data part of the code element is 6ms (milliseconds), and the data part of the code element is a maintenance level (10V) of the first duration (6ms).
[0113] In some embodiments, the method further comprises:
[0114] If the type of the first control instruction is to control the device to stop, the device information uploaded by the first dedicated line module is read through the first pin within a partial time period corresponding to the first duration of the data portion of each generated code element.
[0115] In the embodiment of the present application, if the type of the first control instruction is to control the device to stop, at this time, the level output by the first pin in the time period corresponding to the data part of each code element is always the maintenance level.
[0116] In order to facilitate the first dedicated line board to determine the time period for reading the current value on the first pin, in one implementation, during the process of the first dedicated line board generating each code element on the first pin, the first dedicated line board can read the current value of the current on the first pin when the specified time corresponding to the code element is reached. For each code element, the time corresponding to the specified time length after the start time of generating the code element can be used as the specified time corresponding to the code element, and the level at the specified time corresponding to the code element is the maintenance level.
[0117] Since the data part of the code element corresponding to each binary number in the second corresponding relationship is a maintenance level, that is, at any time in the data part of each code element, the first dedicated line module can upload the device information of the device. Therefore, in the process of determining the specified time length, there is no need to consider the time length of the data part of the code element corresponding to each binary number in the second corresponding relationship, and the specified time length can be determined only in the manner described in the above embodiment, which will not be described in detail here.
[0118] For example, in the second corresponding relationship, if the first duration of the code element corresponding to the binary number 0 is 5 milliseconds, and the first duration of the code element corresponding to the binary number 1 is 6 milliseconds, accordingly, for each code element, the specified time of the code element may be: the time corresponding to 3 milliseconds after the start time of generating the code element.
[0119] In one implementation, the second duration and the third duration may be determined in the above embodiment, and the start time of the time period corresponding to the third duration in the data portion of a symbol may be determined as the designated time. The second duration and the third duration may be determined in the following manner:
[0120]
[0121] Among them, T1 represents the first duration, T2 represents the second duration, and T3 represents the third duration. Indicates rounding up. Indicates rounding down.
[0122] In this way, the control of the subordinate device by the upper device (i.e., controlling the device through the first dedicated line board) and the reporting of the device information of the subordinate device to the upper device (i.e., the first dedicated line module uploads the device information of the first device) can be completed in one code element. In this way, the control and reporting are completed synchronously in the same code element. While the upper device controls the subordinate device, the subordinate device can upload the device information of the device, and the signal transmission and power supply are realized on one physical line, thereby improving the working efficiency of the link.
[0123] In some embodiments, the second pin of the first dedicated line module is connected to the first pin of the first dedicated line board through a dedicated line.
[0124] The step of reading the device information uploaded by the first dedicated line module through the first pin includes:
[0125] Step a: Read the current value of the current outputted by the first dedicated line module on the second pin through the first pin.
[0126] The current value of the current output on the second pin is determined by the first dedicated line module based on a third corresponding relationship between a preset binary number and the current value and binary data corresponding to the device information to be uploaded.
[0127] Step b: Decode the read current value according to the third corresponding relationship to obtain the device information uploaded by the first dedicated line module.
[0128] In the embodiment of the present application, during the process of the first dedicated line board generating each code element, the first dedicated line module can control the current value of the current output by the second pin after reaching the specified time of the code element. Correspondingly, the first dedicated line board can read the current value of the current on the first pin after reaching the specified time of the code element.
[0129] Among them, in the third corresponding relationship between the preset binary number and the current value, the current values corresponding to 0 and 1 are different. For example, the current value corresponding to 0 may be 10mA (milliamperes), and the current value corresponding to 1 may be 20mA.
[0130] Furthermore, the first dedicated line board can decode the read current value according to the third corresponding relationship to obtain binary data corresponding to the device information to be uploaded (ie, data to be uploaded).
[0131] For example, after the first dedicated line board reaches the specified time of each code element, the current values read are: 10mA, 10mA, 10mA, 10mA, 10mA, 20mA respectively. It can be determined that the binary numbers corresponding to each current value are: 0, 0, 0, 0, 0, 1 respectively. Correspondingly, the data to be uploaded is: 000001.
[0132] Furthermore, the first dedicated line board can determine the device information of the first device according to the obtained data to be uploaded.
[0133] Based on the above processing, the control of the subordinate device by the upper device (i.e., controlling the device through the first dedicated line board) and the reporting of the device information of the subordinate device to the upper device (i.e., the first dedicated line module uploads the device information of the first device) can be completed in one code element. In this way, the control and reporting are completed synchronously in the same code element. While the upper device controls the subordinate device, the subordinate device can upload the device information of the device, and the signal transmission and power supply are realized on one physical line, thereby improving the working efficiency of the link.
[0134] In some embodiments, any codeword further includes a flag portion of a fourth duration, the level represented by the flag portion is a zero level, and the fourth duration is no greater than 1 millisecond; in terms of timing, the flag portion of any codeword is earlier than the data portion of the codeword.
[0135] In an embodiment of the present application, for any code element, the level represented by the flag part of the code element can be set to zero level. Furthermore, in order to avoid the first dedicated line module controlling the first device to stop because the level signal output by the first pin is at zero level for too long, the fourth time length can be set to be no greater than 1 millisecond. Among them, when the level signal output by the first pin of the first dedicated line board is at zero level for no more than 1 millisecond, the first dedicated line module will not control the first device to stop.
[0136] And for any code element, the mark part of the code element can be set earlier than the data part of the code element in terms of timing. That is, in the process of generating a code element by the first pin, the mark part of the code element is generated first, and then the data part of the code element is generated.
[0137] Based on the above processing, it can be ensured that in the process of generating each code element, the first pin first outputs the mark part of the code element (i.e., the zero level of the fourth time length), and then outputs the data part of the code element. In this way, the first dedicated line module can accurately divide the code elements in the received level signal generated by the first dedicated line board, determine the starting time of each code element reception, and also determine the end time of the previous code element reception. In the embodiment of the present application, by introducing zero level through level grading, the voltage discharge path can be increased, and the anti-interference ability of the line is enhanced.
[0138] Alternatively, in another implementation, the data portion of any codeword is earlier than the flag portion of the codeword in terms of timing.
[0139] For any code element, the data part of the code element can be set earlier than the mark part of the code element in terms of timing. That is, in the process of generating a code element by the first pin, the data of the code element is generated first, and then the mark part of the code element is generated.
[0140] Based on the above processing, it can be ensured that in the process of generating each code element, the first pin first outputs the data part of the code element, and then outputs the mark part of the code element (i.e., the zero level of the fourth time length). In this way, the first dedicated line module can accurately divide the code elements in the received level signal generated by the first dedicated line board, determine the end time of each code element reception, and also determine the start time of the next code element reception.
[0141] Moreover, the code elements in this application have certain scalability, and technicians can set the duration corresponding to a code element according to actual needs. For example, for a code element, the first duration and the fourth duration of the code element can be set according to actual needs. In this way, efficient and stable control can be achieved.
[0142] In some embodiments, after step S203, the method further includes:
[0143] Step 1: If the type of the first control instruction is to control the device to start, then the start level is output through the first pin.
[0144] Step 2: If the type of the first control instruction is to control the device to stop, the maintenance level is output through the first pin.
[0145] In the embodiment of the present application, if the type of the first control instruction is to control the startup of the device, after the first pin generates the determined code elements, in order to ensure that the first device is in the startup state, the startup level can be output through the first pin.
[0146] If the type of the first control instruction is to control the device to stop, after the first pin generates the determined code elements, in order to ensure that the first device is in a stopped state, a maintenance level can be output through the first pin to ensure that the first device will not be started and the first device can communicate with the first dedicated line board when the received level signal is a maintenance level.
[0147] In one implementation, the first dedicated line board can transmit the level signal in a frame structure. Accordingly, the duration of a frame is fixed. A frame includes: a start bit, a data bit, and an end bit. The interval between the end time of the end bit of the frame and the start time of the start bit of the next frame can be called the frame interval of the frame. The data bits in a frame correspond to the code elements corresponding to each binary number in the data to be sent.
[0148] See Figure 8 (a), which is a structural diagram of a frame for transmitting a control instruction for controlling device startup provided by an embodiment of the present application. In Figure 8 (a), 0V represents zero level, 10V represents a maintenance level, and 27V represents a startup level. The duration corresponding to a frame (i.e., the entire frame length) is 480ms, and a frame includes: a start bit, a data bit, and an end bit. The interval between the end time of the end bit of the frame and the start time of the start bit of the next frame can be called the frame interval of the frame. The data bit of the frame includes 6 bits of data (100100). Figure 8 (a) shows the code element corresponding to the first bit of data "1" in the 6-bit data, and the code element corresponding to the sixth bit of data "0" in the 6-bit data. The code element corresponding to the middle 4 bits of data is not shown in Figure 8 (a), that is, 4 bits are omitted. If the type of the first control instruction is to control device startup, the data bit of the frame includes the code elements corresponding to each binary number representing the first control instruction. In the time period corresponding to the frame interval of the frame, the level output by the first pin of the first dedicated line board is the startup level.
[0149] See Figure 8 (b), which is a structural diagram of a frame for transmitting a control instruction for controlling the device to stop provided by an embodiment of the present application. In Figure 8 (b), 0V represents a zero level, 10V represents a maintenance level, and 27V represents a start level. The duration corresponding to a frame (i.e., the entire frame length) is 480ms, and a frame includes: a start bit, a data bit, and an end bit. The interval between the end time of the end bit of the frame and the start time of the start bit of the next frame can be called the frame interval of the frame. The data bit of the frame includes 6 bits of data (100101). Figure 8 (b) shows the code element corresponding to the first bit of data "1" in the 6-bit data, and the code element corresponding to the sixth bit of data "1" in the 6-bit data. The code element corresponding to the middle 4 bits of data is not shown in Figure 8 (b), that is, 4 bits are omitted. If the type of the first control instruction is to control the device to stop, the data bit of the frame includes the code elements corresponding to each binary number representing the first control instruction. In the time period corresponding to the frame interval of the frame, the level output by the first pin of the first dedicated line board is the maintenance level.
[0150] Based on the above processing, since the first dedicated line module can determine the type of control instruction corresponding to the 6-bit data contained in the data bit of the frame only after receiving the data bit of the frame, the first pin needs to continue to output the corresponding level to control the stop or start of the device. That is, if the type of the first control instruction is to control the device to start, then in the time period corresponding to the frame interval of the frame, the level output by the first pin of the first dedicated line board is the start level. If the type of the first control instruction is to control the device to stop, then in the time period corresponding to the frame interval of the frame, the level output by the first pin of the first dedicated line board is the maintenance level. In this way, the control of the device can be achieved.
[0151] In some embodiments, the above step 1 includes:
[0152] The start level is outputted through the first pin until the preset time length is reached from the start time of each code element determined by the first pin last time, and the process returns to step S203.
[0153] and / or,
[0154] The above step 2 includes:
[0155] The maintenance level is outputted through the first pin until the preset time length is reached from the start time of each code element determined by the first pin last time, and the process returns to step S203.
[0156] In the embodiment of the present application, if the type of the first control instruction is to control the startup of the device, after the first pin generates each determined code element once, the startup level can be continuously output through the first pin. Furthermore, when the preset time has been reached since the start time of each determined code element generated at the first pin last time, if no new instruction for the first device is currently received, the first dedicated line board can generate each determined code element at the first pin again.
[0157] And / or, if the type of the first control instruction is to control the device to stop, after the first pin generates each determined code element once, the first pin can continuously output the maintenance level. Furthermore, when the preset time has been reached since the start time of each determined code element generated at the first pin last time, if no new instruction for the first device is currently received, the first dedicated line board can generate each determined code element at the first pin again.
[0158] In one implementation, the first dedicated line board can generate each determined code element multiple times. Accordingly, the technician can determine a threshold of the number of repeated generation. After reaching the threshold, the first dedicated line board stops generating each determined code element.
[0159] Based on the above processing, the first dedicated line board can generate multiple determined code elements, so that it can avoid the situation that the first dedicated line module cannot accurately determine the control instructions for the first device due to interference and other reasons during the process of the first pin generating each determined code element once. In addition, it can also avoid the situation that the first dedicated line module does not receive each code element due to the short-term offline of the first device (such as the device being offline due to the power plugging and unplugging of the device). In this way, the stability of control can be further improved.
[0160] See also Fig. 9 , Fig. 9 A schematic diagram of a process of sending and receiving code elements provided in an embodiment of the present application.
[0161] S901: Start.
[0162] S902: Logic 0 level.
[0163] That is, the first dedicated line board outputs a level corresponding to a logic level 0, that is, a zero level.
[0164] S903: Determine whether it reaches 1 ms. If yes, execute step S904; if no, execute step S902.
[0165] That is, it is determined whether the fourth time length has been reached. If reached, it indicates that the generation of the flag portion of the code element has been completed, and the generation of the data portion of the code element continues.
[0166] S904: Logic 1 level.
[0167] That is, the first dedicated line board outputs the level corresponding to the logic level 1 (ie, the data part of the code element), namely, the low level and the high level.
[0168] S905: Determine whether the duration T1 has been reached. If yes, execute step S906; if no, execute step S904.
[0169] That is, it is determined whether the end time of the time period corresponding to the third duration of the code element has been reached. If reached, it indicates that the first dedicated line board can start receiving the device information of the device uploaded by the first dedicated line module.
[0170] S906: Detect the return code.
[0171] That is, the first dedicated line board reads the current value on the first pin.
[0172] S907: Determine whether the duration T2 has been reached. If yes, execute step S908; if no, execute step S906.
[0173] That is, after the data portion of the code element is generated, the first dedicated line board can determine the device information of the first device according to the read current value.
[0174] S908: Processing of return code information.
[0175] That is, the first dedicated line board can determine the device information of the first device according to the read current value.
[0176] Based on the same inventive concept, the embodiment of the present application provides a dedicated line decoding method, which is applied to a first dedicated line module, and the second pin of the first dedicated line module is connected to the first pin of the first dedicated line board through a dedicated line. Fig.10 , Fig.10 A first flow chart of a dedicated line decoding method provided in an embodiment of the present application, the method comprising the following steps:
[0177] S1001: Receive a level signal generated by a first dedicated line module at a first pin through a second pin as a level signal to be decoded.
[0178] S1002: According to each code element included in the level signal to be decoded and the preset correspondence relationship between the binary number and the code element, the binary number corresponding to each code element is determined as control instruction data.
[0179] Among them, any code element includes a data part of a first duration, and in the corresponding relationship between binary numbers and code elements, the duration of the data part of the code elements corresponding to 0 and 1 is different; when the control instruction data is used to control the startup of the device, the level represented by the data part of each received code element includes the startup level of the device; when the control instruction data is used to control the stop of the device, the level represented by the data part of each received code element is the maintenance level of the device, and the maintenance level is lower than the startup level.
[0180] S1003: Perform binary decoding on the control instruction data to obtain a control instruction corresponding to the level signal to be decoded.
[0181] The embodiment of the present application provides a dedicated line decoding method, and the dedicated line board (i.e., the first dedicated line board) can perform binary encoding on the first control instruction to be sent to obtain the data to be sent that can represent the first control instruction, that is, the data to be sent is a combination of binary numbers (0 and 1). Furthermore, the code elements corresponding to each binary number in the data to be sent can be determined according to the preset correspondence between the binary number and the code element. Since in the preset correspondence between the binary number and the code element, when the type of the first control instruction is to control the device to start, the level represented by the data part of each code element determined includes the start level of the device, when the type of the first control instruction is to control the device to stop, the level represented by the data part of each code element determined is the maintenance level of the device, and the duration of the data part in the code element corresponding to the binary number 0 is different from the duration of the data part in the code element corresponding to the binary number 1. Therefore, the first dedicated line board can be encoded according to the above-mentioned preset correspondence between the binary number and the code element to generate each determined code element on the first pin. Correspondingly, after receiving the level signal generated by the first dedicated line board, the first dedicated line module can determine the binary numbers corresponding to the various code elements contained in the received level signal according to the corresponding relationship between the preset binary numbers and the code elements, and perform binary decoding to obtain the control instructions corresponding to the received level signal. In this way, in the present application, the control instructions can be encoded by the dedicated line board to obtain the level signal (i.e., each code element), and the dedicated line module can decode the level signal to obtain the control instruction, thereby realizing the transmission of the control instructions between the dedicated line board and the dedicated line module. Compared with the method of controlling the device by turning on and off the voltage, the dedicated line encoding method provided by the present application does not simply rely on the level at a certain moment to control the device, which can improve the stability of the control to a certain extent, and avoid the influence of the sudden level change caused by interference and other reasons on the stop and start state of the device.
[0182] For step S1001-step S1002, the first dedicated line module can receive the level signal generated by the first dedicated line board at the first pin through a pin (i.e., the second pin) as the level signal to be decoded. The process of the first dedicated line board generating the level signal at the first pin refers to the embodiment corresponding to the above steps S201-S203, which will not be repeated here.
[0183] The level signal to be decoded includes multiple code elements corresponding to binary numbers. Therefore, the first dedicated line module can determine the binary number corresponding to each code element as control instruction data according to each code element included in the level signal to be decoded and the preset correspondence between the binary number and the code element. The process of determining each code element included in the level signal to be decoded will be described in subsequent embodiments.
[0184] Correspondingly, from the correspondence between the preset binary number and the code element, it can be known that for a code element, the level represented by the data part of the code element includes the start level and / or the maintenance level. Therefore, if a code element contains the start level and the maintenance level, the first dedicated line module can determine the duration of the data part of the code element (i.e., the first duration) according to the total duration of the start level and the maintenance level in the code element. If a code element only contains the maintenance level, the first dedicated line module can determine the duration of the data part of the code element (i.e., the first duration) according to the duration of the maintenance level in the code element. If a code element only contains the start level, the first dedicated line module can determine the duration of the data part of the code element (i.e., the first duration) according to the duration of the start level in the code element.
[0185] Furthermore, since in the correspondence between binary numbers and code elements, the duration of the data portion of the code elements corresponding to 0 and 1 is different, the first dedicated line module can determine the binary number corresponding to a code element according to the duration of the data portion of the code element.
[0186] For example, in the correspondence between binary numbers and code elements, the duration of the data portion of the code element corresponding to the binary number 0 is 5 milliseconds; the duration of the data portion of the code element corresponding to the binary number 1 is 6 milliseconds. The durations of the data portions of the 6 code elements contained in the level signal to be decoded are: 6 milliseconds, 5 milliseconds, 5 milliseconds, 6 milliseconds, 5 milliseconds, and 5 milliseconds, respectively. It can be determined that the binary numbers corresponding to each code element are: 1, 0, 0, 1, 0, 0, respectively, and the corresponding control instruction data is: 100100.
[0187] And in the correspondence between binary numbers and code elements, when the control instruction data is used to control the startup of the device, the level represented by the data part of each received code element includes the startup level of the device. Therefore, the first dedicated line module can control the startup of the first device when receiving each code element corresponding to the control instruction data for controlling the startup of the device.
[0188] When the control instruction data is used to control the device to stop, the level represented by the data part of each received code element is the maintenance level of the device. Therefore, when the first dedicated line module receives each code element corresponding to the control instruction data for controlling the device to start, it cannot control the first device to start. At this time, the first dedicated line module controls the first device to stop.
[0189] With respect to step S1003, the first dedicated line module may perform binary decoding on the control instruction data to obtain a control instruction corresponding to the level signal to be decoded.
[0190] In some embodiments, after step S1003, the method further includes:
[0191] If the type of the obtained control instruction is to control the device to start up, then the device controlled by the first dedicated line module is controlled to start up.
[0192] For example, if the control instruction data is: 100100, the first dedicated line module can perform binary decoding on the control instruction data to obtain a control instruction corresponding to the to-be-decoded level signal for instructing to control the startup of the first device.
[0193] In some embodiments, after step S1003, the method further includes:
[0194] If the type of the obtained control instruction is to control the device to stop, the device controlled by the first dedicated line module is controlled to stop.
[0195] For example, the control instruction data is: 100101, and the first dedicated line module can perform binary decoding on the control instruction data to obtain a control instruction corresponding to the to-be-decoded level signal for instructing to control the first device to stop.
[0196] In some embodiments, the first dedicated line module is used to control the first device. The correspondence between the binary number and the code element includes: a first correspondence when the type of the control instruction is to control the device to start, and a second correspondence when the type of the control instruction is to control the device to stop.
[0197] In the first corresponding relationship, the data part of any codeword includes a start level of the second duration and a maintenance level of the third duration, and the sum of the second duration and the third duration is the first duration; in the second corresponding relationship, the data part of any codeword is a maintenance level that lasts for the first duration.
[0198] The method also includes:
[0199] Step 1: In the process of receiving each code element included in the level signal to be decoded, when the designated time corresponding to each code element is reached, the device information of the first device is uploaded to the first dedicated line board.
[0200] The duration between the designated time corresponding to each symbol and the start time of receiving the data portion of the symbol is the designated time, and the level at the designated time corresponding to the symbol is the maintenance level.
[0201] In the embodiment of the present application, the first corresponding relationship and the second corresponding relationship can refer to the relevant introduction in the embodiment corresponding to the above steps S2021-S2022, and will not be repeated here.
[0202] Correspondingly, when the first dedicated line module receives each code element contained in the level signal to be decoded through the second pin, when the specified time corresponding to each code element is reached, the device information of the controlled device (i.e., the first device) can be uploaded by pulling up the current (i.e., controlling the current value of the current output by the second pin of the first dedicated line module).
[0203] In some embodiments, the above step 1 includes:
[0204] Step 1-1: Obtain data to be uploaded by binary encoding device information of a first device to be uploaded.
[0205] Step 1-2: Based on a preset third correspondence between binary numbers and current values, the current value corresponding to each binary number in the data to be uploaded is determined respectively.
[0206] Step 1-3: Control the output current of the second pin according to the current value corresponding to each determined binary number.
[0207] In the embodiment of the present application, the first dedicated line module can obtain the device information of the current first device as the device information of the first device to be uploaded. For example, the device information of a device can represent the device's own condition, for example, the device's own condition can be: normal, open circuit fault, or short circuit fault.
[0208] Accordingly, the first dedicated line module can binary encode the device information of the first device to be uploaded to obtain the data to be uploaded. The number of binary numbers contained in the data to be uploaded is preset by the technician according to actual needs, for example, the data to be uploaded can be consistent with the number of bits contained in the data to be sent.
[0209] For example, taking the number of binary numbers contained in the data to be uploaded as 6, when the device information of the device is normal, the data to be uploaded can be 000001; when the device information of the device indicates that there is an open circuit fault, the data to be uploaded can be 000011; when the device information of the device indicates that there is a short circuit fault, the data to be uploaded can be 000111.
[0210] Furthermore, the first dedicated line module can determine the current value corresponding to each binary number in the data to be uploaded according to the third correspondence between the preset binary number and the current value. In the third correspondence between the preset binary number and the current value, the current values corresponding to 0 and 1 are different. For example, the current value corresponding to 0 can be 10mA (milliamperes), and the current value corresponding to 1 can be 20mA.
[0211] Furthermore, the first dedicated line module can control the second pin to output a current of a current value corresponding to the binary number after reaching a designated time of each received code element according to the order of the binary numbers in the data to be uploaded.
[0212] Referring to Figures 11(a) and 11(b), Figure 11(a) is a schematic diagram of reporting device information in a code element when the type of the first control instruction is to control device startup provided by an embodiment of the present application. Wherein, 0V represents zero level, 10V represents maintenance level, and 27V represents startup level. T1 represents the time period corresponding to the third duration in the data part of the code element, and T2 represents the time period corresponding to the fourth duration in the data part of the code element, that is, the code element contains the startup level (27V) of the T1 duration and the maintenance level (10V) of the T2 duration. The first dedicated line module can realize the reporting of device information by controlling the current value output by the second pin during the time period corresponding to the fourth duration in the data part of the code element.
[0213] FIG11( b) is a schematic diagram of reporting device information in a code element when the type of the first control instruction is to control the device to stop, provided by an embodiment of the present application. 0V represents zero level, 10V represents maintenance level, and 27V represents start level. T1 represents the time period corresponding to the third duration in the data part of the code element, and T2 represents the time period corresponding to the fourth duration in the data part of the code element, that is, the code element contains the maintenance level (10V) of T1 duration and T2 duration. The first dedicated line module can realize the reporting of device information by controlling the current value output by the second pin in the time period corresponding to the fourth duration in the data part of the code element.
[0214] Based on the above processing, the upper-level device can control the lower-level device (i.e., control the device through the first dedicated line board) in one code element, and the lower-level device can report its own device information to the upper-level device. In this way, signal transmission and power supply can be realized on one physical line, thereby improving the working efficiency of the link.
[0215] In some embodiments, any codeword further includes a flag portion of a fourth duration, the level represented by the flag portion is a zero level, and the fourth duration is no greater than 1 millisecond; in terms of timing, the flag portion of any codeword is earlier than the data portion of the codeword.
[0216] Before S1002, the method further includes:
[0217] The moment when each mark part is received is taken as the starting point of a code element, and each code element is decoded from the level signal to be decoded.
[0218] In the embodiment of the present application, in the process of generating each code element, the first pin first outputs the mark part of the code element (i.e., the zero level of the fourth time length) and then outputs the data part of the code element. In this way, the first dedicated line module can determine the moment of receiving a mark part as the starting moment of receiving a code element, which is also the end moment of receiving the previous code element. Furthermore, the first dedicated line module can divide each code element in the received level signal generated by the first dedicated line board.
[0219] In this way, the first dedicated line module can accurately divide the code elements in the received level signal generated by the first dedicated line board. Subsequently, the control instruction data representing the control instruction can be determined according to each code element and the correspondence between the preset binary number and the code element to realize the control of the device.
[0220] Based on the same inventive concept, the embodiment of the present application provides a dedicated line encoding device, which is applied to a first dedicated line board, wherein the first pin of the first dedicated line board is connected to the first dedicated line module via a dedicated line, see Fig.12 , Fig.12 This is a structural diagram of a dedicated line encoding device provided in an embodiment of the present application. The device includes:
[0221] The first encoding unit 1201 is used to perform binary encoding on the first control instruction to be sent to obtain data to be sent;
[0222] The code element determination unit 1202 is used to determine the code elements corresponding to the binary numbers in the data to be sent according to the preset correspondence between the binary numbers and the code elements; wherein any code element includes a data part of a first duration; in the correspondence between the binary numbers and the code elements, the duration of the data part of the code elements corresponding to 0 and 1 is different; when the type of the first control instruction is to control the device to start, the level represented by the data part of each code element determined includes the start level of the device; when the type of the first control instruction is to control the device to stop, the level represented by the data part of each code element determined is the maintenance level of the device, and the maintenance level is lower than the start level;
[0223] The code element generation unit 1203 is used to generate the determined code elements at the first pin so that after the first dedicated line module receives the level signal generated by the first dedicated line board, it determines the control instruction represented by the received level signal based on the correspondence between the binary number and the code element.
[0224] In some embodiments, the correspondence between the binary number and the code element includes: a first correspondence under the condition that the type of the control instruction is to control the device to start, and a second correspondence under the condition that the type of the control instruction is to control the device to stop;
[0225] In the first corresponding relationship, the data part of any code element includes a start level of a second duration and a maintenance level of a third duration, and the sum of the second duration and the third duration is the first duration; the maintenance level included in the data part of the code element is used to instruct the dedicated line module to upload the device information of the controlled device within the time period of receiving the maintenance level in the data part;
[0226] In the second corresponding relationship, the data part of any code element is a maintenance level lasting the first time length, which is used to instruct the dedicated line module to upload the device information of the controlled device within the partial time period corresponding to the data part;
[0227] The code element determination unit 1202 is specifically configured to:
[0228] If the type of the first control instruction is to control the device to start, then in the first corresponding relationship, the code elements corresponding to the binary numbers in the data to be sent are respectively determined;
[0229] If the type of the first control instruction is to control the device to stop, then in the second corresponding relationship, the code elements corresponding to the binary numbers in the data to be sent are respectively determined.
[0230] In some embodiments, any codeword further includes a flag portion of a fourth duration, the level represented by the flag portion is a zero level, and the fourth duration is no greater than 1 millisecond; in terms of timing, the flag portion of any codeword is earlier than the data portion of the codeword.
[0231] In some embodiments, the apparatus further comprises:
[0232] A first output unit, configured to output the startup level through the first pin after the first pin generates the determined code elements, if the type of the first control instruction is to control the device to start;
[0233] The second output unit is configured to output the maintenance level through the first pin after the determined code elements are generated at the first pin if the type of the first control instruction is to control the device to stop.
[0234] In some embodiments, the first output unit is specifically used to:
[0235] Outputting the start level through the first pin until a preset time length is reached from the start time of each code element determined by the first pin last time, and returning to trigger the code element generation unit 1203;
[0236] and / or,
[0237] The second output unit is specifically used for:
[0238] The sustain level is outputted through the first pin until a preset time length is reached from the start time of each code element determined by the first pin last time, and the code element generation unit 1203 is triggered back.
[0239] In some embodiments, the apparatus further comprises:
[0240] a first receiving unit, configured to read the device information uploaded by the first dedicated line module through the first pin within a time period corresponding to a fourth time length of the data portion of each generated code element if the type of the first control instruction is to control device startup;
[0241] The device information determination unit is used to read the device information uploaded by the first dedicated line module through the first pin within a partial time period corresponding to the first duration of the data part of each generated code element if the type of the first control instruction is to control the device to stop.
[0242] In some embodiments, the second pin of the first dedicated line module is connected to the first pin of the first dedicated line board through the dedicated line;
[0243] The device information determining unit is specifically used to:
[0244] The current value of the current output by the first dedicated line module on the second pin is read through the first pin; wherein the current value of the current output on the second pin is determined by the first dedicated line module based on a third corresponding relationship between a preset binary number and a current value, and binary data corresponding to the device information to be uploaded;
[0245] The read current value is decoded according to the third corresponding relationship to obtain the device information uploaded by the first dedicated line module.
[0246] Based on the same inventive concept, the embodiment of the present application provides a dedicated line decoding device, which is applied to a first dedicated line module, wherein the second pin of the first dedicated line module is connected to the first pin of the first dedicated line board through a dedicated line, see Fig.13 , Fig.13 This is a structural diagram of a dedicated line decoding device provided in an embodiment of the present application. The device includes:
[0247] The signal receiving unit 1301 is used to receive the level signal generated by the first dedicated line board at the first pin through the second pin as the level signal to be decoded;
[0248] The control instruction data determining unit 1302 is used to determine the binary number corresponding to each code element as the control instruction data according to each code element included in the to-be-decoded level signal and the preset correspondence relationship between the binary number and the code element;
[0249] Wherein, any code element includes a data portion of a first duration, and in the correspondence between the binary number and the code element, the duration of the data portion of the code element corresponding to 0 and 1 is different; when the control instruction data is used to control the startup of the device, the level represented by the data portion of each received code element includes the startup level of the device; when the control instruction data is used to control the stop of the device, the level represented by the data portion of each received code element is the maintenance level of the device, and the maintenance level is lower than the startup level;
[0250] The first decoding unit 1303 is used to perform binary decoding on the control instruction data to obtain a control instruction corresponding to the level signal to be decoded.
[0251] In some embodiments, any symbol further includes a mark portion of a fourth duration, the level represented by the mark portion is a zero level, and the fourth duration is no greater than 1 millisecond; the mark portion of any symbol is earlier than the data portion of the symbol in terms of timing;
[0252] The device also includes:
[0253] A codeword division unit is used to determine the binary number corresponding to each codeword according to the codewords contained in the level signal to be decoded and the corresponding relationship between the preset binary number and the codeword, and before using it as the control instruction data, take the moment when each mark part is received as the starting point of a codeword, and decode each codeword from the level signal to be decoded.
[0254] In some embodiments, the first dedicated line module is used to control the first device;
[0255] The correspondence between the binary number and the code element includes: a first correspondence under the condition that the type of the control instruction is to control the device to start, and a second correspondence under the condition that the type of the control instruction is to control the device to stop;
[0256] In the first corresponding relationship, the data part of any symbol includes a start level of a second duration and a maintenance level of a third duration, and the sum of the second duration and the third duration is the first duration;
[0257] In the second corresponding relationship, the data part of any symbol is a maintenance level that lasts for the first duration;
[0258] The device also includes:
[0259] The device information uploading unit is used to upload the device information of the first device to the first dedicated line board when the specified time corresponding to each code element is reached during the process of receiving each code element contained in the level signal to be decoded; wherein the duration between the specified time corresponding to each code element and the starting time of the data part of the code element is received is the specified time length, and the level at the specified time corresponding to the code element is the maintenance level.
[0260] In some embodiments, the device information uploading unit is specifically used to:
[0261] Acquire data to be uploaded obtained by binary encoding device information of a first device to be uploaded;
[0262] Based on a preset third correspondence between binary numbers and current values, respectively determine the current value corresponding to each binary number in the data to be uploaded;
[0263] According to the determined current values corresponding to the binary numbers, the second pin is controlled to output current.
[0264] In some embodiments, the apparatus further comprises:
[0265] A first control unit is used for, after binary decoding of the control instruction data is performed to obtain a control instruction corresponding to the to-be-decoded level signal, if the type of the obtained control instruction is to control device startup, controlling the device controlled by the first dedicated line module to start up;
[0266] The second control unit, after binary decoding the control instruction data to obtain the control instruction corresponding to the level signal to be decoded, controls the device controlled by the first dedicated line module to stop if the type of the obtained control instruction is to control the device to stop.
[0267] The embodiment of the present application further provides a dedicated line control system, the dedicated line control system comprising: a first dedicated line board and a first dedicated line module;
[0268] The first dedicated line board is used to execute any of the dedicated line encoding methods described above;
[0269] The first dedicated line module is used to execute any of the dedicated line decoding methods described above.
[0270] The present application also provides a dedicated line board, such as Fig.14 As shown, including:
[0271] Memory 1401, used for storing computer programs;
[0272] The processor 1402 is used to implement the steps of any of the above-mentioned dedicated line encoding methods when executing the program stored in the memory 1401.
[0273] In addition, the dedicated line board may further include a communication bus and / or a communication interface, and the processor 1402, the communication interface, and the memory 1401 communicate with each other via the communication bus.
[0274] The present application also provides a dedicated line module, such as Fig.15 As shown, including:
[0275] Memory 1501, used for storing computer programs;
[0276] The processor 1502 is used to implement the steps of any of the above-mentioned dedicated line decoding methods when executing the program stored in the memory 1501.
[0277] In addition, the dedicated line module may further include a communication bus and / or a communication interface, and the processor 1502, the communication interface, and the memory 1501 communicate with each other via the communication bus.
[0278] The communication bus mentioned in the dedicated line board and dedicated line module can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0279] The communication interface is used for communication between the above electronic device and other devices.
[0280] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0281] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0282] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned dedicated line encoding methods or dedicated line decoding methods are implemented.
[0283] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any dedicated line encoding method or dedicated line decoding method in the above embodiments.
[0284] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.
[0285] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0286] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system, device, electronic device, and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0287] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A dedicated line encoding method, characterized in that: Applied to a first dedicated line board, a first pin of the first dedicated line board is connected to a first dedicated line module through a dedicated line, and the method includes: Binary-code the first control instruction to be sent to obtain data to be sent; According to the preset correspondence between binary numbers and code elements, the code elements corresponding to the binary numbers in the data to be sent are respectively determined; wherein any code element includes a data portion of a first duration; in the correspondence between the binary numbers and code elements, the duration of the data portion of the code elements corresponding to 0 and 1 is different; when the type of the first control instruction is to control the device to start, the level represented by the data portion of each code element determined includes the start level of the device; when the type of the first control instruction is to control the device to stop, the level represented by the data portion of each code element determined is the maintenance level of the device, and the maintenance level is lower than the start level; The determined code elements are generated at the first pin, so that after the first dedicated line module receives the level signal generated by the first dedicated line board, it determines the control instruction represented by the received level signal based on the corresponding relationship between the binary number and the code element.
2. The method according to claim 1, characterized in that The correspondence between the binary number and the code element includes: a first correspondence under the condition that the type of the control instruction is to control the device to start, and a second correspondence under the condition that the type of the control instruction is to control the device to stop; In the first corresponding relationship, the data part of any code element includes a start level of a second duration and a maintenance level of a third duration, and the sum of the second duration and the third duration is the first duration; the maintenance level included in the data part of the code element is used to instruct the dedicated line module to upload the device information of the controlled device within the time period of receiving the maintenance level in the data part; In the second corresponding relationship, the data part of any code element is a maintenance level lasting the first time length, which is used to instruct the dedicated line module to upload the device information of the controlled device within the partial time period corresponding to the data part; The step of determining the code element corresponding to each binary number in the data to be sent according to the preset correspondence relationship between the binary number and the code element comprises: If the type of the first control instruction is to control the device to start, then in the first corresponding relationship, the code elements corresponding to the binary numbers in the data to be sent are respectively determined; If the type of the first control instruction is to control the device to stop, then in the second corresponding relationship, the code elements corresponding to the binary numbers in the data to be sent are respectively determined.
3. The method according to claim 1, characterized in that Any codeword also includes a mark portion of a fourth duration, the level represented by the mark portion is a zero level, and the fourth duration is no greater than 1 millisecond; in terms of timing, the mark portion of any codeword is earlier than the data portion of the codeword.
4. The method according to claim 1, characterized in that: After the first pin generates the determined code elements, the method further includes: If the type of the first control instruction is to control the device to start, outputting the start level through the first pin; If the type of the first control instruction is to control the device to stop, the maintenance level is output through the first pin.
5. The method according to claim 4, characterized in that Outputting the start level through the first pin includes: Outputting the start level through the first pin until a preset time has elapsed since the last start time of each code element generated and determined at the first pin, and returning to the step of generating and determining each code element at the first pin; and / or, Outputting the maintenance level through the first pin includes: The sustain level is outputted through the first pin until a preset time length is reached from the start time of each determined code element generated at the first pin last time, and the step of generating each determined code element at the first pin is returned to be executed.
6. The method according to claim 2, characterized in that The method further comprises: If the type of the first control instruction is to control device startup, within a time period corresponding to a fourth duration of the data portion of each generated code element, the device information uploaded by the first dedicated line module is read through the first pin; If the type of the first control instruction is to control the device to stop, the device information uploaded by the first dedicated line module is read through the first pin within a partial time period corresponding to the first duration of the data portion of each generated code element.
7. The method according to claim 6, characterized in that The second pin of the first dedicated line module is connected to the first pin of the first dedicated line board through the dedicated line; The reading the device information uploaded by the first dedicated line module through the first pin includes: The current value of the current output by the first dedicated line module on the second pin is read through the first pin; wherein the current value of the current output on the second pin is determined by the first dedicated line module based on a third corresponding relationship between a preset binary number and a current value, and binary data corresponding to the device information to be uploaded; The read current value is decoded according to the third corresponding relationship to obtain the device information uploaded by the first dedicated line module.
8. A dedicated line decoding method, characterized in that: Applied to a first dedicated line module, 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, through the second pin, a level signal generated by the first dedicated line board at the first pin as a level signal to be decoded; According to each code element contained in the to-be-decoded level signal and the corresponding relationship between the preset binary number and the code element, the binary number corresponding to each code element is determined as the control instruction data; Wherein, any code element includes a data portion of a first duration, and in the correspondence between the binary number and the code element, the duration of the data portion of the code element corresponding to 0 and 1 is different; when the control instruction data is used to control the startup of the device, the level represented by the data portion of each received code element includes the startup level of the device; when the control instruction data is used to control the stop of the device, the level represented by the data portion of each received code element is the maintenance level of the device, and the maintenance level is lower than the startup level; The control instruction data is binary decoded to obtain a control instruction corresponding to the level signal to be decoded.
9. The method according to claim 8, characterized in that Any codeword further includes a mark portion of a fourth duration, the level represented by the mark portion is a zero level, and the fourth duration is not greater than 1 millisecond; the mark portion of any codeword is earlier than the data portion of the codeword in terms of timing; Before determining the binary numbers corresponding to the code elements as control instruction data according to the code elements included in the to-be-decoded level signal and the preset correspondence between the binary numbers and the code elements, the method further includes: The time when each mark part is received is taken as the starting point of a code element, and each code element is decoded from the to-be-decoded level signal.
10. The method according to claim 8, characterized in that The first dedicated line module is used to control the first device; The correspondence between the binary number and the code element includes: a first correspondence under the condition that the type of the control instruction is to control the device to start, and a second correspondence under the condition that the type of the control instruction is to control the device to stop; In the first corresponding relationship, the data part of any symbol includes a start level of a second duration and a maintenance level of a third duration, and the sum of the second duration and the third duration is the first duration; In the second corresponding relationship, the data part of any symbol is a maintenance level that lasts for the first duration; The method further comprises: In the process of receiving each code element contained in the level signal to be decoded, when the specified time corresponding to each code element is reached, the device information of the first device is uploaded to the first dedicated line board; wherein, the duration between the specified time corresponding to each code element and the starting time of the data part of the code element is received is the specified time length, and the level at the specified time corresponding to the code element is the maintenance level.
11. The method according to claim 10, characterized in that When the designated time corresponding to each code element is reached, uploading the device information of the first device to the first dedicated line board includes: Acquire data to be uploaded obtained by binary encoding device information of a first device to be uploaded; Based on a preset third correspondence between binary numbers and current values, respectively determine the current value corresponding to each binary number in the data to be uploaded; According to the determined current values corresponding to the binary numbers, the second pin is controlled to output current.
12. The method according to claim 8, characterized in that After the control instruction data is binary decoded to obtain the control instruction corresponding to the level signal to be decoded, the method further includes: If the type of the obtained control instruction is to control the device to start, then control the device controlled by the first dedicated line module to start; If the type of the obtained control instruction is to control the device to stop, then the device controlled by the first dedicated line module is controlled to stop.
13. A dedicated line control system, characterized in that: The dedicated line control system comprises: a first dedicated line board and a first dedicated line module; The first dedicated line board is used to execute the dedicated line encoding method according to any one of claims 1 to 7; The first dedicated line module is used to execute the dedicated line decoding method described in any one of claims 8-12.
14. A dedicated line encoding device, characterized in that: Applied to a first dedicated line board, a first pin of the first dedicated line board is connected to a first dedicated line module through a dedicated line, and the device includes: A first encoding unit, used for performing binary encoding on a first control instruction to be sent to obtain data to be sent; A code element determination unit, configured to determine the code elements corresponding to the binary numbers in the data to be sent, respectively, according to a preset correspondence between binary numbers and code elements; wherein any code element includes a data portion of a first duration; in the correspondence between binary numbers and code elements, the durations of the data portions of code elements corresponding to 0 and 1 are different; when the type of the first control instruction is to control the device to start, the level represented by the data portion of each code element determined includes the start level of the device; when the type of the first control instruction is to control the device to stop, the level represented by the data portion of each code element determined is the maintenance level of the device, and the maintenance level is lower than the start level; The code element generation unit is used to generate each determined code element at the first pin so that after the first dedicated line module receives the level signal generated by the first dedicated line board, it determines the control instruction represented by the received level signal based on the correspondence between the binary number and the code element.
15. A dedicated line decoding device, characterized in that: Applied to a first dedicated line module, the second pin of the first dedicated line module is connected to the first pin of the first dedicated line board through a dedicated line, and the device includes: A signal receiving unit, configured to receive, through the second pin, a level signal generated by the first dedicated line board at the first pin as a level signal to be decoded; A control instruction data determination unit, configured to determine the binary number corresponding to each code element as control instruction data according to each code element included in the to-be-decoded level signal and a preset correspondence relationship between the binary number and the code element; Wherein, any code element includes a data portion of a first duration, and in the correspondence between the binary number and the code element, the duration of the data portion of the code element corresponding to 0 and 1 is different; when the control instruction data is used to control the startup of the device, the level represented by the data portion of each received code element includes the startup level of the device; when the control instruction data is used to control the stop of the device, the level represented by the data portion of each received code element is the maintenance level of the device, and the maintenance level is lower than the startup level; The first decoding unit is used to perform binary decoding on the control instruction data to obtain a control instruction corresponding to the level signal to be decoded.
16. A dedicated line board, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-7 when executing a program stored in a memory.
17. A dedicated line module, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 8-12 when executing a program stored in a memory.
Citation Information
Patent Citations
Digital signal sending method capable of shortening sending time, digital signal receiving method and mobile terminal
CN105389865A
Data processing method and device, electronic equipment and medium
CN113395327A
Data transmission method and device, electronic equipment and storage medium
CN113568850A
Communication method, device and equipment for IGBT (Insulated Gate Bipolar Translator) driving
CN114172620A
Method and device for decoding IRIG-B direct current clock code
CN117200755A