Load equipment control method, device and system, electronic equipment and storage medium

By keeping the contacts normally closed in the on-off device of the smart home device, sending wireless control instructions to the load device and repeatedly sending the commands when the failure is sent, the problem of the load device being unable to remotely control after the power is disconnected, ensuring that the device is always in the Controlled state improves user experience.

CN119002354APending Publication Date: 2024-11-22SHENZHEN LUMIUNITED TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411100573.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2020-09-24
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The load devices of existing smart home devices cannot be remotely controlled when power is disconnected, causing the device to be offline and uncontrolled, causing trouble to users.

Method used

By keeping the normally closed state at the contacts of the on-off device, wireless control instructions are sent to the load device to ensure that the device is in a controlled state of remote control and repeated sending when the command fails to ensure successful control.

Benefits of technology

Avoiding the load device being offline after disconnecting power, ensuring that it is always in a controlled state of remote control, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119002354A_ABST
    Figure CN119002354A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a load equipment control method, device and system, electronic equipment and a computer storage medium. The electronic equipment directly controls the load equipment according to the control instruction under the condition that the contact of the on-off device is closed, and the contact of the on-off device can be kept in a normally closed state by shielding the control function of the control instruction on closing or opening of the contact of the on-off device of the electronic equipment, so that the situation that the load equipment cannot be normally closed when the load equipment is controlled to be closed is avoided. The contact of the on-off device of the electronic equipment is disconnected, so that the load equipment is in an off-line uncontrolled state after being closed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic circuit technology, and in particular to a load device control method, device and system, electronic device and computer-readable storage medium. Background Art

[0002] Smart home is the trend of information society. Existing smart home devices generally use remote control technology. All smart home devices are connected to the same gateway or router through panel switches to realize networking functions for remote control. The buttons of the panel switches also support users to manually turn on or off offline.

[0003] However, the known panel switch and the corresponding load device are usually connected in series in the circuit. When the panel switch is disconnected by the button operation itself, the power supply of the load device will be cut off, causing the load device to be offline and uncontrollable. At this time, remote control cannot be enabled, which causes trouble to the user. Summary of the invention

[0004] In order to solve the existing technical problems, the present application provides a load equipment control method, device and system, electronic device and computer-readable storage medium that can be more intelligent and ensure that the load equipment can be in a controlled state.

[0005] To achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a load device control method, which is applied to an electronic device, including:

[0007] Get control instructions;

[0008] When the contacts of the on-off device are closed, a wireless instruction to control the target load device is sent to one or more target load devices according to the control instruction; during this process, the contacts of the on-off device are always closed.

[0009] In a second aspect, an embodiment of the present application further provides a load device control device, including:

[0010] An acquisition module, used for acquiring control instructions;

[0011] The sending module is used to send wireless instructions to control the one or more target load devices according to the control instructions when the contacts of the on-off device are closed; during this process, the contacts of the on-off device are always closed.

[0012] In the above embodiment, when the electronic device obtains the control instruction, when the contacts of the on-off device are closed, the load device is directly controlled according to the control instruction, and the control function of the control instruction on the closing or opening of the contacts of the on-off device of the electronic device is shielded, so that the contacts of the on-off device can be kept in a normally closed state, thereby avoiding the situation where the contacts of the on-off device of the electronic device are disconnected when the load device is controlled to be turned off, causing the load device to be in an offline and uncontrolled state after being turned off, thereby ensuring that the load device can be in a controlled state under remote control.

[0013] In a third aspect, the present application further provides a load device control method, comprising:

[0014] Sending a wireless instruction to at least one load device to control the load device;

[0015] Determining whether the action performed by the load device according to the wireless instruction is successful;

[0016] When the action executed by the load device fails and the current number of failures is within a set range, return to the step of sending a wireless instruction to control the load device to at least one load device.

[0017] In a fourth aspect, the present application further provides a load device control device, comprising:

[0018] An instruction module, used for sending a wireless instruction to at least one load device to control the load device;

[0019] An action module, used to determine whether the action performed by the load device according to the wireless instruction is successful;

[0020] The return module is used to return to the step of sending a wireless instruction to control the load device to at least one load device when the action executed by the load device fails and the current number of failures is within a set range.

[0021] In the above embodiment, the contacts of the on-off device of the electronic device can be kept in a normally closed state, and the load device can be controlled to perform corresponding actions by sending wireless instructions to the load device to control the load device. The electronic device monitors whether the load device successfully performs the action after receiving the wireless instruction. When the action fails, the wireless instruction can be repeatedly sent to the load device within a set range to ensure that the load device can be accurately controlled by the electronic device.

[0022] In a fifth aspect, an embodiment of the present application further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein the computer program, when executed by the processor, implements the load device control method described in any embodiment of the present application.

[0023] In a sixth aspect, an embodiment of the present application further provides a load device control system, comprising a load device and the electronic device described in any embodiment of the present application, wherein a communication connection is established between the electronic device and the load device, and the electronic device is used to correspondingly control at least one of the load devices.

[0024] In the seventh aspect, an embodiment of the present application also provides a load device control system, comprising the electronic device, gateway and terminal device described in any embodiment of the present application, wherein a communication connection is established between the electronic device and the terminal device through the gateway, and the electronic device is used to control at least one load device accordingly.

[0025] In an eighth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the load device control method described in any embodiment of the present application is implemented.

[0026] The electronic device, load device control system and computer-readable storage medium provided in the embodiments of the present application are respectively used to implement the load device control method provided in the embodiments of the present application, and have the same technical effects as the load device control method. To avoid repetition, they will not be described here. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 This is a schematic diagram of a load device control system in an embodiment of the present application;

[0028] Figure 2 This is a schematic diagram of optional application scenarios of the load device control system in the embodiment of the present application;

[0029] Figure 3 This is a flow chart of the overload device control method in an embodiment of the present application;

[0030] Figure 4 This is a flow chart of a load device control method in another embodiment of the present application;

[0031] Figure 5 This is a flow chart of a load device control method in another embodiment of the present application;

[0032] Figure 6 This is a flow chart of a load device control method in yet another embodiment of the present application;

[0033] Figure 7 This is a schematic diagram of a load device control device in an embodiment of the present application;

[0034] Figure 8 This is a flow chart of a load device control method in another embodiment of the present application;

[0035] Fig. 9 This is a flow chart of a load device control method in another embodiment of the present application;

[0036] Fig.10 This is a schematic diagram of a load device control device in another embodiment of the present application;

[0037] Fig.11 is a schematic diagram of an electronic device in an embodiment of the present application;

[0038] Fig.12 is a schematic diagram of an electronic device in another embodiment of the present application;

[0039] Fig.13 is a flow chart of an overload device control method in an optional specific example;

[0040] Fig.14 The flowchart of the overload device control method in another optional specific example. DETAILED DESCRIPTION

[0041] The technical solution of the present application is further elaborated in detail below in conjunction with the accompanying drawings and specific embodiments of the specification.

[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit the implementation of this application. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0043] In the description of the present application, it should be understood that the terms "center", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating positions or positional relationships, are based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific position, be constructed and operated in a specific position, and therefore cannot be understood as a limitation on the present application. In the description of the present application, unless otherwise specified, "multiple" means two or more.

[0044] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0045] See also Figure 1 , an electronic device 10 provided in an embodiment of the present application, comprising a switch device 12, a processor 13, a memory (not shown) and a local button 11. The electronic device 10 is used to control at least one load device 30, and the contact of the switch device 12 can be in a normally closed state to keep the load device 40 in a normal power supply state. The memory stores a computer program, and the processor 13 performs relevant control actions when executing the computer program stored in the memory. When the electronic device performs control operations such as opening or closing, adjusting, etc. on the load device 40, the load device 30 can be controlled by operating the local button 11 or remotely operating the load device 30 through the terminal device 20. The processor 13 obtains the control instruction for the load device 30, determines whether the contact of the switch device 12 of the electronic device 10 is currently closed, and when it is determined that the contact of the switch device 12 is closed, sends a wireless instruction for controlling the target load device 30 to the target load device 30 according to the control instruction, so as to control the target load device 30 to be opened or closed accordingly. The processor 13 obtains the current state of the target load device 30 after executing the action according to the wireless instruction and reports it to the cloud, and / or reports the current state of the electronic device 10 to the cloud. Among them, the target load device 30 refers to the load device corresponding to the control instruction currently issued, and the target load device 30 and the electronic device 10 are under the same gateway. The processor 13 can be a main controller including an analog to digital converter (ADC), such as a microcontroller unit (MCU). The electronic device 10 can be various types of switches and socket products, and the on-off device 12 is a key component for the electronic device 10 to achieve closing or disconnection. For example, the on-off device 12 can be a relay in a typical embodiment.

[0046] Optionally, the electronic device 10 is a panel switch. The load device 30 may be one or more, each connected in series with the panel switch in the control loop. Figure 2, is a circuit diagram of the panel switch corresponding to the control of two load devices. Optionally, the local button 11 may be an elastic mechanical switch, and the control of the load device by operating the local button 11 may be that the processor 13 detects the elastic mechanical switch, and when the current state of the corresponding load device 30 is the on state when the pressing operation of the elastic mechanical switch is detected, the processor 13 obtains the closing control instruction according to the pressing operation; when the current state of the corresponding load device 30 is the off state when the pressing operation of the elastic mechanical switch is detected, the processor 13 obtains the opening control instruction according to the pressing operation. The remote operation of the load device through the terminal device 20 may be that an application client for remotely controlling the load device 30 is installed on the terminal device 20, and the terminal device 20 detects the touch operation of the on button or the off button in the control interface of the application, and sends a control instruction to the processor 13 of the panel switch according to the touch operation.

[0047] In the above embodiment, the electronic device 10 makes the control instructions for the load device and the closing or opening control of the contacts of the on-off device 12 of the electronic device 10 independent of each other, so that the contacts of the on-off device 12 can remain in a normally closed state, thereby avoiding the situation where the contacts of the on-off device 12 of the electronic device 10 are disconnected when the load device 30 is controlled to be turned off, causing the load device to be in an offline and uncontrolled state after being turned off.

[0048] Figure 3 It is an Internet of Things system composed of electronic devices and gateway 53, server 52, terminal device 51, etc. The Internet of Things system includes: terminal device 51, server 22, gateway 53, electronic device 54 and router 55. Among them, terminal device 51 can be any device with communication and storage functions, such as: smart phone, desktop computer, laptop computer, tablet computer or other intelligent communication device with network connection function. Server 52 can be a network access server, database server, cloud server, etc. Optionally, gateway 53 can be built based on ZigBee protocol, and electronic device 54 can be a device pre-added to gateway 53. For example, electronic device 54 can be a device in the kit to which gateway 53 belongs when gateway 53 leaves the factory; it can also be a device connected to gateway 53 through user operation later.

[0049] Optionally, a client capable of managing the smart home is installed in the terminal device 51 , and the client may be an application client (such as a mobile phone APP) or a web client, which is not limited here.

[0050] Optionally, the electronic device 54 may establish a network connection with the gateway 53 based on the ZigBee protocol, thereby joining the ZigBee network.

[0051] The gateway 53 and the terminal device 51 can be connected to the router 55 and connected to the Ethernet through the router 55. The router 55 can access the server through a wired or wireless communication connection. For example, the gateway 53 and the terminal device 51 can store the acquired information in the server 52. Optionally, the terminal device 51 can also establish a network connection with the server 52 through 2G / 3G / 4G / 5G, WiFi, etc., so as to obtain data sent by the server 52.

[0052] Optional, such as Figure 3 The LAN path shown indicates that the terminal device 51, the router 55, the gateway 53 and the electronic device 54 are in the same LAN, and the WAN path indicates that the electronic device 54, the gateway 53, the router 55 and the cloud 52 are in the same WAN. When the terminal device 51, the router 55 and the gateway 53 are in the same LAN, the terminal device 51 can Figure 3 The local area network path shown interacts with the gateway 53 and the electronic device 54 connected to the gateway 53; it can also be communicated through Figure 3 The wide area network path shown interacts with the gateway 53 and the electronic device 54 connected to the gateway 53. When the terminal device 51 is not in the same local area network as the router 55 and the gateway 53, the terminal device 51 can communicate with the gateway 53 through the following methods: Figure 3 The wide area network path shown interacts with the gateway 53 and the electronic device 54 connected to the gateway 53. The Internet of Things system can further control the opening or closing of the Internet of Things load devices within the local area network or connected thereto through the electronic device 54.

[0053] The load devices may include, but are not limited to, smart home products such as smart lamps, automatic curtains, and air conditioners.

[0054] See also Figure 4 The present application embodiment provides a load device control method, which is applied to Figure 1 The electronic device and the load device control method shown include but are not limited to S101, S103 and S105, which are specifically described as follows:

[0055] S101, obtaining control instructions.

[0056] The electronic device obtaining a control instruction may mean that the electronic device detects a user's touch operation on a local button, and obtains a control instruction for controlling the load device based on the touch operation; or the terminal device detects a touch operation of an on button or a off button in the control interface of an application, and sends a control instruction to the electronic device accordingly based on the touch operation, and the electronic device obtains the control instruction from the terminal device.

[0057] Optionally, the electronic device may include a first working mode and a second working mode. In the first working mode, the processor detects a touch operation on a local button, obtains a first control instruction for controlling the load device to turn on or off according to the touch operation, and sends a wireless instruction for controlling the load device to turn on or off accordingly to the corresponding load device according to the first control instruction; in the second working mode, the processor detects a touch operation on a local button, obtains a second control instruction for controlling the contact of the on-off device to close or open according to the touch operation, and controls the contact of the on-off device to close or open accordingly according to the second control instruction. In this embodiment, before obtaining the control instruction, it also includes: obtaining a mode selection instruction, and switching to the target working mode according to the mode selection instruction.

[0058] As another optional implementation, the electronic device can generate different control instructions according to different operations on local buttons. The processor detects a single-click touch operation on the local button, obtains a first control instruction for controlling the load device to turn on or off according to the single-click touch operation, and sends a wireless instruction to the corresponding load device to control the load device to turn on or off according to the first control instruction; the processor detects a double-click touch operation on the local button, obtains a second control instruction for controlling the closing or opening of the contacts of the on-off device according to the double-click touch operation, and controls the closing or opening of the contacts of the on-off device according to the second control instruction.

[0059] Optionally, the terminal device may provide a first group of on and off buttons for controlling the on or off of the load device, and a second group of on and off buttons for controlling the closing or opening of the contacts of the on-off device, respectively, through the control interface of the application program. The terminal device receives a user's touch operation on the first group of on and off buttons through the control interface of the application program, sends a first control instruction for controlling the on or off of the load device to the electronic device according to the touch operation, and the electronic device obtains the first control instruction from the terminal device; the terminal device receives a user's touch operation on the second group of on and off buttons through the control interface of the application program, sends a second control instruction for controlling the closing or opening of the contacts of the on-off device to the electronic device according to the touch operation, and the electronic device obtains the second control instruction from the terminal device.

[0060] S105, when the contacts of the on-off device are closed, sending a wireless instruction to control the one or more target load devices to the one or more target load devices according to the control instruction; during this process, the contacts of the on-off device are always closed.

[0061] When the electronic device determines that the contacts of the on-off device are closed, the electronic device sends a wireless instruction to control the target load device according to the control instruction. Optionally, the control instruction for controlling the load device is independent of the control of the contacts of the on-off device, and the contacts of the on-off device can be in a normally closed state to keep the load device in a continuously controlled state. The control instruction refers to the control instruction received by the electronic device from the terminal device or the control instruction obtained according to the touch operation of the local button. The target load device refers to the load device corresponding to the control instruction and associated with the electronic device. The target load device and the electronic device are under the same gateway, and the wireless instruction for controlling the corresponding on or off of the target load device can be a zigbee control command sent by the electronic device to the target load device. Among them, the wireless instruction is used to control the target load device 30 to change the device state. For example, the wireless instruction can be a wireless instruction used to control the target load device 30 to turn on or off accordingly, or it can be a wireless instruction used to control the target load device 30 to change the current device state. For example, when the target load device 30 is a smart light, the wireless instruction can be a dimming instruction for adjusting the brightness; when the target load device 30 is a curtain, the wireless instruction can be a wireless instruction for adjusting the opening and closing ratio of the curtain.

[0062] Among them, the process refers to the process in which the electronic device obtains the control instruction and controls the target load device according to the control instruction until the control result of the target load device is obtained. The determination of the process mainly includes two aspects. The first aspect is to take the example of the successful opening or closing of the target load device according to the control instruction. The process refers to the process in which the electronic device obtains the control instruction and sends a wireless instruction to the target load device to control the opening or closing of one or more target load devices, and the target load device completes the opening or closing action according to the wireless instruction. In the second aspect, taking the failure of controlling the target load device to be turned on or off according to the control instruction as an example, three situations are included: Situation 1, the process refers to the process in which, after the electronic device obtains the control instruction, it sends a wireless instruction to the target load device to control the one or more target load devices to be turned on or off accordingly, and the target load device fails to successfully complete the corresponding opening or closing action according to the wireless instruction; Situation 2, if the target load device fails to successfully complete the corresponding opening or closing action according to the wireless instruction, before the control result, it also includes repeatedly sending the wireless instruction to the target load device according to the preset requirements, and the wireless instruction is sent multiple times so that the target load device successfully completes the corresponding opening or closing action, then the process refers to the process in which the electronic device sends the wireless instruction to the target load device multiple times after receiving the control instruction. The device sends a wireless instruction to control the corresponding opening or closing of the one or more target load devices until the target load device completes the opening or closing action according to the multiple wireless instructions; or situation 3, if the target load device fails to successfully complete the control result of the corresponding opening or closing action according to the wireless instruction, it also includes repeatedly sending wireless instructions to the target load device according to the preset requirements, and the multiple sending of wireless instructions still fails to make the target load device successfully complete the corresponding opening or closing action, then the process refers to the process that the electronic device sends the wireless instruction to control the corresponding opening or closing of the one or more target load devices to the target load device multiple times after receiving the control instruction, and the target load device fails to successfully complete the corresponding opening or closing action according to the multiple wireless instructions. For situation 3 of the second aspect, after the process, the electronic device controls the contacts of the on-off device to be disconnected according to the control instruction.

[0063] Optionally, the electronic device may include multiple control channels, and each control channel may include one or more load devices, and the on / off control instruction received by the electronic device may be for the load device corresponding to one of the control channels. For example, the electronic device includes three local buttons, and the load devices associated with the first local button are load device 1 and load device 2; the load device associated with the second local button is load device 3; and the load devices associated with the third local button are load device 4, load device 5, and load device 6. The electronic device may obtain the on / off control instruction based on the pressing operation of the third local button, and when the contacts of the on / off device are closed, send the corresponding on or off control command to the target load devices associated with the third local button, i.e., load devices 4, load devices 5, and load devices 6, according to the on / off control instruction.

[0064] Optionally, the electronic device may also include one or more load devices under unified control. After receiving the control instruction, the electronic device sends a corresponding opening or closing control command to the target load device, that is, all the load devices associated with the electronic device, according to the control instruction. For example, the electronic device includes a local button, and the load devices corresponding to the local button include load device 1, load device 2, load device 3, load device 4, load device 5, and load device 6. The electronic device can obtain the control instruction for controlling the opening or closing of the load device according to the touch operation of the local button, and send the corresponding opening or closing control command to the target load device, that is, load device 1, load device 2, load device 3, load device 4, load device 5, and load device 6 according to the control instruction when the contacts of the on-off device are closed. As another optional specific example, the electronic device is a double-button panel switch, including a local button A and a local button B, the load devices corresponding to the local button A include load device 1, and the load devices corresponding to the local button B include load device 2. The electronic device can obtain a control instruction to control the opening or closing of the load device 1 according to the touch operation of the local button A, and when the contacts of the on-off device are closed, send a corresponding opening or closing control command to the target load device, i.e., load device 1, according to the control instruction.

[0065] When the contact of the on-off device is closed, the wireless instruction for controlling the one or more target load devices to be turned on or off is sent to the one or more target load devices according to the control instruction in at least one of the following ways:

[0066] In some embodiments, when the electronic device and the target load device are in the same local area network, the electronic device directly sends a wireless instruction to one or more target load devices according to the control instruction. For example, the electronic device is a smart switch and the target load device is a lamp. The smart switch directly sends a wireless instruction to the lamp to control its on or off according to the control instruction, that is, the sending path is: smart switch → lamp. In some implementations, the electronic device and the target load device can communicate with the gateway under the same local area network. The electronic device first sends a wireless instruction to control one or more target load devices to turn on or off according to the control instruction to the gateway under the same local area network. After receiving the wireless instruction, the gateway under the same local area network sends the wireless instruction to the corresponding target load device. For example, the electronic device is a smart switch and the target load device is a lamp. The smart switch first sends the wireless instruction to the gateway under the same local area network, and the gateway under the same local area network then sends the wireless instruction to the lamp, that is, the sending path is: smart switch → gateway → lamp.

[0067] In some embodiments, when the electronic device and the target load device are in different local area networks, the electronic device is in a first local area network, the first gateway is used in the first local area network, the target load device is in a second local area network, the second gateway is used in the second local area network, the first gateway and the second gateway can communicate with each other, the electronic device first sends a wireless instruction for controlling one or more target load devices to be turned on or off to the first gateway, the first gateway sends the wireless instruction to the second gateway, and the second gateway sends the wireless instruction to the target load device. For example, the first gateway is gateway A, the second gateway is gateway B, the electronic device is a smart switch, and the target load device is a lamp. The smart switch first sends the wireless instruction to gateway A, gateway A sends the wireless instruction to gateway B, and gateway B sends the wireless instruction to the lamp, that is, the sending path is: smart switch → gateway A → gateway B → lamp. In some implementations, the first gateway and the second gateway can communicate through a cloud server, the electronic device first sends a wireless instruction for controlling one or more target load devices to be turned on or off to the first gateway, the first gateway sends the wireless instruction to the cloud server, the cloud server sends the wireless instruction to the second gateway, and the second gateway sends the wireless instruction to the lamp. For example, the smart switch first sends the wireless command to gateway A, gateway A sends the wireless command to the cloud server, the cloud server sends the wireless command to gateway B, and gateway B sends the wireless command to the light. That is, the sending path is smart switch → gateway A → cloud server → gateway B → light.

[0068] In some embodiments, when the electronic device and the target load device communicate with the same gateway using different communication protocols, the electronic device first sends the instruction for controlling one or more target load devices to be turned on or off to the same gateway according to the control instruction, and after receiving the instruction, the same gateway sends the instruction to the corresponding target load device. For example, the electronic device is a smart switch, the target load device is a lamp, the wireless communication protocol of the smart switch is WiFi / Ethernet, and the wireless communication protocol of the lamp is ZigBee. The smart switch first sends the instruction to the same gateway, and the same gateway then sends the instruction to the lamp, that is, the sending path is: smart switch → gateway → lamp. In some implementations, the electronic device first sends the instruction for controlling one or more target load devices to be turned on or off to the router according to the control instruction, the router sends the instruction to the same gateway, and the same gateway sends the wireless instruction to the target load device. For example, the smart switch first sends the instruction to the router, the router sends the instruction to the same gateway, and the same gateway then sends the wireless instruction to the lamp, that is, the sending path is: smart switch → router → gateway → lamp. It is understandable that in the entire instruction sending path, instructions for all nodes may be sent wirelessly, or instructions for some nodes may be sent wirelessly, and instructions for other nodes may be sent via wired means such as Ethernet.

[0069] In some embodiments, when the electronic device and the target load device are in a smart home network indicating that each device can be interconnected, the communication path between the electronic device and the target load device can be adaptively selected according to the network conditions of the smart home network, the status of each device in the smart home network, etc., and the electronic device sends the wireless instruction to the target load device through the selected communication path. Wherein the interconnection between each device means that each device can communicate with each other. For example, the smart home network is a Matter network established based on the Matter protocol. For example, there are smart switches, lights, device A, and device B in the smart home network, and these devices can communicate with each other. When device A is in an idle state and device B is in a busy state, the sending path of the wireless instruction is configured as smart switch→device A→light. When device B is in an idle state and device A is in a busy state, the sending path of the wireless instruction is configured as smart switch→device B→light. Therefore, according to the status of each device and the network conditions, a suitable communication path can be adaptively selected to send the wireless instruction to the target load device.

[0070] In the above embodiment, when the electronic device obtains the control instruction, it determines whether the contacts of the on-off device of the electronic device are currently closed. When the contacts of the on-off device are closed, the load device is directly controlled according to the control instruction, and the control function of the control instruction on the closing or opening of the contacts of the on-off device of the electronic device is shielded, so that the contacts of the on-off device can be kept in a normally closed state, thereby avoiding the situation where the contacts of the on-off device of the electronic device are disconnected when the load device is controlled to be turned off, causing the load device to be in an offline and uncontrolled state after being turned off, thereby ensuring that the load device can be in a controlled state under remote control.

[0071] In some embodiments, see Figure 5 , before S105 , it also includes: S103 , judging whether the contact of the on-off device of the electronic device is currently closed.

[0072] After receiving the control instruction, the electronic device detects whether the contacts of the on-off device are closed. If the contacts of the on-off device are currently closed, the load device is in a power supply state and thus in a controlled state. The electronic device determines whether the contacts of the on-off device are currently closed to ensure that the subsequent control steps of the load device can be executed. Optionally, whether the contacts of the on-off device of the electronic device are closed can also be determined by the electronic device based on the current state of the contacts of the on-off device stored internally, or by the on-off device actively sending information that can characterize the current state of the contacts to the electronic device.

[0073] In some embodiments, the load device control method further includes:

[0074] S104, when it is determined that the contacts of the on-off device are disconnected, controlling the contacts of the on-off device to close.

[0075] The electronic device obtains a control instruction, and before sending a control command to the target load device to control the target load device to turn on or off accordingly according to the control instruction, detects whether the contacts of the on-off device are currently closed. When it is determined that the contacts of the on-off device are disconnected, the contacts of the on-off device are controlled to close to ensure that the target load device is in a state of maintaining power supply and being controlled.

[0076] In this embodiment, during the process of the electronic device controlling the target load device according to the control instruction, by detecting the state of the contacts of the on-off device, when the contacts of the on-off device are disconnected, the contacts of the on-off device are first controlled to close, so as to avoid the on-off device of the electronic device being disconnected, resulting in the power supply of the target load device being cut off and being in an offline state, remote control of the target load device can still be achieved.

[0077] In some embodiments, the step S101, obtaining a control instruction, includes: receiving a pressing instruction of a mechanical switch;

[0078] The S105, when the contacts of the on-off device are closed, sends a wireless instruction to one or more target load devices according to the control instruction to control the one or more target load devices to turn on or off accordingly, including: when it is determined that the current mode is the wireless mode, controlling the contacts of the on-off device to close according to the control instruction, and after the contacts of the on-off device are closed, sending a wireless instruction to one or more target load devices according to the control instruction to control the one or more target load devices to turn on or off accordingly.

[0079] When the electronic device detects a pressing operation on a local button, it receives a pressing instruction from the mechanical switch. The wireless mode means that the electronic device establishes a communication connection with the smart load device through the gateway. The electronic device can communicate data with the smart load device via the gateway or directly with the smart load device. After the electronic device receives the pressing instruction from the mechanical switch, it first controls the closure of the contacts of the on-off device according to the control instruction to ensure that the target load device is switched to a controlled state, and then sends a wireless instruction to the target load device according to the control instruction to control the target load device to turn on or off accordingly, so that the control of the target load device is not affected by the disconnection of the contacts of the on-off device, ensuring that it can be turned on or off in a timely and accurate manner.

[0080] In some embodiments, sending a wireless instruction to the target load device according to the control instruction to control the target load device to be turned on or off accordingly includes:

[0081] Obtaining the current working status of the target load device;

[0082] A wireless instruction opposite to the current working state of the target load device is generated according to the current working state of the target load device.

[0083] Among them, the control instruction may refer to an instruction for controlling the target load device sent by the terminal device to the electronic device according to the user's operation on the touch button, or may refer to an instruction obtained by the electronic device according to the user's touch operation on the local button. Optionally, the local button may be an elastic mechanical switch, or the touch button on the terminal device may be a single control button. The user obtains a control instruction each time the local button is pressed or the touch button is touched. After receiving the control instruction, the electronic device generates a wireless instruction opposite to the current working state of the target load device according to the current working state of the target load device. For example, if the current working state of the load device is on, after receiving the control instruction, the electronic device generates a wireless instruction for controlling the target load device to shut down.

[0084] In this embodiment, by intelligently determining whether the control instruction is an on instruction or a off instruction according to the current working state of the target load device, the number of buttons for controlling the load device can be reduced and the control operation can be simplified.

[0085] In some embodiments, S105, when the contact of the on-off device is closed, after sending a wireless instruction to control the target load device to be turned on or off accordingly according to the control instruction, the method further includes:

[0086] S107, obtaining the current state of the target load device after executing the action according to the wireless instruction, and reporting the current state of the target load device after executing the action according to the wireless instruction to the cloud, and / or reporting the current state of the electronic device to the cloud.

[0087] The target load device receives the wireless instruction sent by the electronic device, and performs corresponding actions according to the wireless instruction. Optionally, each target load device is usually controlled in multiple ways, such as being controlled by the operation buttons of the target load device itself, being controlled by the local buttons of the electronic device, and being remotely controlled by the terminal device. In this way, when there are multiple target load devices associated with the electronic device, the current states of the multiple target load devices may be inconsistent. When the electronic device obtains the control instruction and determines that the contacts of the on-off device are closed, it sends a wireless instruction of opening or closing to the target load device in accordance with the control instruction. The target load device switches or does not switch according to its own current state according to the wireless instruction of opening or closing, ensuring that the current state of the target load device after executing the action according to the wireless instruction is consistent with the target control state of the wireless instruction.

[0088] The target control state of the control instruction may be determined in the following manner:

[0089] First, the control interface of the application of the terminal device includes an on button for controlling the on of the load device, and a off button for controlling the off of the load device. By sending an on control instruction or a off control instruction according to the user's touch operation on the on button or the off button, the electronic device sends a wireless instruction for the target control state to be on, or a wireless instruction for the target control state to be off, to the target load device according to the control instruction.

[0090] Second, the local button can be an elastic mechanical switch, or the touch button on the terminal device can be a single control button. Each time the user presses the local button or touches the touch button, a control instruction is obtained. Each time the electronic device receives the control instruction, it generates a wireless instruction opposite to the current working state according to its own current working state, that is, a wireless instruction whose target control state is opposite to the current working state of the electronic device is generated. Take the target load devices corresponding to the electronic device as an example, including load device 1, load device 2 and load device 3, wherein the current state of load device 1 is the on state, and the current states of load devices 2 and 3 are the off states. At this time, the current state of the electronic device is the on state. When the electronic device obtains a control instruction, when it is determined that the contact of the on-off device is closed, according to the control instruction and its own working state is the on state, a wireless instruction of closing is uniformly sent to the target load devices, wherein load device 1 switches from the on state to the off state according to the wireless instruction, and load devices 2 and 3 do not switch according to the wireless instruction, ensuring that the current state of the target load devices after executing the action according to the wireless instruction is the off state.

[0091] Third, the local button can be an elastic mechanical switch, or the touch button on the terminal device can be a single control button. Each time the user presses the local button or touches the touch button, a control instruction is obtained. Each time the electronic device receives the control instruction, it generates a wireless instruction opposite to the current working state of the target load device according to the current working state of the target load device, that is, it generates a wireless instruction whose target control state is opposite to the current working state of the target load device. Still taking the target load devices corresponding to the electronic device as an example, including load device 1, load device 2 and load device 3, wherein the current state of load device 1 is the on state, and the current states of load devices 2 and 3 are the off states, at this time, when the electronic device obtains a control instruction, in the case of determining that the contacts of the on-off device are closed, the wireless instruction for controlling the switching of the target load devices is uniformly sent to the target load devices according to the control instruction, wherein load device 1 switches from the on state to the off state according to the wireless instruction, and load devices 2 and 3 switch to the on state respectively according to the wireless instruction, to ensure that the current state of the target load devices after executing the action according to the wireless instruction is opposite to the previous state.

[0092] The current state of the electronic device can be consistent with the current state of the corresponding load device. When the electronic device corresponds to more than one load device and the states of the multiple load devices are inconsistent, when any one of the load devices is in the on state, the current state of the electronic device is the on state, otherwise the current state of the electronic device is the off state.

[0093] In the above embodiment, when the electronic device obtains the control instruction, it determines whether the contacts of the on-off device of the electronic device are currently closed. When the contacts of the on-off device are closed, the load device is directly controlled according to the control instruction, and the control function of the control instruction on the closing or disconnecting of the contacts of the on-off device of the electronic device is shielded, so that the contacts of the on-off device can remain in a normally closed state, so as to avoid the situation where the contacts of the on-off device of the electronic device are disconnected when the load device is controlled to be turned off, causing the load device to be in an offline and uncontrolled state after being turned off, thereby ensuring that the load device can be in a remotely controlled controlled state; the contacts of the on-off device of the electronic device can remain in a normally closed state, and after the electronic device controls the load device, the current state of the load device and / or the current state of the electronic device itself is obtained and reported to the cloud, so as to ensure that the current state of the load device can be accurately obtained before controlling the load device, thereby being more intelligent and ensuring that the load device is accurately in a remotely controlled state.

[0094] Optional, see Figure 6 , when the contact of the on-off device is closed, after sending a wireless instruction to control the target load device to be turned on or off accordingly according to the control instruction, it includes:

[0095] S1061, determining whether the target load device successfully performs a corresponding action according to the wireless instruction;

[0096] S1062, when the target load device fails to execute the corresponding action and the current number of failures is within the set range, return to the step of sending a wireless instruction to the target load device to control the target load device to turn on or off accordingly according to the control instruction.

[0097] The electronic device determines whether the target load device successfully performs the corresponding action according to the wireless instruction. If the target load device fails to perform the corresponding action, it returns to the step of sending the wireless instruction to the target load device according to the control instruction to control the target load device to turn on or off accordingly. This cycle repeats and repeats. By monitoring the execution of the action by the target load device and performing repeated control in the case of unsuccessful execution, the accuracy of the control of the target load device can be improved. By recording the number of times the target load device fails to perform an action, and setting the number of failures within a set range as one of the conditions for repeated control in the case of unsuccessful execution of the action on the target load device, it can avoid excessive cycles or continuous cycles in the event of errors, which can ensure the accuracy of the control of the target load device and improve the control efficiency.

[0098] Taking the setting range of three times as an example, the electronic device determines whether the target load device successfully performs the corresponding action according to the wireless instruction. If unsuccessful, the current number of failures is recorded as one, and the step of sending the wireless instruction to control the target load device to turn on or off according to the control instruction is returned to the target load device, and the wireless instruction to control the target load device to turn on or off is sent to the target load device again; the electronic device again determines whether the target load device successfully performs the corresponding action according to the wireless instruction. If still unsuccessful, the current number of failures is recorded as two, and the step of sending the wireless instruction to control the target load device to turn on or off according to the control instruction is returned to the target load device, and the wireless instruction to control the target load device to turn on or off is sent to the target load device again; this cycle is repeated until the electronic device determines that the target load device successfully performs the corresponding action according to the wireless instruction, or the current number of failures exceeds three.

[0099] Optionally, the step S1061, determining whether the target load device successfully performs a corresponding action according to the wireless instruction, includes:

[0100] receiving a response instruction returned by the target load device according to the wireless instruction, and judging whether the target load device successfully performs a corresponding action according to the wireless instruction according to the response instruction;

[0101] In the case where at least one response instruction returned by the target load device is not received, it is determined that the target load device fails to perform the corresponding action;

[0102] When a response instruction returned by each of the target load devices is received, it is determined that the target load device has successfully executed the corresponding action.

[0103] Among them, the response instruction may refer to a message indicating successful reception returned to the electronic device by the target load device after receiving the wireless instruction sent by the electronic device. Taking the communication between the electronic device and the target load device through Zigbee as an example, the electronic device can send a Zigbee wireless instruction to the target load device, and the target load device returns a Zigbee application layer message confirmation message (ACK) after receiving the wireless instruction. After issuing the wireless instruction, the electronic device determines whether all the target load devices have replied to the response instruction. If all the target load devices have replied to the response instruction, it is considered that the control is successful and the target load device has successfully executed the corresponding action; if any one of all the target load devices has not replied to the response instruction, it means that the current control is unsuccessful and the target load device has failed to execute the corresponding action.

[0104] In some embodiments, when the contact of the on-off device is closed, after sending a wireless instruction to control the target load device to be turned on or off accordingly according to the control instruction, the method includes:

[0105] S1063, when the target load device fails to execute the corresponding action and the current number of failures exceeds a set range, a contact opening instruction is sent to the on-off device to control the contact opening of the on-off device.

[0106] The electronic device determines whether the target load device successfully executes the corresponding action according to the wireless instruction. If the target load device fails to execute the corresponding action, it returns to the step of sending a wireless instruction to the target load device according to the control instruction to control the target load device to turn on or off accordingly. This cycle is repeated. By monitoring the execution of the action by the target load device and repeating the control in the event of unsuccessful execution, the accuracy of the control over the target load device can be improved. By recording the number of times the target load device fails to perform an action, and setting the number of failures within a set range as one of the conditions for repeating the control when the target load device fails to perform an action, it is possible to avoid excessive cycles or continuous cycles in the event of an error. When the number of times the target load device fails to perform the corresponding action exceeds the set range, the contacts of the on-off device are controlled to be disconnected to cut off the power supply to the target load device. At this time, if the current control instruction to the target load device is a closing control instruction, the contacts of the on-off device are controlled to be disconnected, thereby achieving the control goal of closing the target load device; if the control instruction to the target load device is an opening control instruction, the current state of the target load device can be uniformly reset to the closed state by disconnecting the contacts of the on-off device, which is equivalent to automatically repairing the error, ensuring that the electronic device can accurately and effectively control the target load device according to the next control instruction.

[0107] In some embodiments, when the contact of the on-off device is closed, after sending a wireless instruction to control the target load device to be turned on or off accordingly according to the control instruction, the method includes:

[0108] S1064, when the target load device successfully executes the corresponding action, determine the current state of the target load device according to at least one of the following:

[0109] Determine the current state of the target load device according to the control instruction;

[0110] The receiving gateway obtains the current state from the corresponding target load device, and the target load device is determined by the gateway according to the association relationship between the electronic device and the load device;

[0111] Receive the current state sent by the target load device according to the association relationship between the electronic device and the load device.

[0112] There are multiple ways for the electronic device to obtain the current status of the target load device.

[0113] The first method is that when the electronic device determines that the target load device has successfully executed the corresponding action, such as the electronic device sends a zigbee wireless instruction to the target load device according to the control instruction, and the target load device returns an ACK response instruction after receiving the zigbee wireless instruction, when the electronic device receives the ACK response instructions returned by all the target load devices, it means that the target load device has successfully executed the corresponding action. At this time, the current state of the target load device can be determined according to the target control state of the control instruction. If the target control state of the control instruction is on, then according to the control instruction, it is determined that the current state of the target load device is all on; if the target control state of the control instruction is off, then according to the control instruction, it is determined that the current state of the target load device is all off.

[0114] In the second method, the electronic device obtains the current state of the target load device from the gateway. Optionally, the terminal device can obtain the mapping relationship between the electronic device and the load device according to the user's configuration, form an association relationship between the electronic device and the load device, and the terminal device sends the association relationship between the electronic device and the load device to the gateway and stores it. When the gateway receives the current state reported by a certain load device, it sends the current state of the load device to the corresponding electronic device according to the association relationship between the electronic device and the load device. Taking the example that after the user configures the mapping relationship between the electronic device and multiple load devices through the terminal device, the first control corresponds to the associated load device 1 and load device 2; the second control corresponds to the associated load device 3; the third control corresponds to the associated load device 4, load device 5, and load device 6, the gateway stores the association relationship between the electronic device and the load device. When the electronic device sends an instruction command to the target load device, i.e., load device 1 and load device 2, according to the on / off control instruction of the first control, load device 1 and load device 2 perform the action according to the control command and report the current status to the gateway. The gateway obtains the current status of load device 1 and load device 2, and then according to the association relationship between the electronic device and the load device, the electronic device corresponding to load device 1 and load device 2 can be determined, and the current status of load device 1 and load device 2 is sent to the corresponding electronic device.

[0115] In the third way, the electronic device obtains its current state from the target load device. Optionally, the terminal device can obtain the mapping relationship between the electronic device and the load device according to the user's configuration, and form an association relationship between the electronic device and the load device. The terminal device sends the association relationship between the electronic device and the load device to the gateway, and the gateway informs each load device of the corresponding relationship between it and the electronic device. The load device records the association relationship between itself and the electronic device. When the current state of the load device changes, the current state is directly reported to the corresponding electronic device according to the recorded association relationship between itself and the electronic device. Among them, the load device records the association relationship between itself and the electronic device by setting the attribute value. When the corresponding attribute value of the load device changes, the load device actively sends the attribute value to the corresponding electronic device, thereby completing the reporting of the current state.

[0116] The electronic device may obtain the current status of the target load device by one or more of the above-mentioned methods. By timely and accurately obtaining the current status of the target load device, it can ensure that the current status of the target load device is accurately known before remote control is performed, thereby effectively ensuring the accuracy of remote control.

[0117] In some embodiments, the obtaining of the control instruction includes:

[0118] Detecting a touch operation on the electronic device, determining whether the touch operation is a first preset operation for controlling the on / off of a load device, and acquiring a control instruction according to the first preset operation; and / or,

[0119] Receive control instructions sent by terminal equipment.

[0120] Wherein, the electronic device includes a local button, and different preset operations applied to the local button can be preset to correspond to different control instructions. For example, taking the first preset operation as applying a single touch operation to the local button as an example, the single touch operation applied to the local button can be preset to correspond to the control instruction for controlling the target load device. When the electronic device detects that a single touch operation is applied to the local button, the control instruction for controlling the target load device to be turned on or off is obtained accordingly.

[0121] The terminal device can provide different control buttons through the control interface of the application, and the user can touch or click different control buttons to issue corresponding control instructions. For example, the terminal device provides an on button and a off button for controlling the target load device to turn on or off through the control interface of the application. When the terminal device detects the user's touch operation on the on button and the off button, the control instruction for controlling the target load device to turn on or off is sent to the electronic device accordingly, and the electronic device receives the control instruction sent by the terminal device.

[0122] In this embodiment, the local button of the electronic device can send a control instruction to the load device when receiving a preset operation, or the control interface of the terminal device can pre-set an on button or an off button to send a control instruction to the load device, thereby shielding the control function of the control instruction on the closing or opening of the contacts of the on-off device of the electronic device, so that the contacts of the on-off device can remain in a normally closed state, avoiding the disconnection of the contacts of the on-off device of the electronic device when the load device is controlled to be turned off, causing the load device to be in an offline and uncontrolled state after being turned off, thereby ensuring that the load device can be in a remotely controlled controlled state.

[0123] In some embodiments, the load device control method further includes:

[0124] Detecting a touch operation on the electronic device, determining whether it is a second preset operation for controlling the disconnection of the contacts of the on-off device according to the touch operation, and obtaining a control instruction for controlling the disconnection of the contacts of the on-off device according to the second preset operation; and / or receiving a control instruction for controlling the disconnection of the contacts of the on-off device sent by a terminal device;

[0125] According to the control instruction of opening the contact of the on-off device, the contact of the on-off device is controlled to open.

[0126] Wherein, the electronic device includes a local button, and different preset operations applied to the local button can be preset to correspond to different control instructions. For example, taking the second preset operation as applying a double-click touch operation to the local button as an example, the double-click touch operation applied to the local button can be preset to correspond to a control instruction for controlling the disconnection of the contact of the on-off device. When the electronic device detects that a double-click touch operation is applied to the local button, the control instruction for controlling the disconnection of the contact of the on-off device is obtained accordingly.

[0127] The terminal device can provide different control buttons through the control interface of the application, and the user can touch or click different control buttons to issue corresponding control instructions. For example, the terminal device provides a restart button for disconnecting the contacts of the on-off device through the control interface of the application. When the terminal device detects the user's touch operation on the restart button, it sends a control instruction for controlling the disconnection of the contacts of the on-off device to the electronic device, and the electronic device receives the control instruction for controlling the disconnection of the contacts of the on-off device sent by the terminal device.

[0128] In this embodiment, the local button of the electronic device can send a disconnect control instruction to the contacts of the on-off device when receiving the second preset operation, or the control interface of the terminal device can pre-set a restart button to send a disconnect control instruction to the contacts of the on-off device to meet the user's control needs in different application scenarios.

[0129] In some embodiments, the load device control method further includes:

[0130] Displaying the current status of the target load device; and / or,

[0131] According to the current state of the target load device, the current state of the electronic device is determined, and the indication module is controlled to issue corresponding indication information.

[0132] Wherein, the electronic device may include a display module, and the display module may include a display screen. After the electronic device obtains the current state of the target load device, it may be displayed through the display module for easy viewing. Optionally, the electronic device determines its own current state according to the current state of the target load device. When the electronic device corresponds to one associated load device, the current state of the electronic device is consistent with the current state of the load device; when the electronic device corresponds to multiple associated load devices, if the current state of any of the load devices is turned on, the current state of the electronic device is turned on, otherwise, the current state of the electronic device is turned off. The display module may include an indicator light. The electronic device obtains the current state of the target device, determines its own current state according to the current state of the target load device, and controls the indicator light to display accordingly, so that the current state of the target load device can be intuitively understood according to the indicator light.

[0133] Another aspect of the present application provides a load device control device, see Figure 7In an exemplary embodiment, the load device control device can be implemented by a processor. The load device control device includes an acquisition module 141, which is used to acquire a control instruction; a sending module 143, which is used to send a wireless instruction to control the target load device to be turned on or off according to the control instruction when the contact of the on-off device is closed; in this process, the contact of the on-off device is always closed.

[0134] In some embodiments, the sending module 143 is further configured to control the contact of the on-off device to close when it is determined that the contact of the on-off device is open.

[0135] In some embodiments, the acquisition module 141 is used to receive a pressing instruction of a mechanical switch; the sending module 143 is used to control the closure of the contacts of the on-off device according to the control instruction when it is determined that the current mode is the wireless mode, and after the contacts of the on-off device are closed, send a wireless instruction to one or more target load devices according to the control instruction to control the one or more target load devices to turn on or off accordingly.

[0136] In some embodiments, the sending module 143 is further used to obtain the current working state of the target load device; and generate a wireless instruction opposite to the current working state of the target load device according to the current working state of the target load device.

[0137] In some embodiments, it also includes a reporting module for obtaining the current state of the target load device after executing the action according to the wireless instruction, and reporting the current state of the target load device after executing the action according to the wireless instruction to the cloud, and / or reporting the current state of the electronic device to the cloud.

[0138] In some embodiments, it also includes a repeated execution module for determining whether the target load device successfully executes the corresponding action according to the wireless instruction; if the target load device fails to execute the corresponding action and the current number of failures is within a set range, returning to the step of sending a wireless instruction to the target load device according to the control instruction to control the target load device to turn on or off accordingly.

[0139] In some embodiments, the repeated execution module is specifically used to receive a response instruction returned by the target load device according to the wireless instruction, and determine whether the target load device successfully executes the corresponding action according to the wireless instruction based on the response instruction; if there is a situation where no response instruction returned by at least one of the target load devices is received, it is determined that the target load device fails to execute the corresponding action; if a response instruction returned by each of the target load devices is received, it is determined that the target load device successfully executes the corresponding action.

[0140] In some embodiments, the repeated execution module is also used to send a contact opening instruction to the on-off device to control the contact opening of the on-off device when the target load device fails to execute the corresponding action and the current number of failures exceeds a set range.

[0141] In some embodiments, the reporting module is specifically used to determine the current state of the target load device according to at least one of the following when the target load device successfully performs the corresponding action: determining the current state of the target load device according to the control instruction; receiving the current state obtained by the gateway from the corresponding target load device, and the target load device is determined by the gateway according to the association relationship between the electronic device and the load device; receiving the current state sent by the target load device according to the association relationship between the electronic device and the load device.

[0142] In some embodiments, the acquisition module 141 is specifically used to detect a touch operation on the electronic device, determine whether it is a first preset operation for controlling the on / off of a load device based on the touch operation, and acquire a control instruction based on the first preset operation; and / or receive a control instruction sent by a terminal device.

[0143] In some embodiments, the acquisition module 141 is also used to detect a touch operation on the electronic device, determine whether it is a second preset operation for controlling the disconnection of the contacts of the on-off device according to the touch operation, and obtain a control instruction for controlling the disconnection of the contacts of the on-off device according to the second preset operation; and / or receive a control instruction for controlling the disconnection of the contacts of the on-off device sent by a terminal device; and control the disconnection of the contacts of the on-off device according to the control instruction for the disconnection of the contacts of the on-off device.

[0144] In one embodiment, it also includes a display module for displaying the current state of the target load device; and / or, according to the current state of the target load device, determining the current state of the electronic device and controlling the indication module to issue corresponding indication information.

[0145] It should be noted that: the load device control device provided in the above embodiment only uses the division of the above program modules as an example to illustrate the process of controlling the load device by shielding the control command sent to the load device to control the contacts of the on-off device. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the load device control device provided in the above embodiment and the load device control method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0146] See also Figure 8 , which is a load device control method provided by another embodiment of the present application, and is applied to electronic equipment. The load device control method includes but is not limited to S201, S203 and S205, which are specifically described as follows:

[0147] S201, sending a wireless instruction to control at least one load device.

[0148] The at least one load device refers to one or more load devices associated with the electronic device and capable of switching between on and off according to the control instruction of the electronic device. The load device and the electronic device may be under the same gateway, and the electronic device may be wirelessly connected to the electronic device through the gateway, and send wireless instructions to the corresponding load device via the gateway, or directly send wireless instructions to the corresponding load device.

[0149] S203, determining whether the action performed by the load device according to the wireless instruction is successful.

[0150] S205, when the action executed by the load device fails and the current number of failures is within a set range, return to the step of sending a wireless instruction to control the load device to at least one load device.

[0151] In the above embodiment, the electronic device determines whether the load device successfully performs the corresponding action according to the wireless instruction. If the load device fails to perform the corresponding action, it returns to the step of sending the wireless instruction to the load device according to the control instruction to control the load device, and repeats the cycle in this way. By monitoring the execution of the action by the load device and performing repeated control in the case of unsuccessful execution, the accuracy of the control of the load device can be improved. By recording the number of times the load device fails to perform an action, and setting the number of failures within a set range as one of the conditions for repeating the control in the case of unsuccessful execution of the action by the load device, it can avoid excessive cycles or continuous cycles in the event of errors, thereby ensuring the accuracy of the control of the load device and improving the control efficiency.

[0152] In some embodiments, the step S203, determining whether the action performed by the load device according to the wireless instruction is successful, includes:

[0153] receiving a response instruction returned by the at least one load device according to the wireless instruction;

[0154] In the case where a response instruction returned by one or more load devices is not received, it is determined that the action executed by the load device fails;

[0155] When a response instruction returned by each of the load devices is received, it is determined that the action executed by the load device is successful.

[0156] The response instruction may refer to a message indicating successful reception returned to the electronic device by the load device after receiving the wireless instruction sent by the electronic device. Taking the communication between the electronic device and the load device via Zigbee as an example, the electronic device may send a Zigbee wireless instruction to the load device, and the load device returns a Zigbee application layer message confirmation message (ACK) after receiving the wireless instruction. After issuing the wireless instruction, the electronic device determines whether all corresponding load devices have replied to the response instruction. If all corresponding load devices have replied to the response instruction, it is considered that the control is successful and the load device has successfully executed the corresponding action; if any one of all the load devices has not replied to the response instruction, it means that the current control is unsuccessful and the load device has failed to execute the corresponding action.

[0157] See also Fig. 9 In some embodiments, after determining whether the action performed by the load device according to the wireless instruction is successful in S203, the step further includes:

[0158] S204, when the target load device fails to perform the corresponding action and the current number of failures exceeds a set range, sending a contact disconnection instruction to the on-off device to control the contact disconnection of the on-off device; or,

[0159] S206, when the target load device executes the corresponding action successfully, obtain the current state of the target load device after executing the action according to the wireless instruction, and report the current state of the target load device after executing the action according to the wireless instruction to the cloud, and / or report the current state of the electronic device to the cloud.

[0160] Among them, the electronic device records the number of times the load device fails to execute an action, and sets the number of failures within a set range as one of the conditions for repeated control when the load device fails to execute an action, thereby avoiding excessive cycles or continuous cycles in the event of an error. When the number of times the load device fails to execute the corresponding action exceeds the set range, the contacts of the on-off device are controlled to be disconnected to cut off the power supply to the load device. At this time, if the current control instruction to the load device is a closing control instruction, the contacts of the on-off device are controlled to be disconnected, thereby achieving the control goal of closing the load device; if the control instruction to the load device is an opening control instruction, the current state of the load device can be uniformly reset to the closed state by disconnecting the contacts of the on-off device, which is equivalent to automatically repairing the error, ensuring that the electronic device can accurately and effectively control the load device according to the next control instruction.

[0161] In some embodiments, sending a wireless instruction to at least one load device to control the load device includes:

[0162] Acquire a control instruction for controlling the at least one load device, and detect a current state of a contact of a switching device of the electronic device based on the control instruction;

[0163] When the contacts of the on-off device are disconnected, controlling the contacts to close;

[0164] When the contacts of the on-off device are closed, a wireless instruction opposite to the current working state of the at least one load device is generated according to the control instruction, or a wireless instruction opposite to its own current working state is generated according to the control instruction, and the wireless instruction is sent to the at least one load device.

[0165] In the above embodiment, the control instruction may refer to that the electronic device detects the user's touch operation on the local button, and obtains the control instruction for controlling the load device to open or close according to the touch operation; or the terminal device detects the touch operation of the open button or the close button in the control interface of the application, sends the open or close control instruction to the electronic device according to the touch operation, and the electronic device obtains the control instruction from the terminal device. The electronic device obtains the control instruction, and before sending the control command to control the load device to open or close according to the control instruction, the electronic device detects whether the contact of the on-off device is currently closed. When it is determined that the contact of the on-off device is disconnected, the contact of the on-off device is controlled to close. When the contact of the on-off device is closed, the load device is in a power supply state, and thus in a controlled state. The electronic device determines whether the contact of the on-off device is currently closed to ensure that the subsequent control of the load device can be accurately and effectively executed.

[0166] After the electronic device receives the control instruction, it generates a wireless instruction opposite to the current working state of the load device according to the current working state of the load device. For example, if the current working state of the load device is on, after the electronic device receives the control instruction, it generates a wireless instruction for controlling the load device to be turned off. A wireless instruction opposite to the current working state of the electronic device is generated according to the current state of the electronic device itself. For example, if the current working state of the electronic device is on, after the electronic device receives the control instruction, it generates a wireless instruction for controlling the load device to be turned off. By intelligently determining whether the control instruction is an on instruction or a off instruction according to the current working state of the target load device or the current working state of the electronic device itself, the number of buttons for controlling the load device can be reduced, simplifying the control operation.

[0167] See also Fig.10 On the other hand, the present application provides a load device control device. In an exemplary embodiment, the load device control device can be implemented by a processor. The load device control device includes an instruction module 241, which is used to send a wireless instruction to control the load device to at least one load device; an action module 242, which is used to determine whether the action performed by the load device according to the wireless instruction is successful; and a return module 243, which is used to return to the step of sending a wireless instruction to control the load device to at least one load device when the action performed by the load device fails and the current number of failures is within a set range.

[0168] In some embodiments, the action module 242 is used to receive a response instruction returned by the at least one load device according to the wireless instruction; if the response instruction returned by one or more of the load devices is not received, it is determined that the action of the load device has failed; if a response instruction returned by each of the load devices is received, it is determined that the action performed by the load device is successful.

[0169] In some embodiments, the action module 242 is also used to send a contact disconnection instruction to the on-off device to control the disconnection of the contacts of the on-off device when the target load device fails to perform the corresponding action and the current number of failures exceeds a set range; or, it is also used to obtain the current state of the target load device after performing the action according to the wireless instruction when the target load device successfully performs the corresponding action, and report the current state of the target load device after performing the action according to the wireless instruction to the cloud, and / or report the current state of the electronic device to the cloud.

[0170] In some embodiments, the instruction module 241 is also used to obtain a control instruction for controlling the at least one load device to be turned on or off, and detect the current state of the contacts of the on-off device of the electronic device based on the control instruction; when the contacts of the on-off device are disconnected, control the contacts to close; when the contacts of the on-off device are closed, generate a wireless instruction opposite to the current working state of the at least one load device according to the control instruction, or generate a wireless instruction opposite to its own current working state according to the control instruction, and send the wireless instruction to the at least one load device.

[0171] It should be noted that: the load device control device provided in the above embodiment only uses the division of the above program modules as an example in the process of realizing intelligent control of the load device. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the load device control device provided in the above embodiment and the load device control method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0172] Another aspect of the present application provides an electronic device, see Fig.11 , is an optional hardware structure diagram of an electronic device 10 provided in an embodiment of the present application, the electronic device 10 includes a processor 13 and a memory 14, the memory 14 is used to store various types of data to support the operation of the load device control device, and stores a computer program for implementing the load device control method provided in any embodiment of the present application, when the computer program is executed by the processor, the steps of the load device control method provided in any embodiment of the present application are implemented, and the same technical effect can be achieved, to avoid repetition, it is not repeated here. The electronic device can be an electronic product such as a smart switch, a smart socket, etc. for realizing the on or off control of the circuit in which it is located.

[0173] See also Fig.12 , is a hardware structure block diagram of an electronic device provided in an embodiment of the present application. Fig.12As shown, the electronic device is a panel switch 64. The panel switch 64 may have relatively large differences due to different configurations or performances, and may include one or more processors 64a (Processing Units, CPU) (the processor 64a may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 64b for storing data 1400, one or more storage media 1600 (such as one or more mass storage devices) for storing application programs 1500 or data 1400, a relay J, and a mechanical switch K. The processor 64a is connected to the relay J, the mechanical switch K, the memory 64b, and the storage medium 1600 respectively; the memory 64b and the storage medium 1600 may be short-term storage or permanent storage. The program stored in the storage medium 1600 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the processor 64a may be configured to communicate with the storage medium 1600 and execute a series of instruction operations in the storage medium 1600 on the switch 64.

[0174] When the mechanical switch K is pressed, the processor 64a will receive a signal instruction of being pressed. The relay J is a controlled switch connected to the control end of the processor 64a. The processor 64a can control the opening and closing of the relay J through the control end output control signal. The relay J is connected in the main circuit, and the main circuit is connected to the power supply and the controlled device. The power supply can be 220V AC.

[0175] The panel switch 64 may also include one or more built-in power supplies 1000, one or more wired or wireless network interfaces 1100, one or more input and output interfaces 1200, and / or one or more operating systems 1300, such as WindowsserverTM, MacOSXTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0176] The input / output interface 1200 may be used to receive or send data 1400 via a network. The specific example of the network may include a wireless network provided by a communication provider of the switch 64. In one example, the input / output interface 1200 includes a network adapter (NetworInterfaceController, NIC), which may be connected to other network devices via a base station so as to communicate with the Internet. In one example, the input / output interface 1200 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly. It will be understood by those skilled in the art that Fig.12 The structure shown is only for illustration and does not limit the structure of the panel switch 64. For example, the panel switch 64 may also include Fig.12 More or fewer components as shown, or with Fig.12 Different configurations are shown.

[0177] On the other hand, an embodiment of the present application further provides a load device control system, comprising the electronic device described in any embodiment of the present application, wherein a communication connection is established between the electronic device and the load device, and the electronic device is used to control the state of at least one of the load devices.

[0178] The electronic device is also used to obtain the status of the load device. When the number of the load device is one, the status of the indicator light of the electronic device is consistent with the status of the load device. When the number of the load devices is multiple, when any one of the load devices is in the on state, the indicator light of the electronic device is in the on state, otherwise the indicator light of the electronic device is in the off state.

[0179] Wherein, the load device control system also includes a gateway, and a communication connection is established between the electronic device and the load device through the gateway. The electronic device is also used to obtain the status of the load device and report the status of the load device to the gateway.

[0180] In the above-mentioned load device control system, the electronic device is used to implement the load device control method provided in any embodiment of the present application, and can achieve the same technical effect. To avoid repetition, it will not be described here.

[0181] On another aspect of the embodiments of the present application, a load device control system is provided, comprising the electronic device, gateway and terminal device described in any embodiment of the present application, wherein a communication connection is established between the electronic device and the terminal device via the gateway, and the electronic device is used to control at least one load device accordingly.

[0182] Optionally, the terminal device is used to obtain a configuration instruction, determine an association relationship between the electronic device and the load device according to the configuration instruction, and send the association relationship to the gateway;

[0183] The gateway obtains the current status of the target load device according to the association relationship and sends it to the corresponding electronic device, and / or the gateway sends a subscription instruction to the target load device according to the association relationship, controls the target load device to send its current status to the corresponding electronic device according to the subscription instruction, and / or the electronic device determines the current status of the target load device according to the control instruction.

[0184] Among them, the user can use the terminal device to configure the corresponding relationship between the electronic device and the load device. For example, the terminal device can obtain the configuration instructions input by the user through the configuration page of the application, determine the association relationship between the electronic device and the load device according to the configuration instructions, and send it to the gateway. The configuration instructions include information about which load devices the electronic device is used to control, or information about which load devices each control in the multi-channel control of the electronic device is used to control. The terminal device sends the association relationship between the electronic device and the load device to the gateway to subscribe to the current status information of the target load device through the gateway, or directly subscribe to the current status information of the target load device to the corresponding target load device via the gateway. Optionally, the electronic device can also directly determine the current status of the target load device based on the wireless instructions sent to the target load device after receiving the control instructions.

[0185] In the above-mentioned load device control system, the electronic device is used to implement the load device control method provided in any embodiment of the present application, and can achieve the same technical effect. To avoid repetition, it will not be described here.

[0186] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned working mode configuration method and switch control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the computer-readable storage medium, such as read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk, etc.

[0187] In order to have a more comprehensive understanding of the load device control method provided in this application, please refer to Fig.13 In the following, an electronic device is taken as a panel switch. The panel switch and the corresponding load device are under the same Zigbee gateway. The corresponding load devices include load device 1 and load device 2. The panel switch and the load device communicate via Zigbee wirelessly as an example to provide an optional specific exemplary description of the load device control method.

[0188] S11, the terminal device sends a control instruction for controlling the target load device to be turned on / off to the panel switch; the target load device includes load device 1 and load device 2.

[0189] S12, the panel switch obtains the on / off control instruction and detects whether the contacts of the on / off device are in a closed state;

[0190] If the contacts of the on-off device are open, S121 is executed, and if the contacts of the on-off device are closed, S122 is executed.

[0191] S121, controlling the contacts of the on-off device to close;

[0192] S122, sending a ZigBee control command to the target load device;

[0193] S13, after receiving the zigbee control command, the target load device returns an ACK response instruction;

[0194] S14, the panel switch determines whether all target load devices have returned ACK response instructions; that is, whether load device 1 and load device 2 have returned ACK response instructions.

[0195] If all target load devices return an ACK response instruction, the control is successful, and steps S15, S161, and S162 are executed; if the panel switch does not receive an ACK response instruction returned by any of the target load devices, S17 and S18 are executed;

[0196] S15, the panel switch reports its current status to the gateway;

[0197] S161, the target load devices report their current status to the gateway, and / or S162, the target load devices report their current status to the panel switch; that is, load device 1 and load device 2 report their current status to the gateway and / or the panel switch.

[0198] S17, resend the ZigBee control command to the target load device. If the ACK response command is not received from any of the target load devices after three resends, the control fails.

[0199] S18, the contacts of the on-off device controlled by the panel switch are disconnected.

[0200] Execute steps S15, S161, and S162 again.

[0201] Among them, the panel switch can directly control the load device through the terminal device. The terminal device sends a control instruction for controlling the load device, and the contacts of the on-off device can remain in a normally closed state, so as to avoid the load device being offline and uncontrolled after being turned off due to the disconnection of the contacts of the on-off device of the electronic device when the load device is controlled to be turned off, thereby ensuring that the load device can be in a remotely controlled controlled state. When the contacts of the on-off device of the panel switch are disconnected, if the user wants to remotely and directly control the load device through the terminal device, the contacts of the on-off device will be controlled to close first, and then the corresponding on / off control command will be sent to the load device according to the on / off control instruction obtained for directly controlling the load device, ensuring that the load device can be intelligently switched to an effective controlled state.

[0202] See also Fig.14 , is an optional specific exemplary description of another load device control method, taking the electronic device as a panel switch, the panel switch and the corresponding load device are under the same Zigbee gateway, the panel switch includes two local buttons, the load device corresponding to the local button is load device 1, the load device corresponding to local button 2 is load device 2 and load device 3, and the panel switch and the load device communicate via Zigbee wireless communication as an example.

[0203] S21, the electronic device detects a preset operation on the local button 2, and obtains a control instruction for controlling the target load device to turn on / off; the target load device includes load device 2 and load device 3.

[0204] S22, the panel switch obtains the on / off control instruction and detects whether the contacts of the on / off device are in a closed state;

[0205] If the contacts of the on-off device are open, S221 is executed; if the contacts of the on-off device are closed, S222 is executed.

[0206] S221, controlling the contacts of the on-off device to close;

[0207] S222, sending a ZigBee control command to the target load device;

[0208] S23, after receiving the zigbee control command, the target load device returns an ACK response instruction;

[0209] S24, the panel switch determines whether all target load devices have returned ACK response instructions; that is, whether load device 2 and load device 3 have returned ACK response instructions.

[0210] If all target load devices return an ACK response instruction, the control is successful, and steps S25, S261, and S262 are executed; if the panel switch does not receive an ACK response instruction returned by any of the target load devices, S27 and S28 are executed;

[0211] S25, the panel switch reports its current status to the gateway;

[0212] S261, the target load devices report their current status to the gateway, and / or S262, the target load devices report their current status to the panel switch; that is, load device 2 and load device 3 report their current status to the gateway and / or the panel switch.

[0213] S27, resend the ZigBee control command to the target load device. If the ACK response command is not received from any of the target load devices after three resends, the control fails.

[0214] S28, the panel switch disconnects the contacts of the control on-off device.

[0215] Execute steps S25, S261, and S262 again.

[0216] Among them, the panel switch can directly control the load device according to the local buttons, and the local buttons of the panel switch are operated to issue control instructions for controlling the load device. By shielding the control function of the closing or disconnection of the contacts of the electronic device's on / off control instructions, the contacts of the on / off device can be kept in a normally closed state, avoiding the disconnection of the contacts of the electronic device's on / off device when the load device is controlled to be turned off, which causes the load device to be in an offline and uncontrolled state after being turned off, ensuring that the load device can be in a remotely controlled controlled state. When the contacts of the on / off device of the panel switch are disconnected, if the user wants to directly control the load device by remote control or operating the local buttons, the contacts of the on / off device will be controlled to close first, and then the corresponding on / off control command will be sent to the load device according to the obtained on / off control instructions for directly controlling the load device, ensuring that the load device can be intelligently switched to an effective controlled state.

[0217] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0218] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0219] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A load device control method, applied to electronic equipment, characterized in that: include: Get control instructions; When the contacts of the on-off device of the electronic device are closed, a wireless instruction to control the one or more target load devices is sent to the one or more target load devices according to the control instruction; during this process, the contacts of the on-off device are always closed.

2. The load device control method according to claim 1, characterized in that: Before sending a wireless instruction to control the one or more target load devices according to the control instruction, the method further includes: When it is determined that the contacts of the switching device are opened, the contacts of the switching device are controlled to be closed.

3. The load device control method according to claim 1, characterized in that: When the contact of the on-off device is closed, sending a wireless instruction to control the one or more target load devices to the one or more target load devices according to the control instruction includes: When it is determined that the current mode is the wireless mode, the contacts of the on-off device are controlled to close according to the control instruction. After the contacts of the on-off device are closed, wireless instructions for controlling the one or more target load devices are sent to one or more target load devices according to the control instruction.

4. The load device control method according to claim 1, characterized in that: The sending of a wireless instruction to control the target load device according to the control instruction comprises: Obtaining the current working status of the target load device; A wireless instruction opposite to the current working state of the target load device is generated according to the current working state of the target load device.

5. The load device control method according to claim 4, characterized in that: The obtaining of the current working status of the target load device includes at least one of the following methods: Determine the current working state of the target load device according to the control instruction; The receiving gateway obtains the current working status from the corresponding target load device, and the target load device is determined by the gateway according to the association relationship between the electronic device and the load device; The current working state sent by the target load device according to the association relationship between the electronic device and the load device is received.

6. The load device control method according to claim 1, characterized in that: When the contacts of the on-off device are closed, after sending a wireless instruction to control the target load device according to the control instruction, the method further includes: Obtain the current state of the target load device after executing the action according to the wireless instruction, and / or report the current state of the electronic device to the cloud.

7. The load device control method according to claim 1, characterized in that: When the contacts of the on-off device are closed, after sending a wireless instruction to control the target load device according to the control instruction, the method further includes: Determine whether the target load device successfully performs a corresponding action according to the wireless instruction; When the target load device fails to execute the corresponding action and the current number of failures is within a set range, return to the step of sending a wireless instruction to control the target load device according to the control instruction.

8. The load device control method according to claim 7, characterized in that: The determining whether the target load device successfully performs a corresponding action according to the wireless instruction includes: receiving a response instruction returned by the target load device according to the wireless instruction, and judging whether the target load device successfully performs a corresponding action according to the wireless instruction according to the response instruction; In the case where at least one response instruction returned by the target load device is not received, it is determined that the target load device fails to perform the corresponding action; When a response instruction returned by each of the target load devices is received, it is determined that the target load device has successfully executed the corresponding action.

9. The load device control method according to any one of claims 1 to 8, characterized in that: The obtaining control instruction comprises: Detecting a touch operation on the electronic device, determining whether the touch operation is a first preset operation for controlling the on / off of a load device, and acquiring a control instruction according to the first preset operation; and / or, Receive control instructions sent by terminal equipment.

10. The load device control method according to any one of claims 1 to 8, characterized in that: Also includes: Detecting a touch operation on the electronic device, determining whether it is a second preset operation for controlling the disconnection of the contacts of the on-off device according to the touch operation, and obtaining a control instruction for controlling the disconnection of the contacts of the on-off device according to the second preset operation; and / or receiving a control instruction for controlling the disconnection of the contacts of the on-off device sent by a terminal device; According to the control instruction of opening the contact of the on-off device, the contact of the on-off device is controlled to open.

11. The load device control method according to any one of claims 1 to 8, characterized in that: The method further comprises: Displaying the current status of the target load device; and / or, According to the current state of the target load device, the current state of the electronic device is determined, and the indication module is controlled to issue corresponding indication information.

12. The load device control method according to claim 11, characterized in that: The determining the current state of the electronic device according to the current state of the target load device includes: When the electronic device is associated with one target load device, controlling the current state of the electronic device to be consistent with the current state of the target load device; When the electronic device corresponds to multiple target load devices, if the current state of any of the target load devices is on, the current state of the electronic device is controlled to be on; if the current state of all the target load devices associated with the electronic device is off, the current state of the electronic device is controlled to be off.

13. A load device control method, characterized in that: include: Sending a wireless instruction to at least one load device to control the load device; Determining whether the action performed by the load device according to the wireless instruction is successful; When the action executed by the load device fails and the current number of failures is within a set range, return to the step of sending a wireless instruction to control the load device to at least one load device.

14. The load device control method according to claim 13, characterized in that: The determining whether the action performed by the load device according to the wireless instruction is successful includes: receiving a response instruction returned by the at least one load device according to the wireless instruction; In the case where a response instruction returned by one or more load devices is not received, it is determined that the action executed by the load device fails; When a response instruction returned by each of the load devices is received, it is determined that the action executed by the load device is successful.

15. The load device control method according to claim 13, characterized in that: After determining whether the action executed by the load device according to the wireless instruction is successful, the method further includes: When the target load device fails to perform the corresponding action and the current number of failures exceeds a set range, a contact opening instruction is sent to the on-off device to control the contact opening of the on-off device; or When the target load device successfully executes the corresponding action, the current state of the target load device after executing the action according to the wireless instruction is obtained, and the current state of the target load device after executing the action according to the wireless instruction is reported to the cloud, and / or the current state of the electronic device is reported to the cloud.

16. The load device control method according to claim 13, characterized in that: The sending of a wireless instruction to at least one load device to control the load device comprises: Acquire a control instruction for controlling the at least one load device, and detect a current state of a contact of a switching device of the electronic device based on the control instruction; When the contacts of the on-off device are disconnected, controlling the contacts to close; When the contacts of the on-off device are closed, a wireless instruction opposite to the current working state of the at least one load device is generated according to the control instruction, or a wireless instruction opposite to its own current working state is generated according to the control instruction, and the wireless instruction is sent to the at least one load device.

17. A load equipment control device, characterized in that: include: An acquisition module, used for acquiring control instructions; The sending module is used to send wireless instructions to control the one or more target load devices according to the control instructions when the contacts of the on-off device are closed; during this process, the contacts of the on-off device are always closed.

18. A load equipment control device, characterized in that: include: An instruction module, used for sending a wireless instruction to at least one load device to control the load device; An action module, used to determine whether the action performed by the load device according to the wireless instruction is successful; The return module is used to return to the step of sending a wireless instruction to control the load device to at least one load device when the action executed by the load device fails and the current number of failures is within a set range.

19. An electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein the computer program, when executed by the processor, implements the load device control method according to any one of claims 1 to 16.

20. A load equipment control system, characterized in that: It comprises a load device and the electronic device as claimed in claim 19, wherein a communication connection is established between the electronic device and the load device, and the electronic device is used to correspondingly control at least one of the load devices.

21. The load device control system according to claim 20, characterized in that: The electronic device is also used to obtain the status of the load device. When the number of the load device is one, the status of the indicator light of the electronic device is consistent with the status of the load device; when the number of the load devices is multiple, when any one of the load devices is in the on state, the indicator light of the electronic device is in the on state, otherwise the indicator light of the electronic device is in the off state.

22. The load device control system according to claim 20, characterized in that: The load device control system further includes a gateway, and a communication connection is established between the electronic device and the load device via the gateway. The electronic device is also used to obtain the status of the load device and report the status of the load device to the gateway.

23. A load equipment control system, characterized in that: It comprises the electronic device, gateway and terminal device as described in claim 19, wherein a communication connection is established between the electronic device and the terminal device via the gateway, and the electronic device is used to control at least one load device accordingly.

24. The load device control system according to claim 23, characterized in that: The terminal device is used to obtain a configuration instruction, determine the association relationship between the electronic device and the load device according to the configuration instruction, and send it to the gateway; The gateway obtains the current status of the target load device according to the association relationship and sends it to the corresponding electronic device, and / or the gateway sends a subscription instruction to the target load device according to the association relationship, controls the target load device to send its current status to the corresponding electronic device according to the subscription instruction, and / or the electronic device determines the current status of the target load device according to the control instruction.

25. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the load device control method according to any one of claims 1 to 16 is implemented.