Internet of Things instruction issuing method and device and computer readable storage medium
By introducing the architecture of main devices and sub-device in the Internet of Things system, efficient broadcasting and real-time update of the execution status of the cloud platform is achieved, and the problems of low communication efficiency, poor scalability and high communication costs in the Internet of Things system are solved, and the reliability and communication efficiency of the system are improved.
Patent Information
- Application Number
- CN202411495045.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-03-11
AI Technical Summary
In the existing IoT communication technology, the independent connection between devices and cloud platforms leads to a large consumption of network bandwidth and server resources, and is poorly scalable when the number of devices is huge, affecting system performance and response speed.
Adopting the architecture of the main device and the sub-device, the main device receives the instructions to be executed by the cloud platform, generates signaling data and broadcasts it to the sub-device. The sub-device receives and executes the instructions, updates the execution status data and broadcasts back to the main device, and the main device monitors the execution status of all devices in real time.
By reducing the direct connection between devices and cloud platforms, the consumption of network bandwidth and server resources is reduced, the communication efficiency of instruction issuance and data transmission is improved, the communication cost is reduced, and the system reliability and maintenance convenience are improved.
Smart Images

Figure CN119603320A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method, device and storage medium for issuing instructions for the Internet of Things. Background Art
[0002] With the rapid development of IoT technology, more and more devices are connected to the network, forming a large and complex system. Most current IoT communication technologies require each device to establish an independent connection with the cloud platform to transmit signaling execution instructions. Usually, the connection protocol between these IoT devices and the cloud platform is a two-way connection. The cloud platform needs to repeatedly establish multiple communication connections to send the same instructions to multiple IoT devices.
[0003] However, each device establishing an independent connection with the cloud platform will result in a large consumption of network bandwidth and server resources, especially when the number of devices is large. At the same time, in some application scenarios with high real-time requirements, the communication delay between the device and the cloud platform may affect the performance and response speed of the system. As the number of devices in the IoT system increases, the traditional centralized architecture may encounter scalability bottlenecks and find it difficult to adapt to the growing number of devices.
[0004] Therefore, providing a more efficient, secure and scalable IoT communication solution is an urgent problem to be solved by those skilled in the art. Summary of the invention
[0005] In order to solve the above technical problems, the technical solution adopted in this application is: to provide an Internet of Things instruction issuing method, device and storage medium, so as to at least solve the problems of low communication efficiency, low scalability and high communication cost when devices communicate in the Internet of Things system.
[0006] To solve the above technical problem, according to an embodiment of the present invention, a method for issuing an Internet of Things instruction is provided. The method is applied to an Internet of Things system. The Internet of Things system includes an Internet of Things device. The Internet of Things device includes a main device and at least one sub-device. The method for issuing an Internet of Things instruction includes:
[0007] The sub-device receives the broadcasted information of the to-be-executed instruction and the execution status data, where the information of the to-be-executed instruction and the execution status data are broadcasted by the main device and / or other sub-devices;
[0008] In response to the information of the to-be-executed instruction, confirming that the to-be-executed instruction needs to be executed or has been executed, the information of the execution status bit corresponding to the sub-device in the execution status data can indicate that the sub-device has executed the to-be-executed instruction, thereby obtaining updated execution status data;
[0009] The information of the instruction to be executed and the updated execution status data are broadcasted, so that the main device can confirm the execution status of each sub-device on the instruction to be executed through the execution status bit corresponding to each sub-device in the updated execution status data.
[0010] To solve the above technical problem, according to another embodiment of the present invention, a method for issuing an Internet of Things instruction is provided. The method is applied to an Internet of Things system. The Internet of Things system includes a cloud platform and an Internet of Things device. The Internet of Things device includes a main device and at least one sub-device. The method for issuing an Internet of Things instruction includes:
[0011] After receiving the to-be-executed instruction issued by the cloud platform, the master device generates signaling data, wherein the signaling data includes information of the to-be-executed instruction and execution status data;
[0012] Broadcasting the signaling data, so that when at least one of the sub-devices confirms the execution of the to-be-executed instruction in response to the signaling data, the execution status bit corresponding to the sub-device in the execution status data is modified, so that the information of the execution status bit corresponding to the sub-device in the execution status data can indicate that the sub-device has executed the to-be-executed instruction, thereby obtaining updated execution status data;
[0013] The updated execution status data broadcasted by the sub-device is received, and the execution status of each sub-device on the to-be-executed instruction is confirmed through the execution status bit corresponding to each sub-device in the updated execution status data.
[0014] In order to solve the above technical problems, a technical solution adopted by the present application is: to provide an Internet of Things instruction issuing system, including a cloud platform and an Internet of Things device, wherein the Internet of Things device includes a main device and at least one sub-device, specifically including:
[0015] The cloud platform is in communication with the main device, and is used to send instructions to be executed to the main device, receive updated execution status data sent by the main device, and confirm the execution status of each IoT device on the instructions to be executed through the execution status bit corresponding to each IoT device in the updated execution status data;
[0016] The main device is used to generate signaling data after receiving the to-be-executed instruction issued by the cloud platform, the signaling data including information of the to-be-executed instruction and execution status data; broadcast the signaling data so that when at least one of the sub-devices confirms the execution of the to-be-executed instruction in response to the signaling data, the execution status bit corresponding to the sub-device in the execution status data is modified so that the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the to-be-executed instruction, thereby obtaining updated execution status data; receive the updated execution status data broadcasted by the sub-device, and confirm the execution status of each of the sub-devices on the to-be-executed instruction through the execution status bit corresponding to each of the sub-devices in the updated execution status data;
[0017] The sub-device is used to broadcast information about instructions to be executed and execution status data, and the information about instructions to be executed and execution status data are broadcast by the main device and / or other sub-devices; in response to the information about the instructions to be executed, confirming that the instructions to be executed need to be executed or have been executed, so that the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the instructions to be executed, and obtain updated execution status data; broadcast the information about the instructions to be executed and the updated execution status data, so that the main device confirms the execution status of each sub-device on the instructions to be executed through the execution status bit corresponding to each sub-device in the updated execution status data.
[0018] In order to solve the above technical problems, a technical solution adopted in the present application is: to provide an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the Internet of Things instruction issuance method in the above technical solution.
[0019] In order to solve the above technical problems, a technical solution adopted in the present application is: to provide a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, it is used to implement the Internet of Things instruction issuance method in the above technical solution.
[0020] Through the above scheme, the beneficial effects of the present application are as follows: the method, device and storage medium for issuing IoT instructions provided by the present application are applied to an IoT system, wherein the IoT system includes a cloud platform and an IoT device, wherein the IoT device includes a main device and at least one sub-device, wherein the main device receives the instruction to be executed issued by the cloud platform, prepares signaling data, wherein the signaling data includes information and execution status data of the instruction to be executed, and broadcasts the signaling data; the sub-device receives the information and execution status data of the instruction to be executed broadcasted by the main device and / or other sub-devices, and confirms that the instruction to be executed needs to be executed or has been executed in response to the information of the instruction to be executed, so that the information of the execution status bit corresponding to the sub-device in the execution status data can indicate that the sub-device has executed the instruction to be executed, and the updated instruction is obtained. Execution status data, broadcasting information about the instructions to be executed and the updated execution status data; the main device receives the updated execution status data broadcast by the sub-device, and confirms the execution status of each sub-device on the instructions to be executed by updating the execution status bits corresponding to each sub-device in the execution status data; in this way, the cloud platform only needs to establish a communication link with the main device, and at the same time adopt a broadcast-based communication mechanism between IoT devices, thereby broadening the communication range and having strong scalability, and achieving more efficient data sharing and instruction issuance in the IoT system, thereby improving the communication efficiency of instruction issuance and data transmission, and effectively reducing communication costs; in addition, by updating and broadcasting execution status data in real time, the main device can monitor the execution status of all IoT devices, thereby improving the reliability of the system and the convenience of maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. 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. Among them:
[0022] Figure 1 This is a flowchart of an embodiment of a method for issuing Internet of Things instructions provided by this application;
[0023] Figure 2 This is a flowchart of an embodiment of a method for issuing Internet of Things instructions provided by the present application;
[0024] Figure 3 This is a flowchart of a sub-device end embodiment of the method for issuing Internet of Things instructions provided by this application;
[0025] Figure 4 It is a flowchart of a specific embodiment of the method for issuing Internet of Things instructions provided by this application;
[0026] Figure 5It is a structural diagram of execution status data provided by this application;
[0027] Figure 6 It is a schematic diagram of an embodiment of modifying execution status data provided by the present application;
[0028] Figure 7 It is a schematic diagram of another embodiment of modifying execution status data provided by the present application;
[0029] Figure 8 It is a schematic diagram of a specific embodiment of modifying execution status data provided by the present application;
[0030] Fig. 9 This is a structural diagram of an Internet of Things instruction issuing system provided by this application;
[0031] Fig.10 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application;
[0032] Fig.11 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0033] The present application is further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present application, but are not intended to limit the scope of the present application. Similarly, the following examples are only some embodiments of the present application rather than all embodiments, and all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0034] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0035] It should be noted that the terms "first", "second", etc. in this application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second", etc. can explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.
[0036] The Internet of Things (IoT) is a network concept composed of multiple networks such as the Internet, traditional telecommunications networks, and sensor networks. It allows objects, objects and people, and people to exchange and communicate data through information sensing devices, and realizes intelligent identification, positioning, tracking, monitoring, and management.
[0037] IoT communication technology is the key to realizing IoT applications. Among them, IoT protocols are bridges connecting IoT devices, devices and networks, and devices and the cloud. Choosing the right protocol is crucial to ensuring the performance, reliability and scalability of IoT solutions. The following are some common IoT protocols: MQTT (Message Queuing Telemetry Transport): a lightweight publish / subscribe message transmission protocol suitable for low-bandwidth, high-latency and unstable network environments; CoAP (Constrained Application Protocol): an application layer protocol based on REST architecture, suitable for low-power devices and resource-constrained networks; HTTP (Hypertext Transfer Protocol): a protocol for transmitting hypertext, widely used in cloud platforms and application interfaces of IoT devices; MQTT-SN (MQTT for Sensor Networks): a variant of MQTT used to communicate with sensor networks and wireless sensor networks; LoRaWAN (Long Range Wide Area Network): a low-power, long-range wireless communication protocol suitable for long-distance IoT communications; Zigbee: a low-power, short-range wireless communication protocol suitable for personal area networks and sensor networks; Z-Wave: a wireless communication protocol for low-power home automation devices suitable for smart home and IoT applications.
[0038] Typically, most IoT devices need to establish a two-way communication connection with the cloud platform through a connection protocol. As the number of devices in the IoT system gradually increases, this may lead to the consumption of network bandwidth and server resources, affecting the performance and responsiveness of the IoT system. For example, when the signal coverage is insufficient, the communication distance of IoT devices is short, or in a network with limited bandwidth, some IoT devices may have difficulty communicating with the cloud platform and may not receive instructions sent by the cloud platform in a timely manner.
[0039] Therefore, the present application provides an Internet of Things instruction issuing method, device and storage medium, which are applied to an Internet of Things system, wherein the Internet of Things system includes a cloud platform and an Internet of Things device, and the Internet of Things device includes a main device and at least one sub-device, wherein the main device receives the to-be-executed instruction issued by the cloud platform, prepares signaling data, the signaling data includes information and execution status data of the to-be-executed instruction, and broadcasts the signaling data; the sub-device receives the information and execution status data of the to-be-executed instruction broadcasted from the main device and / or other sub-devices, and confirms that the to-be-executed instruction needs to be executed or has been executed in response to the information of the to-be-executed instruction, so that the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the to-be-executed instruction, obtains updated execution status data, and broadcasts the information of the to-be-executed instruction and the updated execution status data; the main device receives the updated execution status data broadcasted by the sub-device, and confirms the execution status of each sub-device on the to-be-executed instruction by the execution status bit corresponding to each sub-device in the updated execution status data. Through the above solution, the cloud platform only needs to establish a communication link with the main device, and adopt a broadcast-based communication mechanism between IoT devices, thereby broadening the communication range and having strong scalability. It can achieve more efficient data sharing and instruction issuance in the IoT system, improve the communication efficiency of instruction issuance and data transmission, and effectively reduce communication costs. In addition, by real-time updating and broadcasting of execution status data, the main device can monitor the execution status of all sub-devices, thereby improving the reliability of the system and the convenience of maintenance.
[0040] See also Figure 1 , Figure 1 1 is a flow chart of an embodiment of the method for issuing Internet of Things instructions provided by the present application. It should be noted that if there are substantially the same results, this embodiment does not take Figure 1 The process sequence shown is limited. Figure 1 As shown, this embodiment includes:
[0041] S110: The master device receives the to-be-executed instructions issued by the cloud platform and generates signaling data.
[0042] In the IoT system, cloud platform and IoT devices are two important components. The cloud platform is the hub of the IoT system, responsible for processing, analyzing and storing data from IoT devices. Users can send instructions through the cloud platform to remotely control IoT devices.
[0043] IoT devices are devices that are actually deployed in the physical world and are used to collect data or perform tasks. In this application, a main device and at least one sub-device are set in the IoT device, where the main device is used to establish a continuous communication link with the cloud platform, and the sub-device may not be directly linked to the cloud platform, and the task processing will only be performed when the sub-device receives a broadcast. It should be noted that the main device in this application can be any IoT device in the IoT system, and can also exchange identities with any sub-device, establish a link with the cloud platform, and be responsible for coordinating the remaining sub-devices to execute functions such as sending instructions and receiving data.
[0044] The cloud platform establishes a connection with the main device and sends the pending instructions that the IoT device needs to execute to the main device. For example, the user can issue instructions through the user interface of the cloud platform, and the cloud platform generates the pending instructions based on the user's input and sends the pending instructions to the main device.
[0045] After receiving the to-be-executed instruction sent by the cloud platform, the main device generates signaling data based on the to-be-executed instruction to broadcast the signaling data to at least one sub-device in the IoT system. The signaling data includes at least information about the to-be-executed instruction and execution status data. The information about the to-be-executed instruction may include the to-be-executed instruction, the time when the to-be-executed instruction is generated, the random sequence number and / or check code of the to-be-executed instruction, etc.
[0046] The time of generating the instruction to be executed can be the time when the cloud platform sends it to the main device or the time when the main device receives the instruction to be executed, or the time when the main device generates signaling data based on the instruction to be executed, which is not limited here. The random serial number of the instruction to be executed is used to identify and track the uniqueness of the instruction to be executed in the Internet of Things system. It can be a randomly generated string of numbers to ensure the uniqueness of each instruction, thereby avoiding confusion between instructions. The check code is a string of numbers or letters used to verify the integrity of data. It is usually generated during the data transmission process to ensure that the data has not been tampered with or erroneous during the transmission process. The calculation method of the check code varies according to different applications and algorithms. Common ones include checksum, cyclic redundancy check and hash value. The check code can be used to detect and correct errors and improve the reliability of data transmission.
[0047] The execution status data is used to monitor and report the status information of the device during the execution of the task, so as to indicate the different execution conditions of the device. The execution status data includes at least two execution status bits. In one example, the execution status bits can be designed as a set of binary flags, each flag representing a specific state of the device, including but not limited to startup, running, paused, completed, error and maintenance states. Exemplarily, the execution status bit can be designed as a bit field, each bit corresponding to a specific state, for example, bit 0 represents the startup state, bit 1 represents the running state, bit 2 represents the pause state, bit 3 represents the completion state, bit 4 represents the error state, and bit 5 represents the maintenance state, etc.
[0048] In the IoT system, IoT devices correspond to execution status bits one by one, that is, each IoT device can have an execution status bit field corresponding to it, which is used to indicate the current execution status of the device. In one example, when the information of the execution status bit is a first value, it indicates that the IoT device corresponding to the execution status bit has not executed the instruction to be executed; when the information of the execution status bit is a second value, it indicates that the IoT device corresponding to the execution status bit has executed the instruction to be executed.
[0049] In one embodiment, to improve the security of the signaling data transmission process, when initializing the IoT system architecture, the cloud platform or the main device can also configure a set of encryption keys for all IoT devices for transmission, and send them to all IoT devices through a secure channel. All IoT devices use the assigned numbers and shared keys to communicate between devices. Optionally, the IoT device can use a symmetric encryption key to obtain the signaling data, first verify the legitimacy of the signaling, then execute the instruction, and then modify the signaling data before encrypting and broadcasting it.
[0050] S120: The master device broadcasts signaling data so that at least one slave device receives and processes the instruction to be executed.
[0051] After the master device generates signaling data, the broadcast signaling data is transmitted to at least one sub-device in the IoT system, so that at least one sub-device receives and processes the instructions to be executed. In one example, the master device broadcasts the signaling data to all sub-devices via a wireless or wired network, such as using a wireless communication protocol such as Wi-Fi, Bluetooth, Zigbee, or sending the signaling data via a broadcast address in a wired network.
[0052] In one embodiment, after the master device generates signaling data, it executes the to-be-executed instruction carried in the signaling data, modifies the execution status bit corresponding to the master device in the execution status data, so that the information of the execution status bit corresponding to the master device in the execution status data can represent that the master device has executed the to-be-executed instruction, and obtains updated execution status data. The signaling data carrying the updated execution status data is broadcasted and transmitted to at least one sub-device in the Internet of Things system, so that at least one sub-device receives and processes the to-be-executed instruction.
[0053] S130: The sub-device receives the broadcast signaling data, executes the instruction to be executed, and obtains updated execution status data.
[0054] The sub-device receives the signaling data transmitted by the broadcast, and in response to the signaling data confirms that the pending instruction needs to be executed or has been executed, so that the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the pending instruction, thereby obtaining updated execution status data.
[0055] In one embodiment, the sub-device receives the signaling data transmitted by broadcasting, which includes information of the instruction to be executed and execution status data, wherein the information of the instruction to be executed includes a random serial number and the time when the information is sent. The sub-device confirms whether the instruction to be executed needs to be executed based on the information of the instruction to be executed, and in response to confirming that the instruction to be executed needs to be executed or has been executed, executes the instruction to be executed and / or modifies the execution status bit corresponding to the sub-device in the execution status data, so that the information of the execution status bit corresponding to the sub-device in the execution status data can indicate that the sub-device has executed the instruction to be executed, thereby obtaining updated execution status data.
[0056] In one example, if the sub-device has not received information about a pending instruction that carries the same random serial number and information sending time, it is confirmed that the pending instruction needs to be executed, the pending instruction is executed, and the information of the execution status bit corresponding to the sub-device in the execution status data is modified so that it can indicate that the sub-device has executed the pending instruction, thereby obtaining updated execution status data.
[0057] If the sub-device has received information about the instruction to be executed that carries the same random serial number and information sending time, and the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the instruction to be executed, then it is confirmed that the instruction to be executed has been executed. At this time, there is no need to repeat the execution of the instruction to be executed. You can choose to overwrite or not modify the information of the execution status bit corresponding to the sub-device in the execution status data to obtain updated execution status data.
[0058] If the sub-device has received information about the instruction to be executed that carries the same random serial number and information sending time, but the information of the execution status bit corresponding to the sub-device in the execution status data cannot represent that the sub-device has executed the instruction to be executed, confirm that the sub-device has executed the instruction to be executed, modify the information of the execution status bit corresponding to the sub-device in the execution status data so that it can represent that the sub-device has executed the instruction to be executed, and obtain updated execution status data.
[0059] S140: The sub-device broadcasts signaling data, so that other sub-devices or the main device in the Internet of Things system receive the broadcasted update execution status data.
[0060] After the sub-device executes the instruction to be executed and / or modifies the execution status data to obtain the updated execution status data, the signaling data carrying the updated execution status data is broadcasted so that other sub-devices or the main device in the Internet of Things system receive the broadcasted updated execution status data.
[0061] In one embodiment, the signaling data broadcast by the sub-device includes information of the instructions to be executed and execution status data, wherein the information of the instructions to be executed includes the instructions to be executed, the time when the instructions to be executed are generated, the random sequence number and / or check code of the instructions to be executed, etc.
[0062] In one embodiment, the signaling data broadcast by the sub-device may also only include the execution status data and part of the information of the instruction to be executed, such as the random sequence number of the instruction to be executed and the time and / or check code of generating the instruction to be executed.
[0063] The sub-device receives the information and execution status data of the instructions to be executed broadcasted by the main device or other sub-devices, executes the instructions to be executed, and enables the information of the execution status bit corresponding to the sub-device in the execution status data to indicate that the sub-device has executed the instructions to be executed, thereby obtaining updated execution status data.
[0064] The steps of broadcasting the information of the instruction to be executed and updating the execution status data to other sub-devices in the Internet of Things device, so that the other sub-devices execute in turn in response to the information of the instruction to be executed to confirm that the instruction to be executed needs to be executed or has been executed, so that the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the instruction to be executed, and obtain updated execution status data; and broadcasting the information of the instruction to be executed and updating the execution status data, so that the main device confirms the execution status of each sub-device on the instruction to be executed by updating the execution status bit corresponding to each sub-device in the execution status data.
[0065] In response to the signaling data, other sub-devices confirm that the instructions to be executed need to be executed or have been executed, execute the instructions to be executed and / or modify the execution status bit corresponding to the sub-device in the execution status data, so that the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the instructions to be executed, and obtain updated execution status data; further perform the step of broadcasting signaling data carrying the updated execution status data so that the remaining sub-devices or main devices in the Internet of Things system receive the broadcasted updated execution status data.
[0066] In one embodiment, the effective transmission time of signaling data broadcast is set, and the signaling data received and broadcasted within the preset time interval is valid signaling data. The sub-device only needs to perform task processing when receiving a valid broadcast, and does not consume additional power consumption network resources at other times. Exemplarily, the sub-device receives and broadcasts the information of the instruction to be executed and updates the execution status data within the preset time interval, so that the main device confirms the execution status of each sub-device on the instruction to be executed based on the execution status bit corresponding to each sub-device in the updated execution status data received last within the preset time interval.
[0067] S150: The master device receives the broadcasted update execution status data and confirms the execution status of all IoT devices on the instructions to be executed.
[0068] The main device receives the updated execution status data broadcast by the sub-device, and confirms the execution status of each IoT device on the instruction to be executed by updating the execution status bit corresponding to each IoT device in the execution status data. For example, if the information of the execution status bit in the execution status data indicates that the instruction to be executed has been executed, it is confirmed that all IoT devices in the IoT system have executed the instruction to be executed; if the information of the execution status bit in the execution status data indicates that the instruction to be executed has not been executed and indicates that the instruction to be executed has been executed, the execution status of the corresponding IoT device on the instruction to be executed can be confirmed by the IoT device mapped by the execution status bit.
[0069] In one embodiment, the main device only receives the last update execution status data broadcast by the sub-device within a preset time interval, and confirms the execution status of each IoT device on the instruction to be executed based on the execution status bit corresponding to each IoT device in the last update execution status data.
[0070] In one embodiment, the master device may also forward the last updated execution status data to the cloud platform, so that the cloud platform can confirm the execution status of each IoT device on the instruction to be executed by updating the execution status bit corresponding to each IoT device in the execution status data.
[0071] Through the technical solution of the present application, the cloud platform only needs to establish a communication link with one main device to send the same instructions to all sub-devices by broadcasting from the main device to other sub-devices, thereby realizing the function of the cloud platform controlling multiple devices at one time, such as lighting control or temperature adjustment, etc. Furthermore, sub-devices can communicate with each other based on broadcasting, so that when some sub-devices cannot directly establish communication with the main device due to the long communication distance, they can also receive the information transmitted by the main device through the broadcast forwarding of other sub-devices, and then receive the instructions issued by the cloud platform.
[0072] In the IoT system to which the solution of the present application is applied, the communication range can be effectively expanded, more efficient data sharing and instruction issuance can be achieved, the communication efficiency of instruction issuance and data transmission can be improved, and the communication cost can be effectively reduced. In addition, through the real-time update and transmission of the execution status data in the above solution, the main device and / or cloud platform can monitor the execution status of all IoT devices, thereby improving the reliability of the system and the convenience of maintenance.
[0073] For better understanding, an embodiment of a method for issuing an Internet of Things instruction using a master device in an Internet of Things system as an execution subject is provided. Figure 2 , Figure 2 1 is a flow chart of an embodiment of the method for sending Internet of Things instructions provided by the present application. It should be noted that if there are substantially the same results, this embodiment does not take Figure 2 The process sequence shown is limited. Figure 2 As shown, this embodiment includes:
[0074] S201: After receiving the to-be-executed instruction sent by the cloud platform, the master device generates signaling data.
[0075] After receiving the to-be-executed instruction sent by the cloud platform, the main device generates signaling data based on the to-be-executed instruction to broadcast the signaling data to at least one sub-device in the IoT system. The signaling data includes at least information about the to-be-executed instruction and execution status data, and the information about the to-be-executed instruction may include the to-be-executed instruction, the time when the to-be-executed instruction is generated, the random sequence number and / or check code of the to-be-executed instruction, etc.
[0076] S202: Broadcast signaling data so that when at least one sub-device confirms the execution of the instruction to be executed in response to the signaling data, the execution status bit corresponding to the sub-device in the execution status data is modified, so that the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the instruction to be executed, thereby obtaining updated execution status data.
[0077] After the master device generates signaling data, the master device broadcasts the signaling data and transmits it to at least one sub-device in the IoT system, so that at least one sub-device receives and processes the instruction to be executed. When at least one sub-device confirms the execution of the instruction to be executed in response to the signaling data, the execution status bit corresponding to the sub-device in the execution status data is modified, so that the information of the execution status bit corresponding to the sub-device in the execution status data can indicate that the sub-device has executed the instruction to be executed, and the updated execution status data is obtained.
[0078] In one embodiment, after the master device generates signaling data, it executes the to-be-executed instruction carried in the signaling data, modifies the execution status bit corresponding to the master device in the execution status data, so that the information of the execution status bit corresponding to the master device in the execution status data can represent that the master device has executed the to-be-executed instruction, and obtains updated execution status data. The signaling data carrying the updated execution status data is broadcasted and transmitted to at least one sub-device in the Internet of Things system, so that at least one sub-device receives and processes the to-be-executed instruction.
[0079] S203: receiving the updated execution status data broadcasted by the sub-device, and confirming the execution status of each sub-device on the to-be-executed instruction by using the execution status bit corresponding to each sub-device in the updated execution status data.
[0080] The main device receives the updated execution status data broadcast by the sub-device, and confirms the execution status of each sub-device on the instruction to be executed by updating the execution status bit corresponding to each sub-device in the execution status data. For example, if the information of the execution status bit in the execution status data indicates that the instruction to be executed has been executed, it is confirmed that all sub-devices in the Internet of Things system have executed the instruction to be executed; if the information of the execution status bit in the execution status data indicates that the instruction to be executed has not been executed and indicates that the instruction to be executed has been executed, the execution status of the corresponding sub-device on the instruction to be executed can be confirmed through the information of the execution status bit of the mapped sub-device.
[0081] In one embodiment, the master device only receives the last update execution status data broadcast by the sub-device within a preset time interval, and confirms the execution status of each sub-device on the to-be-executed instruction based on the execution status bit corresponding to each sub-device in the last update execution status data.
[0082] In one embodiment, the main device may also forward the last updated execution status data to the cloud platform, so that the cloud platform can confirm the execution status of each sub-device on the instruction to be executed by updating the execution status bit corresponding to each sub-device in the execution status data.
[0083] For better understanding, an embodiment of a method for issuing an IoT instruction using a sub-device in an IoT system as an execution subject is provided. Figure 3 , Figure 31 is a flow chart of an embodiment of the method for issuing IoT instructions provided by the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 3 The process sequence shown is limited. Figure 3 As shown, this embodiment includes:
[0084] S301: The sub-device receives broadcasted information about instructions to be executed and execution status data, where the information about instructions to be executed and execution status data are broadcasted by the main device and / or other sub-devices.
[0085] The sub-device receives broadcasted signaling data, wherein the signaling data includes information of instructions to be executed and execution status data, wherein the information of instructions to be executed and execution status data are broadcasted by the main device and / or other sub-devices.
[0086] S302: In response to the information of the to-be-executed instruction, confirming that the to-be-executed instruction needs to be executed or has been executed, so that the information of the execution status bit corresponding to the sub-device in the execution status data can indicate that the sub-device has executed the to-be-executed instruction, and obtaining updated execution status data.
[0087] The sub-device confirms that the instruction to be executed needs to be executed or has been executed in response to the information of the instruction to be executed, so that the information of the execution status bit corresponding to the sub-device in the execution status data can indicate that the sub-device has executed the instruction to be executed, thereby obtaining updated execution status data.
[0088] In one embodiment, the information of the instruction to be executed includes a random serial number and a sending time of the information. The sub-device confirms whether the instruction to be executed needs to be executed based on the random serial number and the sending time of the information, and in response to confirming that the instruction to be executed needs to be executed or has been executed, executes the instruction to be executed and / or modifies the execution status bit corresponding to the sub-device in the execution status data, so that the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the instruction to be executed, and obtains updated execution status data.
[0089] In one example, if the sub-device has not received information about a pending instruction that carries the same random serial number and information sending time, it is confirmed that the pending instruction needs to be executed, the pending instruction is executed, and the information of the execution status bit corresponding to the sub-device in the execution status data is modified so that it can represent that the sub-device has executed the pending instruction, thereby obtaining updated execution status data.
[0090] If the sub-device has received information about the instruction to be executed that carries the same random serial number and information sending time, and the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the instruction to be executed, then it is confirmed that the instruction to be executed has been executed. At this time, there is no need to repeat the execution of the instruction to be executed. You can choose to overwrite or not modify the information of the execution status bit corresponding to the sub-device in the execution status data to obtain updated execution status data.
[0091] If the sub-device has received information about the instruction to be executed that carries the same random serial number and information sending time, but the information of the execution status bit corresponding to the sub-device in the execution status data cannot represent that the sub-device has executed the instruction to be executed, confirm that the sub-device has executed the instruction to be executed, modify the information of the execution status bit corresponding to the sub-device in the execution status data so that it can represent that the sub-device has executed the instruction to be executed, and obtain updated execution status data.
[0092] S303: Broadcast the information of the instruction to be executed and update the execution status data, so that the main device confirms the execution status of each sub-device on the instruction to be executed by updating the execution status bit corresponding to each sub-device in the execution status data.
[0093] After the sub-device executes the instruction to be executed and / or modifies the execution status data to obtain the updated execution status data, the signaling data carrying the updated execution status data is broadcasted so that other sub-devices or the main device in the Internet of Things system receive the broadcasted updated execution status data.
[0094] In one embodiment, the signaling data broadcast by the sub-device includes information of the instructions to be executed and execution status data, wherein the information of the instructions to be executed includes the instructions to be executed, the time when the instructions to be executed are generated, the random sequence number and / or check code of the instructions to be executed, etc.
[0095] In one embodiment, the signaling data broadcast by the sub-device may also only include the execution status data and part of the information of the instruction to be executed, such as the random sequence number of the instruction to be executed and the time and / or check code of generating the instruction to be executed.
[0096] The sub-device receives the information and execution status data of the instructions to be executed broadcasted by the main device or other sub-devices, executes the instructions to be executed, and enables the information of the execution status bit corresponding to the sub-device in the execution status data to indicate that the sub-device has executed the instructions to be executed, thereby obtaining updated execution status data.
[0097] The steps of broadcasting the information of the instruction to be executed and updating the execution status data to other sub-devices in the Internet of Things device, so that the other sub-devices execute in turn in response to the information of the instruction to be executed to confirm that the instruction to be executed needs to be executed or has been executed, so that the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the instruction to be executed, and obtain updated execution status data; and broadcasting the information of the instruction to be executed and updating the execution status data, so that the main device confirms the execution status of each sub-device on the instruction to be executed by updating the execution status bit corresponding to each sub-device in the execution status data.
[0098] In response to the signaling data, other sub-devices confirm that the instructions to be executed need to be executed or have been executed, execute the instructions to be executed and / or modify the execution status bit corresponding to the sub-device in the execution status data, so that the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the instructions to be executed, and obtain updated execution status data; further perform the step of broadcasting signaling data carrying the updated execution status data so that the remaining sub-devices or main devices in the Internet of Things system receive the broadcasted updated execution status data.
[0099] In one embodiment, the effective transmission time of signaling data broadcast is set, and the signaling data received and broadcasted within the preset time interval is valid signaling data. The sub-device only needs to perform task processing when receiving a valid broadcast, and does not consume additional power consumption network resources at other times. Exemplarily, the sub-device receives and broadcasts the information of the instruction to be executed and updates the execution status data within the preset time interval, so that the main device confirms the execution status of each sub-device on the instruction to be executed based on the execution status bit corresponding to each sub-device in the updated execution status data received last within the preset time interval.
[0100] To better explain the method of issuing IoT instructions for this application, please refer to Figure 4 , Figure 4 1 is a flowchart of a specific embodiment of the method for issuing Internet of Things instructions provided by this application. It should be noted that if there are substantially the same results, this embodiment does not Figure 4 The process sequence shown is limited.
[0101] like Figure 4 As shown, this embodiment includes:
[0102] S410: Initialization of the IoT system.
[0103] When initializing the entire IoT architecture, each IoT device sends a registration request to the cloud platform when joining the network, including information such as device type and serial number. The cloud platform assigns a unique number based on the device information and returns it to the IoT device. The cloud platform configures the same set of encryption keys for transmission and sends them to all IoT devices through a secure channel. IoT devices use the assigned numbers and shared keys to communicate with each other.
[0104] In one example, each IoT device is assigned a unique number through a host device or cloud platform. This number can be a serial number, MAC address (Media Access Control Address) or a unique identifier (such as UUID, Universally Unique Identifier) generated by the cloud platform. The cloud platform or host device is responsible for maintaining a device number database to ensure the uniqueness of each number and track the registration status of the device.
[0105] When a device is first connected to the network, it needs to register on the cloud platform or the host device so that the system can count the number of currently active devices. In addition, the system needs to regularly update the status of the device to ensure the accuracy of the device count.
[0106] The cloud platform or the main device is responsible for generating and distributing symmetric encryption keys to each IoT device, which are transmitted through a secure channel to ensure the security of the keys. All IoT devices in the IoT system share the same set of symmetric encryption keys for data encryption and decryption. When IoT devices use the shared symmetric encryption key to encrypt data before sending it, ensuring the security of the data during transmission, the IoT device that receives the data uses the same symmetric encryption key to decrypt the received data.
[0107] S420: The cloud platform sends instructions to be executed.
[0108] The cloud platform generates instructions to be executed based on user input or system logic. For example, based on user input or system logic, the instructions are packaged into a format suitable for network transmission, which may include information such as the content of the instructions to be executed, the target device, the execution time, and the priority.
[0109] The cloud platform establishes a stable communication connection with the main device through the Internet or other communication networks, and sends the packaged instructions to be executed to the main device through the established connection.
[0110] S430: The master device prepares signaling data.
[0111] The master device receives the pending instructions sent by the cloud platform, parses them and prepares the signaling data to be broadcast. In one example, the broadcast signaling data consists of three parts, including verification information, pending instructions and execution status data. The verification information includes the generation time of the pending instructions, the random sequence number of the pending instructions and the verification code of the current signaling data; the pending instructions can be instructions that all IoT devices need to execute together, or instructions that some IoT devices need to execute.
[0112] The execution status data includes at least two execution status bits, such as Figure 5 As shown, Figure 5 It is a structural diagram of execution status data provided by the present application. Assuming that there are 8 devices in the entire Internet of Things, the execution status data occupies 8 execution status bits. Exemplarily, the execution status bit is a bit. In the information representation of the execution status bit, 0 indicates that the instruction has not been executed, and 1 indicates that the instruction has been executed.
[0113] The master device combines the verification information, the instructions to be executed, and the execution status data into a complete signaling data packet, and encrypts the combined signaling data using a symmetric encryption algorithm such as AES, DES, etc. based on the pre-shared symmetric encryption key. The encryption process can be expressed as the following formula (1), where E 对称 Represents a symmetric encryption function.
[0114] M 广播信息 =E 对称 (verification information + instructions to be executed + execution status data) (1)
[0115] S440: The master device broadcasts signaling data.
[0116] If the master device also needs to execute the pending instruction, after preparing the signaling data, it executes the pending instruction and modifies the execution status bit corresponding to the master device in the execution status data, so that the information of the execution status bit corresponding to the master device in the execution status data can represent that the master device has executed the pending instruction, and obtains updated execution status data.
[0117] In one example, see Figure 6 , Figure 6 It is a schematic diagram of an embodiment of modifying execution status data provided by the present application. Assuming that the number assigned to the master device in the entire Internet of Things system is 2, after the master device completes the execution of the to-be-executed instruction, the information of the execution status bit numbered 2 corresponding to the master device in the execution status data is modified, and the information of the execution status bit is changed from 0 to 1, indicating that the current master device has executed the to-be-executed instruction, and the updated execution status data is obtained.
[0118] The main device transmits the encrypted and modified signaling data carrying the updated execution status data to at least one sub-device in the Internet of Things system through a wireless or wired network broadcast, so that the at least one sub-device receives and processes the instructions to be executed.
[0119] S450: The sub-device receives the signaling data, executes the to-be-executed instruction and / or modifies the execution status data, and broadcasts the modified signaling data.
[0120] The sub-device receives the signaling data transmitted by the broadcast and decrypts the signaling data using the symmetric encryption key set in the initialization phase. The decryption process is as follows: 对称 Represents a symmetric decryption function.
[0121] Verification information + instructions to be executed + execution status data = D 对称 (M 广播信息 ) (2)
[0122] The sub-device verifies whether the signaling data is legal by checking the information. If it is legal, it further confirms whether the pending instruction needs to be executed. The sub-device checks whether the random sequence number in the signaling data is new to confirm whether the signaling has been processed, and checks the sending time of the signaling data to determine whether the instruction is expired or needs to be executed immediately. In response to the signaling data confirming that the pending instruction needs to be executed or has been executed, the information of the execution status bit corresponding to the sub-device in the execution status data can indicate that the sub-device has executed the pending instruction, and the updated execution status data is obtained.
[0123] In one example, if the number assigned to the current sub-device in the entire IoT system is 7, and the current sub-device has not received information about pending instructions carrying the same random sequence number and information sending time; confirm that the pending instructions need to be executed, execute the pending instructions and modify the information of the execution status bit corresponding to the sub-device in the execution status data, such as Figure 7 As shown, Figure 7 It is a schematic diagram of another embodiment of modifying execution status data provided by the present application, which modifies the information of the execution status bit numbered 7 corresponding to the current sub-device in the execution status data, and overwrites the information of the execution status bit from 0 to 1, indicating that the current sub-device has executed the instruction to be executed, and obtains the updated execution status data, so that other IoT devices can confirm the execution status of the instruction to be executed.
[0124] In one example, if the number assigned to the current sub-device in the entire IoT system is 5, and the current sub-device has received information about the instruction to be executed that carries the same random sequence number and information transmission time. If the information of the execution status bit corresponding to the sub-device in the execution status data carried in the current signaling data can indicate that the sub-device has executed the instruction to be executed, then it is confirmed that the instruction to be executed has been executed, and there is no need to repeat the execution of the instruction to be executed, and the execution status data is not modified; if the information of the execution status bit corresponding to the sub-device in the execution status data carried in the current signaling data cannot indicate that the sub-device has executed the instruction to be executed, then it is confirmed that the instruction to be executed has been executed, but the execution status data in the current signaling data is not modified. At this time, the information of the execution status bit numbered 5 corresponding to the current sub-device in the execution status data is modified, and the information of the execution status bit is changed from 0 to 1, indicating that the current sub-device has executed the instruction to be executed, and the updated execution status data is obtained, so that other IoT devices can confirm the execution status of the instruction to be executed.
[0125] The sub-device generates a new verification code based on the updated execution status data and writes the new verification code into the verification information. The sub-device uses the symmetric encryption key to encrypt the updated verification information, the instructions to be executed, and the updated execution status data, generates new encrypted broadcast information, and broadcasts the new encrypted signaling data to other sub-devices.
[0126] After receiving the broadcast signaling data, other sub-devices confirm whether the signaling data is received for the first time and whether the instruction to be executed has been executed based on the verification information, and further confirm whether the information of the execution status bit in the corresponding execution status data is consistent with the execution status of the instruction to be executed by the current sub-device.
[0127] In response to the signaling data confirming that the pending instruction needs to be executed or has been executed, the pending instruction is executed and / or the execution status bit corresponding to the sub-device in the execution status data is modified, so that the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the pending instruction, and the updated execution status data is obtained. Other sub-devices use the symmetric encryption key to encrypt the updated verification information, the pending instruction and the updated execution status data, generate new encrypted broadcast information, and broadcast the new encrypted signaling data to other sub-devices, so that the remaining sub-devices or main devices in the Internet of Things system receive the broadcast signaling data.
[0128] In this way, the sub-device only needs to execute the instruction to be executed once. During the broadcast transmission process, all IoT devices can synchronize the execution status of each IoT device so that other IoT devices can confirm the execution status of each IoT device.
[0129] S460: The master device confirms the execution status of the to-be-executed instruction by all IoT devices based on the received update execution status data.
[0130] The main device receives the signaling data broadcast by the sub-device, and confirms the execution status of each IoT device on the instruction to be executed through the execution status bit corresponding to each IoT device in the update execution status data carried in the signaling data.
[0131] In one example, the master device receives the signaling data broadcast by the slave device or forwards it to the cloud platform after receiving it, and determines the execution status of each IoT device on the instruction to be executed. If all IoT devices have completed the execution of the instruction to be executed, the current updated execution status data is as follows: Figure 8 As shown, if the information of the execution status bits corresponding to all IoT devices is all 1, it can be determined that all IoT devices in the current IoT system have completed the execution of the instructions to be executed.
[0132] In order to further optimize the communication efficiency, the scheme provided by the present application can also preset a time interval, and the preset broadcast time interval is the effective transmission time of the broadcast information. For example, the preset time interval is 5 seconds, and the broadcast within five seconds from the time when the master device generates the instruction is valid broadcast information, and the broadcast information beyond the time range is invalid information. For example, at 12:31:04, the master device generates a broadcast message of a pending instruction to turn off the lights, and all sub-devices will receive, process and send new broadcast messages within 12:31:09 seconds. Broadcast messages beyond 12:31:09 seconds are invalid messages and will not be processed or transmitted.
[0133] Furthermore, the main device can also be set to wait for a certain period of time, such as 10 seconds. If no broadcast signaling of the execution completion of all sub-devices is received after 10 seconds, for example, when all eight execution status bits are 1, it is determined that the current instruction propagation is abnormal. The main device itself determines or sends the execution status data back to the cloud platform to determine which IoT devices have completed the execution of the instructions to be executed.
[0134] See also Fig. 9 , Fig. 9 This is a structural diagram of an Internet of Things instruction issuing system provided by the present application, including a cloud platform and an Internet of Things device, wherein the Internet of Things device includes a main device and at least one sub-device, specifically including:
[0135] The cloud platform is linked to the main device for communication, and is used to send the instructions to be executed to the main device, receive the updated execution status data sent by the main device, and confirm the execution status of each IoT device on the instructions to be executed by the execution status bit corresponding to each IoT device in the updated execution status data;
[0136] The main device is used to generate signaling data after receiving the to-be-executed instruction issued by the cloud platform, the signaling data including information of the to-be-executed instruction and execution status data; broadcast the signaling data so that when at least one sub-device confirms the execution of the to-be-executed instruction in response to the signaling data, the execution status bit corresponding to the sub-device in the execution status data is modified so that the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the to-be-executed instruction, thereby obtaining updated execution status data; receive the updated execution status data broadcasted by the sub-device, and confirm the execution status of each sub-device on the to-be-executed instruction by the execution status bit corresponding to each sub-device in the updated execution status data;
[0137] A sub-device is used to broadcast information about pending instructions and execution status data, where the information about pending instructions and execution status data are broadcast by a main device and / or other sub-devices; in response to the information about the pending instructions, confirming that the pending instructions need to be executed or have been executed, so that the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the pending instructions, thereby obtaining updated execution status data; broadcasting the information about pending instructions and updated execution status data, so that the main device can confirm the execution status of each sub-device on the pending instructions by updating the execution status bit corresponding to each sub-device in the execution status data.
[0138] See also Fig.10 , Fig.10 It is a structural diagram of an embodiment of an electronic device provided in the present application. The electronic device 60 includes a memory 61 and a processor 62 connected to each other. The memory 61 is used to store a computer program. When the computer program is executed by the processor 62, it is used to implement the Internet of Things instruction issuing method in the above embodiment.
[0139] The above-mentioned method is an embodiment, which can exist in the form of a computer program. Therefore, the present application proposes a computer-readable storage medium. Fig.11 , Fig.11 It is a structural diagram of an embodiment of a computer-readable storage medium provided in the present application. The computer-readable storage medium 80 is used to store a computer program 81, which can be executed to implement the Internet of Things instruction issuing method in the above embodiment.
[0140] The computer-readable storage medium 80 may be a server, a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other media that can store program codes.
[0141] The above description is only an embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for issuing Internet of Things instructions, characterized in that: The method is applied to an Internet of Things system, the Internet of Things system includes an Internet of Things device, the Internet of Things device includes a main device and at least one sub-device, and the Internet of Things instruction issuing method includes: The sub-device receives the broadcasted information of the to-be-executed instruction and the execution status data, where the information of the to-be-executed instruction and the execution status data are broadcasted by the main device and / or other sub-devices; In response to the information of the to-be-executed instruction, confirming that the to-be-executed instruction needs to be executed or has been executed, the information of the execution status bit corresponding to the sub-device in the execution status data can indicate that the sub-device has executed the to-be-executed instruction, thereby obtaining updated execution status data; The information of the instruction to be executed and the updated execution status data are broadcasted, so that the main device can confirm the execution status of each sub-device on the instruction to be executed through the execution status bit corresponding to each sub-device in the updated execution status data.
2. The method according to claim 1, characterized in that The execution status data includes at least two execution status bits, and the Internet of Things devices correspond to the execution status bits one by one; when the information of the execution status bit is a first value, it indicates that the Internet of Things device corresponding to the execution status bit has not executed the instruction to be executed, and when the information of the execution status bit is a second value, it indicates that the Internet of Things device corresponding to the execution status bit has executed the instruction to be executed.
3. The method according to claim 2, characterized in that The information of the instruction to be executed includes a random serial number and a sending time of the information; The step of confirming that the instruction to be executed needs to be executed or has been executed in response to the information of the instruction to be executed includes: If the information of the instruction to be executed carrying the same random sequence number and the sending time of the information has not been received, confirming that the instruction to be executed needs to be executed; If the information of the instruction to be executed carrying the same random serial number and the sending time of the information has been received, and the information of the execution status bit corresponding to the sub-device in the execution status data can indicate that the sub-device has executed the instruction to be executed, it is confirmed that the instruction to be executed has been executed.
4. The method according to claim 1, characterized in that: The method further comprises: receiving information and execution status data of the to-be-executed instruction broadcasted by the master device, executing the to-be-executed instruction, and making the information of the execution status bit corresponding to the sub-device in the execution status data represent that the sub-device has executed the to-be-executed instruction, thereby obtaining updated execution status data; Broadcasting the information of the instruction to be executed and the updated execution status data to other sub-devices in the Internet of Things device, so that the other sub-devices execute the instructions to be executed in response to the information of the instruction to be executed and confirm that the instruction to be executed needs to be executed or has been executed in sequence, so that the information of the execution status bit corresponding to the sub-device in the execution status data can represent that the sub-device has executed the instruction to be executed, and obtain updated execution status data; and broadcasting the information of the instruction to be executed and the updated execution status data, so that the main device confirms the execution status of each sub-device on the instruction to be executed through the execution status bit corresponding to each sub-device in the updated execution status data.
5. The method according to claim 4, characterized in that The broadcasting of the information of the to-be-executed instructions and the updating of the execution status data include: The information of the pending instruction and the updated execution status data are broadcasted within a preset time interval, so that the main device confirms the execution status of each sub-device on the pending instruction based on the execution status bit corresponding to each sub-device in the updated execution status data last received within the preset time interval.
6. A method for issuing Internet of Things instructions, characterized in that: The method is applied to an Internet of Things system, the Internet of Things system includes a cloud platform and an Internet of Things device, the Internet of Things device includes a main device and at least one sub-device, and the Internet of Things instruction issuing method includes: After receiving the to-be-executed instruction issued by the cloud platform, the master device generates signaling data, wherein the signaling data includes information of the to-be-executed instruction and execution status data; Broadcasting the signaling data, so that when at least one of the sub-devices confirms the execution of the to-be-executed instruction in response to the signaling data, the execution status bit corresponding to the sub-device in the execution status data is modified, so that the information of the execution status bit corresponding to the sub-device in the execution status data can indicate that the sub-device has executed the to-be-executed instruction, thereby obtaining updated execution status data; The updated execution status data broadcasted by the sub-device is received, and the execution status of each sub-device on the to-be-executed instruction is confirmed through the execution status bit corresponding to each sub-device in the updated execution status data.
7. The method according to claim 6, characterized in that The execution status data includes at least two execution status bits, and the Internet of Things devices correspond to the execution status bits one by one; when the information of the execution status bit is a first value, it indicates that the Internet of Things device corresponding to the execution status bit has not executed the instruction to be executed, and when the information of the execution status bit is a second value, it indicates that the Internet of Things device corresponding to the execution status bit has executed the instruction to be executed.
8. The method according to claim 7, characterized in that The receiving the updated execution status data broadcasted by the sub-device, and confirming the execution status of each sub-device on the to-be-executed instruction through the execution status bit corresponding to each sub-device in the updated execution status data, includes: receiving the last update execution status data broadcast by the sub-device within a preset time interval; confirming the execution status of each sub-device on the to-be-executed instruction based on the execution status bit corresponding to each sub-device in the last piece of the updated execution status data; or, The last piece of the update execution status data is forwarded to the cloud platform, so that the cloud platform can confirm the execution status of each of the sub-devices on the to-be-executed instructions through the execution status bits corresponding to each of the sub-devices in the update execution status data.
9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the processor is coupled to the memory, and the processor is configured to execute one or more steps of the Internet of Things instruction issuing method according to any one of claims 1 to 8 based on instructions stored in the memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the method for issuing Internet of Things instructions as described in any one of claims 1 to 8.