Control method, device, computing device and medium of IoT device
Directly judge and control the target IOT equipment in the LAN through the smart speaker, the problem of inefficient control caused by the long control link in the prior art is solved, and faster and more efficient control of IOT equipment is achieved.
Patent Information
- Application Number
- CN202010385307.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-09
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2040-05-09
AI Technical Summary
In the prior art, smart speaker control IOT equipment needs to be connected through the cloud server of smart speaker and the cloud server of IOT equipment manufacturer, resulting in a long control link and low control efficiency.
The control command is received through the first electronic device (such as a smart speaker), and based on the stored IOT device information, it determines whether there is a target IOT device that supports the control command and can be directly controlled in the local area network, and directly sends the control command to the target IOT device.
It reduces the transmission time of control instructions, improves the control efficiency of IoT devices, and avoids the time-consuming problem of cloud transmission.
Smart Images

Figure CN113630430B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of control of IOT devices, and in particular to a control method, device, computing device and medium for IOT devices. Background Art
[0002] With the development of social science and technology, in order to facilitate people's lives, Internet of Things (IOT) devices can be controlled through smart speakers.
[0003] At present, if you want to use a smart speaker to control a manufacturer's IOT device, you need to connect the cloud server of the IOT device manufacturer and the cloud server of the smart speaker. The user's voice command must first be transmitted to the cloud server of the smart speaker, then transmitted to the cloud server 130 of the IOT device manufacturer through the cloud server of the smart speaker, and finally sent to the IOT device through the cloud server 130 of the IOT device manufacturer.
[0004] In this way, the smart speaker needs to control the IOT device through the cloud server of the smart speaker and the cloud server of the IOT device manufacturer to transmit control instructions. The control link is long, resulting in low efficiency of the smart speaker's control over the IOT device. Summary of the invention
[0005] The embodiments of the present invention provide a control method, device, computing device and medium for an IOT device, which can solve the problem of low control efficiency of the IOT device in the related technical field.
[0006] According to a first aspect of an embodiment of the present invention, a control method for an IOT device is provided, which is applied to a first electronic device and includes:
[0007] Receive control instructions;
[0008] Based on the first device information of the IOT device associated with the first electronic device, it is determined whether there is a first target IOT device in the IOT devices associated with the first electronic device; the first target IOT device is an IOT device that supports control instructions and can be directly controlled by the first electronic device in the local area network;
[0009] When it is determined that the first target IOT device exists, a control instruction is sent to the first target IOT device.
[0010] According to a second aspect of an embodiment of the present invention, there is provided a control device for an IOT device, which is applied to a first electronic device and includes:
[0011] A receiving module, used for receiving control instructions;
[0012] A judgment module, used to judge whether there is a first target IOT device in the IOT devices associated with the first electronic device based on the first device information of the IOT device associated with the first electronic device; the first target IOT device is an IOT device that supports control instructions and can be directly controlled by the first electronic device in the local area network;
[0013] The sending module is used to send a control instruction to the first target IOT device when it is determined that the first target IOT device exists.
[0014] According to a third aspect of an embodiment of the present invention, there is provided a computing device, comprising: a processor and a memory storing computer program instructions;
[0015] When the processor executes the computer program instructions, the control method of the IOT device provided in the first aspect above is implemented.
[0016] According to a fourth aspect of an embodiment of the present invention, a computer storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the control method of the IOT device provided in the first aspect above is implemented.
[0017] According to an embodiment of the present invention, a control instruction is first received, and then based on the first device information of the IOT device associated with the first electronic device stored, it is determined whether there is a first target IOT device in the IOT devices associated with the first electronic device; the first target IOT device is an IOT device that supports control instructions and can be directly controlled by the first electronic device in the local area network; when it is determined that the first target IOT device exists, the control instruction is directly sent to the first target IOT device. In an embodiment of the present invention, the IOT device is directly controlled by the first electronic device (such as a smart speaker), which avoids the time-consuming problem caused by transmitting the control instruction through the cloud server, and can improve the control efficiency of the IOT device. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following briefly introduces the drawings required for use in the embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 A schematic diagram of the architecture of a control system of an IOT device provided in an embodiment of the present invention;
[0020] Figure 2 A schematic diagram of a flow chart of a control method for an IOT device provided by an embodiment of the present invention;
[0021] Figure 3A schematic diagram of a flow chart of a control method for an IOT device provided by another embodiment of the present invention;
[0022] Figure 4 A schematic flow chart of a control method for an IOT device provided by yet another embodiment of the present invention;
[0023] Figure 5 A schematic diagram of the structure of a control device for an IOT device provided in an embodiment of the present invention;
[0024] Figure 6 A schematic diagram of the structure of a computing device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.
[0026] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0027] Figure 1 The schematic diagram of the control system of the IOT device provided by the embodiment of the present invention is shown. Figure 1 The system includes a first electronic device 110 (such as a smart speaker), a cloud server 120 of the first electronic device 110, an IOT device 140 (such as smart refrigerators, smart TVs, smart air conditioners and other smart home devices), and a cloud server 130 of the manufacturer to which the IOT device 140 belongs.
[0028] As an example, the first electronic device 110 is a smart speaker. If you want to use the smart speaker to control the IOT device 140, you need to connect the cloud server 130 of the manufacturer of the IOT device 140 and the cloud server 120 of the smart speaker. The voice command must first be transmitted to the cloud server 120 of the smart speaker, then transmitted to the cloud server 130 of the manufacturer of the IOT device through the cloud server 120 of the smart speaker, and finally sent to the IOT device 140 through the cloud server 130 of the manufacturer of the IOT device 140.
[0029] Therefore, the smart speaker controls the IOT device 140 through the cloud server 120 of the smart speaker and the cloud server 130 of the manufacturer to which the IOT device belongs to transmit control instructions. The control link is long, time-consuming, and the control efficiency is low.
[0030] Based on the above technical problems, the embodiments of the present invention provide a control method, device, computing device and medium for an IOT device, which improve the control efficiency of the IOT device and the user's good experience of controlling the IOT device.
[0031] In an embodiment of the present invention, if a user issues a control instruction, the first electronic device 110 can receive the control instruction. Then, the first electronic device 110 determines whether there is a first target IOT device in the IOT devices associated with the first electronic device 110 based on the first device information of the IOT device associated with the first electronic device 110. Among them, the first target IOT device is an IOT device that supports control instructions and can be directly controlled by the first electronic device 110 in the local area network. When the first electronic device 110 determines that there is a first target IOT device, the control instruction is directly sent to the first target IOT device to control the first target IOT device.
[0032] In an embodiment of the present invention, an IOT device (such as a smart TV) in a local area network is directly controlled by a first electronic device (such as a smart speaker), that is, the IOT device is locally controlled by the first electronic device without transmitting control instructions through the cloud, thereby reducing the transmission time of the control instructions and improving the control efficiency of the IOT device.
[0033] The control method of the IOT device provided in the embodiment of the present invention can be applied to the scenario where the smart speaker controls the smart IOT device. For example, after the smart speaker receives the control instruction, the smart speaker determines whether there is a first target IOT device in the IOT devices associated with the smart speaker based on the first device information of the IOT device associated with itself stored. Among them, the first target IOT device is an IOT device that supports control instructions and can be directly controlled by the smart speaker in the local area network. When the smart speaker determines that there is a first target IOT device, the smart speaker directly sends a control instruction to the first target IOT device to control the first target IOT device.
[0034] The above embodiment only takes the smart speaker controlling the IOT device as an example. The control method of the IOT device provided in the embodiment of the present invention is also applicable to other electronic devices for controlling the IOT device (such as smart phones, smart remote controls and other devices).
[0035] Figure 2 FIG. 1 is a flow chart showing a control method for an IOT device provided by an embodiment of the present invention. Figure 2 As shown, the method includes steps 210 to 230.
[0036] First, in step 210, a control instruction is received. Then, in step 220, based on the first device information of the IOT device associated with the first electronic device 110, it is determined whether there is a first target IOT device in the IOT devices associated with the first electronic device 110. The first target IOT device is an IOT device that supports control instructions and can be directly controlled by the first electronic device 110 in the local area network. Then, in step 230, if it is determined that there is a first target IOT device, a control instruction is sent to the first target IOT device.
[0037] The specific implementation method of each step in step 210 to step 230 is described in detail below.
[0038] First, the specific implementation of step 210 is introduced. In some embodiments of the present invention, the control instruction may be a voice instruction. For example, the voice instruction is: "Turn on the TV". The control instruction may be a voice instruction issued by the user, or a voice instruction sent by the user through a device.
[0039] As an example, a smart speaker can receive voice commands through its own voice acquisition module.
[0040] In other embodiments of the present invention, the control instruction may also be an input operation of the user on the first electronic device 110. As an example, the input operation may be a click input, a slide input, a text input, or a preset gesture operation. As an example, the control instruction may be a text such as "turn on the TV" input by the user. As another example, the control instruction may be a click input of the user on the icon of the TV.
[0041] The specific implementation of step 220 is described below. In step 220, the IOT devices associated with the first electronic device 110 include IOT devices controlled by the first electronic device 110 that are preset by the user.
[0042] As an example, the first electronic device 110 is a smart speaker, wherein the user can set the IOT devices controlled by the smart speaker according to his / her needs.
[0043] In some embodiments of the present invention, the first device information of the IOT device associated with the first electronic device 110 stored therein includes device identification information, location information, performance information of the IOT device, and control tag information of the device in the local area network.
[0044] As an example, the device identification information and performance information of the IOT device may be information acquired by the first electronic device 110 from the cloud server 120 of the first electronic device 110 .
[0045] It should be noted that the manufacturer of each IOT device will register the IOT device on the open platform provided by the manufacturer of the first electronic device 110. When registering an IOT device, the manufacturer of the IOT device will fill in the device identification information and performance information of the IOT device. Among them, the performance information of the IOT device includes the LAN discovery protocol supported by the IOT device, the LAN discovery message of the IOT device, the functions supported by the IOT device (such as turning on the light, turning off the light, adjusting the brightness, etc.), and whether the IOT device supports local control (i.e. direct control) by the first electronic device 110.
[0046] The first electronic device 110 locally controls the IOT device, which means that the first electronic device sends a control instruction to the IOT device via local Wi-Fi instead of the cloud to directly control the IOT device. Local area network discovery means finding the required device in the local area network through a certain protocol and obtaining device information.
[0047] After the manufacturer of the IOT device completes registration of the device on the open platform, the registration information of the IOT device will be sent to the cloud server 120 of the first electronic device 110 for storage.
[0048] It should be noted that since the installation location of the IOT device is determined by the user, the user can fill in the location information of each IOT device through the application associated with the first electronic device 110, and upload the location information of each IOT device to the cloud server 120 of the first electronic device 110 for storage.
[0049] It is worth mentioning that the control tag information of the IOT device in the local area network is used to indicate whether the IOT device supports direct control by the first electronic device 110 in the local area network, that is, whether the first electronic device 110 can directly send control command information to the IOT device in the local area network.
[0050] It should be noted that since users have different requirements for the use of IOT devices and the performance information of each IOT device is different, it is necessary to first determine the first target IOT device that supports receiving control instructions in the local area network and supports being directly controlled by the first electronic device 110, so as to achieve local control of the first target IOT device.
[0051] The specific implementation of the first electronic device 110 determining the first target IOT device is described below. In some embodiments of the present invention, step 220 includes steps 2201 to 2203.
[0052] First, in step 2201, based on the location information and / or performance information of the IOT device associated with the first electronic device 110 in the first device information, it is determined whether there is a second target IOT device that supports the control instruction in the IOT devices associated with the first electronic device 110, and a first judgment result is obtained. Then, in step 2202, if the first judgment result is yes, based on the performance information, it is determined whether there is a third target IOT device that supports the LAN discovery protocol in the second target IOT device, and a second judgment result is obtained. Then, in step 2203, if the second judgment result is yes, based on the control tag information of the third target IOT device in the LAN in the first device information of the third target IOT device, it is determined whether there is the first target IOT device in the third target IOT device.
[0053] The specific implementation method of each step in step 2201 to step 2203 is introduced below.
[0054] First, in step 2201, as an example, the control instruction is a voice instruction "turn on the bedroom light". It should be noted that when the received control instruction is a voice instruction, the voice instruction can be converted into corresponding text information using natural language processing technology. Then, the first electronic device 110 searches for a second target IOT device that supports text information corresponding to the voice instruction among its associated IOT devices.
[0055] For example, the first electronic device 110 can first determine whether there is an IOT device containing a lamp based on the device identification of each IOT device. If there is an IOT device containing a lamp among the IOT devices associated with the first electronic device 110, then based on the location information of each IOT device containing a lamp, it is determined whether there is an IOT device containing a lamp installed in the bedroom. If there is an IOT device containing a lamp installed in the bedroom among the IOT devices associated with the first electronic device 110, it is further determined whether the device supports the function of turning on the lamp. If the device supports the function of turning on the lamp, the device is determined as the second target IOT device.
[0056] That is to say, based on the specific content of the control instruction, the location information and / or performance information of each IOT device associated with the first electronic device 110 can be used to determine whether there is a second target IOT device that supports the control instruction among the IOT devices associated with the first electronic device 110.
[0057] It is worth mentioning that the specific content of the control instruction can be used to determine which information of the IOT device is used to determine the second target IOT device. If the control instruction includes the performance information of the IOT device but does not include the location information (for example, turn on the light), the second target IOT device can be determined based on the performance information of the IOT device. If the control instruction includes the performance information and location information of the IOT device, the second target IOT device can be determined based on the performance information and location information of the IOT device.
[0058] If all the IOT devices associated with the first electronic device 110 do not support the received control instruction pair, the first electronic device 110 cannot control the IOT devices associated with the first electronic device 110 according to the instruction.
[0059] In step 2202, if the first electronic device 110 is to be able to directly and locally control the second target IOT device, the IOT device needs to support LAN discovery. If the performance information of the second target IOT device includes the LAN discovery protocol and LAN discovery message of the IOT device, it means that the IOT device supports LAN discovery. If the performance information of the second target IOT device does not include the LAN discovery protocol and LAN discovery message, it means that the IOT device does not support LAN discovery.
[0060] As an example, the LAN discovery protocol may be a User Datagram Protocol (UDP). The LAN discovery message may be a preset binary field. It should be noted that the LAN discovery protocol and LAN discovery message of each IOT device may be different.
[0061] In step 2203, although the performance information of the IOT device stores information on whether the device supports direct control by the first electronic device 110, different IOT devices are controllable in different time periods according to the user's usage requirements. Therefore, it is necessary to determine the IOT devices in the local area network that can be directly controlled by the first electronic device 110.
[0062] In some embodiments of the present invention, the control tag information of the IOT device in the local area network is used to indicate whether the IOT device supports being directly controlled by the first electronic device 110 in the local area network.
[0063] It is worth mentioning that the control tag information of the IOT device in the local area network is different in different time periods. For example, if in the first time period, the IOT device is in the on state, and the IOT device supports local area network discovery and is locally controlled by the first electronic device 110, then the control tag information of the IOT device is to support being directly controlled by the first electronic device 110 in the local area network. However, if in the first time period, the IOT device is in the off state, even if the IOT device supports local area network discovery and is locally controlled by the first electronic device 110, but the IOT device is not in the on state, the first electronic device 110 cannot directly control the IOT device, therefore, the control tag information of the IOT device is not to support being directly controlled by the first electronic device 110 in the local area network.
[0064] In some embodiments of the present invention, before step 210, the IOT device control method provided by the embodiment of the present invention further includes step 201. Step 201, determining control tag information of the IOT device associated with the first electronic device 110 in the local area network.
[0065] As an example, the first electronic device 110 can determine the control tag information of the IOT device associated with the first electronic device 110 in the local area network when it is turned on. As another example, the first electronic device 110 can also determine the control tag information of the IOT device associated with the first electronic device 110 in the local area network at a preset time point.
[0066] In order to improve the timeliness of the control tag information of the IOT device in the local area network, step 201 includes determining the control tag information of the IOT device associated with the first electronic device 110 in the local area network according to a preset time period.
[0067] Since the control tag information of the IOT device in the local area network may be different in different time periods, and the controllable IOT devices in the local area network may also be different in different time periods, in order to improve the local control efficiency of the IOT device, the control tag information of the IOT device in the local area network can be updated according to a preset time period.
[0068] Furthermore, determining the control tag information of the IOT device in the local area network is performed on the first electronic device 110, which can reduce the burden on the cloud server and improve the control efficiency of the IOT device.
[0069] The specific implementation method of step 201 is described in detail below. In some embodiments of the present invention, step 201 includes steps A to D. Step A, obtaining the second device information of the IOT device associated with the first electronic device 110. Step B, based on the second device information, discovering the IOT device in the local area network. Step C, obtaining the target device identifier of the IOT device in the local area network. Step D, if there is a first device identifier that matches the target device identifier, the control tag information of the IOT device corresponding to the target device identifier in the local area network is set to: support direct control by the first electronic device 110 in the local area network.
[0070] The first device identifier is a device identifier of an IOT device that supports being directly controlled by the first electronic device 110 among the IOT devices associated with the first electronic device 110 .
[0071] The specific implementation method of each step in step A to step D is described in detail below.
[0072] In step A, the second device information of the IOT device associated with the first electronic device 110 includes the device identification and performance information of each IOT device. Referring to the above description, when the manufacturer of each IOT device registers the IOT device on the open platform, it will fill in the device identification information and performance information of the IOT device. Therefore, the first electronic device 110 can obtain the second device information of each IOT device. In other words, the first device information of the IOT device includes the second device information of the IOT device.
[0073] In some embodiments of the present invention, step B includes: when the second device information includes a LAN discovery message and a LAN discovery protocol corresponding to the IOT device associated with the first electronic device 110, encrypting the LAN discovery message through the control instruction management information of the IOT device associated with the first electronic device 110; broadcasting the encrypted LAN discovery message through the LAN discovery protocol to discover the IOT device in the LAN.
[0074] In some embodiments of the present invention, if the IOT device information includes a LAN discovery message and a LAN discovery protocol corresponding to the IOT device, it means that the IOT device supports LAN discovery.
[0075] In some embodiments of the present invention, in order to improve the security of the control instruction, the second device information of the IOT device also includes the control instruction encryption information associated with the IOT device.
[0076] For example, for an IOT device that supports local area network discovery, the first electronic device 110 encrypts the local area network discovery message associated with the IOT device using the control instruction encryption information associated with the IOT device. As an example, the control instruction encryption information associated with the IOT device is a control instruction management Javascript script associated with the IOT device.
[0077] It should be noted that the control instruction encryption information of the IOT device can be obtained from the cloud server 120 of the first electronic device 110. As an example, when the first electronic device 110 is powered on, the first electronic device 110 sends a request to obtain the second device information of the IOT device associated with the first electronic device 110 to the cloud server 120 of the first electronic device 110. Then the cloud server 120 of the first electronic device 110 can send the second device information of the IOT device associated with the first electronic device 110 to the first electronic device 110.
[0078] It is worth mentioning that the control instruction management JS script associated with each IOT device may be different, so the manufacturer of the IOT device will fill in the control instruction management JS script corresponding to the IOT device when registering each IOT device on the open platform. The control instruction management JS script associated with the IOT device can be used to encrypt the control instructions of the first electronic device 110 to the device, and to parse the feedback information returned by the IOT device to the first electronic device 110.
[0079] As an example, for an IOT device that supports LAN discovery, the first electronic device 110 broadcasts an encrypted LAN discovery message associated with the IOT device using the acquired LAN discovery protocol associated with the IOT device. If the IOT device receives the encrypted LAN discovery message associated with the IOT device broadcast by the first electronic device 110, the IOT device returns a feedback message to the first electronic device 110 to represent that the first electronic device 110 has discovered the IOT device in the LAN.
[0080] For example, the feedback information of the IOT device may be a binary file, which includes information such as the device identification of the IOT device, the communication protocol of the IOT device, the IP address of the IOT device, and the network communication port of the IOT device.
[0081] If the first electronic device 110 does not receive any feedback information from any IOT device, it means that no IOT device associated with it is found in the local area network.
[0082] In step C, the first electronic device 110 may obtain the target device identification of the IOT device in the local area network from the feedback information of each IOT device found in the local area network.
[0083] In step D, since only a portion of the IOT devices discovered by the first electronic device 110 in the local area network may support being controlled by the first electronic device 110, it is necessary to determine the control tag information of each IOT device discovered in the local area network.
[0084] Since the device identification and performance information of each IOT device associated with the first electronic device 110 can be obtained in step A. The performance information of the IOT device includes information on whether the IOT device supports being directly controlled by the first electronic device 110, it is possible to determine the device identification of the IOT device that supports being directly controlled by the first electronic device 110 among the IOT devices associated with the first electronic device 110, that is, the first device identification.
[0085] Then, for each target device identifier of an IOT device found by the first electronic device 110 in the local area network, the target device identifier is matched with each first device identifier. If there is a first device identifier that matches the target device identifier, it means that the IOT device corresponding to the target device identifier supports being directly controlled by the first electronic device 110 in the local area network, so the control tag information of the IOT device corresponding to the target device identifier in the local area network is set to: supports being directly controlled by the first electronic device 110 in the local area network.
[0086] That is, the first electronic device 110 searches for IOT devices in the local area network by using the local area network discovery protocol and local area network discovery message associated with the IOT device. Then, the first electronic device 110 uses the target device identification of each IOT device found in the local area network and the device identification and performance information of each IOT device associated with the first electronic device 110 to determine the control tag information of each IOT device found in the local area network, so that the first electronic device 110 can use the control tag information to determine whether the first target IOT device exists in the third target IOT device.
[0087] In an embodiment of the present invention, by updating the second device information of the IOT device associated with the first electronic device 110 locally, the first electronic device 110 can be used to determine the IOT devices that support local control in the local area network through local area network discovery, thereby achieving timely local control of the IOT devices and improving the control efficiency of the IOT devices.
[0088] In some embodiments of the present invention, by performing periodic local area network discovery according to a preset time period, the second device information and control instruction encryption information of the IOT device stored in the first electronic device 110 can be periodically updated locally to achieve timely updating of the IP address of the IOT device and prevent the IP address of the IOT device from changing and becoming unable to be controlled locally.
[0089] In some embodiments of the present invention, step 230 includes encrypting the control instruction through the control instruction management information associated with the first target IOT device; and sending the encrypted control instruction to the first target IOT device based on the Internet Protocol address of the first target IOT device and the communication protocol associated with the first target IOT device.
[0090] In some embodiments of the present invention, the first device information of the IOT device associated with the first electronic device 110 includes the control instruction encryption information associated with each IOT device. The control instruction encryption information is obtained by the first electronic device 110 when performing local area network discovery.
[0091] Referring to the description in step B above, for an IOT device in a local area network, when the IOT device receives the encrypted local area network discovery message, it will send feedback information to the first electronic device 110. Therefore, the first electronic device 110 will store the target device identifier, IP address and communication protocol of each IOT device in the local area network.
[0092] The first electronic device 110 can send a control instruction to the first target IOT device by using the IP address and communication protocol of the device, so as to achieve rapid control of the IOT device.
[0093] In the embodiment of the present invention, the security of the control instructions can be improved by encrypting the control instructions.
[0094] In some embodiments, the control instruction management information associated with the first target IOT device includes a control instruction management Javascript script associated with the first target IOT device.
[0095] In some embodiments of the present invention, since the JS engine is used locally on the first electronic device 110, the cloud server 120 of the first electronic device 110 only needs to update the control instruction management JS script of the IoT device to the local first electronic device 110. The data returned by scanning and control can be parsed for specific content through the control instruction management JS script, and the control data sent can be converted into encrypted binary data and sent through the control instruction management JS script. This is not only convenient and simple, but also can improve data security.
[0096] Moreover, the control instruction management JS script of each IOT device is maintained by the manufacturer of each IOT device. The first electronic device 110 does not need to be responsible for how to implement the control instruction management JS script of each IOT device. It only needs to pass in the corresponding parameters to obtain the corresponding results. This facilitates the maintenance of each IOT device for the first electronic device 110.
[0097] In some embodiments of the present invention, local discovery of IOT devices in a local area network, local control of IOT devices, and analysis of data returned by IOT devices are all performed on the first electronic device, without the need for analysis by the cloud server of the first electronic device and the cloud server of the manufacturer to which the IOT devices belong, thereby reducing the burden on the cloud and improving the control efficiency of IOT devices.
[0098] In some embodiments of the present invention, after step 230, the IOT device control method provided by the embodiment of the present invention further includes receiving a control result corresponding to the control instruction sent by the first target IOT device; and outputting the control result when the control result is successful control.
[0099] As an example, if the first electronic device 110 is a smart speaker, when the control result is successful, the control result can be announced by voice.
[0100] In some embodiments of the present invention, if the control result is a control failure, the first electronic device 110 sends a control instruction to the cloud server 120 of the first electronic device 110, and the cloud server 120 of the first electronic device 110 is connected to the cloud server of the manufacturer to which the first target IOT device belongs, so that the cloud server of the manufacturer to which the first target IOT device belongs sends the control instruction to the first target IOT device, thereby ensuring the success rate of control of the first target IOT device.
[0101] As an example, the first electronic device 110 is a smart speaker. The control method of the IOT device includes two parts: a local area network discovery process and a local control process.
[0102] Figure 3 The following is a flow chart of the LAN discovery process provided by the embodiment of the present invention. The specific process of the LAN discovery process is introduced below.
[0103] After the smart speaker 310 is powered on, the smart speaker 310 sends a first request to obtain the second device information of the IOT device associated with it to the cloud server 320 of the smart speaker 310 , and the request includes the identification information of the smart speaker 310 .
[0104] After receiving the first request, the cloud server 320 of the smart speaker 310 determines whether the IOT device associated with the smart speaker 310 is bound with performance information. If the smart speaker 310 determines that the IOT device is bound with performance information, it sends a second request to the cloud server 330 of the manufacturer to which the IOT device belongs to request the performance information of the IOT device.
[0105] After receiving the second request, the cloud server 330 of the manufacturer to which the IOT device belongs returns the performance information of the IOT device to the cloud server 320 of the smart speaker 310.
[0106] After the cloud server 320 of the smart speaker 310 receives the performance information of each IOT device associated with it, it sends information such as the device identification, performance information and control instruction encryption information of the IOT device (i.e., the second device information) to the smart speaker 310.
[0107] The smart speaker 310 determines whether the IOT device supports LAN discovery based on the performance information of each IOT device. For IOT devices that support LAN discovery, the smart speaker 310 broadcasts the encrypted LAN discovery message associated with the IOT device through the LAN discovery protocol associated with the IOT device to implement LAN search and discover IOT devices in the LAN.
[0108] For the IOT device 340 that receives the local area network discovery message, the IOT device 340 will send feedback information to the smart speaker 310. The smart speaker 310 can obtain the target device identifier of each IOT device 340 discovered in the local area network from the received feedback information.
[0109] For each target device identifier of an IOT device 340 found in the local area network, the smart speaker 310 determines whether there is a first device identifier that matches the target device identifier. For any target device identifier, if there is a first device identifier that matches the target device identifier, the control tag information of the IOT device corresponding to the target device identifier in the local area network is set to: support direct control by the smart speaker 310 in the local area network.
[0110] That is to say, through the LAN discovery process, the control tag information of the IOT devices in the LAN that support being controlled by the smart speaker 310 can be marked, so that the smart speaker 310 can locally control the IOT device according to the control tag information of the IOT device in the LAN.
[0111] Figure 4 The following is a flow chart of the local control process provided by the embodiment of the present invention. The local control process of the smart speaker 310 to the IOT device is specifically introduced below.
[0112] Continue to see Figure 4, if the user issues a voice control command "turn on the light", the smart speaker 310 can receive the control command. The smart speaker 310 converts the voice control command into corresponding text information by semantically parsing the control command. The smart speaker 310 determines whether there is a second target IOT device that supports the text information among the IOT devices associated with it. If there is no second target IOT device, it means that the smart speaker 310 cannot control any IOT device associated with the smart speaker 310.
[0113] If the second target IOT device exists, the smart speaker 310 determines whether there is a third target IOT device that supports local area network discovery in the second target IOT device. If the third target IOT device does not exist in the second target IOT device, the control instruction is transmitted to the second target IOT device using the cloud, that is, the smart speaker 310 sends the control instruction to the cloud server 320 of the smart speaker 310. The cloud server 320 of the smart speaker 310 sends the control instruction to the cloud server 330 of the manufacturer to which the second target IOT device belongs. The cloud server 330 of the manufacturer to which the second target IOT device belongs sends the control instruction to the second target IOT device.
[0114] If the third target IOT device exists in the second target IOT device, it is determined whether the first target IOT device exists in the third target IOT device.
[0115] If it is determined that the first target IOT device does not exist in the third target IOT device, the control instruction is transmitted to the third target IOT device 350 using the cloud. If it is determined that the first target IOT device exists, the smart speaker 310 encrypts the control instruction through the control instruction management JS script associated with the first target IOT device 360 to generate a binary control instruction. Then the smart speaker 310 uses the acquired communication protocol and IP address of the first target IOT device 360 to send the above binary control instruction to the first target IOT device 360.
[0116] The first target IOT device 360 returns the control result to the smart speaker 310. The smart speaker 310 parses the control result through the control instruction management JS script associated with the first target IOT device 360.
[0117] When the smart speaker 310 determines that the control result is a successful control, the control result can be announced by voice, such as "the light is turned on successfully". When the control result is a control failure, the smart speaker 310 sends a control instruction to the cloud server 320 of the smart speaker 310. The cloud server 320 of the smart speaker 310 sends the control instruction to the cloud server 330 of the manufacturer to which the first target IOT device 360 belongs. The cloud server 330 of the manufacturer to which the first target IOT device belongs sends the control instruction to the first target IOT device 360 to control the first target IOT device 360, thereby ensuring the control success rate of the first target IOT device 360.
[0118] Figure 5 FIG. 1 is a schematic diagram showing a structure of a control device for an IOT device according to an embodiment of the present invention. Figure 5 As shown, the control device 500 of the IOT device includes:
[0119] The receiving module 510 is used to receive a control instruction.
[0120] The judgment module 520 is used to judge whether there is a first target IOT device in the IOT devices associated with the first electronic device 110 based on the first device information of the IOT devices associated with the first electronic device 110. The first target IOT device is an IOT device that supports control instructions and can be directly controlled by the first electronic device 110 in the local area network.
[0121] The sending module 530 is used to send a control instruction to the first target IOT device when it is determined that the first target IOT device exists.
[0122] In an embodiment of the present invention, an IOT device (such as a smart TV) in a local area network is directly controlled by a first electronic device 110 (such as a smart speaker), that is, the IOT device is locally controlled by the first electronic device 110 without transmitting control instructions through the cloud, thereby reducing the transmission time of the control instructions and improving the control efficiency of the IOT device.
[0123] In some embodiments of the present invention, the determination module 520 includes:
[0124] The first judgment unit is used to judge whether there is a second target IOT device supporting the control instruction among the IOT devices associated with the first electronic device 110 based on the location information and / or performance information of the IOT device associated with the first electronic device 110 in the first device information, and obtain a first judgment result.
[0125] The second judgment unit is used to judge whether there is a third target IOT device supporting local area network discovery in the second target IOT device based on the performance information when the first judgment result is yes, to obtain a second judgment result.
[0126] The third judgment unit is used to judge whether the first target IOT device exists in the third target IOT device based on the control tag information of the device in the local area network in the first device information of the third target IOT device when the second judgment result is yes.
[0127] In some embodiments of the present invention, the sending module 530 is used to:
[0128] Encrypting the control instruction through the control instruction management information associated with the first target IOT device;
[0129] Based on the Internet Protocol address of the first target IOT device and the communication protocol associated with the first target IOT device, the encrypted control instruction is sent to the first target IOT device.
[0130] In some embodiments of the present invention, the control instruction management information includes a control instruction management Javascript script associated with the first target IOT device.
[0131] In some embodiments of the present invention, the control device 500 of the IOT device further includes:
[0132] The tag information determination module is used to determine the control tag information of the IOT device associated with the first electronic device 110 in the local area network.
[0133] In some embodiments of the present invention, the tag information determination module is used to:
[0134] According to a preset time period, control tag information of the IOT device associated with the first electronic device 110 in the local area network is determined.
[0135] In some embodiments of the present invention, the tag information determination module includes:
[0136] The first acquiring unit is configured to acquire second device information of an IOT device associated with the first electronic device 110 .
[0137] The discovery unit is used to discover the IOT device in the local area network based on the second device information.
[0138] The second acquisition unit is used to acquire the target device identifier of the IOT device in the local area network.
[0139] The setting unit is used to set the control tag information of the IOT device corresponding to the target device identifier in the local area network to support direct control by the first electronic device 110 in the local area network if there is a first device identifier matching the target device identifier.
[0140] The first device identifier is a device identifier of an IOT device that supports being directly controlled by the first electronic device 110 among the IOT devices associated with the first electronic device 110 .
[0141] In some embodiments of the present invention, the discovery unit is used to:
[0142] In the case where the second device information includes a local area network discovery message and a local area network discovery protocol corresponding to the IOT device associated with the first electronic device 110, the local area network discovery message is encrypted by the control instruction management information of the IOT device associated with the first electronic device 110;
[0143] The encrypted LAN discovery message is broadcast through the LAN discovery protocol to discover IoT devices in the LAN.
[0144] In some embodiments of the present invention, the control device 500 of the IOT device further includes:
[0145] The control result receiving module is used to receive the control result corresponding to the control instruction sent by the first target IOT device.
[0146] The output module is used to output the control result when the control result is successful.
[0147] In some embodiments of the present invention, the first electronic device 110 includes a smart speaker.
[0148] Other details of the control device of the IOT device according to the embodiment of the present invention are combined with the above Figures 2 to 5 The control method of the IOT device according to the embodiment of the present invention is similar and will not be repeated here.
[0149] Combination Figure 2 and Figure 5 The control method and apparatus of the IOT device according to the embodiment of the present invention described above can be implemented by a computing device. Figure 6 FIG. 6 is a schematic diagram showing a hardware structure 600 of a computing device according to an embodiment of the invention.
[0150] like Figure 6As shown, the computing device 600 includes an input device 601, an input interface 602, a central processing unit 603, a memory 604, an output interface 605, and an output device 606. The input interface 602, the central processing unit 603, the memory 604, and the output interface 605 are connected to each other via a bus 610, and the input device 601 and the output device 606 are connected to the bus 610 via the input interface 602 and the output interface 605, respectively, and then connected to other components of the computing device 600.
[0151] Specifically, the input device 601 receives input information from the outside and transmits the input information to the central processing unit 603 through the input interface 602; the central processing unit 603 processes the input information based on the computer executable instructions stored in the memory 604 to generate output information, temporarily or permanently stores the output information in the memory 604, and then transmits the output information to the output device 606 through the output interface 605; the output device 606 outputs the output information to the outside of the computing device 600 for user use.
[0152] That is to say, Figure 6 The computing device shown may also be implemented as including: a memory storing computer executable instructions; and a processor, which can implement the combination of Figure 2 and Figure 5 Described is a control method and apparatus for an IOT device.
[0153] An embodiment of the present invention further provides a computer storage medium having computer program instructions stored thereon; when the computer program instructions are executed by a processor, the control method of the IOT device provided by the embodiment of the present invention is implemented.
[0154] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0155] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.
[0156] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.
Claims
1. A control method for an IOT device, applied to a first electronic device, wherein: The method comprises: Receive control instructions; Based on the location information and / or performance information of the IOT device associated with the first electronic device, determine whether there is a second target IOT device that supports the control instruction among the IOT devices associated with the first electronic device, and obtain a first determination result; If the first judgment result is yes, determine whether there is a third target IOT device that supports local area network discovery in the second target IOT device based on the performance information to obtain a second judgment result; If the second judgment result is yes, judging whether the first target IOT device exists in the third target IOT device based on the control tag information of the third target IOT device in the local area network; When it is determined that the first target IOT device exists, the control instruction is sent to the first target IOT device.
2. The method according to claim 1, wherein: The sending the control instruction to the first target IOT device includes: Encrypting the control instruction through the control instruction management information associated with the first target IOT device; Based on the Internet Protocol address of the first target IOT device and the communication protocol associated with the first target IOT device, the encrypted control instruction is sent to the first target IOT device.
3. The method according to claim 2, wherein: The control instruction management information includes a control instruction management Javascript script associated with the first target IOT device.
4. The method according to claim 1, wherein: Before receiving the control instruction, the method further includes: Determine control tag information of an IOT device associated with the first electronic device in the local area network.
5. The method according to claim 4, wherein: The determining control tag information of the IOT device associated with the first electronic device in the local area network includes: According to a preset time period, control tag information of the IOT device associated with the first electronic device in the local area network is determined.
6. The method according to claim 4, wherein: The determining control tag information of the IOT device associated with the first electronic device in the local area network includes: Acquire second device information of an IOT device associated with the first electronic device; Based on the second device information, discover the IOT device in the local area network; Obtain a target device identifier of an IOT device in the local area network; If there is a first device identifier that matches the target device identifier, setting the control tag information of the IOT device corresponding to the target device identifier in the local area network to: support being directly controlled by the first electronic device in the local area network; The first device identifier is a device identifier of an IOT device that supports being directly controlled by the first electronic device among the IOT devices associated with the first electronic device.
7. The method according to claim 6, wherein: The step of discovering the IOT device in the local area network based on the second device information includes: In the case where the second device information includes a local area network discovery message and a local area network discovery protocol corresponding to the IOT device associated with the first electronic device, encrypting the local area network discovery message through the control instruction management information of the IOT device associated with the first electronic device; The encrypted LAN discovery message is broadcasted through the LAN discovery protocol to discover IOT devices in the LAN.
8. The method according to claim 1, wherein: The method further comprises: Receiving a control result corresponding to the control instruction sent by the first target IOT device; When the control result is that the control is successful, the control result is output.
9. The method according to claim 1, wherein: The first electronic device includes a smart speaker.
10. A control device for an IOT device, applied to a first electronic device, wherein: The device comprises: A receiving module, used for receiving control instructions; A judgment module, configured to judge whether there is a second target IOT device supporting the control instruction among the IOT devices associated with the first electronic device based on the location information and / or performance information of the IOT device associated with the first electronic device, and obtain a first judgment result; If the first judgment result is yes, determine whether there is a third target IOT device that supports local area network discovery in the second target IOT device based on the performance information to obtain a second judgment result; If the second judgment result is yes, judging whether the first target IOT device exists in the third target IOT device based on the control tag information of the third target IOT device in the local area network; A sending module is used to send the control instruction to the first target IOT device when it is determined that the first target IOT device exists.
11. A computing device, wherein: The computing device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the control method of the IOT device according to any one of claims 1 to 9 is implemented.
12. A computer storage medium, wherein: The computer storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the control method of the IOT device according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Voice control method and apparatus
CN107393528A