Control method and device of target lamp, storage medium and electronic device
Through the wireless communication module and device switch of the device control panel, the first and second control modes are provided, and the wired control is realized by using relays, which solves the problem of lamp control when the wireless gateway fails and improves the control efficiency.
Patent Information
- Application Number
- CN202211237739.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-10
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-10-10
AI Technical Summary
The problem of how to effectively control smart lamps when the wireless gateway fails has not been effectively solved.
Through the wireless communication module and device switch in the device control panel, the first and second control modes are provided, and the working status of the target lamp is controlled based on the wireless communication module and the device switch respectively. Relays are used to achieve wired control to ensure normal operation when the wireless gateway fails.
Improves the efficiency of lighting control when the wireless gateway fails, ensuring that users can still control the switching of smart lighting normally when the network is abnormal.
Smart Images

Figure CN115623638B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of smart home, in particular to a target lamp control method, a device switch, a storage medium and an electronic device. BACKGROUND
[0002] At present, with the continuous improvement of the intelligence level of intelligent lamps, the functions of intelligent lamps are gradually enriched, and the control methods of home appliances provided for users are becoming more and more diversified. In addition to using traditional switches to control intelligent lamps, users can also achieve remote control of intelligent lamps based on mobile terminals such as mobile phones. This way eliminates the geographical restrictions of users controlling devices, improves the freedom of users controlling devices, and greatly improves the user experience. However, the remote control of intelligent lamps is based on a wireless gateway, and when the network is abnormal or the wireless gateway fails, the intelligent lamps cannot be controlled in the remote control mode.
[0003] Therefore, in the related art, there is a problem of how to control the target lamp when the wireless gateway fails.
[0004] For the problem of how to control the target lamp when the wireless gateway fails in the related art, an effective solution has not been proposed. SUMMARY
[0005] The embodiments of the present application provide a target lamp control method, a device switch, a storage medium and an electronic device to at least solve the problem of how to control the target lamp when the wireless gateway fails in the related art.
[0006] According to an embodiment of the present application, a target lamp control method is provided, comprising: receiving a key operation of a target object on a device control panel, determining a control signal corresponding to the key operation, wherein the device control panel comprises a wireless communication module and a device switch; determining a control mode corresponding to the device control panel, and controlling the working state of the target lamp according to the control signal in the control mode; wherein the control mode comprises at least one of the following: a first control mode and a second control mode, the first control mode represents a control mode based on the wireless communication module to control the working state of the target lamp, and the second control mode represents a control mode based on the device switch to control the working state of the target lamp.
[0007] In an exemplary embodiment, and in the control mode, controlling the working state of the target lamp according to the control signal includes: in the case of the first control mode, determining that the device switch is in the on state; sending a first control signal to the wireless communication module to control the working state of the target lamp based on the wireless communication module, wherein the control signal includes at least the first control signal.
[0008] In an exemplary embodiment, determining the control signal corresponding to the key operation includes: obtaining a first correspondence between the key operation and the control signal pre-set for the device control panel; and obtaining the control signal corresponding to the key operation of the device control panel by the target object based on the first correspondence.
[0009] In an exemplary embodiment, when the device control panel includes multiple buttons, in the process of obtaining the first correspondence between the button operation pre-set for the device control panel and the control signal, the method further includes: obtaining the pre-set key sequence of the multiple buttons and the key mode of each of the multiple buttons; and setting the corresponding target control signal according to the key sequence of the multiple buttons and the key mode of each of the multiple buttons.
[0010] In an exemplary embodiment, a corresponding target control signal is set according to the key sequence of the multiple keys and the key mode of each key in the multiple keys, including: obtaining the key type of each key in the multiple keys and the number of key presses corresponding to the key type from the key mode of each key in the multiple keys; and setting the corresponding target control signal according to the key sequence of the multiple keys and the key type of each key in the multiple keys and the number of key presses corresponding to the key type.
[0011] In an exemplary embodiment, after obtaining the first correspondence between the key operation and the control signal pre-set for the device control panel, the method further includes: when the mobile terminal of the target object receives a prompt message, receiving a setting instruction from the target object through the mobile terminal to update the first correspondence to a second correspondence, wherein the prompt message is used to prompt that the target key of the device control panel has expired, and the second correspondence does not include the key operation corresponding to the target key.
[0012] In an example embodiment, after controlling the working state of the target lamp according to the control signal, the method further comprises: in the case of the second control mode, determining a key display mode corresponding to the on-off state of the device switch, wherein the key display mode is a display mode of part or all of the keys included in the device control panel; and controlling the part or all of the keys to display according to the key display mode.
[0013] According to another embodiment of the present application, a control method of a target lamp is also provided, which is characterized by comprising: receiving a key operation of a target object on a device control panel; determining a control signal corresponding to the key operation, wherein a relay is arranged in the device control panel, and the relay is connected to the target lamp; sending the control signal to the relay and controlling the relay to be in an on-off state corresponding to the control signal, wherein the on-off state comprises at least one of the following: an off state and an on state; and controlling a working state of the target lamp according to the on-off state of the relay.
[0014] In an example embodiment, controlling the working state of the target lamp according to the on-off state of the relay comprises: in the case where a second control signal corresponding to the key operation indicates that the on-off state of the relay is the on state, controlling the working state of the target lamp to be turned on; and in the case where a third control signal corresponding to the key operation indicates that the on-off state of the relay is the off state, controlling the working state of the target lamp to be turned off.
[0015] According to another embodiment of the present application, a device control panel is also provided, which comprises: a wireless communication module, configured to control a working state of a target lamp according to a control signal in a first control mode; and a device switch, configured to control the working state of the target lamp according to the control signal in a second control mode; wherein the control mode corresponding to the device control panel comprises at least one of the following: the first control mode and the second control mode.
[0016] According to another embodiment of the present application, a device control panel is also provided, which comprises: a Bluetooth module, configured to determine a control signal corresponding to a key operation of a target object on the device control panel and send the control signal to a relay; and the relay, connected to the Bluetooth module and the target lamp, configured to determine an on-off state of the relay corresponding to the control signal and control a working state of the target lamp according to the on-off state of the relay, wherein the on-off state comprises at least one of the following: an off state and an on state.
[0017] According to another embodiment of the present application, a computer-readable storage medium is further provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned control method for the target lamp when running.
[0018] According to another embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the control method of the target lamp through the computer program.
[0019] In an embodiment of the present application, a key operation of a target object on a device control panel is received, and a control signal corresponding to the key operation is determined; a control mode corresponding to the device control panel is determined, and under the control mode, the working state of the target lamp is controlled according to the control signal; wherein the control mode includes at least one of the following: a first control mode and a second control mode, the first control mode represents a control mode for controlling the working state of the target lamp based on the wireless communication module, and the second control mode represents a control mode for controlling the working state of the target lamp based on the device switch; the above-mentioned technical solution is adopted to solve the problem of how to control the target lamp when the wireless gateway fails, thereby improving the control efficiency of the target lamp when the wireless gateway fails. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0022] Figure 1 This is a schematic diagram of the hardware environment of a method for controlling a target lamp according to an embodiment of the present application;
[0023] Figure 2 is a flow chart (1) of a method for controlling a target lamp according to an embodiment of the present application;
[0024] Figure 3 Flowchart (II) of the method for controlling a target lamp according to an embodiment of the present application
[0025] Figure 4 is a schematic diagram of the internal structure of a device switch according to an embodiment of the present application;
[0026] Figure 5 is a schematic diagram of the architecture of a device control panel according to an embodiment of the present application;
[0027] Figure 6 is a schematic diagram of a key switch of a device according to an embodiment of the present application;
[0028] Figure 7 It is a flowchart of a method for controlling a target lamp according to an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] According to one aspect of the embodiment of the present application, a method for controlling a target lamp is provided. The method for controlling a target lamp is widely used in smart home (Smart Home), smart home, smart home device ecology, smart residence (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above-mentioned method for controlling a target lamp can be applied to Figure 1 In the hardware environment shown in FIG. 1 , which is composed of a terminal device 102 and a server 104. Figure 1As shown, the server 104 is connected with the terminal device 102 through a network, and can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal, a database can be set on the server or independently of the server, used to provide data storage services for the server 104, cloud computing and / or edge computing services can be configured on the server or independently of the server, used to provide data operation services for the server 104.
[0032] The network can include but is not limited to at least one of the following: wired network, wireless network. The wired network can include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network. The wireless network can include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 can not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart oven, smart refrigerator, smart oven, smart oven, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projection equipment, smart television, smart clothesline, smart curtain, smart audio and video, smart socket, smart sound, smart sound box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart sweeping robot, smart window cleaning robot, smart mopping robot, smart air purification equipment, smart steamer, smart microwave oven, smart kitchen treasure, smart purifier, smart water dispenser, smart door lock, etc.
[0033] In one embodiment, a control method of a target lamp is provided, Figure 2 is a flowchart of a control method of a target lamp according to an embodiment of the present application, which comprises the following steps:
[0034] Step S102, receiving the key operation of the target object on the device control panel, determining the control signal corresponding to the key operation, wherein the device control panel comprises a wireless communication module and a device switch;
[0035] Step S104, determining the control mode corresponding to the device control panel, and controlling the working state of the target lamp according to the control signal in the control mode; wherein the control mode at least includes one of the following: first control mode and second control mode, the first control mode represents the control mode based on the wireless communication module to control the working state of the target lamp, and the second control mode represents the control mode based on the device switch to control the working state of the target lamp.
[0036] Through the above steps, by receiving the key operation of the target object on the device control panel, the control signal corresponding to the key operation is determined, wherein the device control panel includes a wireless communication module and a device switch; the control mode corresponding to the device control panel is determined, and under the control mode, the working state of the target lamp is controlled according to the control signal. This solves the problem in the related art of how to control the target lamp when the wireless gateway fails, thereby improving the control efficiency of the target lamp when the wireless gateway fails.
[0037] Furthermore, the process of controlling the working state of the target lamp according to the control signal in the control mode can be achieved through the following steps, including: in the case of the first control mode, determining that the device switch is in the on state; sending a first control signal to the wireless communication module to control the working state of the target lamp based on the wireless communication module, wherein the control signal includes at least the first control signal.
[0038] In an exemplary embodiment, the process of determining the control signal corresponding to the key operation in the above step S202 can be explained by the following scheme, and the specific steps include: obtaining a first correspondence between the key operation and the control signal pre-set for the device switch; and obtaining the control signal corresponding to the key operation of the target object on the device control panel based on the first correspondence.
[0039] In an exemplary embodiment, a technical solution is also proposed for obtaining a first correspondence between a key operation pre-set for the device switch and a control signal when the device control panel includes multiple keys, specifically including: obtaining the pre-set key sequence of the multiple keys and the key mode of each of the multiple keys; setting a corresponding target control signal according to the key sequence of the multiple keys and the key mode of each of the multiple keys.
[0040] In the above embodiment, the first correspondence between the key operation and the control signal pre-set on the device switch can be set by the user or factory-set, and this application does not impose any restrictions on this. The process of the user setting the above first correspondence includes: confirming that the wireless gateway corresponding to the Bluetooth module can be used normally, controlling the relay to remain in the on state according to the control signal corresponding to the key operation of the user on the device control panel to power the target lamp, and then the user setting the above first correspondence through a mobile terminal such as a mobile phone.
[0041] Optionally, during the process of the user setting the first corresponding relationship, the user may also set key operations and smart lighting scenes of the target lamps through a mobile phone.
[0042] When executing the above-mentioned step of obtaining the key sequence of the pre-set multiple keys, you can also obtain some keys from the pre-set multiple keys and obtain the sequence of some keys. This application does not limit the user to performing key operations on all the pre-set multiple keys.
[0043] In an exemplary embodiment, further, the process of setting a corresponding target control signal according to the key sequence of the multiple keys and the key mode of each key in the multiple keys specifically includes: obtaining the key type of each key in the multiple keys and the number of key presses corresponding to the key type from the key mode of each key in the multiple keys; setting a corresponding target control signal according to the key sequence of the multiple keys and the key type of each key in the multiple keys and the number of key presses corresponding to the key type.
[0044] In an exemplary embodiment, after obtaining the first correspondence between the key operation and the control signal pre-set for the device switch, it is also possible to receive a setting instruction from the target object through the mobile terminal when the mobile terminal of the target object receives a prompt message to update the first correspondence to a second correspondence, wherein the prompt message is used to prompt that the target key on the device control panel has expired, and the second correspondence does not include the key operation corresponding to the target key.
[0045] The solution of this embodiment can quickly provide the user with feedback on whether a key is invalid, and promptly remind the user to reset the correspondence between the key operation and the control signal (ie, the second correspondence mentioned above) when the key is invalid.
[0046] Optionally, when the mobile terminal of the target object receives the prompt information, a pre-set backup correspondence between key operations and control signals can be directly provided to the user, wherein the backup correspondence does not include the key operation corresponding to the invalid target key.
[0047] In an exemplary embodiment, after controlling the relay to be in an on-off state corresponding to the control signal, the following technical solution is further proposed: determining a key display mode corresponding to the on-off state, wherein the key display mode is the display mode of some or all of the multiple keys included in the device control panel; controlling the some or all of the keys to be displayed according to the key display mode.
[0048] In other embodiments, a method for controlling a target lamp is also provided, which is applied to the above-mentioned computer terminal. Figure 3 Flowchart (2) of a method for controlling a target lamp according to an embodiment of the present application, the flow includes the following steps:
[0049] Step S202: receiving a key operation on a device control panel by a target object, and determining a control signal corresponding to the key operation, wherein a relay is provided in the device control panel, and the relay is connected to the target lamp;
[0050] Obviously, for step S202 and step S102, the above-mentioned target object may include a person or a robot. In the case that the above-mentioned target object is a robot, the robot can be controlled to perform pre-set key operations, or the robot can be controlled in real time to perform key operations on the device control panel. This application does not impose any restrictions on this.
[0051] It should be noted that the operation types of key operations may include, for example, click, touch, long press, etc.
[0052] Furthermore, the operation type of the key operation can be set according to the key type. For example, if the key type is a display panel key, the operation type of the key operation can be set to at least include touch.
[0053] Step S204, sending the control signal to the relay, and controlling the relay to be in an on-off state corresponding to the control signal, wherein the on-off state includes at least one of the following: an off state and an on state;
[0054] Step S206 , controlling the working state of the target lamp according to the on / off state of the relay.
[0055] Through the above steps, the target object's key operation on the device control panel is received, and the control signal corresponding to the key operation is determined, wherein the device control panel is the control panel corresponding to the device switch of the target lamp, a relay is provided in the device switch, and the relay is connected to the target lamp; the control signal is sent to the relay, and the relay is controlled to be in an on-off state corresponding to the control signal, wherein the on-off state includes at least one of the following: an off state and an on state; the working state of the target lamp is controlled according to the on-off state of the relay, which solves the problem in the related art of how to control the target lamp when the wireless gateway fails, thereby improving the control efficiency of the target lamp when the wireless gateway fails.
[0056] Optionally, for the above-mentioned step S206, the process of controlling the working state of the target lamp according to the on-off state of the relay also includes the following scheme: when the network is normal, the control mode corresponding to the device control panel includes a first control mode and a second control mode, wherein the first control mode is a wireless control mode and the second control mode is a wired control mode. At this time, according to the key operation of the target object on the device control panel, a first control signal for wirelessly controlling the target lamp and a second control signal for determining the on-off state of the relay can be determined. Then, based on the second control signal, the relay is controlled to be in the on state to power the target lamp, and the working state of the target lamp is controlled to be on, and then the first control signal is used to control the lighting effect of the target lamp. Alternatively, based on the second control signal, the relay is controlled to be in the off state, that is, the working state of the target lamp is controlled to be off.
[0057] In the event of a network failure, the device control panel corresponds to the second control mode. At this time, based on the key operation of the target object on the device control panel, only the second control signal for determining the on / off state of the relay can be determined. In this case, based on the second control signal, the relay is controlled to be in the on state to power the target lamp, that is, the target lamp is controlled to be in the on state. Alternatively, based on the second control signal, the relay is controlled to be in the off state, that is, the target lamp is controlled to be in the off state.
[0058] In an exemplary embodiment, in order to better understand the implementation process of controlling the working state of the target lamp according to the on-off state of the relay in the above-mentioned step S206, the following implementation steps are proposed: when it is determined that the second control signal corresponding to the key operation indicates that the on-off state of the relay is the on state, the working state of the target lamp is controlled to be on; when it is determined that the third control signal corresponding to the key operation indicates that the on-off state of the relay is the off state, the working state of the target lamp is controlled to be off.
[0059] In one embodiment, the process of controlling the working state of the target lamp according to the on-off state of the relay may also include the step of selecting the target lamp. When the relay is connected to multiple lamps, the target lamp can be determined from the multiple lamps for control, or multiple lamps can be controlled at the same time. This application does not impose any restrictions on this.
[0060] Furthermore, the process of determining the target lamp from the plurality of lamps may include: when a first correspondence between a key operation and a control signal is pre-set for the device switch, the user determines the target lamp from the plurality of lamps through mobile phone software.
[0061] Or, in other embodiments, the process of determining the target lamp from the plurality of lamps can also include: obtaining the historical lamps corresponding to the historical key operations of the device control panel of the target object, and directly determining the historical lamps as the target lamps. For the case where there are multiple historical lamps, the most recent historical lamp can be determined as the target lamp, or the historical lamp with the highest usage frequency can be determined as the target lamp. Optionally, the default lamp set by the user in advance can also be determined as the target lamp.
[0062] In order to better understand the process of the above target lamp control method, the implementation method flow of the above target lamp control will be described in combination with the optional embodiments below, but not used to limit the technical solutions of the embodiments of the present application.
[0063] In this embodiment, a device control panel is provided, as shown in Figure 4 , which is a schematic diagram of the internal structure of the device control panel according to the embodiments of the present application. The device control panel comprises: a key part 32, a Bluetooth module 34, and a relay 36. Figure 4 As for the key part 32, it can be used to receive the key operation of the target object, wherein the operation type of the key operation can include click, touch, long press, etc. The operation type of the key operation can be set according to the key type, for example, if the key type is a display screen board key, the operation type of the key operation can be set to include touch.
[0064] Obviously, the above target object can include a person or a robot, wherein in the case where the above target object is a robot, the robot can be controlled to perform a pre-set key operation, or the robot can be controlled in real time to perform a key operation on the device control panel, which is not limited by the present application.
[0065] In one embodiment, the above key part 32 can be as shown in
[0066] . Figure 6 is a schematic diagram of the keys of the device control panel according to the embodiments of the present application. The keys K1, K2, K3, K4, K5, and K6 can be sequentially arranged in the device control panel, and the display lights of the keys K1-K6 can be controlled according to the key operations of the target object on the keys K1-K6. Figure 6 And the Bluetooth module 34 is connected with the key part 32, and can be used to determine the control signal corresponding to the key operation and send the control signal to the relay 36;
[0067] As for the relay 36, it is connected with the Bluetooth module 34 and the target lamp (for example
[0068] Figure 5 The smart light) are connected, and can be used to determine the on-off state of the relay 36 corresponding to the control signal, and control the working state of the target lamp according to the on-off state of the relay 36, wherein the on-off state at least includes one of the following: off state, on state.
[0069] Optionally, in an embodiment, the device control panel further includes an AC-DC power converter inside for converting the mains input voltage into a power signal that can be used by the device control panel.
[0070] Compared with the related art, by the above-mentioned embodiment, a relay 36 is added in the device control panel, and the power line of the smart light is connected to the relay 36, so that the device control panel is used to realize the control process of the smart light, and the control process is as follows: in the case that the wireless gateway corresponding to the Bluetooth module can be normally used, the relay 36 is controlled to keep the on state to supply power to the smart light by operating the key part of the device, and the user controls the smart light wirelessly through the key part to realize different scene light effects of the smart light. Corresponding to the abnormal state such as network disconnection or wireless gateway failure of the wireless gateway, the user cannot control the smart light wirelessly through the device control panel, but the user can switch the off state and the on state of the relay 36 based on the key part 32 to realize the power-on and power-off operation of the smart light, so as to control the smart light to turn on or off.
[0071] By adding the relay 36 in the device control panel with wireless smart control function, the device control panel can realize the relay on-off control function, thereby improving the control efficiency of the smart light by the user in the network abnormal state and improving the user's use experience.
[0072] Further, the Bluetooth module 34 is further used to obtain a first correspondence relationship between the key operation and the control signal pre-set for the device control panel; and obtain the control signal corresponding to the key operation of the key part 32 by the target object based on the correspondence relationship.
[0073] In an optional embodiment, the Bluetooth module 34 is further used to obtain the key sequence of the plurality of keys pre-set and the key mode of each key in the plurality of keys in the process of obtaining the first correspondence relationship between the key operation and the control signal pre-set for the device control panel in the case that the key part 32 includes a plurality of keys; and set the corresponding target control signal according to the key sequence of the plurality of keys and the key mode of each key in the plurality of keys.
[0074] In the above embodiment, the first correspondence relationship between the pre-set key operation of the device control panel and the control signal can be set by the user or can be set by the manufacturer, and the application does not limit this. The process of setting the first correspondence relationship by the user includes: determining that the wireless gateway corresponding to the Bluetooth module can be normally used, controlling the relay to remain in the on state according to the control signal corresponding to the key operation of the device control panel by the user, and supplying power to the target lamp, and then the user sets the first correspondence relationship through a mobile terminal such as a mobile phone.
[0075] Optionally, in the process of setting the first correspondence relationship by the user, the user can also set the key operation and the intelligent light scene of the target lamp through a mobile phone.
[0076] In the process of executing the above step of obtaining the key sequence of the pre-set plurality of keys, part of the keys can also be obtained from the pre-set plurality of keys, and the sequence of the part of the keys is not limited by the application. The user must perform key operation on the pre-set plurality of keys.
[0077] Optionally, the Bluetooth module 34 is further configured to obtain the key type of each key in the plurality of keys and the number of key operations corresponding to the key type from the key mode of each key in the plurality of keys; and set the corresponding target control signal according to the key sequence of the plurality of keys and the key type of each key in the plurality of keys and the number of key operations corresponding to the key type.
[0078] Optionally, the Bluetooth module 34 is further configured to receive a setting instruction of the target object through the mobile terminal in the case that the mobile terminal of the target object receives prompt information, so as to update the first correspondence relationship to a second correspondence relationship, wherein the prompt information is used to prompt that the target key of the key part 32 has been disabled, and the second correspondence relationship does not include the key operation corresponding to the target key.
[0079] The scheme of the embodiment can quickly feed back to the user whether the key is disabled, and timely remind the user to re-set the correspondence relationship between the key operation and the control signal (i.e. the second correspondence relationship) when the key is disabled.
[0080] Optionally, a standby correspondence relationship between the pre-set key operation and the control signal can also be directly provided to the user in the case that the mobile terminal of the target object receives prompt information, wherein the standby correspondence relationship does not include the key operation corresponding to the disabled target key.
[0081] In an optional embodiment, the above-mentioned device control panel is also used to determine the button display mode corresponding to the on-off state, wherein the button display mode is the display mode of some or all of the multiple buttons included in the button part 32; and control the some or all of the buttons to be displayed according to the button display mode.
[0082] In an optional embodiment, the above-mentioned device control panel is also used to control the working state of the target lamp to be on when it is determined that the first control signal corresponding to the key operation indicates that the on-off state of the relay 36 is in the on state; and to control the working state of the target lamp to be off when it is determined that the second control signal corresponding to the key operation indicates that the on-off state of the relay 36 is in the off state.
[0083] In other embodiments, a device control panel is provided, such as Figure 5 As shown, Figure 5 : is a schematic diagram of the architecture of a device control panel according to an embodiment of the present application, the device control panel includes:
[0084] The wireless communication module 52 is configured to control the operating state of the target lamp according to the control signal in the first control mode;
[0085] A device switch 54, configured to control the operating state of the target lamp according to the control signal in a second control mode;
[0086] The control mode corresponding to the device control panel includes at least one of the following: the first control mode and the second control mode.
[0087] Among them, the above-mentioned device switch is in the physical circuit, for example, it can be understood as Figure 4 Relay 36 in.
[0088] In one embodiment, Figure 7 FIG. 1 is a flow chart of a method for controlling a target lamp according to an embodiment of the present application. Figure 7 As shown, two control modes are provided, including:
[0089] Method 1: When the wireless gateway is operating normally, the smart lighting scene can be realized. The corresponding control process includes: scene panel → gateway → smart light. Specifically: the user can first press the button part on the scene panel according to the factory preset button operation (refer to Figure 4 The button part 32) is operated to keep the relay connected, and then the corresponding relationship between the smart lighting scene and the button part is configured through the supporting software on the mobile phone. For example, you can set a single click or long press of the button to execute different smart lighting scenes.
[0090] After the configuration is completed, the user can click the button or long press the button, at which time the Bluetooth module (for reference Figure 4 Bluetooth module 34) inside the device switch determines the control signal corresponding to the button operation according to the received button operation of the user, and sends the control signal to the corresponding wireless gateway, and the wireless gateway sends the received wireless instruction to the smart lamp, so that the smart lamp can be controlled to execute the corresponding smart light scene according to the wireless instruction.
[0091] In addition, the correspondence between the above-mentioned smart light scene and the button part can also be pre-configured at the factory, so that the user can directly select the smart light scene to be executed according to the pre-configured correspondence between the smart light scene and the button part.
[0092] Mode 2, when the wireless gateway fails, the smart light scene cannot be realized, but the switch of the smart lamp can still be controlled. Specifically: the user can click the button or long press the button, at which time the Bluetooth module (for reference Figure 3 Bluetooth module 34) inside the device switch determines the control signal corresponding to the button operation according to the received button operation of the user, and sends the control signal to the relay, and controls the relay to be in the on-off state corresponding to the control signal, thereby controlling the opening and closing of the relay, that is, remotely controlling the working state of the smart lamp to be turned on or off.
[0093] In the above embodiment, the switching of the off state and the on state of the relay is completed by the button instruction (equivalent to the above-mentioned control signal) pre-set at the factory, combined with Figure 6 , for example, the buttons K1, K2, K4, K3, K5, K6 of Figure 6 can be clicked in turn, after the Bluetooth module detects the button operation, the control signal for turning off the relay is output, and after the buttons K1, K2, K4, K3, K5, K6 are clicked in turn again, the control signal for turning on the relay is output.
[0094] In other embodiments, the on-off state of the relay can also be prompted to the user according to the state of the indicator light corresponding to the button, for example, the indicator lights of K1 and K2 are always on at the same time, prompting the user that the relay is in the off state, and the indicator lights other than K1 and K2 are always on at the same time, prompting the user that the relay is in the on state, but not limited thereto.
[0095] Those skilled in the art can clearly understand that the method according to the above-mentioned embodiments can be realized by means of software on a general hardware platform, and of course, can also be realized by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device) to execute the methods of the various embodiments of the present application.
[0096] The embodiments of the present application also provide a storage medium including a stored program, wherein the program performs any of the above methods when executed.
[0097] Optionally, in the present embodiment, the storage medium can be configured to store program code for performing the following steps:
[0098] S1, receiving a key operation of a target object on a device control panel, determining a control signal corresponding to the key operation, wherein the device control panel includes a wireless communication module and a device switch;
[0099] S2, determining a control mode corresponding to the device control panel, and controlling the working state of the target lamp in the control mode according to the control signal;
[0100] The control mode includes at least one of the following: a first control mode and a second control mode, the first control mode indicating a control mode based on the wireless communication module to control the working state of the target lamp, and the second control mode indicating a control mode based on the device switch to control the working state of the target lamp.
[0101] The embodiments of the present application also provide an electronic device including a memory and a processor, the memory storing a computer program, and the processor being configured to execute the computer program to perform the steps in any of the above method embodiments.
[0102] Optionally, the electronic device can 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.
[0103] Optionally, in the present embodiment, the processor can be configured to execute the following steps through the computer program:
[0104] S1, receiving a key operation on a device control panel by a target object, and determining a control signal corresponding to the key operation, wherein the device control panel includes a wireless communication module and a device switch;
[0105] S2, determining a control mode corresponding to the device control panel, and controlling the working state of the target lamp according to the control signal under the control mode;
[0106] Among them, the control mode includes at least one of the following: a first control mode and a second control mode, the first control mode represents a control mode based on controlling the working state of the target lamp based on the wireless communication module, and the second control mode represents a control mode based on controlling the working state of the target lamp based on the device switch.
[0107] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: 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, and other media that can store program codes.
[0108] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0109] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. Alternatively, they can be implemented using program code executable by the computing device, so that they can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into separate integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0110] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for controlling a target lamp, characterized in that: include: Receiving a key operation on a device control panel by a target object and determining a control signal corresponding to the key operation, wherein the device control panel includes a wireless communication module and a device switch; Determine a control mode corresponding to the device control panel, and in the control mode, control the working state of the target lamp according to the control signal, where the target lamp represents a smart lamp remotely controlled by a wireless communication module; The control mode includes at least one of the following: a first control mode and a second control mode, wherein the first control mode represents a control mode in which the working state of the target lamp is controlled based on the wireless communication module, and the second control mode represents a control mode in which the working state of the target lamp is controlled based on the device switch; Determining the control signal corresponding to the key operation includes: obtaining a first correspondence between the key operation and the control signal pre-set for the device control panel; obtaining the control signal corresponding to the key operation of the device control panel by the target object based on the first correspondence, Among them, obtaining the first correspondence between the key operation and the control signal pre-set for the device control panel includes: when the wireless gateway corresponding to the Bluetooth module of the device control panel is in normal use, controlling the relay of the device control panel to remain in the on state according to the control signal corresponding to the key operation of the target object on the device control panel, and supplying power to the target lamp, so that the target object sets the first correspondence through the mobile terminal.
2. The control method of the target lamp according to claim 1, characterized in that: And in the control mode, controlling the working state of the target lamp according to the control signal includes: In the case of the first control mode, determining that the device switch is in the on state; A first control signal is sent to the wireless communication module to control the working state of the target lamp based on the wireless communication module, wherein the control signal includes at least the first control signal.
3. The control method of the target lamp according to claim 1, characterized in that: In the case where the device control panel includes a plurality of buttons, in the process of obtaining a first correspondence between a button operation preset for the device control panel and a control signal, the method further includes: Obtaining a preset key sequence of the plurality of keys and a key mode of each of the plurality of keys; The corresponding target control signal is set according to the key sequence of the multiple keys and the key mode of each key in the multiple keys.
4. The control method of the target lamp according to claim 3, characterized in that: Setting a corresponding target control signal according to the key sequence of the plurality of keys and the key mode of each key in the plurality of keys includes: Acquire, from the key pressing mode of each key among the multiple keys, the key type of each key among the multiple keys and the number of key pressings corresponding to the key type; The corresponding target control signal is set according to the key sequence of the multiple keys, the key type of each key in the multiple keys, and the key press count corresponding to the key type.
5. The method for controlling a target lamp according to claim 1, wherein: After obtaining a first correspondence between a key operation and a control signal preset for the device control panel, the method further includes: When the mobile terminal of the target object receives a prompt message, the target object receives a setting instruction through the mobile terminal to update the first correspondence to a second correspondence, wherein the prompt message is used to prompt that the target button on the device control panel has expired, and the second correspondence does not include the button operation corresponding to the target button.
6. The method for controlling a target lamp according to claim 1, wherein: After controlling the working state of the target lamp according to the control signal, the method further includes: In the case of the second control mode, determining a button display mode corresponding to the on / off state of the device switch, wherein the button display mode is a display mode of some or all of the multiple buttons included in the device control panel; Control some or all of the buttons to be displayed according to the button display mode.
7. A method for controlling a target lamp, characterized in that: include: Receiving a key operation on a device control panel by a target object, and determining a control signal corresponding to the key operation, wherein a relay is provided in the device control panel, and the relay is connected to the target lamp, and the target lamp is a smart lamp remotely controlled by a wireless gateway; Sending the control signal to the relay, and controlling the relay to be in an on-off state corresponding to the control signal, wherein the on-off state includes at least one of the following: an off state and an on state; Controlling the working state of the target lamp according to the on-off state of the relay; Determining the control signal corresponding to the key operation includes: obtaining a first correspondence between the key operation and the control signal pre-set for the device control panel; and obtaining the control signal corresponding to the key operation of the device control panel by the target object based on the first correspondence; Among them, obtaining the first correspondence between the key operation and the control signal pre-set for the device control panel includes: when the wireless gateway corresponding to the Bluetooth module of the device control panel is in normal use, controlling the relay of the device control panel to remain in the on state according to the control signal corresponding to the key operation of the target object on the device control panel, and supplying power to the target lamp, so that the target object sets the first correspondence through the mobile terminal.
8. The method for controlling a target lamp according to claim 7, wherein: Controlling the working state of the target lamp according to the on / off state of the relay includes: When it is determined that the second control signal corresponding to the key operation indicates that the on / off state of the relay is the on state, controlling the working state of the target lamp to be turned on; In a case where it is determined that the third control signal corresponding to the key operation indicates that the on / off state of the relay is the off state, the working state of the target lamp is controlled to be off.
9. A device control panel, characterized in that: For executing the method according to any one of claims 1 to 6, comprising: A wireless communication module, configured to control the operating state of the target lamp according to the control signal in a first control mode; A device switch, configured to control the operating state of the target lamp according to the control signal in a second control mode; The control mode corresponding to the device control panel includes at least one of the following: the first control mode, the second control mode; The device control panel is used to determine a control signal corresponding to a key operation of a target object, wherein determining the control signal corresponding to the key operation includes: obtaining a first correspondence between a key operation and a control signal pre-set for the device control panel; obtaining a control signal corresponding to the key operation of the device control panel by the target object based on the first correspondence; obtaining the first correspondence between the key operation and the control signal pre-set for the device control panel includes: when a wireless gateway corresponding to a Bluetooth module of the device control panel is in normal use, controlling a relay of the device control panel to remain in an on state according to the control signal corresponding to the key operation of the device control panel by the target object, and supplying power to the target lamp, so that the target object sets the first correspondence through a mobile terminal; The device control panel is also used to control the working state of the target lamp through the first control mode and the second control mode when the network is normal, and to control the working state of the target lamp through the second control mode when the network fails. The first control mode represents a wireless control mode, and the second control mode represents a wired control mode.
10. A device control panel, characterized in that: For executing the method according to any one of claims 7 to 8, comprising: A Bluetooth module is used to determine a control signal corresponding to a key operation on a device control panel by a target object, and send the control signal to a wireless gateway or relay corresponding to the control signal; The relay is connected to the Bluetooth module and the target lamp, and is used to determine the on / off state of the relay corresponding to the control signal, and control the working state of the target lamp according to the on / off state of the relay, wherein the on / off state includes at least one of the following: an off state and an on state; The Bluetooth module is also used to obtain a first correspondence between the key operation and the control signal pre-set for the device control panel; based on the first correspondence, obtain the control signal corresponding to the key operation of the device control panel by the target object; wherein, obtaining the first correspondence between the key operation and the control signal pre-set for the device control panel includes: when the wireless gateway corresponding to the Bluetooth module of the device control panel is in normal use, controlling the relay of the device control panel to remain in the on state according to the control signal corresponding to the key operation of the device control panel by the target object, and supplying power to the target lamp, so that the target object sets the first correspondence through the mobile terminal.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 6, or the method described in any one of claims 7 to 8 when the program is executed.
12. 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 execute the method described in any one of claims 1 to 6, or the method described in any one of claims 7 to 8, through the computer program.
Citation Information
Patent Citations
Intelligent control panel, intelligent home system and control method
CN109752967A
DALI software-configuration-free control panel
CN110769570A
Load control system convenient for flexible wiring, load system and guest room control system
CN111246640A
Switch, electronic equipment control system, switch control method and storage medium
CN112543539A
Intelligent switch control method, intelligent switch control device and storage medium
CN113419436A