Movatterモバイル変換


[0]ホーム

URL:


CN113745055B - Working mode setting method and switch, switch system control method and switch system - Google Patents

Working mode setting method and switch, switch system control method and switch system

Info

Publication number
CN113745055B
CN113745055BCN202010471849.2ACN202010471849ACN113745055BCN 113745055 BCN113745055 BCN 113745055BCN 202010471849 ACN202010471849 ACN 202010471849ACN 113745055 BCN113745055 BCN 113745055B
Authority
CN
China
Prior art keywords
switch
mode
attribute information
controlled
terminal equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010471849.2A
Other languages
Chinese (zh)
Other versions
CN113745055A (en
Inventor
吴哲
陈慕奇
傅春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lumi United Technology Co Ltd
Original Assignee
Lumi United Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lumi United Technology Co LtdfiledCriticalLumi United Technology Co Ltd
Priority to CN202010471849.2ApriorityCriticalpatent/CN113745055B/en
Publication of CN113745055ApublicationCriticalpatent/CN113745055A/en
Application grantedgrantedCritical
Publication of CN113745055BpublicationCriticalpatent/CN113745055B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本申请实施例公开了一种工作模式设置方法、工作模式设置装置及开关,开关包括继电器,所述方法包括:接收模式配置指令;根据所述模式配置指令将所述开关设置在对应工作模式,其中,所述工作模式包括回弹模式,所述回弹模式用于控制继电器先断开预设时长后闭合。本申请实施例可以根据接收的模式配置指令对开关的工作模式进行配置,且开关的工作模式包括回弹模式,通过控制继电器先断开后闭合,提供给被控设备瞬断信号,从而控制被控设备的工作状态。

The present application discloses an operating mode setting method, an operating mode setting device, and a switch. The switch includes a relay. The method includes: receiving a mode configuration instruction; and setting the switch to a corresponding operating mode according to the mode configuration instruction, wherein the operating mode includes a rebound mode, and the rebound mode is used to control the relay to first open for a preset time length and then close. The present application can configure the operating mode of the switch according to the received mode configuration instruction, and the operating mode of the switch includes a rebound mode. By controlling the relay to first open and then close, a momentary disconnection signal is provided to the controlled device, thereby controlling the operating state of the controlled device.

Description

Working mode setting method, switch system control method and switch system
Technical Field
The present application relates to the field of switching technologies, and in particular, to a method for setting a working mode, a switch, a method for controlling a switching system, and a switching system.
Background
The internet of things is an important component of a new generation of information technology and is also an important development stage of an 'informatization' age. The Internet of things is an application expansion of the Internet and is the Internet with which the things are connected. The internet of things is a network, and more particularly, services and applications. The internet of things is characterized in that the internet is an extended and expanded network based on the internet, and the user side is extended and expanded to any article to article for information exchange and communication, namely, the article information. The switch is an important component in the Internet of things system, and the control efficiency of the switch needs to be improved.
Disclosure of Invention
In a first aspect, an embodiment of the present application provides a method for setting an operation mode, which is applied to a switch, where the switch includes a relay, and the method includes:
receiving a mode configuration instruction;
And setting the switch in a corresponding working mode according to the mode configuration instruction, wherein the working mode comprises a rebound mode, and the rebound mode is used for controlling the relay to be opened for a preset time period and then closed.
In a second aspect, an embodiment of the present application provides an operation mode setting device applied to a switch, the switch including a relay, the device including:
The receiving module is used for receiving the mode configuration instruction;
The setting module is used for setting the switch in a corresponding working mode according to the mode configuration instruction, wherein the working mode comprises a rebound mode, and the rebound mode is used for controlling the relay to be opened for a preset time period and then closed.
In a third aspect, an embodiment of the present invention provides a switch, where the switch includes a processor, a memory, and a computer program stored on the memory and executable by the processor, where the computer program when executed by the processor implements the steps of the method for setting an operation mode according to any of the embodiments above.
Compared with the prior art, the embodiment of the application provides a working mode setting method, when a switch receives a mode configuration instruction, the working mode of the switch is configured, the switch comprises a rebound mode, and in the rebound mode, a relay is controlled to be opened and then closed firstly to generate an instantaneous interruption signal, and the instantaneous interruption signal is used for controlling a controlled device with an instantaneous interruption detection module. By configuring the operating mode of the switch, the switch can be made to operate in multiple modes.
In a fourth aspect, an embodiment of the present application provides a control method of a switching system, applied to a switching system having a switch and a terminal device, the switch including a relay, the method including:
The terminal equipment receives a mode configuration instruction and sends the mode configuration instruction to the switch;
The switch is switched to a working mode corresponding to the mode configuration instruction according to the mode configuration instruction, wherein the working mode comprises a rebound mode, and the rebound mode is used for controlling the relay to be opened for a preset time period and then closed.
In a fifth aspect, an embodiment of the present application provides a switching system, the switching system comprising a switch and a terminal device, the switch comprising a relay,
The terminal equipment is used for receiving the mode configuration instruction and sending the mode configuration instruction to the switch;
the switch is used for switching to a working mode corresponding to the mode configuration instruction according to the mode configuration instruction, wherein the working mode comprises a rebound mode, and the rebound mode is used for controlling the relay to be opened for a preset time period and then closed.
Compared with the prior art, the embodiment of the application provides a control method of a switch system, which is applied to the switch system with a switch and terminal equipment, the terminal equipment receives a mode configuration instruction and then sends the mode configuration instruction to the switch, and the switch is switched to a working mode corresponding to the mode configuration instruction according to the mode configuration instruction, so that interaction between the terminal equipment and the switch is realized, and the working mode of the switch is switched by configuring the mode configuration instruction on the terminal equipment. The working mode of the switch comprises a rebound mode, and in the rebound mode, the relay is controlled to be opened and then closed firstly so as to generate an instant breaking signal for controlling the working state of the controlled equipment.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a schematic structural diagram of a switching system according to the present application;
FIG. 2 is a flow chart of a method for setting an operation mode according to an embodiment of the present application;
FIG. 3 is a flow chart of a method for setting an operation mode according to another embodiment of the present application;
FIG. 4 is a flow chart showing a method for setting an operation mode according to still another embodiment of the present application;
FIG. 5 is a flow chart of a method for setting an operation mode according to still another embodiment of the present application;
FIG. 6 is a flow chart showing a method for setting an operation mode according to still another embodiment of the present application;
FIG. 7 is a block diagram showing an operation mode setting device according to an embodiment of the present application;
fig. 8 is a block diagram showing an operation mode setting device according to another embodiment of the present application;
fig. 9 is a block diagram showing an operation mode setting device according to still another embodiment of the present application;
fig. 10 is a block diagram showing an operation mode setting device according to still another embodiment of the present application;
fig. 11 is a block diagram showing an operation mode setting device according to still another embodiment of the present application;
FIG. 12 shows a hardware block diagram of a switch according to one embodiment of the application;
FIG. 13 is a flow chart illustrating a method of controlling a switch according to an embodiment of the present application;
FIG. 14 is a flow chart of a method for controlling a switch according to another embodiment of the present application;
FIG. 15 is a flow chart showing a method of controlling a switch according to still another embodiment of the present application;
FIG. 16 is a flow chart of a method for controlling a switch according to yet another embodiment of the present application;
FIG. 17 is a flow chart of a method for controlling a switch according to yet another embodiment of the present application;
FIG. 18 is a flow chart illustrating a method of controlling a switch according to an embodiment of the present application;
FIG. 19 is a flow chart of a method of controlling a switch according to another embodiment of the present application;
FIG. 20 is a flow chart of a method of controlling a switch according to yet another embodiment of the present application;
FIG. 21 is a flow chart of a method of controlling a switch according to yet another embodiment of the present application;
FIG. 22 is a flow chart of a method of controlling a switch according to yet another embodiment of the present application;
FIG. 23 is a flow chart showing a method of controlling a switch according to yet another embodiment of the present application;
FIG. 24 is a flow chart illustrating a method of controlling a switch according to an embodiment of the present application;
FIG. 25 is a flow chart showing a method of controlling a switch according to another embodiment of the present application;
FIG. 26 is a flow chart showing a method of controlling a switch according to yet another embodiment of the present application;
FIG. 27 is a flow chart showing a method of controlling a switch according to still another embodiment of the present application;
FIG. 28 is a flow chart of a method of controlling a switch according to yet another embodiment of the present application;
fig. 29 is a flowchart of a switch control method according to still another embodiment of the present application;
FIG. 30 is a flow chart of a method of controlling a switch according to yet another embodiment of the present application;
FIG. 31 is a flow chart of a method of controlling a switch according to yet another embodiment of the present application;
FIG. 32 is a flow chart of a method of controlling a switch according to yet another embodiment of the present application;
FIG. 33 is a flow chart of a method of controlling a switch according to yet another embodiment of the present application;
FIG. 34 shows a block diagram of a switching system according to one embodiment of the present application;
Fig. 35 is a block diagram of a hardware structure of a switch according to an embodiment of the present invention.
Fig. 36 is a schematic hardware structure of a terminal device implementing various embodiments of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that like reference numerals or letters refer to like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
For the purpose of illustrating the application in more detail, the system of the present application will be described with reference to the accompanying drawings.
Referring to fig. 1, a switching system 10 according to an embodiment of the present application is provided, where the switching system 10 includes a terminal device 11, a server 12, a gateway 13, a switch 14, and a router 15. The terminal device 11 may be any device with communication and storage functions, such as a smart phone, a desktop computer, a notebook computer, a tablet computer, or other intelligent communication devices with network connection functions. The server 12 may be a network access server, database server, cloud server, or the like. Alternatively, the gateway 13 may be set up based on ZigBee protocol, and the switch 14 may be a device that is added to the gateway 13 in advance, for example, the switch 14 may be a device in a suite to which the gateway 13 belongs when shipped, or may be a device that is subsequently connected to the gateway 13 through user operation.
Optionally, a client capable of managing the smart home is installed in the terminal device 11, where the client may be an application client (such as a mobile phone APP) or a web client, which is not limited herein.
Alternatively, the switch 14 may establish a network connection with the gateway 13 based on the ZigBee protocol, thereby joining the ZigBee network.
The gateway 13 and the terminal device 11 can be connected with the router 15, and the router 15 is connected to the ethernet, and the router 15 can be connected to the server through wired or wireless communication connection. For example, the gateway 13 and the terminal device 11 may store the acquired information in the server 12. Optionally, the terminal device 11 may also establish a network connection with the server 12 through 2G/3G/4G/5G, wiFi or the like, so as to obtain data issued by the server 12.
Alternatively, the lan path as shown in fig. 1 indicates that the terminal device 11 is in the same lan as the router 15 and the gateway 13, and the wan path indicates that the terminal device 11 is in the same lan as the router 15 and the gateway 13. When the terminal device 11 is in the same lan with the router 15 and the gateway 13, the terminal device 11 may interact with the gateway 13 and the switch 14 connected to the gateway 13 through the lan path as shown in fig. 1, or may interact with the gateway 13 and the switch 14 connected to the gateway 13 through the wan path as shown in fig. 1. When the terminal device 11 is not in the same local area network as the router 15 and the gateway 13, the terminal device 11 may interact with the gateway 13 and the switch 14 connected to the gateway 13 through a wide area network path as shown in fig. 1.
Referring to fig. 2, an embodiment of the present application provides an operation mode setting method applied to a switch including a relay in the system shown in fig. 1, which may include, but is not limited to, steps S100 to S200. The following is described with respect to steps S100 and S200.
S100, receiving a mode configuration instruction.
The mode configuration instruction may be binary number, hexadecimal number or current signal, and the specific instruction type may be preset. The mode configuration instruction may be generated at the terminal device and sent to the switch via the gateway. The mode configuration instruction can be generated after the user triggers or can be generated by the terminal equipment automatically and regularly. In some embodiments, the user directly sends the mode configuration instruction to the switch through a wireless transmission mode by a third party device, and the third party device comprises a terminal device, a remote controller or a computer. Thus, when the operation mode of the switch is configured, the local configuration can be realized, and the operation mode of the switch can be configured by being remotely arranged.
And S200, setting the switch in a corresponding working mode according to the mode configuration instruction, wherein the working mode comprises a rebound mode, and the rebound mode is used for controlling the relay to be opened for a preset time period and then closed.
The rebound mode is used for controlling the controlled device with the instantaneous break detection module. The instantaneous interruption detection module is used for detecting instantaneous interruption signals, namely detecting the phenomenon of instantaneous interruption of alternating current, and controlling the opening, closing and other operations of the controlled equipment according to the result of the phenomenon. Specifically, different mode configuration instructions correspond to different operating modes of the switch. For example, in a first mode configuration command, the switch is set to a normal operating mode, and in a second mode configuration command, the switch is set to a rebound operating mode. Under a third mode configuration instruction, the switch is set to a wireless operating mode. In the normal operation mode, the mechanical switch is pressed down, and the working state of the controlled equipment is controlled by controlling the opening and closing of the relay. In the rebound mode, the relay is in a closed state, the mechanical switch is pressed down, and the relay is controlled to be opened and then closed firstly, so that an instant breaking signal is generated, and the working state of the controlled equipment is controlled. In the wireless mode, the relay is in a closed state, and a control instruction is generated through the action of pressing the mechanical switch so as to control the working state of the controlled equipment. In specific implementation, the working mode of the switch comprises a rebound mode, and in the rebound mode, the switch is turned off for a preset time period and then turned on through the control relay so as to generate an instant-off signal with a certain width, and the instant-off signal is used for controlling the working state of the controlled equipment. In some embodiments, the instantaneous interruption signal is a mixed electric power of mixed direct current and alternating current, and floats up and down at a certain value when the relay is closed, and when the relay is closed again after the relay is opened for a preset time, the amplitude of the instantaneous interruption signal drops and rises again, and the instantaneous interruption detection module can judge whether the instantaneous interruption occurs or not by comparing the voltage change, in other embodiments, the instantaneous interruption signal can also be a pulse signal, wherein the width of the pulse signal is adjustable. In some embodiments, the instantaneous interruption signals of different widths may control different types of controlled devices. In other embodiments, the instantaneous interruption signals of different widths may control different operating states of the same type of controlled device. The controlled equipment can be an illuminating lamp, including a spotlight, a led lamp and the like, and can also be an intelligent air conditioner, fresh air, a bathroom heater and the like. The controlled device may also be other intelligent products that can be controlled, which is not limited by the present application.
Compared with the prior art, the embodiment of the application provides a switch control method, which is used for configuring the working mode of a switch when the switch receives a mode configuration instruction, wherein the switch comprises a rebound mode, and in the rebound mode, a relay is controlled to be opened and then closed firstly so as to generate an instantaneous interruption signal, and the instantaneous interruption signal is used for controlling controlled equipment with an instantaneous interruption detection module. By configuring the working modes of the switch, the switch can work in multiple modes, the control efficiency is improved, and the working scenes of the switch are enriched.
With continued reference to FIG. 3, in one embodiment, step "S100: receive mode configuration instructions" includes, but is not limited to, step S110, described below with respect to step S110:
and S110, receiving attribute information of the controlled equipment, wherein the attribute information comprises one or more of model and network access parameters.
The attribute information of the controlled device refers to physical information given by the controlled device in the process of being generated and manufactured to be sold. Including but not limited to the model of the product, network access parameters, etc. The attribute information of the controlled device can be obtained by an application program on the terminal device through scanning a two-dimensional code or a bar code. Specifically, after the controlled device is manufactured, a scanning identifier is attached to the controlled device, and an application program on the terminal device establishes a binding relation with the controlled device by scanning the scanning identifier on the surface of the controlled device. When an application program on the terminal equipment can identify the scanning identification of the controlled equipment, the terminal equipment and the controlled equipment are considered to establish a binding relation, and in the process of scanning identification, the terminal equipment can acquire the attribute information of the controlled equipment, and then the working mode of the switch can be configured according to the attribute information of the controlled equipment. It should be noted that, after the application program on the terminal device identifies the scan identifier of the controlled device, the application program may acquire, in addition to attribute information of the controlled device, an operating state of the controlled device, for example, whether the controlled device is turned on or off, whether the controlled device operates normally, and so on. The attribute information of the controlled device can also be sent to the terminal device by a third party device, wherein the third party device comprises a server, a gateway, a remote controller or a computer, and the like, the attribute information of the controlled device is stored in the third party device, and the attribute information corresponding to the controlled device is sent to the switch under the request of the switch.
Step S200 of setting the switch in the corresponding operation mode according to the mode configuration instruction includes, but is not limited to, step S210, and the following description is given with respect to step S210:
And S210, determining the working mode of the switch according to the attribute information.
In this embodiment, after the terminal device obtains the attribute information of the controlled device, it is equivalent to that the terminal device can identify and match the target controlled device. At this time, the terminal device sends the attribute information of the controlled device to the switch, and the working mode of the switch can be configured according to the attribute information of the controlled device. Further, a linked list between the working mode of the switch and the attribute information of the controlled device can be established in advance, the linked list is stored in a memory of the switch, and when the terminal device can identify the scanning identification of the controlled device, the processor of the switch acquires the working mode of the switch by searching the linked list and matching the linked list, and then automatically switches to the working mode corresponding to the attribute information of the controlled device. When the processor of the switch acquires a plurality of working modes of the switch in a mode of searching the linked list and matching the linked list, the plurality of working modes are presented to a user, so that the user can select one of the plurality of working modes. It can be appreciated that in other embodiments, the application program on the terminal device may also acquire multiple operating modes built in the switch by scanning and identifying the type of the switch, and then present the multiple operating modes to the user for the user to select the corresponding operating modes. Or an application program on the terminal equipment can also identify the type of the switch through scanning, and then automatically send a switching instruction to the switch so as to enable the switch to be switched to an operating mode matched with the type of the switch.
With continued reference to fig. 4, in another embodiment, step S210, determining the operation mode of the switch according to the attribute information includes, but is not limited to, steps S211 and S212, and is described below with respect to steps S211 and S212.
S211, comparing the attribute information with a target attribute information table stored in the switch in advance, wherein the target attribute information table contains multiple target attribute information, and one target attribute information corresponds to at least one working mode.
S212, determining the working mode of the switch according to the attribute information under the condition that the attribute information is successfully compared with the target attribute information.
Specifically, in this embodiment, a mapping relationship between a target attribute information table of a controlled device and a working mode of a switch is first established, where the target attribute information table may be stored in a memory of the switch, and the target attribute information table includes multiple target attribute information, one target attribute information may correspond to one working mode of the switch, and one target attribute information may also correspond to multiple working modes of the switch. When the attribute information of the controlled device is acquired by the switch, the processor in the switch performs searching and comparing actions on the attribute information of the controlled device, namely, the acquired attribute information of the controlled device is searched and compared with a target attribute information table stored in a memory of the switch, and when the acquired attribute information of the controlled device has the target attribute information corresponding to the acquired attribute information of the controlled device, the binding relationship between the switch and the controlled device can be considered, at the moment, a target attribute information table stored in the memory of the switch can be called to search a working mode corresponding to the controlled device, so that the working mode of the switch can be intelligently selected according to a preset mode in advance.
With continued reference to fig. 5, in yet another embodiment, step S212 of determining the operation mode of the switch according to the attribute information if the attribute information is successfully compared with the target attribute information includes, but is not limited to, step S2121, and is described below with respect to step S2121.
S2121, under the condition that the attribute information is successfully compared with the target attribute information and the target attribute information corresponds to a plurality of working modes, sending a selection instruction to the terminal equipment, wherein the selection instruction is used for a user to select one of the working modes.
Specifically, the obtained attribute information of the controlled device is compared with a target attribute information table stored in the switch, when the attribute information of the controlled device is successfully matched with the target attribute information in the target attribute information table, and the target attribute information corresponds to multiple working modes of the switch, the processor of the switch sends the multiple working modes of the switch corresponding to the target attribute information of the switch to the terminal device, and the multiple working modes are displayed on a display screen of the terminal device so that a user can select one of the multiple working modes, and the selected and determined working mode is sent to the switch to complete the configuration process of the working modes of the switch. By establishing the target attribute information table, the working mode of the switch can be rapidly acquired in a table look-up mode, and when the acquired switching mode comprises multiple types, the multiple types of modes are fed back to the user for selection, so that the intelligent and humanized switching device is more intelligent and humanized, and the matching degree of the working mode of the switch is improved. It should be noted that, when the attribute information of the controlled device is not matched with the target attribute information in the target attribute information table, the processor of the switch feeds back the information that is not successfully matched to the terminal device, and displays the information on the terminal device, so that the user can set a configuration mode for the switch to control the controlled device.
With continued reference to fig. 6, in yet another embodiment, the switch control method further includes, but is not limited to, steps S300 and S310, and the following description is provided with respect to steps S300 and S310.
And S300, sending the message information to the terminal equipment, the server or the gateway.
And S310, if feedback information corresponding to the message information is not received within a preset time period, setting the switch to be in an offline mode.
In one possible embodiment, the switch sends the message information to the terminal device or to the gateway, the server via the gateway to establish a communication connection between the switch and the terminal device, the gateway or the server. The message information may be automatically sent for a preset time interval, and the preset time interval may be set manually. The message information can be a matching instruction, one matching instruction can contain a plurality of matching data, and the matching data can be sent to the terminal equipment, the gateway or the server in a serial sending mode or can be sent to the terminal equipment, the gateway or the server in a parallel sending mode. In other modes, the matched data can be compressed first, and then decompressed after being transmitted to the terminal equipment, so that the transmission efficiency is improved. Furthermore, the compressed matching data can be encrypted, so that the safety of data transmission is improved. Furthermore, matching data can be grouped, the matching data among groups are transmitted in parallel, and each data in the groups is transmitted in series, so that missing transmission of the data is avoided, and erroneous judgment is avoided. If the switch does not receive feedback information of the message information within a preset time period, the switch is considered to be disconnected, and at the moment, the switch is switched to an offline mode.
It may be appreciated that in other embodiments, the switch sends message information to the gateway, and the gateway generates connection status information of the switch according to the message information, where the connection status information includes whether a connection relationship is established between the switch and the terminal device or the controlled device. The gateway feeds back the connection state information of the switch to the terminal device so as to display the connection state information of the switch on the terminal device. When the gateway judges that the switch is disconnected with the terminal equipment or the controlled equipment, the working mode of the switch is switched to an off-line mode.
With continued reference to fig. 7, an embodiment of the present application further provides an operation mode setting device 10D, which is applied to a switch 14, where the switch 14 includes a relay, and the device includes, but is not limited to, a first receiving module 100 and a first setting module 200, and is described below with respect to the first receiving module 100 and the first setting module 200.
The first receiving module 100 is configured to receive a mode configuration instruction.
The first setting module 200 is configured to set the switch 14 in a corresponding working mode according to the mode configuration instruction, where the working mode includes a rebound mode, and the rebound mode is used to control the relay to be opened for a preset period of time and then closed.
Compared with the prior art, the embodiment of the application provides the working mode setting device 10D, when the switch 14 receives the mode configuration instruction, the working mode of the switch 14 is configured, and the switch 14 comprises a rebound mode, and in the rebound mode, the instantaneous interruption signal is generated by controlling the relay to be opened and then closed, and is used for controlling the controlled equipment with the instantaneous interruption detection module. By configuring the operating mode of the switch 14, the switch 14 can be made to operate in multiple modes.
With continued reference to fig. 8, in one embodiment, the first receiving module 100 includes, but is not limited to, a first receiving sub-module 110, where the first receiving sub-module 110 is configured to receive attribute information of a controlled device, where the attribute information includes one or more of a model number and a network access parameter. The first setting module 200 includes, but is not limited to, a first determining module 210, where the first determining module 210 is configured to determine an operation mode of the switch 14 according to the attribute information.
With continued reference to fig. 9, in one embodiment, the first determining module 210 includes, but is not limited to, a first comparing module 211 and a first determining sub-module 212, where the first comparing module 211 is configured to compare the attribute information with a target attribute information table stored in advance in the switch 14, where the target attribute information table includes multiple target attribute information, and one of the target attribute information corresponds to at least one working mode. The first determining sub-module 212 is configured to determine, according to the attribute information, an operation mode of the switch 14 if the attribute information is successfully compared with the target attribute information.
With continued reference to fig. 10, in one embodiment, the first determining sub-module 212 includes, but is not limited to, a first sending module 2121, where the first sending module 2121 is configured to send a selection instruction to the terminal device when the attribute information is successfully compared with the target attribute information and the target attribute information corresponds to multiple working modes, where the selection instruction is used for a user to select one of the multiple working modes.
With continued reference to fig. 11, in one embodiment, the switch 14 control device further includes, but is not limited to, a second sending module 300 and a second setting module 310, where the second sending module 300 is configured to send message information to a terminal device. The second setting module 310 is configured to set the switch 14 in an offline mode if feedback information corresponding to the message information is not received within a preset period of time.
With continued reference to fig. 12, an embodiment of the present application further provides a switch 14, where the switch 14 includes a processor 14a, a memory 14b, and a computer program stored on the memory 14b and executable by the processor 14a, where the computer program, when executed by the processor 14a, implements the steps of the method for setting an operation mode provided in any of the embodiments above.
With continued reference to fig. 13, an embodiment of the present application further provides a switch control method, including but not limited to steps S400 and S500, and the following description is provided with respect to steps S400 and S500.
S400, acquiring a trigger instruction.
The trigger instruction can be generated after the mechanical switch is manually pressed, or can be generated by terminal equipment which establishes communication connection with the switch. The trigger instruction can be binary number or hexadecimal number or instruction type such as current signal, and specific instruction type can be preset. The trigger instruction may be generated at the terminal device and sent to the switch through the gateway. The triggering instruction can be generated after the triggering by the user or can be generated by the timing automatic triggering of the terminal equipment, in some embodiments, the user directly sends the triggering instruction to the switch by the third party equipment in a wireless transmission mode, and the third party equipment comprises the terminal equipment, a remote controller or a computer and the like. Thus, when controlling the controlled device, both local control and control can be achieved by remote control.
And S500, generating a corresponding control instruction based on the trigger instruction and the current working mode of the switch, wherein the control instruction is used for controlling the working state of the controlled equipment, the working mode comprises a rebound mode, and the rebound mode is used for controlling the opening and closing of the relay.
In this embodiment, the switch generates a control instruction in combination with a trigger instruction sent by the terminal device or the user and a current working mode of the switch, so as to control a working state of the controlled device. The rebound mode is used for controlling the controlled device with the instantaneous break detection module. Specifically, different mode configuration instructions correspond to different operating modes of the switch. For example, in a first mode configuration command, the switch is set to a normal operating mode, and in a second mode configuration command, the switch is set to a rebound operating mode. Under a third mode configuration instruction, the switch is set to a wireless operating mode. In the normal operation mode, the mechanical switch is pressed down, and the working state of the controlled equipment is controlled by controlling the opening and closing of the relay. In the rebound mode, the relay is in a closed state, the mechanical switch is pressed down, and the relay is controlled to be opened and then closed firstly, so that an instant breaking signal is generated, and the working state of the controlled equipment is controlled. In the wireless mode, the relay is in a closed state, and a control instruction is generated through the action of pressing the mechanical switch so as to control the working state of the controlled equipment. In specific implementation, the working mode of the switch comprises a rebound mode, and in the rebound mode, the switch is turned off for a preset time period and then turned on through the control relay so as to generate an instant-off signal with a certain width, and the instant-off signal is used for controlling the working state of the controlled equipment. In some embodiments, the instantaneous interruption signal is a mixed electric power of mixed direct current and alternating current, and floats up and down at a certain value when the relay is closed, and when the relay is closed again after the relay is opened for a preset time, the amplitude of the instantaneous interruption signal drops and rises again, and the instantaneous interruption detection module can judge whether the instantaneous interruption occurs by comparing the voltage change, in other embodiments, the instantaneous interruption signal can also be a pulse signal, wherein the width of the pulse signal is adjustable. In some embodiments, the instantaneous interruption signals of different widths may control different types of controlled devices. In other embodiments, the instantaneous interruption signals of different widths may control different operating states of the same type of controlled device. The controlled device can be an illuminating lamp, including a spotlight, a led lamp and the like. And can also be an intelligent air conditioner, fresh air, bathroom heater and the like. The controlled device may also be other intelligent products that can be controlled, which is not limited by the present application.
In a specific implementation, the rebound mode is used for controlling the relay to be opened for a preset time period and then closed so as to generate an instant break signal. For a controlled device that supports identification of an instantaneous-break signal, the switch may be set to use a "rebound mode" and support configuration of the time interval of the instantaneous-break signal to accommodate different manufacturer products (different manufacturers may differ in width for the instantaneous-break signal). The rebound mode can still be controlled when the controlled device is offline, so that the switch can still close the controlled device without switching to the offline mode when the controlled device is offline.
Compared with the prior art, the embodiment of the application provides a switch control method, which combines the acquired trigger instruction with the current working mode of the switch to generate a control instruction by acquiring the external trigger instruction, and is used for controlling the working state of controlled equipment. The working mode of the switch comprises a rebound mode, and under the rebound mode, the instantaneous interruption signal is generated by controlling the opening and closing of the relay and is used for controlling the working state of the controlled equipment, so that the control mode of the switch is enriched, the control efficiency is improved, and the working scene of the switch is enriched.
With continued reference to FIG. 14, in one embodiment, the switch comprises a mechanical switch, and step "S400 includes, but is not limited to, step S410, and is described below with respect to step S410.
And S410, generating a trigger instruction when the mechanical switch is pressed.
In this embodiment, a trigger instruction for controlling the controlled device is generated by pressing a button of the mechanical switch, so as to control the operating state of the controlled device. The trigger instruction may be generated by single-key pressing trigger, double-key pressing trigger, single-finger pressing trigger, multi-finger pressing trigger, pressing a preset track pressing trigger, and the like. In addition, the trigger instruction can also be generated after single trigger, after multiple triggers, at fixed time interval, at variable time interval, at fixed pressing time and at variable pressing time. And different triggering modes correspond to different triggering instructions, so that the types of the triggering instructions are enriched, and the controlled equipment is controlled more flexibly.
With continued reference to fig. 15, in another embodiment, the switch includes a mechanical switch electrically connected to the relay, the operation mode includes a normal mode, and step S500 includes generating a corresponding control instruction based on the trigger instruction and the operation mode in which the switch is currently located, where the control instruction is used to control the operation state of the controlled device, including but not limited to step S510, and is described below with respect to step S510.
And S510, when the mechanical switch is pressed and the current working mode is a normal mode, generating a control instruction for controlling the relay to be closed or opened.
Specifically, in this embodiment, the switch includes an electrically connected mechanical switch, a processor, and a relay, and the mechanical switch controls the opening and closing of the relay through the processor. In the normal mode, when the mechanical switch is pressed, the relay can be controlled to perform one-time opening or closing action, and one control instruction is generated by the relay to perform one-time opening or closing action for controlling the working state of the controlled equipment. In one embodiment, the mechanical switch is pressed once, and the processor controls the relay to perform a closing action, and at this time, an electrical signal is generated, and the electrical signal is a control instruction and is used for controlling the opening of the controlled device. If the controlled device is a lamp, the control instruction is used for controlling the lamp to emit light. When the mechanical switch is pressed once again, the processor controls the relay to execute a breaking action once, and at the moment, an electric signal is generated again, wherein the electric signal is a control instruction and is used for controlling the closing of the controlled equipment. If the controlled device is a lamp, the control instruction is used for controlling the lamp to be extinguished. Thus, when the controlled device is in the offline mode, the state of the controlled device can be controlled by pressing the mechanical switch.
With continued reference to fig. 16, in yet another embodiment, the switch includes a mechanical switch electrically connected to the relay, the operation mode includes a wireless mode, and step S500 includes generating a corresponding control command based on the trigger command and the operation mode in which the switch is currently located, where the control command is used to control the operation state of the controlled device, including, but not limited to, step S520, as described below with respect to step S520.
And S520, when the relay is in a closed state and the current working mode is a wireless mode, and the mechanical switch is pressed, generating the control instruction according to the action of the pressed mechanical switch, wherein the control instruction comprises a wireless signal.
Specifically, in this embodiment, the switch includes an electrically connected mechanical switch, a processor, and a relay, and the mechanical switch controls the opening and closing of the relay through the processor. In the wireless mode, the pressing action of the mechanical switch can be identified by the processor, and when the mechanical switch is pressed once, the processor generates an electric signal which is a control instruction and comprises a wireless signal for controlling the working state of the controlled equipment. In one embodiment, the mechanical switch is pressed once, at which time the processor generates an electrical signal, which is a control command that includes a wireless signal for controlling the opening of the controlled device. If the controlled device is a lamp, the control instruction is used for controlling the lamp to emit light. When the mechanical switch is pressed once again, the processor generates an electric signal again, wherein the electric signal is a control instruction, and the control instruction comprises a wireless signal and is used for controlling the closing of the controlled equipment. If the controlled device is a lamp, the control instruction is used for controlling the lamp to be extinguished. Thus, when the switch is in the wireless mode, the state of the controlled device can be remotely controlled by pressing the mechanical switch.
With continued reference to fig. 17, in yet another embodiment, step S500 includes generating a corresponding control command based on the trigger command and the current operating mode of the switch, where the control command is used to control the operating state of the controlled device, including, but not limited to, steps S530 and S540, and the following description is provided with respect to steps S530 and S540.
And S530, detecting instruction information contained in the trigger instruction, wherein the instruction information comprises one or more of trigger times, trigger duration, trigger strength, trigger track, single-finger trigger and multi-finger trigger.
S540, generating a control instruction according to the instruction information and the current working mode of the switch, wherein the control instruction is used for controlling the working state of the controlled equipment.
In some embodiments, the number of triggering times corresponds to different instruction information, different instruction information can generate different control instructions in combination with the current working mode of the switch, and different control instructions can be used for controlling different working states of the controlled device. For example, when the controlled device is a lamp and the current working mode of the switch is a normal mode, the command information generated by one-time triggering is used for controlling the light emission of the controlled device in combination with the control command generated by the normal working mode of the switch, and the command information generated by two-time triggering is used for controlling the flicker of the controlled device in combination with the control command generated by the normal working mode of the switch. In addition, when the switch is in different working modes, the control instructions are also different, and different working states of the controlled equipment can be controlled.
In some embodiments, different trigger durations correspond to different instruction information, and different instruction information in combination with a current working mode of the switch may generate different control instructions, and different control instructions may be used to control different working states of the controlled device. For example, when the controlled device is a lamp and the current operation mode of the switch is a normal mode, the instruction information generated by pressing the switch 1s is used to control the controlled device to emit light at the first brightness level in combination with the control instruction generated by pressing the switch 2s and is used to control the controlled device to emit light at the second brightness level in combination with the control instruction generated by pressing the switch 2s and the normal operation mode of the switch. Wherein the brightness of the first brightness level is less than the brightness of the second brightness level. In addition, when the switch is in different working modes, the control instructions are also different, and different working states of the controlled equipment can be controlled.
In some embodiments, different trigger metrics correspond to different instruction information. The triggering force is force of a user pressing the switch. Different control instructions can be generated by combining different instruction information with the current working mode of the switch, and can be used for controlling different working states of the controlled equipment. For example, when the controlled device is a lamp, the current working mode of the switch is a normal mode, and the switch is a switch with a speaker, the instruction information generated by the first pressing force is used for controlling the controlled device to emit light in combination with the control instruction generated by the normal working mode of the switch, and the instruction information generated by the second pressing force is used for controlling the controlled device to turn on the speaker in combination with the control instruction generated by the normal working mode of the switch. In addition, when the switch is in different working modes, the control instructions are also different, and different working states of the controlled equipment can be controlled.
In some embodiments, different trigger tracks correspond to different instruction information, different instruction information can generate different control instructions in combination with the current working mode of the switch, and different control instructions can be used for controlling different working states of the controlled device. The trigger track may be linear or curved. The trigger track may be a continuous track or a track that is intermittent within a preset time interval.
In some embodiments, the single-finger trigger and the multi-finger trigger correspond to different instruction information. The single-finger trigger and the multi-finger trigger can be aimed at single-key switches, namely, the single-finger trigger and the multi-finger trigger act on the same key, and whether the single-finger trigger or the multi-finger trigger can be judged by detecting the number of the contacts pressed at the same moment on the switch panel, so that different instruction information is generated. And then different control instructions can be generated by combining the current working mode of the switch and are used for controlling different working states of the controlled equipment.
In some embodiments, single-finger and multi-finger triggers are directed to a double-key switch, and multi-finger triggers may be double-finger or tri-finger triggers, or the like. For double-finger triggering, two fingers respectively correspond to different keys, and whether single-finger triggering or double-finger triggering can be judged by detecting the number and the positions of the pressing contacts on the switch panel.
It should be noted that the above instruction information may be combined in any manner in different orders to generate different instruction information, and further generate different control instructions, so as to control different working states of the controlled device, thereby being beneficial to enriching the instruction number of the switch and improving the application range of the switch.
With continued reference to fig. 18, the embodiment of the application further provides a switch control method. The switch includes a relay and the method includes, but is not limited to, steps W100, W200, and W300, as described below with respect to steps W100, W200, and W300.
W100, acquiring a trigger instruction. The acquisition trigger instruction has been described above, and will not be described in detail here.
And W200, generating a control instruction for controlling the opening and closing of the relay based on the trigger instruction.
And W300, controlling the working state of the controlled equipment according to the control instruction.
Specifically, the switch is built with a normal mode, a rebound mode and a wireless mode. In the normal working mode, the mechanical switch is pressed down to generate a trigger instruction, and the working state of the controlled equipment is controlled by controlling the opening and closing of the relay. In the rebound mode, the relay is in a closed state, the mechanical switch is pressed down to generate a trigger instruction, and the relay is controlled to be opened and then closed firstly to generate an instantaneous interruption signal, so that the working state of the controlled equipment is controlled. In the wireless mode, the relay is in a closed state, and a control instruction is generated through the action of pressing the mechanical switch so as to control the working state of the controlled equipment.
Compared with the prior art, the embodiment of the application provides a switch control method, wherein the switch comprises a relay, and the relay is controlled to be opened and closed through the acquired trigger instruction so as to generate an instantaneous interruption signal, and the instantaneous interruption signal is used for controlling the working state of controlled equipment, so that the control modes of the switch are enriched.
With continued reference to fig. 19, in some embodiments, step W200 includes, but is not limited to, step W210, as described below with respect to step W210.
And W210, controlling the relay to be opened for a first time period and then closed under the condition that the relay is in a closed state and the mechanical switch is pressed, so as to generate the control instruction.
Specifically, in the rebound mode, the relay is controlled to be opened and then closed to generate an instantaneous interruption signal, and the instantaneous interruption signal is used as a control instruction to control the working state of the controlled device with the instantaneous interruption detection module, so that the state control of the controlled device of a specific type can be realized.
With continued reference to fig. 20, in some embodiments, prior to step W210, the method includes, but is not limited to, steps W201 and W202, as described below with respect to steps W201 and W202.
W201, acquiring pulse information.
And W202, determining the first duration according to the pulse information.
Specifically, in this embodiment, the switch is in the rebound mode, pulse information may be acquired first, where the pulse information includes content of a first duration, the pulse information may be directly sent by a third party device through a wireless transmission manner, where the third party device includes a terminal device, a remote controller, or a computer, etc., and then determines, according to regulation and control of the pulse information, the first duration is a time interval in which the relay is opened first and then closed, so that flexible adjustment may be performed on actions of the relay, and different relay actions may correspond to different control instructions, thereby enriching control modes of the switch.
With continued reference to FIG. 21, in some embodiments, step W200 includes, but is not limited to, step W220, as described below with respect to step W220.
W220, in the case where the mechanical switch is pressed, to generate the control instruction to control the relay to be turned on or off.
Specifically, the switch is in a normal mode, the mechanical switch can directly control the working state of the relay, and the relay is controlled to be closed or opened by pressing the mechanical switch, so that a control instruction for controlling the controlled equipment is generated. That is, in this embodiment, the operation state of the controlled device may be controlled directly by controlling the mechanical switch.
With continued reference to fig. 22, in some embodiments, step W200 includes, but is not limited to, step W230, as described below with respect to step W230.
And W230, when the relay is in a closed state and the mechanical switch is pressed, generating the control instruction according to the action of pressing the mechanical switch, wherein the control instruction comprises a wireless signal.
Specifically, in wireless mode, the mechanical switch does not control the relay. The relay is always on and remains closed when the local mechanical switch is pressed. The processor of the switch detects the key-press action and sends a control instruction to the controlled equipment in a wireless mode for adjusting the working state of the controlled equipment.
With continued reference to FIG. 23, in some embodiments, after step W100, the method includes, but is not limited to, step W110, as described below with respect to step W110.
And W110, detecting instruction information contained in the trigger instruction, wherein the instruction information comprises one or more of trigger times, trigger duration, trigger strength, trigger track, single-finger trigger and multi-finger trigger.
Step W200 includes, but is not limited to, step W240, as described below with respect to step W240.
And W240, generating a first instruction for controlling the relay to be opened and a second instruction for controlling the relay to be closed according to the instruction information.
Reference is made to the previous discussion for instruction information, and no further description is given here. Different control instructions of the relay can be generated according to different instruction information, and further different working states of the controlled equipment are controlled. The control mode of the switch is enriched.
With continued reference to fig. 24, an embodiment of the present application provides a switch control method applied to a switching system having a switch and a terminal device, including but not limited to steps W400 and W500, and is described below with respect to steps W400 and W500.
And W400, the terminal equipment receives the mode configuration instruction and sends the mode configuration instruction to the switch.
The mode configuration instruction may be binary number, hexadecimal number or current signal, and the specific instruction type may be preset. The mode configuration instruction may be generated at the terminal device and sent to the switch via the gateway. The mode configuration instruction can be generated after the user triggers or can be generated by the terminal equipment automatically and regularly. In some embodiments, the user directly sends the mode configuration instruction to the switch through a wireless transmission mode by a third party device, and the third party device comprises a terminal device, a remote controller or a computer. Thus, when the operation mode of the switch is configured, the local configuration can be realized, and the operation mode of the switch can be configured by being remotely arranged.
And W500, switching the switch to a working mode corresponding to the mode configuration instruction according to the mode configuration instruction, wherein the working mode comprises a rebound mode, and the rebound mode is used for controlling the relay to be opened for a preset time period and then closed.
The rebound mode is used for controlling the controlled device with the instantaneous break detection module. The instantaneous interruption detection module is used for detecting instantaneous interruption signals, namely detecting the phenomenon of instantaneous interruption of alternating current, and controlling the opening, closing and other operations of the controlled equipment according to the result of the phenomenon. Specifically, different mode configuration instructions correspond to different operating modes of the switch. For example, in a first mode configuration command, the switch is set to a normal operating mode, and in a second mode configuration command, the switch is set to a rebound operating mode. Under a third mode configuration instruction, the switch is set to a wireless operating mode. In the normal operation mode, the mechanical switch is pressed down, and the working state of the controlled equipment is controlled by controlling the opening and closing of the relay. In the rebound mode, the relay is in a closed state, the mechanical switch is pressed down, and the relay is controlled to be opened and then closed firstly, so that an instant breaking signal is generated, and the working state of the controlled equipment is controlled. In the wireless mode, the relay is in a closed state, and a control instruction is generated through the action of pressing the mechanical switch so as to control the working state of the controlled equipment. In specific implementation, the working mode of the switch comprises a rebound mode, and in the rebound mode, the switch is turned off for a preset time period and then turned on through the control relay so as to generate an instant-off signal with a certain width, and the instant-off signal is used for controlling the working state of the controlled equipment. In some embodiments, the instantaneous interruption signal is a mixed electric power of mixed direct current and alternating current, and floats up and down at a certain value when the relay is closed, and when the relay is closed again after the relay is opened for a preset time, the amplitude of the instantaneous interruption signal drops and rises again, and the instantaneous interruption detection module can judge whether the instantaneous interruption occurs or not by comparing the voltage change, in other embodiments, the instantaneous interruption signal can also be a pulse signal, wherein the width of the pulse signal is adjustable. In some embodiments, the instantaneous interruption signals of different widths may control different types of controlled devices. In other embodiments, the instantaneous interruption signals of different widths may control different operating states of the same type of controlled device. The controlled device can be an illuminating lamp, including a spotlight, a led lamp and the like. And can also be an intelligent air conditioner, fresh air, bathroom heater and the like. The controlled device may also be other intelligent products that can be controlled, which is not limited by the present application.
Compared with the prior art, the embodiment of the application provides a switch control method which is applied to a switch system, a mode configuration instruction is received through a terminal device, then the mode configuration instruction is sent to a switch, the switch is switched to a working mode corresponding to the mode configuration instruction according to the mode configuration instruction, interaction between the terminal device and the switch is realized, and the working mode of the switch is switched by configuring the mode configuration instruction on the terminal device. The working mode of the switch comprises a rebound mode, and under the rebound mode, the relay is controlled to be opened and then closed firstly so as to generate an instant-break signal, and the instant-break signal is used for controlling the working state of the controlled equipment, so that the control efficiency is improved, and the working scene of the switch is enriched.
With continued reference to fig. 25, in some embodiments, prior to step W400, the method further includes, but is not limited to, step W380, as described below with respect to step W380.
And W380, creating a mode selection frame on the terminal equipment, and displaying the mode selection frame on the terminal equipment, wherein the mode selection frame comprises the content of the mode configuration instruction.
Specifically, the terminal equipment is provided with a visual mode selection frame interface, the mode selection frame contains specific content of a mode configuration instruction, the mode configuration instruction is selected by switching the interface of the mode selection frame on the terminal equipment, and then a corresponding control instruction can be produced and transmitted to the controlled equipment through a gateway or other forms so as to control the working state of the controlled equipment.
With continued reference to fig. 26, in some embodiments, the method further includes, but is not limited to, step W600, as described below with respect to step W600.
And W600, the terminal equipment receives switch offline information, wherein the offline information is used for indicating that the switch does not report messages in a preset period.
Specifically, when the switch is in the offline mode, the switch sends feedback information of the offline mode to the gateway, and the gateway sends the feedback information of the switch in the offline mode to the terminal device, so that the information of the switch in the offline mode is displayed on the terminal device. The off-line information is used for indicating that the switch does not report a message to the gateway in a preset period. In this embodiment, the off-line mode of the switch can be visually displayed on the terminal device, so that the user can clearly observe the state of the switch, and can perform actions such as reconnection or replacement on the switch, thereby being more intelligent.
With continued reference to fig. 27, in some embodiments, the method further includes, but is not limited to, steps W650, W660, W670, and W680, as described below with respect to steps W650, W660, W670, and W680.
And W650, sending message information to the terminal equipment by the switch interval preset time length.
Specifically, the switch may send message information to the gateway or the server at intervals of a preset duration, and the gateway or the server determines whether the connection between the switch and the terminal device is normal according to the message information sent by the switch. Or the gateway or the server transfers the message information sent by the switch to the terminal equipment, and the terminal equipment is adopted to judge whether the interaction between the switch and the terminal equipment is normal.
And W660, the terminal equipment judges whether the switch breaks communication connection with the terminal equipment within the preset duration according to the message information.
The terminal equipment, the gateway or the server judges whether the switch breaks communication connection with the terminal equipment within a preset duration according to message information sent by the switch. The process may be performed either on the terminal device or on the gateway or server.
And W670, under the condition that the communication connection between the switch and the terminal equipment is disconnected within the preset time period, the terminal equipment detects whether the communication connection between the switch and the terminal equipment is established again.
In this embodiment, the act of detecting whether the switch re-establishes the communication connection with the terminal device may be performed at the terminal device or at a gateway or a server.
If the switch and the terminal equipment are in communication connection again, the terminal equipment switches the switch to a target mode, wherein the target mode is a working mode before the switch and the terminal equipment are disconnected from communication connection.
Specifically, if the terminal device, gateway or server detects that the switch and the terminal device are in communication connection again, the terminal device sends a control instruction for switching the switch to an operating mode before the switch and the terminal device are disconnected from each other. In this way, the switch can be quickly brought into the operating mode before being disconnected from the terminal device without reconfiguration.
With continued reference to fig. 28, in some embodiments, the method further includes, but is not limited to, steps W700 and W710, as described below with respect to steps W700 and W710.
And W700, establishing a binding relation or communication connection between the terminal equipment and the first switch, wherein the terminal equipment stores first attribute information of the first switch and configuration information of the first switch, and the first attribute information comprises one or more of a model number, a working mode and network access parameters of the first switch.
And W710, judging that the unbinding relation or communication connection between the terminal equipment and the first switch is abnormal, and controlling the second switch by the terminal equipment according to the configuration information of the first switch.
Specifically, when a binding relationship or communication connection is established between the terminal device and the first switch, the terminal device stores first attribute information of the first switch and configuration information of the first switch. The first attribute information comprises information such as a model number, a working mode, a network access parameter and the like of the first switch. The configuration information of the first switch is a configuration parameter or the like when a binding relation or communication connection is established between the first switch and the terminal equipment. When the terminal equipment judges that the first switch and the terminal equipment are in a unbinding relation or are disconnected from communication connection, the terminal equipment adopts the configuration information of the first switch to configure the second switch.
Further, when the types of the second switch and the first switch are the same, the terminal equipment controls the second switch by adopting the same control strategy as the first switch, so that reconfiguration of the second switch is not needed, and the response speed of the second switch and the terminal equipment in pairing can be improved.
When the types of the second switch and the first switch are different, the configuration information of the first switch can be used as a reference, and a control strategy similar to that of the first switch is adopted to control the second switch.
With continued reference to FIG. 29, in some embodiments, the method further includes, but is not limited to, steps W750, W760, W770, W780, and W790, as described below with respect to steps W750, W760, W770, W780, and W790.
And W750, establishing a binding relation or communication connection between the terminal equipment and the first controlled equipment, wherein third attribute information of the first controlled equipment is stored in the terminal equipment, and the third attribute information comprises one or more of the model number and network access parameters of the first controlled equipment.
And W760, the terminal equipment judges that the unbinding relation or the communication connection between the terminal equipment and the first controlled equipment is abnormal.
And W770, establishing a binding relation or communication connection between the terminal equipment and the second controlled equipment.
And W780, the terminal equipment judges whether the fourth attribute information of the second controlled equipment is the same as the third attribute information of the first controlled equipment.
And W790, reconfiguring the switch by the terminal equipment according to the attribute information of the first controlled equipment under the condition that the fourth attribute information is different from the third attribute information.
Specifically, in this embodiment, a binding relationship or communication connection is established between the terminal device and the first controlled device, and the working state of the first controlled device may be controlled by the terminal device. At this time, third attribute information of the first controlled device is stored on the first terminal device, where the third attribute information includes, but is not limited to, a model number, a network access parameter, and the like of the first controlled device. When the terminal equipment judges that the binding relation between the first controlled equipment and the terminal equipment is released or the communication connection between the first controlled equipment and the terminal equipment is disconnected, the terminal equipment establishes the binding relation or the communication connection with the second controlled equipment. And in the process, when the terminal equipment judges that the fourth attribute information of the second controlled equipment is the same as the third attribute information of the first controlled equipment, directly establishing the binding relation or communication connection between the second controlled equipment and the terminal equipment. When the terminal equipment judges that the fourth attribute information of the second controlled equipment is different from the third attribute information of the first controlled equipment, the terminal equipment adopts the attribute information reconfiguration switch of the first controlled equipment.
With continued reference to FIG. 30, in some embodiments, the method further includes, but is not limited to, steps W800, W810, W820, and W830, as described below with respect to steps W800, W810, W820, and W830.
And W800, the terminal equipment receives a mode configuration instruction corresponding to the rebound mode and sends the mode configuration instruction to the switch.
And W810, switching to a rebound mode by the switch according to the mode configuration instruction.
The switch generates an instantaneous interruption signal in the rebound mode and sends the instantaneous interruption signal to the controlled equipment.
And W830, the controlled device receives the instant-off signal and executes corresponding actions according to the instant-off signal.
In one embodiment, the terminal device receives a mode configuration instruction input by a user, sends the mode configuration instruction to the switch, and switches to the rebound mode according to the mode configuration instruction after the switch receives the mode configuration instruction. The switch can generate an instantaneous interruption signal in a rebound mode, and sends the instantaneous interruption signal to the controlled equipment as a control instruction, and the controlled equipment switches different working states according to the instantaneous interruption signal after receiving the instantaneous interruption signal. Through the interaction between the terminal equipment and the switch, the switch of different modes of the switch can be realized, and the switch can realize different control on the controlled equipment under different modes, so that the whole control process is flexible.
With continued reference to fig. 31, in some embodiments, the method further includes, but is not limited to, step W840, as described below with respect to step W840.
And W840, if the terminal equipment judges that the binding relation with the controlled equipment is released or the communication connection is abnormal, the switch keeps a rebound mode.
Specifically, after the terminal device obtains that the binding relationship between the terminal device and the controlled device is released or the communication connection is disconnected, it is indicated that the working state of the controlled device cannot be directly controlled through an application program on the terminal device at this time. The terminal device then keeps the switch in the rebound mode. The relay is controlled to be opened and then closed to generate an instantaneous interruption signal by pressing the mechanical switch, and the controlled equipment is controlled by adopting the instantaneous interruption signal. Namely, when the terminal equipment cannot control the working state of the controlled equipment, the working state of the controlled equipment can be controlled through a mechanical switch.
With continued reference to fig. 32, in some embodiments, step "W830" includes the controlled device receiving the transient interrupt signal and performing a corresponding action according to the transient interrupt signal "including, but not limited to, steps W831 and W832, and is described below with respect to steps W831 and W832.
And W831, the controlled device receives the first instantaneous interruption signal and executes the first action according to the first instantaneous interruption signal.
And W832, the controlled equipment receives a second instantaneous interruption signal and executes a second action according to the second instantaneous interruption signal, wherein the first instantaneous interruption signal is different from the second instantaneous interruption signal, and the first action is different from the second action.
Specifically, in this embodiment, the switch forms different types of transient-off signals, where the different types of transient-off signals are used to control the controlled device to perform different actions. Among them, different types may refer to different times or durations of voltage drop in the instantaneous interruption signal. Wherein the controlled device is a device with a transient break detection module. By generating different instantaneous interruption signals, the types of control instructions of the controlled equipment can be enriched, so that more control modes are generated for the controlled equipment, and the control of the switch is more flexible and changeable.
With continued reference to FIG. 33, in some embodiments, step "W830, in which the controlled device receives the transient interrupt signal and performs a corresponding action based on the transient interrupt signal" includes, but is not limited to, steps W835 and W836, as described below with respect to steps W835 and W836.
And W835, the controlled device compares the instantaneous interruption signal with a target instantaneous interruption signal, wherein the target instantaneous interruption signal is an instantaneous interruption signal matched with the controlled device.
And W836, the controlled device sends a feedback signal to at least one of the terminal device and the switch under the condition that the comparison of the instantaneous interruption signal and the target instantaneous interruption signal fails.
In this embodiment, the controlled device can only recognize a partial type of the transient-cut signal, and when the comparison between the transient-cut signal and the target transient-cut signal fails, it is indicated that the controlled device cannot recognize the transient-cut signal, that is, cannot control the controlled device by using the transient-cut signal. At this time, the controlled device sends a feedback signal to the terminal device, or the controlled device sends a feedback signal to the switch through the gateway to indicate that the instant-off signal cannot be identified, and the working mode of the switch needs to be switched to change other modes to control the controlled device. By adopting the mode, the situation that the controlled device is uncontrollable due to the fact that the instantaneous interruption signal cannot be recognized by the controlled device can be avoided.
With continued reference to fig. 34, the embodiment of the present application further provides a switch system 10, where the switch system 10 includes a switch 14 and a terminal device 11, the switch 14 includes a relay, the terminal device 11 is configured to receive a mode configuration instruction and send the mode configuration instruction to the switch 14, and the switch 14 is configured to switch to a working mode corresponding to the mode configuration instruction according to the mode configuration instruction, where the working mode includes a rebound mode, and the rebound mode is configured to control the relay to be opened for a preset period of time and then closed. This part of the content is described before and will not be described in detail here.
Fig. 35 is a block diagram of the hardware structure of the switch 14 according to the embodiment of the present invention. As shown in fig. 35, the switch 14 may vary considerably in configuration or performance and may include one or more processors 14a (ProcessingUnits, CPU) (the processor 14a may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA), a memory 14b for storing data 1400, one or more storage mediums 1600 (e.g., one or more mass storage devices) for storing applications 1500 or data 1400, a relay J, and a mechanical switch K. Wherein the processor 14a is connected to the relay J, the mechanical switch K, the memory 14b and the storage medium 1600, respectively, and the memory 14b and the storage medium 1600 may be temporarily stored or permanently stored. The program stored on the storage medium 1600 may include one or more modules, each of which may include a series of instruction operations on a server. Still further, the processor 14a may be configured to communicate with the storage medium 1600 and to execute a series of instruction operations on the switch 14 in the storage medium 1600.
When the mechanical switch K is pressed, the processor 14a receives a pressed signal instruction, the relay J is a controlled switch and is connected with the control end of the processor 14a, the processor 14a can control the opening and closing of the relay J by outputting a control signal through the control end, the relay J is connected in a main circuit, the main circuit is connected with a power supply and controlled equipment, and the power supply can be 220V.
The switch 14 may also include one or more built-in power supplies 1000, one or more wired or wireless network interfaces 1100, one or more input/output interfaces 1200, and/or one or more operating systems 1300, such as WindowsserverTM, macOSXTM, unixTM, linuxTM, freeBSDTM, etc.
The input-output interface 1200 may be used to receive or transmit data 1400 via a network. Specific examples of the network described above may include a wireless network provided by a communications provider of the switch 14. In one example, the input/output interface 1200 includes a network adapter (NetworInterfaceController, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the input-output interface 1200 may be a radio frequency (RadioFrequency, RF) module that is used to communicate wirelessly with the internet. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 35 is merely illustrative and is not intended to limit the configuration of switch 14 described above. For example, the switch 14 may also include more or fewer components than shown in fig. 35, or have a different configuration than shown in fig. 35.
Fig. 36 is a schematic hardware structure of a terminal device implementing various embodiments of the present invention.
The terminal device 11 includes, but is not limited to, a radio frequency unit 1210, a network module 1220, an audio output unit 1230, an input unit 1240, a sensor 1250, a display unit 1260, a user input unit 1270, a user input unit 1280, a memory 1290, a processor 2000, and a power supply 1310. It will be appreciated by those skilled in the art that the terminal device structure shown in fig. 36 does not constitute a limitation of the terminal device, and that the mobile terminal may include more or less components than illustrated, or may combine certain components, or may have a different arrangement of components. In the embodiment of the invention, the terminal equipment comprises, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal equipment, a wearable device, a pedometer and the like.
The processor 2000 is configured to determine whether target height information sent by the terminal device is obtained in a preset time period, where the target height information is height information corresponding to the time period and found by the terminal device according to the time period where the current time is located, and if the target height information sent by the terminal device is obtained in the preset time period, adjust the height of the clothes hanger according to the target height information.
It should be understood that, in the embodiment of the present invention, 1210 may be used for receiving and transmitting signals during the process of receiving and transmitting information or communication, specifically, receiving downlink data from a base station, and then processing the downlink data by the processor 2000, and in addition, transmitting uplink data to the base station. Typically, 1210 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, 1210 may communicate with networks and other devices through a wireless communication system.
The terminal device provides wireless broadband internet access to the user through the network module 1220, such as helping the user to send and receive e-mail, browse web pages, access streaming media, etc.
The audio output unit 1230 may convert audio data received by the 1210 or the network module 1220 or stored in the memory 1290 into an audio signal and output as sound. Also, the audio output unit 1230 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the terminal device 11. The audio output unit 1230 includes a speaker, a buzzer, a receiver, and the like.
The input unit 1240 is used to receive an audio or video signal. The input unit 1240 may include a graphics processor (GraphicsProcessingUnit, GPU) 1041 and a microphone 1242, the graphics processor 1241 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 1260. The image frames processed by graphics processor 1241 may be stored in memory 1290 (or other storage medium) or transmitted via 1210 or network module 1220. The microphone 1242 may receive sound and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output that may be transmitted to the mobile communication base station via 1210 in the case of a phone call mode.
The terminal device 11 further comprises at least one sensor 1250, such as a light sensor, a motion sensor and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1261 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1261 and/or the backlight when the terminal device 11 moves to the ear. The accelerometer sensor can detect acceleration in all directions (typically three axes), and can detect gravity and direction when stationary, and can be used for recognizing gestures of terminal equipment (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), etc., and the sensor 1250 can also comprise fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described herein.
The display unit 1260 is used to display information input by a user or information provided to the user. The display unit 1260 may include a display panel 1261, and the display panel 1261 may be configured in the form of a liquid crystal display (LiquidCrystalDisplay, LCD), an organic light-emitting diode (organic light-EmiTTingDiode, OLED), or the like.
The user input unit 1270 may be used to receive input numerical or character information and to generate key signal inputs related to user settings of the terminal apparatus and function control. In particular, the user input unit 1270 includes a touch panel 1271 and other input devices 1272. Touch panel 1271, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (such as operations of the user on touch panel 1271 or thereabout using any suitable object or accessory such as a finger, stylus, or the like). Touch panel 1271 may include two parts, a touch detection device and a touch controller. The touch controller receives touch information from the touch detection device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 2000, and receives and executes commands sent by the processor 2000. In addition, the touch panel 1271 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1271, the user input unit 1270 may also include other input devices 1272. In particular, other input devices 1272 may include, but are not limited to, physical keyboards, function keys (e.g., volume control keys, switch keys, etc.), trackballs, mice, joysticks, and so forth, which are not described in detail herein.
Further, the touch panel 1271 may be overlaid on the display panel 1261, and when the touch panel 1271 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 2000 to determine the type of touch event, and then the processor 2000 provides a corresponding visual output on the display panel 1261 according to the type of touch event. Although in fig. 36, the touch panel 1271 and the display panel 1261 are two independent components for implementing the input and output functions of the terminal device, in some embodiments, the touch panel 1271 may be integrated with the display panel 1261 to implement the input and output functions of the terminal device, which is not limited herein.
The user input unit 1280 is an interface through which an external device is connected to the terminal apparatus 11. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The user input unit 1280 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal apparatus 11 or may be used to transmit data between the terminal apparatus 11 and an external device.
Memory 1290 may be used to store software programs as well as various data. The memory 1290 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), etc., and a storage data area that may store data created according to the use of the cellular phone (such as audio data, a phonebook, etc.), etc. Further, memory 1290 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 2000 is a control center of the terminal device, connects various parts of the entire terminal device using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in the memory 1290 and calling data stored in the memory 1290, thereby performing overall monitoring of the terminal device. The processor 2000 may include one or more processing units and preferably the processor 2000 may integrate an application processor that primarily processes operating systems, user interfaces, application programs, etc., and a modem processor that primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 2000.
The terminal device 11 may further include a power source 1310 (e.g., a battery) for powering the various components, and preferably the power source 1310 may be logically coupled to the processor 2000 via a power management system so as to perform functions such as managing charging, discharging, and power consumption via the power management system.
In addition, the terminal device 11 includes some functional modules, which are not shown, and will not be described in detail herein.
The embodiment of the present invention further provides a terminal device, which includes a processor 2000, a memory 1290, and a computer program stored in the memory 409 and capable of running on the processor 2000, where the computer program when executed by the processor 410 implements the processes of the above working mode configuration method and the switch control method embodiment, and can achieve the same technical effects, so that repetition is avoided, and no redundant description is provided herein.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the above working mode configuration method and each process of the switch control method embodiment, and can achieve the same technical effects, so that repetition is avoided, and no further description is given here. Wherein, the computer readable storage medium is Read-only memory (ROM), random Access Memory (RAM), magnetic disk or optical disk, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (18)

CN202010471849.2A2020-05-292020-05-29 Working mode setting method and switch, switch system control method and switch systemActiveCN113745055B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202010471849.2ACN113745055B (en)2020-05-292020-05-29 Working mode setting method and switch, switch system control method and switch system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202010471849.2ACN113745055B (en)2020-05-292020-05-29 Working mode setting method and switch, switch system control method and switch system

Publications (2)

Publication NumberPublication Date
CN113745055A CN113745055A (en)2021-12-03
CN113745055Btrue CN113745055B (en)2025-08-22

Family

ID=78724357

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202010471849.2AActiveCN113745055B (en)2020-05-292020-05-29 Working mode setting method and switch, switch system control method and switch system

Country Status (1)

CountryLink
CN (1)CN113745055B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115295357B (en)*2022-08-032025-07-15深圳绿米联创科技有限公司 Control method and device of electric switch, switch control equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
EP1973208A2 (en)*2007-03-172008-09-24Aizo AGMethod for operating and programming switches, in particular light switches
CN104933888A (en)*2015-04-302015-09-23苏州科技学院Intelligent parking lot information collector based on double-frequency GSM/GPRS module
CN108011788A (en)*2017-12-122018-05-08宁波智轩物联网科技有限公司A kind of switch display system based on smart home

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US9544975B2 (en)*2010-02-042017-01-10Ywire Technologies Inc.Lighting control switch apparatus and system
DE102013219289B4 (en)*2013-09-252020-12-03Siemens Aktiengesellschaft Circuit breaker, detection unit, diagnostic device and gateway against accidental arcing
WO2015200689A1 (en)*2014-06-272015-12-30Belkin International, Inc.Light switch controlling light source via wireless transmission
US10295210B2 (en)*2015-07-132019-05-21British Gas Trading LimitedUser interface for an environmental control system
CN108766835A (en)*2018-06-052018-11-06深圳绿米联创科技有限公司Intelligent switch and its control method
CN110049608B (en)*2019-06-042022-09-09青岛亿联客信息技术有限公司Intelligent lamp and control method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
EP1973208A2 (en)*2007-03-172008-09-24Aizo AGMethod for operating and programming switches, in particular light switches
CN104933888A (en)*2015-04-302015-09-23苏州科技学院Intelligent parking lot information collector based on double-frequency GSM/GPRS module
CN108011788A (en)*2017-12-122018-05-08宁波智轩物联网科技有限公司A kind of switch display system based on smart home

Also Published As

Publication numberPublication date
CN113745055A (en)2021-12-03

Similar Documents

PublicationPublication DateTitle
CN110401583B (en)Method, device, system, mobile terminal and storage medium for replacing equipment
JP7403648B2 (en) Synchronization method and electronic equipment
CN106657398B (en)Internet of things control system, method and device
CN110049476B (en)Equipment pushing method, device, mobile terminal and storage medium
CN110190986A (en) Device configuration method, apparatus, system, electronic device and storage medium
CN107332976B (en)Karaoke method, device, equipment and system
CN111083755A (en) A device switching method and related equipment
CN113745056B (en) Switch control method, switch control device, switch and computer-readable storage medium
CN110488692B (en)Device control method, device, system, electronic device and storage medium
CN109521684B (en)Household equipment control method and terminal equipment
CN108322608A (en) A screen on and off control method, mobile terminal
CN104713188A (en)Control method and system of air conditioner
CN112286122A (en)Intelligent household control method, device, terminal and storage medium
CN113438564B (en)Control system, terminal processing method, wireless switch and processing method thereof
CN115665595A (en) Wireless switch, its processing method, and control system
CN113745055B (en) Working mode setting method and switch, switch system control method and switch system
CN109917912A (en)A kind of method and wearable device of wearable device breath screen
CN107967418B (en)Face recognition method and mobile terminal
CN110609482A (en)Electric equipment control method and device and electronic equipment
CN111327744B (en)Function control assembly and electronic equipment
CN109745699A (en) A method and terminal device for responding to touch operation
CN110266885B (en) Terminal binding method and terminal
CN110335378B (en)Unlocking mode distribution method, device and system
CN109933196B (en) A screen control method, device and terminal device
CN110267142A (en) A mobile terminal and control method

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp