Control method and device of intelligent switch, intelligent switch and storage medium
By configuring the smart switch to operate in multiple modes, including single-control and smart modes, and enabling instant control with a single click in single-control mode, the latency problem of the smart switch in single-control devices is solved, the mode switching is simplified, and the cost is reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN LUMIUNITED TECH CO LTD
- Filing Date
- 2020-08-17
- Publication Date
- 2026-04-21
AI Technical Summary
Existing smart switches have a delay in responding to touch commands when controlling a single smart device, especially after a single click, they need to wait for the next trigger action to execute the control function.
The smart switch is configured to operate in at least two modes, including single-control mode and smart mode. It determines whether the current mode is the same as the target mode by acquiring mode switching instructions, and switches to single-control mode when needed to realize the instant control of the power supply circuit by clicking.
It solves the latency problem of smart switches in single-control smart devices, enabling control commands to be executed immediately after a single click without waiting for the next trigger, simplifying the mode switching process and reducing user costs.
Smart Images

Figure CN114079443B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart home technology, specifically to a control method, device, smart switch, and storage medium for a smart switch. Background Technology
[0002] Currently, smart switches have improved upon the limitations of traditional wall switches, which suffer from fixed locations, complex wiring, and limited functionality. Existing smart switches can achieve intelligent control of smart devices, providing users with diverse experiences. Intelligent control of smart devices is typically achieved through various trigger actions, such as double-clicking, multi-clicking, and long-pressing. Therefore, after each trigger, the smart switch needs to wait for a period of time to determine if there will be a next trigger. If there is, it executes the control function corresponding to that trigger action, but this still presents shortcomings in control efficiency. Summary of the Invention
[0003] In view of the above problems, this application provides a control method, device, smart switch, and storage medium for a smart switch to solve the above technical problems.
[0004] In a first aspect, embodiments of this application provide a control method for a smart switch. The smart switch is configured to operate in at least two operating modes, including a single-control mode where the smart switch controls the on / off state of the power supply circuit of a smart device based on a click action. The method includes acquiring a mode switching instruction, which includes target operating mode information; determining whether the current operating mode of the smart switch is the same as the target operating mode; and if the current operating mode is different from the target operating mode, switching the current operating mode to the target operating mode so that the smart switch operates in the target operating mode.
[0005] Secondly, embodiments of this application provide a control device for a smart switch. The smart switch is configured to operate in at least two operating modes, including a single-control mode where the smart switch controls the on / off state of the power supply circuit of a smart device based on a click action. The device includes an acquisition module, a judgment module, and a switching module. The acquisition module is used to acquire a mode switching instruction, which includes target operating mode information. The judgment module is used to determine whether the current operating mode of the smart switch is the same as the target operating mode. The switching module is used to switch the current operating mode to the target operating mode if the current operating mode is different from the target operating mode, so that the smart switch operates in the target operating mode.
[0006] Thirdly, embodiments of this application provide a smart switch, which includes a processor and a memory, wherein one or more programs are stored in the memory and configured to be executed by the processor to implement the control method of the smart switch described above.
[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing program code, wherein the program code is executed by a processor to perform the control method of any of the above-mentioned smart switches.
[0008] Compared to existing technologies, the smart switch control method, device, smart switch, and storage medium provided in this application embodiment configure the smart switch to operate in at least two operating modes, including a single-control mode. In the single-control mode, the smart switch is triggered once by a single click, thereby controlling the power supply circuit of the controlled smart device to connect or disconnect once. The method includes acquiring a mode switching instruction, which includes target operating mode information; and determining whether the current operating mode of the smart switch is the same as the target operating mode. If the current operating mode is different from the target operating mode, the current operating mode is switched to the target operating mode, causing the smart switch to operate in the target operating mode. The smart switch control method provided in this application embodiment solves the latency problem in responding to touch commands when the smart switch is controlled by a single click in the single-control mode, as the smart switch does not need to wait for the next trigger action after being triggered by a single click.
[0009] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A schematic diagram of a network system provided in an embodiment of this application is shown.
[0012] Figure 2 A flowchart illustrating a control method for an intelligent switch provided in an embodiment of this application is shown.
[0013] Figure 3 A flowchart illustrating another intelligent switch control method provided in an embodiment of this application is shown.
[0014] Figure 4A flowchart illustrating another intelligent switch control method provided in an embodiment of this application is shown.
[0015] Figure 5 A flowchart illustrating another intelligent switch control method provided in an embodiment of this application is shown.
[0016] Figure 6 A flowchart illustrating another intelligent switch control method provided in an embodiment of this application is shown.
[0017] Figure 7 A block diagram of a control device for an intelligent switch provided in an embodiment of this application is shown.
[0018] Figure 8 A block diagram of a smart switch provided in an embodiment of this application is shown.
[0019] Figure 9 A block diagram of a computer-readable storage medium provided in an embodiment of this application is shown. Detailed Implementation
[0020] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0021] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.
[0022] Terminology Explanation
[0023] Polling Time: In smart home devices, the smart control module is always powered. To save energy, it is typically set to a sleep mode where it is constantly in a dormant state without triggering and wakes up periodically. Each time the smart control module is woken up, it remains dormant for a period of time. During this wake-up period, the module actively reports information to the gateway to inquire whether any commands were sent from the cloud during its sleep period. If so, the gateway sends the command to the smart control module for execution. This process of the smart control module inquiring about commands from its sleep period during the wake-up period is called the "polling" process, and this wake-up period is the polling time.
[0024] First, the application environment of the control method, device, smart switch, and storage medium of the smart switch provided in the embodiments of this application will be introduced.
[0025] like Figure 1 As shown, Figure 1 A network system 10 is used in the control method for the smart switch provided in this application embodiment. The network system 10 includes: a mobile terminal 11, a server 12, a gateway 13, a smart switch 14, and a smart wall switch 15. The mobile terminal 11 can be any device with communication and storage functions, such as a smartphone, desktop computer, laptop computer, tablet computer, or other smart communication device with network connectivity. The mobile terminal 11 stores a control terminal (which can be an application terminal, such as a mobile APP; or a web terminal) for managing the smart switch 14 and user accounts that can be logged into the control terminal. The server 12 can be a network access server, database server, cloud server, etc. Optionally, the gateway 13 is built based on the ZigBee protocol.
[0026] Optionally, both the mobile terminal 11 and the gateway 13 can communicate with the server 12, and the mobile terminal 11 and the gateway 13 can store the acquired information on the server 12. For example, the mobile terminal 11 and the gateway 13 can establish a network connection with the server 12, and then send data to the server 12 or obtain data sent by the server 12; the smart switch 14 can establish a network connection with the gateway 13 based on the ZigBee protocol, thereby joining the ZigBee network. At the same time, the smart switch 14 can be connected to the smart wall switch 15, and the linkage between the smart switch 14 and the smart wall switch 15 can realize intelligent control of smart devices.
[0027] In existing technologies, smart switch 14 and smart wall switch 15 are linked through various trigger actions to achieve intelligent control of smart devices. These various trigger actions include double-clicking, multi-clicking, and long-pressing. Therefore, after each trigger, smart switch 14 needs to wait for a period of time to determine if there will be a next trigger. If there is a next trigger, the control function corresponding to that trigger action is executed. When the user controls the smart device individually, similar to the traditional wall switch control method, a single click triggers the smart switch to control the power supply circuit of the smart device once. In this traditional control method, the smart switch still waits for the next trigger action after being triggered by a single click, causing a delay in the smart switch 14's response to touch commands. This results in a control delay problem when controlling a smart device individually. Specifically, when the user controls the smart device individually, the controlled device will delay its action after a single click triggers smart switch 14.
[0028] The inventors, through research, have proposed a control method, device, smart switch, and storage medium for a smart switch according to embodiments of this application. The smart switch is configured to operate in at least two operating modes, including a single-control mode where the power supply circuit of a smart device is controlled based on a single click action. The method includes acquiring a mode switching instruction, which includes target operating mode information; determining whether the current operating mode of the smart switch is the same as the target operating mode; and if the current operating mode is different from the target operating mode, switching the current operating mode to the target operating mode, thus enabling the smart switch to operate in the target operating mode. The control method for the smart switch provided in this application solves the latency problem in responding to touch commands when the smart switch is in single-control mode by switching its operating mode. When switched to single-control mode, the smart switch does not need to wait for the next trigger action after being triggered once, thereby resolving the latency problem in responding to touch commands when the smart switch is controlling a smart device in a single-control manner.
[0029] like Figure 2 As shown, Figure 2 A flowchart of a control method 100 for a smart switch according to an embodiment of this application is shown. This control method 100 can be applied to the aforementioned network system 10. Further, the smart switch is configured to operate in at least two operating modes, including a single-control mode. In single-control mode, the smart switch only recognizes a single-click action. In single-control mode, the use of the smart switch is consistent with a traditional wall switch; that is, a single click triggers the smart switch, immediately connecting or disconnecting the power supply circuit of the controlled smart device. In this embodiment, the smart switch may also include a smart mode. In smart mode, the smart switch waits for a certain period of time after being triggered to recognize diverse trigger actions. In smart mode, the user can achieve intelligent control of the smart device by the smart switch through diverse trigger actions, including but not limited to double-click, multi-click, and long-press.
[0030] In this embodiment, the control method 100 for the smart switch can switch the operating mode of the smart switch between the single-control mode and the smart mode described above. The control method 100 for the smart switch may include the following steps S110 to S130.
[0031] Step S110: Obtain the mode switching command.
[0032] In this embodiment, the smart switch can obtain a mode switching instruction from the server. This instruction instructs the smart switch to switch its operating mode. Specifically, the mode switching instruction includes target operating mode information, and instructs the smart switch to switch its current operating mode to the target operating mode.
[0033] Step S120: Determine whether the current working mode of the smart switch is the same as the target working mode.
[0034] After receiving a mode switching command, the smart switch determines whether its current operating mode is the same as the target operating mode. In this embodiment, when the target operating mode is single-control mode, it determines whether the current operating mode is single-control mode; when the target operating mode is smart mode, it determines whether the current operating mode is smart mode.
[0035] In this embodiment, when the current working mode is the same as the target working mode, there is no need to switch the current working mode. When the current working mode is different from the target working mode, step S130 can be executed.
[0036] Step S130: Switch the current working mode to the target working mode.
[0037] If the current operating mode differs from the target operating mode, the current operating mode is switched to the target operating mode, causing the smart switch to operate in the target operating mode. In this embodiment, when the current operating mode is smart mode and the target operating mode is single-control mode, the smart mode is switched to single-control mode; when the current operating mode is single-control mode and the target operating mode is smart mode, the single-control mode is switched to smart mode. The control method of the smart switch in this embodiment can switch the operating mode of the smart switch. When the operating mode of the smart switch is switched to single-control mode, only a single click action is supported to trigger the control of the smart device. Therefore, the smart switch does not need to wait for the next trigger action after being triggered, thus solving the delay problem of the smart switch responding to touch commands when controlling a smart device in a single-control mode.
[0038] The control method for a smart switch provided in this application embodiment is configured to operate in at least two operating modes, including a single-control mode. In the single-control mode, the power supply circuit of a smart device is controlled to be switched on or off based on a single click action. The method includes acquiring a mode switching command, which includes target operating mode information; determining whether the current operating mode of the smart switch is the same as the target operating mode; and if the current operating mode is different from the target operating mode, switching the current operating mode to the target operating mode, thus enabling the smart switch to operate in the target operating mode. The control method for a smart switch provided in this application embodiment solves the latency problem in responding to touch commands when the smart switch is in single-control mode by switching its operating mode. When switched to single-control mode, the smart switch does not need to wait for the next trigger action after being triggered by a single click, thereby solving the latency problem in responding to touch commands when the smart switch is controlling a smart device.
[0039] like Figure 3As shown, this application embodiment also provides a control method 200 for a smart switch, which can be applied to the aforementioned network system 10. Specifically, the control method 200 for the smart switch can be implemented through interaction between a mobile terminal, a server, and the smart switch in the aforementioned network system 10. The control method 200 for the smart switch may include the following steps S210 to S270. Similarly, the smart switch is configured to operate in at least two operating modes, and the at least two operating modes include a single-control mode, which will not be described in detail here.
[0040] Step S210: Send the first mode switching request.
[0041] In this embodiment, the mobile terminal sends a first mode switching request to the server. Specifically, the user can send the first mode switching request to the server through a control terminal stored in the mobile terminal.
[0042] In this embodiment, the control terminal can store all operating mode information of the smart switch and display associated information. This associated information is displayed by the control terminal and used to characterize the operating mode of the smart switch. For example, when the current operating mode of the smart switch is single-control mode, the associated information is also displayed as single-control mode. When the user needs to switch the operating mode of the smart switch, the user can select the target operating mode in the control terminal to switch. At this time, the control terminal generates a first mode switching request based on the target operating mode and sends the first mode switching request to the server.
[0043] Step S220: Send mode switching command.
[0044] In this embodiment, after receiving the first mode switching request sent by the mobile terminal, the server generates a mode switching instruction and sends the instruction to the smart switch. Specifically, the server sends the mode switching instruction to the gateway, which then sends it to the smart switch.
[0045] Step S230: Obtain the mode switching instruction.
[0046] In this embodiment, the smart switch can obtain a mode switching command from the gateway. It is worth noting that when the gateway receives a mode switching command from the server, the smart control module in the smart switch may be in a sleep state. In this sleep state, the smart control module cannot automatically obtain the command from the gateway. Therefore, in order to obtain the mode switching command in a timely manner, the smart switch can respond to a trigger command and obtain the mode switching command based on the trigger command. This trigger command is a touch command applied to the smart switch. This touch command can be generated when a user touches the switch. In this embodiment, the touch action may include, but is not limited to, button presses, touch gestures, and other gestures on the smart switch. Specifically, the user can use a touch action on the smart switch to make it actively obtain a mode switching command from the gateway. When the smart control module in the smart switch is in a sleep state, a touch action can wake the smart control module from its sleep state and allow it to actively obtain the mode switching command from the gateway. In some implementations, after waking the smart control module through a touch action and obtaining the mode switching command, the smart control module can re-enter a sleep state.
[0047] Furthermore, the touch action for triggering the smart switch to acquire the mode switching command can be different from the touch action for controlling the smart switch. For example, the touch action for triggering the smart switch to acquire the mode switching command can be, but is not limited to, clicking a button a certain number of times within a specified time, or pressing and holding a button for a certain duration.
[0048] In some implementations, the smart switch can obtain mode switching instructions during the polling period. That is, it obtains mode switching instructions from the gateway during the period when the smart control module is automatically woken up.
[0049] Step S240: Determine whether the current working mode of the smart switch is the same as the target working mode.
[0050] In this embodiment, after receiving the mode switching command, the smart switch determines whether its current operating mode is the same as the target operating mode in order to verify its own operating mode. This step is detailed in step S120 and will not be repeated here.
[0051] Step S250: Switch the current working mode to the target working mode.
[0052] In this embodiment, when the current operating mode of the smart switch differs from the target operating mode, the smart switch switches the current operating mode to the target operating mode. Further details of this step can be found in step S130, and will not be repeated here.
[0053] Step S260: Send the switched working mode information according to the switched working mode.
[0054] In this embodiment, the switched operating mode is the same as the target operating mode described above. After switching operating modes, the smart switch generates switched operating mode information based on the switched operating mode and reports this switched operating mode information to the server through the gateway.
[0055] Step S270: Send the switched working mode information.
[0056] In this embodiment, when the server receives the working mode information of the smart switch after switching, it sends the switched working mode information to the mobile terminal. After receiving the switched working mode information, the mobile terminal can then confirm that the current working mode of the smart switch has been switched to the target working mode, thereby updating the associated information of the mobile terminal. For example, if the current working mode of the smart switch is smart mode, the associated information displayed by the mobile terminal is also smart mode; after the smart switch switches from smart mode to single-control mode, the mobile terminal will also randomly update the associated information to single-control mode.
[0057] The smart switch control method provided in this embodiment enables switching the smart switch's operating mode via a mobile terminal. The smart switch's operating mode includes at least a single-control mode. When the smart switch is switched to single-control mode, it does not need to judge various trigger actions during use. Therefore, after each trigger, it does not need to wait for the next trigger but can directly execute the trigger command, thus solving the latency problem of the smart switch responding to touch commands when controlling a single smart device. Furthermore, the smart switch obtains the mode switching command issued by the server through the user's trigger operation, further eliminating the latency caused by the smart switch waiting for polling time to automatically obtain the mode switching command. Simultaneously, this smart switch control method does not require changes to the smart switch's hardware structure, reducing the risk of smart switch damage, simplifying the smart switch mode switching process, and reducing user costs.
[0058] like Figure 4 As shown, this application embodiment also provides a control method 300 for a smart switch, which can be applied to the aforementioned network system 10. Specifically, the control method 300 for the smart switch can be implemented through interaction between the smart switch in the network system 10 and the server. The control method 300 for the smart switch may include the following steps S310 to S370. Similarly, the smart switch is configured to operate in at least two operating modes, and the at least two operating modes include a single-control mode, which will not be described in detail here.
[0059] Step S310: Upon receiving a touch action, generate a second mode switching request based on the touch action.
[0060] In this embodiment, when the smart switch receives a touch action, it generates a second mode switching request based on the touch action. This second mode switching request includes touch state information corresponding to the touch action. For example, when a user double-clicks the smart switch, the smart switch can generate a second mode switching request that includes the double-click touch state.
[0061] Step S320: Send a second mode switching request.
[0062] In this embodiment, the smart switch sends a second mode switching request to the gateway, which then forwards the request to the server. It can be understood that sending this second mode switching request to the server also means sending the smart switch's current touch state information to the server.
[0063] Step S330: Determine the target working mode based on the correspondence between the touch action and the working mode of the smart switch, and generate a mode switching command.
[0064] The server determines the target working mode based on the preset correspondence between touch actions and the working modes of smart switches.
[0065] The server can store multiple preset and different touch actions in the cloud, each of which corresponds to a working mode of the smart switch. When a user touches the smart switch, the server identifies whether the touch action is one of the preset touch actions. If it is, it means that the user wants to switch to a different working mode. At this point, the server can determine the working mode corresponding to the touch action, which is the target working mode that the user wants to switch to.
[0066] In some implementations, each operating mode of the smart switch can correspond to at least two touch actions. For example, the single-control mode can correspond to a first touch action and a second touch action; the smart mode can correspond to a third touch action and a fourth touch action. When the user uses either the first or second touch action, the target operating mode is determined to be the single-control mode; when the user uses either the third or fourth touch action, the target operating mode is determined to be the smart mode. This makes switching the operating modes of the smart switch more flexible.
[0067] In some implementations, when a smart switch is configured with two operating modes, the target operating mode is determined based on the same touch action. For example, assuming the smart switch has two operating modes: single-control mode and smart mode, in smart mode, when the user needs to switch the smart switch between operating modes, the target operating mode is determined to be single-control mode based on the first touch action; similarly, in single-control mode, when the user needs to switch the smart switch between operating modes, the target operating mode is determined to be smart mode based on the first touch action. This simplifies switching the smart switch's operating modes and reduces the user's memory burden.
[0068] In some implementations, when a smart switch is configured with two operating modes, the target operating mode is determined based on different touch actions. For example, assuming the smart switch has two operating modes: single-control mode and smart mode, in smart mode, when a user needs to control the smart device to switch operating modes, the target operating mode is determined to be single-control mode based on a first touch action; in single-control mode, when a user needs to control the smart switch to switch operating modes, the target operating mode is determined to be smart mode based on a second touch action, where the first touch action and the second touch action are two different touch actions. Therefore, the first touch action can be a device control touch action in single-control mode; the second touch action can be a device control touch action in smart mode. For example, the first touch action is a single click. In single-control mode, a single click on the smart switch controls the smart device. However, in smart mode, it's unnecessary to control the smart device by clicking the smart switch; in this case, a single click can be used to switch the operating mode, with the target operating mode set to single-control mode. The second touch action is a double click. In smart mode, a double click on the smart switch controls the smart device. However, in single-control mode, it's unnecessary to double click the smart switch; in this case, a double click can be used to switch the operating mode, with the target operating mode set to smart mode. Therefore, this method of reusing touch actions from both operating modes not only avoids button conflicts but also saves touch action resources and reduces the user's memory burden by not generating additional touch actions.
[0069] In some implementations, when the smart switch is configured with more than two operating modes, all operating modes are sorted, and the target operating mode is determined cyclically based on the same touch action. Assuming the smart switch is configured to operate in three modes, these three modes are sorted as a first operating mode, a second operating mode, and a third operating mode. In the first operating mode, the smart switch can switch operating modes based on a first touch action and determine the target operating mode as the second operating mode; in the second operating mode, the smart switch can similarly switch operating modes based on a first touch action and determine the target operating mode as the third operating mode; in the third operating mode, the smart switch can still switch operating modes based on a first touch action and determine the target operating mode as the first operating mode. This simplifies the smart switch mode switching process.
[0070] It is worth noting that the touch actions in the above embodiments can all be operated through the original buttons of the smart switch. Since the smart switch only recognizes single-click actions in single-control mode, the mode switching can be completed by acquiring the number of multiple single-click actions during the process of switching from single-control mode to other modes. In some embodiments, an additional physical button can also be added to the smart switch to perform the touch actions in the above embodiments through the additional physical button, and in single-control mode, the physical button is not limited to recognizing only single-click actions.
[0071] In some implementations, step S330 can also be performed by the smart switch itself, that is, the smart switch determines the target operating mode based on the correspondence between the touch action and the smart switch's operating mode. After the smart switch determines the target operating mode, it can complete the mode switching without querying the server in subsequent processes. Of course, the smart switch can also report the mode switching status to the server to ensure the execution of the user's touch action after the mode switch.
[0072] Step S340: Send mode switching command.
[0073] In this embodiment, after receiving the mode request sent by the gateway, the server generates a mode switching instruction and sends the mode switching instruction to the gateway, so that the gateway can send the mode switching instruction to the smart switch.
[0074] Step S350: Obtain the mode switching instruction.
[0075] In this embodiment, the smart switch obtains the mode switching command from the gateway, and the specific details can be found in step S230, which will not be repeated here.
[0076] Step S360: Determine whether the current working mode of the smart switch is the same as the target working mode.
[0077] In this embodiment, after receiving the mode switching command, the smart switch determines whether its current operating mode is the same as the target operating mode in order to verify its own operating mode. This step is detailed in step S120 and will not be repeated here.
[0078] Step S370: Switch the current working mode to the target working mode.
[0079] In this embodiment, when the current operating mode differs from the target operating mode, the smart switch switches the current operating mode to the target operating mode. Further details of this step can be found in step S130, and will not be repeated here.
[0080] Step S380: Send the switched working mode information according to the switched working mode.
[0081] In this embodiment, the switched operating mode is the same as the target operating mode described above. After switching operating modes, the smart switch generates switched operating mode information based on the switched operating mode and reports this switched operating mode information to the server through the gateway.
[0082] The smart switch control method provided in this embodiment can switch the operating mode of the smart switch by triggering the smart switch. The operating mode of the smart switch includes at least a single-control mode. When the operating mode of the smart switch is switched to single-control mode, the smart switch does not need to judge the multi-functional trigger action during use. Therefore, after each trigger, it does not need to wait for the next trigger but can directly execute the trigger command, thus solving the latency problem of the smart switch responding to touch commands when controlling a single smart device. Furthermore, switching the operating mode of the smart switch by triggering the touch action of the smart switch instead of switching the operating mode through a mobile terminal simplifies the mode switching steps and saves time. Moreover, it can also complete the switching of the smart switch's operating mode in network failure states, gateway external network disconnection states, and situations where the mobile terminal cannot control the smart device, improving the efficiency of switching the smart switch's operating mode.
[0083] like Figure 5 As shown, this application embodiment also provides a control method 400 for a smart switch, which can be applied to the aforementioned network system 10. Specifically, the control method 400 for the smart switch can be implemented through interaction between the smart switch, the server, and the mobile terminal in the aforementioned network system 10. The control method 400 for the smart switch may include the following steps S410 to S494. Similarly, the smart switch is configured to operate in at least two operating modes, and the at least two operating modes include a single-control mode, which will not be described in detail here.
[0084] Step S410: Upon receiving a touch action, generate a second mode switching request based on the touch action.
[0085] In this embodiment, this step can be referred to in detail in step S310, and will not be repeated here.
[0086] Step S420: Send a second mode switching request.
[0087] In this embodiment, this step can be referred to in detail in step S320, and will not be repeated here.
[0088] Step S430: Determine the target working mode based on the correspondence between touch actions and the working modes of the smart switch, and generate a mode switching command.
[0089] In this embodiment, this step can be referred to in detail in step S330, and will not be repeated here.
[0090] Furthermore, after generating the mode switching request, the server can execute steps S440 and S450 simultaneously.
[0091] Step S440: Send mode switching command.
[0092] In this embodiment, after receiving the mode request sent by the gateway, the server generates a mode switching instruction and sends the mode switching instruction to the gateway, so that the gateway can send the mode switching instruction to the smart switch.
[0093] Step S441: Obtain the mode switching command.
[0094] In this embodiment, the smart switch obtains the mode switching command from the gateway, and the specific details can be found in step S230, which will not be repeated here.
[0095] Step S442: Determine whether the current working mode of the smart switch is the same as the target working mode.
[0096] In this embodiment, after receiving the mode switching command, the smart switch determines whether its current operating mode is the same as the target operating mode in order to verify its own operating mode. This step is detailed in step S120 and will not be repeated here.
[0097] Step S443: Switch the first current working mode to the target working mode.
[0098] In this embodiment, when the current operating mode differs from the target operating mode, the smart switch switches the current operating mode to the target operating mode. Further details of this step can be found in step S130, and will not be repeated here.
[0099] Step S450: Send the associated information change instruction.
[0100] In this embodiment, the server sends an association information change instruction to the mobile terminal according to the second mode request instruction. This association information change instruction includes the smart switch's operating mode change information, i.e., the target operating mode information. The association information refers to the operating mode of the smart switch displayed on the mobile terminal.
[0101] Step S451: Change the associated information.
[0102] In this embodiment, after receiving the association information change instruction sent by the server, the mobile terminal immediately changes the displayed association information. Specifically, the mobile terminal changes the currently displayed association information to the target working mode.
[0103] Step S452: Send the modified association information.
[0104] In this embodiment, the mobile terminal sends the modified association information to the server.
[0105] Step S453: Verify whether the modified association information is the same as the target working mode.
[0106] In this embodiment, after receiving the association information sent by the mobile terminal, the server verifies whether the modified association information of the mobile terminal is the same as the target working mode. Specifically, it can determine whether the modified association information is the same as the target working mode. If they are different, the server can re-execute step S450 and resend the association information modification instruction to the mobile terminal until the association information of the mobile terminal is the same as the first target mode. This ensures that the association information displayed by the mobile terminal is consistent with the working mode of the smart switch, thereby guaranteeing the accuracy of user operation.
[0107] The smart switch control method provided in this embodiment can switch the working mode of the smart switch by performing a touch action on the smart switch. The working mode of the smart switch includes at least a single-control mode. When the working mode of the smart switch is switched to single-control mode, the smart switch does not need to judge the multi-functional trigger action during use. Therefore, after each trigger, it does not need to wait for the next trigger but can directly execute the trigger command, thus solving the latency problem of the smart switch responding to touch commands when controlling a single smart device. In addition, the server verifies the association information of the mobile terminal to ensure that the association information displayed on the mobile terminal is consistent with the working mode of the smart switch, thereby ensuring the accuracy of user operation.
[0108] like Figure 6As shown in the illustration, this application also provides a control method 500 for a smart switch. This control method 500 can be applied to the smart switch control methods 100, 200, 300, and 400 described above when the smart switch is successfully connected to the network. The smart switch control method 500 can be implemented through interaction between the smart switch, a server, and a mobile terminal, and can include the following steps S510 to S560.
[0109] Step S510: Send initial working mode information.
[0110] In this embodiment, after the smart switch successfully connects to the network, it uploads its initial operating mode information to the gateway, which then sends this information to the server. The initial operating mode refers to the smart switch's current operating mode upon successful network connection.
[0111] Step S520: Determine whether the initial working mode is the same as the preset working mode, and determine whether the current associated information corresponds to the preset working mode.
[0112] The preset operating mode is the mode that the smart switch is pre-set to operate when successfully connected to the network. This preset operating mode can be set automatically by the system or by the user; there are no specific limitations.
[0113] In this embodiment, after receiving the initial working mode, the server determines whether the initial working mode is the same as the preset working mode.
[0114] Furthermore, the current associated information is the current operating mode of the smart switch displayed on the mobile terminal. When the mobile terminal changes the current associated information, it can send the changed associated information to the server, allowing the server to store the current associated information displayed on the mobile terminal. Further, the server can determine whether the current associated information corresponds to a preset operating mode, that is, whether the operating mode of the smart switch represented by the current associated information is the same as the preset operating mode. If the initial operating mode is the same as the preset operating mode, and the current associated information corresponds to the preset operating mode, then it indicates that the current operating mode of the smart switch and the associated information displayed on the mobile terminal are both preset operating modes. In this embodiment, the preset operating mode is the default operating mode after the smart switch is connected to the network, which can be a single-control mode. By determining whether the initial operating mode and the current associated information are both single-control modes, it is ensured that the current operating mode of the smart switch and the associated information displayed on the mobile terminal are both default operating modes, thereby ensuring the consistency between the current operating mode of the smart switch and the associated information displayed on the mobile terminal.
[0115] Furthermore, if the initial working mode differs from the preset working mode, steps S530 to S540 can be executed. If the current associated information does not correspond to the preset working mode, steps S550 to S560 can be executed.
[0116] Step S530: Send a preset mode switching command.
[0117] In this embodiment, if the initial working mode is different from the preset working mode, the server sends a preset mode switching instruction to the smart switch, wherein the preset mode switching instruction includes preset working mode information.
[0118] Step S540: According to the received preset mode switching instruction, switch the initial working mode to the preset working mode.
[0119] In this embodiment, the smart switch can obtain a preset mode switching command during the polling time, or the user can trigger the smart switch to actively obtain the preset mode switching command through a touch action. When the smart switch receives the preset mode switching command, it switches its initial operating mode to the preset operating mode. It is worth noting that after switching the initial operating mode to the preset operating mode, the smart switch re-uploads the current operating mode information to the server so that the server can re-verify the current operating mode of the smart switch to ensure that the current operating mode of the smart switch has been switched to the preset operating mode.
[0120] Step S550: Send the associated information change instruction.
[0121] In this embodiment, if the current device working mode does not correspond to the preset working mode, the server sends an association information change instruction to the mobile terminal, wherein the association information change instruction includes the preset working mode information.
[0122] Step S560: Change the current association information to the preset working mode according to the received association information change instruction.
[0123] In this embodiment, after receiving the association information change instruction, the mobile terminal changes the currently displayed association information to a preset working mode according to the instruction. It is worth noting that after changing the current association information to the preset working mode, the mobile terminal re-uploads the changed association information to the server so that the server re-verifies the current association information displayed by the mobile terminal to ensure that the current device working mode displayed by the client has been changed to the preset working mode.
[0124] The control method for a smart switch provided in this application verifies the current working mode of the smart switch and the current association information displayed on the mobile terminal through a server when the smart switch is successfully connected to the network. This ensures that the current working mode of the smart switch and the association information displayed on the mobile terminal are both the default preset working modes, thereby ensuring the consistency between the current working mode of the smart switch and the association information displayed on the mobile terminal.
[0125] like Figure 7 As shown in the illustration, this application embodiment also provides a control device 600 for a smart switch. The smart switch is configured to operate in at least two operating modes, including a single-control mode. In the single-control mode, each triggering of the smart switch controls the power supply circuit of the controlled smart device to connect or disconnect once. The control device 600 for the smart switch may include an acquisition module 610, a judgment module 620, and a switching module 630. The acquisition module 630 acquires a mode switching command, which includes target operating mode information. The judgment module 620 determines whether the current operating mode of the smart switch is the same as the target operating mode. The switching module 630 switches the current operating mode to the target operating mode if the current operating mode is different from the target operating mode, thus enabling the smart switch to operate in the target operating mode.
[0126] In some embodiments, the control device 600 of the smart switch may further include a first information sending module 640, a switching request sending module 650, a second information sending module 660, and a target mode switching module 670.
[0127] The first information sending module 640 is used to send the switched working mode information according to the switched working mode; the switching request sending module 650 is used to send the second mode switching request; the second information sending module 660 is used to send the initial working mode information; and the target mode switching module 670 is used to switch the initial working mode to the preset working mode according to the received preset mode switching instruction.
[0128] The control device for a smart switch provided in this application embodiment is configured to operate in at least two operating modes, including a single-control mode. In the single-control mode, the power supply circuit of the smart device is controlled to switch on and off based on a single click action. The device includes acquiring a mode switching command, which includes target operating mode information; and determining whether the current operating mode of the smart switch is the same as the target operating mode. If the current operating mode is different from the target operating mode, the current operating mode is switched to the target operating mode, causing the smart switch to operate in the target operating mode. The control method for the smart switch provided in this application embodiment solves the latency problem in responding to touch commands when the smart switch is in single-control mode by switching its operating mode. When switched to single-control mode, the smart switch does not need to wait for the next trigger action after being triggered by a single click, thus resolving the latency problem in responding to touch commands when the smart switch is controlling a smart device in a single-control mode.
[0129] like Figure 8 As shown, this application embodiment also provides a smart switch 700, applied to the above-described smart switch control method. The smart switch 700 includes a processor 710 and a memory 720, with one or more programs stored in the memory and configured to be executed by the processor to implement the above-described smart switch control method.
[0130] Furthermore, the processor 710 may include one or more processing cores. The processor 710 runs or executes instructions, programs, code sets, or instruction sets stored in the memory 720, and retrieves data stored in the memory 720. Optionally, the processor 710 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 710 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor and may be implemented using a separate communication chip.
[0131] like Figure 9 As shown, this application embodiment also provides a storage medium 800, which stores program code 810, and the program code 810 is executed by the processor to perform the above-described method.
[0132] The storage medium can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the storage medium includes a non-transitory computer-readable storage medium. The storage medium has storage space for program code that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code can be compressed, for example, in a suitable form.
[0133] The above description is merely a preferred embodiment of this application and is not intended to limit this application in any way. Although this application has been disclosed above with reference to preferred embodiments, it is not intended to limit this application. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the technical solution of this application. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of this application without departing from the scope of the technical solution of this application shall still fall within the scope of the technical solution of this application.
Claims
1. A control method for an intelligent switch, characterized in that, The smart switch is configured to operate in at least two working modes, including a single-control mode and a smart mode. In the single-control mode, the smart switch controls the power supply circuit of the smart device based on a single click action. In this mode, the smart switch performs the power supply circuit switching operation immediately after detecting a single click action without waiting for subsequent trigger actions. The smart mode enables intelligent control of the smart device through diverse trigger actions. In this mode, the smart switch waits for a preset time period after detecting a trigger action to determine if subsequent trigger actions exist, and then executes the corresponding control function based on the combination of trigger actions. The method includes: A mode switching instruction is acquired, the mode switching instruction including target operating mode information; wherein, acquiring the mode switching instruction includes at least one of acquiring the mode switching instruction in response to a trigger instruction for the smart switch and acquiring the mode switching instruction within the polling time of the smart switch; wherein, when the current operating mode is smart mode, the target operating mode to be switched to is determined to be single-control mode based on a first touch action; when the current operating mode is single-control mode, the target operating mode to be switched to is determined to be smart mode based on a second touch action; the first touch action is a device control touch action in the single-control mode, and the second touch action is a device control touch action in the smart mode; Determine whether the current working mode is the same as the target working mode; If the current working mode is different from the target working mode, the current working mode is switched to the target working mode, and the switched working mode information is reported to the server, so that the server sends the switched working mode information to the mobile terminal, and verifies whether the current working mode of the smart switch displayed in the mobile terminal is consistent with the current working mode of the smart switch based on the changed association information reported by the mobile terminal. When the current working mode is switched to the single-control mode, the delay judgment function of the smart switch is canceled.
2. The control method for the intelligent switch as described in claim 1, characterized in that, The acquisition mode switching instruction includes: The mode switching instruction sent by the server is obtained, and the mode switching instruction is generated by the server based on the first mode switching request sent by the mobile terminal.
3. The control method for the intelligent switch as described in claim 1, characterized in that, Before obtaining the mode switching instruction, the method further includes: Upon receiving a touch action, a second mode switching request is generated based on the touch action, wherein the second mode switching request includes the current touch information of the smart switch; and The second mode switching request is sent to the server so that the server generates the mode switching instruction based on the current touch information.
4. The control method for the intelligent switch as described in claim 3, characterized in that, The current touch information is used to characterize the touch action. Sending the second mode switching request to the server, so that the server generates the mode switching instruction based on the current touch information, includes: The second mode switching request is sent to the server so that the server determines the target working mode based on the correspondence between the touch action and the working mode of the smart switch, and generates the mode switching instruction.
5. The control method for the intelligent switch as described in claim 1, characterized in that, Before obtaining the mode switching instruction, the method further includes: Upon receiving a touch action, a second mode switching request is generated based on the touch action, wherein the second mode switching request includes the current touch information of the smart switch; and The second mode switching request is sent to the server, so that the server sends an association information change instruction to the mobile terminal according to the current touch information to trigger the mobile terminal to change the association information, wherein the association information is displayed by the mobile terminal and used to characterize the working mode of the smart switch.
6. The control method for the intelligent switch as described in any one of claims 1 to 5, characterized in that, The trigger command is a button command applied to the smart switch.
7. The control method for the intelligent switch as described in any one of claims 1 to 5, characterized in that, The method further includes: When the smart switch successfully connects to the network, it sends the initial operating mode information of the smart switch at the time of successful network connection to the server; and According to the received preset mode switching instruction, the initial working mode is switched to the preset working mode. The preset mode switching instruction is generated by the server when the initial working mode and the preset working mode are different.
8. A control device for an intelligent switch, characterized in that, The smart switch is configured to operate in at least two modes, including a single-control mode and a smart mode. In the single-control mode, the smart switch controls the power supply circuit of the smart device based on a single click action. In this mode, the smart switch performs the power supply circuit switching operation without waiting for subsequent trigger actions after detecting a single click action. The smart mode enables the smart switch to intelligently control the smart device through diverse trigger actions. In this mode, the smart switch waits for a preset time period after detecting a trigger action to determine whether there are subsequent trigger actions, and then executes the corresponding control function based on the combination of trigger actions. The control device for the intelligent switch includes: The acquisition module is used to acquire a mode switching instruction, which includes target working mode information; wherein, when the current working mode is intelligent mode, the target working mode to be switched to is determined to be single-control mode based on a first touch action; when the current working mode is single-control mode, the target working mode to be switched to is determined to be intelligent mode based on a second touch action; the first touch action is a device control touch action in the single-control mode, and the second touch action is a device control touch action in the intelligent mode; The judgment module is used to determine whether the current working mode is the same as the target working mode; and A switching module is used to switch the current working mode to the target working mode if the current working mode is different from the target working mode, so that the smart switch works in the target working mode; when the current working mode is switched to the single-control mode, the delay judgment function of the smart switch is canceled; a first information sending module is used to report the switched working mode information to the server, so that the server sends the switched working mode information to the mobile terminal, and verifies whether the current working mode of the smart switch displayed in the mobile terminal is consistent with the current working mode of the smart switch based on the changed association information reported by the mobile terminal.
9. A smart switch, characterized in that, It includes a processor and a memory, wherein one or more programs are stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code, wherein the program code, when executed by a processor, performs the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method for generating user-level events for application program
CN106371818A
Key configuration method, device and system, electronic equipment and storage medium
CN111198621A