Switch control method, switch control device, switch and computer-readable storage medium

By obtaining trigger instructions and identifying device attribute information in the Internet of Things system, generating opening and closing instructions for the control relay, and using the rebound mode to generate instantaneous disconnection signals, the problem of low switch control efficiency is solved, and multiple control methods and intelligent management are realized.

CN113745056BActive Publication Date: 2025-10-03SHENZHEN LUMIUNITED TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010471889.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-29
Publication Date
2025-10-03
Estimated Expiration
2040-05-29

AI Technical Summary

Technical Problem

The control efficiency of switches in IoT systems needs to be improved, and existing technologies make it difficult to achieve multiple control methods and flexible device management.

Method used

By obtaining the trigger instruction, the control instruction of the opening and closing of the control relay is generated, the rebound mode is used to generate a momentary off signal to control the working state of the controlled device, and the working mode of the switch is automatically configured by identifying the attribute information of the controlled device.

Benefits of technology

It enriches the control methods of switches, improves control efficiency and flexibility, and realizes intelligent management of different devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113745056B_ABST
    Figure CN113745056B_ABST
Patent Text Reader

Abstract

The present invention discloses a switch control method, a switch control device, a switch, and a computer-readable storage medium. The switch includes a relay. The method includes: obtaining a trigger instruction; generating a control instruction for controlling the opening and closing of the relay based on the trigger instruction; and controlling the operating state of a controlled device according to the control instruction. The present invention can control the opening and closing of the relay of the switch according to the received trigger instruction. By controlling the relay to first open and then close, the control instruction is provided to the controlled device, thereby controlling the operating state of the controlled device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of switch technology, and more specifically, to a switch control method, a switch control device, a switch, and a computer-readable storage medium. Background Art

[0002] The Internet of Things (IoT) is a crucial component of the new generation of information technology and a crucial development phase in the "informatization" era. It's an extended application of the internet, connecting everything. While the IoT is a network, it's also a network of services and applications. First, the core and foundation of the IoT remains the internet; it's an extension and expansion of the internet. Second, its user end extends and expands to include any object, enabling information exchange and communication—in other words, the interconnectedness of things. Switches are a crucial component of IoT systems, and their control efficiency needs to be improved. Summary of the Invention

[0003] In a first aspect, an embodiment of the present application provides a switch control method, wherein the switch includes a relay, and the method includes:

[0004] Get the trigger instruction;

[0005] generating a control instruction for controlling the opening and closing of the relay based on the trigger instruction;

[0006] The working state of the controlled device is controlled according to the control instruction.

[0007] In a second aspect, an embodiment of the present application provides a switch control device, the device comprising:

[0008] An acquisition module is used to obtain trigger instructions;

[0009] A generating module, configured to generate a control instruction for controlling the opening and closing of the relay based on the trigger instruction;

[0010] The control module is used to control the working state of the controlled device according to the control instruction.

[0011] In a third aspect, an embodiment of the present application provides a switch, 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 steps of the switch control method provided in any of the above embodiments.

[0012] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the switch control method provided in any of the above embodiments are implemented.

[0013] Compared with the prior art, an embodiment of the present application proposes a switch control method, wherein the switch includes a relay, and the opening and closing of the relay are controlled by the acquired trigger instruction to generate a momentary off signal, which is used to control the working state of the controlled device, thereby enriching the control method of the switch. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0015] Figure 1 A schematic structural diagram of a switch system proposed in this application is shown;

[0016] Figure 2 A flow chart of a method for setting a working mode according to an embodiment of the present application is shown;

[0017] Figure 3 A flow chart of a method for setting a working mode proposed in another embodiment of the present application is shown;

[0018] Figure 4 A flowchart of a method for setting a working mode according to another embodiment of the present application is shown;

[0019] Figure 5 A flowchart of a method for setting a working mode according to another embodiment of the present application is shown;

[0020] Figure 6 A flowchart of a method for setting a working mode according to another embodiment of the present application is shown;

[0021] Figure 7 A flow chart of a switch control method proposed in one embodiment of the present application is shown;

[0022] Figure 8 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0023] Figure 9 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0024] Figure 10 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0025] Figure 11 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0026] Figure 12 A flow chart of a switch control method proposed in one embodiment of the present application is shown;

[0027] Figure 13 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0028] Figure 14 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0029] Figure 15 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0030] Figure 16 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0031] Figure 17 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0032] Figure 18 A structural block diagram of a switch control device proposed in one embodiment of the present application is shown;

[0033] Figure 19 A structural block diagram of a switch control device proposed in another embodiment of the present application is shown;

[0034] Figure 20 A structural block diagram of a switch control device proposed in another embodiment of the present application is shown;

[0035] Figure 21 A structural block diagram of a switch control device proposed in another embodiment of the present application is shown;

[0036] Figure 22 A structural block diagram of a switch control device proposed in another embodiment of the present application is shown;

[0037] Figure 23 A structural block diagram of a switch control device proposed in one embodiment of the present application is shown;

[0038] Figure 24 A flow chart of a switch control method proposed in one embodiment of the present application is shown;

[0039] Figure 25 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0040] Figure 26 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0041] Figure 27 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0042] Figure 28 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0043] Figure 29 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0044] Figure 30 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0045] Figure 31 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0046] Figure 32 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0047] Figure 33 A flow chart of a switch control method proposed in another embodiment of the present application is shown;

[0048] Figure 34 A structural block diagram of a switch system proposed in one embodiment of the present application is shown;

[0049] Figure 35 This is a hardware structure block diagram of a switch provided by an embodiment of the present invention.

[0050] Figure 36 A schematic diagram of the hardware structure of a terminal device for implementing various embodiments of the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0052] It should be noted that similar reference numerals or letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in the subsequent drawings.

[0053] In order to facilitate the detailed description of the present application, the system of the present application will be first introduced with reference to the accompanying drawings.

[0054] See also Figure 1, is a switch system 10 provided in an embodiment of the present application, and the switch system 10 includes: a terminal device 11, a server 12, a gateway 13, a switch 14 and a router 15. Among them, the terminal device 11 can be any device with communication and storage functions, such as: a smart phone, a desktop computer, a laptop computer, a tablet computer or other intelligent communication devices with network connection functions. The server 12 can be a network access server, a database server, a cloud server, etc. Optionally, the gateway 13 can be built based on the ZigBee protocol, and the switch 14 can be a device pre-added to the gateway 13. For example, the switch 14 can be a device in the kit to which the gateway 13 belongs when the gateway 13 leaves the factory; it can also be a device that is subsequently connected to the gateway 13 through user operation.

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

[0056] Optionally, the switch 14 may establish a network connection with the gateway 13 based on the ZigBee protocol, thereby joining the ZigBee network.

[0057] The gateway 13 and the terminal device 11 can both be connected to the router 15 and access the Ethernet network through the router 15. The router 15 can access the server via a wired or wireless communication connection. For example, the gateway 13 and the terminal device 11 can store the acquired information on the server 12. Optionally, the terminal device 11 can also establish a network connection with the server 12 via 2G / 3G / 4G / 5G, WiFi, etc., thereby obtaining data sent by the server 12.

[0058] Optional, such as Figure 1 The LAN path shown indicates that the terminal device 11 is in the same LAN as the router 15 and the gateway 13. The WAN path indicates that the terminal device 11 is in the same LAN as the router 15 and the gateway 13. When the terminal device 11 is in the same LAN as the router 15 and the gateway 13, the terminal device 11 can connect to the router 15 and the gateway 13 through the following methods: Figure 1 The LAN path shown interacts with the gateway 13 and the switch 14 connected to the gateway 13; Figure 1 The wide area network path shown interacts with the gateway 13 and the switch 14 connected to the gateway 13. When the terminal device 11 is not in the same local area network as the router 15 and the gateway 13, the terminal device 11 can Figure 1 The WAN path shown interacts with a gateway 13 and a switch 14 connected to the gateway 13 .

[0059] like Figure 2, the embodiment of the present application provides a method for setting a working mode, which is applied to Figure 1 The switch in the system shown includes a relay, and the method may include but is not limited to steps S100 to S200. Steps S100 and S200 are described as follows.

[0060] S100: Receive mode configuration instruction.

[0061] Among them, the mode configuration instruction can be a binary number, a hexadecimal number, a current signal or other instruction types, and the specific instruction type can be pre-set. The mode configuration instruction can be generated on the terminal device and sent to the switch through the gateway. The mode configuration instruction can be generated after being triggered by the user, or it can be automatically triggered by the terminal device at a fixed time. In some embodiments, the user directly sends the mode configuration instruction to the switch through a third-party device via wireless transmission. The third-party device includes a terminal device, a remote control or a computer, etc. In this way, when configuring the working mode of the switch, it is possible to achieve local configuration or configure the working mode of the switch remotely.

[0062] S200: Setting the switch to a corresponding working mode according to the mode configuration instruction, wherein the working mode includes a rebound mode, and the rebound mode is used to control the relay to be disconnected for a preset time and then closed.

[0063] The rebound mode is used to control controlled devices equipped with a momentary interruption detection module. The momentary interruption detection module detects momentary interruptions, i.e., the phenomenon of a momentary interruption of the AC power supply, and controls the controlled device's operation, such as turning it on or off, based on this signal. Specifically, different mode configuration instructions correspond to different operating modes of the switch. For example, under the first mode configuration instruction, the switch is set to normal operating mode, while under the second mode configuration instruction, the switch is set to rebound operating mode. Under the third mode configuration instruction, the switch is set to wireless operating mode. In normal operating mode, the mechanical switch is pressed, and the operating state of the controlled device is controlled by opening and closing the relay. In rebound mode, the relay is closed, and when the mechanical switch is pressed, the relay is controlled to open and then close, generating a momentary interruption signal, thereby controlling the operating state of the controlled device. In wireless mode, the relay is closed, and pressing the mechanical switch generates a control instruction to control the operating state of the controlled device. In a specific implementation, the operating mode of the switch includes a rebound mode. In the rebound mode, the switch controls the relay to first open for a preset time length and then close to generate a transient signal of a certain width, which is used to control the operating state of the controlled device. In some embodiments, the transient signal is a mixed current of DC and AC, and fluctuates around a certain value when the relay is closed. When the relay is closed after opening for a preset time, the amplitude of the transient signal drops and then rises. The transient detection module can determine whether a transient has occurred by comparing the voltage change. In other embodiments, the transient signal can also be a pulse signal, wherein the width of the pulse signal is adjustable. In some embodiments, transient signals of different widths can control different types of controlled devices. In other embodiments, transient signals of different widths can control different operating states of the same type of controlled device. The controlled device can be a lighting lamp, including a spotlight, an LED lamp, etc., or a smart air conditioner, a fresh air conditioner, a bathroom heater, etc. The controlled device can also be other controllable smart products, which are not limited in this application.

[0064] Compared to existing technologies, the present invention proposes a switch control method. When the switch receives a mode configuration command, it configures the switch's operating mode. The switch also includes a rebound mode. In rebound mode, the relay is controlled to first open and then close to generate a transient signal. This transient signal is used to control a controlled device equipped with a transient detection module. By configuring the switch's operating mode, the switch can operate in multiple modes, improving control efficiency and enriching the switch's operating scenarios.

[0065] Please continue reading Figure 3 In one embodiment, step “S100: receiving a mode configuration instruction” includes but is not limited to step S110. Step S110 is described as follows:

[0066] S110: Receive attribute information of a controlled device, where the attribute information includes one or more of a model and a network access parameter.

[0067] Among them, the attribute information of the controlled device refers to the physical information assigned to the controlled device during the process of being generated, manufactured and prepared for sale. It includes but is not limited to the product model, network access parameters, etc. The attribute information of the controlled device can be obtained by the application on the terminal device by scanning a QR code or barcode. Specifically, after the controlled device is manufactured, a scanning mark will be affixed to the controlled device. The application on the terminal device establishes a binding relationship with the controlled device by scanning the scanning mark on the surface of the controlled device. When the application on the terminal device can recognize the scanning mark of the controlled device, it is considered that a binding relationship has been established between the terminal device and the controlled device. During the scanning mark process, the terminal device can obtain the attribute information of the controlled device, and subsequently configure the working mode of the switch according to the attribute information of the controlled device. It should be noted that after the application on the terminal device recognizes the scanning mark of the controlled device, in addition to obtaining the attribute information of the controlled device, it can also obtain the working status of the controlled device, for example, whether the controlled device is turned on and off, whether the controlled device is operating normally, etc. The attribute information of the controlled device can also be sent to the terminal device by a third-party device, which includes a server, gateway, remote control or computer, etc. The third-party device stores the attribute information of the controlled device and sends the attribute information corresponding to the controlled device to the switch at the request of the switch.

[0068] Step “S200: setting the switch to a corresponding working mode according to the mode configuration instruction” includes but is not limited to step S210. Step S210 is described as follows:

[0069] S210: Determine the operating mode of the switch according to the attribute information.

[0070] In this embodiment, when the terminal device obtains the attribute information of the controlled device, it is equivalent to being able to identify and match the target controlled device. At this point, the terminal device transmits the attribute information of the controlled device to the switch, and the switch's operating mode can be configured based on the attribute information of the controlled device. Furthermore, a linked list can be pre-established between the switch's operating mode and the attribute information of the controlled device and stored in the switch's memory. When the terminal device can recognize the scan identifier of the controlled device, the switch's processor retrieves the switch's operating mode by searching and matching the linked list, and then automatically switches to the operating mode corresponding to the attribute information of the controlled device. When the switch's processor retrieves multiple operating modes of the switch through searching and matching the linked list, it presents the multiple operating modes to the user, allowing the user to select one of the multiple operating modes. It is understood that in other embodiments, an application on the terminal device can also scan and identify the switch type to retrieve the multiple operating modes built into the switch, and then present the multiple operating modes to the user, allowing the user to select the corresponding operating mode. Alternatively, the application on the terminal device can scan and identify the switch type and then automatically send a switching instruction to the switch, causing it to switch to the operating mode that matches the switch type.

[0071] Please continue reading Figure 4 In another embodiment, step “S210: determining the working mode of the switch according to the attribute information” includes but is not limited to steps S211 and S212. Steps S211 and S212 are described as follows.

[0072] S211: Compare the attribute information with a target attribute information table pre-stored in the switch, wherein the target attribute information table includes multiple target attribute information, and one type of target attribute information corresponds to at least one working mode.

[0073] S212: When the attribute information is successfully compared with the target attribute information, determine the operating mode of the switch according to the attribute information.

[0074] Specifically, in this embodiment, a mapping relationship between the target attribute information table of the controlled device and the operating mode of the switch is first established. The target attribute information table can be stored in the memory of the switch. The target attribute information table contains multiple target attribute information. One target attribute information can correspond to one operating mode of the switch, and one target attribute information can also correspond to multiple operating modes of the switch. When the attribute information of the controlled device is obtained by the switch, the processor in the switch performs a search and comparison operation on the attribute information of the controlled device, that is, searches and compares the obtained attribute information of the controlled device with the target attribute information table stored in the memory of the switch. When the obtained attribute information of the controlled device has corresponding target attribute information, it can be considered that a binding relationship has been established between the switch and the controlled device. At this time, the target attribute information table stored in the memory of the switch can be called to search for the operating mode corresponding to the controlled device, so that the operating mode of the switch can be intelligently selected according to a pre-set method.

[0075] Please continue reading Figure 5 In another embodiment, step "S212: when the attribute information is successfully compared with the target attribute information, determining the working mode of the switch according to the attribute information" includes but is not limited to step S2121. Step S2121 is described as follows.

[0076] S2121: When the attribute information is successfully compared with the target attribute information and the target attribute information corresponds to multiple working modes, a selection instruction is sent to the terminal device, where the selection instruction is used for the user to select one of the multiple working modes.

[0077] Specifically, the acquired attribute information of the controlled device is compared with the target attribute information table stored in the switch. When the attribute information of the controlled device successfully matches the target attribute information in the target attribute information table, and the target attribute information corresponds to multiple operating modes of the switch, the switch processor sends the multiple operating modes of the switch corresponding to the target attribute information to the terminal device and displays them on the terminal device's display screen, allowing the user to select one of the multiple operating modes. The selected operating mode is then sent to the switch, completing the configuration process of the switch operating mode. By establishing a target attribute information table, the operating mode of the switch can be quickly obtained through table lookup. When the acquired switch modes include multiple modes, the multiple modes are fed back to the user for selection, which is more intelligent and user-friendly, and improves the matching degree of the switch operating mode. It should be noted that when the attribute information of the controlled device does not match the target attribute information in the target attribute information table, the switch processor feeds back a message indicating that the match was not successful to the terminal device and displays it on the terminal device, allowing the user to set a configuration mode for the switch to control the controlled device.

[0078] Please continue reading Figure 6 In another embodiment, the switch control method further includes but is not limited to steps S300 and S310. Steps S300 and S310 are described as follows.

[0079] S300: Sending message information to the terminal device, server or gateway.

[0080] S310: If no feedback information corresponding to the message information is received within a preset time period, setting the switch to an offline mode.

[0081] In one possible implementation, the switch sends a message to a terminal device, or to a gateway or server, via a gateway, to establish a communication connection between the switch and the terminal device, gateway, or server. The message can be automatically sent at preset intervals, which can be manually set. The message can be a matching instruction, which can contain multiple matching data. The multiple matching data can be sent to the terminal device, gateway, or server serially or in parallel. In other implementations, the matching data can be compressed and then decompressed after being transmitted to the terminal device to improve transmission efficiency. Furthermore, the compressed matching data can be encrypted to enhance data transmission security. Furthermore, the matching data can be grouped, with matching data between groups sent in parallel and individual data within a group sent serially to avoid data omissions and misjudgments. If the switch does not receive feedback on the message within a preset time period, it is considered disconnected and the switch is switched to offline mode.

[0082] It is understood that in other embodiments, the switch sends a message to the gateway, and the gateway generates connection status information of the switch based on the message. The connection status information includes whether a connection relationship between the switch and the terminal device or the controlled device has been established. The gateway feeds the switch connection status information back to the terminal device, so that the switch connection status information is displayed on the terminal device. When the gateway determines that the switch is disconnected from the terminal device or the controlled device, it switches the switch's operating mode to offline mode.

[0083] Please continue reading Figure 7 , an embodiment of the present application further provides a switch control method, which includes but is not limited to steps S400 and S500. Steps S400 and S500 are described as follows.

[0084] S400: Acquire a trigger instruction.

[0085] Among them, the trigger instruction can be generated by manually pressing the mechanical switch, or it can be generated by a terminal device that establishes a communication connection with the switch. The trigger instruction can be a binary number, a hexadecimal number, a current signal, or other instruction types. The specific instruction type can be pre-set. The trigger instruction can be generated by the terminal device and sent to the switch through the gateway. The trigger instruction can also be generated after being triggered by the user, or it can be automatically triggered by the terminal device at a fixed time; in some embodiments, the user directly sends the trigger instruction to the switch through a third-party device via wireless transmission. The third-party device includes a terminal device, a remote control, or a computer, etc. In this way, when controlling the controlled device, both local control and remote control can be achieved.

[0086] S500: Generate a corresponding control instruction based on the trigger instruction and the current working mode of the switch, the control instruction is used to control the working state of the controlled device, the working mode includes a rebound mode, and the rebound mode is used to control the opening and closing of the relay.

[0087] In this embodiment, the switch generates control instructions based on trigger commands sent by a terminal device or user, as well as its current operating mode, to control the operating state of the controlled device. Specifically, the rebound mode is used to control controlled devices equipped with a transient power failure detection module. Specifically, different mode configuration instructions correspond to different operating modes of the switch. For example, under the first mode configuration instruction, the switch is set to normal operating mode, while under the second mode configuration instruction, the switch is set to rebound operating mode. Under the third mode configuration instruction, the switch is set to wireless operating mode. In normal operating mode, the mechanical switch is pressed, controlling the opening and closing of a relay to control the operating state of the controlled device. In rebound mode, the relay is closed, and when the mechanical switch is pressed, the relay is controlled to open and then close, generating a transient power failure signal, thereby controlling the operating state of the controlled device. In wireless mode, the relay is closed, and the action of pressing the mechanical switch generates a control instruction to control the operating state of the controlled device. In specific implementations, the switch's operating modes include rebound mode. In rebound mode, the switch controls the relay to open for a preset duration and then close, generating a transient power failure signal of a certain width to control the operating state of the controlled device. In some embodiments, the transient signal is a mixture of direct current and alternating current, which fluctuates around a certain value when the relay is closed. When the relay is disconnected for a preset time and then closed again, the amplitude of the transient signal drops and then rises. The transient detection module can determine whether a transient has occurred by comparing the voltage changes. In other embodiments, the transient signal can also be a pulse signal, wherein the width of the pulse signal is adjustable. In some embodiments, transient signals of different widths can control different types of controlled devices. In other embodiments, transient signals of different widths can control different working states of the same type of controlled devices. Among them, the controlled devices can be lighting lamps, including spotlights, LED lights, etc. They can also be smart air conditioners, fresh air, bathroom heaters, etc. The controlled devices can also be other controllable smart products, which are not limited in this application.

[0088] In a specific implementation, the rebound mode is used to control the relay to disconnect for a preset time and then close to generate a transient signal. For controlled devices that support the recognition of transient signals, the switch can be set to use the "rebound mode" and support the configuration of the time interval of the transient signal to adapt to products from different manufacturers (different manufacturers may have different widths for transient signals). Since the rebound mode can still control the controlled device when it is offline, the switch can also shut down the controlled device without switching to offline mode when the controlled device is offline.

[0089] Compared to the prior art, the embodiments of the present application propose a switch control method that obtains an external trigger instruction and combines the obtained trigger instruction with the current operating mode of the switch to generate a control instruction for controlling the operating state of the controlled device. The switch operating mode includes a rebound mode. In rebound mode, a transient signal is generated by controlling the opening and closing of a relay to control the operating state of the controlled device. This enriches the control form of the switch, improves control efficiency, and enriches the switch operation scenarios.

[0090] Please continue reading Figure 8 In one embodiment, the switch includes a mechanical switch, and step “S400: obtaining a trigger instruction” includes but is not limited to step S410. Step S410 is described as follows.

[0091] S410: Generate a trigger instruction when the mechanical switch is pressed.

[0092] In this embodiment, a trigger instruction for controlling the controlled device is generated by pressing a button of a mechanical switch, which is used to control the working state of the controlled device. Among them, the trigger instruction can be generated by a single-key press trigger, a double-key press trigger, a single-finger press trigger, a multi-finger press trigger, a press trigger along a preset trajectory, etc. In addition, the trigger instruction can also be generated after a single trigger, after multiple triggers, at a fixed time interval, at a variable time interval, at a fixed press time, or at a variable press time. Different triggering methods correspond to different trigger instructions, thereby enriching the types of trigger instructions and making the control of the controlled device more flexible.

[0093] Please continue reading Figure 9 In another embodiment, the switch includes a mechanical switch electrically connected to the relay, the operating mode includes a normal mode, and step "S500: generating a corresponding control instruction based on the trigger instruction and the current operating mode of the switch, the control instruction being used to control the operating state of the controlled device" includes but is not limited to step S510. Step S510 is described as follows.

[0094] S510: When the mechanical switch is pressed and the current working mode is the normal mode, a control instruction for controlling the relay to be closed or opened is generated.

[0095] Specifically, in this embodiment, the switch includes an electrically connected mechanical switch, a processor, and a relay. The mechanical switch controls the opening and closing of the relay via the processor. In normal mode, when the mechanical switch is pressed, it controls the relay to open or close once. Each opening or closing of the relay generates a control instruction for controlling the operating state of the controlled device. In one embodiment, when the mechanical switch is pressed once, the processor controls the relay to close once, generating an electrical signal, which is a control instruction for turning on the controlled device. If the controlled device is a lamp, the control instruction is used to turn the lamp on. When the mechanical switch is pressed again, the processor controls the relay to open once, generating another electrical signal, which is a control instruction for turning off the controlled device. If the controlled device is a lamp, the control instruction is used to turn off the lamp. In this way, even when the controlled device is in offline mode, the state of the controlled device can be controlled by pressing the mechanical switch.

[0096] Please continue reading Figure 10 In another embodiment, the switch includes a mechanical switch electrically connected to the relay, the operating mode includes a wireless mode, and step "S500: generating a corresponding control instruction based on the trigger instruction and the current operating mode of the switch, the control instruction being used to control the operating state of the controlled device" includes but is not limited to step S520. Step S520 is described as follows.

[0097] S520: When the relay is in a closed state, the current working mode is a wireless mode, and the mechanical switch is pressed, the control instruction is generated according to the action of pressing the mechanical switch, and the control instruction includes a wireless signal.

[0098] Specifically, in this embodiment, the switch includes an electrically connected mechanical switch, a processor, and a relay. The mechanical switch controls the opening and closing of the relay via the processor. In wireless mode, the processor recognizes the pressing of the mechanical switch. When the mechanical switch is pressed once, the processor generates an electrical signal, which is a control instruction, including a wireless signal, for controlling the operating state of the controlled device. In one embodiment, when the mechanical switch is pressed once, the processor generates an electrical signal, which is a control instruction, including a wireless signal, for turning on the controlled device. If the controlled device is a lamp, the control instruction is used to control the lamp to illuminate. When the mechanical switch is pressed again, the processor generates another electrical signal, which is a control instruction, including a wireless signal, for turning off the controlled device. If the controlled device is a lamp, the control instruction is used to control the lamp to extinguish. In this way, when the switch is in wireless mode, the state of the controlled device can be remotely controlled by pressing the mechanical switch.

[0099] Please continue reading Figure 11 In another embodiment, step “S500: generating a corresponding control instruction based on the trigger instruction and the current working mode of the switch, wherein the control instruction is used to control the working state of the controlled device” includes but is not limited to steps S530 and S540. Steps S530 and S540 are described as follows.

[0100] S530: Detect instruction information contained in the trigger instruction, where the instruction information includes one or more of trigger times, trigger duration, trigger force, trigger trajectory, single-finger trigger, and multi-finger trigger.

[0101] S540: Generate a control instruction according to the instruction information and the current working mode of the switch, so as to control the working state of the controlled device.

[0102] In some embodiments, the number of triggers corresponds to different command information. Different command information, combined with the current operating mode of the switch, can generate different control instructions. These different control instructions can be used to control different operating states of the controlled device. For example, when the controlled device is a light and the switch is currently operating in normal mode, the command information generated by a single trigger combined with the control instructions generated in the normal operating mode of the switch can be used to control the lighting of the controlled device. The command information generated by a double trigger combined with the control instructions generated in the normal operating mode of the switch can be used to control the flashing of the controlled device. Furthermore, when the switch is in different operating modes, the control instructions also differ, allowing control of different operating states of the controlled device.

[0103] In some embodiments, different trigger durations correspond to different instruction information. Different instruction information combined with the current working mode of the switch can generate different control instructions, and different control instructions can be used to control different working states of the controlled device. For example, when the controlled device is a lamp and the current working mode of the switch is normal mode, the instruction information generated by pressing the switch for 1s combined with the control instruction generated by the normal working mode of the switch is used to control the controlled device to emit light at a first brightness level, and the instruction information generated by pressing the switch for 2s combined with the control instruction generated by the normal working mode of the switch is used to control the controlled device to emit light at a second brightness level. The brightness of the first brightness level is less than the brightness of the second brightness level. In addition, when the switch is in different working modes, the control instructions are also different, which can control different working states of the controlled device.

[0104] In some embodiments, different trigger forces correspond to different instruction information. The trigger force is the force with which the user presses the switch. Different instruction information combined with the current working mode of the switch can generate different control instructions, and different control instructions can be used to control different working states of the controlled device. For example, when the controlled device is a lamp, the current working mode of the switch is normal mode, and the switch is a switch with a speaker, the instruction information generated by the first pressing force combined with the control instruction generated by the normal working mode of the switch is used to control the controlled device to emit light, and the instruction information generated by the second pressing force combined with the control instruction generated by the normal working mode of the switch is used to control the controlled device to turn on the speaker. In addition, when the switch is in different working modes, the control instructions are also different, and different working states of the controlled device can be controlled.

[0105] In some embodiments, different trigger trajectories correspond to different command information. These different command information, combined with the current operating mode of the switch, can generate different control instructions. These different control instructions can be used to control different operating states of the controlled device. The trigger trajectory can be linear or curved. It can be continuous or intermittent within a preset time interval.

[0106] In some implementations, single-finger triggering and multi-finger triggering correspond to different command information. These can be for single-button switches, meaning both trigger the same button. By detecting the number of contacts pressed simultaneously on the switch panel, the triggering can be determined to be single-finger or multi-finger, generating different command information. This, combined with the current operating mode of the switch, can generate different control instructions to control different operating states of the controlled device.

[0107] In some embodiments, single-finger triggering and multi-finger triggering are for two-button switches, and multi-finger triggering can be triggered by two fingers or three fingers, etc. For two-finger triggering, the two fingers correspond to different keys, and the number and position of the pressed contacts on the switch panel can be detected to determine whether it is a single-finger trigger or a two-finger trigger.

[0108] It should be noted that the above-mentioned instruction information can be combined in any way in different orders to generate different instruction information, and then generate different control instructions to control different working states of the controlled equipment, which helps to enrich the number of instructions of the switch and improve the application scope of the switch.

[0109] Please continue reading Figure 12 The present application also provides a switch control method. The switch includes a relay. The method includes but is not limited to steps W100, W200, and W300. Steps W100, W200, and W300 are described below.

[0110] W100: Get trigger command. The details of getting trigger command have been described above and will not be repeated here.

[0111] W200: Generate a control instruction for controlling the opening and closing of the relay based on the trigger instruction.

[0112] W300: controls the working state of the controlled device according to the control instructions.

[0113] Specifically, the switch has built-in normal mode, rebound mode, and wireless mode. In normal operation mode, pressing the mechanical switch generates a trigger command, which controls the operating state of the controlled device by opening and closing the relay. In rebound mode, the relay is in the closed state, and pressing the mechanical switch generates a trigger command, which controls the relay to first open and then close, generating a momentary interrupt signal, thereby controlling the operating state of the controlled device. In wireless mode, the relay is in the closed state, and pressing the mechanical switch generates a control command to control the operating state of the controlled device.

[0114] Compared with the prior art, an embodiment of the present application proposes a switch control method, wherein the switch includes a relay, and the opening and closing of the relay are controlled by the acquired trigger instruction to generate a momentary off signal, which is used to control the working state of the controlled device, thereby enriching the control method of the switch.

[0115] Please continue reading Figure 13 In some embodiments, step W200 includes but is not limited to step W210, and step W210 is described as follows.

[0116] W210: When the relay is in a closed state and the mechanical switch is pressed, the relay is controlled to be opened for a first time period and then closed to generate the control instruction.

[0117] Specifically, in the rebound mode, the relay is controlled to first open and then close to generate a momentary disconnection signal. The momentary disconnection signal serves as a control instruction to control the working state of the controlled device with the momentary disconnection detection module, thereby realizing state control of a specific type of controlled device.

[0118] Please continue reading Figure 14 In some embodiments, before step W210, the method includes but is not limited to steps W201 and W202. Steps W201 and W202 are described as follows.

[0119] W201: Get pulse information.

[0120] W202: Determine the first duration based on the pulse information.

[0121] Specifically, in this embodiment, the switch is in rebound mode and can first obtain pulse information, wherein the pulse information includes the content of the first duration. The pulse information can be directly sent to the switch by a third-party device via wireless transmission. The third-party device includes a terminal device, a remote control or a computer, etc., and then the first duration is determined based on the regulation of the pulse information. The first duration is the time interval between the relay being disconnected and then closed. In this way, the action of the relay can be flexibly adjusted, and different relay actions can correspond to different control instructions, thereby enriching the control method of the switch.

[0122] Please continue reading Figure 15 In some embodiments, step W200 includes but is not limited to step W220, and step W220 is described as follows.

[0123] W220: When the mechanical switch is pressed, the control instruction for controlling the relay to be closed or opened is generated.

[0124] Specifically, when the switch is in normal mode, the mechanical switch can directly control the operating state of the relay. Pressing the mechanical switch controls the closing or opening of the relay, thereby generating a control instruction for controlling the controlled device. In other words, in this embodiment, the operating state of the controlled device can be controlled directly by controlling the mechanical switch.

[0125] Please continue reading Figure 16 In some embodiments, step W200 includes but is not limited to step W230, and step W230 is described as follows.

[0126] W230: When the relay is in a closed state and the mechanical switch is pressed, the control instruction is generated according to the action of pressing the mechanical switch, and the control instruction includes a wireless signal.

[0127] Specifically, in wireless mode, the mechanical switch does not control the relay. The relay remains in the on state. When the local mechanical switch is pressed, the relay remains closed. The switch's processor detects this key press and wirelessly sends control commands to the controlled device to adjust its operating state.

[0128] Please continue reading Figure 17 In some embodiments, after step W100, the method includes but is not limited to step W110, and step W110 is described as follows.

[0129] W110: Detect instruction information contained in the trigger instruction, where the instruction information includes one or more of trigger times, trigger duration, trigger force, trigger trajectory, single-finger trigger, and multi-finger trigger.

[0130] Step W200 includes but is not limited to step W240, and step W240 is introduced as follows.

[0131] W240: Generate a first instruction for controlling the relay to be opened and a second instruction for controlling the relay to be closed according to the instruction information.

[0132] The first and second instructions are time-sequenced instructions. Regarding the instruction information, please refer to the previous discussion and will not be repeated here. Based on different instruction information, different control instructions for the relay can be generated, thereby controlling different operating states of the controlled device. This helps to enrich the control methods of the switch.

[0133] Please continue reading Figure 18 The embodiment of the present application further provides a switch control device 30D, which includes but is not limited to an acquisition module 600, a generation module 700 and a control module 800. The acquisition module 600, the generation module 700 and the control module 800 are introduced as follows.

[0134] The acquisition module 600 is used to acquire a trigger instruction.

[0135] The generating module 700 is configured to generate a control instruction for controlling the opening and closing of the relay based on the trigger instruction.

[0136] The control module 800 is used to control the working state of the controlled device according to the control instruction.

[0137] Please continue reading Figure 19In some embodiments, the generation module 700 includes but is not limited to a fifth generation submodule 710, and the fifth generation submodule 710 is used to control the relay to first open for a first time length and then close when the relay is in a closed state and the mechanical switch is pressed, so as to generate the control instruction.

[0138] Please continue reading Figure 20 In some embodiments, the apparatus further includes but is not limited to a first acquisition module 610 and a second determination module 620, wherein the first acquisition module 610 is configured to acquire a transient interruption signal and the second determination module 620 is configured to determine the first duration based on the transient interruption signal.

[0139] Please continue reading Figure 21 In some embodiments, the generation module 700 includes but is not limited to a sixth generation submodule 720, and the sixth generation submodule 720 is used to generate the control instruction for controlling the relay to be closed or opened when the mechanical switch is pressed.

[0140] Please continue reading Figure 22 In some embodiments, the generation module 700 includes but is not limited to a seventh generation submodule 730, and the seventh generation submodule 730 is used to generate the control instruction according to the action of pressing the mechanical switch when the relay is in a closed state and the mechanical switch is pressed, and the control instruction includes a wireless signal.

[0141] Please continue reading Figure 23 In some embodiments, the device further includes, but is not limited to, a first detection module 850 configured to detect instruction information contained in the trigger instruction, wherein the instruction information includes one or more of trigger count, trigger duration, trigger force, trigger trajectory, single-finger triggering, and multi-finger triggering. The generation module 700 includes, but is not limited to, an eighth generation submodule 740 configured to generate, based on the instruction information, a first instruction for controlling the opening of the relay and a second instruction for controlling the closing of the relay.

[0142] Please continue reading Figure 24 An embodiment of the present application provides a switch control method, which is applied to a switch system having a switch and a terminal device. The method includes but is not limited to steps W400 and W500. Steps W400 and W500 are introduced as follows.

[0143] W400: The terminal device receives the mode configuration instruction and sends the mode configuration instruction to the switch.

[0144] Among them, the mode configuration instruction can be a binary number, a hexadecimal number, a current signal or other instruction types, and the specific instruction type can be pre-set. The mode configuration instruction can be generated on the terminal device and sent to the switch through the gateway. The mode configuration instruction can be generated after being triggered by the user, or it can be automatically triggered by the terminal device at a fixed time. In some embodiments, the user directly sends the mode configuration instruction to the switch through a third-party device via wireless transmission. The third-party device includes a terminal device, a remote control or a computer, etc. In this way, when configuring the working mode of the switch, it is possible to achieve local configuration or configure the working mode of the switch remotely.

[0145] W500: The switch switches to the working mode corresponding to the mode configuration instruction according to the mode configuration instruction, wherein the working mode includes a rebound mode, and the rebound mode is used to control the relay to disconnect for a preset time and then close.

[0146] The rebound mode is used to control controlled devices equipped with a momentary interruption detection module. The momentary interruption detection module detects momentary interruptions, i.e., the phenomenon of a momentary interruption of the AC power supply, and controls the controlled device's operation, such as turning it on or off, based on this signal. Specifically, different mode configuration instructions correspond to different operating modes of the switch. For example, under the first mode configuration instruction, the switch is set to normal operating mode, while under the second mode configuration instruction, the switch is set to rebound operating mode. Under the third mode configuration instruction, the switch is set to wireless operating mode. In normal operating mode, the mechanical switch is pressed, and the operating state of the controlled device is controlled by opening and closing the relay. In rebound mode, the relay is closed, and when the mechanical switch is pressed, the relay is controlled to open and then close, generating a momentary interruption signal, thereby controlling the operating state of the controlled device. In wireless mode, the relay is closed, and pressing the mechanical switch generates a control instruction to control the operating state of the controlled device. In specific implementations, the switch's operating mode includes a rebound mode. In rebound mode, the switch controls the relay to open for a preset duration and then close, generating a transient signal of a certain width for controlling the operating state of the controlled device. In some embodiments, the transient signal is a mixture of DC and AC currents that fluctuates around a certain value when the relay is closed. When the relay is closed again after a preset time, the amplitude of the transient signal drops and then rises. The transient detection module determines whether a transient has occurred by comparing the voltage changes. In other embodiments, the transient signal can also be a pulse signal with an adjustable pulse width. In some embodiments, transient signals of different widths can control different types of controlled devices. In other embodiments, transient signals of different widths can control different operating states of the same type of controlled device. The controlled device can be a lighting fixture, including a spotlight, an LED light, etc. It can also be a smart air conditioner, a fresh air conditioner, a bathroom heater, etc. The controlled device can also be other controllable smart products, which are not limited in this application.

[0147] Compared to the prior art, the embodiments of the present application propose a switch control method, which is applied to a switch system. A terminal device receives a mode configuration instruction, which is then sent to a switch. The switch switches to the operating mode corresponding to the mode configuration instruction based on the mode configuration instruction, thereby enabling interaction between the terminal device and the switch. By configuring the mode configuration instruction on the terminal device, the operating mode of the switch is switched. The operating modes of the switch include a rebound mode. In rebound mode, a relay is controlled to first open and then close to generate a transient signal, which is used to control the operating state of the controlled device. This improves control efficiency and enriches the switch operation scenarios.

[0148] Please continue reading Figure 25In some embodiments, before step W400, the method further includes but is not limited to step W380, and step W380 is described as follows.

[0149] W380: Create a mode selection box on the terminal device and display the mode selection box on the terminal device. The mode selection box includes the content of the mode configuration instruction.

[0150] Specifically, the terminal device has a visual mode selection box interface, which contains the specific content of the mode configuration instructions. By switching the interface of the mode selection box on the terminal device and selecting the mode configuration instructions, the corresponding control instructions can be generated. The control instructions are transmitted to the controlled device through a gateway or other forms to control the working status of the controlled device.

[0151] Please continue reading Figure 26 In some embodiments, the method further includes but is not limited to step W600, and step W600 is described as follows.

[0152] W600: The terminal device receives switch offline information, where the offline information is used to indicate that the switch has not reported a message within a preset period.

[0153] Specifically, when the switch is in offline mode, it sends offline mode feedback information to the gateway. The gateway then sends this feedback information to the terminal device, which then displays the switch's offline mode status on the terminal device. The offline information indicates that the switch has not reported a message to the gateway within a preset period. This embodiment allows the switch's offline mode to be visually displayed on the terminal device, allowing the user to clearly observe the switch's status and perform actions such as reconnecting or replacing the switch, creating a more intelligent experience.

[0154] Please continue reading Figure 27 In some embodiments, the method further includes but is not limited to steps W650, W660, W670 and W680. Steps W650, W660, W670 and W680 are described as follows.

[0155] W650: The switch sends message information to the terminal device at a preset interval.

[0156] Specifically, the switch can send messages to a gateway or server at preset intervals. The gateway or server then determines whether the connection between the switch and the terminal device is normal based on the messages sent by the switch. Alternatively, the gateway or server forwards the messages sent by the switch to the terminal device, which then uses the terminal device to determine whether the interaction between the switch and the terminal device is normal.

[0157] W660: The terminal device determines whether the switch disconnects the communication connection with the terminal device within the preset time period based on the message information.

[0158] The terminal device, gateway or server determines whether the switch has disconnected the communication connection with the terminal device within a preset time period based on the message information sent by the switch. This process can be performed on the terminal device, the gateway or the server.

[0159] W670: When the communication connection between the switch and the terminal device is disconnected within the preset time period, the terminal device detects whether the switch re-establishes the communication connection with the terminal device.

[0160] In this embodiment, the action of detecting whether the switch re-establishes the communication connection with the terminal device can be completed on the terminal device, or on the gateway or server.

[0161] W680: If the switch re-establishes a communication connection with the terminal device, the terminal device switches the switch to a target mode, where the target mode is the working mode before the switch disconnects the communication connection with the terminal device.

[0162] Specifically, if the terminal device, gateway, or server detects that the switch has reestablished a communication connection with the terminal device, the terminal device sends a control instruction to switch the switch back to the operating mode it was in before the communication connection with the terminal device was disconnected. This allows the switch to quickly return to the operating mode it was in before the connection with the terminal device was disconnected, without the need for reconfiguration.

[0163] Please continue reading Figure 28 In some embodiments, the method further includes but is not limited to steps W700 and W710. Steps W700 and W710 are described as follows.

[0164] W700: Establish a binding relationship or communication connection between the terminal device and the first switch, where the terminal device stores first attribute information of the first switch and configuration information of the first switch, where the first attribute information includes one or more of the model, working mode, and network access parameters of the first switch.

[0165] W710: The terminal device determines that the binding relationship with the first switch is released or an abnormality occurs in the communication connection, and the terminal device controls the second switch according to the configuration information of the first switch.

[0166] Specifically, when a binding relationship or communication connection is established between the terminal device and the first switch, the terminal device will store first attribute information of the first switch and configuration information of the first switch. The first attribute information includes information such as the model, operating mode, and network access parameters of the first switch. The configuration information of the first switch includes configuration parameters when the binding relationship or communication connection is established between the first switch and the terminal device. When the terminal device determines that the binding relationship or communication connection between the first switch and the terminal device has been terminated or the communication connection has been disconnected, the terminal device uses the configuration information of the first switch to configure the second switch.

[0167] Furthermore, when the second switch is of the same model as the first switch, the terminal device uses the same control strategy as the first switch to control the second switch, thereby eliminating the need to reconfigure the second switch and improving the response speed when pairing the second switch with the terminal device.

[0168] When the second switch is of a different model from the first switch, the configuration information of the first switch can be used for reference, and a control strategy similar to that of the first switch can be adopted to control the second switch.

[0169] Please continue reading Figure 29 In some embodiments, the method further includes but is not limited to steps W750, W760, W770, W780 and W790. Steps W750, W760, W770, W780 and W790 are described as follows.

[0170] W750: Establish a binding relationship or communication connection between the terminal device and the first controlled device, where the terminal device stores third attribute information of the first controlled device, and the third attribute information includes one or more of the model and network access parameters of the first controlled device.

[0171] W760: The terminal device determines that the binding relationship with the first controlled device is released or an abnormality occurs in the communication connection.

[0172] W770: The terminal device establishes a binding relationship or a communication connection with the second controlled device.

[0173] W780: The terminal device determines whether the fourth attribute information of the second controlled device is the same as the third attribute information of the first controlled device.

[0174] W790: When the fourth attribute information is different from the third attribute information, the terminal device reconfigures the switch according to the attribute information of the first controlled device.

[0175] Specifically, in this embodiment, a binding relationship or a communication connection is established between the terminal device and the first controlled device, and the working state of the first controlled device can be controlled by the terminal device. At this time, the third attribute information of the first controlled device is stored on the first terminal device, and the third attribute information includes but is not limited to the model of the first controlled device, the network access parameters, etc. When the terminal device determines that the binding relationship between the first controlled device and the terminal device is released or the communication connection between the first controlled device and the terminal device is disconnected, the terminal device establishes a binding relationship or a communication connection with the second controlled device. And in this process, when the terminal device determines that the fourth attribute information of the second controlled device is the same as the third attribute information of the first controlled device, the binding relationship or the communication connection between the second controlled device and the terminal device is directly established. When the terminal device determines that the fourth attribute information of the second controlled device is different from the third attribute information of the first controlled device, the terminal device uses the attribute information of the first controlled device to reconfigure the switch.

[0176] Please continue reading Figure 30 In some embodiments, the method further includes but is not limited to steps W800, W810, W820 and W830. Steps W800, W810, W820 and W830 are described as follows.

[0177] W800: The terminal device receives a mode configuration instruction corresponding to the rebound mode, and sends the mode configuration instruction to the switch.

[0178] W810: The switch switches to rebound mode according to the mode configuration instructions.

[0179] W820: The switch generates a momentary disconnection signal in the rebound mode and sends the momentary disconnection signal to the controlled device.

[0180] W830: The controlled device receives the instantaneous disconnection signal and performs a corresponding action according to the instantaneous disconnection signal.

[0181] In one embodiment, a terminal device receives a mode configuration command input by a user and transmits it to a switch. Upon receiving the command, the switch switches to rebound mode in accordance with the command. In rebound mode, the switch generates a transient signal and transmits it as a control command to the controlled device. Upon receiving the transient signal, the controlled device switches to a different operating state based on the transient signal. Interaction between the terminal device and the switch enables switching between different switch modes. The switch can achieve different control of the controlled device in different modes, making the overall control process more flexible.

[0182] Please continue reading Figure 31In some embodiments, the method further includes but is not limited to step W840, and step W840 is described as follows.

[0183] W840: If the terminal device determines that the binding relationship with the controlled device is released or an abnormality occurs in the communication connection, the switch remains in the rebound mode.

[0184] Specifically, when the terminal device detects that the binding relationship between the terminal device and the controlled device has been unbound or the communication connection has been disconnected, it indicates that the operating status of the controlled device cannot be directly controlled through the terminal device application. Therefore, the terminal device maintains the switch in rebound mode. By pressing the mechanical switch, the control relay first opens and then closes, generating a transient signal, which is used to control the controlled device. In other words, when the terminal device cannot control the operating status of the controlled device, it can still control the operating status of the controlled device through the mechanical switch.

[0185] Please continue reading Figure 32 In some embodiments, step "W830: the controlled device receives the transient signal and performs a corresponding action according to the transient signal" includes but is not limited to steps W831 and W832. Steps W831 and W832 are described as follows.

[0186] W831: The controlled device receives the first momentary interruption signal and performs a first action according to the first momentary interruption signal.

[0187] W832: The controlled device receives a second interruption signal and performs a second action according to the second interruption signal, wherein the first interruption signal is different from the second interruption signal, and the first action is different from the second action.

[0188] Specifically, in this embodiment, the switch generates different types of transient interrupt signals, which are used to control the controlled device to perform different actions. Different types of transient interrupt signals can refer to different numbers of voltage drops or different durations in the transient interrupt signals. The controlled device is a device equipped with a transient interrupt detection module. By generating different transient interrupt signals, the types of control instructions for the controlled device can be enriched, thereby providing a wider range of control methods for the controlled device and making the switch control more flexible and varied.

[0189] Please continue reading Figure 33 In some embodiments, step "W830: the controlled device receives the transient signal and performs a corresponding action according to the transient signal" includes but is not limited to steps W835 and W836. Steps W835 and W836 are described as follows.

[0190] W835: The controlled device compares the transient interruption signal with a target transient interruption signal, and the target transient interruption signal is a transient interruption signal that matches the controlled device.

[0191] W836: When the comparison between the transient outage signal and the target transient outage signal fails, the controlled device sends a feedback signal to at least one of the terminal device and the switch.

[0192] In this embodiment, the controlled device can only recognize certain types of transient signals. If the transient signal fails to compare with the target transient signal, it indicates that the controlled device cannot recognize the transient signal, which means that the controlled device cannot be controlled using this transient signal. In this case, the controlled device sends a feedback signal to the terminal device; alternatively, the controlled device sends a feedback signal to the switch through the gateway, indicating that the transient signal cannot be recognized and that the switch operating mode needs to be switched to another mode to control the controlled device. This approach can prevent the controlled device from being uncontrollable due to the transient signal not being recognized by the controlled device.

[0193] Please continue reading Figure 34 The present application also provides a switch system 10, comprising a switch 14 and a terminal device 11. The switch 14 comprises a relay. The terminal device 11 is configured to receive a mode configuration instruction and transmit the mode configuration instruction to the switch 14. The switch 14 is configured to switch to an operating mode corresponding to the mode configuration instruction according to the mode configuration instruction. The operating mode includes a rebound mode, wherein the rebound mode controls the relay to open after a preset time duration and then close. This part has been previously introduced and will not be repeated here.

[0194] Figure 35 1 is a hardware structure diagram of the switch 14 provided in an embodiment of the present invention. Figure 35As shown, the switch 14 can vary significantly depending on its configuration or performance. It may include one or more processors 14a (Processing Units, CPUs) (processor 14a may include, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA), a processing device), a memory 14b for storing data 1400, one or more storage media 1600 (e.g., one or more mass storage devices) for storing application programs 1500 or data 1400, a relay J, and a mechanical switch K. Processor 14a is connected to relay J, mechanical switch K, memory 14b, and storage medium 1600, respectively. Memory 14b and storage medium 1600 may be either ephemeral or persistent storage. The program stored in storage medium 1600 may include one or more modules, each of which may include a series of instructions for operating on a server. Furthermore, processor 14a may be configured to communicate with storage medium 1600 to execute the series of instructions stored in storage medium 1600 on switch 14.

[0195] When the mechanical switch K is pressed, the processor 14a will receive a signal instruction of being pressed. The relay J is a controlled switch connected to the control end of the processor 14a. The processor 14a 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.

[0196] The switch 14 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 Windows server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0197] The input / output interface 1200 can be used to receive or send data 1400 via a network. Specific examples of the aforementioned network may include a wireless network provided by a communication provider of the switch 14. In one embodiment, the input / output interface 1200 includes a network adapter (NIC), which can be connected to other network devices via a base station so as to communicate with the Internet. In one embodiment, the input / output interface 1200 can 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 Figure 35 The structure shown is only for illustration and does not limit the structure of the switch 14. For example, the switch 14 may also include Figure 35More or fewer components than shown, or with Figure 35 Different configurations shown.

[0198] Figure 36 A schematic diagram of the hardware structure of a terminal device for implementing various embodiments of the present invention.

[0199] The terminal device 11 includes but is not limited to: a radio frequency unit 1210, a network module 1220, an audio output unit 1230, an input unit 1240, a sensor 1250, a display unit 1260, a user input unit 1270, a user input unit 1280, a memory 1290, a processor 2000, and a power supply 1310. Those skilled in the art will understand that Figure 36 The terminal device structure shown in the figure does not constitute a limitation on the terminal device. The mobile terminal may include more or fewer components than shown, or may combine certain components, or arrange the components differently. In the embodiments of the present invention, the terminal device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle terminal device, a wearable device, and a pedometer.

[0200] Among them, the processor 2000 is used to determine whether the target height information sent by the terminal device is obtained within a preset time period, and the target height information is the height information corresponding to the time period searched by the terminal device according to the time period at the current moment; if the target height information sent by the terminal device is obtained within the preset time period, the height of the clothes rack is adjusted according to the target height information.

[0201] It should be understood that in this embodiment of the present invention, 1210 can be used to receive and transmit signals during information transmission or calls. Specifically, it receives downlink data from the base station and transmits it to the processor 2000 for processing; in addition, it transmits uplink data to the base station. Typically, 1210 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and the like. Furthermore, 1210 can communicate with the network and other devices via a wireless communication system.

[0202] The terminal device provides users with wireless broadband Internet access through the network module 1220, such as helping users to send and receive emails, browse web pages, and access streaming media.

[0203] The audio output unit 1230 can convert audio data received by the terminal 1210 or the network module 1220 or stored in the memory 1290 into an audio signal and output it as sound. In addition, the audio output unit 1230 can also provide audio output related to a specific function performed by the terminal device 11 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 1230 includes a speaker, a buzzer, a receiver, etc.

[0204] The input unit 1240 is used to receive audio or video signals. The input unit 1240 may include a graphics processing unit (GPU) 1041 and a microphone 1242. The graphics processor 1241 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 1260. The image frame processed by the graphics processor 1241 can be stored in the memory 1290 (or other storage medium) or sent via 1210 or the network module 1220. The microphone 1242 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via 1210 in the case of a telephone call mode.

[0205] The terminal device 11 also includes at least one sensor 1250, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1261 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1261 and / or the backlight when the terminal device 11 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used to identify the posture of the terminal device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 1250 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.

[0206] The display unit 1260 is used to display information input by the user or information provided to the user. The display unit 1260 may include a display panel 1261, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0207] The user input unit 1270 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the terminal device. Specifically, the user input unit 1270 includes a touch panel 1271 and other input devices 1272. The touch panel 1271, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using any suitable object or accessory such as a finger, stylus, etc. on or near the touch panel 1271). The touch panel 1271 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal caused by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into contact point coordinates, which are then sent to the processor 2000, which receives the command sent by the processor 2000 and executes it. In addition, the touch panel 1271 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1271, the user input unit 1270 may further include other input devices 1272. Specifically, other input devices 1272 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and an operating stick, which are not described in detail here.

[0208] Furthermore, the touch panel 1271 may be overlaid on the display panel 1261. When the touch panel 1271 detects a touch operation on or near it, it transmits the information to the processor 2000 to determine the type of touch event. The processor 2000 then provides corresponding visual output on the display panel 1261 according to the type of touch event. Figure 36 In the figure, the touch panel 1271 and the display panel 1261 are two independent components to realize the input and output functions of the terminal device. However, in some embodiments, the touch panel 1271 and the display panel 1261 can be integrated to realize the input and output functions of the terminal device, which is not limited here.

[0209] The user input unit 1280 is an interface for connecting an external device to the terminal device 11. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The user input unit 1280 can be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more components within the terminal device 11, or can be used to transmit data between the terminal device 11 and an external device.

[0210] Memory 1290 can be used to store software programs and various data. Memory 1290 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function or an image playback function); the data storage area may store data generated based on the use of the phone (such as audio data, a phone book, etc.). Furthermore, memory 1290 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state memory device.

[0211] The processor 2000 is the control center of the terminal device. It connects the various components of the entire terminal device using various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 1290 and accessing data stored in the memory 1290, it performs various terminal device functions and processes data, thereby providing overall monitoring of the terminal device. The processor 2000 may include one or more processing units; preferably, the processor 2000 may integrate an application processor and a modem processor. The application processor primarily processes the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into the processor 2000.

[0212] The terminal device 11 may also include a power supply 1310 (such as a battery) to supply power to each component. Preferably, the power supply 1310 may be logically connected to the processor 2000 through a power management system, thereby managing functions such as charging, discharging, and power consumption management through the power management system.

[0213] In addition, the terminal device 11 includes some functional modules not shown, which will not be described here.

[0214] An embodiment of the present invention also provides a terminal device, including a processor 2000, a memory 1290, and a computer program stored in the memory 409 and runnable on the processor 2000. When the computer program is executed by the processor 410, the various processes of the above-mentioned working mode configuration method and the switch control method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they will not be described here.

[0215] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements the various processes of the above-mentioned working mode configuration method and switch control method embodiments, and can achieve the same technical effects. To avoid repetition, the details are not described here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0216] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

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

[0218] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are protected by the present invention.

Claims

1. A switch control method, characterized in that: The switch includes a relay and a mechanical switch connected to the relay, and the method includes: Obtain a trigger instruction; the trigger instruction includes instruction information, and the instruction information includes one or more of the following: trigger number, trigger duration, trigger force, trigger trajectory, single-finger trigger, and multi-finger trigger; Based on the trigger instruction, it is determined that the relay is in a closed state, and when the mechanical switch is pressed, the relay is controlled to be opened for a first time period and then closed, so as to generate a control instruction; the control instruction is used to control the working state of the controlled device having the instantaneous disconnection detection module; Wherein, when the relay is in a closed state and the mechanical switch is pressed, the switch is in a rebound mode, and the switch being in the rebound mode is related to the attribute information of the controlled device, and the attribute information includes one or more of a model and a network access parameter; The working state of the controlled device is controlled according to the control instruction.

2. The method according to claim 1, wherein Before controlling the relay to be opened for a first time period and then closed, the method includes: Get pulse information; The first duration is determined according to the pulse information.

3. The method according to any one of claims 1 to 2, characterized in that The method further comprises: When the mechanical switch is pressed, the control instruction for controlling the relay to be closed or opened is generated.

4. The method according to any one of claims 1 to 2, wherein: The method further comprises: When the relay is in a closed state and the mechanical switch is pressed, the control instruction is generated according to the action of pressing the mechanical switch, and the control instruction includes a wireless signal.

5. The method according to any one of claims 1 to 2, wherein: The step of determining that the relay is in a closed state based on the trigger instruction and that the mechanical switch is pressed, controlling the relay to be opened for a first time period and then closed to generate a control instruction, includes: A first instruction for controlling the relay to be opened for a first time period and a second instruction for controlling the relay to be closed are generated according to the instruction information.

6. The method according to claim 5, wherein The first instruction and the second instruction are instructions with a time sequence.

7. A switch control device, characterized in that: The device comprises: An acquisition module is used to acquire a trigger instruction; the trigger instruction includes instruction information, and the instruction information includes one or more of the following: trigger number, trigger duration, trigger force, trigger trajectory, single-finger trigger, and multi-finger trigger; A generation module, configured to determine, based on the trigger instruction, that the relay is in a closed state and the mechanical switch is pressed, control the relay to first open for a first duration and then close, thereby generating a control instruction; the control instruction is used to control the working state of a controlled device having a momentary disconnection detection module; when the relay is in a closed state and the mechanical switch is pressed, the switch is in a rebound mode, and the switch being in the rebound mode is related to attribute information of the controlled device, the attribute information including one or more of a model and a network access parameter; The control module is used to control the working state of the controlled device according to the control instruction.

8. A switch, characterized in that: The switch includes a processor, a memory, and a computer program stored in the memory and executable by the processor. When the computer program is executed by the processor, the steps of the switch control method according to any one of claims 1 to 6 are implemented.

9. 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 steps of the switch control method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Intelligent parking lot information collector based on double-frequency GSM / GPRS module

    CN104933888A

  • On-off control system

    CN203563230U

  • Method for operating and programming switches, in particular light switches

    EP1973208A2