CN119676014A - Device control method, device, storage medium and electronic device - Google Patents
Device control method, device, storage medium and electronic device Download PDFInfo
- Publication number
- CN119676014A CN119676014A CN202311233436.0A CN202311233436A CN119676014A CN 119676014 A CN119676014 A CN 119676014A CN 202311233436 A CN202311233436 A CN 202311233436A CN 119676014 A CN119676014 A CN 119676014A
- Authority
- CN
- China
- Prior art keywords
- control
- controlled
- instruction
- equipment
- information
- 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.)
- Pending
Links
Landscapes
- Selective Calling Equipment (AREA)
Abstract
本公开提供一种设备控制方法、装置、存储介质和电子设备,其中,所述方法包括:响应于接收到用户终端发送的设备绑定指令,将被控设备的设备信息发送至至少一个主控设备;接收所述被控设备的控制结果;将所述控制结果同步至所述用户终端。本公开实施例提供的方法,有助于解决不能灵活的控制被控设备的问题。
The present disclosure provides a device control method, apparatus, storage medium and electronic device, wherein the method comprises: in response to receiving a device binding instruction sent by a user terminal, sending device information of a controlled device to at least one master control device; receiving a control result of the controlled device; and synchronizing the control result to the user terminal. The method provided by the embodiment of the present disclosure helps to solve the problem of not being able to flexibly control the controlled device.
Description
Technical Field
The technical scheme of the disclosure relates to the technical field of local area network control, in particular to a device control method, a device, a storage medium and electronic equipment.
Background
In order to facilitate the control of the controlled devices such as the lamp, the fan and the curtain by a user, a corresponding physical switch is usually arranged for each controlled device, and the user can flexibly control the controlled device by toggling the physical switch.
In the prior art, these physical switches are usually connected to the controlled devices by circuits, so that the control of the master device is only effective for a specific controlled device. This makes it necessary for the user to walk to the position of a particular physical switch and toggle the particular physical switch when he wants to adjust a particular device to be controlled. This is not convenient enough for the user.
Disclosure of Invention
In view of the above, the present disclosure provides a device control method, apparatus, storage medium, and electronic device, so as to solve the problem that a controlled device cannot be flexibly controlled.
According to a first aspect of embodiments of the present disclosure, there is provided an apparatus control method, applied to a server, the method including:
the method comprises the steps of responding to a device binding instruction sent by a user terminal, and sending device information of a controlled device to at least one main control device, wherein the controlled device and the at least one main control device are at least two devices to be bound selected by the device binding instruction;
The control result is set by the controlled device based on a control instruction sent by any one of the main control devices, and the control instruction is generated by the main control device based on user operation and the device information;
and synchronizing the control result to the user terminal.
According to a second aspect of embodiments of the present disclosure, there is provided a device control method applied to a master device, the method including:
The method comprises the steps of receiving equipment information of controlled equipment, wherein the equipment information is sent after a server determines the controlled equipment from at least two pieces of equipment to be bound selected by the equipment binding instruction after receiving the equipment binding instruction sent by a user terminal;
Generating a control instruction for the controlled device based on the device information;
And sending the control instruction to the controlled equipment so that the controlled equipment can adjust based on the control instruction to obtain a corresponding control result, and forwarding the control result to the user terminal through the server.
According to a third aspect of the embodiments of the present disclosure, there is provided an apparatus control method applied to a controlled apparatus, the method including:
After receiving a device binding instruction sent by a user terminal, a server determines the controlled device and at least one master device from at least two devices to be bound selected by the device binding instruction, and then sends the device binding instruction to each master device;
Adjusting based on the control instruction to obtain a control result;
and forwarding the control result to the user terminal through the server.
According to a fourth aspect of embodiments of the present disclosure, there is provided a device control system, the system comprising a server and a plurality of devices;
the server is used for receiving a device binding instruction sent by a user terminal, selecting a controlled device and at least one master control device from the devices based on the device binding instruction, sending device information of the controlled device to the at least one master control device, and forwarding a control result of the controlled device to the user terminal after receiving the control result;
The main control equipment is used for receiving the equipment information, generating a control instruction based on the equipment information and sending the control instruction to the controlled equipment;
the controlled device is used for adjusting based on the received control instruction to obtain a control result, and sending the control result to the server.
According to a fifth aspect of the embodiments of the present disclosure, there is provided an apparatus control device, applied to a server, the device including:
The device comprises a first response module, a second response module and a first response module, wherein the first response module is used for responding to a device binding instruction sent by a user terminal and sending device information of a controlled device to at least one main control device;
the control device comprises a first receiving module, a second receiving module and a control module, wherein the first receiving module is used for receiving a control result of the controlled device, the control result is set by the controlled device based on a control instruction sent by any one of the main control devices, and the control instruction is generated by the main control device based on user operation and the device information;
and the first synchronization module is used for synchronizing the control result to the user terminal.
According to a sixth aspect of embodiments of the present disclosure, there is provided a device control apparatus, applied to a master device, the apparatus including:
The device information is sent by a server after the device binding instruction sent by the user terminal is received, and the device information is sent after the device to be bound is determined from at least two devices to be bound selected by the device binding instruction;
the instruction generation module is used for generating a control instruction for the controlled equipment based on the equipment information;
and the first sending module is used for sending the control instruction to the controlled equipment so as to enable the controlled equipment to adjust based on the control instruction, obtain a corresponding control result and forward the control result to the user terminal through the server.
According to a seventh aspect of embodiments of the present disclosure, there is provided an apparatus control device applied to a controlled apparatus, the device including:
The device information is sent to each master control device after the server receives the device binding instruction sent by the user terminal and determines the controlled device and at least one master control device from at least two devices to be bound selected by the device binding instruction;
The adjusting module is used for adjusting based on the control instruction to obtain a control result;
and the second sending module is used for forwarding the control result to the user terminal through the server.
According to an eighth aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
A processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the steps of any of the device control methods of the first aspect by executing the executable instructions.
According to a ninth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the device control method of any of the above-described first aspects.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
The user can select any at least two devices to bind through the user terminal, and as the at least two devices comprise the controlled device and at least one main control device, the user can select any one or more main control devices as the switch of the controlled device, and the binding is completed by sending the information of the controlled device to the main control device.
Through the mode of arbitrary binding, the binding relation between any one main control device and the controlled device is flexibly changed, and compared with the scheme that each main control device (physical switch) is matched with fixed controlled devices in the prior art, the method and the device can control the controlled devices more flexibly.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is an application scenario diagram of a device control method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart of a device control method according to an exemplary embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a rotary knob switch in a device control method according to an exemplary embodiment of the present disclosure;
FIG. 4 is an application scenario diagram of another device control method illustrated by the present disclosure according to an exemplary embodiment;
FIG. 5 is a flowchart of another device control method illustrated by the present disclosure according to an exemplary embodiment;
FIG. 6 is a flowchart of another device control method illustrated by the present disclosure according to an exemplary embodiment;
FIG. 7 is an interactive schematic diagram of a device control method according to an exemplary embodiment of the present disclosure;
FIG. 8 is an interactive schematic diagram of another device control method illustrated by the present disclosure according to an exemplary embodiment;
FIG. 9 is an interactive schematic diagram of another device control method illustrated by the present disclosure according to an exemplary embodiment;
Fig. 10 is a schematic structural view of a device control apparatus according to an exemplary embodiment of the present disclosure;
Fig. 11 is a schematic structural view of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The term "if" as used herein may be interpreted as "at..once" or "when..once" or "in response to a determination", depending on the context.
In order to facilitate the user to control the controlled devices such as the lamp, the fan, the curtain and the camera (controlling the rotation angle), a corresponding physical switch is usually arranged for each controlled device, and the user can flexibly control the controlled device by toggling the physical switch.
In order to control the fan to rotate at different wind speeds, the fan and the switch are connected in series in a circuit loop usually in a circuit connection mode, and a user can adjust the current and voltage in the circuit by adjusting the switch so as to control the fan switch and the rotation speed, and the switch can be called as a main control switch for controlling the fan.
In the prior art, the master control device is usually arranged at a fixed position, such as an office entrance, so that a user can conveniently adjust the master control switch when walking into the office.
However, the degree of cooling and heating is different in different periods of the day, so as the degree of cooling and heating changes, the user needs to continuously adjust the on-off state or the rotating speed of the fan to match with the current room temperature, and the user needs to walk to the position of the main control equipment (fan switch) at the office entrance each time to adjust the fan, which is obviously inconvenient for the user.
Based on this, the present disclosure provides a plurality of devices independently connected to a power source, which can communicate through a local area network or the internet of things. That is, any two devices are not connected in series by way of circuit connection, and the relationship between the devices is not limited, so that the binding between any two devices is realized.
At this time, the user terminal may arbitrarily select at least two devices as devices to be bound, and then generate a device binding instruction for binding the devices to be bound. After the user terminal sends the device binding instruction to the server, the server can determine the controlled devices and at least one master control device included in at least two devices to be bound.
In order to enable each master control device in at least one master control device to independently control a controlled device, a server sends device information of the controlled device to each master control device, after the master control device receives the device information of the controlled device to be controlled, binding between the master control device and the controlled device is completed, and at the moment, control instructions of the master control device are considered to be used for controlling the controlled device.
After the controlled equipment is bound with each main control equipment, any main control equipment can independently send a control instruction to the controlled equipment, and after the controlled equipment receives the control instruction sent by any main control equipment, the controlled equipment carries out corresponding adjustment according to the control instruction to obtain a control result. For example, the control command is to set the wind power of the fan (controlled device) to be in the second gear, and then the fan is adjusted to be in the second gear.
Since the above process only occurs between the master device and the slave device, the slave device also needs to upload the control result to the server to synchronize this control result to the user terminal through the server. The user can check the current state of the controlled device at any time through the user terminal.
The following is a detailed description:
Fig. 1 is an application scenario diagram of a device control method according to an exemplary embodiment of the present disclosure, and fig. 1 shows that the present disclosure provides a device control system 101 and a user terminal. Wherein the system 101 comprises a server and a plurality of devices included under the same local area network 102.
The server is configured to receive a device binding instruction sent by a user terminal, send device information of a controlled device to at least one master device, and forward a control result to the user terminal after receiving the control result of the controlled device, where the controlled device and the at least one master device are selected from the plurality of devices based on the device binding instruction.
The master control device is used for receiving the device information, generating a control instruction based on the device information, and sending the control instruction to the controlled device.
The controlled device is used for adjusting based on the received control instruction to obtain a control result, and sending the control result to the server.
Fig. 2 is a flowchart of a device control method according to an exemplary embodiment of the present disclosure, applied to a server, as shown in fig. 2, the method including the steps of:
Step 201, in response to receiving a device binding instruction sent by a user terminal, device information of a controlled device is sent to at least one master control device, wherein the controlled device and the at least one master control device are at least two devices to be bound selected by the device binding instruction.
User terminal refers to the final device or node in the network that connects to the server. Various different types of devices are possible including, but not limited to, computers, notebook computers, smart phones, tablet computers, smart televisions, and other network connected devices. These terminal devices are connected to the network through various transmission media such as wired or wireless networks and then communicate with a server or host using specific protocols and interfaces.
The server displays a plurality of devices through the user terminal, and a user can randomly select at least two devices from the plurality of devices as devices to be bound.
Illustratively, when the above method is applied in a home scene, the plurality of devices may be devices each controllable by an electrical signal in a home, wherein the devices to be controlled may be air conditioners, intelligent lamps, intelligent curtains, intelligent windows, microwave ovens, air fryers, sound equipment, etc. The main control equipment can be any one of a control panel, a remote controller, an intelligent switch and the like.
The user may select one controlled device among a plurality of devices, and one or more master devices. The device information (including but not limited to device identification, device attribute, device control method) of the controlled device is stored in a server, and after the server sends the device information of the controlled device to each master device selected by the device binding instruction, binding between at least one master device and the controlled device is completed. The master control device can control the controlled device through the device information of the controlled device stored by the master control device.
The device information can also comprise definition and specification of products or services, for example, the master control device needs to control the lamps, besides establishing the binding relationship between the products or services, the master control device also needs to know specific control contents in control instructions, and the control contents are information which is supported by the master control device and can be identified by the controlled device.
And 202, receiving a control result of the controlled device, wherein the control result is set by the controlled device based on a control instruction sent by any one of the main control devices, and the control instruction is generated by the main control device based on user operation and the device information.
After binding at least one master device and a controlled device, when a user operates any one of the master devices, the master device can generate a corresponding (one or a group of) control instruction(s) according to the device information and the user operation, and send the control instruction(s) to the controlled device. After receiving the (one or a group of) control instructions sent by any one of the main control devices, the control device performs setting according to the control instructions to obtain corresponding control results.
For example, the master control device is a first control panel, and the slave control device is a first air conditioner. When a user presses an 'open' key in the first control panel, an 'open' instruction is sent to the first air conditioner, and the first air conditioner is started.
For another example, when the master control device is a first switch and the controlled device is an air conditioner, the user presses the first switch to switch the on state from the on state to the off state, a control command for the first air conditioner is generated, and the first air conditioner is turned off after receiving the control command.
And step 203, synchronizing the control result to the user terminal.
The server transmits the control result to the user terminal. The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
The user can select any at least two devices to bind through the user terminal, and as the at least two devices comprise the controlled device and at least one main control device, the user can select any one or more main control devices as the switch of the controlled device, and the binding is completed by sending the information of the controlled device to the main control device.
Through the mode of arbitrary binding, the binding relation between any one main control device and the controlled device is flexibly changed, and compared with the scheme that each main control device (physical switch) is matched with fixed controlled devices in the prior art, the method and the device can control the controlled devices more flexibly.
Illustratively, the benefits of the present disclosure are presented through the following scenarios:
When the user takes a rest in the second room, if the user suddenly thinks that the air conditioner in the first room is not closed, the user does not need to walk to the first room to control the air conditioner through the first switch, a new equipment binding instruction can be sent again, the selected controlled equipment is still the air conditioner in the first room, and the selected main control equipment is replaced by the second switch in the second room. At this time, the user can directly control the air conditioner to be turned off through the second switch in the second room.
Further, since the user is currently in the second room, even if a control instruction for turning off the air conditioner is transmitted through the second switch, it is impossible to see whether the air conditioner is successfully turned off through the air conditioner panel of the first room. Therefore, in the present disclosure, the control result is sent to the server by the controlled device, and the control result is synchronized to the user terminal (e.g., mobile phone), so that the user can see the corresponding control result (indicating that the user terminal is closed or not closed).
It should be noted that, after the master control device sends a control instruction to the controlled device, the controlled device will feed back a corresponding response packet to the master control device, inform the master control device that it has received the corresponding control instruction, and execute according to the control instruction.
Optionally, the at least one master control device is a plurality of switches located at different positions, and each switch is used for independently controlling the controlled device.
When the main control equipment selected by the equipment binding instruction is a plurality of switches positioned at different positions, by sending equipment information of the controlled equipment to each switch of the plurality of switches, each switch can independently control the controlled equipment, and the remote control of the same controlled equipment is realized.
For example, the controlled device selected by the device binding instruction is a living room lamp, the selected main control device is a switch I positioned in the living room and a switch II positioned at the bed head of the bedroom, and the switch I and the switch II can independently control the switch, the cooling and heating tone and the light brightness of the living room lamp.
Therefore, when a user is in a living room, the living room lamp can be turned on through the first switch, and when the user is at rest on a bedroom bed, the living room lamp can be turned off through the second switch. The method does not need to re-bind the main control equipment after the user finds that the living room lamp is not turned off, and is more suitable for long-term binding of the user according to the living habit of the user.
Optionally, the main control device is a knob switch, the control command at least comprises a target adjustment amplitude, so that the controlled device obtains the control result after adjusting according to the target adjustment amplitude, and the target adjustment amplitude is set by the knob switch based on the mapping relation between the rotation quantity of the knob switch and the controlled device.
Knob switches, also known as rotary controls, typically consist of a circular knob and an internal mechanism. By rotating the knob, the circuit can be opened or closed. When the main control device is a knob switch, a control command is generated every time the user twists more than a certain angle (or rotation amount) due to the characteristic of the knob switch. Thus, the control instructions sent by the master device to the controlled device are in effect a set of control instructions (including one or more control instructions) that control the controlled device to make successive adjustments in response to one or more control instructions in the set of control instructions.
In the knob switch of the present disclosure, an induction device such as a photoelectric sensor or a magnetic sensor is provided inside. When the knob is rotated, the sensing device detects the rotation and indicates the angle or position of rotation by outputting a pulse signal or an encoder signal. These signals may be used by the receiving and processing circuitry to control, record or display the status of the knob.
The knob switch is also provided with a corresponding microcontroller which can convert the pulse signal (or the encoder signal) output by the sensing device into a digital signal so as to generate a target adjusting amplitude which can be identified by the standby equipment according to the digital signal.
Fig. 3 is a schematic diagram of a rotary knob switch in a device control method according to an exemplary embodiment of the present disclosure. Compared with other switches for controlling the controlled equipment to run in different gears, the knob switch can provide accurate control, and is particularly suitable for scenes needing fine adjustment or fine adjustment. By rotating the knob, the brightness, volume, temperature and other parameters of the controlled equipment can be accurately adjusted, so that personalized requirements are met.
In the conversion process, the microcontroller also needs to consider the mapping relation between the rotation quantity (rotation angle) of the knob switch and the adjustable amplitude of the controlled equipment, and the following is exemplified:
assuming that the knob switch can rotate by 0-180 degrees, the lowest brightness of the lamplight is 0, and the highest brightness is 100 (assumed value), the mapping relation between the two can be expressed as:
For every 1 degree of rotation of the knob switch, the brightness of the lamplight can be correspondingly increased or decreased by 0.555 brightness value. (finer segments are also possible, for example, for each 0.1 rotation, the lamp brightness increases or decreases by 0.0555 brightness values).
By the control mode, compared with the scheme that the light brightness is directly switched into 1-gear, 2-gear and 3-gear brightness in the prior art, the brightness control is more refined.
In the present disclosure, the rotation amount is a rotation angle of the knob switch, and the target adjustment amplitude is proportional to the magnitude of the rotation amount, and the target adjustment amplitude may be understood as a step value. When the at least one main control device is a plurality of rotary switches, each rotary switch can independently control the controlled device. And because the control command sent to the controlled equipment by each knob switch is generated based on the target adjustment amplitude, the controlled equipment only correspondingly reduces and increases the corresponding target adjustment amplitude, and the control of the plurality of knob switches on one controlled equipment is continuously connected.
For example, the first knob switch and the second knob switch are both used for controlling the camera, and it is assumed that the first knob switch and the first knob switch have a mapping relationship of 1 DEG for each rotation of the first knob switch and 1 DEG for each rotation of the second knob switch, and the first knob switch and the second knob switch have a mapping relationship of 2 DEG for each 1 DEG for each rotation of the second knob switch and 2 DEG for each corresponding increase or decrease of the first knob switch and the second knob switch. (for example only, the two mappings may be the same).
Then, the user rotates the knob Guan Yi forward by 30 ° (the rotation amount is 30 °), and the angle of the camera is rotated 30 ° from the current angle (assumed to be 0 °) to the first direction (in synchronization with the forward direction of the knob switch), resulting in a control result that the current angle of the camera is 30 °.
At this time, the user walks to the second position of the knob switch and rotates the knob switch reversely by 10 degrees, so that the angle of the camera rotates by 20 degrees from the current angle (30 degrees) to the second direction (reversely synchronous with the first direction of the knob switch), and the control result that the current angle of the camera is 10 degrees is obtained.
It can be seen that the plurality of knob switches can continuously control the same controlled device, and user experience is improved.
Optionally, the at least two devices are located in the same local area network, the control instruction is that the master control device sends the control instruction to the controlled device through the local area network, the local area network is configured with a gateway, and the gateway is used for receiving information sent by the server through the internet and forwarding the information of the devices to the server, so that communication between the devices in the local area network and the server is realized.
When the step 201 is executed to send the device information of the controlled device to at least one master device, the method includes the step of forwarding the device information of the controlled device to the master device through a gateway of the local area network.
When the step 202 is executed to receive the control result of the controlled device, the method includes the step of receiving the control result forwarded by the gateway from the controlled device.
Fig. 4 is an application scenario diagram of another device control method according to an exemplary embodiment of the present disclosure, where, as shown in fig. 4, the local area network includes a plurality of devices, that is, a master device 301 (a knob switch), a master device 302 (a switch), a controlled device 402 (a fan), a controlled device 403 (an air conditioner), and a controlled device 404 (a camera).
The local area network may be a wireless communication network, zigbee (zigbee technology ), mesh technology (a new wireless local area network type), a plc (programmable logic controller ) network using power line communication, an rs485 (Recommended Standard485, a communication interface standard) network, or the like. The local network architecture, whether wireless or wireline communication network, is typically comprised of gateways and devices. The gateway connects the server to the upper part, forwards the up-down messages between the device and the server, and manages the devices to which the lower part belongs.
The gateway is used for conveniently managing the equipment under the local area network, and also comprises a network coordinator, wherein the coordinator is responsible for the construction of a local network, the management of sub-equipment, the transceiving of data protocols and the like. The network topology of the configuration varies from network to network, for example, the zigbee coordinator may form a star or mesh network, and the plc network may form a star or tree network from CCO. Whether wired or wireless, the kid devices are managed and controlled by the network coordinator in nature.
The device binding instruction is that the server displays a plurality of devices under the same local area network for the user terminal, the user selects at least two devices to be bound to issue to the server, and then the server interacts with the master control device or the controlled device through a gateway of the local area network.
Optionally, fig. 5 is a flowchart of another device control method according to the present disclosure, and as shown in fig. 5, the present disclosure provides a device control method applied to any one of the master devices, including the steps of:
And step 501, receiving equipment information of the controlled equipment, wherein the equipment information is sent after a server determines the controlled equipment from at least two equipment to be bound selected by the equipment binding instruction after receiving the equipment binding instruction sent by the user terminal.
Step 502, generating a control instruction for the controlled device based on the device information.
Step 503, sending the control instruction to the controlled device, so that the controlled device adjusts based on the control instruction, obtains a corresponding control result, and forwards the control result to the user terminal through the server.
The relevant content related to the above steps 501-503 is described in the foregoing embodiments, and will not be repeated here.
Optionally, the at least two devices to be bound selected by the device binding instruction include a controlled device and at least one master device, and the devices are all located in the same local area network. Accordingly, when performing step 501 to receive device information of a controlled device, the steps include:
and receiving the device information of the controlled device forwarded by the gateway from the server.
When the step 503 is executed to send the control instruction to the controlled device, the method includes the step of sending the control instruction to the controlled device through the same local area network where the controlled device is located.
Optionally, when the master device is a rotary switch, executing step 502 generates a control instruction for the controlled device based on the device information, and includes the following steps:
The method comprises the steps of obtaining the rotation quantity of a knob switch in a target period, determining a target adjusting amplitude to be acted on controlled equipment based on a mapping relation between the rotation quantity and the controlled equipment, generating a control instruction containing the target adjusting amplitude, and obtaining a control result after the controlled equipment is adjusted according to the target adjusting amplitude.
Optionally, fig. 6 is a flowchart of another device control method according to an exemplary embodiment of the present disclosure, and as shown in fig. 6, the method is applied to a controlled device, and the method includes the following steps:
And 601, receiving a control instruction generated by any one of the master control devices based on the device information of the controlled device, wherein the device information is sent to each master control device after the server receives the device binding instruction sent by the user terminal and determines the controlled device and at least one master control device from at least two devices to be bound selected by the device binding instruction.
And step 602, adjusting based on the control instruction to obtain a control result.
And step 603, forwarding the control result to the user terminal through the server.
The relevant contents related to the above steps 601 to 602 are already described in the foregoing embodiments, and are not repeated here.
For a better explanation of the foregoing method, the following detailed description is provided in connection with a multiparty interaction diagram:
fig. 7 is an interaction diagram of a device control method according to an exemplary embodiment of the present disclosure, and as shown in fig. 7, description will be given by taking an example that a controlled device is:
the method comprises the following steps:
Step 701, a device binding instruction is sent. The device binding instruction is an instruction generated by a user through a user terminal and used for binding the controlled device and the main control device together, and the user terminal sends the device binding instruction to the server.
Step 702, transmitting identification information of a controlled device. After receiving the device binding instruction sent by the user terminal, the server sends the identification information of the controlled device to the gateway according to the controlled device in the device binding instruction.
Step 703, converting the identification information sent by the server into identifiable identification information by the gateway.
Step 704, the identification information of the controlled device is sent, namely, the gateway sends the identification information (of the controlled device) identifiable by the master device to the master device.
Step 705, storing identification information of the controlled device. The main control device stores the identification information, so that the main control device knows that the main control device can control the controlled device stored with the identification information.
And step 706, inquiring the control method and attribute information of the controlled device, wherein the master control device wants to control the controlled device more accurately and needs to send an instruction for acquiring the control method and attribute information of the controlled device to the server.
And step 707, transmitting the control method and attribute information of the controlled device, wherein the server transmits the control method and attribute information of the controlled device to the master control device.
And 708, storing the control method and the attribute information of the controlled device, namely storing the control method and the attribute information of the controlled device by the master control device, so as to jointly store the control method, the attribute information and the identification information as the device information of the controlled device, and further controlling the controlled device.
In step 709, n control commands are generated, where when the master device is a rotary switch, each rotation by an amount generates a corresponding control command. These n control instructions may be considered as a set of control instructions (which need to be sent to the controlled device). n is a positive integer.
Step 710, send control instruction 1.
In step 711, the controlled device adjusts amplitude 1 (amplitude 1 is related to the value in the 1 st control command).
At step 712, the (controlled device adjusts) master device sends a reply packet. A corresponding response packet (not shown in the figure) may also be sent to the server through the gateway, so that the server feeds back the latest state indicated by the response information to the user terminal.
....A master control device transmits 2 to n-1 control instructions: the controlled makes corresponding adjustments and feeds back corresponding response packets).
In step 713, the nth control instruction is sent.
In step 714, the (controlled device) adjusts the amplitude n (amplitude n is related to the value in the nth control instruction).
In step 715, the (controlled device adjusts) device sends a response packet to the master device.
The content related to the steps 701 to 715 is described in the foregoing embodiments, and will not be repeated here.
Optionally, when the gateway in fig. 7 includes a coordinator, fig. 8 is an interactive schematic diagram of another device control method according to an exemplary embodiment of the disclosure, and when steps 702-704 in fig. 7 are performed, the method includes the following steps:
Step 702, transmitting identification information of a controlled device.
Step 703, converting into identifiable identification information.
In step 7031, the identification information of the controlled device is sent, and when the coordinator also exists in the gateway, the identification information of the controlled device which wants to be sent can be accurately forwarded to the master device through the coordinator.
Step 704, transmitting identification information of the controlled device.
Optionally, when the number of master devices in fig. 7 is 2, fig. 9 is an interaction schematic diagram of another device control method according to an exemplary embodiment of the disclosure, as shown in fig. 9, where the method includes the following steps:
Step 901, storing device information of the controlled device, wherein the master control device 1 stores the device information of the controlled device. The device information includes identification information, a control method, attribute information, and the like, and a method for specifically acquiring the device information is shown in fig. 7, and a binding instruction for binding the controlled device and the master device 1 is sent by the user terminal, and specific content is similar to the principle in fig. 7 and is not repeated.
Step 902, storing the device information of the controlled device, namely storing the device information of the controlled device by the master control device 2. The binding instruction for binding the controlled device and the master device 2 together is issued by the user terminal. (the order between step 901 and step 902 is arbitrary and may occur simultaneously).
In step 903, m pieces of device information for the controlled device are generated, where m is a positive integer.
And 904, transmitting a1 st control instruction, namely transmitting the 1 st control instruction to the controlled equipment by the main control equipment 1.
Step 905, (controlled device) adjusts amplitude 1.
Step 906, a response packet is sent (to the master device 1).
In step 907, the mth control instruction is sent.
Step 908, (controlled device) adjusts the amplitude m to obtain a first adjustment result.
Step 909, send the response packet (to the master device 1).
Step 910, (master device 2) generates n control instructions for the controlled device.
In step 911, the 1 st control instruction (to the controlled device) is sent.
Step 912, the controlled device adjusts amplitude 2. The controlled device adjusts amplitude 2 based on the first adjustment result (amplitude 2 is related to the value in the 1 st control command initiated by the master device 2).
Step 913, a reply packet is sent (to the master device 2).
Step 914, send the nth control instruction (to the controlled device).
In step 915, (the controlled device) adjusts the amplitude n based on the last adjustment result.
In step 916, a response packet is sent (to the master device 2).
The content related to the above steps 901 to 916 is described in the foregoing embodiments, and will not be repeated here.
For the foregoing method embodiments, for simplicity of explanation, the methodologies are shown as a series of acts, but one of ordinary skill in the art will appreciate that the present disclosure is not limited by the order of acts described, as some steps may occur in other orders or concurrently in accordance with the disclosure.
Further, those skilled in the art will also appreciate that the embodiments described in the specification are all alternative embodiments, and that the acts and modules referred to are not necessarily required by the present disclosure.
Corresponding to the foregoing embodiment of the application function implementation method, the present disclosure further provides an embodiment of the device control apparatus and a corresponding terminal.
Optionally, fig. 10 is a schematic structural diagram of a device control apparatus according to an exemplary embodiment of the present disclosure, and is applied to a server, where the apparatus includes:
The first response module 1001 is configured to send device information of a controlled device to at least one master device in response to receiving a device binding instruction sent by a user terminal, where the controlled device and the at least one master device are at least two devices to be bound selected by the device binding instruction.
The first receiving module 1002 is configured to receive a control result of the controlled device, where the control result is set by the controlled device based on a control instruction sent by any one of the master devices, and the control instruction is generated by the master device based on a user operation and the device information.
A first synchronization module 1003, configured to synchronize the control result to the user terminal.
Optionally, the at least one master control device is a plurality of switches located at different positions, and each switch is used for independently controlling the controlled device.
Optionally, the main control device is a knob switch, the control command at least comprises a target adjustment amplitude, so that the controlled device obtains the control result after adjusting according to the target adjustment amplitude, and the target adjustment amplitude is set by the knob switch based on the mapping relation between the rotation quantity of the knob switch and the controlled device.
Optionally, the at least two devices are in the same local area network, and the control instruction is sent to the controlled device by the master control device through the local area network.
The first response module 1001 is configured to, when configured to send device information of a controlled device to at least one master device:
And forwarding the equipment information of the controlled equipment to the main control equipment through the gateway of the local area network.
The first receiving module 1002, when configured to receive a control result of the controlled device, is configured to:
And receiving a control result forwarded by the gateway from the controlled device.
Optionally, the present disclosure provides a device control apparatus, applied to a master device, the apparatus including:
The device information is sent by a server after the device binding instruction sent by the user terminal is received, and the device to be bound is determined from at least two devices selected by the device binding instruction.
And the instruction generation module is used for generating a control instruction for the controlled equipment based on the equipment information.
And the first sending module is used for sending the control instruction to the controlled equipment so as to enable the controlled equipment to adjust based on the control instruction, obtain a corresponding control result and forward the control result to the user terminal through the server.
Optionally, the second receiving module is configured to, when configured to receive device information of the controlled device:
and receiving the device information of the controlled device forwarded by the gateway from the server.
The first sending module is used for sending the control instruction to the controlled device, and is used for:
and sending the control instruction to the controlled equipment through the same local area network where the controlled equipment is located.
Optionally, the method is applied to any master control device of the at least two devices to be bound, and the master control device is a knob switch.
The instruction generation module is used for generating a control instruction for the controlled device based on the device information, and is used for:
the rotation amount of the knob switch in a target period is acquired.
And determining a target adjustment amplitude to be acted on the controlled equipment based on the mapping relation between the rotation quantity and the controlled equipment.
And the controlled equipment obtains the control result after adjusting according to the target adjusting amplitude.
Optionally, the disclosure provides a device control apparatus, applied to a controlled device, the apparatus including:
And the device information is transmitted to each master control device after the server receives the device binding instruction transmitted by the user terminal and determines the controlled device and at least one master control device from at least two devices to be bound selected by the device binding instruction.
And the adjusting module is used for adjusting based on the control instruction to obtain a control result.
And the second sending module is used for forwarding the control result to the user terminal through the server.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements described above as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the objectives of the disclosed solution. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Accordingly, the embodiment of the disclosure provides electronic equipment, which comprises a processor and a memory for storing executable instructions of the processor, wherein the processor is configured to realize the steps of any equipment control method by running the executable instructions.
Fig. 11 is a schematic structural view of an electronic device according to an exemplary embodiment of the present disclosure. For example, electronic device 1100 may be a user device, and may be embodied as a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, a wearable device such as a smart watch, smart glasses, smart bracelets, smart running shoes, and the like.
Referring to FIG. 11, the electronic device 1100 can include one or more of a processing component 1102, a memory 1104, a power component 1106, a multimedia component 1108, an audio component 1110, an input/output (I/O) interface 1112, a sensor component 1114, and a communication component 1116.
The processing component 1102 generally controls overall operation of the electronic device 1100, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 1102 may include one or more processors 1120 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 1102 can include one or more modules that facilitate interactions between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate interaction between the multimedia component 1108 and the processing component 1102.
Memory 1104 is configured to store various types of data to support operations at device 1100. Examples of such data include instructions for any application or method operating on the electronic device 1100, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1104 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 1106 provides power to the various components of the electronic device 1100. The power supply component 1106 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 1100.
Multimedia component 1108 includes screens between electronic device 1100 and the user that provide an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only a boundary of a touch or a sliding action but also a duration and a pressure related to the touch or the sliding operation. In some embodiments, multimedia component 1108 includes a front camera and/or a rear camera. When the electronic device 1100 is in an operational mode, such as a shooting mode or a video mode, the front-facing camera and/or the rear-facing camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 1110 is configured to output and/or input an audio signal. For example, the audio component 1110 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 1100 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 1104 or transmitted via the communication component 1116. In some embodiments, the audio component 1110 further comprises a speaker for outputting audio signals.
The I/O interface 1112 provides an interface between the processing component 1102 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, a home button, a volume button, an activate button, and a lock button.
The sensor assembly 1114 includes one or more sensors for providing status assessment of various aspects of the electronic device 1100. For example, the sensor assembly 1114 may detect an on/off state of the electronic device 1100, a relative positioning of the components, such as a display and keypad of the electronic device 1100, a change in position of the electronic device 1100 or a component of the electronic device 1100, the presence or absence of a user's contact with the electronic device 1100, an orientation or acceleration/deceleration of the electronic device 1100, and a change in temperature of the electronic device 1100. The sensor assembly 1114 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 1114 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 1116 is configured to facilitate communication between the electronic device 1100 and other devices, either wired or wireless. The electronic device 1100 may access a wireless network based on a communication standard, such as WiFi,4G or 5G,4G LTE, 5G NR, or a combination thereof. In one exemplary embodiment, the communication component 1116 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 1116 described above further includes a Near Field Communication (NFC) module to facilitate short range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 1100 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as a memory 1104 including instructions that, when executed by the processor 1120 of the electronic device 1100, enable the electronic device 1100 to perform any one of the device control methods described above, is also provided.
The non-transitory computer readable storage medium may be a ROM, random-access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (14)
1. A method of controlling a device, the method comprising:
the method comprises the steps of responding to a device binding instruction sent by a user terminal, and sending device information of a controlled device to at least one main control device, wherein the controlled device and the at least one main control device are at least two devices to be bound selected by the device binding instruction;
The control result is set by the controlled device based on a control instruction sent by any one of the main control devices, and the control instruction is generated by the main control device based on user operation and the device information;
and synchronizing the control result to the user terminal.
2. The method of claim 1, wherein the at least one master device is a plurality of switches located in different locations, each of the switches being for independently controlling the controlled device.
3. The method of claim 1 or 2, wherein the master device is a rotary knob switch;
The control instruction at least comprises a target adjusting amplitude, so that the controlled equipment obtains the control result after being adjusted according to the target adjusting amplitude, and the target adjusting amplitude is set by the knob switch based on the mapping relation between the rotation quantity of the knob switch and the controlled equipment.
4. The method of claim 1, wherein the at least two devices are in a same local area network, and the control instruction is sent by the master device to the controlled device through the local area network;
The sending the device information of the controlled device to at least one master control device includes:
Forwarding the device information of the controlled device to the master control device through a gateway of the local area network;
Receiving a control result of the controlled device, including:
And receiving a control result forwarded by the gateway from the controlled device.
5. A method of controlling a device, the method comprising:
The method comprises the steps of receiving equipment information of controlled equipment, wherein the equipment information is sent after a server determines the controlled equipment from at least two pieces of equipment to be bound selected by the equipment binding instruction after receiving the equipment binding instruction sent by a user terminal;
Generating a control instruction for the controlled device based on the device information;
And sending the control instruction to the controlled equipment so that the controlled equipment can adjust based on the control instruction to obtain a corresponding control result, and forwarding the control result to the user terminal through the server.
6. The method of claim 5, wherein receiving device information of the controlled device comprises:
receiving the device information of the controlled device forwarded by the gateway from the server;
the sending the control instruction to the controlled device includes:
and sending the control instruction to the controlled equipment through the same local area network where the controlled equipment is located.
7. The method according to claim 5, wherein the method is applied to any master device of the at least two devices to be bound, the master device being a rotary knob switch;
the generating a control instruction for the controlled device based on the device information includes:
Acquiring the rotation amount of the knob switch in a target period;
determining a target adjustment amplitude to be acted on the controlled equipment based on the mapping relation between the rotation quantity and the controlled equipment;
And the controlled equipment obtains the control result after adjusting according to the target adjusting amplitude.
8. A method of controlling a device, the method comprising:
After receiving a device binding instruction sent by a user terminal, a server determines the controlled device and at least one master device from at least two devices to be bound selected by the device binding instruction, and then sends the device binding instruction to each master device;
Adjusting based on the control instruction to obtain a control result;
and forwarding the control result to the user terminal through the server.
9. A device control system is characterized by comprising a server and a plurality of devices;
the server is used for receiving a device binding instruction sent by a user terminal, selecting a controlled device and at least one master control device from the devices based on the device binding instruction, sending device information of the controlled device to the at least one master control device, and forwarding a control result of the controlled device to the user terminal after receiving the control result;
The main control equipment is used for receiving the equipment information, generating a control instruction based on the equipment information and sending the control instruction to the controlled equipment;
the controlled device is used for adjusting based on the received control instruction to obtain a control result, and sending the control result to the server.
10. A device control apparatus, characterized in that the apparatus comprises:
The device comprises a first response module, a second response module and a first response module, wherein the first response module is used for responding to a device binding instruction sent by a user terminal and sending device information of a controlled device to at least one main control device;
the control device comprises a first receiving module, a second receiving module and a control module, wherein the first receiving module is used for receiving a control result of the controlled device, the control result is set by the controlled device based on a control instruction sent by any one of the main control devices, and the control instruction is generated by the main control device based on user operation and the device information;
and the first synchronization module is used for synchronizing the control result to the user terminal.
11. A device control apparatus, characterized in that the apparatus comprises:
The device information is sent by a server after the device binding instruction sent by the user terminal is received, and the device information is sent after the device to be bound is determined from at least two devices to be bound selected by the device binding instruction;
the instruction generation module is used for generating a control instruction for the controlled equipment based on the equipment information;
and the first sending module is used for sending the control instruction to the controlled equipment so as to enable the controlled equipment to adjust based on the control instruction, obtain a corresponding control result and forward the control result to the user terminal through the server.
12. A device control apparatus, characterized in that the apparatus comprises:
The device information is sent to each master control device after the server receives the device binding instruction sent by the user terminal and determines the controlled device and at least one master control device from at least two devices to be bound selected by the device binding instruction;
The adjusting module is used for adjusting based on the control instruction to obtain a control result;
and the second sending module is used for forwarding the control result to the user terminal through the server.
13. An electronic device, comprising:
A processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the steps of the method of any of claims 1 to 8 by executing the executable instructions.
14. A computer readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor realizes the steps of the method according to any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311233436.0A CN119676014A (en) | 2023-09-21 | 2023-09-21 | Device control method, device, storage medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311233436.0A CN119676014A (en) | 2023-09-21 | 2023-09-21 | Device control method, device, storage medium and electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN119676014A true CN119676014A (en) | 2025-03-21 |
Family
ID=94986502
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311233436.0A Pending CN119676014A (en) | 2023-09-21 | 2023-09-21 | Device control method, device, storage medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN119676014A (en) |
-
2023
- 2023-09-21 CN CN202311233436.0A patent/CN119676014A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6503592B2 (en) | Home appliance control method and apparatus | |
JP6782229B2 (en) | Methods and equipment for operating intelligent electrical equipment | |
EP3171549B1 (en) | Smart device grouping system, method and apparatus | |
JP6254718B2 (en) | Method for adjusting operating state of smart home equipment, apparatus, program, and recording medium | |
CN105392257B (en) | Control the method and device of intelligent lamp | |
WO2017008398A1 (en) | Smart device control method and device | |
WO2016119458A1 (en) | Remote control method and apparatus | |
CN106355852B (en) | Equipment control method and device | |
WO2017071077A1 (en) | Interface display method and apparatus | |
JP6286616B2 (en) | Home smart socket control method, apparatus, program, and recording medium | |
WO2017084269A1 (en) | Method and apparatus for controlling a smart device | |
CN104283745A (en) | Method, device and system for controlling intelligent household equipment | |
CN106227055A (en) | A kind of control the method for intelligent home device, server and gateway | |
JP2017537567A (en) | Device control method and apparatus | |
CN104330996A (en) | Remote control method and device | |
JP2016524371A (en) | Smart terminal control method, apparatus, program, and storage medium | |
CN104363154A (en) | Smart home device control method and device | |
CN105182809A (en) | Method for adjusting light transmittance of intelligent curtain, intelligent curtain and device | |
US11782523B2 (en) | Method for controlling Internet of Things device, and terminal device | |
KR20170023702A (en) | Method, device and system for starting target function | |
CN103986821A (en) | Method, equipment and system for carrying out parameter adjustment | |
CN107272427B (en) | Control method and device of intelligent equipment | |
CN106230909A (en) | A kind of equipment room brightness linkage control method, device and equipment | |
CN111123716B (en) | Remote control method, remote control device, and computer-readable storage medium | |
CN106448104B (en) | Equipment control method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination |