Device Status Update Method, Apparatus, Storage Medium, and Electronic Device
The main gateway sends control commands to the Internet of Things devices, uses the subgateway to receive feedback messages, and updates the status on the cloud server, solving the problem of low status update efficiency of gateway devices in the multi-Bluetooth mesh network, and achieving efficient device status updates.
Patent Information
- Application Number
- CN202211418788.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-14
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2042-11-14
AI Technical Summary
In multi-Bluetooth Mesh Gateway Coexistence Communication, the gateway device status update efficiency in the prior art is low, and it is impossible to effectively solve the network congestion caused by simultaneous problems and large-scale device status reporting.
The control command is sent to multiple IoT devices through the main gateway, and the feedback messages of IoT devices are received by multiple sub-gateways, and the historical status of IoT devices is updated on the cloud server to the current status, achieving the purpose of quickly updating the device status.
It improves the efficiency of device status update, solves the problem of low efficiency of gateway device status update, avoids network congestion, and ensures effective management of the status of a large number of devices.
Smart Images

Figure CN115913882B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular, to a method, apparatus, storage medium, and electronic device for updating device status. Background Art
[0002] In the coexisting communication of multiple Bluetooth Mesh gateways, related technologies usually use two methods to update the device status, namely, the method of the master gateway managing the slave gateways and the method of only one gateway working.
[0003] However, when using the method of the master gateway managing the slave gateways to update the device status, there will be a simultaneity problem; when using the method of a single gateway working to update the device status, it cannot meet the reporting of a large number of device statuses, and it is easy to cause network congestion. Therefore, the update efficiency of the gateway device status in related technologies is low.
[0004] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention
[0005] Embodiments of the present invention provide a method, apparatus, storage medium, and electronic device for updating device status, so as to at least solve the technical problem of low update efficiency of the gateway device status in related technologies.
[0006] According to an embodiment of the present invention, a method for updating device status is provided, including: sending a control command to a plurality of Internet of Things devices via a master gateway, where the master gateway and the plurality of Internet of Things devices form a first network, and the control command is used to adjust the device status of each of the plurality of Internet of Things devices; receiving feedback messages reported by the plurality of Internet of Things devices via a plurality of slave gateways, where the information carried in the feedback messages includes: the current device status of each of the plurality of Internet of Things devices, and each of the plurality of slave gateways forms a second network with some of the plurality of Internet of Things devices, and the network coverage range of the second network is smaller than that of the first network; updating the historical device status of each of the plurality of Internet of Things devices to the current device status on a cloud server.
[0007] Optionally, the method for updating device status further includes: sending a first notification message to at least one terminal device, where the first notification message is used to notify at least one terminal device to update the locally stored historical device status to the current device status.
[0008] Optionally, sending a control command to a plurality of Internet of Things devices via a master gateway includes: searching for and selecting a master gateway; sending a second notification message to the master gateway, where the information carried in the second notification message includes: the control command, and the second notification message is used to notify the master gateway to forward the control command to the plurality of Internet of Things devices.
[0009] Optionally, receiving feedback messages reported by multiple Internet of Things devices via multiple sub-gateways includes: respectively receiving feedback messages from each of the multiple sub-gateways, where the feedback messages are used to feedback the current device status of each Internet of Things device in the part of the Internet of Things devices corresponding to each of the multiple sub-gateways.
[0010] Optionally, the multiple sub-gateways include: a first sub-gateway and a second sub-gateway, the multiple Internet of Things devices include: a first number of first Internet of Things devices and a second number of second Internet of Things devices, and respectively receiving feedback messages from each of the multiple sub-gateways includes: receiving a feedback message from the first sub-gateway, where the feedback message is used to feedback the current device status of each of the first number of first Internet of Things devices corresponding to the first sub-gateway; receiving a feedback message from the second sub-gateway, where the feedback message is used to feedback the current device status of each of the second number of second Internet of Things devices corresponding to the second sub-gateway.
[0011] According to one embodiment of the present invention, another device status update method is further provided, including: receiving a control command from a cloud server via a main gateway, where the main gateway and multiple Internet of Things devices form a first network, and the control command is used to adjust the device status of each of the multiple Internet of Things devices; based on the control command, updating the historical device status of each of the multiple Internet of Things devices to the current device status; reporting a feedback message to the cloud server via multiple sub-gateways, so that the cloud server updates the historical device status of each of the multiple Internet of Things devices to the current device status, where the information carried in the feedback message includes: the current device status of each of the multiple Internet of Things devices, and each of the multiple sub-gateways and a part of the Internet of Things devices among the multiple Internet of Things devices form a second network, and the network coverage range of the second network is smaller than the network coverage range of the first network.
[0012] Optionally, reporting a feedback message to the cloud server via multiple sub-gateways includes: determining the sub-gateway corresponding to each of the multiple Internet of Things devices from the multiple sub-gateways; controlling each of the multiple Internet of Things devices to broadcast a feedback message to the corresponding sub-gateway, where the feedback message is used to feedback the current device status of each of the Internet of Things devices in the part of the Internet of Things devices corresponding to each of the multiple sub-gateways.
[0013] Optionally, the multiple sub-gateways include: a first sub-gateway and a second sub-gateway, and the multiple Internet of Things devices include: a first quantity of first Internet of Things devices and a second quantity of second Internet of Things devices. Controlling each of the multiple Internet of Things devices to broadcast a feedback message to a corresponding sub-gateway includes: controlling each of the first quantity of first Internet of Things devices to broadcast a feedback message to the corresponding first sub-gateway, where the feedback message is used to feedback the current device state of each of the first quantity of first Internet of Things devices; controlling each of the second quantity of second Internet of Things devices to broadcast a feedback message to the corresponding second sub-gateway, where the feedback message is used to feedback the current device state of each of the second quantity of second Internet of Things devices.
[0014] According to an embodiment of the present invention, there is also provided a device state update device, including: a sending module, configured to send a control command to multiple Internet of Things devices via a main gateway, where the main gateway and the multiple Internet of Things devices form a first network, and the control command is used to adjust the device state of each of the multiple Internet of Things devices; a receiving module, configured to receive feedback messages reported by the multiple Internet of Things devices via multiple sub-gateways, where the information carried in the feedback messages includes: the current device state of each of the multiple Internet of Things devices, and each of the multiple sub-gateways and a part of the multiple Internet of Things devices form a second network, and the network coverage of the second network is smaller than that of the first network; an updating module, configured to update the historical device state of each of the multiple Internet of Things devices to the current device state on a cloud server.
[0015] Optionally, the sending module is further configured to: send a first notification message to at least one terminal device, where the first notification message is used to notify the at least one terminal device to update the locally stored historical device state to the current device state.
[0016] Optionally, the sending module is further configured to: search for and select a main gateway; send a second notification message to the main gateway, where the information carried in the second notification message includes: the control command, and the second notification message is used to notify the main gateway to forward the control command to the multiple Internet of Things devices.
[0017] Optionally, the receiving module is further configured to: respectively receive feedback messages from each of the multiple sub-gateways, where the feedback messages are used to feedback the current device state of each of the Internet of Things devices corresponding to each of the multiple sub-gateways.
[0018] Optionally, the receiving module is further configured to: receive a feedback message from a first sub-gateway, where the feedback message is used to feedback the current device status of each of the first number of first Internet of Things devices corresponding to the first sub-gateway; receive a feedback message from a second sub-gateway, where the feedback message is used to feedback the current device status of each of the second number of second Internet of Things devices corresponding to the second sub-gateway.
[0019] According to an embodiment of the present invention, there is also provided a device status update apparatus, including: a receiving module, configured to receive a control command from a cloud server via a main gateway, where the main gateway and a plurality of Internet of Things devices form a first network, and the control command is used to adjust the device status of each of the plurality of Internet of Things devices; an update module, configured to update the historical device status of each of the plurality of Internet of Things devices to the current device status based on the control command; a reporting module, configured to report a feedback message to the cloud server via a plurality of sub-gateways, so that the cloud server updates the historical device status of each of the plurality of Internet of Things devices to the current device status, where the information carried in the feedback message includes: the current device status of each of the plurality of Internet of Things devices, and each of the plurality of sub-gateways forms a second network with some of the plurality of Internet of Things devices, and the network coverage of the second network is smaller than that of the first network.
[0020] Optionally, the reporting module is further configured to: determine, from the plurality of sub-gateways, the sub-gateway corresponding to each of the plurality of Internet of Things devices; control each of the plurality of Internet of Things devices to broadcast a feedback message to the corresponding sub-gateway, where the feedback message is used to feedback the current device status of each of the partial Internet of Things devices corresponding to each of the plurality of sub-gateways.
[0021] Optionally, the reporting module is further configured to: control each of the first number of first Internet of Things devices to broadcast a feedback message to the corresponding first sub-gateway, where the feedback message is used to feedback the current device status of each of the first number of first Internet of Things devices; control each of the second number of second Internet of Things devices to broadcast a feedback message to the corresponding second sub-gateway, where the feedback message is used to feedback the current device status of each of the second number of second Internet of Things devices.
[0022] According to an embodiment of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the device status update method in any one of the above when being run by a processor.
[0023] According to one embodiment of the present invention, there is also provided an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the device state update method in any one of the above.
[0024] In at least some embodiments of the present invention, by sending control commands to multiple Internet of Things devices via a main gateway, and then receiving feedback messages reported by the multiple Internet of Things devices via multiple sub-gateways, and finally updating the historical device state of each Internet of Things device among the multiple Internet of Things devices to the current device state on the cloud server, the purpose of quickly updating the device state is achieved, thereby realizing the technical effect of improving the efficiency of device state update, and further solving the technical problem of low update efficiency of the gateway device state in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings described herein are used to provide a further understanding of the present invention, and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention, and do not constitute an improper limitation to the present invention. In the drawings:
[0026] Figure 1 is a flowchart of a device state update method according to one embodiment of the present invention;
[0027] Figure 2 is a schematic diagram of a device state update system according to one embodiment of the present invention;
[0028] Figure 3 is a flowchart of another device state update method according to one embodiment of the present invention;
[0029] Figure 4 is a schematic diagram of a device state update method according to one embodiment of the present invention;
[0030] Figure 5 is a structural block diagram of a device state update device according to one embodiment of the present invention;
[0031] Figure 6 is a structural block diagram of another device state update device according to one embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0032] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0033] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of the present invention are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order different from those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0034] According to an embodiment of the present invention, an embodiment of a device status update method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.
[0035] This method embodiment can be executed in a device status update system. The device status update system includes: a terminal device, an Internet of Things device, a gateway, and a cloud server.
[0036] Specifically, the above-mentioned terminal device can be a smart phone (for example: Android phone, iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), etc. The above-mentioned Internet of Things device can be a smart home device, for example: a smart refrigerator, a smart air conditioner, a smart lighting lamp, etc.; the above-mentioned Internet of Things device can also be a smart industrial device, for example: a smart robot, a smart scanner, a smart label machine, etc.
[0037] The internal main structures of the above-mentioned terminal device, Internet of Things device, gateway, and cloud server are basically similar. Hereinafter, the internal main structure of the terminal device will be taken as an example for description, and the internal main structures of the Internet of Things device, gateway, and cloud server will not be elaborated.
[0038] The terminal device may include one or more processors (the processors may include, but are not limited to, processing devices such as a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processing (DSP) chip, a Micro Controller Unit (MCU), a Field Programmable Gate Array (FPGA), a Neural-network Processor Unit (NPU), a Tensor Processing Unit (TPU), an Artificial Intelligence (AI) type processor, etc.) and a memory for storing data. Optionally, the above terminal device may further include a transmission device, an input / output device, and a display device for communication functions. Those of ordinary skill in the art can understand that the above structural description is only illustrative and does not limit the structure of the above terminal device. For example, the terminal device may further include more or fewer components than the above structural description, or have a configuration different from the above structural description.
[0039] The memory can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the device state update method in the embodiments of the present invention. The processor executes various functional applications and data processing by running the computer program stored in the memory, that is, implements the above device state update method. The memory may include a high-speed random access memory, and may further include a non-volatile memory, such as one or more magnetic storage devices, a flash memory, or other non-volatile solid-state memories. In some instances, the memory may further include a memory remotely disposed relative to the processor, and these remote memories can be connected to the terminal device through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0040] The transmission device is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the terminal device. In one instance, the transmission device includes a Network Interface Controller (NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device may be a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0041] The display device can be, for example, a touch-screen liquid crystal display (LCD) and a touch display (also known as a "touch screen" or "touch display screen"). The liquid crystal display enables a user to interact with the user interface of the terminal device. In some embodiments, the above terminal device has a graphical user interface (GUI), and the user can perform human-computer interaction with the GUI through finger contacts and / or gestures on the touch-sensitive surface. The human-computer interaction function may optionally include the following interactions: creating web pages, drawing, word processing, creating electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music, and / or web browsing, etc. The executable instructions for executing the above device status update method are configured / stored in a computer program product or a readable storage medium executable by one or more processors.
[0042] In this embodiment, a device status update method running in the above cloud server is provided. Figure 1 It is a flowchart of a device status update method according to an embodiment of the present invention, as Figure 1 shown, and the process includes the following steps:
[0043] Step S12: Send a control command to multiple Internet of Things devices via the main gateway. The main gateway and the multiple Internet of Things devices form a first network, and the control command is used to adjust the device status of each Internet of Things device among the multiple Internet of Things devices.
[0044] Step S14: Receive feedback messages reported by the multiple Internet of Things devices via multiple sub-gateways. The information carried in the feedback messages includes: the current device status of each Internet of Things device among the multiple Internet of Things devices. Each sub-gateway among the multiple sub-gateways forms a second network with some of the Internet of Things devices among the multiple Internet of Things devices, and the network coverage of the second network is smaller than the network coverage of the first network.
[0045] Step S16: Update the historical device status of each Internet of Things device among the multiple Internet of Things devices to the current device status on the cloud server.
[0046] Optionally, the multiple sub-gateways include: a first sub-gateway and a second sub-gateway, and the multiple Internet of Things devices include: a first number of first Internet of Things devices and a second number of second Internet of Things devices.
[0047] Specifically, a gateway is also known as an internetwork connector and a protocol converter. A gateway realizes network interconnection above the network layer and is a complex network interconnection device, which is only used for network interconnection between two networks with different high-level protocols.
[0048] Figure 2 A schematic diagram of a device status update system according to an embodiment of the present invention, as Figure 2 shown, the device status update system mainly includes a cloud server, a main gateway, a sub - gateway 1, a sub - gateway 2, and multiple Internet of Things devices. Among them, the multiple Internet of Things devices can include multiple first Internet of Things devices and multiple second Internet of Things devices. For example, the multiple Internet of Things devices can include 2 smart refrigerators and 3 smart air conditioners.
[0049] The main gateway and the multiple Internet of Things devices form a first network. For example, the main gateway can form Network 1 with Smart Refrigerator 1, Smart Refrigerator 2, and Smart Air Conditioner 1, Smart Air Conditioner 2, Smart Air Conditioner 3.
[0050] The first sub - gateway and the first number of first Internet of Things devices can form a second network, and the network coverage of the second network is smaller than that of the first network. For example, Sub - gateway 1 and Smart Refrigerator 1, Smart Refrigerator 2 form Network 2, and the coverage of Network 2 is smaller than that of Network 1.
[0051] The second sub - gateway and the second number of second Internet of Things devices can also form a second network, and the network coverage of the second network is smaller than that of the first network. For example, Sub - gateway 2 and Smart Air Conditioner 1, Smart Air Conditioner 2, Smart Air Conditioner 3 form Network 3, and the coverage of Network 3 is smaller than that of Network 1.
[0052] The cloud server can send control commands to the first number of first Internet of Things devices and the second number of second Internet of Things devices through the main gateway to adjust the device status of each Internet of Things device in the multiple Internet of Things devices. For example, the cloud server can send status update commands to Smart Refrigerator 1, Smart Refrigerator 2, and Smart Air Conditioner 1, Smart Air Conditioner 2, Smart Air Conditioner 3 through Network 1 to update the device status of Smart Refrigerator 1, Smart Refrigerator 2, and Smart Air Conditioner 1, Smart Air Conditioner 2, Smart Air Conditioner 3.
[0053] The cloud server can receive the current device status of each Internet of Things device reported by the first number of first Internet of Things devices and the second number of second Internet of Things devices through multiple sub - gateways. For example, the cloud server can receive the current device status reported by Smart Refrigerator 1 and Smart Refrigerator 2 through Sub - gateway 1, where the status of Smart Refrigerator 1 is running and the status of Smart Refrigerator 2 is running. The cloud server can also receive the current device status reported by Smart Air Conditioner 1, Smart Air Conditioner 2, and Smart Air Conditioner 3 through Sub - gateway 2, where the status of Smart Air Conditioner 1 is running, the status of Smart Air Conditioner 2 is running, and the status of Smart Air Conditioner 2 is running.
[0054] On the cloud server, update the historical device status of each Internet of Things (IoT) device among the first quantity of first IoT devices and the second quantity of second IoT devices to the current device status. For example, on the cloud server, update the historical device status of "running" of smart refrigerator 1, smart refrigerator 2, smart air conditioner 1, smart air conditioner 2, and smart air conditioner 3 to the current device status of "stopped".
[0055] Based on the above steps S12 to S16, by sending control commands to multiple IoT devices via the main gateway, and then receiving feedback messages reported by the multiple IoT devices via multiple sub-gateways, and finally on the cloud server, updating the historical device status of each IoT device among the multiple IoT devices to the current device status, the purpose of quickly updating the device status is achieved, thereby realizing the technical effect of improving the efficiency of device status update, and further solving the technical problem of low update efficiency of the gateway device status in the related art.
[0056] Optionally, the device status update method further includes the following steps:
[0057] Step S17: Send a first notification message to at least one terminal device, where the first notification message is used to notify at least one terminal device to update the historically stored device status to the current device status.
[0058] After the cloud server updates the historical device status of each IoT device among the multiple IoT devices to the current device status, the cloud server can send a first notification message to at least one terminal device to notify at least one terminal device to update the historically stored device status in the terminal device to the current device status.
[0059] For example, after the cloud server updates the historical device status of "running" of smart refrigerator 1, smart refrigerator 2, smart air conditioner 1, smart air conditioner 2, and smart air conditioner 3 to the current device status of "stopped", the cloud server can send a device status update notification to mobile phone 1 and mobile phone 2 to notify mobile phone 1 and mobile phone 2 to update the historical device status of "running" of the 2 smart refrigerators and 3 smart air conditioners stored to the current device status of "stopped".
[0060] Based on the above step S17, by sending a first notification message to at least one terminal device, the terminal device can be reminded to update the historical device status of the stored IoT devices to the current device status.
[0061] Optionally, in step S12, sending control commands to multiple IoT devices via the main gateway includes:
[0062] Step S121: Search for and select the main gateway;
[0063] Step S122: Send a second notification message to the main gateway. The information carried in the second notification message includes: a control command. The second notification message is used to notify the main gateway to forward the control command to multiple Internet of Things devices.
[0064] Specifically, when the cloud server sends a control command to multiple Internet of Things devices through the main gateway, it is first necessary to search for and select the main gateway, and then send a second notification message including the control command to the main gateway to notify the main gateway to forward the control command to multiple Internet of Things devices.
[0065] For example, when the cloud server sends a command to update the device status to Smart Refrigerator 1 and Smart Refrigerator 2 through the main gateway, it is first necessary to search for and select the main gateway, and then send a notification message to the main gateway. The notification message includes the control command "Update the status of Smart Refrigerator 1 and Smart Refrigerator 2 to stopped" to notify the main gateway to forward the above control command to Smart Refrigerator 1 and Smart Refrigerator 2.
[0066] Based on the above steps S121 to S122, by searching for and selecting the main gateway and then sending a second notification message to the main gateway, the main gateway can forward the control command to multiple Internet of Things devices, ensuring the consistency and simultaneity of controlling the Internet of Things devices.
[0067] Optionally, in step S14, receiving feedback messages reported by multiple Internet of Things devices via multiple sub - gateways includes: receiving feedback messages from each of the multiple sub - gateways respectively. The feedback message is used to feedback the current device status of each Internet of Things device in the part of Internet of Things devices corresponding to each sub - gateway among the multiple sub - gateways.
[0068] Specifically, receive the current device status of each Internet of Things device in the part of Internet of Things devices corresponding to each of the multiple sub - gateways respectively. For example, receive the current device status of Smart Refrigerator 1 and Smart Refrigerator 2 corresponding to Sub - gateway 1, and receive the current device status of Smart Air Conditioner 1, Smart Air Conditioner 2, and Smart Air Conditioner 3 corresponding to Sub - gateway 2.
[0069] Based on the above step S14, by receiving feedback messages from each of the multiple sub - gateways respectively, multiple Internet of Things devices can report their device status only to the sub - gateways in the second network where they are located. Then the cloud server receives the device status of multiple Internet of Things devices through multiple sub - gateways, enabling the device status reported by the Internet of Things devices to be transmitted only through the sub - gateways in the second network without relying on the main gateway. This can achieve the separation of command issuance and status reporting, avoid network congestion, and thus improve the update efficiency of device status.
[0070] Optionally, in step S14, receiving feedback messages from each of the multiple sub - gateways respectively includes:
[0071] Step S141: Receive a feedback message from the first sub-gateway. The feedback message is used to feedback the current device status of each of the first number of first Internet of Things devices corresponding to the first sub-gateway.
[0072] Step S142: Receive a feedback message from the second sub-gateway. The feedback message is used to feedback the current device status of each of the second number of second Internet of Things devices corresponding to the second sub-gateway.
[0073] Specifically, receive the current device status of each of the first number of first Internet of Things devices corresponding to the first sub-gateway through the first sub-gateway. For example, receive the current device status of Smart Refrigerator 1 and Smart Refrigerator 2 among the 2 smart refrigerators corresponding to Sub-gateway 1 through Sub-gateway 1.
[0074] Specifically, receive the current device status of each of the second number of second Internet of Things devices corresponding to the second sub-gateway through the second sub-gateway. For example, receive the current device status of Smart Air Conditioner 1, Smart Air Conditioner 2, and Smart Air Conditioner 3 among the 3 smart air conditioners corresponding to Sub-gateway 2 through Sub-gateway 2.
[0075] Based on the above steps S141 to S142, by receiving the feedback message from the first sub-gateway and the feedback message from the second sub-gateway, it is possible to use different sub-gateways to receive the device status reported by different Internet of Things devices, avoid network congestion, and thus improve the update efficiency of the device status.
[0076] In this embodiment, a device status update method running in the above Internet of Things device is further provided. Figure 3 It is a flowchart of another device status update method according to an embodiment of the present invention, as Figure 3 shown. The process includes the following steps:
[0077] Step S32: Receive a control command from the cloud server via the main gateway. The main gateway and multiple Internet of Things devices form a first network. The control command is used to adjust the device status of each of the multiple Internet of Things devices.
[0078] Step S34: Based on the control command, update the historical device status of each of the multiple Internet of Things devices to the current device status.
[0079] Step S36, report feedback messages to the cloud server via multiple sub - gateways, so that the cloud server updates the historical device status of each Internet of Things device in the multiple Internet of Things devices to the current device status. The information carried in the feedback message includes: the current device status of each Internet of Things device in the multiple Internet of Things devices, each of the multiple sub - gateways and a part of the Internet of Things devices in the multiple Internet of Things devices form a second network, and the network coverage of the second network is smaller than that of the first network.
[0080] Optionally, the multiple sub - gateways include: a first sub - gateway and a second sub - gateway, and the multiple Internet of Things devices include: a first number of first Internet of Things devices and a second number of second Internet of Things devices.
[0081] As Figure 2 shown, the main gateway and a first number of first Internet of Things devices and a second number of second Internet of Things devices form a first network. For example, the main gateway and 2 smart refrigerators and 3 smart air conditioners form Network 1.
[0082] Each of the multiple sub - gateways and a part of the Internet of Things devices in the multiple Internet of Things devices form a second network, and the network coverage of the second network is smaller than that of the first network. For example, the multiple Internet of Things devices include 2 smart refrigerators and 3 smart air conditioners. Sub - gateway 1 and 2 smart refrigerators form Network 2, and Sub - gateway 2 and 3 smart air conditioners form Network 3, where the coverage of Network 2 and Network 3 is smaller than the coverage of the above - mentioned Network 1.
[0083] Receive control commands from the cloud server through the main gateway to adjust the device status of each Internet of Things device in the multiple Internet of Things devices. For example, receive a command to update the device status from the cloud server through the main gateway to update the device status of each of the 2 smart refrigerators.
[0084] Based on the control command, update the historical device status of each Internet of Things device in the multiple Internet of Things devices to the current device status. For example, based on the command to update the device status to stop, update the historical device status of each of the 2 smart refrigerators to the current device status "stop".
[0085] Report the current device status of each Internet of Things device in the multiple Internet of Things devices to the cloud server through the multiple sub - gateways, so that the cloud server updates the historical device status of each Internet of Things device in the multiple Internet of Things devices to the current device status. For example, report the current device status of Smart Refrigerator 1 and Smart Refrigerator 2 among the 2 smart refrigerators to the cloud server through Sub - gateway 1. Another example, report the current device status of Smart Air Conditioner 1, Smart Air Conditioner 2, and Smart Air Conditioner 3 among the 3 smart air conditioners to the cloud server through Sub - gateway 2.
[0086] Based on the above steps S32 to S36, by receiving control commands from the cloud server via the main gateway, and then based on the control commands, updating the historical device status of each Internet of Things device among multiple Internet of Things devices to the current device status, and finally reporting feedback messages to the cloud server via multiple sub-gateways, so that the cloud server updates the historical device status of each Internet of Things device among multiple Internet of Things devices to the current device status, the purpose of quickly updating the device status is achieved, thereby realizing the technical effect of improving the efficiency of device status update, and further solving the technical problem of low update efficiency of gateway device status in the related art.
[0087] Optionally, in step S36, reporting feedback messages to the cloud server via multiple sub-gateways includes:
[0088] Step S361, determining the sub-gateway corresponding to each Internet of Things device among multiple Internet of Things devices from multiple sub-gateways;
[0089] Step S362, controlling each Internet of Things device among multiple Internet of Things devices to broadcast feedback messages to the corresponding sub-gateway, where the feedback message is used to feedback the current device status of each Internet of Things device among the partial Internet of Things devices corresponding to each sub-gateway among multiple sub-gateways.
[0090] Specifically, when determining the sub-gateway corresponding to each Internet of Things device among multiple Internet of Things devices from multiple sub-gateways, the corresponding sub-gateway can be determined from the second network where each Internet of Things device is located. For example, when determining the sub-gateway corresponding to Smart Refrigerator 1 among 2 smart refrigerators and 3 smart air conditioners from sub-gateways 1 and 2, the corresponding sub-gateway can be determined as sub-gateway 1 from the network 2 where Smart Refrigerator 1 is located.
[0091] Controlling each Internet of Things device among multiple Internet of Things devices to broadcast the current device status of each Internet of Things device among the partial Internet of Things devices corresponding to each sub-gateway among multiple sub-gateways to the corresponding sub-gateway. For example, controlling Smart Refrigerator 1 and Smart Refrigerator 2 among 2 smart refrigerators and 3 smart air conditioners to broadcast the current device status of Smart Refrigerator 1 and Smart Refrigerator 2 corresponding to sub-gateway 1 to the corresponding sub-gateway 1. Another example, controlling Smart Air Conditioner 1, Smart Air Conditioner 2, and Smart Air Conditioner 3 among 2 smart refrigerators and 3 smart air conditioners to broadcast the current device status of Smart Air Conditioner 1, Smart Air Conditioner 2, and Smart Air Conditioner 3 corresponding to sub-gateway 2 to the corresponding sub-gateway 2.
[0092] Based on the above steps S361 to S362, by determining the sub-gateway corresponding to each Internet of Things device among multiple Internet of Things devices from multiple sub-gateways, and then controlling each Internet of Things device among multiple Internet of Things devices to broadcast feedback messages to the corresponding sub-gateway, the device status of different Internet of Things devices can be reported to different sub-gateways, which can avoid network congestion, and further improve the efficiency of device status update.
[0093] Optionally, in step S362, controlling each of the multiple Internet of Things devices to broadcast a feedback message to the corresponding sub-gateway includes:
[0094] Step S3621, controlling each of the first number of first Internet of Things devices to broadcast a feedback message to the corresponding first sub-gateway, where the feedback message is used to feedback the current device status of each of the first number of first Internet of Things devices;
[0095] Step S3622, controlling each of the second number of second Internet of Things devices to broadcast a feedback message to the corresponding second sub-gateway, where the feedback message is used to feedback the current device status of each of the second number of second Internet of Things devices.
[0096] Specifically, controlling each of the first number of first Internet of Things devices to broadcast the current device status of each of the first number of first Internet of Things devices to the corresponding first sub-gateway. For example, controlling smart refrigerator 1 and smart refrigerator 2 among 2 smart refrigerators to broadcast the current device status of smart refrigerator 1 and smart refrigerator 2 to the corresponding sub-gateway 1.
[0097] Controlling each of the second number of second Internet of Things devices to broadcast the current device status of each of the second number of second Internet of Things devices to the corresponding second sub-gateway. For example, controlling smart air conditioner 1, smart air conditioner 2, and smart air conditioner 3 among 3 smart air conditioners to broadcast the current device status of smart air conditioner 1, smart air conditioner 2, and smart air conditioner 3 to the corresponding sub-gateway 2.
[0098] Based on the above steps S3621 to S3622, by controlling each of the first number of first Internet of Things devices to broadcast a feedback message to the corresponding first sub-gateway, and controlling each of the second number of second Internet of Things devices to broadcast a feedback message to the corresponding second sub-gateway, the device status of different Internet of Things devices can be broadcast through different sub-gateways, which can avoid network congestion and thus improve the update efficiency of the device status.
[0099] Figure 4 is a schematic diagram of a device status update method according to an embodiment of the present invention, as Figure 4 shown, the working process of the device status update method is as follows:
[0100] Step S401, search for and select the main gateway;
[0101] Step S402, send a second notification message, where the information carried in the second notification message includes: a control command;
[0102] Step S403, forward the control command;
[0103] Step S404, receive the control command from the cloud server via the main gateway;
[0104] Step S405, based on the control command, update the historical state of each Internet of Things device among the multiple Internet of Things devices to the current device state;
[0105] Step S406, determine the sub-gateway corresponding to each Internet of Things device among the multiple Internet of Things devices from the multiple sub-gateways;
[0106] Step S407, control each Internet of Things device among the multiple Internet of Things devices to broadcast a feedback message to the corresponding sub-gateway, where the information carried in the feedback message includes: the current device information of each Internet of Things device among the multiple Internet of Things devices;
[0107] Step S408, forward the feedback information reported by the multiple Internet of Things devices;
[0108] Step S409, receive the feedback messages reported by the multiple Internet of Things devices via the multiple sub-gateways;
[0109] Step S410, update the historical device state of each Internet of Things device among the multiple Internet of Things devices to the current device state;
[0110] Step S411, send a first notification message to at least one terminal device, where the first notification message is used to notify at least one terminal device to update the historical device state stored locally to the current device state;
[0111] Step S412, update the historical device state stored locally to the current device state.
[0112] In the working process of the above device network configuration method, by sending a control command to multiple Internet of Things devices via the main gateway, and then receiving the feedback messages reported by the multiple Internet of Things devices via the multiple sub-gateways, and finally, on the cloud server, updating the historical device state of each Internet of Things device among the multiple Internet of Things devices to the current device state, the purpose of quickly updating the device state is achieved, thereby realizing the technical effect of improving the efficiency of device state update, and further solving the technical problem of low update efficiency of the gateway device state in the related technology.
[0113] Next, taking a smart refrigerator and a smart air conditioner as examples, the working process of the device state update method will be introduced in detail:
[0114] In the device status update system, two smart refrigerators, three smart air conditioners and a main gateway form Network 1. Among them, two smart refrigerators and Sub-gateway 1 form Network 2, and three smart air conditioners and Sub-gateway 2 form Network 3. The coverage ranges of the above-mentioned Network 2 and Network 3 are smaller than that of Network 1.
[0115] First, the cloud server searches for and selects the main gateway, and sends a control command to update the device status of two smart refrigerators and three smart air conditioners to the main gateway. After the main gateway receives the control command, it forwards the control command to two smart refrigerators and three smart air conditioners.
[0116] Secondly, after two smart refrigerators and three smart air conditioners receive the control command from the cloud via the main gateway, Smart Refrigerator 1, Smart Refrigerator 2, Smart Air Conditioner 1, Smart Air Conditioner 2 and Smart Air Conditioner 3 update their historical device status to the current device status based on the control command, and determine that the sub-gateway corresponding to Smart Refrigerator 1 and Smart Refrigerator 2 among Sub-gateways 1 and 2 is Sub-gateway 1, and the sub-gateway corresponding to Smart Air Conditioner 1, Smart Air Conditioner 2 and Smart Air Conditioner 3 is Sub-gateway 2.
[0117] Subsequently, control Smart Refrigerator 1 and Smart Refrigerator 2 to broadcast the current device status of Smart Refrigerator 1 and Smart Refrigerator 2 to the corresponding Sub-gateway 1, and control Smart Air Conditioner 1, Smart Air Conditioner 2 and Smart Air Conditioner 3 to broadcast the current device status of Smart Air Conditioner 1, Smart Air Conditioner 2 and Smart Air Conditioner 3 to the corresponding Sub-gateway 2.
[0118] Furthermore, Sub-gateway 1 and Sub-gateway 2 forward the current device status of Smart Refrigerator 1, Smart Refrigerator 2, Smart Air Conditioner 1, Smart Air Conditioner 2 and Smart Air Conditioner 3 to the cloud server. When the cloud server receives the current device status of Smart Refrigerator 1, Smart Refrigerator 2, Smart Air Conditioner 1, Smart Air Conditioner 2 and Smart Air Conditioner 3 via Sub-gateway 1 and Sub-gateway 2, it updates the historical device status of Smart Refrigerator 1, Smart Refrigerator 2, Smart Air Conditioner 1, Smart Air Conditioner 2 and Smart Air Conditioner 3 to the current device status.
[0119] Finally, the cloud server sends a first notification message to Mobile Phone 1 and Mobile Phone 2, which is used to notify Mobile Phone 1 and Mobile Phone 2 to update the historical device status of Smart Refrigerator 1, Smart Refrigerator 2, Smart Air Conditioner 1, Smart Air Conditioner 2 and Smart Air Conditioner 3 stored locally to the current device status. After Mobile Phone 1 and Mobile Phone 2 receive the first notification message, they update the historical device status of Smart Refrigerator 1, Smart Refrigerator 2, Smart Air Conditioner 1, Smart Air Conditioner 2 and Smart Air Conditioner 3 locally to the current device status, thereby completing the update of the device status.
[0120] Next, taking a smart sweeper and a smart humidifier as examples, the working process of the device status update method will be introduced in detail:
[0121] In the device status update system, two intelligent sweeping robots, three intelligent humidifiers and a main gateway form Network 1. Among them, the two intelligent sweeping robots and Sub-gateway 1 form Network 2, and the three intelligent humidifiers and Sub-gateway 2 form Network 3. The coverage ranges of the above-mentioned Network 2 and Network 3 are smaller than that of Network 1.
[0122] First, the cloud server searches for and selects the main gateway, and sends a control command to the main gateway to update the device status of two intelligent sweeping robots and three intelligent humidifiers. After the main gateway receives the control command, it forwards the control command to the two intelligent sweeping robots and three intelligent humidifiers.
[0123] Second, after the two intelligent sweeping robots and three intelligent humidifiers receive the control command from the cloud via the main gateway, Intelligent Sweeping Robot 1, Intelligent Sweeping Robot 2, Humidifier 1, Humidifier 2, and Humidifier 3 update their historical device status to the current device status based on the control command, and determine that the sub-gateway corresponding to Intelligent Sweeping Robot 1 and Intelligent Sweeping Robot 2 among Sub-gateways 1 and 2 is Sub-gateway 1, and the sub-gateway corresponding to Humidifier 1, Humidifier 2, and Humidifier 3 is Sub-gateway 2.
[0124] Subsequently, control Intelligent Sweeping Robot 1 and Intelligent Sweeping Robot 2 to broadcast the current device status of Intelligent Sweeping Robot 1 and Intelligent Sweeping Robot 2 to the corresponding Sub-gateway 1, and control Humidifier 1, Humidifier 2, and Humidifier 3 to broadcast the current device status of Humidifier 1, Humidifier 2, and Humidifier 3 to the corresponding Sub-gateway 2.
[0125] Furthermore, Sub-gateway 1 and Sub-gateway 2 forward the current device status of Intelligent Sweeping Robot 1, Intelligent Sweeping Robot 2, Humidifier 1, Humidifier 2, and Humidifier 3 to the cloud server. When the cloud server receives the current device status of Intelligent Sweeping Robot 1, Intelligent Sweeping Robot 2, Humidifier 1, Humidifier 2, and Humidifier 3 via Sub-gateway 1 and Sub-gateway 2, it updates the historical device status of Intelligent Sweeping Robot 1, Intelligent Sweeping Robot 2, Humidifier 1, Humidifier 2, and Humidifier 3 to the current device status.
[0126] Finally, the cloud server sends a first notification message to Mobile Phone 1 and Mobile Phone 2, which is used to notify Mobile Phone 1 and Mobile Phone 2 to update the historical device status of Intelligent Sweeping Robot 1, Intelligent Sweeping Robot 2, Humidifier 1, Humidifier 2, and Humidifier 3 stored locally to the current device status. After Mobile Phone 1 and Mobile Phone 2 receive the first notification message, they update the historical device status of Intelligent Sweeping Robot 1, Intelligent Sweeping Robot 2, Humidifier 1, Humidifier 2, and Humidifier 3 stored locally to the current device status, thereby completing the update of the device status.
[0127] Next, taking smart lighting lamps and smart door locks as examples, the working process of the device status update method will be introduced in detail:
[0128] In the device status update system, two smart lighting lamps, three smart door locks and a main gateway form Network 1. Among them, two smart lighting lamps and Sub-gateway 1 form Network 2, and three smart door locks and Sub-gateway 2 form Network 3. The coverage ranges of the above-mentioned Network 2 and Network 3 are smaller than that of Network 1.
[0129] First, the cloud server searches for and selects the main gateway, and sends a control command to update the device status of two smart lighting lamps and three smart door locks to the main gateway. After the main gateway receives the control command, it forwards the control command to two smart lighting lamps and three smart door locks.
[0130] Secondly, after two smart lighting lamps and three smart door locks receive the control command from the cloud via the main gateway, Smart Lighting Lamp 1, Smart Lighting Lamp 2, Smart Door Lock 1, Smart Door Lock 2 and Smart Door Lock 3 update their historical device status to the current device status based on the control command, and determine that the sub-gateway corresponding to Smart Lighting Lamp 1 and Smart Lighting Lamp 2 among Sub-gateways 1 and 2 is Sub-gateway 1, and the sub-gateway corresponding to Smart Door Lock 1, Smart Door Lock 2 and Smart Door Lock 3 is Sub-gateway 2.
[0131] Subsequently, control Smart Lighting Lamp 1 and Smart Lighting Lamp 2 to broadcast the current device status of Smart Lighting Lamp 1 and Smart Lighting Lamp 2 to the corresponding Sub-gateway 1, and control Smart Door Lock 1, Smart Door Lock 2 and Smart Door Lock 3 to broadcast the current device status of Smart Door Lock 1, Smart Door Lock 2 and Smart Door Lock 3 to the corresponding Sub-gateway 2.
[0132] Furthermore, Sub-gateway 1 and Sub-gateway 2 forward the current device status of Smart Lighting Lamp 1, Smart Lighting Lamp 2, Smart Door Lock 1, Smart Door Lock 2 and Smart Door Lock 3 to the cloud server. When the cloud server receives the current device status of Smart Lighting Lamp 1, Smart Lighting Lamp 2, Smart Door Lock 1, Smart Door Lock 2 and Smart Door Lock 3 via Sub-gateway 1 and Sub-gateway 2, it updates the historical device status of Smart Lighting Lamp 1, Smart Lighting Lamp 2, Smart Door Lock 1, Smart Door Lock 2 and Smart Door Lock 3 to the current device status.
[0133] Finally, the cloud server sends a first notification message to Mobile Phone 1 and Mobile Phone 2, which is used to notify Mobile Phone 1 and Mobile Phone 2 to update the historical device status of Smart Lighting Lamp 1, Smart Lighting Lamp 2, Smart Door Lock 1, Smart Door Lock 2 and Smart Door Lock 3 stored locally to the current device status. After Mobile Phone 1 and Mobile Phone 2 receive the first notification message, they update the historical device status of Smart Lighting Lamp 1, Smart Lighting Lamp 2, Smart Door Lock 1, Smart Door Lock 2 and Smart Door Lock 3 locally to the current device status, thus completing the update of the device status.
[0134] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.
[0135] In this embodiment, a device status update device is also provided. This device is used to implement the above embodiments and preferred implementation methods, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0136] Figure 5 is a structural block diagram of a device status update device according to an embodiment of the present invention. As Figure 5 shown, the device includes: a sending module 501, configured to send a control command to a plurality of Internet of Things devices via a main gateway. Among them, the main gateway and the plurality of Internet of Things devices form a first network, and the control command is used to adjust the device status of each of the plurality of Internet of Things devices; a receiving module 502, configured to receive feedback messages reported by the plurality of Internet of Things devices via a plurality of sub-gateways. Among them, the information carried in the feedback message includes: the current device status of each of the plurality of Internet of Things devices, and each of the plurality of sub-gateways forms a second network with some of the plurality of Internet of Things devices, and the network coverage of the second network is smaller than the network coverage of the first network; an updating module 503, configured to update the historical device status of each of the plurality of Internet of Things devices to the current device status on a cloud server.
[0137] Optionally, the sending module 501 is further configured to send a first notification message to at least one terminal device, where the first notification message is used to notify the at least one terminal device to update the historically stored device status to the current device status.
[0138] Optionally, the sending module 501 is further configured to: search for and select a main gateway; send a second notification message to the main gateway, where the information carried in the second notification message includes: a control command, and the second notification message is used to notify the main gateway to forward the control command to the plurality of Internet of Things devices.
[0139] Optionally, the receiving module 502 is further configured to: respectively receive feedback messages from each of the multiple sub-gateways, where the feedback messages are used to feedback the current device status of each of the IoT devices corresponding to each of the multiple sub-gateways.
[0140] Optionally, the receiving module 502 is further configured to: receive a feedback message from the first sub-gateway, where the feedback message is used to feedback the current device status of each of the first number of first IoT devices corresponding to the first sub-gateway; receive a feedback message from the second sub-gateway, where the feedback message is used to feedback the current device status of each of the second number of second IoT devices corresponding to the second sub-gateway.
[0141] Figure 6 It is a structural block diagram of another device status update device according to an embodiment of the present invention. As Figure 6 shown, the device includes: a receiving module 601, configured to receive a control command from a cloud server via a main gateway, where the main gateway and multiple IoT devices form a first network, and the control command is used to adjust the device status of each of the multiple IoT devices; an updating module 602, configured to update the historical device status of each of the multiple IoT devices to the current device status based on the control command; a reporting module 603, configured to report a feedback message to the cloud server via multiple sub-gateways, so that the cloud server updates the historical device status of each of the multiple IoT devices to the current device status, where the information carried in the feedback message includes: the current device status of each of the multiple IoT devices, and each of the multiple sub-gateways and a part of the IoT devices among the multiple IoT devices form a second network, and the network coverage of the second network is smaller than that of the first network.
[0142] Optionally, the reporting module 603 is further configured to: determine the sub-gateway corresponding to each of the multiple IoT devices from the multiple sub-gateways; control each of the multiple IoT devices to broadcast a feedback message to the corresponding sub-gateway, where the feedback message is used to feedback the current device status of each of the IoT devices corresponding to each of the multiple sub-gateways.
[0143] Optionally, the reporting module 603 is further configured to: control each of the first number of first IoT devices to broadcast a feedback message to the corresponding first sub-gateway, where the feedback message is used to feedback the current device status of each of the first number of first IoT devices; control each of the second number of second IoT devices to broadcast a feedback message to the corresponding second sub-gateway, where the feedback message is used to feedback the current device status of each of the second number of second IoT devices.
[0144] It should be noted that the above-mentioned modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: all the above-mentioned modules are located in the same processor; or, the above-mentioned modules are respectively located in different processors in any combination.
[0145] An embodiment of the present invention also provides a computer-readable storage medium, in which a computer program is stored. Wherein, the computer program is set to execute the steps in any one of the above method embodiments when being run by a processor.
[0146] Optionally, in this embodiment, the above storage medium can be set to store a computer program for executing the following steps:
[0147] Step S1: Send a control command to multiple Internet of Things devices via a main gateway. Wherein, the main gateway and the multiple Internet of Things devices form a first network, and the control command is used to adjust the device state of each Internet of Things device among the multiple Internet of Things devices;
[0148] Step S2: Receive feedback messages reported by the multiple Internet of Things devices via multiple sub-gateways. Wherein, the information carried in the feedback messages includes: the current device state of each Internet of Things device among the multiple Internet of Things devices, and each sub-gateway among the multiple sub-gateways forms a second network with some of the Internet of Things devices among the multiple Internet of Things devices, and the network coverage range of the second network is smaller than that of the first network;
[0149] Step S3: On a cloud server, update the historical device state of each Internet of Things device among the multiple Internet of Things devices to the current device state.
[0150] Optionally, in this embodiment, the above storage medium can also be set to store a computer program for executing the following steps:
[0151] Step S1: Receive a control command from a cloud server via a main gateway. Wherein, the main gateway and the multiple Internet of Things devices form a first network, and the control command is used to adjust the device state of each Internet of Things device among the multiple Internet of Things devices;
[0152] Step S2: Based on the control command, update the historical device state of each Internet of Things device among the multiple Internet of Things devices to the current device state;
[0153] Step S3: Report feedback messages to the cloud server via multiple sub - gateways, so that the cloud server updates the historical device status of each Internet of Things device among the multiple Internet of Things devices to the current device status. The information carried in the feedback message includes: the current device status of each Internet of Things device among the multiple Internet of Things devices, each of the multiple sub - gateways forms a second network with some of the multiple Internet of Things devices, and the network coverage of the second network is smaller than that of the first network.
[0154] Optionally, in this embodiment, the above - mentioned storage medium may include, but is not limited to: USB flash drive, read - only memory (ROM for short), random access memory (RAM for short), mobile hard disk, magnetic disk, or optical disc, etc., various media that can store computer programs.
[0155] An embodiment of the present invention also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above - mentioned method embodiments.
[0156] Optionally, in this embodiment, the above - mentioned processor may be configured to execute the following steps through a computer program:
[0157] Step S1: Send control commands to multiple Internet of Things devices via the main gateway. The main gateway forms a first network with the multiple Internet of Things devices, and the control commands are used to adjust the device status of each Internet of Things device among the multiple Internet of Things devices;
[0158] Step S2: Receive feedback messages reported by multiple Internet of Things devices via multiple sub - gateways. The information carried in the feedback message includes: the current device status of each Internet of Things device among the multiple Internet of Things devices, each of the multiple sub - gateways forms a second network with some of the multiple Internet of Things devices, and the network coverage of the second network is smaller than that of the first network;
[0159] Step S3: On the cloud server, update the historical device status of each Internet of Things device among the multiple Internet of Things devices to the current device status.
[0160] Optionally, in this embodiment, the above - mentioned processor may also be configured to execute the following steps through a computer program:
[0161] Step S1: Receive control commands from the cloud server via the main gateway. The main gateway forms a first network with the multiple Internet of Things devices, and the control commands are used to adjust the device status of each Internet of Things device among the multiple Internet of Things devices;
[0162] Step S2: Based on the control command, update the historical device status of each Internet of Things device among the multiple Internet of Things devices to the current device status.
[0163] Step S3: Report a feedback message to the cloud server via multiple sub-gateways, so that the cloud server updates the historical device status of each Internet of Things device among the multiple Internet of Things devices to the current device status. The information carried in the feedback message includes: the current device status of each Internet of Things device among the multiple Internet of Things devices. Each of the multiple sub-gateways and some of the Internet of Things devices among the multiple Internet of Things devices form a second network, and the network coverage of the second network is smaller than that of the first network.
[0164] The serial numbers of the embodiments of the present invention above are only for description and do not represent the advantages or disadvantages of the embodiments.
[0165] In the above embodiments of the present invention, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0166] In several embodiments provided in the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the units or modules can be in an electrical or other form.
[0167] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0168] In addition, in each embodiment of the present invention, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0169] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs.
[0170] The foregoing are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A method for updating device status, characterized in that, comprising: sending a control command to a plurality of Internet of Things devices via a main gateway, wherein the main gateway and the plurality of Internet of Things devices form a first network, and the control command is used to adjust the device status of each Internet of Things device in the plurality of Internet of Things devices; receiving feedback messages from each of a plurality of sub - gateways respectively, wherein the feedback messages are used to feedback the current device status of each Internet of Things device in a part of the Internet of Things devices corresponding to each of the plurality of sub - gateways to a cloud server, and the information carried in the feedback messages includes: the current device status of each Internet of Things device in the plurality of Internet of Things devices, each of the plurality of sub - gateways and a part of the Internet of Things devices in the plurality of Internet of Things devices form a second network, and the network coverage of the second network is smaller than the network coverage of the first network; updating the historical device status of each Internet of Things device in the plurality of Internet of Things devices to the current device status on the cloud server.
2. The device status updating method according to claim 1, characterized in that, the device status updating method further comprises: sending a first notification message to at least one terminal device, wherein the first notification message is used to notify the at least one terminal device to update the historical device status stored locally to the current device status.
3. The device status updating method according to claim 1, characterized in that, sending the control command to the plurality of Internet of Things devices via the main gateway comprises: searching for and selecting the main gateway; sending a second notification message to the main gateway, wherein the information carried in the second notification message includes: the control command, and the second notification message is used to notify the main gateway to forward the control command to the plurality of Internet of Things devices.
4. The device status updating method according to claim 1, characterized in that, the plurality of sub - gateways include: a first sub - gateway and a second sub - gateway, the plurality of Internet of Things devices include: a first number of first Internet of Things devices and a second number of second Internet of Things devices, and respectively receiving the feedback messages from each of the plurality of sub - gateways includes: receiving the feedback message from the first sub - gateway, wherein the feedback message is used to feedback the current device status of each of the first number of first Internet of Things devices corresponding to the first sub - gateway; receiving the feedback message from the second sub - gateway, wherein the feedback message is used to feedback the current device status of each of the second number of second Internet of Things devices corresponding to the second sub - gateway.
5. A method for updating device status, characterized in that, comprising: receiving a control command from a cloud server via a main gateway, wherein the main gateway and a plurality of Internet of Things devices form a first network, and the control command is used to adjust the device status of each Internet of Things device in the plurality of Internet of Things devices; Based on the control command, update the historical device state of each Internet of Things device among the multiple Internet of Things devices to the current device state; Determine the sub-gateway corresponding to each Internet of Things device among the multiple Internet of Things devices from multiple sub-gateways; control each Internet of Things device among the multiple Internet of Things devices to broadcast a feedback message to the corresponding sub-gateway, so that the cloud server updates the historical device state of each Internet of Things device among the multiple Internet of Things devices to the current device state, wherein the feedback message is used to feedback the current device state of each Internet of Things device among the partial Internet of Things devices corresponding to each sub-gateway among the multiple sub-gateways, and the information carried in the feedback message includes: the current device state of each Internet of Things device among the multiple Internet of Things devices, each sub-gateway among the multiple sub-gateways and partial Internet of Things devices among the multiple Internet of Things devices form a second network, and the network coverage of the second network is smaller than the network coverage of the first network.
6. The device state update method according to claim 5, characterized in that the multiple sub-gateways include: a first sub-gateway and a second sub-gateway, the multiple Internet of Things devices include: a first number of first Internet of Things devices and a second number of second Internet of Things devices, and controlling each Internet of Things device among the multiple Internet of Things devices to broadcast the feedback message to the corresponding sub-gateway includes: controlling each of the first number of first Internet of Things devices to broadcast the feedback message to the corresponding first sub-gateway, wherein the feedback message is used to feedback the current device state of each of the first number of first Internet of Things devices; controlling each of the second number of second Internet of Things devices to broadcast the feedback message to the corresponding second sub-gateway, wherein the feedback message is used to feedback the current device state of each of the second number of second Internet of Things devices.
7. A device state update device, characterized in that it includes: a sending module, configured to send a control command to multiple Internet of Things devices via a main gateway, wherein the main gateway and the multiple Internet of Things devices form a first network, and the control command is used to adjust the device state of each Internet of Things device among the multiple Internet of Things devices; a receiving module, configured to respectively receive feedback messages from each sub-gateway among multiple sub-gateways, wherein the feedback message is used to feedback the current device state of each Internet of Things device among the partial Internet of Things devices corresponding to each sub-gateway among the multiple sub-gateways, and the information carried in the feedback message includes: the current device state of each Internet of Things device among the multiple Internet of Things devices, each sub-gateway among the multiple sub-gateways and partial Internet of Things devices among the multiple Internet of Things devices form a second network, and the network coverage of the second network is smaller than the network coverage of the first network; an updating module, configured to update the historical device state of each Internet of Things device among the multiple Internet of Things devices to the current device state on the cloud server.
8. An apparatus for updating device status, characterized in that, comprising: a receiving module, configured to receive a control command from a cloud server via a main gateway, wherein the main gateway and a plurality of Internet of Things devices form a first network, and the control command is used to adjust the device status of each of the plurality of Internet of Things devices; an updating module, configured to update the historical device status of each of the plurality of Internet of Things devices to the current device status based on the control command; a reporting module, configured to determine, from a plurality of sub - gateways, the sub - gateway corresponding to each of the plurality of Internet of Things devices; control each of the plurality of Internet of Things devices to broadcast a feedback message to the corresponding sub - gateway, so that the cloud server updates the historical device status of each of the plurality of Internet of Things devices to the current device status, wherein the feedback message is used to feedback the current device status of each of the Internet of Things devices corresponding to a part of the plurality of sub - gateways to the cloud server, and the information carried in the feedback message includes: the current device status of each of the plurality of Internet of Things devices, each of the plurality of sub - gateways and a part of the plurality of Internet of Things devices form a second network, and the network coverage of the second network is smaller than the network coverage of the first network.
9. A computer - readable storage medium, characterized in that, the computer - readable storage medium stores a computer program, wherein the computer program is configured to execute the device status updating method according to any one of claims 1 to 6 when being run by a processor.
10. An electronic device, comprising a memory and a processor, characterized in that, the memory stores a computer program, and the processor is configured to run the computer program to execute the device status updating method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Control method of smart home equipment, smart home system and gateway thereof
CN111913450A