Node coding method and device
By obtaining multiple communication protocols supported by fire protection nodes, determining the level and controlling the voltage output time, the inefficiency problem caused by the single communication protocol of the existing encoder is solved, and the coding efficiency and construction management convenience of the fire protection system are improved.
Patent Information
- Application Number
- CN202411967225.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-02-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The communication protocol supported by existing electronic encoders is single, resulting in low coding efficiency in fire protection systems and inconvenience to construction and management.
By obtaining the target communication protocol supported by the target node, the first level and the second level are determined and the time of the output voltage is controlled to achieve encoding of the target node.
It improves the coding efficiency of the fire protection system, reduces coding errors, and improves construction efficiency and management convenience.
Smart Images

Figure CN119402321A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communication technology, and in particular to a node coding method and device. Background Art
[0002] At the fire engineering site, there are a large number of fire node products, such as smoke detectors, heat detectors, light beam sensors, flame detectors, gas detectors, etc. The use of the controller host cannot guarantee that the node address and the floor, room number, etc. correspond one to one according to the planning drawings when the node is automatically encoded, which brings great inconvenience to the management and installation personnel; in order to facilitate on-site coding and equipment management, several electronic encoder products have appeared on the market, which can write and read the address number of the node device, bringing great convenience to on-site construction personnel and management personnel.
[0003] There are eight major fire protection systems, including automatic fire alarm system, automatic sprinkler fire extinguishing system, gas fire extinguishing system, fire water supply and fire hydrant system, smoke exhaust system, fire door and fire shutter door system, foam fire extinguishing system, and evacuation indication system. The nodes under each system host need to be coded for distinction. However, the existing system has different communication methods for each system. All fire protection systems of large projects are involved. Because the communication implementation methods of each system are different, each system needs a corresponding handheld electronic encoder to encode the corresponding system node equipment. For on-site construction personnel, too many types of encoders can easily lead to management confusion. The project coding progress is often delayed due to the wrong encoder, which in turn affects the construction progress, resulting in waste of construction resources and increased construction costs.
[0004] There is currently no effective solution to the above problems. Summary of the invention
[0005] The embodiments of the present invention provide a node coding method and device to at least solve the problem of low coding efficiency caused by a single communication protocol supported by an electronic encoder in the related art.
[0006] According to one embodiment of the present invention, a method for node encoding is provided, comprising: obtaining a target communication protocol supported by a target node to be encoded, wherein the target communication protocol is any one of a plurality of communication protocols supported by the electronic encoder; determining a first level and a second level according to the target communication protocol, wherein the first level is greater than the second level; and controlling the output time of a voltage of the first level or the second level to encode the target node.
[0007] In an exemplary embodiment, controlling the output time of the first level or the second level voltage to encode the target node includes: controlling the communication unit to output the first level and the second level voltage, wherein different durations of outputting the first level voltage correspond to different coding values, or different durations of outputting the second level voltage correspond to different coding values.
[0008] In an exemplary embodiment, controlling the communication unit of the electronic encoder to output voltages of a first level and a second level includes: controlling the duration of the communication unit outputting the voltage of the first level to be a first duration corresponding to a first coding value, the output duration of the voltage of the first level to be a second duration corresponding to a second coding value, and the communication unit outputting the voltage of the second level without encoding.
[0009] In an exemplary embodiment, controlling the communication unit of the electronic encoder to output voltages of a first level and a second level includes: controlling the duration of the communication unit outputting the voltage of the second level to be a third duration corresponding to a first coding value, the output duration of the voltage of the second level to be a fourth duration corresponding to a second coding value, and the communication unit outputting the voltage of the first level without encoding.
[0010] In an exemplary embodiment, after controlling the communication unit to output voltages of the first level and the second level, the method further includes: judging response data of the target node by whether the target node draws current.
[0011] In an exemplary embodiment, the response data of the target node is determined by whether the target node draws current, including: when the target node draws current, determining the response data of the target node as a first value; when the target node does not draw current, determining the response data of the target node as a second value.
[0012] According to one embodiment of the present invention, a method for node encoding is provided, comprising: receiving a first level and a second level of voltage from an electronic encoder; determining a coding value by the duration of the first level or the second level of voltage; wherein the target node supports a target communication protocol, the electronic encoder is used to determine the first level and the second level according to the target communication protocol, and the electronic encoder encodes the target node by controlling the output time of the first level or the second level of voltage, and the first level is greater than the second level.
[0013] In an exemplary embodiment, the coding value is determined by the duration of the voltage of the first level or the second level, including: when the voltage of the second level is not encoded and the duration of the voltage of the first level is a first duration, the coding value is determined as a first coding value; when the duration of the voltage of the first level is a second duration, the coding value is determined as a second coding value; when the voltage of the first level is not encoded and the duration of the voltage of the second level is a third duration, the coding value is determined as a first coding value; when the duration of the voltage of the second level is a fourth duration, the coding value is determined as a second coding value.
[0014] According to another embodiment of the present invention, a node encoding device is provided, including: an acquisition module, used to acquire a target communication protocol supported by a target node to be encoded, wherein the target communication protocol is any one of a plurality of communication protocols supported by the electronic encoder; a first determination module, used to determine a first level and a second level according to the target communication protocol, wherein the first level is greater than the second level; and a control module, used to control the output time of outputting the first level or the second level voltage to encode the target node.
[0015] According to another embodiment of the present invention, a node encoding device is provided, comprising: a receiving module, used to receive a first level and a second level of voltage from an electronic encoder; a second determination module, used to determine a coding value by the duration of the first level or the second level of voltage; wherein the target node supports a target communication protocol, the electronic encoder is used to determine the first level and the second level according to the target communication protocol, and the electronic encoder encodes the target node by controlling the output time of the first level or the second level of voltage, and the first level is greater than the second level.
[0016] According to another embodiment of the present invention, there is provided an electronic encoder, which supports multiple communication protocols, including: a control unit and a communication unit, wherein the control unit is used to determine a first level and a second level according to a target communication protocol supported by a target node, wherein the first level is greater than the second level, and the target communication protocol is any one of the multiple communication protocols supported by the electronic encoder; and control the duration for which the communication unit outputs the voltage of the first level or the second level to encode the target node.
[0017] In an exemplary embodiment, the electronic encoder further includes at least one of the following: a voltage detection unit for performing voltage detection on the circuit; and a resistance detection unit for performing resistance detection on the circuit.
[0018] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of any of the above methods when executed by a processor.
[0019] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0020] According to yet another embodiment of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0021] According to yet another embodiment of the present invention, a computer program product is provided, comprising computer instructions, which implement the steps of any of the above methods when executed by a processor.
[0022] Through the present invention, by obtaining the target communication protocol supported by the target node to be encoded, wherein the target communication protocol is any communication protocol among multiple communication protocols supported by the electronic encoder; determining the first level and the second level according to the target communication protocol, wherein the first level is greater than the second level; and controlling the output time of the voltage of the first level or the second level to encode the target node. Therefore, the problem of low encoding efficiency caused by the single communication protocol supported by the electronic encoder can be solved, and the effect of improving the encoding efficiency of the fire protection system can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a hardware structure block diagram of a mobile terminal of a node coding method according to an embodiment of the present invention;
[0024] Figure 2 is a process of node encoding according to an embodiment of the present invention Figure 1 ;
[0025] Figure 3 is a schematic diagram of a voltage output combination according to an embodiment of the present invention;
[0026] Figure 4 is a schematic diagram of a second two-bus communication protocol frame according to an embodiment of the present invention;
[0027] Figure 5 is a process of node encoding according to an embodiment of the present invention Figure 2 ;
[0028] Figure 6 is a system structure diagram according to an embodiment of the present invention;
[0029] Figure 7 is a schematic diagram of a two-bus communication protocol according to an embodiment of the present invention;
[0030] Figure 8 is a working flow diagram of a voltage detection module according to an embodiment of the present invention;
[0031] Fig. 9 is a working flow diagram of a resistance detection module according to an embodiment of the present invention;
[0032] Fig.10 is a structural frame of a node encoding device according to an embodiment of the present invention Figure 1 ;
[0033] Fig.11 is a structural frame of a node encoding device according to an embodiment of the present invention Figure 2 . DETAILED DESCRIPTION
[0034] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0036] The node encoding method embodiment provided in the embodiment of the present application can be executed in a handheld electronic encoder, which can be a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a node coding method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0037] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the node coding method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0038] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0039] In this embodiment, a node coding method running on the mobile terminal is provided. Figure 2 is a process of node encoding according to an embodiment of the present invention Figure 1 ,like Figure 2 As shown, the process includes the following steps:
[0040] Step S202, obtaining a target communication protocol supported by the target node to be encoded, wherein the target communication protocol is any one of a plurality of communication protocols supported by the electronic encoder;
[0041] There are a large number of fire protection node products, such as smoke detectors, heat detectors, light beam sensors, flame detectors, gas detectors, etc. The above-mentioned target nodes are nodes that need to be encoded. The above-mentioned electronic encoders can support multiple protocols, such as Hypertext Transfer Protocol, User Datagram Protocol, Transmission Control Protocol / Internet Protocol, two-bus communication protocol, etc. The above-mentioned target communication protocol is any one of the multiple communication protocols supported by the above-mentioned electronic encoders.
[0042] Step S204, determining a first level and a second level according to the target communication protocol, wherein the first level is greater than the second level;
[0043] In the above-mentioned fire protection system communication protocol, high level and medium level are usually used to represent different level states of digital signals for transmitting and parsing data information. These states are usually represented by specific voltage values or logic states. The above-mentioned first level is a high level (abbreviated as V high), which usually represents a logic "1" or "high" state, and the voltage on the signal line is at a higher level value. The above-mentioned second level is a medium level (abbreviated as V medium), which usually represents a logic "0" or "low" state, and the voltage on the signal line is at a medium level value.
[0044] The first level is greater than the second level. Figure 3 is a schematic diagram of a voltage output combination according to an embodiment of the present invention, such as Figure 3 As shown in the figure, when V high = 3.3V, V medium can be 0V; when V high = 6V, V medium can be 0V or 3.3V; when V high = 12V, V medium can be 0V, 3.3V or 6V; when V high = 24V, V medium can be 0V, 3.3V, 6V or 12V. That is, this embodiment supports 14 kinds of level output combinations, and the software can simulate UART through Universal Asynchronous Receiver / Transmitter (UART) or General Purpose Input / Output (GPIO) to realize various protocol interactions that meet the output level requirements.
[0045] Step S206 , controlling the output time of outputting the voltage of the first level or the second level to encode the target node.
[0046] Specifically, the communication unit is controlled to output voltages of a first level and a second level, wherein different durations of outputting the voltage of the first level correspond to different coding values, or different durations of outputting the voltage of the second level correspond to different coding values.
[0047] Taking the two-bus communication protocol as an example, Figure 4 is a schematic diagram of a second two-bus communication protocol frame according to an embodiment of the present invention, such as Figure 4 As shown, the above protocol frame resolves whether the data bit is 0 or 1 by distinguishing the size of the medium level time. The medium level time of 2ms represents that the bit is 0, and the medium level time of 4ms represents that the bit is 1.
[0048] Optionally, the communication unit is controlled to output the first level voltage for a first duration corresponding to a first coding value, the first level voltage output duration is controlled to output a second duration corresponding to a second coding value, and the communication unit outputs the second level voltage without encoding.
[0049] The above-mentioned first duration is that the duration of outputting V high is 4ms, which is encoded as the first coding value 1. The above-mentioned second duration is that the duration of outputting V high is 2ms, which is encoded as the second coding value 0. No coding is performed when outputting V medium.
[0050] Optionally, the communication unit is controlled to output the second level voltage for a third time period corresponding to a first coding value, the second level voltage is output for a fourth time period corresponding to a second coding value, and the communication unit outputs the first level voltage without encoding.
[0051] The third duration mentioned above is 4ms in the output V, which is encoded as the first coding value 1. The fourth duration mentioned above is 2ms in the output V, which is encoded as the second coding value 0. It is not encoded when the output V is high.
[0052] In one embodiment, the response data of the target node is determined by whether the target node draws current.
[0053] Specifically, when the target node draws current, the response data of the target node is determined to be a first value; when the target node does not draw current, the response data of the target node is determined to be a second value.
[0054] The first value is 1, and the second value is 0. For example, Figure 4 As shown in the figure, the medium level time of 2ms represents that the bit is 0, and the medium level time of 4ms represents that the bit is 1. When the node responds, if the response bit is 1, current is drawn, and if the bit is 0, no current is drawn. Then the encoder can judge whether the response data is 0 or 1 by correspondingly drawing current. For example, if the response data is 00000001, Bit0 needs to draw current, and Bit1~Bit7 do not need to draw current.
[0055] In this embodiment, a node coding method running on the above mobile terminal or network architecture is provided. Figure 5 is a process of node encoding according to an embodiment of the present invention Figure 2 ,like Figure 5 As shown, the process includes the following steps:
[0056] S502, receiving voltages of a first level and a second level from an electronic encoder;
[0057] The first level is a high level, and the second level is a medium level;
[0058] S504, determining a coding value by the duration of the voltage of the first level or the second level; wherein the target node supports a target communication protocol, the electronic encoder is used to determine the first level and the second level according to the target communication protocol, and the electronic encoder encodes the target node by controlling the output time of the voltage of the first level or the second level, and the first level is greater than the second level.
[0059] Optionally, when the voltage of the second level is not encoded and the duration of the voltage of the first level is a first duration, the encoding value is determined as a first encoding value; when the duration of the voltage of the first level is a second duration, the encoding value is determined as a second encoding value;
[0060] When V is not encoded, the above-mentioned first duration is that the V high duration output by the encoder is 4ms, which is encoded as the first coding value 1, and the above-mentioned second duration encoder outputs V high duration is 2ms, which is encoded as the second coding value 0.
[0061] Optionally, when the voltage of the first level is not encoded and the duration of the voltage of the second level is a third duration, the encoding value is determined as the first encoding value; when the duration of the voltage of the second level is a fourth duration, the encoding value is determined as the second encoding value.
[0062] When V high is not encoded, the above-mentioned third time length is the time length in V output by the encoder, which is 4ms, and it is encoded as the first coding value 1. The above-mentioned fourth time length is the time length in V output by the encoder, which is 2ms, and it is encoded as the second coding value 0.
[0063] During on-site construction and debugging of on-site lines, in order to check the status of the construction lines, construction workers must carry a multimeter with them to detect whether the circuit is short-circuited, grounded, or has series electricity. If the multimeter is forgotten or is low on power (the multimeter uses a special battery and cannot be powered by a common battery), the line status cannot be detected during construction. If the multimeter is waiting for its arrival, the construction period will be delayed. If the line is not checked and construction continues, it will add a lot of line uncertainty to the later debugging. If there is an abnormality in the line, it will greatly increase the later debugging time. Both situations will affect the project progress, cause waste of construction resources, and increase construction costs.
[0064] The handheld electronic encoder designed in this application is compatible with node encoding of multiple communication methods, and the encoder has the functions of voltage detection and resistance detection, so that the encoder is not limited to use in one system, but can also be applied to node coding of products, and can also replace the multimeter to perform voltage and resistance detection on the line. It has a wider application range, can better meet customer needs, and greatly increase the competitiveness of the company's products.
[0065] Figure 6 is a system structure diagram according to an embodiment of the present invention, such as Figure 6 As shown, the system includes a single-chip microcomputer module, a two-bus communication module, a voltage detection module, and a resistance detection module. Among them:
[0066] The single-chip microcomputer module serves as the control center. It communicates with the corresponding node device through the two-bus communication module and processes the sending and receiving signals to realize information interaction with the corresponding node. Through the voltage detection module, the analog-to-digital converter (ADC) samples the external voltage division signal to calculate the size of the external voltage signal. Through the resistance detection module, the current after the resistance is connected is calculated to calculate the size of the connected resistance.
[0067] The two-bus communication module can implement a variety of two-bus communication solutions. Figure 7 is a schematic diagram of a two-bus communication protocol according to an embodiment of the present invention. Figure 7 As shown in the figure, the two-bus communication protocol frame consists of a command area and a response area. The command area is the frame command sent by the host, such as Figure 7 The starting frame header 10101100 (binary) in the command area is converted into hexadecimal 0xAC. The first byte of the frame command is 0xAC, followed by other data bits to form a complete command frame. Figure 7 The response area in is the return code area corresponding to the address in the command. Each address corresponds to a sub-return code area. The number of return code areas is determined by the protocol. Figure 7 The protocol in the protocol specifies that the commands issued correspond to a set of address segments, which contain 8 addresses (address A to address A+7).
[0068] Figure 7 In the middle, V high = 24V, V medium = 6V; that is, if a protocol requires successful information exchange, the corresponding high level voltage and medium level voltage must be within a certain voltage range; for example, Figure 7 When V high = 24V, the bit 1 of the command frame can only be decoded as 1 after the node receives it; but if V high = 10V, the bit 1 of the command frame will be decoded as 0 after the node decodes it, resulting in the failure of the node command reception. Therefore, the implementation of each protocol interaction depends on the hardware voltage. That is, if the hardware voltage is fixed, it can only be limited to node devices that are suitable for the hardware voltage.
[0069] like Figure 4The second type of two-bus communication protocol frame shown, the command frame is to parse whether the data bit is 0 or 1 by distinguishing the size of the middle level time. This embodiment can output voltages of 0V, 3.3V, 6V, 12V, and 24V through power control. This makes the protocol voltage more flexible, and multiple protocol interactions can be flexibly implemented through software. Among them, 0V is the ground voltage, 3.3V is the LDO output voltage, 6V is the battery voltage or Type-C power supply voltage (Type-C standard is 5V output); 12V, 16V and 24V are all achieved by controlling the relevant circuit parameters of the pump chip to achieve 12V, 16V or 24V output.
[0070] Figure 8 is a working flow diagram of a voltage detection module according to an embodiment of the present invention, such as Figure 8 As shown, the process includes the following steps:
[0071] S801, start voltage detection;
[0072] S802, ADC samples and calculates the voltage of the voltage divider resistor, and then jumps to S803 and S805;
[0073] S803, calculating the external voltage according to the voltage of the voltage divider resistor;
[0074] S804, the screen displays the test voltage;
[0075] S805, determine whether there is an external voltage output, if so, jump to S806, if not, jump to S807;
[0076] S806, the external bus power supply function is not triggered;
[0077] S807, triggering the external bus power supply function.
[0078] In an exemplary embodiment, the voltage across the voltage divider resistor is calculated by ADC sampling, and then the measured voltage value is calculated based on the ratio of the voltage divider resistor to the total resistance. The voltage detection module is always working. Every time the two-bus external output function is to be executed, it is necessary to first determine whether there is an external voltage connected. If not, it can be output. If so, the two-bus output is prohibited to prevent voltage cross-current. The voltage detection circuit can only detect a voltage range of 0~48V. The voltage detection circuit has 220V voltage protection. When the connected voltage is greater than 48V, the encoder will prompt a high-voltage warning.
[0079] Fig. 9 is a working flow diagram of a resistance detection module according to an embodiment of the present invention. Fig. 9 As shown, the process includes the following steps:
[0080] S901, start resistance detection;
[0081] S902, determine whether the second bus output is allowed, if so, jump to S903, if not, jump to S907;
[0082] S903, DC250V pump pressure circuit starts;
[0083] S904, ADC samples the signal amplified by the operational amplifier;
[0084] S905, turn off the DC250V pump pressure circuit;
[0085] S906, calculating the resistance value according to the ADC sampling value;
[0086] S907, prompting that voltage is injected.
[0087] In an exemplary embodiment, before starting the resistance detection, first confirm whether the second bus output is allowed, that is, whether there is an external voltage access. If it is detected that there is an external voltage access, it will prompt that there is an external voltage access and end the resistance detection; if there is no external voltage access, the soft armor starts the DC250V pump pressure circuit to work and output DC250V to the outside. The voltage divider resistance in the circuit is 500K. If there is an external short circuit, the maximum current in the loop is limited to 0.5mA, and the impedance of the human body is large, so it is safe when the resistance detection is manually touched. The operational amplifier circuit amplifies the current signal after the voltage divider resistor is connected in series with the external resistor, and calculates the size of the external resistor through ADC sampling. Of course, when the resistance is small, there is an error in the detection relative to the 500K voltage divider resistor, but the on-site debugging test is mainly to determine whether the loop line is short-circuited and whether the loop impedance meets the manufacturer's requirements. It does not need to be very precise, so the detection error is allowed and can meet the basic application of on-site line debugging and detection.
[0088] Optionally, the executor of the above steps may be a background processor, or other devices with similar processing capabilities, or a machine that integrates at least an image acquisition device and a data processing device, wherein the image acquisition device may include a graphics acquisition module such as a camera, and the data processing device may include terminals such as computers and mobile phones, but is not limited to these.
[0089] Through the above steps, the problem of low coding efficiency caused by the single communication protocol supported by the electronic encoder is solved, and the coding efficiency of the fire protection system is improved.
[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0091] In this embodiment, a node coding device is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0092] Fig.10 is a structural frame of a node encoding device according to an embodiment of the present invention Figure 1 ,like Fig.10 As shown, the device includes an acquisition module 1002, which is used to acquire a target communication protocol supported by a target node to be encoded, wherein the target communication protocol is any one of a plurality of communication protocols supported by the electronic encoder; a first determination module 1004, which is used to determine a first level and a second level according to the target communication protocol, wherein the first level is greater than the second level; and a control module 1006, which is used to control the output time of outputting the voltage of the first level or the second level to encode the target node.
[0093] In an exemplary embodiment, the above-mentioned device is also used to control the communication unit to output voltages of the first level and the second level, wherein different durations of outputting the voltage of the first level correspond to different coding values, or different durations of outputting the voltage of the second level correspond to different coding values.
[0094] In an exemplary embodiment, the above-mentioned device is also used to control the duration of the communication unit outputting the first level voltage to be a first duration corresponding to a first coding value, the output duration of the first level voltage to be a second duration corresponding to a second coding value, and the communication unit outputs the second level voltage without encoding.
[0095] In an exemplary embodiment, the above-mentioned device is also used to control the duration of the communication unit outputting the second level voltage to be a third duration corresponding to the first coding value, the output duration of the second level voltage to be a fourth duration corresponding to the second coding value, and the communication unit outputs the first level voltage without encoding.
[0096] In an exemplary embodiment, the above-mentioned device is also used to determine the response data of the target node according to whether the target node draws current.
[0097] In an exemplary embodiment, the above-mentioned device is also used to determine the response data of the target node as a first value when the target node draws current; and determine the response data of the target node as a second value when the target node does not draw current.
[0098] Fig.11 is a structural frame of a node encoding device according to an embodiment of the present invention Figure 2 ,like Fig.11 As shown, the device includes a receiving module 1102, which is used to receive a first level and a second level of voltage from an electronic encoder; a second determination module 1104, which is used to determine the coding value according to the duration of the first level or the second level of voltage; wherein the target node supports a target communication protocol, and the electronic encoder is used to determine the first level and the second level according to the target communication protocol, and the electronic encoder encodes the target node by controlling the output time of the first level or the second level of voltage, and the first level is greater than the second level.
[0099] In an exemplary embodiment, the above-mentioned device is also used to determine the coding value as a first coding value when the voltage of the second level is not encoded and the duration of the voltage of the first level is a first duration; determine the coding value as a second coding value when the duration of the voltage of the first level is a second duration; determine the coding value as a first coding value when the voltage of the first level is not encoded and the duration of the voltage of the second level is a third duration; and determine the coding value as a second coding value when the duration of the voltage of the second level is a fourth duration.
[0100] In this embodiment, an electronic encoder is also provided, including: a control unit and a communication unit, wherein the control unit is used to determine a first level and a second level according to a target communication protocol supported by a target node, wherein the first level is greater than the second level, and the target communication protocol is any one of a plurality of communication protocols supported by the electronic encoder; and control the duration for which the communication unit outputs the voltage of the first level or the second level to encode the target node.
[0101] The electronic encoder further comprises a voltage detection unit for performing voltage detection on the circuit; and a resistance detection unit for performing resistance detection on the circuit.
[0102] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0103] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0104] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0105] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0106] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0107] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0108] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the steps of the method described in each embodiment of the present application when executed by a processor.
[0109] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0110] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A node encoding method, characterized in that: Applications in electronic encoders, including: Acquire a target communication protocol supported by a target node to be encoded, wherein the target communication protocol is any one of a plurality of communication protocols supported by the electronic encoder; Determining a first level and a second level according to the target communication protocol, wherein the first level is greater than the second level; The output time of outputting the voltage of the first level or the second level is controlled to encode the target node.
2. The method according to claim 1, characterized in that Controlling the output time of outputting the voltage of the first level or the second level to encode the target node includes: The communication unit is controlled to output voltages of a first level and a second level, wherein different durations of outputting the voltage of the first level correspond to different coding values, or different durations of outputting the voltage of the second level correspond to different coding values.
3. The method according to claim 2, characterized in that Controlling the communication unit of the electronic encoder to output voltages of a first level and a second level includes: The communication unit is controlled to output the first level voltage for a first duration corresponding to a first coding value, the first level voltage is output for a second duration corresponding to a second coding value, and the communication unit outputs the second level voltage without coding.
4. The method according to claim 2, characterized in that: Controlling the communication unit of the electronic encoder to output voltages of a first level and a second level includes: The communication unit is controlled to output the second level voltage for a third time period corresponding to the first coding value, the second level voltage is output for a fourth time period corresponding to the second coding value, and the communication unit outputs the first level voltage without coding.
5. The method according to claim 2, characterized in that: After controlling the communication unit to output the voltages of the first level and the second level, the method further includes: The response data of the target node is determined by whether the target node draws current.
6. The method according to claim 5, characterized in that Determining the response data of the target node by whether the target node draws current includes: In the case where the target node draws current, determining the response data of the target node as a first value; In the event that the target node does not draw current, the response data of the target node is determined to be a second value.
7. A node encoding method, characterized in that: Applied to the target node, including: receiving a voltage of a first level and a second level from an electronic encoder; Determine a coding value according to the duration of the voltage of the first level or the second level; Wherein, the target node supports a target communication protocol, the electronic encoder is used to determine a first level and a second level according to the target communication protocol, and the electronic encoder encodes the target node by controlling the output time of the voltage of the first level or the second level, and the first level is greater than the second level.
8. The method according to claim 7, characterized in that Determining a coding value according to the duration of the voltage of the first level or the second level includes: When the voltage of the second level is not encoded and the duration of the voltage of the first level is the first duration, the encoding value is determined as the first encoding value; when the duration of the voltage of the first level is the second duration, the encoding value is determined as the second encoding value; When the voltage of the first level is not encoded and the duration of the voltage of the second level is a third duration, the encoding value is determined as the first encoding value; when the duration of the voltage of the second level is a fourth duration, the encoding value is determined as the second encoding value.
9. An electronic encoder, characterized in that: The electronic encoder supports multiple communication protocols, including: a control unit, a communication unit, wherein: The control unit is used to determine a first level and a second level according to a target communication protocol supported by a target node, wherein the first level is greater than the second level, and the target communication protocol is any one of a plurality of communication protocols supported by the electronic encoder; and control the duration for which the communication unit outputs the voltage of the first level or the second level to encode the target node.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method described in any one of claims 1 to 6, or to execute the method described in any one of claims 7-8.
Citation Information
Patent Citations
Multi-protocol decoding circuit of RFID chip
CN117596311A
Two-bus coding method, two-bus decoding method, equipment, system and medium
CN117692272A