Switching device and control system thereof
By combining the indication module and the processing module in the switching device, accurate and intuitive state feedback in different working modes is achieved, which solves the problem that traditional equipment is difficult to meet the feedback requirements in complex network control and multi-operation modes, and improves user experience and device consistency.
Patent Information
- Application Number
- CN202510084097.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-18
- Publication Date
- 2025-05-06
AI Technical Summary
The indicator light logic of traditional switching devices is difficult to meet users' intuitive and accurate feedback needs for device status, especially in complex network control and multi-operation modes.
By combining the indicator module and the processing module, the switchgear provides more accurate and intuitive state feedback in different operating modes. The processing module is able to switch between multiple operating modes and adjust the status of the indicator light according to the operating mode. The indication status information carried by the control message not only reflects the changes in the light emitting unit, but also represents the corresponding control information to ensure the consistency of the equipment status.
Intuitive and accurate state feedback under complex functional requirements is achieved, user experience is enhanced, and behavioral consistency between switching devices and smart devices is ensured.
Smart Images

Figure CN119937406A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of smart home technology, and in particular to a switch device and a control system thereof. Background Art
[0002] With the rapid development of the smart home industry, the control functions of switching devices have gradually become richer and are no longer limited to power control of local load circuits, but are moving towards more diverse network control.
[0003] These newly added functions make the control logic of the switch device more complex, and the traditional indicator light logic can no longer meet the user's needs for intuitive and accurate feedback on the device status. Summary of the invention
[0004] Another object of the present disclosure is to provide a switch device and a control system thereof, wherein a switch device is provided that provides more accurate and intuitive status feedback in different working modes through the combination of an indication module and a processing module.
[0005] Another object of the present disclosure is to provide a switch device and a control system thereof, wherein the switch device can switch between multiple operating modes through an intelligent processing module and adjust the status of indicator lights according to different operating modes to adapt to more complex functional requirements.
[0006] Another object of the present disclosure is to provide a switch device and a control system thereof, wherein the indication status information carried by the control message not only reflects the change of the light-emitting unit, but also represents the corresponding control information. This enables the smart device to adjust its own working state according to the change of the indication status after receiving the control message, thereby ensuring the consistency of behavior between the switch device and the smart device.
[0007] Another object of the present disclosure is to provide a switching device and a control system thereof, wherein when in a virtual output mode, changes in the indication state of the light-emitting unit are directly embedded in the control message as control information, and there is no need to carry additional control information separately. By integrating the indication state and the control information, redundant information in the control message is reduced.
[0008] Another object of the present disclosure is to provide a switch device and a control system thereof, wherein the processing module is also configured to automatically enter a virtual output mode after entering the sixth trigger mode and / or the seventh trigger mode and completing pairing with a corresponding smart device.
[0009] Another object of the present disclosure is to provide a switching device and a control system thereof, in which the priority relationship of each trigger mode when the switching device is powered off and restarted is given, so as to ensure that when the switching device has multiple trigger modes at the same time, the switch can perform the control action as expected when the power is cut off and then powered on.
[0010] Another object of the present disclosure is to provide a switch device and a control system thereof, wherein a switch device is provided that can freely define the mapping relationship between buttons and switches, thereby realizing flexible mapping between buttons and switches and improving the applicability of the switch device.
[0011] To achieve at least one of the above purposes, the present invention provides a switch device in a first aspect, comprising: a user interaction module, comprising a button for receiving user operations; a power access port for accessing a power line; a control access port for accessing a control line; a connection control module, comprising a switch arranged between the power access port and the control access port, capable of switching between a plurality of control actions, wherein different control actions correspond to different connection states between the power access port and the control access port, and each connection state corresponds to a specific control state of a load circuit; an indication module, comprising light-emitting units corresponding to the buttons of the user interaction module, each light-emitting unit having at least two indication states; a processing module, electrically connecting the user interaction module, the connection control module and the indication module, the processing module being configured to have a virtual output mode, so as to be suitable for: before entering the virtual output mode, changing the indication state of the corresponding light-emitting unit in response to the operation of the button, and switching the control action of the corresponding switch, so as to indicate the control state of the corresponding load circuit through the indication state of each light-emitting unit; after entering the virtual output mode, controlling the indication state of the corresponding light-emitting unit to change in response to the change of the operation of the button, and keeping the control action of the switch unchanged.
[0012] In some embodiments, the processing module is also configured to: in a virtual output mode, after the indication state of the corresponding light-emitting unit changes in response to the operation of a button, generate a control message according to the changed indication state of the light-emitting unit; send the control message so that: a smart device that has established a pairing relationship with the switch device in advance receives the control message and controls its own working state based on the parsed indication state.
[0013] In some embodiments, the processing module is also configured to have: a second trigger mode, suitable for: immediately sending the corresponding first event information to the outside after detecting the first operation applied to the user interaction module; if it is detected that the first operation is removed within a first time period after the first operation is applied to the user interaction module, a control signal is generated; and / or, a third trigger mode, suitable for: if it is detected that a key is subjected to a continuous press operation and release operation within a first time period, a control signal is sent to the connection control module again after the first time period, and the corresponding first event information is sent to the outside; wherein, the first event information is used to trigger a preset network function, and the control signal is used to trigger the connection control device to perform a local function; the processing module sends the first event information through a first communication protocol, and sends the control message through a second communication protocol; the first communication protocol is different from the second communication protocol, wherein the first communication protocol is used for network communication, and the second communication protocol is used for local communication.
[0014] In some embodiments, in the second trigger mode or the third trigger mode, the processing module controls the corresponding light-emitting unit to form a first indication state after sending the corresponding first event information to the outside; in the virtual output mode, when the processing module detects a press operation applied to the button or a continuous press and release operation, the original control action of the corresponding switch remains unchanged, and instructs the corresponding light-emitting unit to form a second indication state, and sends a control message carrying the second indication state to the outside through the second communication protocol to trigger the pre-paired smart device to switch the working state.
[0015] In some embodiments, the first communication protocol may be any one of Wi-Fi, ZigBee, and BLE Mesh; the second communication protocol may be a customized private communication protocol.
[0016] In some embodiments, the processing module is also configured to have: a sixth trigger mode, suitable for: the switch corresponding to the button will remain in the on action and will not perform a disconnection action due to the button operation; and / or, a seventh trigger mode, suitable for: after identifying the operation applied to the button, a pre-set wireless signal is sent outward, and the wireless signal is used to trigger the network function; the processing module is also configured to automatically enter the virtual output mode after entering the sixth trigger mode and / or the seventh trigger mode, after completing pairing with the corresponding smart device.
[0017] In some embodiments, the processing module is also configured to switch the corresponding switch to the on action when entering the seventh trigger mode, or to maintain the original control action of the switch; and / or, when entering the sixth trigger mode, to switch the corresponding switch to the on action.
[0018] In some embodiments, the processing module is further configured to have: a fourth trigger mode, suitable for: setting the control action that the switch should perform when the switch device is powered on again after being powered off; and, a fifth trigger mode, suitable for: switching the corresponding switch to the on action in response to an operation applied to a button, and in the case where a switch was originally in the on action, switching the switch that was originally in the on action to the off action; the processing module is also configured to be suitable for: when it is determined that the switch device is restarted due to power off and then powered on, further judging whether it is in the fifth trigger mode; if so, then: switching all switches connected to the control module to the off action; or, further determining the control action of each switch connected to the control module according to the specific state of the fourth trigger mode; if not, further switching the switches corresponding to the buttons in the first trigger mode and / or the seventh trigger mode to the on action, and determining the control actions of the remaining switches according to the specific state of the fourth trigger mode.
[0019] In some embodiments, before switching the switch corresponding to the button in the first trigger mode and / or the seventh trigger mode to the on action, it is also necessary to determine whether the button in the first trigger mode and / or the seventh trigger mode is in the sixth trigger mode. If so, the corresponding switch is switched to the on action; otherwise, the control action of the corresponding switch is determined according to the specific state of the fourth trigger mode.
[0020] In some embodiments, in the fourth trigger mode, the switch is set to one of the following three states when power is turned on again after power failure: state one: the switch performs a disconnection action; state two: the switch continues the control action before power failure; state three: the switch performs a connection action.
[0021] In some embodiments, the connection control module has multiple switches, one end of each switch is directly or indirectly electrically connected to the power access port, and the other end is connected to multiple independent control output ports; the user interaction module includes multiple buttons; the processing module is also configured to be able to: detect whether the user interaction module is subjected to an operation; if an operation applied by the user is detected, determine the target button; the target button is the button on which the operation is applied among multiple buttons; according to the determined target button, determine the target mapping relationship matching the target button in the latest multiple mapping relationships; control the switch defined by the target mapping relationship to perform a corresponding control action; wherein 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 smart terminal; the button information represents at least one of the following: the button on which the operation is applied among the multiple buttons, 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 performed among the multiple switches, the specific control action performed by the switch.
[0022] To achieve at least one of the above objectives, a second aspect of the present invention provides a control system, comprising the switch device as described in the first aspect.
[0023] 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-mentioned various invention contents can be combined arbitrarily, and these and other purposes of the present disclosure will be fully reflected through the following detailed description and drawings.
[0024] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. The drawings herein are incorporated into the specification and constitute a part of the 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 described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0026] Figure 1 is a schematic diagram of an example network environment of a control system including a switch device in an embodiment of the present disclosure;
[0027] Figure 2 This is a schematic diagram of a switch device in one embodiment of the present disclosure. Figure 1 ;
[0028] Figure 3 This is a schematic diagram of the relationship between the key operation and the control action of the connection control module in an embodiment of the present disclosure. Figure 1 ;
[0029] Figure 4 This is a schematic diagram of the relationship between the key operation and the control action of the connection control module in an embodiment of the present disclosure. Figure 2 ;
[0030] Figure 5 This is a schematic diagram of the relationship between the key operation and the control action of the connection control module in an embodiment of the present disclosure. Figure 3 ;
[0031] Figure 6 This is a schematic diagram of the relationship between the key operation and the control action of the connection control module in an embodiment of the present disclosure. Figure 4 ;
[0032] Figure 7This is a schematic diagram of the relationship between the key operation and the control action of the connection control module in an embodiment of the present disclosure. Figure 5 ;
[0033] Figure 8 This is a schematic diagram of the relationship between the key operation and the control action of the connection control module in an embodiment of the present disclosure. Figure 6 ;
[0034] Fig. 9 This is a schematic diagram of a switch device in one embodiment of the present disclosure. Figure 2 ;
[0035] Fig.10 This is a schematic diagram of the operation of the switch mapping relationship definition interface in one embodiment of the present disclosure;
[0036] Fig.11 is a schematic flow chart of a switch device control method in one embodiment of the present disclosure;
[0037] Fig.12 This is a schematic diagram of a switch device in one embodiment of the present disclosure. Figure 3 ;
[0038] Fig.13 This is a schematic diagram of a switch device in one embodiment of the present disclosure. Figure 4 ;
[0039] Fig.14 is a schematic diagram of a configuration interface of a fifth trigger mode in an embodiment of the present disclosure;
[0040] Fig.15 is a schematic diagram of an interface operation for selecting a local mode in an embodiment of the present disclosure;
[0041] Fig.16 This is a schematic diagram of a switch device in one embodiment of the present disclosure. Figure 5 ;
[0042] Fig.17 This is a schematic diagram of a switch device in one embodiment of the present disclosure. Figure 6 ;
[0043] Fig.18 is a schematic diagram of indicator light parameter configuration in an embodiment of the present disclosure;
[0044] Fig.19 is a schematic diagram of the interface operation of the pairing process in one embodiment of the present disclosure;
[0045] Fig.20a This is a schematic diagram of the logic judgment of power failure and restart of the device in one embodiment of the present disclosure. Figure 1 ;
[0046] Fig.20b This is a schematic diagram of the logic judgment of power failure and restart of the device in one embodiment of the present disclosure. Figure 2 ;
[0047] Fig.20c This is a schematic diagram of the logic judgment of power failure and restart of the device in one embodiment of the present disclosure. Figure 3 ;
[0048] Fig.20d This is a schematic diagram of the logic judgment of power failure and restart of the device in one embodiment of the present disclosure. Figure 4 ;
[0049] Fig.21 is a schematic diagram of the specific implementation hardware of the switch device in one embodiment of the present disclosure;
[0050] Fig. 22 is a flow chart of another switch device control method in one embodiment of the present disclosure;
[0051] Fig.23 This is a flow chart of another switch device control method in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0052] The embodiments of the present disclosure will be described in detail below. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0053] It should be understood that in the description of all embodiments of the present disclosure, the terms "upper", "lower", "left", "right" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, which is only for the convenience of describing the present disclosure and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present disclosure. The terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the 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 an integral body; it can be a mechanical connection, an electrical connection, or can communicate with each other; it can be directly connected, or indirectly connected through an intermediate medium to form a linkage relationship, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present disclosure can be understood according to specific circumstances.
[0054] In the embodiments of the present disclosure, the symbol " / " means that it has two functions at the same time. The symbol "A and / or B" indicates that the combination of the previous and next objects connected by the symbol includes "A", "B", and "A and B".
[0055] With the rapid development of smart home technology, more and more smart devices are widely used in network environments such as home, business and industry.
[0056] See also Figure 1 , Figure 1 A schematic diagram of an example network environment 100 including a control system in which a switch device 102 is located according to an embodiment of the present disclosure is shown.
[0057] The example network environment 100 may include a switch device 102 , a load device 106 , a network access device 101 , and one or more terminal devices 103 .
[0058] The network access device 101 is used to provide network connection for the switch 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 switch device 102, the load device 106, and the terminal device 103 and / or transmit / route various types of communications to the switch device 102, the load device 106, and the terminal device 103.
[0059] In some embodiments, the network access device 101 only provides a connection to an internal network 104 (e.g., a wired network or a wireless local area network (LAN)), and all switch 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.
[0060] In a further embodiment, the network access device 101 is also connected to the external network 105, so that the switch device 102, the load device 106, and the terminal device 103 can access the external network 105 via it. The network access device 101 can be, for example, a hardware electronic device 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 the remote server. The remote server can be, for example, an IOT cloud device of the Internet of Things platform (hereinafter referred to as "cloud"), which has the authority to manage and configure the accessed electronic devices (such as the switch device 102, the 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 device (such as the switch device 102, the load device 106, etc.) through the terminal device 103 to realize the configuration of the electronic device. The switch device 102, the terminal device 103, and the gateway 108 can all communicate with the cloud to realize remote control. The cloud mainly plays the role of data forwarding. In some examples, the cloud can also play the role of data storage and processing.
[0061] When the network access device 101 is a router 107, a gateway 108 may also be provided in the network environment. The gateway 108 and the router 107 may receive data from electronic devices such as the load device 106, the switch device 102, and the terminal device 103 (receipts may be received via wireless signals, such as Bluetooth, radio frequency, WIFI, etc.), and provide data processing and transfer services for these electronic devices, such as conversion between different communication protocols, data processing and forwarding, etc.
[0062] In addition, in the scenario where there is a cloud in the example network environment 100, in order to enable the switch device 102 to have the ability to connect to the cloud, it needs to be networked. After the network is configured, the switch device 102 can be connected to the Internet and communicate with the cloud.
[0063] The terminal device 103 may be any electronic device having at least one network interface. For example, the terminal device 103 may 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.
[0064] The terminal device 103 may be pre-installed with an application (e.g., a mobile phone APP) corresponding to the corresponding electronic device (e.g., the switch device 102), and the application may provide the user with a configuration interface of the smart control screen 101, 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 may also access the external network 105 through the network access device 101 or cellular data, and then communicate with the remote server, and communicate with the switch device 102 and the load device 106 through the remote server (e.g., issuing commands, interface configuration of the switch device 102, etc.), so as to achieve the purpose of remote control.
[0065] The external network 105 may include various types of wired or wireless networks, internal networks or public networks, such as other local area networks or wide area networks (WAN) (such as the Internet). Note that the present disclosure does not specifically limit the type of the external network 105.
[0066] In this embodiment, the load device 106 can be understood as a device connected to 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 electrical 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 power supply of the load device 106 on and off.
[0067] like Figure 2 As shown, a block diagram of a switch device 102 provided in an embodiment of the present disclosure is provided; it can be seen that the switch device 102 includes at least a user interaction module 1021, a power input port 1022, a control output port 1023, a connection control module 1024 and a processing module 1025.
[0068] The user interaction module 1021 is used to receive user operations.
[0069] Specifically, the user interaction module 1021 is the part of the switch device 102 that is responsible for direct communication with the user. It provides a physical and / or virtual interface, allowing the user to express intentions or needs in an intuitive manner. The user can interact with the switch device 102 in some way and send instructions to control the behavior of the switch device 102. The user interaction module 1021 can be, for example, but not limited to, physical buttons / knobs (mechanical buttons, rotary encoders, etc.), touch screens (touch display screens), voice recognition (voice collection components integrated with microphones and voice processing algorithms), etc.
[0070] User operations can be understood as specific behaviors or actions taken by users to achieve a certain goal. In the context of the switch device 102, these operations are usually to change the control state of the load circuit. Based on the above-mentioned possible implementation schemes 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, clicking icons on the screen or sliding gestures to operate, issuing verbal instructions, etc. For the convenience of description, the subsequent embodiments are mainly described in the manner that the user interaction module 1021 includes physical buttons / knobs.
[0071] The power access port 1022 is used to access the power line to supply external power to the switch device 102. Specifically, the power access port 1022 can be used to access the mains power supply circuit, and the connected power line can be the neutral / live wire of the mains. In a specific example, the power access port 1022 may include a live wire access port and a neutral wire access port, which are used to respectively connect the neutral wire (N) and the live wire (L) of the mains power supply circuit. For some single-live power supply solutions, the power access port 1022 may include only the live wire (L) without the neutral wire (N), and the switch device 102 as a whole is connected to the load device 106 in series.
[0072] The control output port 1023 is used to output a control line to form a load circuit (such as an intelligent drive or other device). By switching the control state of the load circuit, the switch device 102 can adjust the specific working state of the load device. Figure 2 As shown, the switch device 102 is configured to be suitable for electrically connecting the load device on the control line through the control output port 1023, so as to control the control state of the load circuit according to the switching of the control action of the connection control module 1024. In a further example, the control output port 1023 may include a live wire output port L1, which is used to connect the load device through the live wire, thereby connecting the switch device 102 in series in the working circuit of the load device 106, and the on / off of the switch device 102 can directly affect the on / off of the load device 106.
[0073] The connection control module 1024 is disposed between the power input port 1022 and the control output port 1023, and can switch between multiple control actions, wherein different control actions correspond to different connection states between the power input 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 as required, 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 means that the load circuit is turned off (powered off), or there are other types of control.
[0074] The processing module 1025 is electrically connected to the user interaction module 1021 and the connection control module 1024, respectively, so as to detect the user operation through the user interaction module 1021 and control the connection control module 1024 to perform the corresponding control action. Specifically, the sensor or detection mechanism in the user interaction module 1021 will capture the input signal from the user. For the button / knob, it can be the detected pressure change, the state change of the touch switch (for example, whether the electronic switch corresponding to the physical button is triggered, such as Fig.21 For a touch screen, it may be a change in capacitance; and for voice control, it may be a received sound waveform. Different types of operations applied by the user result in different input electrical signals. Based on 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 (press down operation, release operation, long press operation, etc.), and then determine whether the user interaction module 1021 has received the specified operation.
[0075] It is worth noting that the traditional power control method mainly relies on a simple complete on-off method, that is, the load device is completely turned on or off through a switch. This simple power control method is obviously unable to adapt to the increasingly diverse load types and complex control requirements in modern smart homes.
[0076] As the types of smart home devices increase, the loads include not only traditional electrical equipment (such as lamps, sockets, etc.), but also increasingly complex devices in smart homes, such as smart temperature control systems, smart security equipment, smart appliances, etc. These devices often have higher intelligence and automation features and require more sophisticated power management.
[0077] Traditional power control methods cannot meet the needs of these smart load devices because they only provide simple on-off control and cannot achieve fine-grained control of the device. Especially in smart devices, long power outages are not allowed because the device status will be lost, the network connection may be interrupted, and even the normal operation of the device may be disturbed. Therefore, traditional power management methods are not suitable for smart load devices, especially those that need to be always online.
[0078] For example, in an intelligent lighting control system, users may want to control certain scenarios (such as adjusting brightness, color, or switching to a specific scene mode) without completely powering off or restarting the device, which can avoid device configuration loss or time delay after restart. Traditional power control methods cannot meet this requirement because they usually result in a complete shutdown and restart of the device.
[0079] Based on this, the present disclosure provides a switch device 102, which adopts a new power supply control solution, provides a more flexible and efficient control method, and realizes flexible control of intelligent load devices. Other subsequent embodiments of the present disclosure also provide corresponding control method embodiments.
[0080] Specifically, in the switch device 102 provided in this embodiment, the processing module 1025 is configured to have a first trigger mode so as to be able to: according to the 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 finally be able to transmit a special control instruction to the load device 106 through the temporary reversal while keeping the original control state unchanged, and the control instruction is transmitted to the load device 106 through the control line to trigger the load device 106 to perform a specific function, so that the original control state can be kept unchanged by switching the control action of the connection control module 1024 to achieve flexible control of the smart load device 106.
[0081] It is worth noting that in this embodiment, the temporary reversal operation is not just a simple power control, it can change with a specific rule through the connection control module 1024 to transmit a specific regular change of electrical signal to the load device 106 through the control line, so as to trigger the load device 106 to execute certain specific function control instructions. These specific regular changes of the electrical signal can be short-term voltage changes, current fluctuations or power failure recovery, and the intelligent load recognizes these changes through the built-in detection circuit and performs corresponding operations.
[0082] Furthermore, the switch device 102 provided in this embodiment is suitable for connecting a control line through the control output port 1023, so that when the load device 106 connected to the control line is a smart load, a load circuit for controlling the load device 106 is formed based on the control line, and the control state of the load circuit is switched by controlling the control action of the control connection control module 1024, so as to realize indirect control of the load device 106 through the load circuit (for example, by controlling the load circuit to enter a power-off state (one of multiple control states) to indirectly control the lamp (one of multiple optional smart load devices 106) to turn off). And, it is possible to realize direct control of the load device 106 based on the control instruction generated by the application of the specified operation while ultimately keeping the control state of the load circuit unchanged (the control state of the load circuit will eventually return to the original control state and be maintained) (for example, while keeping the load circuit in a power supply state (one of multiple control states), control the lamp (one of multiple optional load devices 106) to turn off).
[0083] 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, and the setting instruction is used to determine the corresponding specified time, and the specified time can be changed. Different specified times mean different reversal durations of the control state of the load circuit, so that the specified time can be changed according to demand. The setting instruction can be understood as a general term for instructions, messages, signals, etc. used by users or systems to specify the reversal duration (specified time). The setting instruction is used to clearly specify the time, that is, the duration of the control reversal state. It is the core parameter that controls how the switch device 102 switches to the reverse control action and maintains this state for a period of time.
[0084] The duration of the control action reversal is an important characteristic of the switch device 102 of this embodiment, which directly affects the behavior of the load device 106. For example:
[0085] For the scenario where the load device 106 is a smart lamp, if the specified time is short (for example, tens of milliseconds), then a short reversal may mean that the smart lamp will only experience a power outage of tens of milliseconds, which is not long enough to cause the smart lamp to lose power. Then, when the original state is restored, the smart lamp will be powered again. During the brief reversal of power-off-power on of the control state of the smart lamp, the smart lamp is continuously online.
[0086] If the specified time is longer (for example, up to a few seconds), then a longer reversal may mean that the smart light will be turned off for a few seconds and then restored to its original state. During this process, the smart light may have gone through a process of powering off and then powering on again to reset.
[0087] It can be seen that different designated times mean different times at which the control state of the load device 106 is reversed, which is very important for application scenarios that require precise control of the behavior of electrical appliances (such as timed switching of lights, triggering of specific scenarios in smart homes, etc.).
[0088] In this embodiment, the specified time is not fixed but variable, that is, the user or the system can adjust it according to the needs. This makes the control of the switch device 102 more flexible and can be adjusted according to the specific usage scenario. For example, the time for short-term light off or delayed recovery of the light can be set to meet different application needs.
[0089] Furthermore, the processing module 1025 is also used to control the connection control module 1024 to automatically restore to the original control action after maintaining the opposite control action for a specified time.
[0090] Specifically, after the temporary reversal state lasts for a specified time, the processing module 1025 triggers the connection control module 1024 to restore the original control action to restore the control state of the load circuit (i.e., ultimately keep the control state of the load circuit unchanged). This process is completed automatically and does not require additional user intervention or operation.
[0091] 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 for: controlling the connection control module 1024 to switch to a disconnection action opposite to the current connection action, and automatically restore to the original connection action after maintaining the disconnection action for a 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, and 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.
[0092] Furthermore, in the switch device 102 solution provided in this embodiment, after the user issues an instruction (applies a specified operation) through the user interaction module 1021, the switch device 102 will automatically reverse the control action (such as temporarily powering off), and automatically restore to the original control action after a set time (specified time), thereby temporarily reversing the control state of the load circuit, so as to transmit a specific control instruction to the load device 106. In this way, the load device 106 can be triggered to perform a specific function without a long power outage, 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, so as to avoid the influence of a long power outage on the load device 106.
[0093] In some embodiments, an implementation method of the setting instruction is given.
[0094] In this embodiment, the setting instruction can be manually set. Manual setting means that the user can actively participate in setting the specified time, rather than relying on the system preset value. The user may input the instruction through some interactive method (such as buttons, touch screen settings, APP control, etc.), or define it through preset control logic.
[0095] Specifically, users can complete the operation of defining a specified time through a smart terminal (such as a mobile phone, tablet, etc.). For example, in the supporting application (App) of the smart terminal, the user selects or enters a specified time, for example, the user explicitly defines the specified time value through some interactive method (such as a button, a slider, an input box, etc.). The application converts the information entered by the user into a setting instruction. The instruction can be transmitted through a wireless connection, for example, the setting instruction can be based on Fig.17 The first communication protocol shown is transmitted, such as Wi-Fi, Bluetooth, etc., to the switch device 102. This approach makes the setting of the switch device 102 more convenient and intuitive.
[0096] 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, and adapt to the control requirements of various types of loads.
[0097] Furthermore, the setting range of the specified time can be 10ms to 10s, and the setting step value can be 100ms. For intelligent load devices 106 (such as intelligent lamps that rely on specific short-term power-off signals to switch states), it is necessary to control the specified time more accurately, and the range can be narrowed to 100ms to 1.6s (for example, 200ms or 500ms). Then, the user can set the specified time within the range of 100ms to 1.6s with a step value of 100ms. The temporary reversal of the control state of the reverse load circuit formed by the specified time within this range can more accurately generate an electrical signal suitable for intelligent load detection, and will not cause adverse effects on the switch device 102 due to excessive power-off time (for example, the intelligent lamp restarts due to excessive power-off time). For example, for smart lamps with the Atom function, the Atom function of smart lamps of different brands, different manufacturers, or even different models of the same brand may have different requirements for the power-off time. The user can determine the power-off time based on the specific manufacturer, brand, model, etc. of the smart lamp actually connected to the switch device 102, and then set it to the specified time.
[0098] Furthermore, the setting range of the specified time may also change according to the switching of the type of load device 106. The type of load device 106 can be understood as different types of load devices 106 from different manufacturers (for example, lamps from manufacturer A and air conditioners from manufacturer B), the same type of load devices 106 from different manufacturers (for example, lamps from manufacturer A and lamps from manufacturer B), different types of load devices 106 from the same manufacturer (for example, lamps from manufacturer A and air conditioners from manufacturer A), and the same type but different models of load devices 106 from the same manufacturer (for example, L1 model lamps from manufacturer A and L2 model lamps from manufacturer A).
[0099] In this embodiment, the user can switch the designated time by selecting the type of the load device 106. The type selection of the load device 106 is a way to simplify the user experience. The user does not need to directly enter a specific time value, but completes the setting by selecting the type of the load device 106 (such as "smart lamp" or "ordinary lamp"). The system automatically adjusts the setting range of the designated time according to the type of the selected load device 106, or directly determines the designated time.
[0100] For example, when "Intelligent Lighting" is selected, the default range may be 70ms to 3s, and the user can further set a specified time within this range. When "Ordinary Lighting" is selected, the default range may be 10ms to 10s, and the user can further set a specified time within this range.
[0101] For another example, when "intelligent lamp A" is selected, the specified time is directly determined to be 200ms, and when "intelligent lamp B" is selected, the specified time is directly determined to be 500ms. This method reduces the professional requirements for users and is suitable for ordinary users.
[0102] In some embodiments, another implementation of the setting instruction is provided.
[0103] In this embodiment, the setting instruction is automatically set according to the load type, so as to achieve dynamic adjustment of the temporary reversal period according to different types of the load device 106 .
[0104] Here, the reversal period may be understood as the duration of the opposite control action (eg, temporary power failure or state reversal) described in the temporary reversal operation.
[0105] In a specific implementation, when 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, and then automatically generate control instructions according to the type of the connected load device 106 to determine the specified time, without the user having to manually enter a specific time value.
[0106] For example:
[0107] Smart lamps: rely on shorter power-off signals to trigger, and may require shorter reversal cycles, such as tens of milliseconds to a few seconds.
[0108] Ordinary lamps: rely on complete power failure to trigger, may take a long time to control, and the reversal cycle may be between 1 second and 10 seconds.
[0109] Motor load equipment: adjust the working state through a longer reversal cycle (more than 10 seconds).
[0110] In this embodiment, by dynamically adjusting the reversal period according to the type of load device 106, the switch 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 the "temporary reversal" within a specific time period.
[0111] It is worth mentioning that in some application scenarios, no matter the setting instruction is set manually or automatically according to the type of load device 106, the corresponding designated time determined by the setting instruction needs to be set so that when the connection control module 1024 resumes the connection action, the load connected to the control line is still in the power-on state, thereby realizing the instantaneous disconnection and recovery of the load circuit, so that when the load circuit formed by the control line is connected to an intelligent load device 106, the corresponding control instruction is generated by the instantaneous disconnection and recovery of the power supply of the load circuit, and the control instruction is transmitted to the load device 106 through the control line, and is used to control the load device 106 of the load circuit to perform a specific function (for example, for a smart lamp, it can be to trigger the smart lamp to enter a lighting state of a specific brightness / color temperature). In addition, the effective transmission of the control instruction when the smart load is continuously online can be realized.
[0112] like Figure 3 As shown, in some embodiments, when the user interaction module 1021 includes a button, the designated operation may include at least one press 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 simultaneously with the button rebound caused by the release of the press operation a1.
[0113] For example, combining Figure 3 and Fig.21 As shown, after detecting that the button has been pressed a1, 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 restores to the original connection action b1 after maintaining the disconnection action b2 for a specified time T1.
[0114] Another example is combining Figure 4 and Fig.21 As shown, after detecting that the button has been pressed a1, the processing module 1025 controls the connection control module 1024 to switch to a connection action b1 opposite to the current disconnection action b2, and automatically returns to the original disconnection action b2 after maintaining the connection action b1 for a specified time T1.
[0115] Of course, the processing module 1025 can also control the connection control module 1024 to switch to a control action opposite to the current control action after detecting a complete press operation and release operation. At this time, the specified operation will include a press operation a1 and a release operation a2 on the key that occur continuously; wherein: there is an interval time T2 between the press 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.
[0116] Here, after the processing module 1025 maintains the reverse control action for a specified time, the connection control module 1024 is controlled to automatically restore to the original control action.
[0117] For example, combining Figure 5 and Fig.21 As shown, after detecting that the key is subjected to continuous pressing operation a1 and releasing operation a2, the processing module 1025 controls the connection control module 1024 to switch to the disconnection action b2 opposite to the current connection action b1, and automatically restores to the original connection action b1 after maintaining the disconnection action b2 for a specified time T1.
[0118] Another example is combining Figure 6 and Fig.21As shown, after detecting that the button is subjected to continuous pressing operation a1 and releasing operation a2, the processing module 1025 controls the connection control module 1024 to switch to the connection action b1 opposite to the current disconnection action b2, and automatically restores to the original disconnection action b2 after maintaining the connection action b1 for a specified time T1. 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. The specified time is set so that when the connection control module 1024 resumes the connection action, the load connected to the control line is still in the power-on state, so as to realize the instantaneous disconnection and recovery of the load circuit, so that when the intelligent load device 106 is connected to the load circuit, the corresponding control instruction is generated by the instantaneous disconnection and recovery of the power supply of the load circuit, and the control instruction is transmitted to the load device 106 through the control line, and is used to control the load device 106 of the load circuit to perform a specific function (for example, for a smart lamp, it can be to trigger the smart lamp to enter a lighting state of a specific brightness / color temperature). In addition, the effective transmission of the control instruction when the smart load is continuously online can be realized.
[0119] In some embodiments, when the user interaction module 1021 includes a button, the specified operation includes a press operation and a release operation on the button; wherein:
[0120] There is an interval time between the pressing operation and the releasing operation, and the designated time changes in proportion (positive proportion, negative proportion or equal proportion) to the interval time.
[0121] Exemplarily, the specified time can be changed only in proportion to the interval time. Taking negative 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, and the initial value of the specified time corresponding to the reference is used as a reference. When the interval time changes, the specified time is adjusted in a specified negative proportion according to the change of the interval time.
[0122] Exemplarily, the specified time can be set to be greater than the interval time and change in proportion to the interval time. Taking the 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, and the initial value of the specified time corresponding to the reference is used as a reference. When the interval time changes, the specified time is adjusted in a specified positive proportion according to the change of the interval time.
[0123] Exemplarily, the specified time can be set to be equal to the interval time and change 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 for: in response to a press operation, controlling the connection control module 1024 to switch to a control action opposite to the current control action; during the duration of the press operation, maintaining the opposite control action; in response to a release operation, controlling the connection control module 1024 to restore to the original control action, thereby achieving the proportional adjustment.
[0124] In a further example, Figure 7 As shown, after the processing module 1025 detects that a press operation a1 is applied to the key, in response to the press operation a1, the connection control module 1024 is controlled to switch to a connection action b1 opposite to the current disconnection action b2; within the duration T2 of the press operation a1, the opposite connection action b1 is maintained; after the processing module 1025 detects that a release operation a2 is applied to the key, in response to the release operation a2, the connection control module 1024 is controlled to restore to the original disconnection action b2, thereby achieving the proportional adjustment. That is, in this case, the duration T2 of the press operation a1 should be the same as the duration T1 of the connection action b1.
[0125] In another further example, Figure 8 As shown, after the processing module 1025 detects that a press operation a1 is applied to the key, in response to the press operation a1, the connection control module 1024 is controlled to switch to the disconnection action b2 opposite to the current connection action b1; the opposite disconnection action b2 is maintained within the duration T2 of the press operation a1; after the processing module 1025 detects that a release operation a2 is applied to the key, in response to the release operation a2, the connection control module 1024 is controlled to restore to the original connection action b1, thereby achieving the proportional adjustment. That is, in this embodiment, the connection control module 1024 does not automatically restore to the original connection action after maintaining the disconnection action for a specified time T1, but is controlled by the processing module 1025 to restore the original connection action in response to the release operation a2 applied to the key, and the duration T2 of the press operation a1 should be the same as the specified time T1 of the disconnection action b2.
[0126] In some application scenarios, the designated time can be set so that when the connection control module 1024 resumes the connection action, the load (load device 106) connected to the control line is still in the power-on state, so as to achieve instantaneous disconnection and recovery of the load circuit, so that when the smart load device 106 is connected to the load circuit formed by the control line, the corresponding control instruction is generated by the instantaneous disconnection and recovery of the power supply of the load circuit, and the control instruction is transmitted to the load device 106 through the control line to control the load device 106 of the load circuit to perform a specific function (for example, for a smart lamp, it can be to trigger the smart lamp to enter a lighting state of a specific brightness / color temperature). In addition, the effective transmission of the control instruction when the smart load is continuously online can be achieved.
[0127] Further, when the designated time changes in proportion to the interval time, the change ratio of the designated time to the interval time is dynamically adjusted according to the change of the interval time.
[0128] Specifically, when the interval time exceeds or is lower than the first threshold, it is adjusted in positive 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, it is realized that according to the length of the interval time, the specified time dynamically switches the adjustment ratio according to the interval time.
[0129] In some embodiments, Fig. 9 As shown, the connection control module 1024 includes a switch 10241, which can perform a connection action and a disconnection action, and the switch 10241 can be understood as any circuit component or circuit component composed of components that can perform a connection / disconnection action. For example, a thyristor, a relay (such as Fig.21 shown) etc.
[0130] It is worth noting that in the existing related technologies, the control relationship between the buttons of the switch device and the switch is generally determined directly when the device leaves the factory, and the switch that can be controlled by the button operated by the user is fixed. It can be seen that the control between the buttons and the switch of the existing switch device is relatively simple and fixed, and it is difficult to meet various control requirements.
[0131] Based on this, an embodiment of the present disclosure provides a switch device 102, which can freely define the mapping relationship between buttons and switch 10241, realize flexible mapping between buttons and switch 10241, and improve the applicability of the switch device 102. In addition, corresponding control method embodiments are also provided in other subsequent embodiments of the present disclosure.
[0132] Specifically, in the embodiment of the present disclosure, the user interaction module 1021 includes a plurality of buttons, and the switch 10241 also has a plurality of switches. On this basis, the processing module 1025 is also configured to be able to:
[0133] Detecting whether the user interaction module 1021 is operated;
[0134] 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;
[0135] According to the determined target key, determining a target mapping relationship matching the target key from the latest multiple mapping relationships;
[0136] The switch 10241 defined by the control target mapping relationship executes the corresponding control action.
[0137] Further, the switch 10241 defined by the control target mapping relationship performs a corresponding control action, for example, the switch 10241 defined by the control target mapping relationship performs a control action opposite to the current control action, and maintains the opposite control action before the key is operated again.
[0138] 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 10241 that needs to perform a control action among multiple switches 10241, and the specific control action performed by the switch 10241.
[0139] The corresponding control action performed by the switch 10241 may be, for example, a connection action or a disconnection action. Each mapping relationship may define a mapping relationship between a key and the switch 10241, or a mapping relationship between a key and a specific control action of the switch 10241.
[0140] When the mapping relationship defines the mapping relationship between a key and the switch 10241, the switch 10241 will perform a flipping action when the corresponding key is triggered. Further, the processing module 1025 controls the switch 10241 defined by the target mapping relationship to perform a corresponding control action, specifically to control the switch 10241 defined by the target mapping relationship to perform a control action opposite to the current control action, and to maintain the opposite control action (for example, flipping from the current connection action to the disconnection action, or flipping from the current disconnection action to the connection action) before the key is operated again, and to maintain the opposite control action before the key is operated again.
[0141] When the mapping relationship defines the mapping relationship between a key and a specific control action of the switch 10241, the switch 10241 will directly execute the defined control action when the corresponding key is triggered, for example Fig.13 As shown, button A is defined to trigger the connection action of switch 10241A, and button B is defined to trigger the disconnection action of switch 10241A. Then, when the user presses button A, switch 10241A will perform the connection action, and when the user presses button B, switch 10241A will be triggered to perform the disconnection action.
[0142] Furthermore, in this embodiment, the mapping relationship between the multiple buttons of the switch device 102 and the multiple switches 10241 can be freely defined according to needs, and is not fixed and single, which can meet various usage scenarios and application needs.
[0143] In some embodiments, before detecting whether the user interaction module 1021 is subjected to an operation, the processing module 1025 is further configured to:
[0144] Receive a mapping relationship group, wherein the preset relationship group includes a plurality of mapping relationships; the plurality of mapping relationships are obtained by a user freely defining mapping relationships between at least some keys and the switch 10241 in advance on the smart terminal;
[0145] The latest mapping relationship between each key and each switch 10241 is determined based on the multiple mapping relationships.
[0146] In the specific definition example of the mapping relationship, each mapping relationship can define a 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 obtained by the user directly defining the mapping relationship between one of the keys and a switch 10241 through the smart terminal, and at least one mapping relationship is obtained by the smart terminal dynamically adjusting the mapping relationship between other keys and the corresponding switch 10241 according to the mapping relationship directly defined by the user.
[0147] On this basis, the number of buttons can be equal to the number of switches 10241. In the process of defining the mapping relationship, if the user changes the mapping relationship between any one of the buttons and the relay, the mapping relationship between other buttons and the corresponding switch 10241 will be dynamically adjusted, so that the changed mapping relationship group generally follows the one-to-one and non-repetitive mapping relationship between each button and each switch 10241.
[0148] For example Fig.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 mobile phone application. Fig.10 As shown, the switch device 102 includes three buttons (left button, middle button, right button), including 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. Fig.10 As shown, after entering the relay setting interface B, the setting items of the left button, middle button and right button are displayed respectively. For example, if the left button setting item is clicked, the left button definition interface C is entered, and relay L2 is selected in this interface. At this time, the left button will be mapped to relay L2, and the mapping relationship of the middle button will be automatically changed to relay L1. In other words, the user only needs to change the mapping relationship between one of the buttons and the relay, and the mapping relationship between the other buttons and the corresponding relays will be adaptively adjusted, so that the changed mapping relationship generally follows the one-to-one corresponding and non-repetitive mapping relationship between the button and the relay.
[0149] Subsequently, when the user presses the left button on the switch device 102, the relay L2 will be triggered to perform the relevant control action, and when the user presses the middle button, the relay L1 will be triggered to perform the relevant control action. 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.
[0150] In addition, in another definition example of mapping relationship not shown in the figure, each mapping relationship can define a mapping relationship between one or more buttons and one switch 10241. On this basis, the number of the buttons can be greater than the number of the switches 10241, so that each switch 10241 can be triggered by one or more buttons.
[0151] In addition, in another definition example of the mapping relationship which is not shown in the figure, each mapping relationship can define a mapping relationship between a button and one or more switches 10241. On this basis, the number of the buttons can be less than the number of switches 10241, so that each button can trigger one or more switches 10241.
[0152] Correspondingly, in some embodiments, Fig.11 As shown, a switch device 102 control method 300 is also provided, which is applied to a terminal device and includes steps S10 to S11.
[0153] Wherein, in step S10, a mapping relationship group is defined, wherein the mapping relationship group includes a plurality of mapping relationships, each mapping relationship defining a mapping relationship between at least one key information and at least one switch information;
[0154] The mapping relationship group is pre-defined by the user on the smart terminal; wherein the key information represents at least one of the following: a key to which an operation is applied among the multiple keys, and an operation type applied to the key; the switch information represents at least one of the following: a switch 10241 to be executed among the multiple switches 10241, and a specific control action executed by the switch 10241;
[0155] In step S11, the mapping relationship group is sent to the switch device 102, so that: after the switch device 102 obtains the mapping relationship group, according to the target key to which the operation is applied among the multiple keys and the matching target mapping relationship in the mapping relationship group, the switch 10241 defined by the target mapping relationship is controlled to perform a corresponding control action. The control action performed by the switch 10241 can be, for example, a connection action or a disconnection action.
[0156] In addition, it is worth noting that with the rapid development of the smart home industry, the control functions of the switch device 102 are gradually enriched, and are gradually not limited to the power control of the local load circuit, but are developing towards a richer and more diverse network control. The traditional power control method mainly relies on a simple complete power on and off method, that is, the load device is completely turned on or off by a switch. This simple power control method is obviously unable to adapt to the increasingly diverse load types and complex network control requirements in modern smart homes.
[0157] 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.
[0158] Specifically, the block diagram of the switch device 102 in the embodiment of the present disclosure can be as follows: Fig.12As shown. In the embodiment of the present disclosure, the processing module 1025 is configured to have a second trigger mode, so as to be suitable for: immediately sending the corresponding first event information to the outside after detecting the first operation applied to the user interaction module 1021. "Sending immediately to the outside" means that when the processing module 1025 detects the user's first operation (such as pressing a button), it immediately triggers and sends a signal or information without delay or complicated processing. This process emphasizes fast response and reduced delay. In a specific example, the processing module 1025 sends at least two frames of data of the first event information to the outside through a communication module 1026 within 100ms after detecting the first operation, so as to realize the immediate sending to the outside. In some schemes, after the first operation is detected in the second trigger mode, the indicator light of the corresponding light-emitting unit sends a first indication signal (for example, flashes once) to serve as a prompt.
[0159] The first event information represents 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 a network function. Here, the first event information is a type of information generated by the processing module 1025, which is used to communicate with an external system (such as the cloud, other devices). In this example, the function of the first event information is to trigger a network function. The network function refers to the interaction between the switch device 102 and other devices (such as the cloud, smart devices, load devices, etc.) through the network. Such functions may include device networking, remote control, device status synchronization, etc.
[0160] It can be further understood that the first event information does not directly control the local load circuit, but is used to interact with other systems (such as network services or devices). For example, when the switch 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 the button, a first event information is sent to the cloud, and after the cloud receives it, an automation scene may be started, such as "turn on the light and adjust the brightness".
[0161] Furthermore, the processing module 1025 is also configured to generate a control signal if it is detected that the first operation is removed within a first time period after the first operation is applied to the user interaction module 1021 .
[0162] In this embodiment, the control signal is specifically generated by the processing module 1025, and the connection control module 1024 performs corresponding control actions (such as switching the power switch, adjusting the light brightness, etc.). The control signal directly affects the operating state of the switch device 102, such as switching, dimming and other actions. For example, if the user presses a button on the switch device 102 (first operation) and releases it within a certain period of time (removal of operation), the processing module 1025 will generate a control signal to trigger a state change of the load circuit, such as turning on or off the light.
[0163] The connection control module 1024 is electrically connected to the processing module 1025 so as to: obtain the control signal; and perform corresponding control actions according to the control signal to trigger local functions and realize switching of the control state of the load circuit.
[0164] In this embodiment, the local function refers to the interaction and control between the switch device 102 and the load device 106 directly connected to it or other intelligent devices in the same local area network. This function does not need to rely on an external network, such as the switching of control actions of a connected control module.
[0165] In this embodiment, it is assumed that the switch device 102 is used in a home smart lighting system. The user presses a button (first operation), and the switch device 102 detects the button press and immediately sends a first event message to trigger the cloud, which may cause a home appliance (such as a lamp) to perform a switch action. If the user releases the button within a short time after pressing it (within a first time length), 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 switch of the lamp by switching different connection states.
[0166] 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 both network and local functions, thereby improving the flexibility of device control and enabling the switch device 102 to respond intelligently according to the duration and method of the user's operation, supporting instant response and adapting to different usage scenarios.
[0167] It is also worth mentioning that since network control is mostly implemented through network paths, the speed is slower than local control. When the switch 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 will greatly affect the user experience.
[0168] In the second trigger mode provided in this embodiment, after applying the first operation, the user interaction module 1021 immediately sends the first event information to the outside, and the information is reported to the network to trigger the remote operation of the corresponding smart device. At this time, the local control does not take effect immediately, but only when the first operation is removed (released), the connection control module 1024 is triggered through the local control signal to perform the corresponding control action, thereby improving the response speed and accuracy of the local control. This solution avoids the conflict between local control and network control by delaying the triggering timing of local control, thereby improving the synchronization problem caused by network delay while ensuring the response speed of network control. In the end, users can experience a smoother and more consistent operation response, which significantly improves the coherence of interaction and user experience.
[0169] Furthermore, the processing module 1025 is also configured to: in the second trigger mode, if it is detected that the first operation applied to the user interaction module 1021 is not removed for more than a first time period, then no control signal is generated.
[0170] In this embodiment, it is stipulated that in the second trigger mode, when the user operation (first operation) lasts for more than a certain time (first time), the switch device 102 will not trigger the control signal. Based on this, if the user keeps pressing the key for more than a predetermined range, no control signal will be generated. This design can avoid the generation of unexpected control signals due to misoperation or the user keeping the key pressed for a long time.
[0171] The first time length is 100ms to 3s, for example, 300ms to 1000ms, preferably 500ms. Furthermore, by setting an appropriate time threshold, unnecessary control signals are prevented from being triggered due to unintentional long press by the user, and unnecessary reactions are not caused by long press during user operation, ensuring that the load is controlled as expected.
[0172] In some embodiments, the user interaction module 1021 includes a button for receiving user operations; the first operation includes a press operation applied to the button; the processing module 1025 is suitable for: after detecting that the button is pressed, immediately sending the corresponding first event information to the outside to improve the response speed of the network function.
[0173] If a release operation is detected within a first time period after the key is pressed, a control signal is generated to improve the hand tracking performance of the local control.
[0174] Furthermore, when an operation is applied to a button, the solution provided in this embodiment can improve the response speed of the switch device 102 to trigger the network function and enhance the intuitiveness of the local function operation.
[0175] On this basis, the processing module 1025 is specifically configured to:
[0176] In the second trigger mode, if a release operation is detected on the key more than a first time period after a press operation is detected on the key for the first time, the control signal is not sent.
[0177] Exemplarily, each button is provided with a corresponding sensing structure, and the button is used to receive user operation. The sensing structure is coupled to the button to provide a sensing signal when the button 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. The processing module 1025 identifies the user operation applied to the button based on the sensing signal.
[0178] In a further example, the sensing structure includes an electronic switch, which is disposed below the key and electrically connected to an I / O port of the processing module 1025. The key is configured to undergo a first displacement toward the electronic switch when receiving a press operation, and the first displacement can trigger the electronic switch to switch between on / off states, thereby generating an electrical signal (sensing signal) for sensing. The electrical signal is transmitted to the processing module 1025 so that the processing module 1025 can identify the operation currently occurring on the key.
[0179] A reset structure is provided on the switch device 102 at a position corresponding to the key, the reset structure supports the key and accumulates potential energy during the first displacement of the key. When the pressing operation is removed, the potential energy accumulated by the reset structure acts on the key to provide a reset force for the key to undergo a second displacement in a direction away from the electronic switch. The reset force can support the key to return to its initial position for the user to apply the operation again. During the second displacement, the key can again trigger the switching of the on / off state of the electronic switch, thereby generating another electrical signal for sensing (another sensing signal), which is also transmitted to the processing module 1025 so that the processing module 1025 can identify the release operation currently occurring on the key.
[0180] Electronic switches can be used, for example Fig.21 The electronic switch SW2 shown is turned on when triggered, transmitting a low-level electrical signal to the corresponding I / O port of the processing module, and vice versa, transmitting a high-level electrical signal.
[0181] Furthermore, the processing module 1025 is also adapted to:
[0182] In the second trigger mode, if it is detected that the key is subjected to multiple consecutive press operations and release operations within the first time length (wherein the press operations and release operations that occur sequentially and adjacently are regarded as one time), then one release operation is selected to trigger the control signal, and other press operations and release operations do not trigger the control signal (the control signal is not generated).
[0183] In this embodiment, if the user performs multiple press and release operations in succession, the switch device 102 will select one release operation to trigger the control signal, while other operations will not be triggered. For example, if the user quickly presses and releases a button multiple times in a short period of time, the switch device 102 will select one of the release operations to trigger the control signal (such as a "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 press and release operations are ignored.
[0184] Furthermore, by selectively triggering the control signal, excessive operational interference is avoided, the stability of user control is improved, and the device response is made more precise.
[0185] In this embodiment, when a release operation is selected to trigger the control signal, a release operation may be randomly selected from multiple release operations.
[0186] In this embodiment, when a release operation is selected to trigger a control signal, the control signal may be triggered by selecting a release operation according to a predetermined rule. For example, the predetermined rule defines selecting a predetermined number of release operations from multiple release operations to trigger the control signal.
[0187] In a further example, the processing module 1025 is further adapted to: within the first time period after detecting that the key is pressed for the first time, if it is detected that the key is released and pressed again at least once, then except for the release operation applied for the first time, other press operations and release operations will not trigger a control signal.
[0188] In this embodiment, if the user applies a press operation or releases the key again after applying a press operation for the first time, operations other than the initial release operation will not trigger a control signal, thereby avoiding repeated control signals generated by continuous key actions, ensuring the accuracy of the operation, and reducing the risk of misoperation.
[0189] For example, when the user presses and releases the button for the first time, the switch device 102 will perform the corresponding control (such as turning on the light). If the user presses and releases the button again within a short period of time, the switch device 102 will not trigger the control signal again because it has recognized and executed the action of the first release.
[0190] For example, if the first duration is 500ms, if the user performs three release operations in succession within 500ms, the first release operation is selected to trigger the control signal; if the user performs two release operations in succession within 500ms, the first release operation is still selected to trigger the control signal. That is to say, in this example, no matter how many release operations are performed within the first duration, the first release operation is selected to trigger the control signal.
[0191] In some embodiments, the processing module 1025 is further configured to have a third trigger mode, and the third trigger mode is used to set the speed at which the corresponding switch 10241 responds when the key is operated. The processing module 1025 is further configured 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.
[0192] 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 corresponding first event information is sent externally. The first event information represents at least one of the following: the key subjected to the operation, and the type of operation applied to the key.
[0193] Specifically, the processing module 1025 may send the first event information only after detecting the release operation, or may send the first event information at the same time as detecting the release operation. Generally speaking, in the third trigger mode, the processing module 1025 needs to send the first event information only after determining that the key has been subjected to a complete press operation and release operation within the first time period. Different from the second trigger mode in which the first event information is sent immediately in response to the press operation, in the third trigger mode, the triggering timing of the first event information is later than the triggering timing of the first event information in the second trigger mode.
[0194] Furthermore, in the third trigger mode given in this embodiment, the control signal for triggering the local function and the first event information for triggering the network function are both generated when the release operation is completed. With the help of the delay in the execution of the network function, a scenario in which the local function is executed before the network function can be realized.
[0195] Further, the processing module 1025 is configured to: in the third trigger mode, if it is detected that the key is subjected to multiple consecutive press operations and release operations within the first time period, no control signal for controlling the connection control module 1024 is generated, and corresponding second event information is sent out; the second event information is different from the first event information. The second event information represents at least one of the following: the key subjected to the operation, and the type of operation applied to the key.
[0196] Correspondingly, the processing module 1025 is also configured to be suitable for: in the second trigger mode, if it is detected that the key is pressed and released multiple times within the first time period, 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 to the outside.
[0197] Further, the processing module 1025 is configured to: in the third trigger mode, if it is detected that a key is pressed and the pressing operation is maintained for more than a first time period, no control signal for controlling the connection control module 1024 is generated, and third event information is sent externally; the third event information is different from the first event information. The third event information represents at least one of the following: the key to which the operation is applied, and the type of operation applied to the key.
[0198] Correspondingly, the processing module 1025 is also configured to be suitable for: in the second trigger mode, if it is detected that the button is pressed and maintained for more than the first time period, no control signal for controlling the connection control module 1024 is generated, and no event information (such as the corresponding third event information) is sent to the outside.
[0199] In some embodiments, Fig.13 As 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 input port 1022 , and the other end is connected to a plurality of independent control output ports 1023 .
[0200] The user interaction module 1021 has a plurality of buttons corresponding to the switch 10241 of the connection control module 1024, and each button is configured to independently receive user operations. Fig.13 As shown, button A corresponds to switch A, button B corresponds to switch B, switch A is used to control load device 106A, and switch B is used to control load device 106B.
[0201] The processing module 1025 is further configured to allow the trigger modes of the buttons to be set independently, and to be able to switch between the second trigger mode and the third trigger mode corresponding to any button in response to a switching instruction.
[0202] In this embodiment, these switches 10241 independently control each output port through a button, and the processing module 1025 supports the button to switch the trigger mode independently, and switches different modes according to the switching instructions of the application. Therefore, this solution provides flexible button mapping and control mode switching, supports a variety of home automation functions, enhances the scalability and compatibility of the switch device 102, and allows users to customize the operation mode and control strategy according to their needs. For example, users can control different home appliances (such as lights, fans, etc.) through different buttons, each button corresponds to the switch 10241 of the control module one by one, and switches the control mode (such as timer switch, brightness adjustment, etc.) according to the instructions of the application.
[0203] In addition, different buttons can be set to the same trigger mode, for example, they can work in the second trigger mode or the third trigger mode at the same time; the same button can only be selected to 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. For example, the user sets the trigger mode of each button through the application (APP) on the smart terminal, thereby generating the corresponding switching instruction.
[0204] 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 sent directly or indirectly to the corresponding network device. After receiving the event information, the network device will control the corresponding smart device to execute the corresponding function, thereby triggering the network function.
[0205] Specifically, at least one trigger relationship is stored in the network device, and each trigger relationship defines a corresponding relationship between at least one trigger condition and at least one control result. The trigger condition defines at least one key or key operation type (such as single click, double click, long press, etc.), and the control result defines an executable function of a smart device (such as a smart light) connected to the same network device as the switch device 102. The network device can be a gateway, a router, or a server, etc.
[0206] Exemplarily, the switch device 102 includes a left button, a middle button, and a right button, and the controlled devices may be, for example, smart lights A and smart lights B. If the trigger condition defines at least one button, the trigger relationship may be, for example:
[0207] Trigger relationship A: If the left button is operated (the operation here can be any operation, such as single click, double click, long press, etc.), smart light A lights up;
[0208] In the second trigger mode, the specific process of triggering the network function is:
[0209] When the user operates the left key and continuously presses and releases the left key within a first time period, the processing module 1025 will send the corresponding first event information in response to the press operation, and the first event information represents the operated key (i.e., the left key). After the server (network device) receives the corresponding first event information through a router or a gateway, it matches the trigger relationship A corresponding to the left key according to the stored trigger relationship, controls the control result defined by the trigger relationship A, and the corresponding smart lamp A will receive the control command to light up, triggering the network function.
[0210] In the third trigger mode, the process is similar, except that the time difference between the event information and the control signal is smaller. The specific process of triggering the network function is:
[0211] When the user operates the left key and continuously presses and releases the left key within the first time period, the processing module 1025 will generate a control signal and send the corresponding first event information to the outside only after the pressing and releasing operations are completed. The first event information represents the operated key (i.e., the left key). After the server (network device) receives the corresponding first event information through the router or gateway, it matches the trigger relationship A corresponding to the left key according to the stored trigger relationship, and controls the control result defined by the trigger relationship A to be executed. The corresponding smart lamp A will receive the control command to light up, triggering the network function.
[0212] For further example, if the trigger condition defines at least one type of operation applied to at least one key, the trigger relationship may be, for example:
[0213] Trigger relationship B: When the left button is pressed, smart light A lights up;
[0214] Trigger relationship C: When the right button is pressed, smart light A turns off;
[0215] Trigger relationship D: When the left button is clicked (continuous pressing and releasing), smart light A lights up;
[0216] Trigger relationship E: When the right button performs a single-click operation (continuous pressing and releasing operations), the smart light A goes out.
[0217] In the second trigger mode, the specific process of triggering the network function is:
[0218] When the user continuously presses and releases the left key within the first time period, the processing module 1025 will send the corresponding first event information in response to the press operation, and the first event information indicates that the left key is pressed. After receiving the corresponding first event information via the router or gateway, the server (network device) matches the trigger relationship B corresponding to the press 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, and the corresponding smart lamp A will receive the control command to light up to trigger the network function.
[0219] When the user continuously presses and releases the right key within the first time period, the processing module 1025 will send the corresponding first event information in response to the press operation, and the first event information indicates that the right key is pressed. After receiving the corresponding first event information via the router or gateway, the server (network device) matches the trigger relationship C corresponding to the press 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, and the corresponding smart lamp A will receive the control command to turn off to trigger the network function.
[0220] In the third trigger mode, the specific process of triggering the network function is:
[0221] When the user continuously presses and releases the left key within the first time period, the processing module 1025 will generate a control signal and send the corresponding first event information to the outside only when the pressing and releasing operations are completed. The first event information indicates that the left key is subjected to a single-click operation. After receiving the corresponding first event information via a router or a gateway, the server (network device) matches the trigger relationship D corresponding to the single-click operation of the left key according to the stored trigger relationship, and controls the control result defined by the trigger relationship D to be executed, and the corresponding smart lamp A will receive the control command to light up to trigger the network function.
[0222] When the user continuously presses and releases the right key within the first time period, the processing module 1025 will generate a control signal and send the corresponding first event information to the outside only when the pressing and releasing operations are completed. The first event information indicates that the right key is subjected to a single-click operation. After receiving the corresponding first event information via a router or a gateway, the server (network device) matches the trigger relationship E corresponding to the single-click operation of the right key according to a plurality of pre-stored trigger relationships, and controls the control result defined by the trigger relationship E to be executed, and the corresponding smart lamp A will receive a control command to turn off, so as to trigger the network function.
[0223] In the control loop of smart lamp B, for example, a switch 10241 of the connection control module 1024 of the switch device 102 is electrically connected to smart lamp B through the control line of the control output port 1023 to control the loop control state of smart lamp B. When the user operates the left key to perform continuous pressing and releasing operations in the second trigger mode, the processing module 1025 will generate a control signal to switch the control state of smart lamp B (such as from off to on). Through the definition of trigger relationship A or B, the user can realize the lighting operation of smart lamp A and the lighting of smart lamp B at the same time by operating the left key in the second trigger mode. Since the first event information is sent immediately when the pressing operation is performed, and the control signal is generated when the release operation is performed, the lighting actions of smart lamp A and smart lamp B can be performed almost synchronously.
[0224] 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 realize the scene of smart light B and smart light A lighting up in turn by operating the left button.
[0225] It is worth mentioning that the switch device 102 is pre-added to the network where the network device is located, such as an Internet of Things platform where a server is located, or a network formed by a gateway. The following embodiments will further introduce the process of connecting the switch device 102 to the network. Specifically, the processing module 1025 is also configured to:
[0226] Before, after or at the same time as the first operation applied to the user interaction module 1021 is detected and the corresponding first event information is immediately sent out, if it is further detected that the user interaction module 1021 is subjected to an operation that meets the first specific condition within a first time period after the first operation is applied, the pre-configuration mode is entered; if in the pre-configuration mode, it is further detected that the operation applied to the user interaction module 1021 meets the second specific condition, the configuration mode is entered; in the configuration mode, the processing module 1025 sends a predetermined indication information to the outside so that the external network device can search for the indication information and add the switch device 102 to the network, so as to trigger the network function through the first event information; wherein the network device may be, for example, a gateway / router, a server or an intelligent terminal; wherein the first specific condition and the second specific condition differ in at least one of the following: the number of times the first operation is applied continuously and the first operation is removed, and the interval between adjacent first operations and the removal of the first operation.
[0227] In an embodiment where the user interaction module 1021 includes a key for receiving a user operation, the processing module 1025 is specifically adapted to:
[0228] Before, after or at the same time as the first operation applied to the button is detected and the corresponding first event information is immediately sent out, if within a first time period after the first operation is detected, an operation that meets the first specific condition is applied to the button again, the pre-configuration mode is entered; if in the pre-configuration mode, it is detected that an operation that meets the second specific condition is applied to the button, the configuration mode is entered; in the configuration mode, the processing module 1025 sends predetermined indication information to the outside; the indication information at least represents the switch device 102, so that an external network device can search for the indication information and add the switch device 102 to the network according to the indication information; wherein the network device may be, for example, a gateway / router, a server or an intelligent terminal; wherein there is at least one different feature between the first specific condition and the second specific condition, for example: the number of times the first operation is applied continuously and the first operation is removed, or the interval between the application and removal of adjacent first operations.
[0229] In this embodiment, the switch device 102 enters the pre-configuration mode according to the key operation, and enters the configuration mode if an operation meeting the second specific condition is detected. In the configuration mode, instruction information is sent for the external device to perform network configuration.
[0230] Whether in the second trigger mode or the third trigger mode, the configuration mode can be entered by pressing a button. By setting the pre-configuration mode and the configuration mode, the switch device 102 can enter the network configuration stage 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, allowing the user to more conveniently connect the switch device 102 to the home network.
[0231] Furthermore, the processing module 1025 is also adapted to: in the second trigger mode, before, after or simultaneously with entering the preconfiguration mode, generate a corresponding control signal in response to the first application of the first operation to the key.
[0232] In this embodiment, after the user presses the button, the switch device 102 immediately performs the control action (such as turning on the light) and enters the preconfigured mode later, which ensures that the user's immediate control needs are met without being affected by mode changes.
[0233] It can be seen that in the second trigger mode, the control signal can also be synchronously triggered, and the 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 only the configuration mode is triggered.
[0234] That is to say, in the second trigger mode, the same operation of the same key can trigger multiple functions at the same time, while in the third trigger mode, the same operation of the same key can only trigger the same function, and different operations of the same key can trigger different functions, realizing function reuse of keys.
[0235] Furthermore, the first operation is a press operation applied to a key, the first specific condition indicates that at least one consecutive press operation and release operation are applied within a first time period, and the second specific condition indicates that the interval between two adjacent press operations and release operations meets a second time period. The second time period is 2 seconds to 10 seconds, for example, 5 seconds.
[0236] Then, before, after or at the same time as detecting a press operation applied to the button and immediately sending out the corresponding first event information, if it is further detected that the button is subjected to at least one press operation and a corresponding release operation within a first time period after the press operation is applied, it is determined that the first specific condition is met and the preconfiguration mode is entered. At the same time, the indicator light of the light-emitting unit corresponding to the button sends a second indication signal (for example, flashing twice, each time lighting up for 100ms and off for 200ms) to prompt the switch device 102 to enter the preconfiguration mode.
[0237] In the pre-configuration mode, if it is further detected that the button is pressed and released and the pressing operation lasts for a second time period, it is determined that the second specific condition is met and the configuration mode is entered.
[0238] In this way, a key reuse effect is achieved in which different operations on the same key trigger different functions.
[0239] Furthermore, after entering the pre-configuration mode, if no subsequent operation is detected, the pre-configuration mode will be maintained for at least a certain time (eg, 1 second to 3 seconds, preferably 1.2 seconds).
[0240] In some embodiments, the processing module 1025 is configured to have a fourth trigger mode, which is used to set the control action that the switch 10241 should perform when the switch device 102 is powered on again after being powered off. Specifically, the processing module 1025 is configured to be suitable for: in the fourth trigger mode, when the switch 10241 is powered on again after being powered off, setting the switch 10241 to one of the following three states:
[0241] State 1: the switch 10241 performs the disconnection action;
[0242] State 2: The switch 10241 continues the control action before power failure;
[0243] State three: the switch 10241 performs the connection action.
[0244] In some embodiments, the processing module 1025 is configured to have a fifth trigger mode, so as to be suitable for: in the fifth trigger mode, in response to an operation applied to a button, switching the corresponding switch 10241 to a connection action, and in a case where a switch 10241 was originally in a connection action, switching the switch 10241 that was originally in a connection action to an disconnection action, so that each user operation can only trigger one of the multiple switches 10241 to perform a connection action.
[0245] Furthermore, the processing module 1025 is also configured to be able to: when entering the fifth trigger mode from any other trigger mode, keep all the switches 10241 in the disconnection action. If no switch 10241 is controlled to perform the connection action during the fifth trigger mode, when exiting the fifth trigger mode, all the switches 10241 are still kept in the disconnection action.
[0246] Furthermore, the processing module 1025 is also configured to be able to: when it is powered off and powered on again in the fifth trigger mode, if there are switches 10241 in the on action before power off, then after power on, keep all switches 10241 in the off action.
[0247] In specific examples, such as Fig.14As shown, the user enters the configuration interface A corresponding to the switch device 102 through the APP application of the mobile phone. It can be seen that the configuration interface A displays a total of five setting items, namely "button mode", "indicator light", "relay setting", "local mutual control" and "fifth starting mode", among which "relay setting" is used to set the mapping relationship involved in the above embodiment. Clicking on this setting item will jump to the Fig.10 In the interface B shown, the user can further freely define the mapping relationship between the buttons and the switches. By clicking the "fifth trigger mode" option, the configuration interface F of the fifth trigger mode can be entered. The fifth trigger mode belongs to the global mode, that is, once it takes effect, the switches 10241 corresponding to all buttons of the switch device 102 work according to the logic of the fifth trigger mode.
[0248] In some embodiments, the processing module 1025 is configured to have a sixth trigger mode, so as to be suitable for: in the sixth trigger mode, the switch 10241 corresponding to the key is set to remain in the on state with a higher priority. In this mode, the switch 10241 corresponding to the key will remain in the on action and will not perform a disconnection action due to the key operation.
[0249] Furthermore, the processing module 1025 is also configured to switch the corresponding switch 10241 to a connection action when entering the sixth trigger mode.
[0250] Further, the trigger mode of each button can be independently set to enter the sixth trigger mode, and the switch 10241 that triggers the on-action after the button set to the sixth trigger mode is operated is determined according to the mapping relationship recorded in the above embodiment. For example, when the user defines the mapping relationship as the left button triggers the relay L2, the middle button triggers the relay L1, and the right button triggers the relay L3, if the middle button is set to the sixth trigger mode, the corresponding relay L1 will remain in the on-action, and the control action of the relay L2 will not be affected by the switching of the trigger mode of the middle button.
[0251] Furthermore, the processing module 1025 is also configured 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 a disconnection action when powered on after being powered off), and the button is also set to be in the sixth trigger mode, the sixth trigger mode set for the button has a higher priority than the fourth trigger mode, that is, when the switch device 102 is powered off and powered on again, the corresponding switch 10241 is not controlled to perform a disconnection action due to the fourth trigger mode setting, but the corresponding switch 10241 is kept in the on action according to the rules of the sixth trigger mode.
[0252] Furthermore, the processing module 1025 is also configured to switch the corresponding switch 10241 to the on action when entering the sixth trigger mode. For example, the switch 10241 corresponding to a certain button is currently in the off action, and when the processing module 1025 responds to the user operation to set the button to the sixth trigger mode, the control action of the corresponding switch 10241 will be switched to the on action.
[0253] In some embodiments, a seventh trigger mode is also provided. The processing module 1025 is configured to have a seventh trigger mode so that: in the seventh trigger mode, after identifying the operation applied to the button, a pre-set wireless signal is sent outward, and the wireless signal is used to control the corresponding smart device. The smart device 109 here can be understood as other smart home devices connected to the same network access device 101 and / or the cloud as the switch device 102 (it can be a smart device connected to the same network as the switch device 102, or it can be a load device 106 directly connected to the switch device 102).
[0254] Furthermore, the wireless signal here can be Fig.17 The first communication protocol shown is sent and forwarded to the smart device 109 via the network access device 101, such as smart lamps, smart curtains, smart window pushers, smart thermostats, smart wall switches, etc.
[0255] Furthermore, the processing module 1025 is also configured to switch the corresponding switch 10241 to the on action, or maintain the original control action of the switch 10241 when entering the seventh trigger mode.
[0256] Furthermore, 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.
[0257] In some embodiments, when the switch device 102 has multiple trigger modes, the processing module 1025 switches to one or more trigger modes pointed to by the switching instruction according to the received switching instruction. The switching instruction is generated after the user selects the target trigger mode (i.e., the specific trigger mode that the switch device 102 is expected to enter) from multiple trigger modes on the terminal device. The processing module 1025 can selectively enter one of the trigger modes, and the trigger modes can also enter multiple trigger modes at the same time without contradicting each other. The trigger mode belonging to the global mode (e.g., the fifth trigger mode) will be effective for the switch device 102 as a whole, and the trigger mode belonging to the local mode (e.g., 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, and the local output mode) can be set to take effect as a unit of the key 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 then each key can be set in a different trigger mode.
[0258] like Fig.15 As shown, a schematic diagram of the interface operation of a local mode selection is given; the user enters the configuration interface corresponding to the switch device 102 through the APP application of the mobile phone (such as Fig.14 After entering the interface A), by clicking the "Key Mode" option, you can enter the local mode selection interface G, that is, the key mode configuration interface D. Fig.15As shown, the corresponding local mode selection areas are displayed for the three buttons in the button mode configuration interface G. Taking the left button as an example, the "Button Working Mode" setting item provides two working modes: "Wired Switch" and "Wireless Switch". After selecting the "Wired Switch" working mode, the trigger controls of "First Trigger Mode", "Second Trigger Mode", "Sixth Trigger Mode" and "Fourth Trigger Mode" will be further displayed, where the "First Trigger Mode" is used to set the first trigger mode of the left button, and the switching instruction generated after the trigger 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 it is not selected, the left button is in the third trigger mode, and the switching instruction generated 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. The switching instruction generated after the corresponding trigger control is selected will point to the sixth trigger mode. "Fourth trigger mode" is used to set the fourth trigger mode of the left key. After the corresponding trigger control is selected, the user will enter the specific state selection interface H of the fourth trigger mode of the left key. State 1, state 2 and state 3 are listed in the interface H 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 selection interface of the local mode.
[0259] After selecting the "wireless switch" working mode, the triggered switching instruction will point to the seventh trigger mode, which is used to set the switch device 102 to the seventh trigger mode. In addition, under the "wireless switch" option, the trigger controls of "first trigger mode", "second trigger mode", "sixth trigger mode" and "fourth trigger mode" are still further displayed, 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. In other words, the first to fourth trigger modes and the sixth trigger mode can be set under the "wired switch" option and the "wireless switch" option, and the same trigger mode under "wired switch" and under "wireless switch" have different functions. 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.
[0260] In some embodiments, Fig.16 As shown, the switch device 102 also includes an indication module 1027, which is electrically connected to the processing module 1025 and is arranged corresponding to 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 to indicate the change of the working state / mode of the switch device 102.
[0261] It is worth noting that with the rapid development of the smart home industry, the control functions of switch devices are gradually enriched, and are no longer limited to the power control of local load circuits, but are developing towards more diverse network control. These newly added functions make 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 needs for the device status.
[0262] Specifically, in an intelligent switch device 102 with multiple operating modes and complex functions, the status of the indicator light may not be able to fully 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 vague and not intuitive enough.
[0263] 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 an indication module 1027 and a processing module 1025.
[0264] 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, and 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.
[0265] 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., which is used to form different indication states.
[0266] The indication state can be understood as the visual performance state of the indicator light of the light-emitting unit, such as color, brightness, flashing 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.
[0267] In this embodiment, the button and the light-emitting unit have a one-to-one correspondence. When the user operates the switch device 102 through the button, the operation change of the button will affect the change of the indication state of the light-emitting unit, thereby feeding back the current control state or working state of the user device.
[0268] In this embodiment, the processing module 1025 is configured to have a virtual output mode, so as to be suitable for: before entering the virtual output mode, changing the indication state of the corresponding light-emitting unit in response to the operation of the key, and switching the control action of the corresponding switch 10241, so as to indicate the control action of the switch 10241 corresponding to each key 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, in which the indication state of the light-emitting unit is mainly used to indicate the change of the control action of the local switch.
[0269] After entering the virtual output mode, the indication state of the corresponding light-emitting unit changes in response to the operation of the button, and the control action of the switch 10241 remains unchanged, so that the indication state of the light-emitting unit and the control action of the switch 10241 operate independently of each other.
[0270] In this embodiment, in the virtual output mode, the control action of the switch 10241 is not changed in the control state, but the state indication of the device is indirectly indicated 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) does not change due to the key operation. Even if the user presses the button, the physical switch of the device (such as the switch that controls the power supply) still maintains the current state. The user can trigger the change of the indication state of the light-emitting unit through key operation, but the physical switch state of the device (such as the control action of the switch 10241) is not affected.
[0271] Furthermore, in the solution provided by this embodiment, through the intelligent processing module 1025, the switch device 102 can switch between multiple operating modes and adjust the state of the indicator light according to different operating modes, so as to adapt to more complex functional requirements. For example, in some scenarios, it may be desirable not to directly intervene in the power state of the device, but only to feedback the current operating 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 status of the device is fed back in real time through the changes in the light-emitting unit, thereby enhancing the user experience.
[0272] Furthermore, the processing module 1025 is also configured to:
[0273] In the virtual output mode, after the indication state of the corresponding light-emitting unit changes in response to the operation of the key, a control message is generated according to the changed indication state of the light-emitting unit.
[0274] The control message is sent so that: the smart device that has established a pairing relationship with the switch device 102 in advance receives the control message and controls its own working state based on the indicated state obtained by parsing.
[0275] 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 may contain information such as the current state of the switch device 102, operation commands, control instructions, etc., and the goal is to make the receiving smart device adjust its behavior according to the content of the message.
[0276] In this embodiment, the indication state information carried by the control message not only reflects the change of the light-emitting unit, but also represents the corresponding control information. This enables the smart device to adjust its own working state according to the change of the indication state after receiving the control message, thereby ensuring the consistency of behavior between the switch device 102 and the smart device.
[0277] In addition, when in virtual output mode, the change of the indication state of the light-emitting unit is directly embedded in the control message as control information, and there is no need to carry additional control information separately. By integrating the indication state and the control information, the redundant information of the control message is reduced. This design simplifies the complexity of the message, reduces the communication overhead, and ensures efficient communication between devices. Smart devices can perform more complex automation operations based on these concise control messages, such as channel functions or non-channel control functions controlled by the local switch 10241. The non-channel control function can be understood as the function of the switch device 102 running in the local network (for example, the local area network of a home or office), emphasizing local direct communication between devices without relying on external networks. Even in the absence of the Internet, local functions can still be executed, such as controlling the device switch and adjusting the light brightness by pressing buttons.
[0278] Furthermore, if Fig.17 As shown, the processing module 1025 is also configured to:
[0279] In the second trigger mode or the third trigger mode, the processing module 1025 sends the first event information through the first communication protocol, and 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 a preset network function, and the second communication protocol is used for local communication to trigger a local wireless control function.
[0280] In this embodiment, the network function can be understood as the switch device 102 being able to interact with external intelligent devices (such as cloud servers, remote control terminals, controlled intelligent devices) through network protocols after accessing the network, thereby realizing functions such as remote control, monitoring, configuration or state synchronization of the device. The network function is pre-configured, for example, customized through the trigger relationship involved in the above embodiment.
[0281] It can be seen that in this embodiment, the first communication protocol is used for network communication, that is, the 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 home or office, and allow the devices to be remotely controlled through the Internet or local area network.
[0282] The second communication protocol is used for local communication, that is, devices communicate directly through some wireless method without relying on the Internet, for control and operation in a local environment, and is suitable for fast response and low latency requirements between devices. For example, but not limited to, Bluetooth, ZigBee, Thread or some customized 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 external networks.
[0283] Among them, the customized private communication protocol can be understood as a communication protocol designed and implemented by a specific equipment manufacturer or technology provider according to its own needs and application scenarios. Unlike common standard communication protocols (such as Wi-Fi, Bluetooth, ZigBee, etc.), private communication protocols do not have unified international or industry standards, but are customized protocols based on the specific requirements of specific equipment and application scenarios. In this embodiment, the change of the indication state of the light-emitting unit is directly embedded in the control message as control information, and there is no need to carry additional control information separately. By integrating the indication state and control information, the redundant information of the control message is reduced. This design simplifies the complexity of the message, reduces communication overhead, and is more conducive to the customization of private communication protocols.
[0284] Further, in the second trigger mode, after the processing module 1025 detects the pressing operation applied to the key, it immediately sends the corresponding first event information to the outside, and the corresponding light-emitting unit forms the first indication state (for example, the indicator light of the corresponding light-emitting unit sends the first indication signal, such as flashing once). Alternatively, in the third trigger mode, if it is detected that the key is subjected to a continuous pressing operation and release operation within the first time length, the corresponding first event information is sent to the outside again after the first time length, and the corresponding light-emitting unit forms the first indication state (for example, the indicator light of the corresponding light-emitting unit sends the first indication signal, such as flashing once).
[0285] In the virtual output mode, when the processing module 1025 detects a press operation or a continuous press and release operation applied to the button, the original control action of the corresponding switch 10241 remains unchanged, and instructs the corresponding light-emitting unit to form a second indication state, and sends a control message carrying the second indication state to the outside through the second communication protocol to trigger the smart device that has been paired in advance to switch the working state.
[0286] There is at least one of the following differences between the first indication state and the second indication state: indicator light color, indicator light flashing times / frequency, and indicator light on / off state.
[0287] In the virtual output mode, the switch device 102 can maintain the original control action and trigger the state switching of the paired smart device through the second indication state carried in the control message.
[0288] Furthermore, in the virtual output mode, when a press operation or a continuous press and release operation is detected on a button, the indicator light of the corresponding light-emitting unit does not send out a first indication signal, but instead flips the indicator light state (for example, the indicator light is flipped from on to off), and sends a control message carrying the flipped indicator light state information to the outside through the second communication protocol, so as to trigger the pre-paired smart device to flip the working state (for example, the light is flipped from on to off) through the indicator light state information.
[0289] Furthermore, each light-emitting unit includes two-color indicator lights, so that different light-emitting colors or light-emitting frequencies can be achieved between different indication states. Fig.18 As shown, each light-emitting unit includes two indicator lights, white and orange (such as Fig.21 The light emitting parameters of the indicator light of the light emitting unit can be adjusted by the user, and can be adjusted visually by the user on the application program interface of the terminal device. Fig.18 As shown, after the user enters the configuration interface A corresponding to the switch device 102 through the mobile phone APP application, the configuration interface A also displays the "indicator light" option. Through this option, the indicator light setting interface I is entered, where the "indicator light" option is used to set the state parameters of the indicator lights of each light-emitting unit of the indicator module 1027, such as indicator light switch, brightness parameters, etc. Fig.18 As 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 brightness of the orange indicator light through the white light / orange light brightness adjustment control.
[0290] In some embodiments, the processing module 1025 is further configured to automatically enter the virtual output mode after entering the sixth trigger mode and / or the seventh trigger mode and completing pairing with the corresponding smart device.
[0291] Specifically, when the processing module 1025 has only 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 smart device.
[0292] When the processing module 1025 has only 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 smart device.
[0293] 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 at the same time and completing pairing with the corresponding smart device.
[0294] 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 selectively enter one of the trigger modes and then trigger the virtual output mode in conjunction with the pairing operation with the corresponding smart device.
[0295] 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.
[0296] This design greatly simplifies the user operation process, enables more flexible and efficient seamless connection between the switch device 102 and the smart device, and significantly improves the automation and operation convenience of the device. Through this automatic triggering mechanism, users no longer need to perform tedious configuration steps, and only need to complete device pairing to achieve fast and intuitive control, thereby improving the intelligent experience of the entire smart home system.
[0297] Furthermore, if the user interaction module 1021 includes multiple buttons, the trigger mode (sixth trigger mode, seventh trigger mode, virtual trigger mode, etc.) of each button can be set independently, so as to give different control functions to different buttons. Specifically, each button can be independently configured with a pairing relationship to be paired with different smart devices. The user can configure each button as the sixth trigger mode and / or the seventh trigger mode according to the needs. When the corresponding button is also configured with a pairing relationship, the corresponding light-emitting unit will be automatically triggered to enter the virtual output mode. At this time, the indication state of the light-emitting unit corresponding to the button is no longer used to directly indicate the control action of the switch 10241, but is used to reflect the working state of the smart device paired with the button. Each button not only controls the switch of the switch 10241, but also can realize independent control of multiple smart devices and feedback the status of the corresponding devices in real time. As a result, users can control smart devices in the home more accurately and conveniently, improving the intelligent linkage capability of the system and the user's operating experience.
[0298] A feasible implementation of the pairing operation involved in the above embodiment is given below:
[0299] Specifically, the processing module 1025 enters the pairing mode when receiving the pairing instruction. In the pairing mode, the processing module 1025 is in a pairing state of continuously listening to the pairing signal. After receiving the pairing signal from the target smart device (such as a smart light), the processing module 1025 stores the identification information (such as product ID, MAC address, etc.) carried in the pairing signal for uniquely identifying the target smart device to establish a pairing with the target smart device.
[0300] In addition, in another embodiment, in pairing mode, the processing module 1025 can also actively send a pairing signal to the outside, and the pairing signal carries identification information for uniquely identifying the switch device 102 (for example, the ID and MAC address of the switch device 102, etc.), so that after the target smart 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.
[0301] After pairing is completed, the control signal emitted by the switch device 102 when it is operated will carry identification information of itself or the target smart device, so that the target smart device can confirm whether the control signal is a legal signal. It will only respond if it is judged to be legal, and will not respond if it is judged to be illegal, so that the switch device 102 can legally control and / or be controlled by the smart device with which a pairing relationship has been established.
[0302] in:
[0303] Smart devices that can establish a pairing relationship with the switch device 102 for legitimate control may include, but are not limited to, smart curtain motors, smart lights, smart window pushers, etc. The control exerted by the switch device 102 on them may include, but are not limited to:
[0304] Control the smart curtain motor to open the curtain, close the curtain, pause the curtain at a certain opening or closing degree, etc.
[0305] Control the smart lights to turn on, off, adjust brightness, adjust color temperature, etc.;
[0306] Control the smart window pusher to open the window, close the window, pause the window at a certain opening degree, etc.
[0307] Smart devices that can establish a legally controlled pairing relationship with the switch device 102 include, but are not limited to: self-powered wireless switches, battery wireless switches, human presence sensors, infrared sensors, etc. The functions that the switch device 102 is controlled to perform include, but are not limited to:
[0308] Switching the control action of a certain switch 10241 in response to a single-click operation signal sent by the self-generating wireless switch / battery wireless switch;
[0309] In response to the double-click / triple-click / long-press operation signal sent by the battery wireless switch, the control action of a certain switch 10241 is switched;
[0310] In response to the sensing signal sent by the human presence / infrared sensing sensor, the control action of a certain switch 10241 is switched.
[0311] In addition, these smart devices need to communicate with the switch device 102 based on the same set of customized private communication protocols to achieve local mutual communication. For example, they may be devices from the same manufacturer as the switch device 102, and then these smart devices and the switch device 102 follow the same set of customized private communication protocols. Alternatively, they may be devices from different manufacturers than the switch device 102 but follow the same set of customized private communication protocols.
[0312] Furthermore, the pairing instruction comes from a network device in the network added by the switch device 102 through the configuration mode. For example, a mobile phone, a user can trigger the pairing instruction through the control operation of the relevant page of the mobile phone, and the pairing instruction is sent to the switch device 102 through the network to remotely trigger the switch device 102 to enter the pairing state.
[0313] In a specific example, the user interaction module 1021 has one or more buttons, and the processing module 1025 can pair each button independently. Fig.19 The following is a schematic diagram of the interface operation. The specific operations include:
[0314] The switch device 102 has three buttons: left button, middle button and right button. For example, if the user needs to pair the left button, the user enters the configuration interface A corresponding to the switch device 102 through the APP application of the mobile phone, and the "local mutual control" is used for pairing each button. Fig.19 As shown, after clicking the "Local Mutual Control" option, the button selection interface D is entered. After the user selects "Left Button" in the button selection interface, the pairing interface E of the left button is entered. It can be seen that the pairing interface of the left button displays two display items and three operation items.
[0315] The two display items are "Local Intercontrol ID" and "Number of Wireless Switches", where "Local Intercontrol ID" is used to display the identification information (ie, ID) of the target smart device with which a pairing relationship has been established, and "Number of Wireless Switches" is used to display the number of wireless switches with which a pairing relationship has been established with the switch device 102.
[0316] The three operation directions are "Add remote control / mutual control", "Clear mutual control" and "Clear wireless", wherein "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 smart devices or wireless switches, and can be paired with multiple wireless switches, so that 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 used to be sent to the switch device 102. The processing module 1025 clears the ID information of the local target smart device that has been paired according to the clear mutual control instruction, so as to reset the pairing of the switch device 102. "Clear wireless" is used to generate a clear curve instruction, which is used to be sent to the switch device 102. The processing module 1025 clears the ID information of the local wireless switch that has been paired according to the clear wireless instruction, so as to reset the pairing of the switch device 102. After clearing wireless, "Number of wireless switches" will display 0.
[0317] Furthermore, when two switch devices establish a mutual control relationship through pairing, the switches of the connection control modules, the indicator lights of the light-emitting units, and the display status of the configuration interface between the 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, the wireless switch will act as a remote control function, and can wirelessly remotely control the other two switch devices in the same paired mutual control relationship.
[0318] In some embodiments, the processing module 1025 is also configured to not set the indication module 1027 to the virtual output mode after entering the first trigger mode, that is, after entering the first trigger mode, the corresponding light-emitting unit will not be automatically triggered to enter the virtual output mode, and the state change of the indicator light of the light-emitting unit is still used to indicate the change of the control action of the corresponding switch 10241.
[0319] In some embodiments, Figure 20a to Figure 20d As shown, the processing module 1025 is also configured to:
[0320] like Fig.20a As shown, when it is determined that the switch device 102 is restarted without power failure, each switch 10241 of the connection control module 1024 is restored to a default state.
[0321] When it is determined that the switch device 102 is restarted due to power failure and power on, further determining whether it is in the fifth trigger mode;
[0322] If so, all switches 10241 connected to the control module 1024 are switched to the disconnection action (i.e., disconnecting the output, such as Fig.20a or,
[0323] Further, the control actions of the switches 10241 of the connection control module 1024 are determined according to the specific state of the fourth trigger mode (eg Fig.20b Specifically, Fig.20d As shown, if the fourth trigger mode is in state two, the corresponding switch 10241 continues the control action before power failure; otherwise, each switch 10241 connected to the control module 1024 is switched to the disconnection action.
[0324] If not, the switch 10241 corresponding to the key in the first trigger mode and / or the seventh trigger mode is further switched to the on action (ie, the output is turned on, such as Fig.20a , Fig.20b ), and the control actions of the remaining switches 10241 (i.e. switches corresponding to the keys not in the first trigger mode or the seventh trigger mode) are determined according to the specific state of the fourth trigger mode. Fig.20d As shown, if the fourth trigger mode is in state one, the corresponding switch 10241 performs a disconnection action; if the fourth trigger mode is in state two, the corresponding switch 10241 continues the control action before power failure; if the fourth trigger mode is in state three, the corresponding switch 10241 performs a connection action.
[0325] Furthermore, if Fig.20c As shown, before the switch 10241 corresponding to the key in the first trigger mode and / or the seventh trigger mode is switched to the on action, it is also necessary to determine whether the key in the first trigger mode and / or the seventh trigger mode is in the sixth trigger mode;
[0326] If so, the corresponding switch 10241 is switched to the on action (i.e., the output is turned on);
[0327] Otherwise, the control action of the corresponding switch 10241 is determined according to the specific state of the fourth trigger mode. Fig.20d As shown, if the fourth trigger mode is in state one, the corresponding switch 10241 performs a disconnection action; if the fourth trigger mode is in state two, the corresponding switch 10241 continues the control action before power failure; if the fourth trigger mode is in state three, the corresponding switch 10241 performs a connection action.
[0328] It can be seen that in this embodiment, the priority relationship of each trigger mode when the switch device 102 is powered off and restarted is given to ensure that when the switch device 102 has multiple trigger modes at the same time, the switch 10241 can perform the control action as expected when the power is cut off and then powered on.
[0329] It is also worth mentioning that although state one and state three of the fourth trigger mode require all switchgear 10241 to perform disconnection and connection actions respectively, their priority is lower. When the switch device 102 turns on other trigger modes at the same time, other trigger modes will be given priority, especially the fifth trigger mode, which will be considered first.
[0330] In addition, after the processing module 1025 determines the specific control action of each switch 10241, it will send an inter-control message to the outside. The inter-control message carries at least the current working status of the switch device 102 (for example, including the on-off action status of each switch 10241, the status of each indicator light, etc.), so that the switch device 102 that has established an inter-control relationship with the switch device 102 through pairing in advance can synchronize the working status.
[0331] In addition, for the processing module 1025 involved in the above-mentioned embodiments, it controls the general operation of the switch device 102 and performs management functions related to other devices in the network (such as load devices 106, smart 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, capable of executing any type of commands, instructions, algorithms, or software for controlling the operation and functions of the switch device 102 according to the embodiments described in the present disclosure. The module can be various implementations of a digital circuit system, an analog circuit system, or a mixed signal (a 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 portion or circuit of a separate processor core, an entire processor core, a separate processor, a programmable hardware device such as a field programmable gate array (FPGA), and / or a system including multiple processors.
[0332] like Fig.21 As shown, a schematic diagram of a specific implementation hardware of a switch device 102 is given. In this embodiment, the processing module 1025 adopts a Bluetooth module MHCB12G-B integrated with a Bluetooth communication module 1026. Fig.21 In the example, J3 is used as the control output port 1023 for connecting the control line. J1 and J2 are used as the power input port 1022 for receiving the 220V industrial frequency AC power. The industrial frequency AC power is rectified by the rectifier circuit (e.g., rectifier bridge) and outputs 5V power through the power conversion circuit (e.g., 220V~5V transformer), and further outputs 3.3V power through the step-down circuit (e.g., BL1117 power conversion) to power other circuits.
[0333] Relay K1 is used as a switch 10241 connected to the control module 1024, wherein K1 is powered by a 5V power supply, pin 2 is connected to the live wire terminal J1 of the power access port 1022 as one end of the switch 10241, and pin 5 is connected to the control output port 1023J3 as the other end of the switch 10241. Pins 2 and 5 in K1 can be controlled to switch on and off. When it is connected, the switch 10241 is connected, and when it is disconnected, the switch 10241 is disconnected. D4 is connected to both ends of the coil of relay K1 as its discharge diode. Transistor Q3 and resistors R8 and R11 form a driving circuit for driving the switch 10241, and the Bluetooth module MHCB12G-B controls it through I / O4 to control the connection and disconnection of K1 in the switch 10241. The two lamp beads of the two-color light-emitting diode LED2 are used as indicator lights of the light-emitting unit. The Bluetooth module MHCB12G-B controls its light-emitting state through I / O1 and I / O2 to realize the change of the light-emitting unit indication state. One end of the electronic switch SW2 is grounded, and the other end is respectively connected to the 3.3V power supply and the I / 03 port of the Bluetooth module MHCB12G-B. SW2 is set corresponding to the button of the user interaction module 1021. The button pressing operation triggers SW2 to turn on, and the release operation triggers SW2 to turn off. When SW2 is turned on, a low-level electrical signal is transmitted to the I / O3 port of the Bluetooth module MHCB12G-B. When SW2 is disconnected, a high-level electrical signal is transmitted to the I / O3 port of the Bluetooth module MHCB12G-B. The Bluetooth module MHCB12G-B recognizes the operation applied to the button through the change of the electrical signal of the I / O3 port.
[0334] like Fig. 22 As shown, an embodiment of the present disclosure further provides a switch device control method 400, comprising steps S20-S22.
[0335] In step S20, the user operation is obtained.
[0336] In step S21, when it is determined that a designated operation is received, a control action opposite to the current control action is switched; wherein different control actions correspond to different control states of the load circuit of the switch device;
[0337] In step S22, the reverse control action is maintained for a specified time and then restored to the original control action.
[0338] In some embodiments, before switching to a control action opposite to the current control action, the control method further includes:
[0339] Get setting instructions; the setting instructions can be set manually and / or automatically according to the load type
[0340] Determine the corresponding designated time according to the setting instruction;
[0341] In some embodiments, the restoration to the original control action specifically includes: automatically restoring to the original control action.
[0342] In some embodiments, the specified operation includes a press operation and a release operation applied to a button of a switch device; wherein:
[0343] 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 in proportion to the interval time.
[0344] In some embodiments, when the designated time changes in proportion to the interval time, the designated time is adjusted in proportion to the length of the interval time.
[0345] In some embodiments, the switching to a control action opposite to the current control action specifically includes:
[0346] Switch to the disconnection action opposite to the current connection action;
[0347] 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.
[0348] In some embodiments, the method further comprises:
[0349] Detect whether an operation is applied;
[0350] 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;
[0351] According to the determined target key, determining a target mapping relationship matching the target key from the latest multiple mapping relationships;
[0352] The switch defined by the control target mapping relationship executes the corresponding control action.
[0353] 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.
[0354] like Fig.23As shown, an embodiment of the present disclosure further provides a switch device control method 500, comprising steps S30-S31.
[0355] Wherein, in step S30, in response to the first operation applied by the user in the second trigger mode, the corresponding first event information is immediately sent outward to trigger the network function;
[0356] In step S31, if the removal of the first operation is detected within a first time period after the first operation is applied, a control signal is generated to trigger a local function.
[0357] In some embodiments, the method further comprises:
[0358] If it is detected that the key is first pressed for a first time and then released after a first time period, no control signal is generated; wherein the first time period is 100ms to 3 seconds, such as 300ms to 1000ms, preferably 500ms.
[0359] In some embodiments, the first operation includes a press operation applied to a button of a switch device; the method specifically includes:
[0360] In response to a key press operation, immediately sending corresponding first event information externally;
[0361] If a release operation is detected within a first time period after the press operation, a control signal is generated.
[0362] In some embodiments, the method further comprises:
[0363] In response to multiple consecutive press operations and release operations being applied within a first time period, one of the release operations is selected to trigger a control signal, while the other press operations and release operations do not trigger a control signal.
[0364] In some embodiments, the method further comprises:
[0365] Within the first time period after the key is detected to be pressed for the first time, if the key is released and pressed at least once again, other press operations and release operations except the first release operation will not trigger a control signal.
[0366] In some embodiments, the method further comprises:
[0367] In the third trigger mode, in response to a continuous pressing operation and releasing operation applied within the first time period, the control signal is generated again after the first time period, and the corresponding first event information is sent externally;
[0368] In the third trigger mode, in response to multiple consecutive press operations and release operations within the first time period, corresponding second event information is sent externally without generating a control signal;
[0369] and / or,
[0370] In the third trigger mode, in response to a press operation being applied and maintained for more than a first time period, third event information is sent externally without generating a control signal;
[0371] The second trigger mode and the third trigger mode are switched in response to a switching instruction, and the switching instruction originates from an application program.
[0372] In some embodiments, the method further comprises:
[0373] Before, after or at the same time as the first operation is detected and the corresponding first event information is immediately sent out, if an operation that meets the first specific condition is applied within a first time period after the first operation is detected, the pre-configuration mode is entered;
[0374] In the pre-configuration mode, detecting whether an operation that meets the second specific condition is applied; if so, entering the configuration mode;
[0375] In the configuration mode, predetermined indication information is sent outwardly, at least characterizing the switch device, so that an external network device can search for the indication information and add the switch device to the network.
[0376] In some embodiments, the method further comprises:
[0377] In the second trigger mode, before, after or simultaneously with entering the pre-configuration mode, a corresponding control signal is also generated in response to the first operation being applied for the first time.
[0378] In some embodiments, the method further comprises:
[0379] Allowing the trigger mode to be set independently between each button of the switch device; and,
[0380] In response to the switching instruction, the second trigger mode and the third trigger mode corresponding to any key are switched.
[0381] In some embodiments, the method further comprises:
[0382] Detect whether an operation is applied;
[0383] 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;
[0384] According to the determined target key, determining a target mapping relationship matching the target key from the latest multiple mapping relationships;
[0385] The switch defined by the control target mapping relationship executes the corresponding control action.
[0386] 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.
[0387] In the description of this specification, the description with reference to the terms "some embodiments", "a specific implementation", "a specific implementation process", "an example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic expressions of the above terms corresponding to the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in an appropriate manner.
[0388] It should also be noted that the above-mentioned embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments, that is, the technical solutions disclosed in the later (order of sequence recorded in the text) embodiments should include the technical solutions recorded in the embodiment and the technical solutions recorded in all embodiments before the embodiment.
[0389] 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to 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, including buttons, for receiving user operations; Power access port, used to connect the power cord; Control output port, used to connect the control line; A connection control module, including a switch disposed between the power input port and the control output port, 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; An indication module having light-emitting units corresponding to the keys of the user interaction module, each light-emitting unit having at least two indication states; A processing module is electrically connected to the user interaction module, the connection control module and the indication module, and the processing module is configured to have a virtual output mode, so as to be suitable for: Before entering the virtual output mode, the indication state of the corresponding light-emitting unit is changed in response to the operation of the key, and the control action of the corresponding switch is switched, so that the control state of the corresponding load circuit is indicated by the indication state of each light-emitting unit; After entering the virtual output mode, the indication state of the corresponding light emitting unit is controlled to change in response to the operation change of the key, and the control action of the switch remains unchanged.
2. The switchgear according to claim 1, characterized in that The processing module is further configured to: In the virtual output mode, after the indication state of the corresponding light-emitting unit changes in response to the operation of the key, a control message is generated according to the indication state of the light-emitting unit after the change; The control message is sent so that: the smart device that has established a pairing relationship with the switch device in advance receives the control message and controls its own working state based on the indicated state obtained by parsing.
3. The switchgear according to claim 2, characterized in that The processing module is also configured to have: The second trigger mode is suitable for: After detecting a first operation applied to the user interaction module, immediately sending corresponding first event information externally; If it is detected that the first operation is removed within a first time period after the first operation is applied to the user interaction module, a control signal is generated; and / or, The third trigger mode is suitable for: If it is detected that the key is pressed and released once continuously within the first time period, a control signal is sent to the connection control module again after the first time period, and corresponding first event information is sent externally; Wherein, the first event information is used to trigger a preset network function, and the control signal is used to trigger the connection control device to execute a local function; The processing module sends the first event information through a first communication protocol and sends the control message through a second communication protocol; the first communication protocol is different from the second communication protocol, wherein the first communication protocol is used for network communication and the second communication protocol is used for local communication.
4. The switchgear according to claim 3, characterized in that In the second trigger mode or the third trigger mode, the processing module controls the corresponding light-emitting unit to form a first indication state after sending the corresponding first event information to the outside; In the virtual output mode, when the processing module detects a press operation or a continuous press and release operation applied to the button, the processing module maintains the original control action of the corresponding switch unchanged, instructs the corresponding light-emitting unit to form a second indication state, and sends a control message carrying the second indication state to the outside through the second communication protocol to trigger the smart device that has been paired in advance to switch the working state.
5. The switchgear according to claim 4, characterized in that The first communication protocol may be any one of Wi-Fi, ZigBee, and BLE Mesh; the second communication protocol may be a custom private communication protocol.
6. The switchgear according to any one of claims 1 to 5, characterized in that: The processing module is also configured to have: The sixth trigger mode is suitable for: The switch corresponding to the key will remain in the on state and will not be disconnected due to the key operation; and / or, The seventh trigger mode is suitable for: After recognizing the operation applied to the button, a preset wireless signal is sent outward, and the wireless signal is used to trigger the network function; The processing module is also configured to automatically enter the virtual output mode after entering the sixth trigger mode and / or the seventh trigger mode and completing pairing with the corresponding smart device.
7. The switchgear according to claim 6, characterized in that The processing module is further configured to switch the corresponding switch to a connection action when entering the seventh trigger mode, or to maintain the original control action of the switch; and / or, When entering the sixth trigger mode, the corresponding switch is switched to the on action.
8. The switchgear according to claim 6, characterized in that The processing module is also configured to have: The fourth trigger mode is suitable for: Set the control action that the switchgear should perform when it is powered on again after being powered off; and, The fifth trigger mode is suitable for: In response to an operation applied to a key, the corresponding switch is switched to an on action, and if there is a switch that is originally in an on action, the switch that is originally in an on action is switched to an off action; The processing module is further configured to: When it is determined that the switch device is restarted due to power failure and power on, further determining whether it is in the fifth trigger mode; If yes, then: Switch all switches connected to the control module to the OFF position; or, Further determining the control action of each switch connected to the control module according to the specific state of the fourth trigger mode; If not, the switches corresponding to the buttons in the first trigger mode and / or the seventh trigger mode are further switched to the on action, and the control actions of the remaining switches are determined according to the specific state of the fourth trigger mode.
9. The switchgear according to claim 8, characterized in that Before switching the switch corresponding to the button in the first trigger mode and / or the seventh trigger mode to the on action, it is also necessary to determine whether the button in the first trigger mode and / or the seventh trigger mode is in the sixth trigger mode. If so, the corresponding switch is switched to the on action; otherwise, the control action of the corresponding switch is determined according to the specific state of the fourth trigger mode.
10. The switchgear according to claim 9, characterized in that In the fourth trigger mode, when the power is turned off and then on, the switch is set to one of the following three states: State 1: The switch performs disconnection action; State 2: The switch continues the control action before power failure; State three: The switch performs the connection action.
11. The switchgear according to claim 1, characterized in that The connection control module has a plurality of switches, one end of each switch is directly or indirectly electrically connected to the power input port, and the other end is connected to a plurality of independent control output ports; the user interaction module includes a plurality of buttons; 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.
12. A control system, characterized in that: Comprising a switch device as claimed in any one of claims 1 to 11.