Control methods for IoT devices and servers, storage media, and electronic devices

By receiving control requests from user terminals and obtaining device status and permission information, decentralized IoT device control is achieved, solving single point of failure and data security issues in smart home systems and improving system stability and user experience.

CN119496809BActive Publication Date: 2025-11-14GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411626611.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-11-14
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

Existing smart home systems adopt a centralized control model, which has problems such as single point of failure and data security risks, and lacks efficient and accurate solutions.

Method used

This invention provides a method and server for controlling IoT devices. By receiving control requests from user terminals, obtaining device status and user permission information, and sending control commands, decentralized device control is achieved. Any authorized object can remotely control IoT devices. Commands are issued based on the current device status and user permission information, protecting user privacy and device security.

Benefits of technology

It improves the stability of smart home systems, avoids system paralysis caused by single points of failure, enhances user experience and device security, and ensures user privacy and device security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119496809B_ABST
    Figure CN119496809B_ABST
Patent Text Reader

Abstract

This invention provides a control method for IoT devices, as well as a server, storage medium, and electronic device. The method includes: receiving a control request for a target IoT device sent by a user terminal; obtaining the current device status of the target IoT device and the user permission information of the user terminal; and sending control commands to the target IoT device based on the current device status and the user permission information. This solves the technical problem of system instability caused by the centralized control model in related technologies. Furthermore, by issuing commands based on the current device status and user permission information, it protects user privacy and device security, and improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically, to a control method for Internet of Things (IoT) devices, as well as a server, storage medium, and electronic equipment. Background Technology

[0002] In related technologies, with the rapid development of IoT technology, smart homes have become an important part of modern life. However, most smart home systems on the market currently adopt a centralized control model, which has problems such as single points of failure and data security risks.

[0003] No efficient and accurate solution has yet been found to address the aforementioned issues in the relevant technologies. Summary of the Invention

[0004] This invention provides a control method for Internet of Things (IoT) devices, as well as a server, storage medium, and electronic device, to solve technical problems in related technologies.

[0005] According to an embodiment of the present invention, a control method for an Internet of Things (IoT) device is provided, comprising: receiving a control request for a target IoT device sent by a user terminal; obtaining the current device status of the target IoT device and obtaining user permission information of the user terminal; and sending a control command to the target IoT device according to the current device status and the user permission information.

[0006] Optionally, sending a control command to the target IoT device based on the current device status and the user permission information includes: determining the permission scope of the user terminal based on the user permission information; parsing the request instruction of the control request; determining whether the permission scope includes the permission to issue the request instruction; if the permission scope includes the permission to issue the request instruction, sending a control command to the target IoT device based on the current device status.

[0007] Optionally, sending a control instruction to the target IoT device based on the current device state includes: determining a basic state set that the target IoT device supports the request instruction; determining whether the basic state set includes the current device state; and if the basic state set includes the current device state, sending the request instruction to the target IoT device, wherein the control instruction includes the request instruction.

[0008] Optionally, after determining whether the basic state set contains the current device state, the method further includes: if the basic state set does not contain the current device state, searching in the basic state set for the target state that best matches the request instruction; sending a state switching instruction to the target IoT device, wherein the state switching instruction is used to switch the target IoT device from the current device state to the target state; after the target IoT device switches to the target state, sending the request instruction to the target IoT device, wherein the control instruction includes the state switching instruction and the request instruction.

[0009] Optionally, after determining whether the scope of permissions includes the permission to issue the request instruction, the method further includes: if the scope of permissions does not include the permission to issue the request instruction, searching within the scope of permissions for a set of recommended instructions with the same control type as the permission to issue the instruction; returning the set of recommended instructions to the user terminal; receiving the target recommended instruction selected by the user terminal from the set of recommended instructions; and sending the target recommended instruction to the target IoT device.

[0010] Optionally, obtaining the user permission information of the user terminal includes: reading the user account logged in on the user terminal, obtaining the type of software installed on the user terminal, and reading the network information of the user terminal; and determining the user permission information of the user terminal based on the user account, the software type, and the network information.

[0011] Optionally, before receiving the control request for the target IoT device sent by the user terminal, the method further includes: receiving the registration request of the target IoT device; responding to the registration request, assigning a device identifier to the target IoT device, loading the device control model of the target IoT device, and configuring the device permission information of the target IoT device, wherein the device permission information includes the permission scope of all authorized objects allowed to control the target IoT device.

[0012] According to another embodiment of the present invention, a server is provided, comprising: a first receiving module, configured to receive a control request for a target Internet of Things (IoT) device sent by a user terminal; an obtaining module, configured to obtain the current device status of the target IoT device and the user permission information of the user terminal; and a sending module, configured to send control instructions to the target IoT device according to the current device status and the user permission information.

[0013] Optionally, the sending module includes: a determining unit, configured to determine the permission range of the user terminal based on the user permission information; a parsing unit, configured to parse the request instruction of the control request; a judging unit, configured to judge whether the permission range includes the permission to issue the request instruction; and a first sending unit, configured to send a control instruction to the target IoT device based on the current device state if the permission range includes the permission to issue the request instruction.

[0014] Optionally, the first sending unit includes: a determining subunit, configured to determine a basic state set for which the target IoT device supports the request instruction; a judging subunit, configured to judge whether the basic state set includes the current device state; and a first sending subunit, configured to send the request instruction to the target IoT device if the basic state set includes the current device state, wherein the control instruction includes the request instruction.

[0015] Optionally, the first sending unit further includes: a search subunit, configured to, after the judgment subunit determines whether the basic state set contains the current device state, if the basic state set does not contain the current device state, search in the basic state set for the target state that best matches the request instruction; a second sending subunit, configured to send a state switching instruction to the target IoT device, wherein the state switching instruction is used to switch the target IoT device from the current device state to the target state; and a third sending subunit, configured to, after the target IoT device switches to the target state, send the request instruction to the target IoT device, wherein the control instruction includes the state switching instruction and the request instruction.

[0016] Optionally, the sending module further includes: a search unit, configured to, after the judgment unit determines whether the permission range includes the permission to issue the request instruction, if the permission range does not include the permission to issue the request instruction, search for a set of recommended instructions with the same control type as the issuance permission within the permission range; a return unit, configured to return the set of recommended instructions to the user terminal; a receiving unit, configured to receive the target recommended instruction selected by the user terminal in the set of recommended instructions; and a second sending unit, configured to send the target recommended instruction to the target IoT device.

[0017] Optionally, the acquisition module includes: a reading unit, configured to read the user account logged in on the user terminal, obtain the type of software installed on the user terminal, and read the network information of the user terminal; and a determining unit, configured to determine the user permission information of the user terminal based on the user account, the software type, and the network information.

[0018] Optionally, the device further includes: a second receiving module, configured to receive a registration request from the target IoT device before the receiving module receives a control request for the target IoT device sent by a user terminal; and a configuration module, configured to respond to the registration request, assign a device identifier to the target IoT device, load the device control model of the target IoT device, and configure the device permission information of the target IoT device, wherein the device permission information includes the permission scope of all authorized objects allowed to control the target IoT device.

[0019] According to another aspect of the embodiments of this application, a storage medium is also provided, the storage medium including a stored program that executes the above steps when the program is run.

[0020] According to another aspect of the embodiments of this application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the programs stored in the memory.

[0021] According to yet another embodiment of the present invention, a storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to execute the steps in any of the above-described apparatus embodiments when running.

[0022] This invention provides a decentralized device control scheme by receiving a control request from a user terminal for a target IoT device; obtaining the current device status of the target IoT device and the user permission information of the user terminal; and sending control commands to the target IoT device based on the current device status and the user permission information. This allows any authorized entity to remotely control IoT devices, improving the stability of smart home systems, preventing single-point failures from paralyzing the entire system, and solving the technical problem of system instability caused by centralized control models in related technologies. Furthermore, issuing commands based on the current device status and user permission information protects user privacy and device security, enhancing the user experience. Attached Figure Description

[0023] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0024] Figure 1 This is a hardware structure block diagram of a server according to an embodiment of the present invention;

[0025] Figure 2This is a flowchart of a control method for an Internet of Things (IoT) device according to an embodiment of the present invention;

[0026] Figure 3 This is a schematic diagram of the architecture of an embodiment of the present invention;

[0027] Figure 4 This is a flowchart illustrating an embodiment of the present invention;

[0028] Figure 5 This is a structural block diagram of a server according to an embodiment of the present invention. Detailed Implementation

[0029] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present application can be combined with each other.

[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0031] Example 1

[0032] The method embodiment provided in Embodiment 1 of this application can be executed in a server, controller, or similar device management device. Taking running on a server as an example, Figure 1 This is a hardware structure block diagram of a server according to an embodiment of the present invention. Figure 1 As shown, a server may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. Optionally, the server may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server described above. For example, the server may also include components that are more complex than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0033] The memory 104 can be used to store server programs, such as application software programs and modules, like the server program corresponding to a control method for an IoT device in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the server program stored in the memory 104, thus implementing the aforementioned method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the server via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0034] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the server's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0035] This embodiment provides a control method for an Internet of Things (IoT) device. Figure 2 This is a flowchart of a control method for an Internet of Things (IoT) device according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:

[0036] Step S202: Receive a control request for the target IoT device sent by the user terminal;

[0037] The target IoT device in this embodiment can be any device that can be remotely controlled via the cloud, such as smart home appliances, such as air conditioners, refrigerators, washing machines, televisions, cameras, etc.

[0038] Step S204: Obtain the current device status of the target IoT device and the user permission information of the user terminal;

[0039] The current device status in this embodiment includes on / off status, operating mode, etc. The user permission information of the user terminal in this embodiment is used to characterize the scope of operation of the user terminal in controlling the target IoT device, such as allowing Class 1 operations on the target IoT device and disallowing Class 2 operations, etc.

[0040] Step S206: Send a control command to the target IoT device based on the current device status and the user permission information.

[0041] Optionally, the control command can be the command corresponding to the control request mentioned above, or it can be other commands that do not correspond to it.

[0042] In one example, historical control requests for the target IoT device are retrieved. These historical control requests are control requests from a preset duration prior to the current time. The system determines whether the operation types of the current control request and the historical control request are the same. If they are different, a control command is sent to the target IoT device based on the current device state and the user permission information. If they are the same, the system retrieves the historical permission range of the authorized object that triggered the historical control request and determines whether this historical permission range is greater than the user terminal's permission range. If the historical permission range is greater than the user terminal's permission range, sending control commands to the target IoT device based on the current device state and the user permission information is prohibited. If the historical permission range is less than the user terminal's permission range, sending control commands to the target IoT device based on the current device state and the user permission information is permitted. For example, if both User 1 and User 2 want to adjust the air conditioner temperature, and User 1 has greater permissions than User 2, then for a period of time after User 1 adjusts the air conditioner temperature, User 2, who has lower permissions, is not allowed to adjust the user's temperature.

[0043] Through the above steps, a decentralized device control scheme is implemented, which receives control requests from user terminals for target IoT devices; obtains the current device status of the target IoT device and the user permission information of the user terminal; and sends control commands to the target IoT device based on the current device status and the user permission information. This allows any authorized entity to remotely control IoT devices, improving the stability of smart home systems, preventing single-point failures from paralyzing the entire system, and solving the technical problem of system instability caused by centralized control models in related technologies. Furthermore, issuing commands based on the current device status and user permission information protects user privacy and device security, enhancing the user experience.

[0044] Figure 3 This is a schematic diagram of the architecture of an embodiment of the present invention, including: a cloud server: responsible for storing information such as the control logic and user permissions of smart home appliances, and providing a remote control interface. Smart home appliances: equipped with built-in communication and control modules, transmitting data and executing control commands with the cloud server. User terminals: such as mobile apps, web pages, tablets, or mini-programs, used by users to remotely send control requests and receive device status information. For example, if a user issues a control command on the app, the app calls the server's interface to transmit the command. After receiving the device command, the server checks the database for the appropriate app's user information and whether the target device exists and is functioning correctly. If everything is correct, the server sends the command to the home appliance for execution. The device, with its built-in communication and control modules, directly receives the command and returns the execution result to the server. The server then returns the result to the app, and the app notifies the user.

[0045] In one embodiment of this example, sending a control command to the target IoT device based on the current device status and the user permission information includes: determining the permission scope of the user terminal based on the user permission information; parsing the request instruction of the control request; determining whether the permission scope includes the permission to issue the request instruction; and if the permission scope includes the permission to issue the request instruction, sending a control command to the target IoT device based on the current device status.

[0046] In one example, the user terminal's permission scope includes allowing control of devices A and B for operations of types 1 to 5, and allowing control of device C for operations of type 2. These operations include various types such as temperature control, mode control, on / off control, scheduled control, and device deregistration. The request instruction for the control request is used to indicate specific operation instructions, such as lowering the temperature or switching modes. If the user terminal is device A and the request instruction is a type 1 operation, then the permission scope includes the permission to issue the request instruction, and the user terminal can respond to the control request from the user terminal and send control instructions to the target IoT device.

[0047] Based on this implementation, only when the user terminal's permission scope includes the permission to issue the request instruction, can the control instruction be sent to the target IoT device based on the current device status, thus ensuring device security and preventing unfamiliar devices from arbitrarily controlling the target IoT device.

[0048] In one example, sending a control instruction to the target IoT device based on the current device state includes: determining a basic state set that the target IoT device supports the request instruction; determining whether the basic state set includes the current device state; and if the basic state set includes the current device state, sending the request instruction to the target IoT device, wherein the control instruction includes the request instruction.

[0049] In this example, the basic state set includes multiple basic states. The target IoT device can only respond to the request command normally when its current device state is in a basic state. For example, it can only respond to the power-on command when it is in standby mode, the mode selection command when it is in power-on mode, and the anti-direct-blow command when it is in cooling mode. If the target IoT device's current device state is not in the basic state set, the target IoT device cannot directly respond to the request command, and the request command is invalid at this time.

[0050] Using the solution in this example, when the target IoT device supports the request instruction's basic state set including the current device state, the request instruction is sent to the target IoT device, ensuring the validity of the control request and improving the device's control efficiency.

[0051] In another example, after determining whether the basic state set contains the current device state, the method further includes: if the basic state set does not contain the current device state, searching in the basic state set for the target state that best matches the request instruction; sending a state switching instruction to the target IoT device, wherein the state switching instruction is used to switch the target IoT device from the current device state to the target state; after the target IoT device switches to the target state, sending the request instruction to the target IoT device, wherein the control instruction includes the state switching instruction and the request instruction.

[0052] Optionally, if the set of basic states supporting the request instruction contains only one basic state, then that basic state is determined as the target state that best matches the request instruction. If the set of basic states contains multiple optional basic states, then the best matching target state can be determined based on environmental parameters, big data model prediction, or other methods.

[0053] For example, to control a target IoT device, the device must be powered on. If the device is powered off, a power-on command must be sent first, followed by the control request command. In some implementation scenarios, the target IoT device is an air conditioner with an anti-direct-blow function, but this function only works in cooling mode. If the current device mode is ventilation, and the user sends a control request to activate the anti-direct-blow function, the server will first send a state-switching command to activate cooling mode, and then send the command to activate the anti-direct-blow function. In other words, if the current device state does not support the command, the device state is changed first to ensure the command is executed effectively.

[0054] Using the solution in this example, even if the target IoT device's basic state set supporting the request instruction does not include the current device state, the device can still indirectly respond to the control request by controlling the device state, avoiding multiple user operations and improving the device's control efficiency.

[0055] In another embodiment of this example, after determining whether the scope of permissions includes the permission to issue the request instruction, the method further includes: if the scope of permissions does not include the permission to issue the request instruction, searching within the scope of permissions for a set of recommended instructions with the same control type as the permission to issue the instruction; returning the set of recommended instructions to the user terminal; receiving the target recommended instruction selected by the user terminal from the set of recommended instructions; and sending the target recommended instruction to the target IoT device.

[0056] In this implementation, the user terminal's permission scope includes allowing control of devices A and B for operations of types 1 to 5, and allowing control of device C for operations of type 2. These include various types of operations such as temperature control, mode control, on / off control, scheduled control, and device deregistration. The request instruction for the control request is used to indicate specific operation instructions, such as lowering the temperature or switching modes. If the user terminal is device C and the request instruction is a type 1 operation, the permission scope does not include the permission to issue the requested instruction. Instead, a recommended instruction set belonging to type 2 operations can be returned to the user terminal. The user selects one and notifies the server, which then issues the instruction to device C. In one implementation scenario, device C is an air conditioner. Type 1 operations are shutdown instructions, and type 2 operations are temperature adjustment instructions. The recommended instruction set includes temperature increase instructions and temperature decrease instructions (but not shutdown instructions or other types of operation instructions besides temperature adjustment instructions). Within their own permissions, the user can adjust the air conditioner to their preferred state according to their actual needs.

[0057] Based on this implementation, when the user terminal's permission scope does not include the permission to issue the requested instruction, by returning a set of recommended instructions within its permission scope to the user terminal, the user can adjust the air conditioner to their desired state according to their actual needs within the user terminal's permissions, thereby improving the user experience.

[0058] Optionally, obtaining the user permission information of the user terminal includes: reading the user account logged in on the user terminal, obtaining the type of software installed on the user terminal, and reading the network information of the user terminal; and determining the user permission information of the user terminal based on the user account, the software type, and the network information.

[0059] Optionally, software types include operating systems (such as Xiaomi speakers, Baidu speakers, etc.), applications (APPs), mini programs, and official accounts on the local area network control terminal. The network information of the user terminal is used to indicate whether the user terminal is connected to the same local area network as the target IoT device.

[0060] The solution in this embodiment uses multiple dimensions of information, such as the user account, software type, and network information, to configure the user permission information of the user terminal, thereby achieving fine-grained configuration of user permissions. Through permission hierarchy, the security of the device and the user experience are improved.

[0061] In this embodiment, before receiving the control request for the target IoT device sent by the user terminal, the method further includes: receiving the registration request of the target IoT device; responding to the registration request, assigning a device identifier to the target IoT device, loading the device control model of the target IoT device, and configuring the device permission information of the target IoT device, wherein the device permission information includes the permission scope of all authorized objects that are allowed to control the target IoT device.

[0062] Optionally, the device control model is used to decode and convert relevant interaction commands for the target IoT device, and also includes the device's control logic. For example, an air conditioner's control logic includes power on / off, temperature adjustment, mode adjustment, fan speed adjustment, and airflow mode adjustment. Authorized objects include authorized terminals, authorized accounts, and authorized software. Device permission information includes the permission scope of the authorized terminal, authorized account, and authorized software. For example, a mobile app logs in using a username, password, or verification code to ensure the user is a legitimate network user. After successful user authentication, the cloud checks whether the user has permission to perform specific operations, which can be done by querying the user's account role or access control list. Device identification includes the target IoT device's device name, model, icon, and other information.

[0063] The solution in this embodiment achieves decentralized control of IoT devices by pre-registering the target IoT device to the cloud and configuring and assigning permissions to it, allowing any participant to submit a control request.

[0064] Figure 4 This is a flowchart illustrating an embodiment of the present invention. The present invention proposes a cloud-based decentralized remote control system and method for home appliances. Through a decentralized control mode and advanced security measures, it solves the problems existing in current smart home systems, improving system stability, security, and user experience. When a new device joins the system, it needs to register through the cloud and obtain a unique device identifier. User terminals can discover and connect to registered devices through the cloud. The cloud server is responsible for user permission management, ensuring that only authorized users can control the devices. Functions such as user registration, login, and permission allocation are provided.

[0065] Each smart home appliance possesses independent communication and control capabilities, independent of a central controller. Devices exchange information and collaborate via a cloud server, achieving decentralized control. Users send control requests to the cloud through their terminals, and the cloud issues control commands to designated devices based on device status and user permissions. A standardized communication protocol and rules ensure secure and reliable data transmission between devices and between devices and the cloud. Encryption technology protects the transmission of user data and control commands, selecting different encryption technologies for different scenarios. For example, symmetric encryption algorithms such as AES can be used for applications requiring high-speed data transmission; while asymmetric encryption algorithms such as RSA can be used for scenarios requiring higher security. For IoT devices with resource limitations (such as limited computing power and storage space), lightweight encryption algorithms are used. These algorithms have lower computational complexity and memory footprint, meeting the efficiency requirements of IoT devices while ensuring security. Authentication is performed between user terminals and home appliances to prevent unauthorized access.

[0066] This embodiment proposes a cloud-based decentralized smart home system and its control method, solving the problem of system paralysis caused by a single point of failure. It reduces the risk of data tampering or misuse in centralized structures, improves the stability of the smart home system, and avoids system paralysis due to a single point of failure. It also enhances the security of the smart home system, protecting user privacy and device security. Finally, it improves the user experience, enabling users to more conveniently remotely control home appliances.

[0067] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0068] Example 2

[0069] This embodiment also provides a server, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. The term "module" as used below can refer to a combination of software and hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementations, or a combination of software and hardware, are also contemplated.

[0070] Figure 5 This is a structural block diagram of a server according to an embodiment of the present invention, such as... Figure 5 As shown, it includes:

[0071] The first receiving module 50 is used to receive control requests sent by the user terminal for the target IoT device;

[0072] The acquisition module 52 is used to acquire the current device status of the target IoT device and the user permission information of the user terminal;

[0073] The sending module 56 is used to send control commands to the target IoT device based on the current device status and the user permission information.

[0074] Optionally, the sending module includes: a determining unit, configured to determine the permission range of the user terminal based on the user permission information; a parsing unit, configured to parse the request instruction of the control request; a judging unit, configured to judge whether the permission range includes the permission to issue the request instruction; and a first sending unit, configured to send a control instruction to the target IoT device based on the current device state if the permission range includes the permission to issue the request instruction.

[0075] Optionally, the first sending unit includes: a determining subunit, configured to determine a basic state set for which the target IoT device supports the request instruction; a judging subunit, configured to judge whether the basic state set includes the current device state; and a first sending subunit, configured to send the request instruction to the target IoT device if the basic state set includes the current device state, wherein the control instruction includes the request instruction.

[0076] Optionally, the first sending unit further includes: a search subunit, configured to, after the judgment subunit determines whether the basic state set contains the current device state, if the basic state set does not contain the current device state, search in the basic state set for the target state that best matches the request instruction; a second sending subunit, configured to send a state switching instruction to the target IoT device, wherein the state switching instruction is used to switch the target IoT device from the current device state to the target state; and a third sending subunit, configured to, after the target IoT device switches to the target state, send the request instruction to the target IoT device, wherein the control instruction includes the state switching instruction and the request instruction.

[0077] Optionally, the sending module further includes: a search unit, configured to, after the judgment unit determines whether the permission range includes the permission to issue the request instruction, if the permission range does not include the permission to issue the request instruction, search for a set of recommended instructions with the same control type as the issuance permission within the permission range; a return unit, configured to return the set of recommended instructions to the user terminal; a receiving unit, configured to receive the target recommended instruction selected by the user terminal in the set of recommended instructions; and a second sending unit, configured to send the target recommended instruction to the target IoT device.

[0078] Optionally, the acquisition module includes: a reading unit, configured to read the user account logged in on the user terminal, obtain the type of software installed on the user terminal, and read the network information of the user terminal; and a determining unit, configured to determine the user permission information of the user terminal based on the user account, the software type, and the network information.

[0079] Optionally, the device further includes: a second receiving module, configured to receive a registration request from the target IoT device before the receiving module receives a control request for the target IoT device sent by a user terminal; and a configuration module, configured to respond to the registration request, assign a device identifier to the target IoT device, load the device control model of the target IoT device, and configure the device permission information of the target IoT device, wherein the device permission information includes the permission scope of all authorized objects allowed to control the target IoT device.

[0080] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0081] Example 3

[0082] Embodiments of the present invention also provide a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0083] Optionally, in this embodiment, the storage medium can be configured to store a computer program for execution:

[0084] S1, receives a control request sent by the user terminal for the target IoT device;

[0085] S2, obtain the current device status of the target IoT device, and obtain the user permission information of the user terminal;

[0086] S3, send control commands to the target IoT device based on the current device status and the user permission information.

[0087] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0088] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0089] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0090] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0091] S1, receives a control request sent by the user terminal for the target IoT device;

[0092] S2, obtain the current device status of the target IoT device, and obtain the user permission information of the user terminal;

[0093] S3, send control commands to the target IoT device based on the current device status and the user permission information.

[0094] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0095] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0096] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0097] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of units or modules may be electrical or other forms.

[0098] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0099] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0100] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, controller, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0101] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A control method for an Internet of Things (IoT) device, characterized in that, include: Receive control requests sent by user terminals for target IoT devices; Obtain the current device status of the target IoT device, and obtain the user permission information of the user terminal; Send control commands to the target IoT device based on the current device status and the user permission information; The step of sending a control command to the target IoT device based on the current device status and the user permission information includes: determining the permission scope of the user terminal based on the user permission information; parsing the request instruction of the control request; determining whether the permission scope includes the permission to issue the request instruction; if the permission scope includes the permission to issue the request instruction, sending a control command to the target IoT device based on the current device status; if the permission scope does not include the permission to issue the request instruction, searching for a set of recommended instructions with the same control type as the issuance permission within the permission scope; returning the set of recommended instructions to the user terminal; receiving the target recommended instruction selected by the user terminal from the set of recommended instructions; and sending the target recommended instruction to the target IoT device.

2. The method according to claim 1, characterized in that, Sending control commands to the target IoT device based on the current device status includes: Determine the basic set of states that the target IoT device supports the request command; Determine whether the basic state set contains the current device state; If the basic state set includes the current device state, the request instruction is sent to the target IoT device, wherein the control instruction includes the request instruction.

3. The method according to claim 2, characterized in that, After determining whether the basic state set contains the current device state, the method further includes: If the basic state set does not contain the current device state, search the basic state set for the target state that best matches the request instruction. Send a state switching instruction to the target IoT device, wherein the state switching instruction is used to switch the target IoT device from the current device state to the target state; After the target IoT device switches to the target state, the request instruction is sent to the target IoT device, wherein the control instruction includes the state switching instruction and the request instruction.

4. The method according to claim 1, characterized in that, Obtaining the user permission information of the user terminal includes: Read the user account logged in on the user terminal, obtain the type of software installed on the user terminal, and read the network information of the user terminal; The user permission information of the user terminal is determined based on the user account, the software type, and the network information.

5. The method according to claim 1, characterized in that, Before receiving a control request for a target IoT device sent by a user terminal, the method further includes: Receive the registration request from the target IoT device; In response to the registration request, a device identifier is assigned to the target IoT device, the device control model of the target IoT device is loaded, and the device permission information of the target IoT device is configured, wherein the device permission information includes the permission scope of all authorized objects that are allowed to control the target IoT device.

6. A server, characterized in that, include: The first receiving module is used to receive control requests sent by the user terminal for the target IoT device; The acquisition module is used to acquire the current device status of the target IoT device and the user permission information of the user terminal; The sending module is used to send control commands to the target IoT device based on the current device status and the user permission information; The sending module includes: a determining unit, configured to determine the permission range of the user terminal based on the user permission information; a parsing unit, configured to parse the request instruction of the control request; a judging unit, configured to judge whether the permission range includes the permission to issue the request instruction; and a first sending unit, configured to send a control instruction to the target IoT device based on the current device state if the permission range includes the permission to issue the request instruction. The sending module further includes: a search unit, configured to, after the judgment unit determines whether the permission range includes the permission to issue the request instruction, if the permission range does not include the permission to issue the request instruction, search for a set of recommended instructions with the same control type as the issuance permission within the permission range; a return unit, configured to return the set of recommended instructions to the user terminal; a receiving unit, configured to receive the target recommended instruction selected by the user terminal from the set of recommended instructions; and a second sending unit, configured to send the target recommended instruction to the target IoT device.

7. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the steps of the control method for the Internet of Things device according to any one of claims 1 to 5 when it runs.

8. An electronic device comprising a processor, a communication interface, a memory, and a communication bus, wherein, The processor, communication interface, and memory communicate with each other via a communication bus; among which: Memory, used to store computer programs; A processor is configured to execute the steps of the control method for the Internet of Things device according to any one of claims 1 to 5 by running a program stored in memory.

Citation Information

Patent Citations

  • Smart home control system and method based on blockchain

    CN110687821A

  • Control method and apparatus for air conditioner, system, terminal device, and medium

    WO2023221507A1