Equipment control method and device, storage medium and electronic equipment
Through the server managing the device binding relationship, the device information of the controlled device is sent to the main control device, solving the problem of users needing to go to a specific position to adjust the device, and achieving more flexible and convenient device control.
Patent Information
- Application Number
- CN202311233436.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-21
- Publication Date
- 2025-03-21
AI Technical Summary
In the prior art, users need to go to a specific physical switch position to adjust the controlled device, which makes the user inconvenient operation.
The server receives the device binding instructions sent by the user terminal, determines the binding relationship between the controlled device and the master control device, sends the device information of the controlled device to the master control device, and synchronizes the control results to the user terminal.
This enables users to flexibly control the controlled equipment through any selected main control device, improving the convenience and flexibility of user operation.
Smart Images

Figure CN119676014A_ABST
Abstract
Description
Technical Field
[0001] The technical solution disclosed herein relates to the field of local area network control technology, and in particular to a device control method, apparatus, storage medium and electronic device. Background Art
[0002] In order to facilitate users to control controlled devices such as lights, fans, and curtains, a corresponding physical switch is usually set for each controlled device. Users can flexibly control the controlled device by flipping the physical switch.
[0003] In the prior art, these physical switches and the controlled devices are usually connected through circuits, so the control of the master device is only effective for a specific controlled device. This means that when a user wants to adjust a controlled device, he must go to the location of a specific physical switch and turn on the specific physical switch. This is not convenient for users. Summary of the invention
[0004] In view of this, the present disclosure provides a device control method, apparatus, storage medium and electronic device to solve the problem of inability to flexibly control a controlled device.
[0005] According to a first aspect of an embodiment of the present disclosure, a device control method is provided, which is applied to a server, and the method includes:
[0006] 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; 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;
[0007] Receive 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 master control devices, and the control instruction is generated by the master control device based on a user operation and the device information;
[0008] The control result is synchronized to the user terminal.
[0009] According to a second aspect of an embodiment of the present disclosure, a device control method is provided, which is applied to a master control device, and the method includes:
[0010] Receiving device information of a controlled device; the device information is sent by the server after receiving a device binding instruction sent by a user terminal and determining the controlled device from at least two devices to be bound selected by the device binding instruction;
[0011] Based on the device information, generating a control instruction for the controlled device;
[0012] The control instruction is sent to the controlled device, so that the controlled device is adjusted based on the control instruction to obtain a corresponding control result, and the control result is forwarded to the user terminal through the server.
[0013] According to a third aspect of an embodiment of the present disclosure, a device control method is provided, which is applied to a controlled device, and the method includes:
[0014] Receiving a control instruction generated by any master control device based on device information of a controlled device; the device information is sent to each of the master control devices after the server receives a device binding instruction sent by a 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;
[0015] Performing adjustments based on the control instructions to obtain control results;
[0016] The control result is forwarded to the user terminal through the server.
[0017] According to a fourth aspect of an embodiment of the present disclosure, there is provided a device control system, the system comprising: a server and a plurality of devices;
[0018] The server is configured to receive a device binding instruction sent by a user terminal, select a controlled device and at least one master control device from the multiple devices based on the device binding instruction, send device information of the controlled device to the at least one master control device, and forward the control result to the user terminal after receiving the control result of the controlled device;
[0019] The master control device is used to receive the device information, generate a control instruction based on the device information, and send the control instruction to the controlled device;
[0020] The controlled device is used to perform adjustments based on the received control instructions, obtain control results, and send the control results to the server.
[0021] According to a fifth aspect of an embodiment of the present disclosure, there is provided a device control apparatus, which is applied to a server, and the apparatus includes:
[0022] A first response module, configured to send device information of a controlled device to at least one master control device in response to receiving a device binding instruction sent by a user terminal; 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;
[0023] A first receiving module, configured to receive 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 master control devices, wherein the control instruction is generated by the master control device based on a user operation and the device information;
[0024] The first synchronization module is used to synchronize the control result to the user terminal.
[0025] According to a sixth aspect of an embodiment of the present disclosure, there is provided a device control apparatus, applied to a main control device, the apparatus comprising:
[0026] A second receiving module is used to receive device information of a controlled device; the device information is sent by the server after receiving a device binding instruction sent by a user terminal and determining the controlled device from at least two devices to be bound selected by the device binding instruction;
[0027] An instruction generation module, used to generate a control instruction for the controlled device based on the device information;
[0028] The first sending module is used to send the control instruction to the controlled device, so that the controlled device is adjusted based on the control instruction to obtain a corresponding control result, and forward the control result to the user terminal through the server.
[0029] According to a seventh aspect of an embodiment of the present disclosure, there is provided a device control apparatus, applied to a controlled device, the apparatus comprising:
[0030] A third receiving module is used to receive a control instruction generated by any master control device based on the device information of the controlled device; the device information is sent to each of the master control devices 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;
[0031] An adjustment module, used to perform adjustment based on the control instruction to obtain a control result;
[0032] The second sending module is used to forward the control result to the user terminal through the server.
[0033] According to an eighth aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
[0034] processor;
[0035] a memory for storing processor-executable instructions;
[0036] Wherein, the processor is configured to implement the steps of any device control method described in the first aspect by running the executable instructions.
[0037] According to a ninth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of the device control method described in any one of the first aspects are implemented.
[0038] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0039] The user can select any at least two devices for binding through the user terminal. Since the at least two devices include a controlled device and at least one master device, the user can select any one or more master devices as switches of the controlled device and complete the binding by sending the information of the controlled device to the master device.
[0040] Through this arbitrary binding method, the binding relationship between any master control device and the controlled device can be flexibly changed. Compared with the solution in the prior art in which each master control device (physical switch) is matched with a fixed controlled device, the present invention can control the controlled device more flexibly.
[0041] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0043] Figure 1 is an application scenario diagram of a device control method according to an exemplary embodiment of the present disclosure;
[0044] Figure 2 is a flow chart of a device control method according to an exemplary embodiment of the present disclosure;
[0045] Figure 3 is a schematic diagram of a knob switch in a device control method according to an exemplary embodiment of the present disclosure;
[0046] Figure 4 is an application scenario diagram of another device control method according to an exemplary embodiment of the present disclosure;
[0047] Figure 5 is a flow chart of another device control method according to an exemplary embodiment of the present disclosure;
[0048] Figure 6is a flow chart of another device control method according to an exemplary embodiment of the present disclosure;
[0049] Figure 7 is an interactive schematic diagram of a device control method according to an exemplary embodiment of the present disclosure;
[0050] Figure 8 is an interactive schematic diagram of another device control method according to an exemplary embodiment of the present disclosure;
[0051] Fig. 9 is an interactive schematic diagram of another device control method according to an exemplary embodiment of the present disclosure;
[0052] Fig.10 is a structural schematic diagram of a device control apparatus according to an exemplary embodiment of the present disclosure;
[0053] Fig.11 It is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0054] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0055] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0056] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0057] In order to facilitate users to control controlled devices such as lights, fans, curtains, and cameras (to control the rotation angle), a corresponding physical switch is usually set for each controlled device. Users can flexibly control the controlled device by flipping the physical switch.
[0058] Taking the controlled device as a fan as an example, in order to control the fan to rotate at different wind speeds, the fan and the switch are usually connected in series in the circuit loop through circuit connection. The user can adjust the current and voltage in the circuit by adjusting this switch, thereby controlling the fan switch and rotation speed. We can call this switch the main control switch for controlling the fan.
[0059] In the prior art, the main control device is usually set at a fixed position, such as the entrance of an office, so that the user can adjust the main control switch when entering the office.
[0060] However, the temperature varies at different times of the day. Therefore, as the temperature changes, the user needs to constantly adjust the fan switch state or speed to match the current room temperature. In this case, the user needs to go to the location of the main control device (fan switch) at the entrance of the office every time to adjust the fan, which is obviously inconvenient for the user.
[0061] Based on this, the present disclosure provides multiple devices that are independently connected to power sources, and these devices can communicate through a local area network or the Internet of Things. In other words, no two devices are connected in series through circuit connection, and the relationship between the devices is not limited, so as to facilitate the binding between any two devices.
[0062] At this time, the user terminal can arbitrarily select at least two devices as devices to be bound, and then generate a device binding instruction to bind the devices to be bound. After the user terminal sends the device binding instruction to the server, the server can determine the controlled device and at least one master device included in the at least two devices to be bound.
[0063] In order to enable each of at least one master control device to independently control the controlled device, the server sends the 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, the binding between the master control device and the controlled device is completed. At this time, it is considered that the control instructions of the master control device are used to control this controlled device.
[0064] After the controlled device is bound to each master device, any master device can independently send control instructions to the controlled device. After receiving the control instructions sent by any master device, the controlled device will make corresponding adjustments according to the control instructions to obtain the control result. For example, if the control instruction is to set the wind speed of the fan (controlled device) to the second gear, the fan will be adjusted to the second gear.
[0065] Since the above process only occurs between the master device and the controlled device, the controlled device also needs to upload the control result to the server, so that the control result can be synchronized to the user terminal through the server, so that the user can check the current status of the controlled device at any time through the user terminal.
[0066] The following is a detailed introduction:
[0067] Figure 1 is an application scenario diagram of a device control method according to an exemplary embodiment of the present disclosure, such as Figure 1 The present disclosure provides a device control system 101 and a user terminal, wherein the system 101 includes: a server and multiple devices in the same local area network 102 .
[0068] The server is used to receive a device binding instruction sent by a user terminal, select a controlled device and at least one master control device from the multiple devices based on the device binding instruction, send the device information of the controlled device to the at least one master control device, and forward the control result to the user terminal after receiving the control result of the controlled device.
[0069] The master control device is used to receive the device information, generate a control instruction based on the device information, and send the control instruction to the controlled device.
[0070] The controlled device is used to perform adjustments based on the received control instructions, obtain control results, and send the control results to the server.
[0071] Figure 2 is a flow chart of a device control method according to an exemplary embodiment of the present disclosure, which is applied to a server, such as Figure 2 As shown, the method comprises the following steps:
[0072] Step 201, 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; 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.
[0073] User terminal refers to the final device or node in the network that is connected to the server. It can be a variety of different types of devices, including but not limited to computers, laptops, smartphones, tablets, smart TVs, 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 the server or host using specific protocols and interfaces.
[0074] The server displays multiple devices through the user terminal, and the user can arbitrarily select at least two devices from the multiple devices as devices to be bound.
[0075] Illustratively, when the above method is applied in a home scene, the multiple devices may be any device in the home that can be controlled by an electrical signal, wherein the controlled devices may be: air conditioners, smart lights, smart curtains, smart windows, microwave ovens, air fryers, speakers, etc. The master control device may be: any control panel, remote control, smart switch, etc.
[0076] The user can select a controlled device and one or more master devices from multiple devices. The device information of the controlled device (including but not limited to device identification, device attributes, and device control method) is stored in the server. After the server sends the device information of the controlled device to each master device selected by the device binding instruction, the binding between at least one master device and the controlled device is completed. The master device can control the controlled device through the device information of the controlled device stored in itself.
[0077] Device information can also include: product or service definitions and specifications. For example, if the master device wants to control lamps, in addition to establishing a binding relationship between the two, the master device also needs to know the specific control content in the control instructions. These control contents are reasonable information supported by the master device itself and recognizable by the controlled device.
[0078] Step 202, 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 master control devices, and the control instruction is generated by the master control device based on user operations and the device information.
[0079] After binding at least one master control device and a controlled device, when a user operates any master control device, the master control device can generate a corresponding (one or a group of) control instructions according to the device information and the user operation, and send the control instructions to the controlled device. After receiving the (one or a group of) control instructions sent by any master control device, the control device performs settings according to the control instructions to obtain the corresponding control result.
[0080] For example, the master control device is control panel 1, and the controlled device is air conditioner 1. When the user presses the "on" button in control panel 1, the "on" command is sent to air conditioner 1, and air conditioner 1 starts.
[0081] For another example, when the main control device is switch 1 and the controlled device is air conditioner 1, when the user presses to switch the switch state from "on state" to "off state", a control instruction for air conditioner 1 is generated, and air conditioner 1 is turned off after receiving the control instruction.
[0082] Step 203: synchronizing the control result to the user terminal.
[0083] The server sends the control result to the user terminal. The technical solution provided by the embodiment of the present disclosure may have the following beneficial effects:
[0084] The user can select any at least two devices for binding through the user terminal. Since the at least two devices include a controlled device and at least one master device, the user can select any one or more master devices as switches of the controlled device and complete the binding by sending the information of the controlled device to the master device.
[0085] Through this arbitrary binding method, the binding relationship between any master control device and the controlled device can be flexibly changed. Compared with the solution in the prior art in which each master control device (physical switch) is matched with a fixed controlled device, the present invention can control the controlled device more flexibly.
[0086] Schematically, the beneficial effects of the present disclosure are introduced through the following scenarios:
[0087] The user selects the air conditioner in room one as the controlled device and selects switch one in room one as the master device through the device binding command. After the binding is completed, the user can control the air conditioner by adjusting switch one in room one. When the user is resting in room two, if he suddenly realizes that the air conditioner in room one is not turned off, the user does not need to go to room one to control the air conditioner through switch one. He can resend a new device binding command. The selected controlled device is still the air conditioner in room one, and the selected master device is changed to switch two in room two. At this time, the user can directly control the air conditioner to turn off through switch two in room two.
[0088] Furthermore, since the user is currently in Room 2, even if a control command for turning off the air conditioner is sent through Switch 2, it is impossible to see whether the air conditioner is successfully turned off through the air conditioner panel in Room 1. Therefore, in the present disclosure, the control result sent to the server by the controlled device is synchronized to the user terminal (such as a mobile phone), and the user can see the corresponding control result (indicating whether it is turned off or not) on the user terminal.
[0089] It should be noted that after the master device sends a control instruction to the controlled device, the controlled device will feedback a corresponding response packet to the master device, informing the master device that it has received the corresponding control instruction and will execute it according to the control instruction.
[0090] Optionally, the at least one master control device is a plurality of switches located at different positions, and each of the switches is used to independently control the controlled device.
[0091] When the master control devices selected by the device binding instruction are multiple switches located at different positions, by sending the device information of the controlled device to each of the multiple switches, each switch can independently control the controlled device, thereby realizing remote control of the same controlled device.
[0092] For example, the controlled device selected by the device binding instruction is the living room light, and the selected master control devices are switch one located in the living room and switch two located at the head of the bed in the bedroom. Both switch one and switch two can independently control the switch, warm and cold tones, and light brightness of the living room light.
[0093] In this way, when the user is in the living room, the living room light can be turned on by switch 1, and when the user is resting on the bed in the bedroom, the living room light can be turned off by switch 2. The above method does not require the user to rebind the main control device after finding that the living room light is not turned off, and is more suitable for users to perform long-term binding according to their own living habits.
[0094] Optionally, the main control device is a knob switch; the control instruction includes at least a target adjustment amplitude, so that the controlled device obtains the control result after being adjusted according to the target adjustment amplitude; the target adjustment amplitude is set by the knob switch based on the mapping relationship between its own rotation amount and the controlled device.
[0095] A rotary switch, also known as a rotary controller, is usually composed of a round knob and an internal mechanism. By rotating the knob, the circuit can be turned on or off. When the master control device is a rotary switch, due to the characteristics of the rotary switch, a control instruction is generated every time the user twists the knob beyond a certain angle (or rotation amount). Therefore, the control instruction sent by the master control device to the controlled device is actually a group of control instructions (including one or more control instructions), and the controlled device is controlled to respond to one or more control instructions in this group of control instructions to make continuous adjustments.
[0096] In the rotary switch disclosed in the present invention, a sensing device is provided inside, such as a photoelectric sensor or a magnetic sensor. When the knob is rotated, the sensing device detects the rotation action and indicates the rotation angle or position by outputting a pulse signal or an encoder signal. These signals can be received and processed by the circuit to control, record or display the state of the knob.
[0097] The knob switch is also provided with a corresponding microcontroller, which can convert the pulse signal (or encoder signal) output by the sensing device into a digital signal, so as to generate a target adjustment amplitude recognizable by the backup device according to the digital signal.
[0098] Figure 3 The figure is a schematic diagram of a rotary switch in a device control method according to an exemplary embodiment of the present disclosure. Compared with other switches that control the controlled device to operate in different gears, the rotary switch can provide precise control, which is particularly suitable for scenes that require fine-tuning or precise adjustment. By rotating the knob, the brightness, volume, temperature and other parameters of the controlled device can be precisely adjusted to meet personalized needs.
[0099] During the conversion process, the microcontroller also needs to consider the mapping relationship between the rotation amount (rotation angle) of the knob switch itself and the adjustable amplitude of the controlled device. The following is an exemplary explanation:
[0100] Assuming that the knob switch can rotate to an angle of 0-180°, the minimum brightness of the light is 0, and the maximum brightness is 100 (assumed value), then the mapping relationship between the two can be expressed as:
[0101] Every time the knob switch is rotated 1°, the light brightness will increase or decrease by 0.555 brightness value accordingly. (It can also be divided more finely, for example, every time it is rotated 0.1°, the light brightness will increase or decrease by 0.0555 brightness value accordingly).
[0102] By controlling in this way, the brightness control is more refined compared with the solution in the prior art of directly switching the light brightness to level 1, level 2, and level 3.
[0103] In the present disclosure, the rotation amount is the rotation angle of the knob switch, the target adjustment amplitude is proportional to the size of the rotation amount, and the target adjustment amplitude can be understood as a step value. When at least one main control device is a plurality of knob switches, each knob switch can independently control the controlled device. Moreover, since the control instructions sent by each knob switch to the controlled device are generated based on the target adjustment amplitude, the controlled device will only reduce and increase the corresponding target adjustment amplitude accordingly, which makes the control of a controlled device by multiple knob switches continuous and connected.
[0104] For example, both the rotary switch 1 and the rotary switch 2 are used to control the camera. Assume that the mapping relationship 1 between the rotary switch 1 and the camera angle is: when the rotary switch 1 is rotated 1°, the camera angle will increase or decrease 1° accordingly; the mapping relationship 2 between the rotary switch 2 and the camera angle is: when the rotary switch 2 is rotated 1°, the camera angle will increase or decrease 2° accordingly. (This is only an example, and the two mapping relationships may be the same).
[0105] Then, the user rotates the knob switch 1 30° in the positive direction (rotation amount is 30°), and the angle of the camera rotates 30° from the current angle (assumed to be 0°) to direction 1 (synchronized with the positive direction of the knob switch), obtaining a control result that the current angle of the camera is 30°.
[0106] At this time, the user walks to the second knob switch and rotates the knob switch in the opposite direction by 10°. Then the angle of the camera rotates 20° from the current angle (30°) to Direction 2 (synchronized with the reverse rotation of the knob switch and opposite to Direction 1), and the current angle of the camera is controlled to be 10°.
[0107] It can be seen that multiple knob switches can continuously control the same controlled device, which helps to improve the user experience.
[0108] Optionally, the at least two devices are in the same local area network, and the control instructions are sent by the master device to the controlled device through the local area network. The local area network is configured with a gateway, and the gateway is used to receive information sent by the server through the Internet and forward the device information to the server, thereby realizing communication between the device in the local area network and the server.
[0109] When executing step 201 to send the device information of the controlled device to at least one master device, the following steps are included: forwarding the device information of the controlled device to the master device through the gateway of the local area network.
[0110] When executing step 202 to receive the control result of the controlled device, the following steps are included: receiving the control result forwarded by the gateway from the controlled device.
[0111] Figure 4 is an application scenario diagram of another device control method according to an exemplary embodiment of the present disclosure, such as Figure 4 As shown, the local area network includes multiple devices: a master control device 301 (knob switch), a master control device 302 (switch), a controlled device 402 (fan), a controlled device 403 (air conditioner), and a controlled device 404 (camera).
[0112] A local area network can be a wireless communication network, ZigBee (ZigBee Technology), mesh technology (a new type of wireless local area network), or a wired network, a PLC (Programmable Logic Controller) network using power line communication, an RS485 (Recommended Standard 485, a communication interface standard) network, etc. Regardless of whether it is a wireless or wired communication network, the local network architecture is generally composed of gateways and devices. The gateway connects to the server and forwards the uplink and downlink messages between the device and the server; it manages multiple devices belonging to it.
[0113] In order to facilitate the management of devices under the LAN, the gateway also includes a network coordinator, which is responsible for the establishment of the local network, sub-device management, data protocol transmission and reception, etc. The network topology formed by different networks is different. For example, the zigbee coordinator can form a star or mesh network, and the plc network is composed of a star or tree network composed of CCO. Regardless of wired or wireless network, the sub-devices are essentially managed and controlled by the network coordinator.
[0114] The device binding instruction is that the server displays multiple devices under the same local area network to the user terminal. The user selects at least two devices to be bound and sends them to the server. Then the server interacts with the master device or the controlled device through the gateway of the local area network.
[0115] Optional, Figure 5 is a flow chart of another device control method according to an exemplary embodiment of the present disclosure, such as Figure 5 As shown, the present disclosure provides a device control method, which is applied to any master control device and includes the following steps:
[0116] Step 501, receiving device information of a controlled device; the device information is sent by the server after receiving a device binding instruction sent by a user terminal and determining the controlled device from at least two devices to be bound selected in the device binding instruction.
[0117] Step 502: Generate a control instruction for the controlled device based on the device information.
[0118] Step 503: Send the control instruction to the controlled device, so that the controlled device performs adjustments based on the control instruction, obtains corresponding control results, and forwards the control results to the user terminal through the server.
[0119] The relevant contents involved in the above steps 501 to 503 have been explained in the above embodiments and will not be repeated here.
[0120] 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 these devices are all in the same local area network. Therefore, when executing step 501 to receive the device information of the controlled device, the following steps are included:
[0121] The device information of the controlled device is received by the gateway and forwarded from the server.
[0122] When executing step 503 to send the control instruction to the controlled device, the following steps are included: sending the control instruction to the controlled device via the same local area network as that of the controlled device.
[0123] Optionally, when the master control device is a knob switch, executing step 502 to generate a control instruction for the controlled device based on the device information includes the following steps:
[0124] Obtain the rotation amount of the knob switch within the target time period; determine the target adjustment amplitude to be applied to the controlled device based on the mapping relationship between the rotation amount and the controlled device; generate a control instruction containing the target adjustment amplitude; and obtain the control result after the controlled device is adjusted according to the target adjustment amplitude.
[0125] Optional, Figure 6 is a flow chart of another device control method according to an exemplary embodiment of the present disclosure, such as Figure 6 As shown, the method is applied to a controlled device, and the method comprises the following steps:
[0126] Step 601, receiving a control instruction generated by any master control device based on the device information of the controlled device; the device information is sent to each of the master control devices 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.
[0127] Step 602: perform adjustment based on the control instruction to obtain a control result.
[0128] Step 603: forward the control result to the user terminal through the server.
[0129] The relevant contents involved in the above steps 601 and 602 have been explained in the above embodiments and will not be repeated here.
[0130] In order to better illustrate the above method, the following is a detailed description combined with a multi-party interaction diagram:
[0131] Figure 7is an interactive schematic diagram of a device control method according to an exemplary embodiment of the present disclosure, such as Figure 7 As shown, the controlled device is taken as an example for explanation:
[0132] The method comprises the following steps:
[0133] Step 701: Send a device binding instruction. The device binding instruction is an instruction generated by a user through a user terminal for binding a controlled device and a master control device together. The user terminal sends the device binding instruction to the server.
[0134] Step 702: Send identification information of the 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.
[0135] Step 703, converting into identifiable identification information: the gateway converts the identification information sent by the server into identification information identifiable to the local area network.
[0136] Step 704, sending identification information of the controlled device: the gateway sends identification information (of the controlled device) identifiable by the master device to the master device.
[0137] Step 705: Store the identification information of the controlled device. The master control device stores the identification information so that it knows that it can control the controlled device that has stored the identification information.
[0138] Step 706, querying the control method and property information of the controlled device: the master device wants to control the controlled device more accurately, and needs to send an instruction to the server for obtaining the control method and property information of the controlled device.
[0139] Step 707, sending the control method and attribute information of the controlled device: the server sends the control method and attribute information of the controlled device to the master control device.
[0140] Step 708, storing the control method and attribute information of the controlled device: the master device stores the control method and attribute information of the controlled device, thereby storing the control method, attribute information and identification information together as device information of the controlled device, so as to control the controlled device subsequently.
[0141] Step 709, generating n control instructions: When the master control device is a knob switch, a corresponding control instruction is generated each time the knob is rotated. These n control instructions can be regarded as a group of control instructions (needed to be sent to the controlled device). n is a positive integer.
[0142] Step 710, sending the first control instruction.
[0143] Step 711, the controlled device adjusts amplitude 1 (amplitude 1 is related to the value in the first control instruction).
[0144] Step 712, the master device sends a response packet (after adjustment). A corresponding response packet can also be sent to the server through the gateway (not shown in the figure), so that the server can feed back the latest status indicated by the response information to the user terminal.
[0145] ...(The master device sends the 2nd to n-1th control instructions, and the controlled device makes corresponding adjustments and feeds back corresponding response packets).
[0146] Step 713: Send the nth control instruction.
[0147] Step 714, (the controlled device) adjusts the amplitude n (the amplitude n is related to the value in the nth control instruction).
[0148] Step 715: (After adjustment, the controlled device will send a response packet to) the master device.
[0149] The contents involved in the above steps 701 to 715 have been explained in the above embodiments and will not be repeated here.
[0150] Optional, when Figure 7 When the gateway in includes a coordinator, Figure 8 is an interactive schematic diagram of another device control method according to an exemplary embodiment of the present disclosure, in which Figure 7 Steps 702 to 704 in the embodiment include the following steps:
[0151] Step 702: Send identification information of the controlled device.
[0152] Step 703: convert into identifiable identification information.
[0153] Step 7031, sending identification information of the controlled device: when there is a coordinator in the gateway, the identification information of the controlled device to be sent can be accurately forwarded to the master device through the coordinator.
[0154] Step 704: Send identification information of the controlled device.
[0155] Optional, when Figure 7 When there are two master devices in the Fig. 9 is an interactive schematic diagram of another device control method according to an exemplary embodiment of the present disclosure, such as Fig. 9 As shown, the method comprises the following steps:
[0156] Step 901, storing the device information of the controlled device: the master device 1 stores the device information of the controlled device. The device information includes identification information, control method, attribute information, etc. The specific method for obtaining the device information is as follows: Figure 7 As shown, the binding instruction for binding the controlled device and the master device 1 together is issued by the user terminal, and the specific content is the same as Figure 7 The principle is similar and will not be repeated here.
[0157] Step 902, storing the device information of the controlled device: the master device 2 stores the device information of the controlled device. 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 can also occur simultaneously).
[0158] Step 903: Generate m pieces of device information for the controlled device, where m is a positive integer.
[0159] Step 904, sending the first control instruction: the master control device 1 sends the first control instruction to the controlled device.
[0160] Step 905, (the controlled device) adjusts the amplitude by 1.
[0161] Step 906: Send a response packet (to the master device 1).
[0162] Step 907: Send the mth control instruction.
[0163] Step 908, (the controlled device) adjusts the amplitude m: obtains a first adjustment result.
[0164] Step 909: Send a response packet (to the master device 1).
[0165] Step 910, (master control device 2) generates n control instructions for the controlled device.
[0166] Step 911, sending the first control instruction (to the controlled device).
[0167] Step 912, (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 first control instruction initiated by the master device 2).
[0168] Step 913: Send a response packet (to the master device 2).
[0169] Step 914: Send the nth control instruction (to the controlled device).
[0170] Step 915, (controlled device) adjusts amplitude n: adjusts amplitude n based on the last adjustment result.
[0171] Step 916, sending a response packet (to the master device 2).
[0172] The contents involved in the above steps 901 to 916 have been explained in the above embodiments and will not be repeated here.
[0173] For the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present disclosure is not limited by the described order of actions, because according to the present disclosure, certain steps can be performed in other orders or simultaneously.
[0174] Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.
[0175] Corresponding to the aforementioned application function implementation method embodiment, the present disclosure also provides an embodiment of a device control apparatus and a corresponding terminal.
[0176] Optional, Fig.10 1 is a schematic diagram of a device control apparatus according to an exemplary embodiment of the present disclosure, which is applied to a server. The apparatus includes:
[0177] The first response module 1001 is used to send device information of a controlled device to at least one master control device in response to receiving a device binding instruction sent by a user terminal; 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.
[0178] The first receiving module 1002 is used to receive the control result of the controlled device; the control result is set by the controlled device based on a control instruction sent by any of the master control devices, and the control instruction is generated by the master control device based on user operations and the device information.
[0179] The first synchronization module 1003 is used to synchronize the control result to the user terminal.
[0180] Optionally, the at least one master control device is a plurality of switches located at different positions, and each of the switches is used to independently control the controlled device.
[0181] Optionally, the main control device is a knob switch; the control instruction includes at least a target adjustment amplitude, so that the controlled device obtains the control result after being adjusted according to the target adjustment amplitude; the target adjustment amplitude is set by the knob switch based on the mapping relationship between its own rotation amount and the controlled device.
[0182] Optionally, the at least two devices are in the same local area network, and the control instruction is sent by the master control device to the controlled device via the local area network.
[0183] When the first response module 1001 is used to send the device information of the controlled device to at least one master control device, it is used to:
[0184] The device information of the controlled device is forwarded to the main control device through the gateway of the local area network.
[0185] When the first receiving module 1002 is used to receive the control result of the controlled device, it is used to:
[0186] receiving a control result forwarded by the gateway from the controlled device.
[0187] Optionally, the present disclosure provides a device control apparatus, applied to a main control device, the apparatus comprising:
[0188] The second receiving module is used to receive device information of a controlled device; the device information is sent by the server after receiving a device binding instruction sent by a user terminal and determining the controlled device from at least two devices to be bound selected by the device binding instruction.
[0189] The instruction generation module is used to generate a control instruction for the controlled device based on the device information.
[0190] The first sending module is used to send the control instruction to the controlled device, so that the controlled device is adjusted based on the control instruction to obtain a corresponding control result, and forward the control result to the user terminal through the server.
[0191] Optionally, when the second receiving module is used to receive the device information of the controlled device, it is used to:
[0192] The device information of the controlled device is received by the gateway and forwarded from the server.
[0193] When the first sending module is used to send the control instruction to the controlled device, it is used to:
[0194] The control instruction is sent to the controlled device via the same local area network as that of the controlled device.
[0195] Optionally, the method is applied to any one master control device of the at least two devices to be bound, and the master control device is a knob switch.
[0196] When the instruction generation module is used to generate a control instruction for the controlled device based on the device information, it is used to:
[0197] The rotation amount of the knob switch within a target time period is obtained.
[0198] Based on the mapping relationship between the rotation amount and the controlled device, a target adjustment amplitude to be acted on the controlled device is determined.
[0199] A control instruction including the target adjustment range is generated; after the controlled device is adjusted according to the target adjustment range, the control result is obtained.
[0200] Optionally, the present disclosure provides a device control apparatus, applied to a controlled device, the apparatus comprising:
[0201] The third receiving module is used to receive a control instruction generated by any master control device based on the device information of the controlled device; the device information is sent to each of the master control devices 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.
[0202] The adjustment module is used to perform adjustment based on the control instruction to obtain a control result.
[0203] The second sending module is used to forward the control result to the user terminal through the server.
[0204] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art may understand and implement it without creative work.
[0205] Accordingly, an embodiment of the present disclosure provides an electronic device, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to implement the steps of any of the above-mentioned device control methods by running the executable instructions.
[0206] Fig.111 is a schematic diagram of a structure of an electronic device according to an exemplary embodiment of the present disclosure. For example, the electronic device 1100 may be a user device, which may specifically be a mobile phone, a computer, a digital broadcast terminal, a message transceiver 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, a smart glasses, a smart bracelet, a smart running shoe, etc.
[0207] Reference Fig.11 , the electronic device 1100 may include one or more of the following components: 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 .
[0208] The processing component 1102 generally controls the overall operation of the electronic device 1100, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1102 may include one or more processors 1120 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1102 may include one or more modules to facilitate the interaction between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate the interaction between the multimedia component 1108 and the processing component 1102.
[0209] The memory 1104 is configured to store various types of data to support operations on the device 1100. Examples of such data include instructions for any application or method operating on the electronic device 1100, contact data, phone book data, messages, pictures, videos, etc. The memory 1104 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, 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 disk or optical disk.
[0210] The power supply component 1106 provides power to various components of the electronic device 1100. The power supply component 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1100.
[0211] The multimedia component 1108 includes a screen that provides an output interface between the electronic device 1100 and the user. 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 the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1108 includes a front camera and / or a rear camera. When the electronic device 1100 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0212] The audio component 1110 is configured to output and / or input audio signals. For example, the audio component 1110 includes a microphone (MIC), and when the electronic device 1100 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1104 or sent via the communication component 1116. In some embodiments, the audio component 1110 also includes a speaker for outputting audio signals.
[0213] I / O interface 1112 provides an interface between 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, a start button, and a lock button.
[0214] The sensor assembly 1114 includes one or more sensors for providing various aspects of status assessment for the electronic device 1100. For example, the sensor assembly 1114 can detect the open / closed state of the electronic device 1100, the relative positioning of the components, such as the display and keypad of the electronic device 1100, and the sensor assembly 1114 can also detect the position change of the electronic device 1100 or a component of the electronic device 1100, the presence or absence of user contact with the electronic device 1100, the orientation or acceleration / deceleration of the electronic device 1100, and the temperature change of the electronic device 1100. The sensor assembly 1114 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1114 may also include an optical 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 accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0215] The communication component 1116 is configured to facilitate wired or wireless communication between the electronic device 1100 and other devices. The electronic device 1100 can access a wireless network based on a communication standard, such as WiFi, 4G or 5G, 4G LTE, 5G NR or a combination thereof. In an 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 an exemplary embodiment, the communication component 1116 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0216] 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 components to perform the above methods.
[0217] In an exemplary embodiment, a non-temporary computer-readable storage medium is also provided, such as a memory 1104 including instructions, which, when executed by a processor 1120 of the electronic device 1100, enables the electronic device 1100 to execute any of the above-mentioned device control methods.
[0218] The non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0219] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0220] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A device control method, characterized in that: 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; 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; Receive 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 master control devices, and the control instruction is generated by the master control device based on a user operation and the device information; The control result is synchronized to the user terminal.
2. The method according to claim 1, characterized in that The at least one master control device is a plurality of switches located at different positions, and each of the switches is used to independently control the controlled device.
3. The method according to claim 1 or 2, characterized in that: The main control device is a knob switch; The control instruction at least includes a target adjustment amplitude, so that the controlled device obtains the control result after being adjusted according to the target adjustment amplitude; the target adjustment amplitude is set by the knob switch based on the mapping relationship between its own rotation amount and the controlled device.
4. The method according to claim 1, characterized in that: The at least two devices are in the same local area network, and the control instruction is sent by the master control device to the controlled device through the local area network; The sending of 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 the gateway of the local area network; Receiving a control result of the controlled device includes: receiving a control result forwarded by the gateway from the controlled device.
5. A device control method, characterized in that: The method comprises: Receiving device information of a controlled device; the device information is sent by the server after receiving a device binding instruction sent by a user terminal and determining the controlled device from at least two devices to be bound selected by the device binding instruction; Based on the device information, generating a control instruction for the controlled device; The control instruction is sent to the controlled device, so that the controlled device is adjusted based on the control instruction to obtain a corresponding control result, and the control result is forwarded to the user terminal through the server.
6. The method according to claim 5, characterized in that The receiving device information of the controlled device includes: Receiving device information of the controlled device forwarded by the gateway from the server; The sending the control instruction to the controlled device includes: The control instruction is sent to the controlled device via the same local area network as that of the controlled device.
7. The method according to claim 5, characterized in that The method is applied to any one master control device of the at least two devices to be bound, and the master control device is a knob switch; The generating a control instruction for the controlled device based on the device information includes: Obtaining the rotation amount of the knob switch within a target time period; Determining a target adjustment amplitude to be applied to the controlled device based on a mapping relationship between the rotation amount and the controlled device; A control instruction including the target adjustment range is generated; after the controlled device is adjusted according to the target adjustment range, the control result is obtained.
8. A device control method, characterized in that: The method comprises: Receiving a control instruction generated by any master control device based on device information of a controlled device; the device information is sent to each of the master control devices after the server receives a device binding instruction sent by a 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; Performing adjustments based on the control instructions to obtain control results; The control result is forwarded to the user terminal through the server.
9. A device control system, characterized in that: The system comprises: a server and a plurality of devices; The server is configured to receive a device binding instruction sent by a user terminal, select a controlled device and at least one master control device from the multiple devices based on the device binding instruction, send device information of the controlled device to the at least one master control device, and forward the control result to the user terminal after receiving the control result of the controlled device; The master control device is used to receive the device information, generate a control instruction based on the device information, and send the control instruction to the controlled device; The controlled device is used to perform adjustments based on the received control instructions, obtain control results, and send the control results to the server.
10. A device control device, characterized in that: The device comprises: A first response module, configured to send device information of a controlled device to at least one master control device in response to receiving a device binding instruction sent by a user terminal; 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; A first receiving module, configured to receive 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 master control devices, wherein the control instruction is generated by the master control device based on a user operation and the device information; The first synchronization module is used to synchronize the control result to the user terminal.
11. A device control device, characterized in that: The device comprises: A second receiving module is used to receive device information of a controlled device; the device information is sent by the server after receiving a device binding instruction sent by a user terminal and determining the controlled device from at least two devices to be bound selected by the device binding instruction; An instruction generation module, used to generate a control instruction for the controlled device based on the device information; The first sending module is used to send the control instruction to the controlled device, so that the controlled device is adjusted based on the control instruction to obtain a corresponding control result, and forward the control result to the user terminal through the server.
12. A device control device, characterized in that: The device comprises: A third receiving module is used to receive a control instruction generated by any master control device based on the device information of the controlled device; the device information is sent to each of the master control devices 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; An adjustment module, used to perform adjustment based on the control instruction to obtain a control result; The second sending module is used to forward the control result to the user terminal through the server.
13. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the steps of any one of the methods of claims 1 to 8 by running the executable instructions.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of any method described in claims 1 to 8 are implemented.