Hardware-based Coding Matching Induction Lighting Control System and Method
Patent Information
- Application Number
- CN202611195987.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-09-11
AI Technical Summary
[0005]本发明实施例提供一种基于硬件编码匹配的感应照明控制系统,以解决现有感应照明技术中传感器配置成本较高、原有照明灯具改装不便以及无线传感器与无线开关之间的分组配置过程复杂的问题
[0016] In this embodiment of the invention, a wireless sensor and a wireless switch are included. The wireless sensor uses a sensing module to detect the presence or passage of a human body, reads first hardware encoding information, and combines the first hardware encoding information with an operation code determined based on the sensing signal to form wireless control data before sending it. The wireless switch receives and parses the wireless control data, reads second hardware encoding information, and when the first and second hardware encoding information are the same, controls the power switch module connected in series between the power supply and the lighting load to turn on or off according to the operation code. By establishing a control relationship between the wireless sensor and the wireless switch through user-configured hardware encoding, the sensor and the lighting fixture can be installed separately without replacing the original lighting fixture or performing software pairing, reducing the cost of retrofitting motion-sensor lighting and the difficulty of networking.
Smart Images

Figure CN122742231A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent control, and in particular to a sensor-based lighting control system and method based on hardware code matching. Background Technology
[0002] With the increasing demand for energy-saving lighting, sensor lighting technology is gradually being applied to residential, office, corridor, underground parking garage, and outdoor lighting scenarios. Sensor lighting systems typically use infrared, radar, or other human body sensing methods to detect the presence or passing of people, and control the power supply of lighting fixtures to reduce energy consumption when no one is present.
[0003] Existing motion-sensor lighting products typically integrate sensors with lighting fixtures, requiring each fixture to have its own sensor. This not only increases system costs but also limits sensor installation location due to fixture placement and existing power lines. For locations where lighting fixtures are already installed, upgrading to a motion-sensor lighting system usually necessitates replacing the existing fixtures or rewiring the control lines, making the retrofit quite complex. Furthermore, some wireless lighting control systems rely on Bluetooth networking, wireless personal area networks (WLANs), or other software address pairing methods to establish control relationships between devices. The configuration process requires corresponding terminal equipment and network configuration operations, making it difficult to adapt to retrofit environments with varying numbers of fixtures, installation locations, and wiring structures.
[0004] Therefore, this application can solve the problems of high sensor configuration cost, inconvenience in retrofitting existing lighting fixtures, and complex group configuration process between wireless sensors and wireless switches in existing induction lighting technologies. Summary of the Invention
[0005] This invention provides a hardware-encoded matching-based inductive lighting control system to address the problems of high sensor configuration costs, inconvenience in retrofitting existing lighting fixtures, and complex grouping and configuration processes between wireless sensors and wireless switches in existing inductive lighting technologies.
[0006] In a first aspect, embodiments of the present invention provide a sensor-based lighting control system based on hardware code matching, including a wireless sensor and a wireless switch; The wireless sensor includes a first hardware encoding circuit, a microcontroller signal processing module, a sensing module, and a wireless transmitting unit. The output terminal of the first hardware encoding circuit and the output terminal of the sensing module are respectively connected to the input terminal of the microcontroller signal processing module, and the output terminal of the microcontroller signal processing module is connected to the input terminal of the wireless transmitting unit. The first hardware encoding circuit is used to generate first hardware encoding information according to the user's configuration operation; the sensing module is used to detect the state of a human body passing by or the state of a human body being present, and output the corresponding sensing signal; the microcontroller signal processing module is used to process the sensing signal, determine the operation code according to the processing result, read the first hardware encoding information, and combine the first hardware encoding information and the operation code to form wireless control data; the wireless transmitting unit is used to transmit the wireless control data. The wireless switch includes a wireless receiving unit, a microcontroller control module, a second hardware encoding circuit, and a power switch module. The output terminals of the wireless receiving unit and the second hardware encoding circuit are respectively connected to the input terminal of the microcontroller control module. The output terminal of the microcontroller control module is connected to the control terminal of the power switch module. The power switch module is connected in series between the power supply and the lighting load. The wireless receiving unit is wirelessly connected to the wireless transmitting unit. The wireless receiving unit is used to receive the wireless control data; the second hardware encoding circuit is used to form second hardware encoding information according to the user's configuration operation; the microcontroller control module is used to parse the wireless control data, compare the first hardware encoding information with the second hardware encoding information, and when the first hardware encoding information and the second hardware encoding information are the same, output a switch control command to the power switch module according to the operation code; the power switch module is used to control the power supply path between the power supply and the lighting load to be turned on or off according to the switch control command.
[0007] Optionally, the first hardware encoding circuit and the second hardware encoding circuit each include at least one encoding channel, and each encoding channel includes a physical encoding device capable of forming an on state and an off state. The microcontroller signal processing module is used to determine the corresponding digital code according to the on or off state of each encoding channel in the first hardware encoding circuit, and to combine each digital code according to the arrangement order of each encoding channel to form the first hardware encoding information. The microcontroller control module is used to determine the corresponding digital code according to the on or off state of each encoding channel in the second hardware encoding circuit, and to combine the digital codes according to the arrangement order of each encoding channel to form the second hardware encoding information.
[0008] Optionally, the physical encoding device includes a DIP switch or a multiplexer; The on state of the encoding channel corresponds to digital code zero, and the off state of the encoding channel corresponds to digital code one; or, the on state of the encoding channel corresponds to digital code one, and the off state of the encoding channel corresponds to digital code zero.
[0009] Optionally, the sensing module includes an infrared sensing unit, a radar sensing unit, or a combination of infrared and radar sensing units; The sensing module is used to continuously perform human body detection, and when a human body is detected passing by or present, it outputs the sensing signal to the microcontroller signal processing module. The microcontroller signal processing module is used to generate a power-on operation code, a power-on hold operation code, a power-off operation code, or a delayed power-off operation code based on the sensing signal.
[0010] Optionally, the wireless control data includes a preamble, hardware version code, software version code, first hardware code information, operation code, and reserved code; The preamble is used to enable the wireless transmitting unit and the wireless receiving unit to perform data handshake and clock synchronization.
[0011] Optionally, the microcontroller control module is used to extract the first hardware coding information and the operation code from the wireless control data, and read the second hardware coding information currently formed by the second hardware coding circuit; When the first hardware coding information is the same as the second hardware coding information, the microcontroller control module executes the opcode and outputs the switch control command; When the first hardware encoding information is different from the second hardware encoding information, the microcontroller control module does not execute the opcode.
[0012] Optionally, the wireless transmitting unit and the wireless receiving unit transmit the wireless control data via infrared signals, radio frequency signals, or Bluetooth signals; The power switching module includes a silicon controlled rectifier (SCR), a transistor, a field-effect transistor (FET), or a relay; the power supply includes a DC power supply or an AC power supply; and the lighting load includes one or more lighting fixtures.
[0013] Secondly, embodiments of the present invention also provide a sensor-based lighting control method based on hardware code matching, the sensor-based lighting control method based on hardware code matching comprising: Acquire sensor data and first hardware coding information, wherein the sensor data is used to determine the state of human body passing by or the state of human body presence; Based on the sensing data, an operation code is determined, and the first hardware encoding information is combined with the operation code to obtain wireless control data; The wireless control data is wirelessly transmitted and decoded to obtain the hardware encoding information to be matched and the operation code to be executed. Obtain the second hardware encoding information, compare the hardware encoding information to be matched with the second hardware encoding information, and obtain the encoding matching result; When the encoding matching result is a match, a switch control instruction is generated and output according to the operation code to be executed. The switch control instruction is used to control the power switch module connected in series between the power supply and the lighting load to be turned on or off. When the encoding matching result is a mismatch, the switch control command is not generated.
[0014] Optionally, the step of determining an operation code based on the sensing data and combining the first hardware encoding information with the operation code to obtain wireless control data includes: Acquire sensor data generated during human body detection; Obtain the first on / off state data of each encoding channel in the first hardware encoding circuit; Based on each of the first on / off state data, the corresponding digital code is determined, and the digital codes are combined according to the arrangement order of each of the encoding channels to obtain the first hardware encoding information; Based on the sensed data, an operation action is determined, which includes power-on operation, power-on operation, power-off operation, or delayed power-off operation, and a corresponding operation code is generated based on the determined operation action. The wireless control data is obtained by combining the preamble, hardware version code, software version code, first hardware code information, operation code, and reserved code in a preset encoding order.
[0015] Optionally, when the encoding matching result is a match, a switch control instruction is generated and output according to the operation code to be executed. The switch control instruction is used to control the power switch module connected in series between the power supply and the lighting load to be turned on or off, including: The wireless control data is decoded to extract the hardware encoding information to be matched and the operation code to be executed from the wireless control data. Obtain the second on / off state data of each encoding channel in the second hardware encoding circuit; The corresponding digital code is determined based on each of the second on / off state data, and the digital codes are combined according to the arrangement order of each of the encoding channels to obtain the second hardware encoding information; The hardware encoding information to be matched is compared with the second hardware encoding information to obtain the encoding matching result; When the encoding matching result is a match, the switch control command is generated according to the power-on operation, power-on operation, power-off operation, or delayed power-off operation corresponding to the operation code to be executed.
[0016] In this embodiment of the invention, a wireless sensor and a wireless switch are included. The wireless sensor uses a sensing module to detect the presence or passage of a human body, reads first hardware encoding information, and combines the first hardware encoding information with an operation code determined based on the sensing signal to form wireless control data before sending it. The wireless switch receives and parses the wireless control data, reads second hardware encoding information, and when the first and second hardware encoding information are the same, controls the power switch module connected in series between the power supply and the lighting load to turn on or off according to the operation code. By establishing a control relationship between the wireless sensor and the wireless switch through user-configured hardware encoding, the sensor and the lighting fixture can be installed separately without replacing the original lighting fixture or performing software pairing, reducing the cost of retrofitting motion-sensor lighting and the difficulty of networking. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a system architecture diagram of a sensor lighting control system based on hardware code matching provided in an embodiment of the present invention; Figure 2 This is a flowchart of a sensor lighting control method based on hardware code matching provided in an embodiment of the present invention; Figure 3 This is a system architecture diagram in remote control mode provided by an embodiment of the present invention; Figure 4 This is a system architecture diagram of a wireless gateway mode provided in an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] like Figure 1 As shown, Figure 1This is an architecture diagram of a hardware-coded sensing lighting control system according to an embodiment of the present invention. The system includes a wireless sensor and a wireless switch. The wireless sensor includes a first hardware coding circuit, a microcontroller signal processing module, a sensing module, and a wireless transmitting unit. The output terminals of the first hardware coding circuit and the sensing module are respectively connected to the input terminal of the microcontroller signal processing module, and the output terminal of the microcontroller signal processing module is connected to the input terminal of the wireless transmitting unit. The first hardware coding circuit is used to generate first hardware coding information based on user configuration operations. The sensing module is used to detect the presence or absence of a human body and output a corresponding sensing signal. The microcontroller signal processing module is used to process the sensing signal, determine an operation code based on the processing result, read the first hardware coding information, and combine the first hardware coding information with the operation code to form wireless control data. The wireless transmitting unit is used to transmit the wireless control data. The wireless switch includes... The system includes a wireless receiving unit, a microcontroller control module, a second hardware encoding circuit, and a power switch module. The output terminals of the wireless receiving unit and the second hardware encoding circuit are respectively connected to the input terminal of the microcontroller control module. The output terminal of the microcontroller control module is connected to the control terminal of the power switch module. The power switch module is connected in series between the power supply and the lighting load. The wireless receiving unit is wirelessly connected to the wireless transmitting unit. The wireless receiving unit is used to receive wireless control data. The second hardware encoding circuit is used to generate second hardware encoding information based on user configuration operations. The microcontroller control module is used to parse the wireless control data, compare the first hardware encoding information with the second hardware encoding information, and when the first hardware encoding information and the second hardware encoding information are the same, output a switch control command to the power switch module according to the operation code. The power switch module is used to control the power supply path between the power supply and the lighting load to be turned on or off according to the switch control command.
[0021] In this embodiment of the invention, the wireless sensor and the wireless switch are separately configured. The wireless sensor can be installed in the area to be detected to detect the presence or passage of a human body within that area. The wireless switch is connected in series between the power supply and the lighting load to control the power supply path of the lighting load. Wireless control data is transmitted wirelessly between the wireless sensor and the wireless switch; therefore, the installation location of the wireless sensor is not limited by the installation location of the lighting load or the existing power supply lines.
[0022] When installing a hardware-encoded lighting control system, users can configure the first and second hardware encoding circuits separately. This configuration can involve changing the physical on / off states of the hardware encoding devices. The first hardware encoding circuit generates first hardware encoding information based on each physical on / off state, and the second hardware encoding circuit generates second hardware encoding information based on the same physical on / off states. The first hardware encoding information can be understood as the block code corresponding to the wireless sensor, and the second hardware encoding information can be understood as the local block code corresponding to the wireless switch.
[0023] Specifically, the sensing module detects the presence of a human body. When a human body is detected passing by or present, a corresponding sensing signal is generated and transmitted to the microcontroller signal processing module. The microcontroller signal processing module processes the sensing signal to determine the lighting operation to be performed and obtains the corresponding operation code based on a preset operation code mapping. This operation code can be used to represent a power-on operation, a power-on maintenance operation, a power-off operation, or a delayed power-off operation.
[0024] After receiving the operation code, the microcontroller signal processing module reads the first hardware encoding information currently generated by the first hardware encoding circuit, and combines the first hardware encoding information with the operation code to obtain wireless control data. The first hardware encoding information is used to represent the control group corresponding to the wireless control data, and the operation code is used to represent the lighting operation that the wireless switch in the control group needs to perform. The microcontroller signal processing module sends the wireless control data to the wireless transmitting unit, which converts the wireless control data into a wireless signal and transmits it outward.
[0025] After receiving the wireless signal, the wireless receiving unit processes it to obtain the corresponding wireless control data and transmits it to the microcontroller control module. The microcontroller control module parses the wireless control data to obtain the first hardware encoding information and operation code carried within it. Simultaneously, the microcontroller control module reads the second hardware encoding information currently generated by the second hardware encoding circuit and compares the first hardware encoding information with the second hardware encoding information.
[0026] When the first hardware encoding information is the same as the second hardware encoding information, it indicates that the wireless sensor sending the wireless control data and the current wireless switch belong to the same control group. The microcontroller control module generates the corresponding switch control command according to the opcode and sends the switch control command to the power switch module. When the first hardware encoding information is different from the second hardware encoding information, it indicates that the wireless sensor sending the wireless control data and the current wireless switch do not belong to the same control group, and the microcontroller control module does not execute the opcode.
[0027] After receiving a switch control command, the control terminal of the power switch module changes its conduction state according to the command. When the switch control command corresponds to a power-on operation, the power switch module is on, and the power supply supplies power to the lighting load through the power switch module; when the switch control command corresponds to a power-off operation, the power switch module is off, and the power supply path between the power supply and the lighting load is broken.
[0028] In one possible embodiment, a wireless sensor and multiple wireless switches can be configured with the same hardware code, allowing wireless control data sent by one sensor to be received and executed by multiple wireless switches. Alternatively, multiple control groups can be set up according to the actual distribution of the lighting area, with different control groups using different hardware codes, so that each wireless switch only executes the wireless control data corresponding to its own control group.
[0029] In this embodiment of the invention, the system includes a wireless sensor and a wireless switch. The wireless sensor uses a sensing module to detect the presence or passage of a human body, reads first hardware code information, and combines the first hardware code information with an operation code determined based on the sensing signal to form wireless control data before sending it. The wireless switch receives and parses the wireless control data, reads second hardware code information, and when the first and second hardware code information are the same, controls the power switch module connected in series between the power supply and the lighting load to turn on or off according to the operation code. By establishing a control relationship between the wireless sensor and the wireless switch through user-configured hardware codes, the sensor and the lighting fixture can be installed separately, eliminating the need to replace the original lighting fixtures or perform software pairing, thus reducing the cost of retrofitting sensor lighting and the difficulty of networking.
[0030] Optionally, the first hardware encoding circuit and the second hardware encoding circuit each include at least one encoding channel, and each encoding channel includes a physical encoding device capable of forming an on state and an off state; the microcontroller signal processing module is used to determine the corresponding digital code according to the on state or off state of each encoding channel in the first hardware encoding circuit, and combine each digital code according to the arrangement order of each encoding channel to form the first hardware encoding information; the microcontroller control module is used to determine the corresponding digital code according to the on state or off state of each encoding channel in the second hardware encoding circuit, and combine each digital code according to the arrangement order of each encoding channel to form the second hardware encoding information.
[0031] In this embodiment of the invention, the aforementioned encoding channel can be understood as an encoding position in a hardware encoding circuit that can be configured individually. Each encoding channel has a corresponding physical encoding device. The user can change the connection state of the physical encoding device to put the corresponding encoding channel into an on or off state. Each encoding channel is connected to the input terminal of the corresponding microcontroller. The on and off states of the encoding channel can generate different electrical signals at the input terminal of the microcontroller, allowing the microcontroller to identify the current configuration state of each encoding channel.
[0032] Specifically, before generating wireless control data, the microcontroller signal processing module reads the configuration status of each encoding channel in the first hardware encoding circuit. According to preset encoding rules, the microcontroller signal processing module converts the on / off state of each encoding channel into corresponding digital codes, and then combines these digital codes according to the order of the encoding channels to obtain the first hardware encoding information. This first hardware encoding information is used to represent the control group to which the wireless sensor currently belongs and is sent along with the operation code as part of the wireless control data.
[0033] After receiving the wireless control data, the microcontroller control module reads the configuration status of each encoding channel in the second hardware encoding circuit. Following the same encoding rules as the microcontroller signal processing module, the microcontroller control module converts the on / off state of each encoding channel into corresponding digital codes, and combines these digital codes in the same channel arrangement order to obtain the second hardware encoding information. This second hardware encoding information indicates the control group to which the wireless switch currently belongs and serves as the local encoding basis for determining whether the wireless switch should execute an opcode.
[0034] In one possible embodiment, the first hardware encoding circuit and the second hardware encoding circuit employ the same number of encoding channels, with each channel having a one-to-one correspondence. When the user configures corresponding encoding channels in the first and second hardware encoding circuits to the same physical on / off state, the resulting first hardware encoding information is identical to the second hardware encoding information, and the wireless sensor and the wireless switch are configured to the same control group. When at least one corresponding encoding channel has different physical on / off states, the resulting first hardware encoding information is different from the second hardware encoding information, and the wireless sensor and the wireless switch belong to different control groups.
[0035] By changing the physical on / off state of each encoding channel, the control group to which the wireless sensor or wireless switch belongs can be adjusted without writing the device address to the microcontroller or performing software pairing operations.
[0036] Optionally, the physical encoding device includes a DIP switch or a multiplexer; the on state of the encoding channel corresponds to digital code zero, and the off state of the encoding channel corresponds to digital code one; or, the on state of the encoding channel corresponds to digital code one, and the off state of the encoding channel corresponds to digital code zero.
[0037] In this embodiment of the invention, the physical encoding device can be a DIP switch or a multiplexer. Each DIP switch bit in the DIP switch constitutes an encoding channel, and the user can change the position of each DIP switch bit to make the corresponding encoding channel in a conducting or de-conducting state. Each switch branch in the multiplexer can also constitute an encoding channel, and the corresponding hardware encoding state combination can be formed by switching the on and off states of each switch branch.
[0038] Specifically, the on / off state of each encoding channel is transmitted to the input terminal of the microcontroller via the corresponding hardware encoding circuit. The microcontroller converts the on or off state of each encoding channel into a digital code according to a preset state mapping rule. Specifically, the on state of an encoding channel can be defined as digital code zero, and the off state as digital code one; alternatively, the on state of an encoding channel can be defined as digital code one, and the off state as digital code zero.
[0039] Taking a four-way DIP switch as an example, the four DIP switches correspond to the first, second, third, and fourth encoding channels respectively in a preset order. When the four encoding channels are in the ON, OFF, ON, and OFF states in sequence, with the ON state corresponding to digital code zero and the OFF state corresponding to digital code one, the hardware encoding information formed according to the above arrangement is "0101". When the opposite state mapping rule is used, the hardware encoding information formed by the above combination of ON and OFF states is "1010".
[0040] The first and second hardware encoding circuits use the same encoding channel arrangement order and state mapping rules. When the on / off states of each encoding channel in the two physical encoding devices are the same, the resulting first hardware encoding information is the same as the second hardware encoding information; when the on / off states of at least one corresponding encoding channel are different, the resulting first hardware encoding information is different from the second hardware encoding information. Therefore, the user can complete the hardware encoding configuration between the wireless sensor and the wireless switch by adjusting the on / off states of the DIP switch or multiplexer. The number of encoding channels can be set according to the required number of encoding combinations, and is not limited to the four encoding channels mentioned above.
[0041] Optionally, the sensing module includes an infrared sensing unit, a radar sensing unit, or a combination of infrared and radar sensing units; the sensing module is used to continuously perform human body detection, and when a human body is detected passing by or present, outputs the sensing signal to the microcontroller signal processing module; the microcontroller signal processing module is used to generate a power-on operation code, a power-on hold operation code, a power-off operation code, or a delayed power-off operation code based on the sensing signal.
[0042] In this embodiment of the invention, the sensing module can employ an infrared sensing unit, a radar sensing unit, or a combined infrared and radar sensing unit. The infrared sensing unit determines the passing status of a human body by detecting changes in human infrared radiation, while the radar sensing unit determines the passing status or presence status of a human body by detecting changes in radar echoes. When using a combined infrared and radar sensing unit, the infrared detection results and radar detection results are acquired separately to determine the human body detection status.
[0043] The sensing module continuously performs human body detection and transmits the generated sensing signals to the microcontroller signal processing module. The microcontroller signal processing module determines the lighting control action based on the sensing signals and preset control logic; when a human body is detected passing by or present, it generates a power-on operation code or a power-on maintenance operation code; when no human body is detected or the human body leaves, it generates a power-off operation code or a delayed power-off operation code. These operation codes are combined with the first hardware encoding information to form wireless control data, which controls the coded wireless switch to perform the corresponding lighting control action.
[0044] Optionally, the wireless control data includes a preamble, hardware version code, software version code, first hardware code information, the operation code, and a reserved code; the preamble is used to enable the wireless transmitting unit and the wireless receiving unit to perform data handshake and clock synchronization.
[0045] In this embodiment of the invention, the wireless control data can adopt a data frame structure that sequentially sets a preamble, hardware version code, software version code, first hardware code information, opcode, and reserved code. The microcontroller signal processing module combines each encoded field according to the above data frame structure and transmits the formed wireless control data to the wireless transmitting unit.
[0046] The preamble is located at the beginning of the wireless control data. When the wireless receiving unit receives the wireless signal, it first identifies the preamble. When data matching the preset preamble is identified, the wireless transmitting unit and the wireless receiving unit complete a data handshake and clock synchronization, and the wireless receiving unit continues to receive subsequent encoded fields. This allows the starting position of the wireless control data to be determined and reduces interference from non-target wireless signals on data reception.
[0047] The hardware version code indicates the hardware version of the wireless sensor, and the software version code indicates the software version, facilitating product identification and quality traceability. The first hardware code information identifies the hardware control group corresponding to the wireless control data, and the operation code indicates control actions such as power-on, power-on hold, power-off, or delayed power-off. The reserved code reserves coding space for system upgrades or functional expansions; when the corresponding expanded function is not enabled, the reserved code does not participate in hardware code matching or operation code execution.
[0048] After the wireless receiving unit completes data reception, the microcontroller control module parses the wireless control data according to the arrangement of each encoded field, extracts the first hardware encoding information and the operation code, and executes the operation code when the first hardware encoding information and the second hardware encoding information are the same. The number of bits and the arrangement of each encoded field can be set according to the transmission requirements of the wireless control data.
[0049] Optionally, the microcontroller control module is used to extract the first hardware coding information and the opcode from the wireless control data, and read the second hardware coding information currently formed by the second hardware coding circuit; when the first hardware coding information is the same as the second hardware coding information, the microcontroller control module executes the opcode and outputs the switch control instruction; when the first hardware coding information is different from the second hardware coding information, the microcontroller control module does not execute the opcode.
[0050] In this embodiment of the invention, after receiving the wireless control data, the wireless receiving unit transmits the wireless control data to the microcontroller control module. The microcontroller control module parses the wireless control data according to the arrangement of each data field in the wireless control data, obtaining first hardware encoding information and operation codes respectively. The first hardware encoding information is used to determine the hardware control group corresponding to the wireless control data, and the operation code is used to represent the corresponding lighting control action.
[0051] While parsing the wireless control data, or after parsing the wireless control data, the microcontroller control module reads the current on / off state of each encoding channel in the second hardware encoding circuit. It converts the on / off state of each encoding channel into digital codes according to a preset state mapping rule, and combines these codes according to the order of the encoding channels to form the second hardware encoding information. Therefore, when the user changes the physical configuration of the second hardware encoding circuit, the microcontroller control module can perform encoding matching based on the second hardware encoding information currently formed by the second hardware encoding circuit.
[0052] Specifically, the microcontroller control module compares the first hardware code information and the second hardware code information bit by bit. When all the digits in the first hardware code information are the same as the digits in the corresponding positions in the second hardware code information, it is determined that the first hardware code information and the second hardware code information are the same. The microcontroller control module determines the corresponding power-on operation, power-on hold operation, power-off operation, or delayed power-off operation based on the opcode, and outputs the corresponding switch control command to the power switch module so that the power switch module controls the power supply path to be turned on, kept on, or turned off.
[0053] When at least one bit of the first hardware encoding information differs from the second hardware encoding information, it is determined that the first hardware encoding information and the second hardware encoding information are different. The microcontroller control module does not execute the opcode in the wireless control data, nor does it output a switch control command to the power switch module for that wireless control data. In one possible implementation, the power switch module maintains its original on or off state when it does not receive a switch control command.
[0054] According to such Figure 3 The system architecture diagram shown illustrates a remote control mode. The remote controller is wirelessly connected to a wireless sensor, which in turn is wirelessly connected to a first wireless switch and a second wireless switch. The first wireless switch is connected to one or more lighting fixtures powered by DC power, and the second wireless switch is connected to one or more lighting fixtures powered by AC power. The remote controller can be an infrared remote controller, a Bluetooth remote controller, or a mobile terminal with Bluetooth remote control functionality. The wireless sensor has a remote control signal receiving function adapted to the communication method of the remote controller. The remote controller adjusts the operating configuration of the wireless sensor by sending remote control data to the wireless sensor.
[0055] After configuration, the wireless sensor detects the presence or passage of a human body via its sensing module. Based on the detection result, it determines an operation code, combines the first hardware encoding information with the operation code to form wireless control data, and transmits this same wireless control data to the first and second wireless switches via the wireless transmission unit. The first and second wireless switches extract the first hardware encoding information and the operation code from the received wireless control data, and then compare the first hardware encoding information with their respective second hardware encoding information.
[0056] When the second hardware code information of both the first and second wireless switches is identical to the first hardware code information, the first and second wireless switches execute the operation code respectively to control the power supply or de-energization of their respective connected lighting fixtures. When the second hardware code information of one of the wireless switches differs from the first hardware code information, that wireless switch does not execute the operation code, but the other wireless switch with matching code can still control the corresponding lighting fixture according to the operation code. Therefore, the same wireless sensor can control one or more wireless switches based on the hardware code matching result, and each wireless switch can control one or more lighting fixtures respectively.
[0057] Optionally, the wireless transmitting unit and the wireless receiving unit transmit the wireless control data via infrared signals, radio frequency signals, or Bluetooth signals; the power switching module includes a silicon controlled rectifier, a transistor, a field-effect transistor, or a relay; the power supply includes a DC power supply or an AC power supply; and the lighting load includes one or more lighting fixtures.
[0058] In this embodiment of the invention, the wireless transmitting unit and the wireless receiving unit employ a mutually compatible wireless communication method. After the microcontroller signal processing module generates wireless control data, it transmits the wireless control data to the wireless transmitting unit. The wireless transmitting unit converts the wireless control data into a corresponding wireless signal and transmits it. After receiving the wireless signal, the wireless receiving unit recovers the wireless control data from the wireless signal and transmits the recovered wireless control data to the microcontroller control module for parsing and encoding matching.
[0059] Specifically, the wireless transmitting and receiving units can transmit wireless control data via infrared, radio frequency (RF), or Bluetooth signals. When using infrared signals, the wireless transmitting and receiving units employ compatible infrared transmitters and receivers, respectively. When using RF signals, a 433 MHz frequency RF signal can be used. When using Bluetooth signals, the wireless transmitting and receiving units transmit wireless control data via a Bluetooth communication link. In practical applications, the appropriate wireless communication method can be selected based on the installation distance between the wireless sensor and the wireless switch, the installation environment, and communication requirements.
[0060] The power switch module is connected in series between the power supply and the lighting load. The microcontroller control module outputs switching control commands to the control terminal of the power switch module to change the conduction state of the power switch module. When the power switch module is on, a power supply path is formed between the power supply and the lighting load, and the lighting load receives power; when the power switch module is off, the power supply path is broken, and the lighting load stops receiving power.
[0061] Power switching modules can be selected from thyristors, transistors, MOSFETs, or relays, depending on the type of power supply and the operating parameters of the lighting load. When the power supply is AC, the power switching module can use a thyristor or a relay; when the power supply is DC, the power switching module can use a transistor, MOSFET, or relay. One power switching module can control one lighting fixture, or it can control multiple lighting fixtures that share the same power supply path.
[0062] According to such Figure 4 The system architecture diagram shown illustrates a wireless gateway mode, in which the wireless network router communicates with both the cloud and the gateway, and the gateway communicates with both a first wireless sensor and a second wireless sensor. The first wireless sensor communicates wirelessly with both a first wireless switch and a second wireless switch, and the second wireless sensor communicates wirelessly with both a third wireless switch and a fourth wireless switch. Each wireless switch is connected to one or more lighting loads.
[0063] In wireless gateway mode, the wireless network router is used to facilitate information transmission between the cloud and the gateway. Remote control data generated in the cloud is transmitted to the gateway via the wireless network router. The gateway performs protocol conversion on the remote control data, transforming it into local control data that conforms to the encoding method used by the sensor lighting control system, and then sends the local control data to the corresponding wireless sensor. The data obtained after protocol conversion includes hardware coding information for identifying the controlled object and operation codes for representing control actions.
[0064] After receiving local control data, the corresponding wireless sensor determines the operation code based on the local control data and combines the first hardware encoding information generated by its own first hardware encoding circuit with the operation code to form wireless control data. The first wireless sensor sends the wireless control data to the first and second wireless switches, and the second wireless sensor sends the wireless control data to the third and fourth wireless switches. Each wireless switch compares the received first hardware encoding information with the second hardware encoding information generated by its own second hardware encoding circuit, and executes the operation code only when the codes match.
[0065] For example, the first and second wireless switches can be connected to lighting fixtures powered by DC and AC power, respectively. When the second hardware code information generated by the first and second wireless switches is identical to the first hardware code information generated by the first wireless sensor, the first and second wireless switches control the corresponding lighting fixtures according to the operation codes. The second hardware code information generated by the third and fourth wireless switches is identical to the first hardware code information generated by the second wireless sensor, thus forming another hardware control group. Therefore, the gateway can transmit control data to different hardware control groups through different wireless sensors, and each wireless switch controls the corresponding lighting load according to the hardware code matching result.
[0066] like Figure 2 As shown, this embodiment of the invention also provides a sensor-based lighting control method based on hardware code matching, which includes: S201. Acquire sensing data and first hardware coding information, wherein the sensing data is used to determine the state of human body passing by or the state of human body presence. S202. Based on the sensing data, determine the operation code, and combine the first hardware encoding information with the operation code to obtain wireless control data; S203. The wireless control data is wirelessly transmitted and decoded to obtain the hardware encoding information to be matched and the operation code to be executed. S204. Obtain the second hardware encoding information, compare the hardware encoding information to be matched with the second hardware encoding information, and obtain the encoding matching result; S205. When the encoding matching result is a match, a switch control instruction is generated and output according to the operation code to be executed. The switch control instruction is used to control the power switch module connected in series between the power supply and the lighting load to be turned on or off. S206. When the encoding matching result is a mismatch, the switch control command is not generated.
[0067] In this embodiment of the invention, the aforementioned sensing data may be detection data formed by infrared detection, radar detection, or a combination of infrared and radar detection, used to characterize changes in infrared radiation or radar echoes generated by the human body within the detection area.
[0068] The aforementioned first hardware encoding information can be understood as a digital code formed based on the on / off state of each encoding channel in the first hardware encoding circuit, used to identify the hardware control group corresponding to the wireless control data.
[0069] The aforementioned human body transit state can refer to the detection state formed when a human body moves within the detection area.
[0070] The aforementioned human body presence state can refer to the detection state formed when the human body is within the detection area, including the detection state formed when the human body is in a moving or stationary state.
[0071] The aforementioned operation codes can be digital codes corresponding to lighting control actions, including power-on operation codes, power-on hold operation codes, power-off operation codes, or delayed power-off operation codes.
[0072] The aforementioned wireless control data can be understood as data frames suitable for wireless transmission, containing at least first hardware encoding information and operation codes, and may also include preamble codes, hardware version codes, software version codes, and reserved codes.
[0073] The aforementioned hardware encoding information to be matched can be the first hardware encoding information decoded from the wireless control data, which serves as the input data for the receiving side to perform encoding comparison.
[0074] The aforementioned operation code to be executed can be an operation code decoded from wireless control data, which is used to determine the lighting control action to be executed during code matching.
[0075] The aforementioned second hardware encoding information can be understood as a digital code formed based on the current on / off state of each encoding channel in the second hardware encoding circuit, used to identify the hardware control group to which the corresponding wireless switch belongs.
[0076] The above encoding matching result can be the result data formed by comparing the hardware encoding information to be matched with the second hardware encoding information, including matching results and non-matching results.
[0077] The aforementioned switch control commands can be control data or control signals generated based on the operation code to be executed, used to control the power switch module to be turned on, kept on, or turned off.
[0078] In this embodiment, sensing data and first hardware coding information can be acquired. By continuously acquiring sensing data generated during human body detection, it can be determined whether a human body has passed through or is present in the detection area. Simultaneously, the on / off state of each coding channel in the first hardware coding circuit is read, each on / off state is converted into a corresponding digital code, and the first hardware coding information is obtained by combining them according to the arrangement order of each coding channel.
[0079] The operation code is determined based on the sensor data, and the first hardware encoding information is combined with the operation code to obtain wireless control data. Specifically, the corresponding lighting control action is determined according to the human body state and its duration represented by the sensor data; when a human body is detected passing by, a power-on operation code is generated; when a human body is detected and remains present, a power-on maintenance operation code is generated; when no human body is detected or the human body leaves, a power-off operation code or a delayed power-off operation code is generated. The first hardware encoding information and the operation code are combined according to a preset encoding order to form wireless control data.
[0080] Wireless control data is wirelessly transmitted and decoded. The wireless control data is converted into corresponding wireless signals for transmission, and the wireless control data is recovered from the received wireless signals. The recovered wireless control data is parsed according to a preset encoding order, and the first hardware encoding information and operation code are extracted to obtain the hardware encoding information to be matched and the operation code to be executed, respectively.
[0081] Acquire the second hardware encoding information and compare the hardware encoding information to be matched with the second hardware encoding information. Read the current on / off state of each encoding channel in the second hardware encoding circuit, and form the second hardware encoding information according to the same state mapping rules and channel arrangement order as the first hardware encoding information. According to the arrangement order of the encoding bits, compare the hardware encoding information to be matched with the second hardware encoding information bit by bit; when all corresponding encoding bits are the same, a matching result is obtained; when at least one corresponding encoding bit is different, a mismatch result is obtained.
[0082] When the encoding matching result is a match, a switch control instruction is generated and output based on the opcode to be executed. Specifically, when the opcode to be executed is a power-on opcode, a switch control instruction is generated to turn on the power switch module; when the opcode to be executed is a keep-on opcode, a switch control instruction is generated to keep the power switch module on; when the opcode to be executed is a power-off opcode, a switch control instruction is generated to turn off the power switch module; and when the opcode to be executed is a delayed power-off opcode, a switch control instruction is generated to turn off the power switch module after the corresponding delay condition is met.
[0083] When the encoding match result is a mismatch, no switch control command is generated based on the opcode to be executed, and the corresponding opcode to be executed is not executed. Therefore, the same wireless control data only controls wireless switches whose second hardware encoding information is identical to the hardware encoding information to be matched.
[0084] Optionally, S202 above includes: S2021. Acquire sensor data generated during human body detection; S2022. Obtain the first on / off state data of each encoding channel in the first hardware encoding circuit; S2023. Based on each of the first on / off state data, determine the corresponding digital code, and combine each of the digital codes according to the arrangement order of each of the encoding channels to obtain the first hardware encoding information; S2024. Based on the sensing data, determine the operation action, which includes power-on operation, power-on operation, power-off operation, or delayed power-off operation, and generate a corresponding operation code based on the determined operation action. S2025. The preamble, hardware version code, software version code, first hardware code information, operation code and reserved code are combined in a preset encoding order to obtain the wireless control data.
[0085] In this embodiment of the invention, the first on / off state data can be data used to indicate whether the corresponding encoding channel in the first hardware encoding circuit is in an on or off state.
[0086] The aforementioned digital encoding can be a binary encoding obtained by converting each first on / off state data according to a preset state mapping rule. Specifically, the on state of the encoded channel can correspond to digital code zero, and the off state can correspond to digital code one; alternatively, the opposite correspondence can be used.
[0087] The above-mentioned operation actions can be understood as lighting control actions determined based on the human body detection status, including power-on operation, power-on operation, power-off operation, and delayed power-off operation.
[0088] The aforementioned preset encoding order can refer to the pre-determined arrangement of each encoded field in the wireless control data, which is used to enable the transmitting end and the receiving end to combine and parse the data according to the same field position.
[0089] In this embodiment, sensor data generated during human body detection can be acquired. Specifically, sensor data corresponding to the current detection cycle is acquired from the ongoing human body detection process to determine the status of human body passage or presence within the detection area.
[0090] It can also obtain the first on / off state data of each encoding channel in the first hardware encoding circuit. Specifically, according to the arrangement order of each encoding channel, the current on / off state of each encoding channel is read, and the reading result is recorded as the corresponding first on / off state data.
[0091] According to a preset state mapping rule, each first on / off state data is converted into a corresponding digital code, and the digital codes are combined according to the arrangement order of each encoding channel to obtain the first hardware encoding information. Thus, the first hardware encoding information can characterize the current on / off state combination formed by the first hardware encoding circuit.
[0092] When sensor data indicates that a human body has passed by, a power-on operation is initiated; when sensor data indicates that a human body remains present, a power-on operation is maintained; when sensor data indicates that a human body has left or is not detected, a power-off operation or a delayed power-off operation is initiated. Based on a preset correspondence between the operation action and the operation code, the determined operation action is converted into the corresponding operation code.
[0093] Subsequently, following a preset encoding order, the preamble, hardware version code, software version code, first hardware encoding information, operation code, and reserved code are written into the corresponding data fields to obtain wireless control data. The first hardware encoding information in the wireless control data is used to determine the corresponding hardware control group, and the operation code is used to instruct the coded matching wireless switch to perform the corresponding lighting control action.
[0094] Optionally, S205 above includes: S2051. Decode the wireless control data and extract the hardware encoding information to be matched and the operation code to be executed from the wireless control data; S2052. Obtain the second on / off state data of each encoding channel in the second hardware encoding circuit; S2053. Determine the corresponding digital code according to each of the second on / off state data, and combine each of the digital codes according to the arrangement order of each of the encoding channels to obtain the second hardware encoding information; S2054. Compare the hardware encoding information to be matched with the second hardware encoding information to obtain the encoding matching result; S2055. When the encoding matching result is a match, the switch control command is generated according to the power-on operation, power-on operation, power-off operation, or delayed power-off operation corresponding to the operation code to be executed.
[0095] In this embodiment of the invention, the above decoding can be understood as a process of identifying and separating wireless control data according to the data frame structure and the arrangement of each encoded field.
[0096] The aforementioned second on / off state data can be used to indicate whether the corresponding encoding channel in the second hardware encoding circuit is in an on or off state.
[0097] In one possible embodiment, the wireless control data obtained via wireless transmission can be decoded. After identifying the preamble in the wireless control data, the position of each encoded field is determined according to a preset encoding order. The hardware encoding information to be matched is extracted from the data field corresponding to the first hardware encoding information, and the operation code to be executed is extracted from the data field corresponding to the operation code.
[0098] Then, according to the order of each encoding channel, read the current on or off state of each encoding channel in turn, and record the reading result as the corresponding second on / off state data.
[0099] Following the same state mapping rules as the first hardware encoding information, each second on / off state data is converted into a corresponding digital code, and the digital codes are combined according to the arrangement order of each encoding channel to obtain the second hardware encoding information. Thus, the second hardware encoding information can characterize the current on / off state combination formed by the second hardware encoding circuit.
[0100] The hardware encoding information to be matched is compared bit by bit with the second hardware encoding information according to the order of the encoding bits. When all corresponding encoding bits are the same, the encoding matching result is determined to be a match; when at least one corresponding encoding bit is different, the encoding matching result is determined to be a mismatch.
[0101] When the encoding matching result is a match, the corresponding operation action is determined based on the opcode to be executed. When the opcode to be executed corresponds to a power-on operation, a switch control command is generated to control the power switch module to be turned on; when the opcode to be executed corresponds to a power-on hold operation, a switch control command is generated to control the power switch module to remain on; when the opcode to be executed corresponds to a power-off operation, a switch control command is generated to control the power switch module to be turned off; when the opcode to be executed corresponds to a delayed power-off operation, a switch control command is generated to control the power switch module to be turned off after the corresponding delay condition is met.
[0102] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the hardware-coded matching-based sensor lighting control system or the application-side hardware-coded matching-based sensor lighting control system provided in this invention, and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0103] Those skilled in the art will understand that implementing all or part of the processes in the above embodiments can be done by a computer program instructing related hardware, and can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0104] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.
Claims
1. A sensor-based lighting control system based on hardware code matching, characterized in that, Including wireless sensors and wireless switches; The wireless sensor includes a first hardware encoding circuit, a microcontroller signal processing module, a sensing module, and a wireless transmitting unit. The output terminal of the first hardware encoding circuit and the output terminal of the sensing module are respectively connected to the input terminal of the microcontroller signal processing module, and the output terminal of the microcontroller signal processing module is connected to the input terminal of the wireless transmitting unit. The first hardware encoding circuit is used to generate first hardware encoding information according to the user's configuration operation; the sensing module is used to detect the state of a human body passing by or the state of a human body being present, and output the corresponding sensing signal; the microcontroller signal processing module is used to process the sensing signal, determine the operation code according to the processing result, read the first hardware encoding information, and combine the first hardware encoding information and the operation code to form wireless control data; the wireless transmitting unit is used to transmit the wireless control data. The wireless switch includes a wireless receiving unit, a microcontroller control module, a second hardware encoding circuit, and a power switch module. The output terminals of the wireless receiving unit and the second hardware encoding circuit are respectively connected to the input terminal of the microcontroller control module. The output terminal of the microcontroller control module is connected to the control terminal of the power switch module. The power switch module is connected in series between the power supply and the lighting load. The wireless receiving unit is wirelessly connected to the wireless transmitting unit. The wireless receiving unit is used to receive the wireless control data; the second hardware encoding circuit is used to generate second hardware encoding information according to the user's configuration operation. The microcontroller control module is used to parse the wireless control data, compare the first hardware encoding information with the second hardware encoding information, and when the first hardware encoding information and the second hardware encoding information are the same, output a switch control command to the power switch module according to the operation code; the power switch module is used to control the power supply path between the power supply and the lighting load to be turned on or off according to the switch control command.
2. The sensor-based lighting control system based on hardware code matching as described in claim 1, characterized in that, The first hardware encoding circuit and the second hardware encoding circuit each include at least one encoding channel, and each encoding channel includes a physical encoding device capable of forming an on state and an off state; The microcontroller signal processing module is used to determine the corresponding digital code according to the on or off state of each encoding channel in the first hardware encoding circuit, and to combine each digital code according to the arrangement order of each encoding channel to form the first hardware encoding information. The microcontroller control module is used to determine the corresponding digital code according to the on or off state of each encoding channel in the second hardware encoding circuit, and to combine the digital codes according to the arrangement order of each encoding channel to form the second hardware encoding information.
3. The sensor lighting control system based on hardware code matching as described in claim 2, characterized in that, The physical encoding device includes a DIP switch or a multiplexer; The on state of the encoding channel corresponds to digital code zero, and the off state of the encoding channel corresponds to digital code one; or, the on state of the encoding channel corresponds to digital code one, and the off state of the encoding channel corresponds to digital code zero.
4. The sensor lighting control system based on hardware code matching as described in claim 1, characterized in that, The sensing module includes an infrared sensing unit, a radar sensing unit, or a combination of infrared and radar sensing units. The sensing module is used to continuously perform human body detection, and when a human body is detected passing by or present, it outputs the sensing signal to the microcontroller signal processing module. The microcontroller signal processing module is used to generate a power-on operation code, a power-on hold operation code, a power-off operation code, or a delayed power-off operation code based on the sensing signal.
5. The sensor-based lighting control system based on hardware code matching as described in claim 1, characterized in that, The wireless control data includes a preamble, hardware version code, software version code, first hardware code information, the operation code, and a reserved code. The preamble is used to enable the wireless transmitting unit and the wireless receiving unit to perform data handshake and clock synchronization.
6. The sensor lighting control system based on hardware code matching as described in claim 1, characterized in that, The microcontroller control module is used to extract the first hardware coding information and the operation code from the wireless control data, and to read the second hardware coding information currently formed by the second hardware coding circuit. When the first hardware coding information is the same as the second hardware coding information, the microcontroller control module executes the opcode and outputs the switch control command; When the first hardware encoding information is different from the second hardware encoding information, the microcontroller control module does not execute the opcode.
7. The sensor-based lighting control system based on hardware code matching as described in claim 1, characterized in that, The wireless transmitting unit and the wireless receiving unit transmit the wireless control data via infrared signals, radio frequency signals, or Bluetooth signals. The power switching module includes a silicon controlled rectifier (SCR), a transistor, a field-effect transistor (FET), or a relay; the power supply includes a DC power supply or an AC power supply; and the lighting load includes one or more lighting fixtures.
8. A sensor-based lighting control method based on hardware code matching, characterized in that, include: Acquire sensor data and first hardware coding information, wherein the sensor data is used to determine the state of human body passing by or the state of human body presence; Based on the sensing data, an operation code is determined, and the first hardware encoding information is combined with the operation code to obtain wireless control data; The wireless control data is wirelessly transmitted and decoded to obtain the hardware encoding information to be matched and the operation code to be executed. Obtain the second hardware encoding information, compare the hardware encoding information to be matched with the second hardware encoding information, and obtain the encoding matching result; When the encoding matching result is a match, a switch control instruction is generated and output according to the operation code to be executed. The switch control instruction is used to control the power switch module connected in series between the power supply and the lighting load to be turned on or off. When the encoding matching result is a mismatch, the switch control command is not generated.
9. The sensor-based lighting control method based on hardware code matching as described in claim 8, characterized in that, The step of determining an operation code based on the sensed data and combining the first hardware encoding information with the operation code to obtain wireless control data includes: Acquire sensor data generated during human body detection; Obtain the first on / off state data of each encoding channel in the first hardware encoding circuit; Based on each of the first on / off state data, the corresponding digital code is determined, and the digital codes are combined according to the arrangement order of each of the encoding channels to obtain the first hardware encoding information; Based on the sensed data, an operation action is determined, which includes power-on operation, power-on operation, power-off operation, or delayed power-off operation, and a corresponding operation code is generated based on the determined operation action. The wireless control data is obtained by combining the preamble, hardware version code, software version code, first hardware code information, operation code, and reserved code in a preset encoding order.
10. The sensor-based lighting control method based on hardware code matching as described in claim 8, characterized in that, When the encoding matching result is a match, a switch control instruction is generated and output according to the operation code to be executed. The switch control instruction is used to control the power switch module connected in series between the power supply and the lighting load to be turned on or off, including: The wireless control data is decoded to extract the hardware encoding information to be matched and the operation code to be executed from the wireless control data. Obtain the second on / off state data of each encoding channel in the second hardware encoding circuit; The corresponding digital code is determined based on each of the second on / off state data, and the digital codes are combined according to the arrangement order of each of the encoding channels to obtain the second hardware encoding information; The hardware encoding information to be matched is compared with the second hardware encoding information to obtain the encoding matching result; When the encoding matching result is a match, the switch control command is generated according to the power-on operation, power-on operation, power-off operation, or delayed power-off operation corresponding to the operation code to be executed.