Internet of Things device management method, device and storage medium

By storing control instructions when the IoT device is offline and forwarding and executing when the device is back online, the problem that the IoT device cannot execute control instructions when the device is offline is solved, and the reliability of the IoT system is improved.

CN119766871APending Publication Date: 2025-04-04SHENZHEN JIUNIU YIMAO INTELLIGENT IOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411971557.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

IoT devices cannot execute control instructions provided by users or devices when offline, affecting the reliability of IoT systems.

Method used

When the target device is offline, the control command is stored, and the stored control command is forwarded to the target device when the target device is back online, causing it to execute the control command.

Benefits of technology

Ensure that IoT devices can also complete the necessary control instructions in an unstable network environment, improving the reliability and real-time nature of IoT systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766871A_ABST
    Figure CN119766871A_ABST
Patent Text Reader

Abstract

The present invention provides an Internet of Things device management method and device, and a storage medium, wherein the method comprises: determining whether a target device is online; when the target device is not online and receives a control instruction to control the target device, storing the control instruction, and repeatedly executing the step of determining whether the target device is online, until the target device is online and the stored control instruction is sent to the target device, so that the target device executes the control instruction. The present invention can improve the reliability of the Internet of Things system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communication technology, and in particular to an Internet of Things device management method and a device and a storage medium thereof. Background Art

[0002] IoT (Internet of Things) devices, such as sensors and smart devices, can collect and / or exchange data after connecting to the Internet, which involves a large amount of device data communication and remote device management.

[0003] Most IoT devices in the IoT environment usually require real-time monitoring and control. When an IoT device is offline, it cannot execute the control instructions provided by the user or device during the offline period. Only when the IoT device is back online can the control instructions provided by the user or device be executed again. However, before the IoT device is back online, the control instructions provided by the user or device that must be executed cannot be executed by the IoT device after it is reconnected to the network, thus affecting the reliability of the IoT system. Summary of the invention

[0004] To solve the above problems, the Internet of Things device management method, device and storage medium provided by the present invention can improve the reliability of the Internet of Things system by storing the control instructions for controlling the target device when the target device is offline, and forwarding the control instructions to the target device when the target device is back online.

[0005] In a first aspect, the present invention provides an Internet of Things device management method, which is applied to an Internet of Things platform, and the method includes:

[0006] Determine whether the target device is online;

[0007] When the target device is not online and receives a manipulation instruction for manipulating the target device, the manipulation instruction is stored, and the step of determining whether the target device is online is repeated until the target device is online and the stored manipulation instruction is sent to the target device, so that the target device executes the manipulation instruction.

[0008] Optionally, before the step of determining whether the target device is online, the method further includes:

[0009] Send connection information to the target device in an online state so that the target device establishes a data transmission link with the Internet of Things platform according to at least one protocol configuration information in the connection information, and the connection information includes multiple protocol configuration information.

[0010] Optionally, repeatedly executing the step of determining whether the target device is online until the target device is online and sending the stored manipulation instruction to the target device includes:

[0011] Repeat the step of determining whether the target device is online until the target device is online, and then execute the step of sending connection information to the target device that is online;

[0012] After the data transmission link is established, the stored control instructions are sent to the target device through the data transmission link.

[0013] Optionally, the multiple protocol configuration information includes at least two of MQTT configuration information, HTTP configuration information, CoAP configuration information, and WebSocket configuration information.

[0014] Optionally, the method further comprises:

[0015] When the target device is back online, it is determined whether the IoT platform stores the control instructions. If so, the step of sending the stored control instructions to the target device is executed.

[0016] Optionally, when the target device comes back online, the step of determining whether the IoT platform stores the control instruction includes:

[0017] When the target device comes back online, the SDK of the target device is notified so that the SDK checks whether the IoT platform stores the control instructions corresponding to the target device.

[0018] Optionally, the method further comprises:

[0019] When the target device is not online, determining the timeliness type of the control instruction corresponding to the target device stored in the IoT platform;

[0020] When it is confirmed that the type of the control instruction is a short-term control instruction, it is determined whether the storage time of the control instruction exceeds a preset time threshold, and if so, the control instruction is deleted.

[0021] In a second aspect, the present invention provides an IoT device management method, which is applied to the target device in the first aspect, and the method comprises:

[0022] Receive and execute control instructions sent by the Internet of Things platform; the control instructions include control instructions for controlling the target device stored in the external device when the target device is in an offline state, and control instructions for controlling the target device received and stored by the Internet of Things platform.

[0023] In a third aspect, the present invention provides an IoT device management device, the device comprising:

[0024] A first determination module is configured to determine whether the target device is online;

[0025] The first execution module is configured to store the control instruction when the target device is not online and receives a control instruction to control the target device, and repeatedly execute the step of determining whether the target device is online until the target device is online and sends the stored control instruction to the target device, so that the target device executes the control instruction.

[0026] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of the first aspects is implemented.

[0027] The IoT device management method and its device and storage medium provided by the embodiments of the present invention store the control instructions of the target device when it is offline, and forward the stored control instructions to the target device when the target device is back online, so that the target device completes the corresponding action according to the control instructions. In this way, even if the target device is in an unstable network environment, it can ensure that the necessary control instructions are completed, thereby improving the reliability of the IoT system. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0029] Figure 1 A schematic flowchart of an Internet of Things device management method according to an embodiment of the present application;

[0030] Figure 2 This is a schematic flowchart of data interaction in an Internet of Things system according to an embodiment of the present application. DETAILED DESCRIPTION

[0031] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. Embodiments of the present application are provided in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.

[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0033] The singular forms "a", "an" and "said / the" used herein may also include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "include / comprise" or "have" etc. specify the presence of stated features, wholes, steps, operations, components, parts or combinations thereof, but do not exclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts or combinations thereof.

[0034] First, the main terms involved in the present invention are explained as follows:

[0035] IoT (Internet of Things): refers to various devices and sensors connected to the Internet that can collect data and communicate with each other.

[0036] MQTT (Message Queuing Telemetry Transport): Message Queuing Telemetry Transport is a lightweight publish / subscribe network protocol that is widely used in IoT and is suitable for environments with low bandwidth and unstable networks.

[0037] SDK (Software Development Kit): Software Development Kit, a set of tools, libraries, documentation and guidelines for developing applications.

[0038] Payload: usually refers to the data part of the transmission. In MQTT, payload refers to the message body.

[0039] Client: In MQTT, the client and server communicate. Although the name is "client", it can actually be both a sender and a receiver of data.

[0040] Subscribe: In the MQTT protocol, a client subscribes to a topic in order to receive messages on that topic.

[0041] Publish: In the MQTT protocol, the operation of sending a message to the server is called publishing.

[0042] Reconnect: refers to the process of reestablishing a broken connection. This is a common operation in IoT devices to ensure that the device can continue to work after the network is restored.

[0043] Status: The current state of the device, such as online or offline.

[0044] In the first aspect, this embodiment provides an Internet of Things device management method, which is applied to the Internet of Things platform and combines Figure 1 and Figure 2 The method includes step S101 to step S102. The IoT platform includes a server, but is not limited thereto. The IoT platform may also be composed of a server and a gateway, which is not specifically limited in this embodiment.

[0045] Step S101: Determine whether the target device is online.

[0046] The target device may be an execution device that communicates with the IoT platform or a functional device that stores and executes an application.

[0047] It is understandable that when the target device is not online, it means that the target device is offline. When the target device is offline, it means that the target device is not connected to the network and cannot transmit and receive data. The target device may be offline for a variety of reasons, such as network failure, device failure, power problem, etc.

[0048] The timing for executing step S101 is when the target device changes from an online state to an offline state, and then step S101 is continuously executed until the target device changes from an offline state to an online state. Alternatively, the timing for executing step S101 is when the target device is in an offline state and receives a control instruction for controlling the target device, and then step S101 is continuously executed until the target device changes from an offline state to an online state.

[0049] In a further optional embodiment of the present embodiment, before the step of determining whether the target device is in an online state, the method further includes: sending connection information to the target device in an online state, so that the target device establishes a data transmission link with the Internet of Things platform according to at least one protocol configuration information in the connection information, and the connection information includes multiple protocol configuration information.

[0050] It is understandable that after the target device and the IoT platform establish a data transmission link, data transmission can be achieved between the target device and the IoT platform through the data transmission link, including but not limited to the IoT platform sending control instructions to the target device, and the target device feedbacks the execution result and status of each instruction to the IoT platform after executing the control instructions.

[0051] Among them, the multiple protocol configuration information includes but is not limited to at least two of the configuration information of MQTT, the configuration information of HTTP (Hypertext Transfer Protocol), the configuration information of CoAP (Constrained Application Protocol) and the configuration information of WebSocket (Web Socket Protocol).

[0052] By connecting information to establish a data transmission link between the target device and the IoT platform, the IoT system supports multiple protocols such as MQTT, HTTP, CoAP, WebSocket, etc., making it very versatile and adaptable, and improving the flexibility and scalability of the IoT system. At the same time, MQTT, HTTP, CoAP, and WebSocket can all implement security measures such as command encryption and device authentication based on the transmission of control instructions and feedback of execution results and status, thereby improving data security during transmission.

[0053] Among them, for devices that require real-time communication, that is, devices that support the MQTT / WebSocket protocol, this method can ensure real-time communication of such devices through the low latency and efficient transmission characteristics of MQTT / WebSocket, thereby enhancing the communication reliability of the entire Internet of Things system. For devices that use flexible data formats and standardization, this method can send various types of data, including JSON (JavaScript Object Notation), XML (Extensible Markup Language), etc., by using HTTP, to meet the needs of different applications. For devices in resource-constrained and low-power scenarios, this method uses the CoAP protocol, which is a lightweight protocol with low power consumption, has a protocol similar to HTTP, is convenient for web integration, and supports multicast, secure transmission and other advantages, making the device more advantageous.

[0054] Take the example of an IoT platform establishing a data transmission link with at least one target device through MQTT and HTTP. Combining the request-response model of HTTP and the publish-subscribe model of MQTT, HTTP is used to issue immediate commands when necessary, while MQTT is used to handle regular data collection tasks. By combining MQTT for real-time device communication and HTTP for management and monitoring, we can take advantage of the low latency and efficient transmission characteristics of MQTT, while taking advantage of the stability and easy debugging characteristics of HTTP to enhance the communication reliability of the entire system. Using HTTP provides a stable background application program interface (API) platform for the system to facilitate integration with different services and applications. At the same time, MQTT maintains the advantages of low power consumption and fast response between devices, making the system more flexible and easy to expand as needed. The HTTP interface can provide a simple and intuitive way to manage device configuration, monitor device status, and analyze device activities. This is particularly useful for enterprises that need to maintain large-scale device networks. Device management can be easily achieved through standard Web technologies. Combining HTTPS and MQTT over SSL / TLS (MQTTs), each protocol can provide strong encryption to ensure the security of data transmission. This multi-layer security strategy can effectively reduce potential security risks. The popularity of HTTP makes it easy for developers to find relevant development tools and community support, simplifying the debugging and maintenance process. At the same time, the design of MQTT also facilitates easy device status tracking and fault diagnosis, especially when using appropriate Broker services.

[0055] It can be seen that the strategy of combining HTTP and MQTT provides a powerful and flexible solution, which is particularly suitable for large-scale IoT applications that require high reliability, security and easy management. It combines the advantages of both technologies, reduces the limitations of a single protocol, and improves the efficiency and effectiveness of the entire system. In this way, enterprises and developers can better control and optimize their IoT devices and ensure that the technical solutions can meet the needs of the rapidly developing market.

[0056] It should be noted that the method for the IoT platform to determine whether the target device is online can be to connect to the target device through MQTT to manage whether the target device is online when the target device is offline, and then trigger the control command of the desired operation when the target device is back online; or the target device can upload a heartbeat data packet when it is online, and the IoT platform determines whether the target device is online based on the frequency of uploading heartbeat data packets. Among them, after confirming the status of the target device, the IoT platform can record the status of the target device by setting a flag bit, and when receiving the corresponding control command, it can determine whether the target device is online by querying the corresponding flag bit.

[0057] Step S102: When the target device is not online and a control instruction for controlling the target device is received, the control instruction is stored, and the step of determining whether the target device is online is repeated until the target device is online and the stored control instruction is sent to the target device, so that the target device executes the control instruction.

[0058] In this embodiment, the Internet of Things platform stores the control instructions in a cache manner.

[0059] It can be understood that the prerequisite for executing "sending the stored control instructions to the target device" in step S102 is that the Internet of Things platform receives the control instructions for controlling the target device when the target device is in an offline state, that is, the Internet of Things system receives the expected control instructions of the target device, and the target device completes the disconnection and reconnection.

[0060] In a further optional embodiment of the present embodiment, the step of repeatedly performing the step of determining whether the target device is online until the target device is online and the step of sending the stored manipulation instruction to the target device further includes:

[0061] Repeat the step of determining whether the target device is online until the target device is online, and execute the step of sending connection information to the target device that is online; after the data transmission link is established, send the stored control instructions to the target device through the data transmission link.

[0062] In a further optional embodiment of this embodiment, the method further includes:

[0063] When the target device is back online, determine whether the IoT platform stores control instructions, and if so, execute the step of sending the stored control instructions to the target device.

[0064] It should be noted that the IoT platform determines whether the IoT platform stores control instructions by directly querying whether the control instructions corresponding to the target device are stored in the cache space, or by querying through other devices whether the control instructions corresponding to the target device are stored in the cache space.

[0065] In a further optional embodiment of the present embodiment, when the target device comes back online, the step of determining whether the Internet of Things platform stores control instructions includes: when the target device comes back online, notifying the SDK of the target device so that the SDK checks whether the Internet of Things platform stores control instructions corresponding to the target device, and sends the query results to the Internet of Things platform.

[0066] The IoT platform performs subsequent operations based on the query results. Specifically, when the query results show that there are control instructions corresponding to the target device cached in the cache space, the IoT platform obtains the corresponding control instructions based on the query results and forwards them to the target device through the data transmission link for execution and clears the control instructions. When the query results show that there are no control instructions corresponding to the target device in the cache space, the IoT platform waits to receive the control instructions provided by the user through the APP or its smart device or sensor, and sends them to the target device through the data transmission link when receiving the control instructions.

[0067] In a further optional embodiment of this embodiment, the method further includes:

[0068] When the target device is not online, determine the timeliness type of the control instruction corresponding to the target device stored in the Internet of Things platform; when it is confirmed that the type of the control instruction is a short-term control instruction, determine whether the storage time of the control instruction exceeds the preset time threshold, and if so, delete the control instruction.

[0069] It is understandable that the types of control instructions include short-term and long-term types. For short-term control instructions, the target device is required to execute within a specified time threshold. If the target device fails to execute the control instruction within the specified time threshold, the operation instruction does not require the target device to execute. For long-term control instructions, there is no limit on the time for the target device to execute the control instruction, and the target device only needs to complete the control instruction. Among them, the time thresholds corresponding to different short-term control instructions are independent of each other, and this embodiment does not make specific limitations on them.

[0070] This embodiment can effectively distinguish expired control instructions, that is, short-term control instructions whose storage time in the cache space exceeds the corresponding time threshold, by judging the time type of the control instruction. This can save cache space and thus improve the data processing efficiency of the Internet of Things system.

[0071] In a further optional embodiment of this embodiment, the step of waiting until the target device is online and sending the stored manipulation instruction to the target device includes:

[0072] When the target device comes back online, the control instructions stored in the IoT platform are sent to the target device in sequence according to the preset priority.

[0073] The preset priorities include the priorities of the same target device and the priorities between different devices.

[0074] It is understandable that, in the same IoT system, if a target device comes back online and the physical network platform stores multiple control instructions corresponding to the target device, the IoT platform will send the multiple control instructions to the target device in sequence according to the priority of the multiple control instructions, so that the target device will execute them in sequence according to the priority of the control instructions.

[0075] If multiple target devices come back online at the same time, and the priorities of the multiple target devices are different, and for each target device, the physical network platform stores multiple control instructions corresponding to the target device, then the Internet of Things platform first sends the control instructions corresponding to the target devices with higher priorities in the order of the priorities of each control instruction. After sending, the control instructions corresponding to the target devices with lower priorities are sent in the order of the priorities of each control instruction.

[0076] If multiple target devices come back online at the same time and have the same priority, and for each target device, the physical network platform stores multiple control instructions corresponding to the target device, then the Internet of Things platform directly sends each control instruction to the corresponding target device in order of priority.

[0077] It should be noted that the priority between different devices can be set according to the function of the device, such as according to the control object of the device. Specifically, the function of device 1 is to control the parameters of the Internet of Things platform, and the function of device 2 is to control device 3. Then the priority of device 1 is higher than the priority of device 2, but it is not limited to this. The priority of the same target device can be set according to the control content of the control instruction. Specifically, the content of control instruction 1 is to control the target device to send data to device A, and the content of control instruction 2 is to control the target device to shut down. Then the priority of control instruction 1 is higher than the priority of control instruction 2, but it is not limited to this. This embodiment does not limit the specific setting of priority.

[0078] The IoT device management method provided in this embodiment caches control instructions and manages the status of the target device, so that even if the target device is in an unstable network environment, the necessary control instructions for controlling the target device can be completed, thereby enhancing the reliability of IoT system communication; once the target device reconnects to the network, the cached control instructions can be immediately issued by the IoT platform, ensuring the timeliness of the operation of the target device. By centrally managing the target device and controlling the issuance of control instructions, the IoT system, especially when the number of devices is large, can more efficiently utilize network resources and device processing capabilities.

[0079] In a second aspect, this embodiment provides an Internet of Things device management method, which is applied to the target device in the first aspect. Specifically, Figure 2 The method includes: when the target device is back online, receiving and executing the control instructions sent by the Internet of Things platform; the control instructions include the control instructions for controlling the target device stored in the external device when the target device is offline, and the control instructions for controlling the target device received and stored by the Internet of Things platform.

[0080] The method also includes: during the registration process of the target device, receiving connection information, and establishing a data transmission link with the Internet of Things platform based on the connection information; when the target device is back online, sending a "device online" signal to the Internet of Things platform, receiving a notification message sent by the Internet of Things platform, and querying whether the Internet of Things platform stores control instructions corresponding to the target device.

[0081] The "device online" signal and the control command both contain the unique identification information of the target device. The unique identification information is the serial number of the target device, so that when the target device comes online again, the IoT platform can query whether the corresponding control command of the target device is cached according to the "device online" signal, that is, determine whether the IoT platform stores the control command.

[0082] In a third aspect, this embodiment provides an Internet of Things system, which includes: the Internet of Things platform in the first aspect and the target device in the second aspect.

[0083] Specific, combined Figure 1 and Figure 2 , when the target device is powered on and connected to the network, it initiates an HTTPs registration request based on the serial number and key configured in the target device. After the target device is successfully registered, the interface connecting the target device to the IoT platform will return the connection information of the corresponding product settings of the target device, so that the target device can establish a communication link with the IoT platform through the connection information. When the target device is registered and connected to the IoT platform, the target device will send a "device online" signal to the IoT platform, indicating that the target device has been successfully connected and is ready to receive control instructions. After the IoT platform confirms that the target device is online, the IoT platform sends a signal to the target device through the data transmission link to start data exchange and command transmission.

[0084] If the target device suddenly loses power or network connection, the target device will become offline. In this case, the target device will be temporarily unable to communicate with the IoT platform, that is, the communication between the target device and the IoT platform is suspended. While the target device is offline, if the user needs to perform operations, or expects the target device to maintain a certain state when it is online, or some control instructions for the target device are triggered by changes in the scene environment, such as when the temperature sensor detects that the ambient temperature reaches the set temperature threshold, the corresponding control instructions are sent to the target device. The IoT platform will first record these control instructions through algorithms, wait for the target device to be back online, and send the cached control instructions to the corresponding target device so that the target device executes the corresponding control instructions. When the target device restores power or network connection, that is, when the target device is back online, the target device attempts to reconnect to the IoT platform through connection information to automatically try to reestablish a connection with the platform. When the IoT platform detects that the target device has been reconnected, it will update the online status and prepare to send the control instructions again. The specific IoT platform will check the cache space where the control instructions cached by the target device that has come back online are located to check whether there are cached control instructions that need to be processed. When there are cached control instructions, the IoT platform will send all the unexecuted control instructions of the target device that were previously recorded during the offline period according to the data transmission link with the target device.

[0085] The target device executes the received control instructions and feedbacks the execution status. The SDK of the specific target device receives and executes the control instructions issued by the IoT platform, and then feedbacks the execution result and status of each instruction to the IoT platform. After the target device completes all the control instructions, the target device will continue to maintain the online state, or disconnect from the IoT again according to the network situation.

[0086] The system provided in this embodiment includes storage of operation instructions, device status monitoring, and offline instruction synchronization mechanism. Among them, the main core logic involved in the Internet of Things platform is as follows:

[0087]

[0088]

[0089]

[0090] On the device side, the target device uses the SDK to ensure that when the device comes back online, it automatically notifies the platform of its online status and requests to obtain unexecuted instructions. The main logic involved in the SDK is as follows:

[0091]

[0092]

[0093]

[0094] In this embodiment, the IoT platform records and caches the operation instructions through the record_operation method. When the target device is back online, the cached operation instructions are sent to the target device through the device_online method. The SDK of the target device contains the logic of connecting and disconnecting the IoT platform. When the target device is reconnected, it will automatically send a "device online" signal to the IoT platform. The IoT platform will return the unexecuted operation instructions. After receiving them, the target device will execute the operation instructions and confirm them to the IoT platform.

[0095] When the target device is offline, the IoT platform will first cache the target device's operating instructions during the offline period. When the target device is back online, the IoT platform will synchronize the cached control instructions to the target device. After the target device executes the control instructions, it returns a confirmation message. This ensures that the previous control instructions can still be executed synchronously in the IoT environment after the device is offline, thereby realizing the function of users or other devices performing "expected operations" on the target device.

[0096] The system provided in this embodiment stores the control instructions of the target device when it is offline, and forwards the stored control instructions to the target device when the target device is back online, so that the target device completes the corresponding action according to the control instructions. In this way, even if the target device is in an unstable network environment, it can ensure that the necessary control instructions are completed, thereby improving the reliability of the Internet of Things system.

[0097] In a fourth aspect, based on the contents of the first and third aspects, this embodiment provides an IoT device management device, the device comprising:

[0098] A first determination module is configured to determine whether the target device is online;

[0099] The first execution module is configured to store the control instruction when the target device is not online and receives a control instruction to control the target device, and repeatedly execute the step of determining whether the target device is online until the target device is online and sends the stored control instruction to the target device, so that the target device executes the control instruction.

[0100] In a further optional embodiment of this embodiment, the device further includes:

[0101] The first sending module is configured to send connection information to the target device that is online before determining whether the target device is online, so that the target device establishes a data transmission link with the Internet of Things platform according to at least one protocol configuration information in the connection information.

[0102] In a further optional embodiment of this embodiment, the first execution module includes:

[0103] An execution submodule is configured to repeatedly execute the step of determining whether the target device is in an online state until the target device is in an online state, and execute the step of sending connection information to the target device in an online state;

[0104] The sending submodule is configured to send the stored control instructions to the target device through the data transmission link after the data transmission link is established.

[0105] In a further optional embodiment of this embodiment, the device further includes:

[0106] The second judgment module is configured to judge whether the IoT platform stores control instructions when the target device is back online, and if so, trigger the first execution module to send the stored control instructions to the target device.

[0107] In a further optional embodiment of the present embodiment, the second judgment module is further configured to notify the SDK of the target device when the target device comes back online, so that the SDK checks whether the Internet of Things platform stores control instructions corresponding to the target device.

[0108] In a further optional embodiment of this embodiment, the device further includes:

[0109] A third judgment module is configured to judge the timeliness type of the control instruction corresponding to the target device stored in the Internet of Things platform when the target device is not in an online state;

[0110] The fourth judgment module is configured to judge whether the storage time of the control instruction exceeds a preset time threshold when confirming that the type of the control instruction is a short-term control instruction, and if so, delete the control instruction.

[0111] In a further optional embodiment of the present embodiment, the sending submodule is configured to send the control instructions stored in the Internet of Things platform to the target device in sequence according to a preset priority when the target device comes back online.

[0112] In the fifth aspect, based on the contents of the second and third aspects, this embodiment provides an Internet of Things device management device, the device including: a second execution module, configured to receive, when the target device is back online, a control instruction for controlling the target device stored in an external device when the target device is offline, and execute the control instruction.

[0113] The apparatus further includes: an establishment module configured to receive connection information during the registration of the target device and establish a data transmission link with the Internet of Things platform according to the connection information;

[0114] The online sending module is configured to send a "device online" signal to the IoT platform when the target device comes back online;

[0115] The query module is configured to receive a notification message sent by the Internet of Things platform and query whether the Internet of Things platform stores a control instruction corresponding to the target device.

[0116] In a sixth aspect, this embodiment provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the methods in the first aspect and the second aspect are implemented.

[0117] In the description of this specification, the description with reference to the terms "some embodiments", "other embodiments", "ideal embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic descriptions of the above terms do not necessarily refer to the same embodiment or example.

[0118] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0119] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for managing IoT devices, characterized in that: Applied to the Internet of Things platform, the method includes: Determine whether the target device is online; When the target device is not online and a control instruction for controlling the target device is received, the control instruction is stored, and the step of determining whether the target device is online is repeated until the target device is online and the stored control instruction is sent to the target device, so that the target device executes the control instruction.

2. The method according to claim 1, characterized in that Before the step of determining whether the target device is online, the method further includes: Send connection information to a target device in an online state, so that the target device establishes a data transmission link with the Internet of Things platform according to at least one protocol configuration information in the connection information, wherein the connection information includes multiple protocol configuration information.

3. The method according to claim 2, characterized in that The step of repeatedly executing the step of determining whether the target device is in an online state until the target device is in an online state and sending the stored manipulation instruction to the target device includes: Repeat the step of determining whether the target device is online until the target device is online, and then execute the step of sending connection information to the target device that is online; After the data transmission link is established, the stored control instruction is sent to the target device via the data transmission link.

4. The method according to claim 2, characterized in that: The multiple protocol configuration information includes at least two of MQTT configuration information, HTTP configuration information, CoAP configuration information and WebSocket configuration information.

5. The method according to claim 1, characterized in that The method further comprises: When the target device is back online, it is determined whether the IoT platform stores the control instruction. If so, the step of sending the stored control instruction to the target device is performed.

6. The method according to claim 5, characterized in that When the target device comes back online, the step of determining whether the IoT platform stores the control instruction includes: When the target device comes back online, the SDK of the target device is notified so that the SDK checks whether the IoT platform stores control instructions corresponding to the target device.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: When the target device is not online, determining the timeliness type of the control instruction corresponding to the target device stored in the Internet of Things platform; When it is confirmed that the type of the control instruction is a short-term control instruction, it is determined whether the storage time of the control instruction exceeds a preset time threshold, and if so, the control instruction is deleted.

8. A method for managing IoT devices, characterized in that: Applied to the target device according to any one of claims 1 to 7, the method comprises: Receive and execute the control instructions sent by the Internet of Things platform; the control instructions include the control instructions for controlling the target device received and stored by the Internet of Things platform when the target device is in an offline state.

9. An IoT device management device, characterized in that: The device comprises: A first determination module is configured to determine whether the target device is online; The first execution module is configured to store the control instruction when the target device is not online and receives a control instruction to control the target device, and repeatedly execute the step of determining whether the target device is online until the target device is online and sends the stored control instruction to the target device, so that the target device executes the control instruction.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.