Switching device and control method thereof

By adopting a new power control solution in smart homes, using user interaction modules and connection control modules to achieve temporary reversal of load circuit control status, the problem that traditional power control methods cannot adapt to the complex control needs of smart homes is solved, and flexible and efficient control of smart load devices is achieved.

CN120143659APending Publication Date: 2025-06-13WUHAN LINPTECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510084047.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-18
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

Traditional power control methods cannot adapt to the increasingly diverse load types and complex control needs in modern smart homes, and are especially unable to achieve flexible control of smart load devices.

Method used

It provides a switching device and its control method. It adopts a new power control scheme. It receives a designated operation through the user interaction module, and switches to a control action opposite to the current control action, and returns to the original control action after a specified time to realize a temporary reversal of the load circuit control state.

Benefits of technology

It realizes flexible control of intelligent load equipment, avoids the impact of long-term power outage on load equipment, adapts to the working characteristics of different load equipment, and ensures the effective transmission of control instructions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120143659A_ABST
    Figure CN120143659A_ABST
Patent Text Reader

Abstract

The invention relates to switch equipment and a control method thereof, and the switch equipment comprises a user interaction module which is used for receiving user operation; the power supply access port is used for accessing a power line; the control lead-out port is used for leading out a control line; the connection control module is arranged between the power supply access port and the control access port and can be switched among a plurality of control actions, different control actions correspond to different connection states between the power supply access port and the control access port, and each connection state corresponds to a specific control state of the load circuit; the processing module is electrically connected with the user interaction module and the connection control module and is set to have a first trigger mode, so that the connection control module is controlled to be switched to a control action opposite to the current control action according to a specified operation received by the user interaction module, and after the opposite control action is maintained for a specified time, the connection control module is switched to the control action opposite to the current control action. And the original control action is recovered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of smart home, and particularly to a switching device and a control method thereof. Background Art

[0002] With the rapid development of smart home technology, more and more intelligent devices are widely used in home, commercial and industrial environments.

[0003] Traditional power control methods mainly rely on simple full-on and full-off methods, that is, the load device is fully turned on or off through a switch. This simple power control method obviously can no longer meet the increasingly diverse load types and complex control requirements in modern smart homes. Summary of the Invention

[0004] An object of the present disclosure is to provide a switching device and a control method thereof, in which a new power control scheme is adopted to provide a more flexible and efficient control method to achieve flexible control of intelligent load devices.

[0005] Another object of the present disclosure is to provide a switching device and a control method thereof, in which according to the specified operation received by the user interaction module, the connection control module is controlled to switch to a control action opposite to the current control action, and after maintaining the opposite control action for a specified time, it returns to the original control action, so as to realize a temporary reversal of the control state of the load circuit, and finally, a special control instruction can be transmitted to the load device while keeping the original control state unchanged.

[0006] Another object of the present disclosure is to provide a switching device and a control method thereof, in which the specified time is not fixed but variable, that is, the user or the system can adjust it according to needs. This makes the control of the switching device more flexible and can be adjusted according to specific usage scenarios.

[0007] Another object of the present disclosure is to provide a switching device and a control method thereof, in which after the temporary reversal state lasts for a specified time, the processing module will trigger the connection control module to return to the original control action to restore the control state of the load circuit (that is, finally keep the control state of the load circuit unchanged). This process is automatically completed without additional intervention or operation by the user.

[0008] Another object of the present disclosure is to provide a switching device and a control method thereof, in which the processing module can intelligently adjust the control state of the load circuit according to the user's operation and the preset specified time to avoid the impact of long-term power-off on the load device.

[0009] Another object of the present disclosure is to provide a switching device and a control method thereof, wherein by freely defining a specified time, a user can adjust the length of the "temporary reverse" time of the load circuit control according to actual needs, so as to adapt to the control requirements of various types of loads.

[0010] Another object of the present disclosure is to provide a switching device and a control method thereof, wherein by dynamically adjusting the reverse cycle according to the type of load device, the switching device can better adapt to the operating characteristics of different load devices, and ensure that each device can correctly respond to the control instruction triggered by "temporary reverse" within a specific time period.

[0011] Another object of the present disclosure is to provide a switching device and a control method thereof, wherein the corresponding specified time determined by the setting instruction needs to be set such that when the connection control module resumes the connection operation, the load connected to the control line is still in the powered-on state, so as to achieve the instantaneous disconnection and restoration of the load circuit. Thus, when an intelligent load device is connected to the load circuit formed by the control line, corresponding control instructions are generated by the way of instantaneously disconnecting and restoring the power supply of the load circuit.

[0012] Another object of the present disclosure is to provide a switching device and a control method thereof, wherein a switching device capable of freely defining the mapping relationship between a key and a switch is provided, so as to realize the flexible mapping between the key and the switch, and improve the applicability flexibility of the switching device.

[0013] To achieve at least one of the above objects, a first aspect of the present invention provides a switching device, including: a user interaction module for receiving user operations; a power access port for accessing a power line; a control output port for outputting a control line; a connection control module disposed between the power access port and the control output port, capable of switching between multiple control actions, wherein different control actions correspond to different connection states between the power access port and the control output port, and each connection state corresponds to a specific control state of the load circuit; a processing module electrically connected to the user interaction module and the connection control module respectively, and configured to have a first trigger mode, so as to be able to: according to a specified operation received by the user interaction module, control the connection control module to switch to a control action opposite to the current control action, and after maintaining the opposite control action for a specified time, resume to the original control action.

[0014] In some embodiments, the processing module is further configured to: before controlling the connection control module to switch to a control action opposite to the current control action, obtain a setting instruction for determining the corresponding specified time, and the setting instruction can be manually set and / or automatically set according to the load type.

[0015] In some embodiments, the processing module is further configured to: automatically resume the original control action after maintaining the opposite control action for a specified time.

[0016] In some embodiments, the user interaction module includes a button, and the specified operation includes a pressing operation and a releasing operation on the button; wherein: there is an interval time between the pressing operation and the releasing operation; the specified time is set to be greater than or equal to the interval time, and / or varies proportionally according to the interval time.

[0017] In some embodiments, the processing module controls the connection control module to switch to a control action opposite to the current control action, specifically: controlling the connection control module to switch to a disconnection action opposite to the current connection action, and resuming to the original connection action after maintaining the disconnection action for a specified time; wherein, the specified time is set such that when the connection control module resumes the connection action, the load connected to the control line is still in the powered-on state.

[0018] In some embodiments, the user interaction module includes a plurality of buttons, and the connection control module includes a plurality of switches; the processing module is further configured to be able to: detect whether an operation is applied to the user interaction module; if an operation applied by the user is detected, determine the target button; the target button is the button to which the operation is applied among the plurality of buttons; according to the determined target button, determine the target mapping relationship that matches the target button in the latest multiple mapping relationships; control the switch defined by the target mapping relationship to perform the corresponding control action; wherein each mapping relationship defines the mapping relationship between at least one button information and at least one switch information; the mapping relationship is predefined by the user in advance through a smart terminal; the button information characterizes at least one of the following: the button to which the operation is applied among the plurality of buttons, the type of operation applied to the button; the switch information characterizes at least one of the following: the switch that needs to perform the control action among the plurality of switches, the specific control action performed by the switch.

[0019] To achieve at least one of the above purposes, a second aspect of the present invention provides a method for controlling a switching device, including: obtaining a user operation; when it is determined that a specified operation is received, switching to a control action opposite to the current control action; wherein different control actions correspond to different control states of the load circuit of the switching device; after maintaining the opposite control action for a specified time, resuming to the original control action.

[0020] In some embodiments, before switching to a control action opposite to the current control action, the control method further includes: obtaining a setting instruction; the setting instruction can be manually set and / or automatically set according to the load type; determining the corresponding specified time according to the setting instruction.

[0021] In some embodiments, the restoration to the original control action specifically includes: automatically restoring to the original control action.

[0022] In some embodiments, the specified operation includes a pressing operation and a releasing operation applied to the switch device button; wherein: there is an interval time between the pressing operation and the releasing operation; the specified time is set to be greater than the interval time, or the specified time changes proportionally according to the interval time.

[0023] In some embodiments, the switching to a control action opposite to the current control action specifically includes: switching to a disconnection action opposite to the current connection action; restoring to the original connection action after maintaining the disconnection action for a specified time; wherein, the specified time is set such that when restoring the connection action, the load connected to the load circuit remains powered on.

[0024] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. The above-described inventive concepts can be combined arbitrarily, and these and other objects of the present disclosure will be fully embodied by the following detailed description and the accompanying drawings.

[0025] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. The drawings herein are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0027] Figure 1 is a schematic diagram of an exemplary network environment of a control system including a switch device in an embodiment of the present disclosure;

[0028] Figure 2 is a schematic block diagram principle of a switch device in an embodiment of the present disclosure Figure 1 ;

[0029] Figure 3 is a schematic diagram of the relationship between key operations and the control actions of the connection control module in an embodiment of the present disclosure Figure 1 ;

[0030] Figure 4Schematic diagram of the control action relationship between button operations and connection control modules in an embodiment of the present disclosure Figure 2 ;

[0031] Figure 5 Schematic diagram of the control action relationship between button operations and connection control modules in an embodiment of the present disclosure Figure 3 ;

[0032] Figure 6 Schematic diagram of the control action relationship between button operations and connection control modules in an embodiment of the present disclosure Figure 4 ;

[0033] Figure 7 Schematic diagram of the control action relationship between button operations and connection control modules in an embodiment of the present disclosure Figure 5 ;

[0034] Figure 8 Schematic diagram of the control action relationship between button operations and connection control modules in an embodiment of the present disclosure Figure 6 ;

[0035] Figure 9 Schematic diagram of the block diagram principle of a switching device in an embodiment of the present disclosure Figure 2 ;

[0036] Figure 10 Schematic diagram of the operation of the interface for defining the mapping relationship of the circuit breaker in an embodiment of the present disclosure;

[0037] Figure 11 Schematic diagram of the flowchart of a method for controlling a switching device in an embodiment of the present disclosure;

[0038] Figure 12 Schematic diagram of the block diagram principle of a switching device in an embodiment of the present disclosure Figure 3 ;

[0039] Figure 13 Schematic diagram of the block diagram principle of a switching device in an embodiment of the present disclosure Figure 4 ;

[0040] Figure 14 Schematic diagram of the configuration interface of the fifth trigger mode in an embodiment of the present disclosure;

[0041] Figure 15 Schematic diagram of the interface operation for local mode selection in an embodiment of the present disclosure;

[0042] Figure 16 Schematic diagram of the block diagram principle of a switching device in an embodiment of the present disclosure Figure 5 ;

[0043] Figure 17 Schematic diagram of the block diagram principle of a switching device in an embodiment of the present disclosure Figure 6 ;

[0044] Figure 18 It is a schematic diagram of indicator light parameter configuration in an embodiment of the present disclosure;

[0045] Figure 19 It is a schematic diagram of interface operation in the pairing process in an embodiment of the present disclosure;

[0046] Figure 20a It is a schematic diagram of the logic judgment for power-off restart of the device in an embodiment of the present disclosure Figure 1 ;

[0047] Figure 20b It is a schematic diagram of the logic judgment for power-off restart of the device in an embodiment of the present disclosure Figure 2 ;

[0048] Figure 20c It is a schematic diagram of the logic judgment for power-off restart of the device in an embodiment of the present disclosure Figure 3 ;

[0049] Figure 20d It is a schematic diagram of the logic judgment for power-off restart of the device in an embodiment of the present disclosure Figure 4 ;

[0050] Figure 21 It is a schematic diagram of the specific implementation hardware of the switching device in an embodiment of the present disclosure;

[0051] Figure 22 It is a schematic diagram of the process of another method for controlling a switching device in an embodiment of the present disclosure;

[0052] Figure 23 It is a schematic diagram of the process of yet another method for controlling a switching device in an embodiment of the present disclosure. Detailed implementation manners

[0053] Hereinafter, the embodiments of the present disclosure will be described in detail. When the following description relates to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present disclosure without creative efforts shall fall within the protection scope of the present disclosure.

[0054] It should be understood that in the description of all embodiments of the present disclosure, the orientation or positional relationship indicated by terms such as "upper", "lower", "left", "right", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present disclosure and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present disclosure. The terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. Terms such as "coupled" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or integrated; it can be a mechanical connection, an electrical connection, or capable of communicating with each other; it can be directly connected, or indirectly connected through an intermediate medium to form a linkage relationship, and it can be the internal communication of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present disclosure can be understood according to specific circumstances.

[0055] In various embodiments of the present disclosure, the symbol " / " indicates the meaning of having two functions simultaneously. For the symbol "A and / or B", it indicates that the combination between the front and rear objects connected by this symbol includes three cases: "A", "B", and "A and B".

[0056] With the rapid development of smart home technology, more and more smart devices are widely used in network environments such as homes, businesses, and industries.

[0057] See Figure 1 , Figure 1 FIG. shows a schematic diagram of an exemplary network environment 100 including a control system in which a switching device 102 is located according to an embodiment of the present disclosure.

[0058] The exemplary network environment 100 may include a switching device 102, a load device 106, a network access device 101, and one or more terminal devices 103.

[0059] The network access device 101 is used to provide network connections for the switching device 102, the load device 106, and the terminal device 103. Specifically, the network access device 101 can receive / route various types of communications from the switching device 102, the load device 106, and the terminal device 103 and / or transmit / route various types of communications to the switching device 102, the load device 106, and the terminal device 103.

[0060] In some embodiments, the network access device 101 only provides an internal network 104 (such as a wired network or a wireless local area network (LAN)). All the switching devices 102, load devices 106, and terminal devices 103 connected to the network access device 101 are in the same internal network 104 and can communicate directly with each other.

[0061] In further embodiments, the network access device 101 is also connected to an external network 105, enabling the switching devices 102, load devices 106, and terminal devices 103 to access the external network 105 via it. The network access device 101 can be, for example, hardware electronic devices such as a router 107 or a gateway 108. The load device 106 can access the external network 105 through the network access device 101 and then communicate with a remote server. The remote server can be, for example, an IOT cloud device of the Internet of Things platform (also abbreviated as "cloud" in the following description). It has the authority to manage and configure the connected electronic devices (such as the switching device 102, load device 106, etc.). When the terminal device 103 accesses the remote server through the external network 105, the remote server can display the configuration interface of the electronic devices (such as the switching device 102, load device 106, etc.) through the terminal device 103 to achieve the configuration of the electronic devices. The switching device 102, terminal device 103, and gateway 108 can all communicate with the cloud to achieve remote control. The cloud mainly plays the role of data forwarding. In some examples, the cloud can also play the roles of data storage and processing.

[0062] When the network access device 101 is a router 107, a gateway 108 can also be set in this network environment. The gateway 108 and the router 107 can receive data from electronic devices such as the load device 106, switching device 102, and terminal device 103 (the data can be received through wireless signals, such as Bluetooth, radio frequency, WIFI, etc.), and provide data processing and transfer services for these electronic devices, such as the conversion between different communication protocols, data processing and forwarding, etc.

[0063] In addition, in the scenario where there is a cloud in the example network environment 100, in order to enable the switching device 102 to have the ability to connect to the cloud, it needs to be networked. After the networking is completed, the switching device 102 can connect to the Internet and then communicate with the cloud.

[0064] The terminal device 103 can be any electronic device having at least one network interface. For example, the terminal device 103 can be: a desktop computer, a laptop computer, a server, a mainframe computer, a cloud-based computer, a tablet computer, a smart phone, a smart watch, a wearable device, a consumer electronic device, a portable computing device, and / or other electronic devices. The terminal device 103 uses its network interface to communicate with the physical or virtual network interface of the network access device 101, thereby accessing the internal network 104 via the network access device 101.

[0065] An application program (such as a mobile phone APP) corresponding to the paired electronic device (such as the switch device 102) can be pre-installed on the terminal device 103. Furthermore, the application program can provide a configuration interface for the intelligent control screen 101 for the user, so that the user can perform at least one operation such as status viewing, parameter configuration, control, and network configuration on the switch device 102 based on the configuration interface. The terminal device 103 can also access the external network 105 through the network access device 101 or cellular data, etc., and then communicate with the remote server, and communicate with the switch device 102 and the load device 106 through the remote server (such as issuing commands, interface configuration of the switch device 102, etc.) to achieve the purpose of remote control.

[0066] The external network 105 can include various types of wired or wireless networks, internal networks or public networks, such as other local area networks or wide area networks (WANs) (such as the Internet). Note that the present disclosure does not specifically limit the type of the external network 105.

[0067] In this embodiment, the load device 106 can be understood as a device accessing the load circuit of the switch device 102. These load devices 106 can be intelligent load devices or non-intelligent load devices. In a specific example, the load device 106 obtains electric energy through the switch device 102, and the change of the control state of the load circuit of the switch device 102 can directly switch the on and off of the power supply of the load device 106.

[0068] As Figure 2 shown, a block diagram schematic of the switch device 102 provided by an embodiment of the present disclosure is provided; it can be seen that the switch device 102 at least includes a user interaction module 1021, a power access port 1022, a control output port 1023, a connection control module 1024, and a processing module 1025.

[0069] The user interaction module 1021 is used to receive user operations.

[0070] Specifically, the user interaction module 1021 is the part of the switching device 102 responsible for direct communication with the user. It provides physical and / or virtual interfaces for the user to intuitively express intentions or needs. The user can interact with the switching device 102 in a certain way to send instructions to control the behavior of the switching device 102. The user interaction module 1021 can be, for example but not limited to, physical buttons / knobs (mechanical buttons, rotary encoders, etc.), touchscreens (touch display screens), voice recognition (voice collection components integrated with microphones and voice processing algorithms), etc.

[0071] User operations can be understood as specific behaviors or actions taken by the user to achieve a certain goal. In the context of the switching device 102, these operations are usually to change the control state of the load circuit. Based on the above-listed possible implementation examples of the user interaction module 1021, correspondingly, user operations can be, for example but not limited to, triggering different control commands by pressing buttons, sliding or rotating knobs, performing operations by clicking icons on the screen or making sliding gestures, issuing oral instructions, etc. For the convenience of description, subsequent embodiments will mainly be described in the way that the user interaction module 1021 includes physical buttons / knobs.

[0072] The power access port 1022 is used to access the power cord to supply external power to the switching device 102. Specifically, the power access port 1022 can be used to access the mains power supply circuit, and the accessed power cord can be the neutral / fire wire of the mains power. In a specific example, the power access port 1022 can include a fire wire access port and a neutral wire access port for respectively connecting the neutral wire (N) and the fire wire (L) of the mains power supply circuit. For some single-fire power extraction schemes, the power access port 1022 can only include the fire wire (L) without the neutral wire (N), and the switching device 102 is connected to the load device 106 in series as a whole.

[0073] The control output port 1023 is used to output the control line to form a load circuit (such as an intelligent driver or other devices). By switching the control state of the load circuit, the switching device 102 can adjust the specific working state of the load device. In a specific example, as Figure 2 shown, the switching device 102 is set to be adapted to electrically connect the load device on the control line through the control output port 1023, so as to be able to control the control state of the load circuit according to the switching of the control actions of the connection control module 1024. In a further example, the control output port 1023 can include a fire wire output port L1, which is used to connect the load device through the fire wire, and then connect the switching device 102 in series in the working circuit of the load device 106. The on / off of the switching device 102 can directly affect the on / off of the load device 106.

[0074] The connection control module 1024 is disposed between the power access port 1022 and the control output port 1023, and can switch between multiple control actions, where different control actions correspond to different connection states between the power access port 1022 and the control output port 1023, and each connection state corresponds to a specific control state of the load circuit. Specifically, the connection control module 1024 can switch between multiple control actions according to requirements, affecting the connection mode between the power supply and the load device 106, thereby controlling the control state of the load circuit. For example, a certain connection state may mean that the load circuit is turned on (powered on), while another connection state may mean that the load circuit is turned off (powered off), or there are other types of controls.

[0075] The processing module 1025 is electrically connected to the user interaction module 1021 and the connection control module 1024 respectively, so as to be able to detect user operations through the user interaction module 1021 and control the connection control module 1024 to perform corresponding control actions. Specifically, the sensors or detection mechanisms in the user interaction module 1021 will capture input signals from the user. For buttons / knobs, it can be the detected pressure change, the state change of the touch switch (such as whether the electronic switch corresponding to the physical button is triggered, such as Figure 21 SW2 in it); for the touch screen, it can be the change in capacitance value; and for voice control, it can be the received sound waveform. Different types of operations applied by the user result in different input electrical signals. According to the input electrical signals transmitted by the user interaction module 1021, the processing module 1025 can identify the type of operation applied by the user (such as pressing operation, releasing operation, long pressing operation, etc.), and then determine whether the user interaction module 1021 has received the specified operation.

[0076] It should be noted that traditional power control methods mainly rely on simple full-on and full-off methods, that is, the load device is fully turned on or off through a switch. This simple power control method obviously can no longer meet the increasingly diverse load types and complex control requirements in modern smart homes.

[0077] With the increase in the types of smart home devices, the loads include not only traditional electrical devices (such as lamps, sockets, etc.), but also more and more complex devices in smart homes, such as intelligent temperature control systems, intelligent security devices, intelligent home appliances, etc. These devices often have higher intelligence and automation characteristics and require more refined power management.

[0078] Traditional power control methods cannot meet the requirements of these intelligent load devices because they only provide simple on / off control and cannot achieve fine-grained control of the devices. Especially in intelligent devices, long-term power-off is not allowed because device states will be lost, network connections may be interrupted, and even the normal operation of the devices may be disturbed. Therefore, traditional power management methods are not suitable for intelligent load devices, especially those intelligent devices that need to be always online.

[0079] For example, in an intelligent lighting control system, users may want to control in certain specific scenarios (such as adjusting brightness, color, or switching to a specific scene mode) without wanting the device to be completely powered off or restarted, which can avoid the loss of device configuration or the time delay required after restarting. However, traditional power control methods cannot meet this requirement because they usually result in the complete shutdown and restart of the device.

[0080] Based on this, the present disclosure provides a switching device 102 that adopts a new power control scheme to provide a more flexible and efficient control method to achieve flexible control of intelligent load devices. Corresponding control method embodiments are also provided in subsequent other embodiments of the present disclosure.

[0081] Specifically, in the switching device 102 provided in this embodiment, the processing module 1025 is set to have a first trigger mode to be able to: according to a specified operation received by the user interaction module 1021, control the connection control module 1024 to switch to a control action opposite to the current control action, and after maintaining the opposite control action for a specified time, restore to the original control action to achieve a temporary reversal of the control state of the load circuit, and ultimately be able to, while keeping the original control state unchanged, transmit a special control instruction to the load device 106 through the temporary reversal. This control instruction is transmitted to the load device 106 through the control line to trigger the load device 106 to execute a specific function, so as to achieve flexible control of the intelligent load device 106 through the switching of the control action of the connection control module 1024 while keeping the original control state unchanged.

[0082] It should be noted that in this embodiment, the temporary reversal operation is not just a simple power control. It can change in a specific pattern through the connection control module 1024 to transmit an electrically-signal that changes in a specific pattern to the load device 106 through the control line to form a control instruction for triggering the load device 106 to execute certain specific functions. These specific pattern changes of the electrical signal can be short-term voltage changes, current fluctuations, or power-on recovery. The intelligent load recognizes these changes through the built-in electrical detection and performs corresponding operations.

[0083] Furthermore, the switching device 102 provided in this embodiment is adapted to connect a control line through the control output port 1023. When the load device 106 connected to this control line is an intelligent load, a load circuit for controlling the load device 106 is formed based on this control line, and the control state of this load circuit is switched by controlling the control action of the control connection control module 1024, so as to achieve the indirect control of the load device 106 through this load circuit (for example, indirectly controlling the extinguishing of a lamp (one of multiple optional intelligent load devices 106) by controlling the load circuit to enter a power-off state (one of multiple control states)). In addition, it is possible to directly control the load device 106 while finally keeping the control state of the load circuit unchanged (the control state of the final load circuit will return to the original control state and be maintained) based on the control instruction generated by applying the specified operation (for example, controlling the extinguishing of a lamp (one of multiple optional load devices 106) while keeping the load circuit finally in a power-on state (one of multiple control states)).

[0084] In some embodiments, before the control connection control module 1024 switches to a control action opposite to the current control action, a setting instruction is obtained. The setting instruction is used to determine a corresponding specified time, and furthermore, the specified time can be changed. Different specified times mean different reverse duration times of the control state of the load circuit. In this way, the specified time can be changed according to requirements. The setting instruction can be understood as a general term for instructions, messages, signals, etc. used by a user or a system to specify the reverse duration time (specified time). This setting instruction is used to clarify the specified time, that is, the duration time of the control reverse state. It is a core parameter for controlling how the switching device 102 switches to the reverse control action and maintains this state for a period of time.

[0085] The duration of the reverse of the control action is an important characteristic of the switching device 102 in this embodiment, which directly affects the behavior of the load device 106. For example:

[0086] For the scenario where the load device 106 is an intelligent lamp, if the specified time is short (for example, dozens of milliseconds), then the short reverse may mean that the intelligent lamp will only experience a power-off for dozens of milliseconds. This power-off duration is not enough for the intelligent lamp to lose power and then recover to the original state. Then the intelligent lamp will be re-powered. During the short reverse process of power supply - power-off - power supply of the control state of this intelligent lamp, the intelligent lamp remains continuously online.

[0087] If the specified time is long (for example, up to several seconds), then the long reverse may mean that the intelligent lamp will be turned off for several seconds and then recover to the original state. During this process, the intelligent lamp may have gone through a process of power-off and re-power-on reset.

[0088] It can be seen that different specified times mean different times for the control state of the load device 106 to reverse, which is very important for application scenarios that require precise control of electrical appliance behavior (such as timed switching of lights, triggering specific scenarios in smart homes, etc.).

[0089] In this embodiment, the specified time is not fixed but variable, that is, the user or the system can adjust it according to needs. This makes the control of the switching device 102 more flexible and can be adjusted according to specific usage scenarios. For example, the time for short-time turning off the light or delayed recovery of the light can be set to adapt to different application requirements.

[0090] Furthermore, the processing module 1025 is further configured to, after maintaining the specified time of the opposite control action, control the connection control module 1024 to automatically return to the original control action.

[0091] Specifically, after the temporary reverse state lasts for the specified time, the processing module 1025 will trigger the connection control module 1024 to return to the original control action to restore the control state of the load circuit (that is, finally keep the control state of the load circuit unchanged). This process is automatically completed without additional intervention or operation by the user.

[0092] In a specific example, the processing module 1025 controls the connection control module 1024 to switch to a control action opposite to the current control action, specifically: controlling the connection control module 1024 to switch to a disconnection action opposite to the current connection action, and automatically returning to the original connection action after maintaining the disconnection action for the specified time. Among them, the disconnection action of the connection control module 1024 corresponds to the disconnection state between the power access port 1022 and the control output port 1023, and the disconnection state corresponds to the power-off control state of the load circuit. The connection action of the connection control module 1024 corresponds to the connection state between the power access port 1022 and the control output port 1023, and the connection state corresponds to the power-on control state of the load circuit.

[0093] Furthermore, in the switching device 102 solution provided in this embodiment, after the user issues an instruction (performs a specified operation) through the user interaction module 1021, the switching device 102 will automatically reverse the control action (such as temporary power-off), and automatically return to the original control action after the set time (specified time), realizing a temporary reversal of the control state of the load circuit to transmit a specific control instruction to the load device 106. In this way, the load device 106 can be triggered to execute specific functions without long-term power-off, which is suitable for the special control requirements of some intelligent load devices 106. Among them, the processing module 1025 can intelligently adjust the control state of the load circuit according to the user's operation and the preset specified time, avoiding the impact of long-term power-off on the load device 106.

[0094] In some embodiments, an implementation manner of the setting instruction is given.

[0095] In this embodiment, the setting instruction can be manually set. Manual setting means that the user can actively participate in setting the specified time instead of relying on the system default value. The user may input the instruction through a certain interaction method (such as button, touch screen setting, APP control, etc.), or define it through a preset control logic.

[0096] Specifically, the user can complete the operation of defining the specified time through an intelligent terminal (such as a mobile phone, a tablet, etc.). For example, in the supporting application (App) of the intelligent terminal, the user selects or inputs the specified time. For example, the user clearly defines the specified time value through a certain interaction method (such as a button, a slider, an input box, etc.). The application program converts the information input by the user into a setting instruction. The instruction can be transmitted through a wireless connection. For example, the setting instruction can be transmitted based on the first communication protocol as shown in Figure 17 and is transmitted to the switch device 102 through, for example, Wi-Fi, Bluetooth, etc. This method makes the setting of the switch device 102 more convenient and intuitive.

[0097] Furthermore, in this embodiment, by freely defining the specified time, the user can adjust the length of the "temporary reversal" time of the load circuit control according to actual needs to adapt to the control requirements of various types of loads.

[0098] Further, the setting range of the specified time can be from 10 ms to 10 s, and the set step value can be 100 ms. For intelligent load devices 106 (such as intelligent lamps that rely on specific short power-off signals for state switching), more precise control of the specified time is required. The range can be narrowed down to 100 ms to 1.6 s (such as 200 ms or 500 ms). Furthermore, the user can set the specified time within the range of 100 ms to 1.6 s with a step value of 100 ms. The temporary reversal of the control state of the reversed load circuit formed by the specified time within this range can more accurately generate an electrical signal suitable for intelligent load detection without causing adverse effects on the switch device 102 due to too long a power-off time (such as the intelligent lamp restarting due to too long a power-off time). For example, for intelligent lamps with the smart function, the requirements for the power-off time of the smart function of different brands, different manufacturers, and even different models of the same brand of intelligent lamps may be different. The user can determine the power-off time according to the specific manufacturer, brand, model, etc. of the intelligent lamp actually connected to the switch device 102, and then set it as the specified time.

[0099] Furthermore, the setting range of the specified time can also vary according to the switching of the type of the load device 106. The type of the load device 106 can be understood as different types of load devices 106 from different manufacturers (such as lights from manufacturer A and air conditioners from manufacturer B), the same type of load devices 106 from different manufacturers (such as lights from manufacturer A and lights from manufacturer B), different types of load devices 106 from the same manufacturer (such as lights from manufacturer A and air conditioners from manufacturer A), or the same type and different models of load devices 106 from the same manufacturer (such as lights of model L1 from manufacturer A and lights of model L2 from manufacturer A).

[0100] In this embodiment, the user can achieve the switching of the specified time by selecting the type of the load device 106. The selection of the type of the load device 106 is a way to simplify the user experience. The user does not need to directly input specific time values, but completes the setting by selecting the type of the load device 106 (such as "intelligent lamps" or "ordinary lamps"). The system automatically adjusts the setting range of the specified time according to the selected type of the load device 106, or directly determines the specified time.

[0101] For example: when "intelligent lamps" are selected, the default range may be 70 ms to 3 s, and the user further sets the specified time within this range. When "ordinary lamps" are selected, the default range may be 10 ms to 10 s, and the user further sets the specified time within this range.

[0102] Again, for example, when "intelligent lamp A" is selected, the specified time is directly determined to be 200 ms, and when "intelligent lamp B" is selected, the specified time is directly determined to be 500 ms. This method reduces the professional requirements for the user and is suitable for ordinary users.

[0103] In some embodiments, another implementation manner of the setting instruction is given.

[0104] In this embodiment, the setting instruction is automatically set according to the load type to achieve that the temporary reverse period is dynamically adjusted according to the different types of the load device 106.

[0105] Here, the reverse period can be understood as the duration of the opposite control action (such as temporary power-off or state reversal) in the temporary reverse operation.

[0106] In specific implementation, after the load device 106 is connected to the control line, the switch device 102 can be paired with the load device 106. After the pairing is completed, the switch device 102 can actively obtain or passively receive data including its own parameter information sent by the load device 106 to determine the type of the load device 106. Furthermore, a control instruction is automatically generated according to the type of the connected load device 106 to determine the specified time, without the user manually inputting specific time values.

[0107] For example:

[0108] Smart lamps: Triggered by a short power-off signal and may require a short reverse cycle, such as from dozens of milliseconds to several seconds.

[0109] Ordinary lamps: Triggered by a complete power-off and may require a longer time for control. The reverse cycle may be between 1 second and 10 seconds.

[0110] Motor load devices: Adjust the working state through a long reverse cycle (more than 10 seconds).

[0111] In this embodiment, by dynamically adjusting the reverse cycle according to the type of the load device 106, the switching device 102 can better adapt to the working characteristics of different load devices 106, ensuring that each device can correctly respond to the control instruction triggered by "temporary reverse" within a specific time period.

[0112] It is worth mentioning that in some application scenarios, regardless of whether the setting instruction is manually set or automatically set according to the type of the load device 106, the corresponding specified time determined by the setting instruction needs to be set such that when the connection control module 1024 resumes the connection operation, the load connected to the control line is still in the powered-on state, so as to achieve the instantaneous disconnection and restoration of the load circuit. Thus, when the load device 106 connected to the load circuit formed by the control line is an intelligent load device, a corresponding control instruction is generated by the way of instantaneously disconnecting and restoring the power supply of the load circuit, and this control instruction is transmitted to the load device 106 through the control line to control the load device 106 of the load circuit to execute a specific function (for example, for a smart lamp, it can be to trigger the smart lamp to enter a lighting state with a specific brightness / color temperature). Furthermore, the effective transmission of the control instruction in the case of the intelligent load being continuously online can be achieved.

[0113] As Figure 3 shown, in some embodiments, when the user interaction module 1021 includes a button, the specified operation may include at least one pressing-down operation a1, and the processing module 1025 may control the connection control module 1024 to switch to a control action opposite to the current control action before, after, or at the same time as the key bounce caused by the release of the pressing-down operation a1.

[0114] For example, in combination with Figure 3 and Figure 21 shown, after detecting the pressing-down operation a1 of the button, the processing module 1025 controls the connection control module 1024 to switch to a disconnection action b2 opposite to the current connection action b1, and automatically resumes to the original connection action b1 after maintaining the disconnection action b2 for a specified time T1.

[0115] For another example, in combination withFigure 4 and Figure 21 As shown in Figure 21 , after the processing module 1025 detects that the key has been pressed down for operation a1, it controls the connection control module 1024 to switch to the connection operation b1 opposite to the current disconnection operation b2, and automatically resumes to the original disconnection operation b2 after maintaining the connection operation b1 for the specified time T1.

[0116] Of course, the processing module 1025 can also control the connection control module 1024 to switch to the control operation opposite to the current control operation after detecting a complete press-down operation and release operation. At this time, the specified operation will include the consecutive press-down operation a1 and release operation a2 on the key; where: there is an interval time T2 between the press-down operation a1 and the release operation a2, and the specified time T1 is set to be greater than or equal to the interval time T2.

[0117] Here, after the processing module 1025 maintains the opposite control operation for the specified time, it controls the connection control module 1024 to automatically resume to the original control operation.

[0118] For example, in combination with Figure 5 and Figure 21 As shown in Figure 21 , after the processing module 1025 detects that the key has been subjected to consecutive press-down operation a1 and release operation a2, it controls the connection control module 1024 to switch to the disconnection operation b2 opposite to the current connection operation b1, and automatically resumes to the original connection operation b1 after maintaining the disconnection operation b2 for the specified time T1.

[0119] Another example, in combination with Figure 6 and Figure 21As shown, after the processing module 1025 detects that a continuous pressing operation a1 and a releasing operation a2 are applied to the key, it controls the connection control module 1024 to switch to the on operation b1 opposite to the current off operation b2, and automatically resumes to the original off operation b2 after maintaining the on operation b1 for a specified time T1. The off operation of the connection control module 1024 corresponds to the off state between the power access port 1022 and the control output port 1023, and the off state corresponds to the power-off control state of the load circuit. The on operation of the connection control module 1024 corresponds to the on state between the power access port 1022 and the control output port 1023, and the on state corresponds to the power-on control state of the load circuit. Among them, the specified time is set so that when the connection control module 1024 resumes the on operation, the load connected to the control line is still in the power-on state, so as to realize the instantaneous disconnection and restoration of the load circuit. Thus, when the intelligent load device 106 is connected to the load circuit, corresponding control instructions are generated by the way of instantaneously disconnecting and restoring the power supply of the load circuit, and the control instructions are transmitted to the load device 106 through the control line, for controlling the load device 106 of the load circuit to execute specific functions (for example, for intelligent lamps, it can be triggering the intelligent lamps to enter the lighting state of a specific brightness / color temperature). Furthermore, the effective transmission of control instructions in the case of continuous online of the intelligent load can be realized.

[0120] In some embodiments, when the user interaction module 1021 includes a key, the specified operation includes a pressing operation and a releasing operation on the key; wherein:

[0121] There is an interval time between the pressing operation and the releasing operation, and the specified time changes proportionally (directly proportional, inversely proportional or equally proportional) according to the interval time.

[0122] Exemplarily, the specified time can only change proportionally according to the interval time. Taking inverse proportional adjustment as an example, for example, an initial value of the specified time is given, and a corresponding interval time reference value is assigned to the initial value. Taking the initial value of the specified time corresponding to the reference as a reference, when the interval time changes, the specified time is adjusted according to the change of the interval time in a specified inverse proportion.

[0123] Exemplarily, the specified time can be set to be greater than the interval time and change proportionally according to the interval time. Taking direct proportional adjustment as an example, for example, an initial value of the specified time is given, and a corresponding interval time reference value is assigned to the initial value. Taking the initial value of the specified time corresponding to the reference as a reference, when the interval time changes, the specified time is adjusted according to the change of the interval time in a specified direct proportion.

[0124] Exemplarily, the specified time can be set to be equal to the interval time and vary proportionally according to the interval time. Taking proportional adjustment as an example, the processing module 1025 controls the connection control module 1024 to switch to a control action opposite to the current control action, specifically: in response to a pressing operation, controlling the connection control module 1024 to switch to a control action opposite to the current control action; during the duration of the pressing operation, maintaining the opposite control action; in response to a releasing operation, controlling the connection control module 1024 to resume the original control action, thereby achieving the proportional adjustment.

[0125] In a further example, such as Figure 7 shown, after the processing module 1025 detects that the key is subjected to a pressing operation a1, in response to the pressing operation a1, it controls the connection control module 1024 to switch to a connecting action b1 opposite to the current disconnecting action b2; during the duration T2 of the pressing operation a1, maintaining the opposite connecting action b1; after the processing module 1025 detects that the key is subjected to a releasing operation a2, in response to the releasing operation a2, it controls the connection control module 1024 to resume the original disconnecting action b2, thereby achieving the proportional adjustment. That is, in this case, the duration T2 of the pressing operation a1 should be the same as the time T1 during which the connecting action b1 is maintained.

[0126] In yet another further example, such as Figure 8 shown, after the processing module 1025 detects that the key is subjected to a pressing operation a1, in response to the pressing operation a1, it controls the connection control module 1024 to switch to a disconnecting action b2 opposite to the current connecting action b1; during the duration T2 of the pressing operation a1, maintaining the opposite disconnecting action b2; after the processing module 1025 detects that the key is subjected to a releasing operation a2, in response to the releasing operation a2, it controls the connection control module 1024 to resume the original connecting action b1, thereby achieving the proportional adjustment. That is, in this embodiment, the connection control module 1024 does not automatically resume the original connecting action after maintaining the disconnecting action for the specified time T1, but is controlled by the processing module 1025 to resume the original connecting action in response to the key being subjected to a releasing operation a2, and the duration T2 of the pressing operation a1 should be the same as the specified time T1 during which the disconnecting action b2 is maintained.

[0127] In some application scenarios, the specified time can be set such that when the connection control module 1024 resumes the connection operation, the load (load device 106) connected to the control line is still in the powered-on state, so as to achieve instantaneous disconnection and restoration of the load circuit. Thus, when the intelligent load device 106 is connected to the load circuit formed by the control line, corresponding control instructions are generated by the method of instantaneously disconnecting and restoring the power supply of the load circuit, and the control instructions are transmitted to the load device 106 through the control line to control the load device 106 of the load circuit to execute specific functions (for example, for an intelligent lamp, it can be triggering the intelligent lamp to enter a lighting state with a specific brightness / color temperature). Furthermore, effective transmission of control instructions in the case of continuous online of the intelligent load can be achieved.

[0128] Furthermore, when the specified time changes proportionally with the interval time, the change ratio of the specified time to the interval time is dynamically adjusted according to the change of the interval time.

[0129] Specifically, when the interval time is lower than the first threshold, it is adjusted in direct proportion; when the interval time is greater than or equal to the first threshold and less than the second threshold, it is adjusted in equal proportion; when the interval time is greater than or equal to the second threshold and less than the third threshold, it is adjusted in negative proportion; when the interval time is greater than or equal to the third threshold, it is adjusted in equal proportion. Furthermore, according to this embodiment, according to the length of the interval time, the specified time dynamically switches the adjustment ratio according to the interval time.

[0130] In some embodiments, as Figure 9 shown, the connection control module 1024 includes a switch 10241 that can perform connection and disconnection operations. Furthermore, the switch 10241 can be understood as any circuit component or circuit assembly composed of components that can perform connection / disconnection operations. For example, thyristors, relays (as Figure 21 shown), etc.

[0131] It should be noted that in the existing related technologies, the control relationship between the button of the switching device and the switch is generally directly determined when the device leaves the factory. Furthermore, the switch that can be controlled by the button operated by the user is fixed and unchangeable. It can be seen that the control between the button and the switch of the existing switching device is relatively single and fixed, and it is difficult to meet diverse control requirements.

[0132] Based on this, an embodiment of the present disclosure provides a switching device 102 that can freely define the mapping relationship between the button and the switch 10241, realizes flexible mapping between the button and the switch 10241, and improves the applicability flexibility of the switching device 102. In addition, corresponding control method embodiments are also provided in subsequent other embodiments of the present disclosure.

[0133] Specifically, in the embodiments of the present disclosure, the user interaction module 1021 includes a plurality of buttons, and the switch 10241 also has a plurality. On this basis, the processing module 1025 is further configured to be able to:

[0134] Detect whether an operation is applied to the user interaction module 1021;

[0135] If an operation applied by the user is detected, determine the target button; the target button is the button to which the operation is applied among the plurality of buttons;

[0136] According to the determined target button, determine the target mapping relationship that matches the target button among the latest multiple mapping relationships;

[0137] Control the switch 10241 defined by the target mapping relationship to perform a corresponding control action.

[0138] Further, controlling the switch 10241 defined by the target mapping relationship to perform a corresponding control action may, for example, control the switch 10241 defined by the target mapping relationship to perform a control action opposite to the current control action, and maintain the opposite control action until the button is operated again.

[0139] Wherein, each mapping relationship defines a mapping relationship between at least one button information and at least one switch information; the mapping relationship is predefined by the user in advance through a smart terminal; the button information characterizes at least one of the following: the button to which the operation is applied among the plurality of buttons, the type of operation applied to the button; the switch information characterizes at least one of the following: the switch 10241 that needs to perform a control action among the plurality of switches 10241, the specific control action performed by the switch 10241.

[0140] The corresponding control action performed by the switch 10241 may be, for example, a turning-on action or a turning-off action. Each mapping relationship may define a mapping relationship between a button and the switch 10241, or a mapping relationship between a button and the specific control action of the switch 10241.

[0141] When the mapping relationship defines a mapping relationship between a button and the switch 10241, the switch 10241 will perform a flipping action when the corresponding button is triggered. Further, the processing module 1025 controls the switch 10241 defined by the target mapping relationship to perform a corresponding control action, specifically for controlling the switch 10241 defined by the target mapping relationship to perform a control action opposite to the current control action, and maintaining the opposite control action until the button is operated again (for example, flipping from the current turning-on action to the turning-off action, or from the current turning-off action to the turning-on action), and maintaining the opposite control action until the button is operated again.

[0142] When the mapping relationship defines the mapping relationship between the keys and the specific control actions of the switch 10241, the switch 10241 will directly execute the defined control actions when the corresponding keys are triggered. For example Figure 13 As shown, it is defined that pressing key A triggers the on action of switch 10241A, and pressing key B triggers the off action of switch 10241A. Then when the user presses key A, switch 10241A will execute the on action, and when the user presses key B, it will trigger switch 10241A to execute the off action.

[0143] Furthermore, in this embodiment, the mapping relationship between the multiple keys of the switching device 102 and the multiple switches 10241 can be freely defined according to requirements, rather than being fixed and single, and can meet diverse usage scenarios and application requirements.

[0144] In some embodiments, before detecting whether an operation is applied to the user interaction module 1021, the processing module 1025 is further configured to:

[0145] Receive a mapping relationship group, where the preset relationship group includes multiple mapping relationships; the multiple mapping relationships are obtained after the user freely defines the mapping relationship between at least some of the keys and the switch 10241 on the intelligent terminal in advance;

[0146] Determine the latest mapping relationship between each key and each switch 10241 according to the multiple mapping relationships.

[0147] In the specific definition example of the mapping relationship, each mapping relationship can define the mapping relationship between a key and a switch 10241. Furthermore, among the multiple mapping relationships in the mapping relationship group, at least one mapping relationship is directly defined by the user through the intelligent terminal for the mapping relationship between one key and one switch 10241, and at least one mapping relationship is dynamically adjusted by the intelligent terminal for the mapping relationship between other keys and the corresponding switches 10241 according to the mapping relationship directly defined by the user.

[0148] On this basis, the number of the keys can be equal to the number of the switches 10241. During the definition process of the mapping relationship, when the user changes the mapping relationship between any one of the keys and the relay, the mapping relationships between other keys and the corresponding switches 10241 will be dynamically adjusted so that the changed mapping relationship group generally follows the one-to-one and non-repetitive mapping relationship formed between each key and each switch 10241.

[0149] For example Figure 10As shown, taking the switch 10241 implemented as a relay as an example, the user defines the mapping relationship in advance through the configuration interface provided by the application program on the mobile phone. As Figure 10 shown, the switch device 102 includes three buttons (left button, middle button, right button) and three relays (L1, L2, L3). When the user does not customize the mapping relationship, the switch device 102 follows the factory default mapping relationship group, that is, the left button triggers L1, the middle button triggers L2, and the right button triggers L3. As Figure 10 shown, after entering the relay setting interface B, the setting items of the left button, middle button, and right button are respectively displayed. For example, if the left button setting item is clicked, the definition interface C of the left button is entered, and the relay L2 is selected on this interface. At this time, the left button will be mapped to the relay L2, and the mapping relationship of the middle button will automatically change to the relay L1. That is to say, the user only needs to change the mapping relationship between one button and the relay, and the mapping relationships between other buttons and the corresponding relays will be adaptively adjusted, so that the changed mapping relationship generally follows the one-to-one and non-repeating mapping relationship between the buttons and the relays.

[0150] Subsequently, when the user presses the left button on the switch device 102, the relay L2 will be triggered to perform relevant control actions. When the middle button is pressed, the relay L1 will be triggered to perform relevant control actions. That is, at this time, the mapping relationship between each button of the switch device 102 and each relay is that the left button triggers L2, the middle button triggers L1, and the right button triggers L3, which is different from the factory default mapping relationship.

[0151] In addition, in another non-illustrated example of defining the mapping relationship, each mapping relationship can define the mapping relationship between one or more buttons and a switch 10241. On this basis, the number of buttons can be greater than the number of switches 10241, so that each switch 10241 can be triggered by one or more buttons.

[0152] In addition, in another non-illustrated example of defining the mapping relationship, each mapping relationship can define the mapping relationship between one button and one or more switches 10241. On this basis, the number of buttons can be less than the number of switches 10241, so that each button can trigger one or more switches 10241.

[0153] Correspondingly, in some embodiments, as Figure 11 shown, a control method 300 for the switch device 102 is also provided, which is applied to the terminal device and includes steps S10 to S11.

[0154] Among them, in step S10, a mapping relation group is defined. The mapping relation group includes multiple mapping relations, and each mapping relation defines a mapping relation between at least one key information and at least one switch information.

[0155] The mapping relation group is pre-defined by the user on the smart terminal. Among them, the key information characterizes at least one of the following: the key among multiple keys that is operated, the type of operation applied to the key; the switch information characterizes at least one of the following: the switch 10241 among multiple switches that needs to perform a control action, the specific control action performed by the switch 10241.

[0156] In step S11, the mapping relation group is sent to the switch device 102, so that: after the switch device 102 obtains the mapping relation group, according to the target key among the multiple keys that is operated, and the matching target mapping relation in the mapping relation group, it controls the switch 10241 defined by the target mapping relation to perform the corresponding control action. Among them, the control action performed by the switch 10241 can be, for example, a turn-on action or a turn-off action.

[0157] In addition, it is worth noting that with the rapid development of the smart home industry, the control function of the switch device 102 is gradually enriched, and it is gradually not limited to the power control of the local load circuit, but is developing towards a more diverse network control. The traditional power control method mainly relies on a simple full-on and full-off method, that is, the load device is completely turned on or off through the switch. This simple power control method obviously can no longer meet the increasingly diverse load types and complex network control requirements in modern smart homes.

[0158] Based on this, an embodiment of the present disclosure provides a switch device 102 that supports the combination of network control and local control to improve the flexibility of switch device control.

[0159] Specifically, the block diagram schematic of the switch device 102 in the embodiment of the present disclosure can be as Figure 12As shown in the figure. In the embodiments of the present disclosure, the processing module 1025 is set to have a second trigger mode, and is adapted to: immediately send out corresponding first event information after detecting a first operation applied to the user interaction module 1021. "Immediately send out" means that when the processing module 1025 detects the user's first operation (such as pressing a button), without delay or complex processing, it immediately triggers and sends a signal or information. This process emphasizes fast response and reduces delay. In a specific example, the processing module 1025 sends out at least two frames of data of the first event information through a communication module 1026 within 100 ms after detecting the first operation, so as to achieve the immediate sending out. In some solutions, after detecting the first operation in the second trigger mode, the indicator light of the corresponding light-emitting unit emits a first indication signal (such as flashing once) to play a prompting role.

[0160] The first event information characterizes at least one of the following: the button to which the operation is applied, the type of operation applied to the button, and is used to trigger the network function. Here, the first event information is a kind of information generated by the processing module 1025 and is used for communication with an external system (such as the cloud, other devices). In this example, the role of the first event information is to trigger the network function. The network function refers to the interaction of the switching device 102 with other devices (such as the cloud, intelligent devices, load devices, etc.) through the network. Such functions may include device networking, remote control, device status synchronization, etc.

[0161] Furthermore, it can be understood that the first event information does not directly control the local load circuit, but is used for interaction with other systems (such as network services or devices). For example, when the switching device 102 is pressed, the first event information may notify the network device to start a certain function or operation. For example, after the user presses a button, a first event information is sent to the cloud, and after the cloud receives it, it may start an automated scenario, such as "turn on the light and adjust the brightness".

[0162] Furthermore, the processing module 1025 is also set to generate a control signal if it detects that the first operation is withdrawn within a first time period after the first operation is applied to the user interaction module 1021.

[0163] In this embodiment, the control signal is specifically generated by the processing module 1025, and the connection control module 1024 executes corresponding control actions (such as switching the power switch, adjusting the light brightness, etc.). The control signal directly affects the operation state of the switching device 102, such as switching, dimming and other actions. For example, when the user presses a button on the switching device 102 (the first operation), if the operation is released (the operation is withdrawn) within a certain time, the processing module 1025 will generate a control signal to trigger a change in the state of the load circuit, such as turning on or off the light.

[0164] The connection control module 1024 is electrically connected to the processing module 1025 and is adapted to: obtain the control signal; perform corresponding control actions according to the control signal to trigger local functions and realize the switching of the control state of the load circuit.

[0165] In this embodiment, the local function refers to the interaction and control between the switching device 102 and the load device 106 directly connected thereto or other intelligent devices within the same local area network. This function does not depend on an external network, such as the switching of the control actions of the connection control module.

[0166] In this embodiment, it is assumed that the switching device 102 is used in a home intelligent lighting system. When the user presses a button (the first operation), the switching device 102 detects the button press and immediately sends the first event information to trigger the cloud, which may cause a home device (such as a lamp) to perform a switching action. If the user releases the button within a short time after pressing it (within the first time period), the processing module 1025 will generate a control signal, thereby triggering a local control action to change the state of the lamp (such as on / off). At the same time, the connection control module 1024 can control the brightness or switching of the lamp by switching different connection states.

[0167] Furthermore, the second trigger mode provided in this embodiment supports the combination of network control and local control. Through the operation of the same button, it can trigger dual network and local functions, improving the flexibility of device control and enabling the switching device 102 to respond intelligently according to the duration and manner of the user's operation, supporting both immediate response and adapting to different usage scenarios.

[0168] It is additionally worth mentioning that since network control is mostly achieved through network paths and is slower than local control, when the switching device 102 performs both local control functions and network control functions, there will be a problem of poor synchronization between local control and network control, which greatly affects the user experience.

[0169] In the second trigger mode provided in this embodiment, after the user interaction module 1021 applies the first operation, it immediately sends the first event information outward, and this information is reported to the network to trigger the remote operation of the corresponding intelligent device. At this time, the local control does not take effect immediately, but when the first operation is removed (released), the connection control module 1024 is triggered by the local control signal to perform the corresponding control action, thereby improving the reaction speed and accuracy of the local control. This solution avoids the conflict between local control and network control by delaying the trigger timing of local control, and thus improves the synchronization problem caused by network delay while ensuring the response speed of network control. Ultimately, the user can experience a more fluent and consistent operation response, significantly enhancing the coherence of the interaction and the user experience.

[0170] Further, the processing module 1025 is further configured to: in the second trigger mode, if it is detected that the user interaction module 1021 is removed more than a first duration after the first operation is applied, no control signal is generated.

[0171] In this embodiment, it is stipulated that in the second trigger mode, when the user operation (the first operation) lasts for more than a certain duration (the first duration), the switching device 102 will not trigger a control signal. Based on this, if the time the user holds the key exceeds the predetermined range, no control signal will be generated. This design can avoid accidental control signals caused by misoperation or the user holding the key for a long time.

[0172] Wherein, the first duration is 100 ms to 3 s, for example 300 ms to 1000 ms, preferably 500 ms. Further, by setting an appropriate time threshold, unnecessary control signals triggered by the user's inadvertent long press are prevented, and the user operation will not cause unnecessary reactions due to long pressing, ensuring that the load is controlled as expected.

[0173] In some embodiments, the user interaction module 1021 includes a key for receiving user operations; the first operation includes a pressing operation applied to the key; the processing module 1025 is configured to: immediately send corresponding first event information externally after detecting that the key is subjected to a pressing operation, so as to improve the response speed of the network function.

[0174] If a release operation is detected within the first duration after the key is subjected to a pressing operation, a control signal is generated to improve the followability of local control.

[0175] Furthermore, when an operation is applied to the key, the solution provided in this embodiment can improve the response speed of the switching device 102 to trigger the network function and enhance the intuitiveness of local function operations.

[0176] On this basis, the processing module 1025 is specifically configured to:

[0177] In the second trigger mode, if it is detected that the key is released more than the first duration after the key is initially subjected to a pressing operation, the control signal is not sent.

[0178] Exemplarily, each key is correspondingly provided with a sensing structure. The key is used to receive user operations. The sensing structure is coupled to the key to provide a sensing signal when the key is operated by the user. The sensing structure is electrically connected to the processing module 1025 to transmit the sensing signal to the processing module 1025, and the processing module 1025 identifies the user operation applied to the key based on the sensing signal.

[0179] In a further example, the sensing structure includes an electronic switch disposed below the button and electrically connected to an I / O port of the processing module 1025. The button is configured to be displaced in a first direction towards the electronic switch when a pressing operation is received, and this first displacement can trigger the electronic switch to switch between the on and off states, thereby generating an electrical signal (sensing signal) for sensing. This electrical signal is transmitted to the processing module 1025 for the processing module 1025 to identify the operation currently occurring on the button.

[0180] A reset structure is provided at a position on the switch device 102 corresponding to the button. This reset structure supports the button and stores potential energy during the process of the button undergoing the first displacement. When the pressing operation is removed, the potential energy stored in the reset structure acts on the button to provide a restoring force for the button to be displaced in a second direction away from the electronic switch. This restoring force can support the button to return to its initial position for the user to apply an operation again; during the process of the button undergoing the second displacement, it can trigger the electronic switch to switch between the on and off states again, thereby generating another electrical signal (another sensing signal) for sensing. This electrical signal is also transmitted to the processing module 1025 for the processing module 1025 to identify the release operation currently occurring on the button.

[0181] The electronic switch can be, for example Figure 21 SW2 as shown. When the electronic switch is triggered, it is turned on and transmits a low-level electrical signal to the corresponding I / O port of the processing module, and vice versa for a high-level electrical signal.

[0182] Furthermore, the processing module 1025 is also adapted to:

[0183] In the second trigger mode, if it is detected that the button is subjected to multiple consecutive pressing operations and release operations within a first time period (wherein a consecutive pressing operation and release operation occurring in sequence and adjacent to each other are regarded as one time), then an alternative is to select a release operation to trigger a control signal, and other pressing operations and release operations do not trigger the control signal (do not generate the control signal).

[0184] In this embodiment, if the user continuously performs multiple pressing operations and release operations, the switch device 102 will select one release operation to trigger a control signal, while other operations do not trigger. For example, if the user quickly presses and releases the button multiple times within a short period, the switch device 102 will select one of the release operations to trigger a control signal (such as the "turn on the light" command), while ignoring other operations. For example, the user may press the button multiple times, but only the first release will cause the light to turn on, and other pressing and release operations are ignored.

[0185] Furthermore, by selectively triggering the control signal, excessive operation interference is avoided, the stability of user control is improved, and the device response becomes more precise.

[0186] In this embodiment, when the alternative release operation is used to trigger the control signal, it can be randomly selecting one release operation from multiple release operations.

[0187] In this embodiment, when the alternative release operation is used to trigger the control signal, it can also be selectively triggering the control signal by selecting the release operation according to a predetermined rule. For example, the predetermined rule defines selecting the pre-determined specified release operation from multiple release operations to trigger the control signal.

[0188] In a further example, the processing module 1025 is further adapted to: within the first duration after detecting that the key is initially pressed down, if it is detected that the key is released and then pressed down at least once again, then except for the initially applied release operation, other pressing-down operations and release operations do not trigger the control signal.

[0189] In this embodiment, if the user applies a pressing-down operation for the first time and then applies a pressing-down operation or a release operation again, the operations other than the initial release operation do not trigger the control signal. This avoids repeated control signals generated by continuous key actions, ensures the accuracy of operations, and reduces the risk of misoperations.

[0190] For example, when the user presses and releases the key for the first time, the switching device 102 will perform corresponding control (such as turning on the light). If the user presses and releases the key again within a short time, the switching device 102 will not trigger the control signal again because it has recognized and executed the action of the first release.

[0191] For example, the first duration is 500 ms. If the user continuously applies three release operations within 500 ms, then alternatively select the first release operation to trigger the control signal; if the user continuously applies two release operations within 500 ms, then still alternatively select the first release operation to trigger the control signal. That is to say, in this example, no matter how many release operations are applied within the first duration, the first release operation is selected to trigger the control signal.

[0192] In some embodiments, the processing module 1025 is further configured to have a third trigger mode, and this third trigger mode is used to set the response speed of the corresponding switch 10241 when the key is operated. Among them, the processing module 1025 is further used to receive a switching instruction and switch between the second trigger mode and the third trigger mode in response to the switching instruction, and the switching instruction originates from an application program.

[0193] Specifically, the processing module 1025 is configured to: in the third trigger mode, if it is detected that a key is subjected to a continuous pressing operation and a releasing operation within a first time period, then a control signal is sent to the connection control module 1024 after the first time period, and a corresponding first event information is sent outwards. The first event information characterizes at least one of the following: the key on which the operation is performed, the type of operation applied to the key.

[0194] Specifically, the processing module 1025 may send the first event information only after detecting the releasing operation, or may send the first event information simultaneously with detecting the releasing operation. Generally speaking, in the third trigger mode, the processing module 1025 needs to determine that the key is subjected to a complete pressing operation and a releasing operation within the first time period before sending the first event information outwards. Different from the second trigger mode in which the first event information is sent immediately in response to the pressing operation, in the third trigger mode, the triggering timing of the first event information is later than that in the second trigger mode.

[0195] Furthermore, in the third trigger mode given in this embodiment, both the control signal for triggering the local function and the first event information for triggering the network function are generated when the releasing operation is completed. By virtue of the latency of the network function execution, a scenario where the local function is executed prior to the network function can be achieved.

[0196] Further, the processing module 1025 is configured to: in the third trigger mode, if it is detected that a key is subjected to multiple continuous pressing operations and releasing operations within the first time period, then no control signal for controlling the connection control module 1024 is generated, and a corresponding second event information is sent outwards; the second event information is different from the first event information. The second event information characterizes at least one of the following: the key on which the operation is performed, the type of operation applied to the key.

[0197] Correspondingly, the processing module 1025 is further configured to: in the second trigger mode, if it is detected that a key is subjected to multiple continuous pressing operations and releasing operations within the first time period, then a control signal for controlling the connection control module 1024 is generated, and no time information (such as the corresponding second event information) is sent outwards.

[0198] Further, the processing module 1025 is configured to: in the third trigger mode, if it is detected that a key is subjected to a pressing operation and the pressing operation is held for more than the first time period, then no control signal for controlling the connection control module 1024 is generated, and a third event information is sent outwards; the third event information is different from the first event information. The third event information characterizes at least one of the following: the key on which the operation is performed, the type of operation applied to the key.

[0199] Correspondingly, the processing module 1025 is further configured to: in the second trigger mode, if it is detected that a key is pressed down and the pressing operation is maintained for more than a first duration, no control signal for controlling the connection control module 1024 is generated, and no event information (such as corresponding third event information) is sent outwards.

[0200] In some embodiments, as Figure 13 shown, the connection control module 1024 has a plurality of switches 10241. One end of each switch 10241 is directly or indirectly electrically connected to the power access port 1022, and the other end is connected to a plurality of independent control output ports 1023.

[0201] The user interaction module 1021 has a plurality of keys corresponding one-to-one to the switches 10241 of the connection control module 1024. Each key is configured to be able to independently receive user operations. As Figure 13 shown, key A corresponds to switch A, and key B corresponds to switch B. Switch A is used to control the load device 106A, and switch B is used to control the load device 106B.

[0202] The processing module 1025 is further configured to: allow independent setting of trigger modes between each key, and be able to switch the second trigger mode and the third trigger mode corresponding to any key in response to a switching instruction.

[0203] In this embodiment, these switches 10241 independently control each output port through keys, and the processing module 1025 supports independent switching of trigger modes by keys and switches different modes according to the switching instruction of the application program. Therefore, this solution provides flexible key mapping and control mode switching, supports a variety of home automation functions, enhances the expandability and compatibility of the switch device 102, and allows users to customize the operation method and control strategy according to their needs. For example, users can control different household appliances (such as lights, fans, etc.) through different keys. Each key corresponds one-to-one to the switch 10241 of the control module, and switches the control mode (such as timed switching, brightness adjustment, etc.) according to the instruction of the application program.

[0204] In addition, different keys can be set to the same trigger mode. For example, they work in the second trigger mode or the third trigger mode at the same time; the same key is only allowed to select and enter one of the trigger modes (such as the second trigger mode or the third trigger mode) at the same time. The switching instruction is issued by the application program. For example, users set the trigger modes of each key through the application program (APP) on the smart terminal, thereby generating corresponding switching instructions.

[0205] It is worth mentioning that the event information (such as the first event information, the second event information, and the third event information) mentioned in the above embodiments can be directly or indirectly sent to the corresponding network device. After receiving these event information, the network device will control the corresponding intelligent device to execute the corresponding function, thereby triggering the network function.

[0206] Specifically, at least one triggering relationship is stored in the network device, and each triggering relationship defines the corresponding relationship between at least one triggering condition and at least one control result. The triggering condition defines at least one key or key operation type (such as single click, double click, long press, etc.), and the control result defines the executable function of the intelligent device (such as an intelligent light) connected to the same network device as the switch device 102. The network device can be a gateway, a router, a server, etc.

[0207] Exemplarily, the switch device 102 includes a left key, a middle key, and a right key, and the controlled devices can be, for example, intelligent light A and intelligent light B. If the triggering condition defines at least one key, the triggering relationship can be, for example:

[0208] Triggering relationship A: If the left key is operated (the operation here can be any operation, such as single click, double click, long press, etc.), then intelligent light A is lit;

[0209] Then in the second triggering mode, the specific process of triggering the network function is as follows:

[0210] The user operates the left key and performs continuous pressing and releasing operations on the left key within the first time period. Then the processing module 1025 will send out the corresponding first event information in response to the pressing operation. This first event information characterizes the key being operated (i.e., the left key). After the server (network device) receives the corresponding first event information through the router or the gateway, it matches the triggering relationship A corresponding to the left key according to the stored triggering relationship, controls the control result defined by the triggering relationship A, and the corresponding intelligent light A will receive the control command to be lit, triggering the network function.

[0211] In the third triggering mode, the process is similar, but the time difference between the event information and the control signal is smaller. The specific process of triggering the network function is as follows:

[0212] The user operates the left key and performs continuous pressing and releasing operations on the left key within the first time period. Then the processing module 1025 will generate a control signal and send out the corresponding first event information only after both the pressing operation and the releasing operation are completed. This first event information characterizes the key being operated (i.e., the left key). After the server (network device) receives the corresponding first event information through the router or the gateway, it matches the triggering relationship A corresponding to the left key according to the stored triggering relationship, and controls the control result defined by the triggering relationship A to be executed. The corresponding intelligent light A will receive the control command to be lit, triggering the network function.

[0213] For further example, if the trigger condition defines at least one type of operation applied to at least one key, the trigger relationship can be, for example:

[0214] Trigger relationship B: When the left key is pressed down, smart light A is turned on;

[0215] Trigger relationship C: When the right key is pressed down, smart light A is turned off;

[0216] Trigger relationship D: When the left key is clicked (continuous pressing down and releasing operations), smart light A is turned on;

[0217] Trigger relationship E: When the right key is clicked (continuous pressing down and releasing operations), smart light A is turned off.

[0218] In the second trigger mode, the specific process of triggering the network function is as follows:

[0219] When the user performs continuous pressing down and releasing operations on the left key within the first time period, the processing module 1025 will send out corresponding first event information in response to the pressing down operation, and this first event information represents that the left key is pressed down. After the server (network device) receives the corresponding first event information through the router or gateway, it matches the trigger relationship B corresponding to the pressing down operation of the left key according to the stored trigger relationship, and controls the control result defined by the trigger relationship B to be executed. The corresponding smart light A will receive the control command to be turned on to trigger the network function.

[0220] When the user performs continuous pressing down and releasing operations on the right key within the first time period, the processing module 1025 will send out corresponding first event information in response to the pressing down operation, and this first event information represents that the right key is pressed down. After the server (network device) receives the corresponding first event information through the router or gateway, it matches the trigger relationship C corresponding to the pressing down operation of the right key according to the stored trigger relationship, and controls the control result defined by the trigger relationship C to be executed. The corresponding smart light A will receive the control command to be turned off to trigger the network function.

[0221] In the third trigger mode, the specific process of triggering the network function is as follows:

[0222] When the user performs continuous pressing and releasing operations on the left button within the first time period, the processing module 1025 will generate a control signal and send out the corresponding first event information only when both the pressing and releasing operations are completed. This first event information indicates that a single-click operation has been applied to the left button. After the server (network device) receives the corresponding first event information through a router or gateway, it matches the trigger relationship D corresponding to the single-click operation of the left button according to the stored trigger relationships, and controls the execution of the control result defined by the trigger relationship D. The corresponding smart light A will receive a lighting control command to trigger the network function.

[0223] When the user performs continuous pressing and releasing operations on the right button within the first time period, the processing module 1025 will generate a control signal and send out the corresponding first event information only when both the pressing and releasing operations are completed. This first event information indicates that a single-click operation has been applied to the right button. After the server (network device) receives the corresponding first event information through a router or gateway, it matches the trigger relationship E corresponding to the single-click operation of the right button according to the pre-stored multiple trigger relationships, and controls the execution of the control result defined by the trigger relationship E. The corresponding smart light A will receive a turning-off control command to trigger the network function.

[0224] In the control loop of the smart light B, for example, a switch 10241 of the connection control module 1024 of the switch device 102 is electrically connected to the smart light B through a control line at the control output port 1023 to control the loop control state of the smart light B. When in the second trigger mode, when the user operates the left button to perform continuous pressing and releasing operations, the processing module 1025 will generate a control signal to switch the control state of the smart light B (such as from off to on). Through the definition of the trigger relationship A or B, the user can turn on the smart light A and at the same time turn on the smart light B by operating the left button in the second trigger mode. Since the first event information is sent immediately during the pressing operation, and the control signal is generated during the releasing operation, the lighting actions of the smart light A and the smart light B can be almost synchronized.

[0225] In the third trigger mode, due to the small time difference between the control signal and the event information, the execution of the network function may be slightly slower than the local function. At this time, the user can achieve the scenario where the smart light B and the smart light A are lit in sequence by operating the left button.

[0226] It is worth mentioning that the switch device 102 is pre-added to the network where the network device is located, such as the Internet of Things platform where a certain server is located, or the network formed by a certain gateway. The following embodiments will further introduce the process of connecting the switch device 102 to the network. Specifically, the processing module 1025 is further set to:

[0227] Before, after, or simultaneously with immediately sending out corresponding first event information upon detecting a first operation applied to the user interaction module 1021, if it is further detected that an operation that meets a first specific condition is applied to the user interaction module 1021 within a first duration after the first operation is applied, enter the pre-configuration mode; if in the pre-configuration mode, it is further detected that the operation applied to the user interaction module 1021 meets a second specific condition, enter the configuration mode; in the configuration mode, the processing module 1025 sends out a predetermined indication information so that an external network device can search for this indication information and add the switching device 102 to the network to trigger the network function through the first event information; wherein, the network device can be, for example, a gateway / router, a server, or a smart terminal; wherein, the first specific condition and the second specific condition are at least one of the following different: the number of times the first operation is continuously applied and removed, and the interval duration between adjacent applications and removals of the first operation.

[0228] In an embodiment where the user interaction module 1021 includes a button for receiving user operations, the processing module 1025 is specifically adapted to:

[0229] Before, after, or simultaneously with immediately sending out corresponding first event information upon detecting a first operation applied to the button, if within a first duration after detecting the first operation, the button is further applied with an operation that meets a first specific condition, enter the pre-configuration mode; if in the pre-configuration mode, it is detected that the button is applied with an operation that meets a second specific condition, enter the configuration mode; in the configuration mode, the processing module 1025 sends out a predetermined indication information; the indication information at least characterizes the switching device 102 so that an external network device can search for this indication information and add the switching device 102 to the network according to this indication information; wherein, the network device can be, for example, a gateway / router, a server, or a smart terminal; wherein, between the first specific condition and the second specific condition, there is at least one different feature, for example: the number of times the first operation is continuously applied and removed or the interval duration between adjacent applications and removals of the first operation.

[0230] In this embodiment, the switching device 102 enters the pre-configuration mode according to the button operation. If an operation that meets the second specific condition is detected, it enters the configuration mode, and in the configuration mode, it sends out indication information for external devices to perform network configuration.

[0231] Regardless of whether it is in the second trigger mode or the third trigger mode, the configuration mode can be entered through the operation of the button. By setting the pre-configuration mode and the configuration mode, the switch device 102 can enter the network configuration phase when the user performs a specific operation, thereby completing the automatic networking of the device. This design simplifies the installation and configuration process of the device, enabling the user to more conveniently connect the switch device 102 to the home network.

[0232] Furthermore, the processing module 1025 is further adapted to: in the second trigger mode, before, after, or simultaneously with entering the pre-configuration mode, also generate a corresponding control signal in response to the button being first applied with a first operation.

[0233] In this embodiment, after the user presses the button, the switch device 102 immediately performs a control action (such as turning on the light) and enters the pre-configuration mode later. This ensures that the user's immediate control needs are met without being affected by mode changes.

[0234] It can be seen that in the second trigger mode, the control signal can also be synchronously triggered, and this control signal can be executed by the connection control module 1024 to trigger the local function. In the third trigger mode, the control signal will not be triggered, and at this time, only the triggering of the configuration mode is focused on.

[0235] That is to say, in the second trigger mode, the same operation of the same button can trigger multiple functions simultaneously, while in the third trigger mode, the same operation of the same button can only trigger the same function, and different operations of the same button can trigger different functions, realizing the function multiplexing of the button.

[0236] Furthermore, the first operation is the pressing operation applied to the button. The first specific condition characterizes that at least one continuous pressing operation and release operation are applied within the first time period. The second specific condition characterizes that the interval time between two adjacent pressing operations and release operations conforms to the second time period. The value of the second time period is 2 seconds to 10 seconds, for example, 5 seconds.

[0237] Then, before, after, or simultaneously with immediately sending the corresponding first event information outside after detecting the pressing operation applied to the button, further, in the case that the button is applied with at least one pressing operation and the corresponding release operation within the first time period after detecting the pressing operation, it is determined that the first specific condition is met and the pre-configuration mode is entered. At the same time, the indicator light of the light-emitting unit corresponding to the button emits a second indication signal (for example, flashes twice, each time lighting up for 100 ms and extinguishing for 200 ms) to prompt the switch device 102 to enter the pre-configuration mode.

[0238] In the pre-configuration mode, if it is further detected that the key is pressed and released and the pressing operation lasts for a second duration, it is determined that the second specific condition is met, and the configuration mode is entered.

[0239] In this way, the key multiplexing effect of different operations of the same key triggering different functions is achieved.

[0240] Further, after entering the pre-configuration mode, if no subsequent operation is detected, the pre-configuration mode will be maintained for at least a certain period of time (for example, 1 second to 3 seconds, preferably 1.2 seconds).

[0241] In some embodiments, the processing module 1025 is set to have a fourth trigger mode for setting the control action that the switch 10241 should perform when the switch device 102 is powered on again after power-off. Specifically, the processing module 1025 is set to be adapted to: in the fourth trigger mode, when powered on again after power-off, set the switch 10241 to one of the following three states:

[0242] State 1: The switch 10241 performs a disconnecting action;

[0243] State 2: The switch 10241 continues the control action before power-off;

[0244] State 3: The switch 10241 performs a connecting action.

[0245] In some embodiments, the processing module 1025 is set to have a fifth trigger mode to be adapted to: in the fifth trigger mode, in response to an operation applied to a key, switch the corresponding switch 10241 to the connecting action, and in the case where there is originally a switch 10241 in the connecting action, switch the originally connected switch 10241 to the disconnecting action, so that each user operation can only trigger one of the multiple switches 10241 to perform the connecting action.

[0246] Further, the processing module 1025 is also set to be able to: when entering the fifth trigger mode from any other trigger mode, keep all switches 10241 in the disconnecting action. If no switch 10241 is controlled to perform the connecting action during the fifth trigger mode holding period, when exiting the fifth trigger mode, all switches 10241 still remain in the disconnecting action.

[0247] Further, the processing module 1025 is also set to be able to: when powered off and then powered on again in the fifth trigger mode, if there is a switch 10241 in the connecting action before power-off, after power-on, keep all switches 10241 in the disconnecting action.

[0248] In a specific example, such as Figure 14As shown, the user enters the configuration interface A corresponding to the switch device 102 through the APP application on the mobile phone. It can be seen that a total of five setting items, namely "button mode", "indicator light", "relay setting", "local interlock", and "fifth trigger mode", are displayed in the configuration interface A. Among them, "relay setting" is used to set the mapping relationship involved in the above embodiments. Clicking on this setting item will jump to the interface B as shown in Figure 10 where the user can further freely define the mapping relationship between the button and the switch. By clicking on the "fifth trigger mode" option, the configuration interface F of the fifth trigger mode can be entered. This fifth trigger mode belongs to the global mode, that is, once it takes effect, all the switches 10241 corresponding to the buttons of the switch device 102 will work according to the logic of the fifth trigger mode.

[0249] In some embodiments, the processing module 1025 is set to have a sixth trigger mode, so as to be suitable for: in the sixth trigger mode, setting the switch 10241 corresponding to the button to remain in the on state with a higher priority. In this mode, the switch 10241 corresponding to the button will remain in the on operation and will not perform the off operation due to button operation.

[0250] Furthermore, the processing module 1025 is also set to be suitable for switching the corresponding switch 10241 to the on operation when entering the sixth trigger mode.

[0251] Furthermore, whether each button's trigger mode can enter the sixth trigger mode can be independently set, and the switch 10241 that is triggered to enter the on operation after the button set to the sixth trigger mode is operated is determined according to the mapping relationship recorded in the above embodiments. For example, when the user defines the mapping relationship as the left button triggers relay L2, the middle button triggers relay L1, and the right button triggers relay L3, if the middle button is set to the sixth trigger mode, the corresponding relay L1 will remain in the on operation, and the control operation of relay L2 is not affected by the switching of the trigger mode of the middle button.

[0252] Furthermore, the processing module 1025 is also set to be suitable for: if a certain button is set to be in state one in the fourth trigger mode (that is, the corresponding switch is set to perform the off operation when powered on again after power off), and this button is simultaneously set to be in the sixth trigger mode, setting the sixth trigger mode of this button to have a higher priority than the fourth trigger mode, that is, when the switch device 102 is powered off and then powered on again, it does not control the corresponding switch 10241 to perform the off operation due to the fourth trigger mode setting, but keeps the corresponding switch 10241 in the on operation according to the rules of the sixth trigger mode.

[0253] Further, the processing module 1025 is further configured to be adapted to switch the corresponding switch 10241 to the on operation when entering the sixth trigger mode. For example, the switch 10241 corresponding to a certain button is currently in the off operation. When the processing module 1025 responds to the user operation and sets the button to the sixth trigger mode, the control operation of the corresponding switch 10241 will be switched to the on operation.

[0254] In some embodiments, a seventh trigger mode is further provided. The processing module 1025 is configured to have the seventh trigger mode to be able to: after recognizing an operation applied to the button in the seventh trigger mode, send a pre-set wireless signal outward, and the wireless signal is used to control the corresponding intelligent device. Here, the intelligent device 109 can be understood as other smart home devices that are connected to the same network access device 101 and / or cloud as the switch device 102 (which can be a smart device connected to the same network as the switch device 102, or a load device 106 directly connected to the switch device 102).

[0255] Furthermore, the wireless signal here can be sent through the first communication protocol as Figure 17 shown, and is forwarded to the intelligent device 109 via the network access device 101, such as intelligent lamps, intelligent curtains, intelligent window openers, intelligent thermostats, intelligent wall switches, etc.

[0256] Further, the processing module 1025 is further configured to be adapted to switch the corresponding switch 10241 to the on operation when entering the seventh trigger mode, or maintain the original control operation of the switch 10241.

[0257] Further, when the fifth trigger mode is turned on, the first trigger mode and / or the seventh trigger mode are automatically exited to maintain the high priority of the fifth trigger mode.

[0258] In some embodiments, when the switching device 102 has multiple trigger modes, the processing module 1025 switches to one or more trigger modes pointed to by the received switching instruction. The switching instruction is generated after the user selects a target trigger mode (i.e., the specific trigger mode that the switching device 102 is expected to enter) from multiple trigger modes on the terminal device. The processing module 1025 can alternatively enter one of the trigger modes. Without contradiction, multiple trigger modes can also be entered simultaneously. The trigger modes belonging to the global mode (such as the fifth trigger mode) will take effect for the entire switching device 102, and the trigger modes belonging to the local mode (such as other trigger modes except the fifth trigger mode: the first trigger mode, the second trigger mode, the third trigger mode, the fourth trigger mode, the sixth trigger mode, the seventh trigger mode, the virtual output mode, the local output mode) can be set to take effect in units of the keys of the user interaction module 1021. That is, when the user interaction module 1021 has multiple keys, a certain key can be independently set to enter one or more local modes, and thus each key can be set to be in a different trigger mode.

[0259] As Figure 15 shown, a schematic diagram of the interface operation for local mode selection is given; after the user enters the configuration interface corresponding to the switching device 102 through the APP application on the mobile phone (such as Figure 14 interface A in), by clicking the "key mode" option, the user can enter the selection interface G for the local mode, that is, the key mode configuration interface D. As Figure 15As shown, in the button mode configuration interface G, corresponding local mode selection areas are respectively shown for the three buttons. Taking the left button as an example, in the "Button Working Mode" setting item, two working modes, namely "Wired Switch" and "Wireless Switch", are provided. After selecting the "Wired Switch" working mode, trigger controls for the "First Trigger Mode", "Second Trigger Mode", "Sixth Trigger Mode", and "Fourth Trigger Mode" will be further shown. The "First Trigger Mode" is used to set the first trigger mode of the left button, and the switching instruction generated after triggering will point to the first trigger mode. The "Second Trigger Mode" is used to set the second trigger mode and the third trigger mode of the left button. When the corresponding trigger control is selected, the left button is in the second trigger mode; when not selected, the left button is in the third trigger mode, and the generated switching instruction will point to the second trigger mode or the third trigger mode. The "Sixth Trigger Mode" is used to set the sixth trigger mode of the left button, and the switching instruction generated after the corresponding trigger control is selected will point to the sixth trigger mode. The "Fourth Trigger Mode" is used to set the fourth trigger mode of the left button. After the corresponding trigger control is selected, the specific state selection interface H of the fourth trigger mode of the left button will be further entered. In interface H, State One, State Two, and State Three are listed for the user to select. It should be noted that since the "Fifth Trigger Mode" belongs to the global mode, it is separated from the local mode selection interface.

[0260] After selecting the "Wireless Switch" working mode, the triggered switching instruction will point to the seventh trigger mode, which is used to set the switching device 102 to enter the seventh trigger mode. In addition, under the "Wireless Switch" option, the trigger controls for the "First Trigger Mode", "Second Trigger Mode", "Sixth Trigger Mode", and "Fourth Trigger Mode" are still further shown, which are used to set the first trigger mode, second trigger mode, third trigger mode, sixth trigger mode, and fourth trigger mode of the left button respectively. That is to say, the first to fourth trigger modes and the sixth trigger mode can be set under both the "Wired Switch" option and the "Wireless Switch" option, and the functions realized by the same trigger mode under the "Wired Switch" and under the "Wireless Switch" are not completely the same. Among them, when switching to the "Wired Switch", the "Second Trigger Mode" is automatically turned on and the "Sixth Trigger Mode" is turned off; when switching to the "Wireless Switch" mode, the "Second Trigger Mode" and the "Sixth Trigger Mode" are automatically turned on.

[0261] In some embodiments, as Figure 16 shown, the switching device 102 further includes an indication module 1027. The indication module 1027 is electrically connected to the processing module 1025 and is correspondingly arranged with the user interaction module 1021 to indicate the operation applied to the user interaction module 1021 under the control of the processing module 1025, and / or indicate the change of the working state / mode of the switching device 102.

[0262] It should be noted that with the rapid development of the smart home industry, the control functions of switch devices have gradually become more abundant, not limited to the power control of local load circuits, but developing towards more diverse network controls. These newly added functions have made the control logic of the switch device 102 more complex, and the traditional indicator light logic can no longer meet the user's intuitive and accurate feedback requirements for the device status.

[0263] Specifically, in the intelligent switch device 102 with multiple operation modes and complex functions, the status of the indicator light may not comprehensively and accurately reflect the working status of the device. Especially when it comes to functions such as network control, device pairing, and intelligent linkage, the feedback mechanism of the traditional indicator light often becomes ambiguous and not intuitive enough.

[0264] Based on this, an embodiment of the present disclosure provides a switch device 102, which provides more accurate and intuitive status feedback in different working modes through the combination of the indication module 1027 and the processing module 1025.

[0265] Specifically, in the embodiment of the present disclosure, the user interaction module 1021 has a button, the connection control module 1024 has a switch 10241, the indication module 1027 has a light-emitting unit corresponding to the button of the user interaction module 1021, and each light-emitting unit has at least two indication states.

[0266] In this embodiment, the light-emitting unit can be understood as a specific hardware component in the indication module 1027, such as an LED lamp, a light-emitting diode, etc., for forming different indication states.

[0267] The indication state can be understood as the visual performance state of the indicator light of the light-emitting unit, such as color, brightness, blinking frequency, etc. Each light-emitting unit has at least two indication states, and the change of the indication state can directly reflect the operation type, the current working state of the switch device, etc.

[0268] In this embodiment, there is a one-to-one correspondence between the button and the light-emitting unit. When the user operates the switch device 102 through the button, the change in the operation of the button will affect the change in the indication state of the light-emitting unit, thereby feeding back the current control state or working state of the device to the user.

[0269] In this embodiment, the processing module 1025 is set to have a virtual output mode, suitable for: before entering the virtual output mode, in response to the change in the operation of the button, the indication state of the corresponding light-emitting unit is changed, and the control action of the corresponding switch 10241 is switched, so as to indicate the control action of the switch 10241 corresponding to each button through the indication state of each light-emitting unit. At this time, it can be understood that the processing module 1025 is in the local output mode, where the indication state of the light-emitting unit is mainly used to indicate the change in the control action of the local switch.

[0270] After entering the virtual output mode, in response to the operation of a key, the indication state of the corresponding light-emitting unit is controlled to change, and the control action of the switch 10241 is kept unchanged, so that the indication state of the light-emitting unit and the control action of the switch 10241 operate independently of each other.

[0271] In this embodiment, in the virtual output mode, the control action of the switch 10241 is not changed in terms of the control state, but the state indication of the device is indirectly represented by the change of the light-emitting unit. In other words, in the virtual output mode, the control action of the switch 10241 (such as the on or off action) will not change due to the key operation. That is, even if the user presses the key, the physical switch of the device (such as the switch controlling the power supply) still maintains the current state. The user can trigger the change of the indication state of the light-emitting unit through the key operation, but the state of the physical switch of the device (such as the control action of the switch 10241) is not affected.

[0272] Furthermore, in the solution provided in this embodiment, through the intelligent processing module 1025, the switching device 102 can switch between multiple operation modes and adjust the state of the indicator light according to different operation modes, so as to adapt to more complex functional requirements. For example, in some scenarios, it may be desired not to directly intervene in the power state of the device, but only to feedback the current operation mode or state through the indication state. This is especially beneficial for devices that need to frequently adjust the working mode, because it can avoid physical wear or power waste caused by frequent switching of the device. Through the virtual output mode, the user can flexibly operate the device without physically switching the switch, and at the same time, the working state of the device is real-time feedback through the change of the light-emitting unit, enhancing the user experience.

[0273] Further, the processing module 1025 is also configured to be adapted to:

[0274] In the virtual output mode, after controlling the indication state of the corresponding light-emitting unit to change in response to the operation of a key, generate a control message according to the indication state after the change of the light-emitting unit.

[0275] Send the control message so that: an intelligent device that has previously established a pairing relationship with the switching device 102 receives the control message and controls its own working state based on the parsed indication state.

[0276] In this embodiment, the control message refers to a data packet used to transmit device control information, which is usually transmitted between devices through a certain communication protocol. The control message can contain information such as the current state of the switching device 102, operation commands, control instructions, etc. The goal is to enable the receiving intelligent device to adjust its behavior according to the content of the message.

[0277] In this embodiment, the indication status information carried in the control message not only reflects the change of the light-emitting unit but also represents the corresponding control information at the same time. This enables the intelligent device to adjust its own working state according to the change of the indication status after receiving the control message, thereby ensuring the behavioral consistency between the switching device 102 and the intelligent device.

[0278] In addition, when in the virtual output mode, the change of the indication status of the light-emitting unit is directly embedded into the control message as control information, and there is no need to carry additional control information separately. By integrating the indication status and control information, the redundant information in the control message is reduced. This design simplifies the complexity of the message, reduces the communication overhead, and at the same time ensures efficient communication between devices. The intelligent device can perform more complex automated operations based on these concise control messages, such as the channel functions or non-channel control functions controlled by the local switch 10241. The non-channel control function can be understood as the function that the switching device 102 runs within the local network (for example, the local area network of a home or office), emphasizing direct local communication between devices without relying on an external network. Even in the absence of the Internet, local functions can still be executed, such as controlling the device switch through a button, adjusting the light brightness, etc.

[0279] Furthermore, as Figure 17 shown, the processing module 1025 is further configured to be suitable for:

[0280] In the second trigger mode or the third trigger mode, the processing module 1025 sends the first event information through the first communication protocol. In the virtual output mode, the processing module 1025 sends the control message through the second communication protocol. The first communication protocol is different from the second communication protocol. The first communication protocol is used for network communication to implement preset network functions, and the second communication protocol is used for local communication to trigger local wireless control functions.

[0281] In this embodiment, the network function can be understood as that after the switching device 102 accesses the network, it can interact with external intelligent devices (such as cloud servers, remote control terminals, controlled intelligent devices) through network protocols, so as to realize functions such as remote control, monitoring, configuration, or status synchronization of the device. The network function is pre-configured, for example, customized through the trigger relationship involved in the above embodiment.

[0282] It can be seen that in this embodiment, the first communication protocol is used for network communication, that is, devices communicate with each other through the Internet or a local area network (LAN). For example, but not limited to, at least one of Wi-Fi, ZigBee, BLE Mesh, Thread, etc. These protocols support devices to connect to the Wi-Fi network of a home or office and allow devices to perform remote control through the Internet or a local area network.

[0283] The second communication protocol is used for local communication, that is, direct communication between devices in a wireless manner without relying on the Internet, for control and operation in a local environment, and is suitable for the rapid response and low-latency requirements between devices. For example, but not limited to, Bluetooth, ZigBee, Thread, or some custom private communication protocols (such as 433 communication, etc.), which support devices to communicate within a relatively close physical range and can perform control tasks without relying on an external network.

[0284] Among them, the custom private communication protocol can be understood as a communication protocol designed and implemented by a specific device manufacturer or technology provider according to its own needs and application scenarios. Different from common standard communication protocols (such as Wi-Fi, Bluetooth, ZigBee, etc.), the private communication protocol does not have a unified international or industry standard, but is a protocol customized according to the specific requirements of specific devices and application scenarios. In this embodiment, the change in the indication state of the light-emitting unit is directly embedded into the control message as control information, and there is no need to separately carry additional control information. By integrating the indication state and control information, the redundant information in the control message is reduced. This design simplifies the complexity of the message, reduces communication overhead, and is more conducive to the customization of the private communication protocol.

[0285] Further, in the second trigger mode, after the processing module 1025 detects the pressing operation applied to the key, it immediately sends out the corresponding first event information, and the corresponding light-emitting unit forms a first indication state (for example, the indicator light of the corresponding light-emitting unit emits a first indication signal, such as flashing once). Or, in the third trigger mode, if it is detected that the key is subjected to a continuous pressing operation and a releasing operation within the first time period, the corresponding first event information is sent out after the first time period, and the corresponding light-emitting unit forms a first indication state (for example, the indicator light of the corresponding light-emitting unit emits a first indication signal, such as flashing once).

[0286] In the virtual output mode, when the processing module 1025 detects the pressing operation applied to the key or continuous pressing and releasing operations, it keeps the original control action of the corresponding switch 10241 unchanged, instructs the corresponding light-emitting unit to form a second indication state, and sends out a control message carrying the second indication state through the second communication protocol to trigger the working state switching of the pre-paired intelligent device.

[0287] Among them, between the first indication state and the second indication state, at least one of the following is different: the color of the indicator light, the number of times / frequency of the indicator light flashing, the on / off state of the indicator light.

[0288] In the virtual output mode, the switching device 102 can maintain its original control actions, and at the same time trigger the state switching of the paired intelligent device through the second indication state carried in the control message.

[0289] Further, in the virtual output mode, when detecting a pressing operation on the key or continuous pressing and releasing operations, the indicator lights of the corresponding lighting units do not emit the first indication signal, but instead flip the indicator light state (for example, the lit indicator light flips to off), and send a control message carrying the flipped indicator light state information through the second communication protocol, so as to trigger the working state flipping of the intelligent device that has been pre-paired through the indicator light state information (for example, turning on the light flips to turning off the light).

[0290] Further, each lighting unit includes indicator lights of two colors, so as to be able to achieve differences in the lighting color or lighting frequency between different indication states. In a specific example, as Figure 18 shown, each lighting unit includes indicator lights of two colors, white and orange (such as Figure 21 the LED2 shown). The lighting parameters of the indicator lights of the lighting unit can be custom-adjusted by the user, specifically, the user can perform visual adjustment on the application program interface of the terminal device. As Figure 18 shown, after the user enters the configuration interface A corresponding to the switching device 102 through the APP application program of the mobile phone, the configuration interface A also displays the "indicator light" option. By entering the indicator light setting interface I through this option, the "indicator light" option is used to set the state parameters of the indicator lights of each lighting unit of the indication module 1027, such as the indicator light switch, brightness parameters, etc. As Figure 18 shown, after entering the indicator light configuration interface I, an indicator light switch control, a white light brightness adjustment control, and an orange light brightness adjustment control are provided. The user can turn off / on the indicator light through the indicator light switch control, and can adjust the brightness of the white indicator light and the orange indicator light through the white light / orange light brightness adjustment control.

[0291] In some embodiments, the processing module 1025 is further configured to be adapted to automatically enter the virtual output mode after entering the sixth trigger mode and / or the seventh trigger mode and completing the pairing with the corresponding intelligent device.

[0292] Specifically, when the processing module 1025 only has the sixth trigger mode, it can be set to the virtual output mode after entering the sixth trigger mode and completing the pairing with the corresponding intelligent device.

[0293] When the processing module 1025 only has the seventh trigger mode, it can be set to the virtual output mode after entering the seventh trigger mode and completing the pairing with the corresponding intelligent device.

[0294] When the processing module 1025 has both the sixth trigger mode and the seventh trigger mode, it can be set to the virtual output mode after entering the sixth trigger mode and the seventh trigger mode simultaneously and completing the pairing with the corresponding intelligent device.

[0295] Of course, in some embodiments, when the processing module 1025 has both the sixth trigger mode and the seventh trigger mode, it is still possible to alternatively enter one of the trigger modes and then trigger the entry into the virtual output mode in cooperation with the pairing operation of the corresponding intelligent device.

[0296] In this embodiment, the activation of the virtual output mode is combined with the sixth trigger mode and the seventh trigger mode, so that the virtual output mode can be automatically triggered after entering the sixth trigger mode and / or the seventh trigger mode and completing the corresponding device pairing operation, without the need for manual setting by the user.

[0297] This design greatly simplifies the user operation process, enables a more flexible and efficient seamless connection between the switch device 102 and the intelligent device, and significantly improves the automation level and operation convenience of the device. Through this automatic trigger mechanism, the user no longer needs to perform cumbersome configuration steps. Just complete the device pairing to achieve fast and intuitive control, enhancing the intelligent experience of the entire smart home system.

[0298] Furthermore, if the user interaction module 1021 contains multiple buttons, the trigger mode (the sixth trigger mode, the seventh trigger mode, the virtual trigger mode, etc.) of each button can be set independently, so as to endow different control functions to different buttons. Specifically, each button can be independently configured with a pairing relationship to be paired with different intelligent devices. The user can independently configure each button as the sixth trigger mode and / or the seventh trigger mode according to needs. When the corresponding button is also configured with a pairing relationship, it will automatically trigger the corresponding light-emitting unit to enter the virtual output mode. At this time, the indication state of the light-emitting unit corresponding to the button no longer directly indicates the control action of the switch 10241, but reflects the working state of the intelligent device paired with this button. This makes each button not only control the switch of the switch 10241, but also enables independent control of multiple intelligent devices and real-time feedback of the status of the corresponding devices. Thus, the user can control the intelligent devices in the home more accurately and conveniently, enhancing the intelligent linkage ability of the system and the user's operation experience.

[0299] The following gives a feasible implementation manner of the pairing operation involved in the above embodiment:

[0300] Specifically, when the processing module 1025 receives a pairing instruction, it enters the pairing mode. In the pairing mode, the processing module 1025 is in a pairing state of continuously listening for pairing signals. When it receives a pairing signal from a target intelligent device (such as an intelligent lamp), it stores the identification information (such as product ID, MAC address, etc.) carried in the pairing signal that uniquely identifies the target intelligent device, so as to establish a pairing with the target intelligent device.

[0301] In addition, in another embodiment, in the pairing mode, the processing module 1025 can also actively send out a pairing signal. The pairing signal carries the identification information (such as the ID of the switch device 102, MAC address, etc.) that uniquely identifies the switch device 102. After the target intelligent device that has entered the pairing state through the pairing operation receives the pairing signal sent by the switch device 102, it stores the ID of the switch device 102 to complete the pairing.

[0302] After the pairing is completed, the control signal sent when the switch device 102 is operated will carry the identification information of itself or the target intelligent device, so that the target intelligent device can confirm whether the control signal is a legal signal. When it is judged to be legal, it will respond; when it is judged to be illegal, it will not respond, so that the switch device 102 can perform legal control and / or be controlled by the intelligent device with which a pairing relationship has been established.

[0303] Among them:

[0304] Intelligent devices that can establish a legal control pairing relationship with the switch device 102 can be, for example but not limited to: intelligent curtain motors, intelligent lamps, intelligent window openers, etc. The control exerted by the switch device 102 on them can be, for example but not limited to:

[0305] Controlling the intelligent curtain motor to open the curtain, close the curtain, pause the curtain at a certain opening degree, etc.;

[0306] Controlling the intelligent lamp to turn on, turn off, adjust the brightness, adjust the color temperature, etc.;

[0307] Controlling the intelligent window opener to open the window, close the window, pause the window at a certain opening degree, etc.

[0308] Intelligent devices that can establish a legal controlled pairing relationship with the switch device 102 can be, for example but not limited to: self-powered wireless switches, battery wireless switches, human presence sensors, infrared induction sensors, etc. The functions executed by the switch device 102 when being controlled can be, for example but not limited to:

[0309] Responding to a single-click operation signal sent by a self-powered wireless switch / battery wireless switch to switch the control action of a certain circuit breaker 10241;

[0310] Switch the control action of a certain circuit breaker 10241 in response to operation signals such as double - click / triple - click / long - press sent by the battery wireless switch;

[0311] Switch the control action of a certain circuit breaker 10241 in response to the induction signal sent by the human presence / infrared induction sensor.

[0312] In addition, these intelligent devices need to communicate with the switch device 102 based on the same set of custom private communication protocols to achieve local mutual communication. For example, they can be devices from the same manufacturer as the switch device 102, and thus these intelligent devices and the switch device 102 follow the same set of custom private communication protocols. Or, they can also be devices from different manufacturers but following the same set of custom private communication protocols as the switch device 102.

[0313] Furthermore, the pairing instruction comes from the network devices in the network added by the switch device 102 through the configuration mode. For example, a mobile phone. The user can trigger the pairing instruction through the control operation on the relevant page of the mobile phone, and this pairing instruction is sent to the switch device 102 through the network to remotely trigger the switch device 102 to enter the pairing state.

[0314] In a specific example, the user interaction module 1021 has one or more buttons, and the processing module 1025 can independently pair each button. As Figure 19 shown, it is a schematic diagram of the interface operation. The specific operation can be, for example:

[0315] The switch device 102 has three buttons: a left button, a middle button, and a right button. For example, if the user needs to pair the left button, the user enters the corresponding configuration interface A of the switch device 102 through the APP application of the mobile phone. "Local mutual control" is used for pairing each button. As Figure 19 shown, after clicking the "Local mutual control" option, enter the button selection interface D. After the user selects the "left button" on the button selection interface and enters the pairing interface E of the left button, it can be seen that there are two display items and three operation items shown in the pairing interface of the left button.

[0316] The two display items are respectively "Local mutual control ID" and "Number of wireless switches". Among them, "Local mutual control ID" is used to display the identification information (i.e., ID) of the target intelligent device that has established a pairing relationship, and "Number of wireless switches" is used to display the number of wireless switches that have established a pairing relationship with the switch device 102.

[0317] Among them, the three operations are "Add Remote Control / Mutual Control", "Clear Mutual Control", and "Clear Wireless". Among them, "Add Remote Control / Mutual Control" is used to generate the pairing instruction to trigger the switch device 102 to enter the pairing state. In this state, the switch device 102 can be paired with other intelligent devices or wireless switches. It can be paired with multiple wireless switches. Furthermore, multiple paired wireless switches can control the switch device 102. The specific number of paired wireless switches will be displayed through the "Number of Wireless Switches" display item. "Clear Mutual Control" is used to generate a clear mutual control instruction, which is sent to the switch device 102. The processing module 1025 clears the ID information of the target intelligent device that has been paired locally according to the clear mutual control instruction, realizing the reset of the pairing of the switch device 102. "Clear Wireless" is used to generate a clear curve instruction, which is sent to the switch device 102. The processing module 1025 clears the ID information of the wireless switches that have been paired locally according to the clear wireless instruction, realizing the reset of the pairing of the switch device 102. After clearing the wireless, "Number of Wireless Switches" will display 0.

[0318] Further, when two switch devices establish a mutual control relationship through pairing, the circuit breakers of the connection control module, the indicator lights of the lighting units, and the display status of the configuration interface between these two switch devices will be completely synchronized. When a switch device establishes a paired local mutual control relationship with another switch device and a wireless switch, this wireless switch will act as a remote control function and can wirelessly control the other two switch devices in the same paired mutual control relationship.

[0319] In some embodiments, the processing module 1025 is further configured to be not suitable for setting the indication module 1027 to the virtual output mode after entering the first trigger mode, that is, after entering the first trigger mode, it will not automatically trigger the corresponding lighting unit to enter the virtual output mode. The state change of the indicator light of the lighting unit is still used to indicate the change of the control action of the corresponding circuit breaker 10241.

[0320] In some embodiments, as Figures 20a to 20d shown, the processing module 1025 is further configured to be suitable for:

[0321] As Figure 20a shown, when it is determined that the switch device 102 is restarted without power-off, the circuit breakers 10241 of the connection control module 1024 are restored to the default state.

[0322] When it is determined that the switch device 102 is restarted due to power-off and then power-on, it is further determined whether it is in the fifth trigger mode;

[0323] If so, all the circuit breakers 10241 of the connection control module 1024 are switched to the off action (i.e., off output, asFigure 20a as shown); or,

[0324] further determine the control actions of each switch 10241 of the connection control module 1024 according to the specific state of the fourth trigger mode (such as Figure 20b as shown). Specifically, as Figure 20d shown, if the fourth trigger mode is in state two, the corresponding switch 10241 continues the control action before power-off; otherwise, switch each switch 10241 of the connection control module 1024 to the off action.

[0325] If not, further switch the switches 10241 corresponding to the keys in the first trigger mode and / or the seventh trigger mode to the on action (i.e., turn on the output, such as Figure 20a , Figure 20b as shown), and determine the control actions of the remaining switches 10241 (i.e., the switches corresponding to the keys not in the first trigger mode and the seventh trigger mode) according to the specific state of the fourth trigger mode. Specifically, as Figure 20d shown, if the fourth trigger mode is in state one, the corresponding switch 10241 performs the off action; if the fourth trigger mode is in state two, the corresponding switch 10241 continues the control action before power-off; if the fourth trigger mode is in state three, the corresponding switch 10241 performs the on action.

[0326] Furthermore, as Figure 20c shown, before switching the switches 10241 corresponding to the keys in the first trigger mode and / or the seventh trigger mode to the on action, it is also necessary to determine whether the keys in the first trigger mode and / or the seventh trigger mode are in the sixth trigger mode;

[0327] If so, only then switch the corresponding switch 10241 to the on action (i.e., turn on the output);

[0328] Otherwise, determine the control actions of the corresponding switch 10241 according to the specific state of the fourth trigger mode. Specifically, as Figure 20d shown, if the fourth trigger mode is in state one, the corresponding switch 10241 performs the off action; if the fourth trigger mode is in state two, the corresponding switch 10241 continues the control action before power-off; if the fourth trigger mode is in state three, the corresponding switch 10241 performs the on action.

[0329] It can be seen that in this embodiment, the priority relationship of each trigger mode is given when the switch device 102 is powered off and restarted, so as to ensure that when the switch device 102 has multiple trigger modes at the same time, the switches 10241 can perform control actions as expected when powered off and then on.

[0330] In addition, it is worth mentioning that although state one and state three of the fourth trigger mode respectively require all the switches 10241 to perform disconnection actions and connection actions, their priorities are relatively low. When the switching device 102 enables other trigger modes simultaneously, other trigger modes will be given priority, especially the fifth trigger mode, which will be considered first.

[0331] In addition, after the processing module 1025 determines the specific control actions of each switch 10241, it will send out an inter-control message externally. This inter-control message carries at least the current working state of the switching device 102 (for example, including the on / off action states of each switch 10241, the states of each indicator light, etc.), enabling the switching device 102 that has established an inter-control relationship with the switching device 102 in advance through pairing to synchronize the working states.

[0332] In addition, for the processing module 1025 involved in the above embodiments, it controls the general operations of the switching device 102 and executes management functions related to other devices in the network (such as load devices 106, intelligent devices). The processing module 1025 may include, but is not limited to, a CPU, a hardware microprocessor, a hardware processor, a multi-core processor, a single-core processor, a microcontroller, an application-specific integrated circuit (ASIC), a DSP, or other similar processing devices, and is capable of executing any type of commands, instructions, algorithms, or software for controlling the operations and functions of the switching device 102 described in the embodiments of the present disclosure. The module may be various implementations of a digital circuit system, an analog circuit system, or a mixed-signal (combination of analog and digital) circuit system that performs functions in a computing system. The module may include, for example, an integrated circuit (IC), a part or circuit of a single processor core, an entire processor core, a single processor, a programmable hardware device such as a field-programmable gate array (FPGA), and / or a system including multiple processors.

[0333] As Figure 21 shown, a specific implementation hardware schematic diagram of the switching device 102 is given. In this embodiment, the processing module 1025 uses a Bluetooth module MHCB12G-B integrated with a Bluetooth communication module 1026. Figure 21 In it, J3 serves as the control output port 1023 for connecting the control line. J1 and J2 serve as the power input ports 1022 to access 220V industrial frequency alternating current. The industrial frequency alternating current is rectified by a rectification circuit (such as a rectifier bridge) and then outputs a 5V power supply through a power conversion circuit (such as a 220V~5V transformer), and further outputs a 3.3V power supply through a step-down circuit (such as a BL1117 power conversion) to supply power to other circuits.

[0334] Relay K1 serves as the switch 10241 connecting to the control module 1024. K1 is powered by a 5V power supply. The 2nd pin serves as one end of the switch 10241 and is connected to the live wire terminal J1 of the power access port 1022. The 5th pin serves as the other end of the switch 10241 and is connected to the control output port 1023J3. The connection between the 2nd pin and the 5th pin in K1 can be controlled to switch between on and off. When it is on, the on operation of the switch 10241 is achieved; when it is off, the off operation of the switch 10241 is achieved. D4 is connected across the coil of the relay K1 and serves as its discharge diode. The triode Q3, along with the resistors R8 and R11, forms a drive circuit for driving the switch 10241. The Bluetooth module MHCB12G-B controls it through I / O4 to control the on and off operations of K1 in the switch 10241. The two lamp beads of the bi-color light-emitting diode LED2 are used as the indicator lights of the light-emitting unit. The Bluetooth module MHCB12G-B controls its light-emitting state through I / O1 and I / O2 to achieve the change of the indication state of the light-emitting unit. One end of the electronic switch SW2 is grounded, and the other end is connected to the 3.3V power supply and the I / 03 port of the Bluetooth module MHCB12G-B respectively. SW2 is correspondingly set with the button of the user interaction module 1021. Pressing the button triggers SW2 to turn on, and releasing the operation triggers SW2 to turn off. When SW2 is on, a low-level electrical signal is transmitted to the I / O3 port of the Bluetooth module MHCB12G-B. When SW2 is off, a high-level electrical signal is transmitted to the I / O3 port of the Bluetooth module MHCB12G-B. The Bluetooth module MHCB12G-B identifies the operation applied to the button through the change of the electrical signal at the I / O3 port.

[0335] As Figure 22 shown, an embodiment of the present disclosure further provides a switch device control method 400, including steps S20 to S22.

[0336] In step S20, obtain the user operation.

[0337] In step S21, when it is determined that a specified operation is received, switch to a control action opposite to the current control action; where different control actions correspond to different control states of the load circuit of the switch device;

[0338] In step S22, after maintaining the opposite control action for a specified time, restore to the original control action.

[0339] In some embodiments, before switching to a control action opposite to the current control action, the control method further includes:

[0340] Obtain a setting instruction; this setting instruction can be manually set and / or automatically set according to the load type

[0341] Determine a corresponding specified time according to the set instruction;

[0342] In some embodiments, the restoration to the original control action specifically includes: automatically restoring to the original control action.

[0343] In some embodiments, the specified operation includes a pressing operation and a releasing operation applied to a switch device button; wherein:

[0344] There is an interval time between the pressing operation and the releasing operation; the specified time is set to be greater than or equal to the interval time, or the specified time changes proportionally according to the interval time.

[0345] In some embodiments, when the specified time changes proportionally with the interval time, the specified time is adjusted proportionally according to the length of the interval time.

[0346] In some embodiments, the switching to a control action opposite to the current control action specifically includes:

[0347] Switching to a disconnection action opposite to the current connection action;

[0348] Restoring to the original connection action after maintaining the disconnection action for a specified time; wherein, the specified time is set such that when restoring the connection action, the load connected to the load circuit is still in the powered-on state.

[0349] In some embodiments, the method further includes:

[0350] Detect whether an operation is applied;

[0351] If an operation applied by the user is detected, determine the target button; the target button is the button to which the operation is applied among multiple buttons;

[0352] According to the determined target button, determine the target mapping relationship matching the target button among the latest multiple mapping relationships;

[0353] Control the circuit breaker defined by the target mapping relationship to perform the corresponding control action.

[0354] Wherein, each mapping relationship defines the mapping relationship between at least one button information and at least one circuit breaker information; the mapping relationship is predefined by the user in advance through a smart terminal; the button information characterizes at least one of the following: the button to which the operation is applied among multiple buttons, the type of operation applied to the button; the circuit breaker information characterizes at least one of the following: the circuit breaker that needs to perform the control action among multiple circuit breakers, the specific control action performed by the circuit breaker.

[0355] Such as Figure 23As shown, an embodiment of the present disclosure further provides a switch device control method 500, including steps S30 to S31.

[0356] Among them, in step S30, in the second trigger mode, in response to the first operation applied by the user, immediately send the corresponding first event information outward to trigger the network function;

[0357] In step S31, if it is detected that the first operation is withdrawn within the first time period after the first operation is applied, a control signal is generated to trigger the local function.

[0358] In some embodiments, the method further includes:

[0359] If the first operation is withdrawn after more than the first time period after the key is initially applied with the first operation, no control signal is generated; wherein, the first time period is 100 ms to 3 seconds, such as 300 ms to 1000 ms, preferably 500 ms.

[0360] In some embodiments, the first operation includes a pressing operation applied to the switch device key; the method specifically includes:

[0361] In response to the key pressing operation, immediately send the corresponding first event information outward;

[0362] If a release operation is detected within the first time period after the pressing operation, a control signal is generated.

[0363] In some embodiments, the method further includes:

[0364] In response to being continuously pressed and released multiple times within the first time period, select one release operation to trigger the control signal, and other pressing operations and release operations do not trigger the control signal.

[0365] In some embodiments, the method further includes:

[0366] Within the first time period after the key is initially applied with the pressing operation, if a key release operation is detected and at least one more pressing operation is applied, except for the initially applied release operation, other pressing operations and release operations do not trigger the control signal.

[0367] In some embodiments, the method further includes:

[0368] In the third trigger mode, in response to one continuous pressing operation and release operation applied within the first time period, generate the control signal after the first time period and send the corresponding first event information outward;

[0369] In the third trigger mode, in response to being continuously pressed down and released multiple times within the first duration, send out corresponding second event information and do not generate a control signal;

[0370] and / or,

[0371] In the third trigger mode, in response to being pressed down and held for more than the first duration, send out third event information and do not generate a control signal;

[0372] Among them, in response to a switching instruction to switch between the second trigger mode and the third trigger mode, the switching instruction originates from an application program.

[0373] In some embodiments, the method further includes:

[0374] Before, after or at the same time as immediately sending out the corresponding first event information upon detecting the first operation, if an operation that meets the first specific condition is applied within the first duration after detecting the first operation, enter the pre-configuration mode;

[0375] In the pre-configuration mode, detect whether an operation that meets the second specific condition is applied; if so, enter the configuration mode;

[0376] In the configuration mode, send out a predetermined indication information, at least characterizing the switching device, so that an external network device can search for this indication information and add the switching device to the network.

[0377] In some embodiments, the method further includes:

[0378] In the second trigger mode, before, after or at the same time as entering the pre-configuration mode, also generate a corresponding control signal in response to the first operation being applied for the first time.

[0379] In some embodiments, the method further includes:

[0380] Allow independent setting of trigger modes between the keys of the switching device; and,

[0381] In response to a switching instruction, switch between the second trigger mode and the third trigger mode corresponding to any key.

[0382] In some embodiments, the method further includes:

[0383] Detect whether an operation is applied;

[0384] If an operation applied by the user is detected, determine the target key; the target key is the key among the multiple keys to which the operation is applied;

[0385] According to the determined target key, determine the target mapping relationship that matches the target key among the latest multiple mapping relationships;

[0386] The switch corresponding to the control target mapping relationship performs the corresponding control action.

[0387] Each of the mapping relationships defines a mapping relationship between at least one key information and at least one switch information; the mapping relationship is predefined by the user in advance through a smart terminal; the key information characterizes at least one of the following: the key on which an operation is performed among a plurality of keys, the type of operation applied to the key; the switch information characterizes at least one of the following: the switch among a plurality of switches that needs to perform a control action, the specific control action performed by the switch.

[0388] In the description of this specification, the descriptions with reference to terms such as "some embodiments", "a specific implementation manner", "specific implementation process", "an example", etc. mean that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic descriptions of the above terms corresponding to the specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.

[0389] In addition, it should be noted that the above embodiments can be combined with each other. For the same or similar concepts or processes, they may not be repeated in some embodiments. That is, the technical solutions disclosed in the subsequent (in the order of recording in the text) embodiments should include the technical solutions recorded in this embodiment and the technical solutions in all the embodiments before this embodiment.

[0390] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them; although the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present disclosure.

Claims

1. A switch device, characterized in that: include: A user interaction module, used to receive user operations; Power access port, used to connect the power cord; Control output port, used to connect the control line; A connection control module is disposed between the power input port and the control output port, and is capable of switching between a plurality of control actions, wherein different control actions correspond to different connection states between the power input port and the control output port, and each connection state corresponds to a specific control state of the load circuit; The processing module is electrically connected to the user interaction module and the connection control module respectively, and is configured to have a first trigger mode so as to be able to: control the connection control module to switch to a control action opposite to the current control action according to a specified operation received by the user interaction module, and restore to the original control action after maintaining the opposite control action for a specified time.

2. The switchgear according to claim 1, characterized in that The processing module is also used for: Before the control connection control module switches to a control action opposite to the current control action, a setting instruction is obtained, wherein the setting instruction is used to determine the corresponding specified time, and the setting instruction can be set manually and / or automatically according to the load type.

3. The switchgear according to claim 2, characterized in that The processing module is also used for: After maintaining the reverse control action for a specified time, the control action is automatically restored to the original control action.

4. The switchgear according to any one of claims 1 to 3, characterized in that: The user interaction module includes a button, and the specified operation includes a press operation and a release operation on the button; wherein: There is an interval time between the pressing operation and the releasing operation; the designated time is set to be greater than or equal to the interval time, and / or changes in proportion to the interval time.

5. The switchgear according to claim 3, characterized in that The processing module controls the connection control module to switch to a control action opposite to the current control action, specifically for: The control connection control module is controlled to switch to a disconnection action opposite to the current connection action, and restore to the original connection action after maintaining the disconnection action for a specified time; wherein the specified time is set so that when the connection control module restores the connection action, the load connected to the control line is still in a power-on state.

6. The switchgear according to claim 1, characterized in that The user interaction module includes a plurality of buttons, the connection control module includes a plurality of switches; and the processing module is further configured to: Detect whether the user interaction module is operated; If the operation applied by the user is detected, a target key is determined; the target key is the key to which the operation is applied among the multiple keys; According to the determined target key, determining a target mapping relationship matching the target key from the latest multiple mapping relationships; The switch defined by the control target mapping relationship executes the corresponding control action; Among them, each mapping relationship defines a mapping relationship between at least one button information and at least one switch information; the mapping relationship is pre-defined by the user through the intelligent terminal; the button information represents at least one of the following: the button on which the operation is applied among multiple buttons, and the type of operation applied to the button; the switch information represents at least one of the following: the switch on which the control action needs to be executed among multiple switches, and the specific control action executed by the switch.

7. A switch device control method, characterized in that: include: Get user operations; When it is determined that the specified operation is received, switching to a control action opposite to the current control action; Wherein different control actions correspond to different control states of the load circuit of the switching device; After maintaining the reverse control action for a specified time, the control action is restored to the original control action.

8. The control method according to claim 7, characterized in that: Before switching to a control action opposite to the current control action, the control method further includes: Obtaining a setting instruction; the setting instruction may be set manually and / or automatically according to the load type; The corresponding designated time is determined according to the setting instruction.

9. The control method according to claim 8, characterized in that: The returning to the original control action specifically includes: automatically returning to the original control action.

10. The control method according to any one of claims 7 to 9, characterized in that: The specified operation includes a press operation and a release operation applied to a button of the switch device; wherein: There is an interval time between the pressing operation and the releasing operation; the designated time is set to be greater than the interval time, or the designated time is changed in proportion to the interval time.

11. The control method according to claim 10, characterized in that: The switching to a control action opposite to the current control action specifically includes: Switch to the disconnection action opposite to the current connection action; After maintaining the disconnection action for a specified time, the original connection action is restored; wherein the specified time is set so that when the connection action is restored, the load connected to the load circuit is still in a powered-on state.