Device state reporting method, system, apparatus, device and storage medium

By polling IoT devices through the central control device and selecting status reporting devices based on the network connection status, the server pressure problem caused by the large number of IoT devices is solved, and efficient device status reporting is achieved.

CN119629225BActive Publication Date: 2025-10-17GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411771688.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-10-17
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

Due to the large number of IoT devices, the server is under great pressure to determine the device status of each IoT device. The existing technology causes excessive burden on the server through polling.

Method used

The central control device polls the IoT devices in the local area network, detects the network connection status between the local area network and the Internet, determines the status reporting device, sends the device status to the corresponding status reporting device, and the status reporting device reports to the cloud server, reducing the polling pressure on the cloud server.

Benefits of technology

The central control device reports the device status in a centralized manner, which reduces the polling pressure on the cloud server, shortens the polling time of the cloud server, and ensures the normal update of the IoT device status on the cloud server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629225B_ABST
    Figure CN119629225B_ABST
Patent Text Reader

Abstract

The application relates to a device state reporting method, system, device and storage medium. The method comprises the following steps: a central control device determines the device state of an Internet of Things device by polling the Internet of Things device in a local area network; the network connection state between the local area network and the Internet is detected; a state reporting device corresponding to the network connection state is determined; the device state of the Internet of Things device is sent to the state reporting device, so that the state reporting device reports the device state of the Internet of Things device to a cloud server in the Internet. According to the embodiment of the application, the central control device polls the device state of each Internet of Things device and uses the state reporting device corresponding to the current network connection state to report the cloud server in batches, so that the cloud server can know the device state of each Internet of Things device in the local area network of the central control device by polling the central control device, the cloud server does not need to poll a large number of Internet of Things devices, the polling pressure of the cloud server is reduced, and the polling time of the cloud server is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, and in particular to a device state reporting method, system, device, and storage medium. BACKGROUND

[0002] With the continuous progress of science and technology, smart home technology has emerged as the times require. Smart home technology refers to the use of information technology and Internet of Things (IoT) technology to connect traditional Internet of Things devices with the Internet, thereby realizing an automated, intelligent, and convenient home management and control system.

[0003] In order to achieve the purpose of remotely monitoring Internet of Things devices, the server needs to know whether the device state of the Internet of Things device is online or offline. At present, the device state of the Internet of Things device is determined by the server polling the Internet of Things device. Specifically, the server can send a heartbeat packet to the Internet of Things device at the arrival of each heartbeat period, and if a response packet returned by the Internet of Things device is received within the heartbeat period, it can be determined that the Internet of Things device is online; if no response packet returned by the Internet of Things device is received within the heartbeat period, it can be determined that the Internet of Things device is offline. However, due to the excessively large number of Internet of Things devices, the number of Internet of Things devices that need to be polled by the server when determining the device state of each Internet of Things device is excessively large, resulting in a large pressure on the server. SUMMARY

[0004] The present application provides a device state reporting method, system, device, and storage medium to solve the problem of excessive pressure on the server when determining the device state of each Internet of Things device due to the excessively large number of Internet of Things devices.

[0005] To solve the above technical problems, the technical solution of the present application is as follows:

[0006] The present application provides a device state reporting method, which is applied to a central control device, comprising: determining the device state of an Internet of Things device in a local area network by polling the Internet of Things device; detecting the network connection state between the local area network and the Internet; determining a state reporting device corresponding to the network connection state; and sending the device state of the Internet of Things device to the state reporting device, so that the state reporting device reports the device state of the Internet of Things device to a cloud server in the Internet.

[0007] The determining of the network connection state corresponding state reporting device comprises: if the network connection state is a disconnection state, establishing a communication connection with a user terminal accessing the local area network and determining the user terminal as the state reporting device; and if the network connection state is a normal connection state, determining a communication module connecting the local area network and the Internet as the state reporting device.

[0008] The sending of the device state of the Internet of Things device to the state reporting device, and the reporting of the device state of the Internet of Things device to the cloud server in the Internet by the state reporting device comprises: if the network connection state corresponding state reporting device is a user terminal, sending the device state of the Internet of Things device to the user terminal, and reporting the device state of the Internet of Things device to the cloud server by the user terminal through a data network; and if the network connection state corresponding state reporting device is a communication module, after receiving a first heartbeat packet from the cloud server forwarded by the communication module, sending the device state of the Internet of Things device to the communication module, and reporting the device state of the Internet of Things device to the cloud server by the communication module through the Internet.

[0009] The application further provides a device state reporting method applied to a cloud server, comprising: receiving a device state of an Internet of Things device reported by a state reporting device; wherein the device state of the Internet of Things device is sent by a central control device in a local area network to the state reporting device; determining a network connection state between the local area network and the Internet; and updating device state information corresponding to the Internet of Things device according to the device state of the Internet of Things device and the network connection state.

[0010] The determining of the network connection state between the local area network and the Internet comprises: if it is determined that the state reporting device is a user terminal accessing the local area network, determining that the network connection state is a disconnection state; and if it is determined that the state reporting device is a communication module connecting the Internet and the local area network, determining that the network connection state is a normal connection state.

[0011] The determining of the network connection state between the local area network and the Internet comprises: sending a first heartbeat packet to a central control device in the local area network through the communication module; if a first response packet returned by the central control device is received, determining that the network connection state is a normal connection state; otherwise, sending a second heartbeat packet to the Internet of Things device through the communication module; and if a second response packet returned by the Internet of Things device through the communication module is not received, determining that the network connection state is a disconnection state.

[0012] The embodiment of the present application also provides a device state reporting system, which comprises an Internet of Things device, a central control device, a state reporting device and a cloud server; wherein the Internet of Things device, the central control device and the state reporting device access the same local area network, and the cloud server accesses the Internet; the central control device determines the device state of the Internet of Things device by polling the Internet of Things device in the local area network, detects the network connection state between the local area network and the Internet, determines the state reporting device corresponding to the network connection state, and sends the device state of the Internet of Things device to the state reporting device, so that the state reporting device reports the device state of the Internet of Things device to the cloud server in the Internet; the cloud server receives the device state of the Internet of Things device reported by the state reporting device; wherein the device state of the Internet of Things device is sent by the central control device in the local area network to the state reporting device; the network connection state between the local area network and the Internet is determined; and the device state information corresponding to the Internet of Things device is updated according to the device state of the Internet of Things device and the network connection state.

[0013] The embodiment of the present application also provides a device state reporting device, which is arranged in a central control device and comprises a first determination module, a detection module, a second determination module and a reporting module; the first determination module is used for determining the device state of an Internet of Things device by polling the Internet of Things device in a local area network; the detection module is used for detecting the network connection state between the local area network and the Internet; the second determination module is used for determining the state reporting device corresponding to the network connection state; and the reporting module is used for sending the device state of the Internet of Things device to the state reporting device, so that the state reporting device reports the device state of the Internet of Things device to a cloud server in the Internet; a device state reporting device arranged in a cloud server comprises a receiving module, a third determination module and an updating module; the receiving module is used for receiving the device state of the Internet of Things device reported by the state reporting device; wherein the device state of the Internet of Things device is sent by the central control device in the local area network to the state reporting device; the third determination module is used for determining the network connection state between the local area network and the Internet; and the updating module is used for updating the device state information corresponding to the Internet of Things device according to the device state of the Internet of Things device and the network connection state.

[0014] The embodiment of the present application also provides a device state reporting device, which comprises at least one communication interface, at least one bus connected with the at least one communication interface, at least one processor connected with the at least one bus, and at least one memory connected with the at least one bus; wherein the processor is configured to execute a device state reporting program stored in the memory, so as to implement any one of the device state reporting methods performed by a central control device or any one of the device state reporting methods performed by a cloud server.

[0015] The application further provides a computer readable storage medium storing computer executable instructions, which are executed to implement any of the above-mentioned device state reporting methods performed by a central control device, or to implement any of the above-mentioned device state reporting methods performed by a cloud server.

[0016] Compared with the prior art, the above technical solution provided by the embodiments of the application has the following advantages: the method provided by the embodiments of the application determines the device state of an Internet of Things device in a local area network through polling by a central control device; detects the network connection state between the local area network and the Internet; determines a state reporting device corresponding to the network connection state; and sends the device state of the Internet of Things device to the state reporting device, so that the state reporting device reports the device state of the Internet of Things device to a cloud server in the Internet. The central control device polls the device state of each Internet of Things device and uses the state reporting device corresponding to the current network connection state to report the cloud server in a centralized manner, so that the cloud server can learn the device state of each Internet of Things device in the local area network in which the central control device is located, without polling a large number of Internet of Things devices, thereby reducing the polling pressure on the cloud server and shortening the polling time of the cloud server. BRIEF DESCRIPTION OF DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and serve to explain the principles of the application together with the specification.

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, brief introductions to the drawings needed in the embodiments or the prior art description will be given in the following. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

[0019] One or more embodiments are illustrated by way of example in the drawings that are for illustrative purposes only, and are not intended to limit the embodiments to the specific embodiments shown, unless otherwise specifically indicated. In the drawings, elements having the same reference number designate similar elements, unless otherwise specifically indicated. The drawings in the accompanying drawings are not to scale.

[0020] Figure 1 FIG. 1 is a structural schematic diagram of a device state reporting system according to an embodiment of the application;

[0021] Figure 2 FIG. 2 is a flowchart of a device state reporting method performed by a central control device according to an embodiment of the application;

[0022] Figure 3 FIG. 1 is a flowchart of a device state reporting method performed at a cloud server according to an embodiment of the present application;

[0023] Figure 4 FIG. 2 is a flowchart of a step of determining a network connection state according to an embodiment of the present application;

[0024] Figure 5 FIG. 3 is a schematic diagram of a smart home application scenario according to an embodiment of the present application;

[0025] Figure 6 FIG. 4 is a structural diagram of a device state reporting apparatus provided at a central control device according to an embodiment of the present application;

[0026] Figure 7 FIG. 5 is a structural diagram of a device state reporting apparatus provided at a cloud server according to an embodiment of the present application;

[0027] Figure 8 FIG. 6 is a structural diagram of a device state reporting device according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0029] The following disclosure provides many different embodiments, or examples, for implementing different structures of the present application. For the purpose of simplicity and clarity, the description in the following text describes the components and settings of specific examples. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeatedly refer to the numbers and / or letters in different examples. Such repetition is for the purpose of simplification and clarity, and it does not indicate the relationship between the various embodiments and / or settings discussed.

[0030] The embodiments of the present application provide a device state reporting system. As shown in FIG. 1, a structural schematic diagram of a device state reporting system according to an embodiment of the present application is shown. Figure 1

[0031] The device state reporting system comprises an Internet of Things device, a central control device, a state reporting device and a cloud server; wherein the Internet of Things device, the central control device and the state reporting device are connected to the same local area network, and the cloud server is connected to the Internet.

[0032] ​Further, the local area network includes, but is not limited to, a local area network composed of Internet of Things devices in a family, a local area network composed of Internet of Things devices in a building. The central control device can be a separately arranged device, or one of the Internet of Things devices in the local area network can be selected as the central control device.

[0033] Further, the types of state reporting devices include communication modules and user terminals. The types of communication modules include, but are not limited to, WiFi modules, routers, and network access point devices. The communication modules are used to build a local area network, and in one local area network, at least one central control device is included, and each central control device corresponds to at least one Internet of Things device. In order to make the embodiments of the present application easier to understand, the following describes a case of one local area network, and for the case of multiple local area networks, other local area networks can refer to the embodiments of the present application to perform reporting of device states.

[0034] The central control device determines the device state of the Internet of Things device by polling the Internet of Things device in the local area network, detects the network connection state between the local area network and the Internet, determines the state reporting device corresponding to the network connection state, and sends the device state of the Internet of Things device to the state reporting device, so that the state reporting device reports the device state of the Internet of Things device to the cloud server in the Internet.

[0035] The cloud server receives the device state of the Internet of Things device reported by the state reporting device, wherein the device state of the Internet of Things device is sent by the central control device in the local area network to the state reporting device, determines the network connection state between the local area network and the Internet, and updates the historical device state corresponding to the Internet of Things device according to the device state of the Internet of Things device and the network connection state.

[0036] Further, the types of network connection states include a disconnected state and a normal connection state. The disconnected state indicates that the local area network and the Internet have been disconnected. The normal connection state indicates that the connection between the local area network and the Internet is normal.

[0037] Further, the state reporting device is a communication module or a user terminal in the local area network. The user terminal can communicate with the cloud server in the Internet through a data network. The communication module is used to connect the local area network and the Internet, and can directly communicate with the cloud server through the Internet. When the network connection state is the disconnected state, the state reporting device is the user terminal. When the network connection state is the normal connection state, the state reporting device is the communication module.

[0038] In the embodiment of the present application, the central control device constructs a distributed system, and determines the device states of the Internet of Things devices by polling and reports the device states of the Internet of Things devices in a centralized manner, which can avoid the problem of excessive polling pressure of the cloud server caused by polling a large number of Internet of Things devices, reduce the polling pressure of the server, and shorten the polling time of the cloud server. Further, in order to avoid the problem of disconnection between the local area network and the Internet where the cloud server is located, the device state of the Internet of Things device can be reported to the cloud server through the communication module when the network connection state between the local area network and the Internet is a normal connection state, and the device state of the Internet of Things device can be reported to the cloud server through the user terminal when the network connection state between the local area network and the Internet is a disconnected state, based on which the normal updating of the device state of the Internet of Things device in the cloud server can be ensured.

[0039] The steps performed by the central control device and the cloud server are described below.

[0040] The embodiment of the present application provides a device state reporting method performed by a central control device. As shown in Figure 2 The flowchart of the device state reporting method performed by the central control device according to an embodiment of the present application is shown in

[0041] In step S210, the device state of the Internet of Things device is determined by polling the Internet of Things device in the local area network.

[0042] The central control device and each Internet of Things device can form a local area network after connecting to the communication module respectively; the central control device can establish a network connection with each Internet of Things device in the local area network, and poll each Internet of Things device to determine the device state of each Internet of Things device.

[0043] The types of device states include online state and offline state. The Internet of Things device in the online state indicates that the Internet of Things device can receive and execute the control instruction issued by the cloud server. The Internet of Things device in the offline state indicates that the Internet of Things device cannot receive and execute the control instruction issued by the cloud server.

[0044] Specifically, the time length of the secondary heartbeat period is set in advance. The central control device can send a secondary heartbeat packet to one of the Internet of Things devices at the arrival of each secondary heartbeat period; if a secondary response packet returned by the Internet of Things device is received in the secondary heartbeat period, it is determined that the device state of the Internet of Things device is in the online state; if the secondary response packet returned by the Internet of Things device is not received in the secondary heartbeat period, it is determined that the device state of the Internet of Things device is in the offline state.

[0045] In step S220, the network connection state between the local area network and the Internet is detected.

[0046] The kind of network connection state includes: a disconnected state and a normal connection state.

[0047] The disconnected state indicates that the local area network and the Internet are disconnected, that is, the communication module and the cloud server have been disconnected and cannot communicate. In the embodiment of the application, in the disconnected state, that is, in the case that the local area network and the Internet are disconnected, the communication module can work normally. In the disconnected state, the communication module can work normally, which may be caused by the problem that the communication module cannot connect to the Internet due to the loosening of the network cable.

[0048] The normal connection state indicates that the local area network and the Internet are normally connected, that is, the connection between the communication module and the cloud server is normal and has not been disconnected, and communication can be carried out normally.

[0049] Specifically, the central control device can send a network connection state inquiry message to the communication module, and receive a network connection state response message returned by the communication module, wherein the network connection state carried in the network connection state response message is the disconnected state or the normal connection state. Alternatively, in the case that the network connection state is the normal connection state, the central control device can receive a first heartbeat packet sent by the cloud server through the communication module every preset time period. If the first heartbeat packet sent by the cloud server through the communication module is not received, it is determined that the network connection state is the disconnected state. If the first heartbeat packet sent by the cloud server through the communication module is received, it is determined that the network connection state is the normal connection state.

[0050] Step S230: determining a state reporting device corresponding to the network connection state.

[0051] If the network connection state is the disconnected state, a communication connection is established with a user terminal accessing the local area network, and the user terminal is determined as the state reporting device.

[0052] If the network connection state is the normal connection state, the communication module used to connect the local area network and the Internet is determined as the state reporting device.

[0053] Step S240: sending a device state of the Internet of Things device to the state reporting device, so that the state reporting device reports the device state of the Internet of Things device to the cloud server in the Internet.

[0054] If the state reporting device corresponding to the network connection state is a user terminal, the device state of the Internet of Things device is sent to the user terminal, so that the user terminal reports the device state of the Internet of Things device to the cloud server through a data network.

[0055] If the network connection state corresponds to a state reporting device of the communication module, after receiving the first heartbeat packet from the cloud server forwarded by the communication module, the device state of the Internet of Things device is sent to the communication module, so that the communication module reports the device state of the Internet of Things device to the cloud server through the Internet.

[0056] In the embodiment of the application, the Internet of Things device in the local area network where the control device is located can be multiple. The control device can send the device state corresponding to each of the multiple Internet of Things devices to the state reporting device, so that the state reporting device reports the device state corresponding to each of the multiple Internet of Things devices to the cloud server. Alternatively, the control device can send the device state corresponding to the Internet of Things device with device state switching among the multiple Internet of Things devices to the state reporting device, so that the state reporting device reports the device state corresponding to the Internet of Things device with device state switching to the cloud server. The device state switching refers to the device state of the Internet of Things device switching from the offline state to the online state, or switching from the online state to the offline state.

[0057] Further, the control device can store the device state corresponding to each of the Internet of Things devices determined in the previous polling; determine the Internet of Things device with device state switching according to the device state corresponding to each of the Internet of Things devices determined in the previous polling and the device state corresponding to each of the Internet of Things devices determined in the current polling; and send the device state corresponding to each of the Internet of Things devices with device state switching to the state reporting device, so that the state reporting device reports the device state corresponding to each of the Internet of Things devices with device state switching to the cloud server.

[0058] In the embodiment of the application, the control device can generate a device state list; the device state list is used to record the device state corresponding to each of the multiple Internet of Things devices or the device state of the Internet of Things device with device state switching among the multiple Internet of Things devices; and the control device can send the device state list to the state reporting device, so that the state reporting device reports the device state list to the cloud server.

[0059] In the embodiment of the application, since the control device can be a device separately arranged in the local area network or an Internet of Things device in the local area network, when the control device determines the device state of the Internet of Things device by polling the Internet of Things device in the local area network, the control device can determine the device state of the control device itself and report the device state of the control device itself to the cloud server through the state reporting device together with the device state of the other Internet of Things devices; and after receiving the device state of the control device, the cloud server can update the device state information corresponding to the control device.

[0060] In the embodiment of the present application, the central control device determines the device status of the Internet of Things device in the local area network by polling the Internet of Things device, detects the network connection state between the local area network and the Internet, determines the state reporting device corresponding to the network connection state, and sends the device status of the Internet of Things device to the state reporting device, so that the state reporting device reports the device status of the Internet of Things device to the cloud server in the Internet. The central control device in the embodiment of the present application polls the device status of each Internet of Things device and uses the state reporting device corresponding to the current network connection state to report the cloud server in a centralized manner. The cloud server can obtain the device status of each Internet of Things device in the local area network in which the central control device is located by polling the central control device, without polling a large number of Internet of Things devices, thereby reducing the polling pressure of the cloud server and shortening the polling time of the cloud server.

[0061] Based on the above-mentioned reporting method of the device status performed by the central control device, the embodiment of the present application further provides a reporting method of the device status performed by the cloud server. As shown in Figure 3 the flowchart of the reporting method of the device status performed by the cloud server according to an embodiment of the present application.

[0062] In step S310, the device status of the Internet of Things device reported by the state reporting device is received; wherein the device status of the Internet of Things device is sent by the central control device in the local area network to the state reporting device.

[0063] The state reporting device can be a user terminal or a communication module connected to the local area network.

[0064] In the embodiment of the present application, the cloud server can receive the device status corresponding to each of a plurality of Internet of Things devices in the local area network or the device status corresponding to an Internet of Things device having a device status switch in the plurality of Internet of Things devices reported by the state reporting device.

[0065] Further, the cloud server can receive a device status list reported by the state reporting device; the device status request is used to record the device status corresponding to each of a plurality of Internet of Things devices or the device status of an Internet of Things device having a device status switch in the plurality of Internet of Things devices.

[0066] In step S320, the network connection state between the local area network and the Internet is determined.

[0067] In one way, the cloud server can determine the network connection state by identifying the type of the state reporting device. Specifically, if it is determined that the state reporting device is a user terminal connected to the local area network, it is determined that the network connection state is a disconnected state. If it is determined that the state reporting device is a communication module for connecting the Internet and the local area network, it is determined that the network connection state is a normal connection state.

[0068] In another way, the cloud server can poll the central control device and the Internet of Things device through the Internet to determine the network connection state. This way will be described later, so it is not described again.

[0069] In step S330, the device state information corresponding to the Internet of Things device is updated according to the device state of the Internet of Things device and the network connection state.

[0070] The device state information at least includes the following information: the device state of the Internet of Things device and the device state reporting source information. The device state reporting source information is the device information of the state reporting device or the network connection state.

[0071] The cloud server stores the device state information corresponding to the Internet of Things device in the storage space; updates the stored device state of the Internet of Things device according to the device state of the Internet of Things device received this time; and updates the device state reporting source information of the Internet of Things device according to the network connection state this time.

[0072] In the embodiment of the application, after the cloud server updates the device state information corresponding to the Internet of Things device, the cloud server can send the device state of the Internet of Things device to the user terminal, so that the user can view the device state of the Internet of Things device through the user terminal.

[0073] In the embodiment of the application, the cloud server receives the control parameter information of the Internet of Things device sent by the user terminal, generates the control instruction of the Internet of Things device according to the control parameter information, queries the device state information of the Internet of Things device, determines the device state of the Internet of Things device as online according to the device state information, determines the instruction issuing device according to the device state reporting source information of the Internet of Things device, sends the control instruction to the Internet of Things device through the instruction issuing device, and the control parameter information is used to adjust the operating parameter of the Internet of Things device. In the case where the device state of the Internet of Things device is determined as offline according to the device state information, the Internet of Things device has been offline notification is sent to the user terminal.

[0074] Further, the control instruction is sent to the Internet of Things device through the instruction issuing device, which includes: the control instruction is sent to the instruction issuing device, so that the instruction issuing device directly sends the control instruction to the Internet of Things device, or the instruction issuing device sends the control instruction to the central control device, and the central control device sends the control instruction to the Internet of Things device.

[0075] Further, when the device state reporting source information is the communication module or the normal connection state, the communication module is determined as the instruction issuing device, and the control instruction is sent to the Internet of Things device through the communication module; when the device state reporting source information is the user terminal or the disconnection state, the user terminal is determined as the instruction issuing device, and the control instruction is sent to the Internet of Things device through the user terminal.

[0076] For example, a user wants to adjust the refrigeration temperature of an air conditioner, and adjusts the refrigeration temperature of the air conditioner to 20℃ in the user terminal. The user terminal can send the information (control parameter information) that the refrigeration temperature of the air conditioner is adjusted to 20℃ to the cloud server. The cloud server generates a control instruction according to the control parameter information and queries the device state information corresponding to the air conditioner. If the device state of the air conditioner is an online state, and the device state reporting source information is the communication module, the control instruction is sent to the air conditioner through the communication module.

[0077] The process of determining the network connection state by polling the central control device and the Internet of Things device is described below. As shown in FIG. 6, it is a step flow chart of determining the network connection state according to an embodiment of the present application. Figure 4

[0078] In step S410, a first heartbeat packet is sent to the central control device in the local area network through the communication module.

[0079] In step S420, it is determined whether a first response packet returned by the central control device through the communication module is received. If yes, step S430 is performed; if no, step S440 is performed.

[0080] In step S430, if the first response packet returned by the central control device is received, it is determined that the network connection state is a normal connection state.

[0081] In step S440, if the first response packet returned by the central control device is not received, a second heartbeat packet is sent to the Internet of Things device through the communication module.

[0082] If the central control device corresponds to multiple Internet of Things devices, the second heartbeat packet is sent to the multiple Internet of Things devices through the communication module respectively. Further, the second heartbeat packet can be sent to the multiple Internet of Things devices through the communication module respectively in a polling manner.

[0083] In step S450, it is determined whether a second response packet returned by the Internet of Things device through the communication module is received. If yes, step S460 is performed; if no, step S470 is performed.

[0084] ​Step S460: If a secondary response packet is received from the IoT device through the communication module, the IoT device in the local area network is polled through the communication module to determine the device status of the IoT device and update the device status information corresponding to the IoT device.

[0085] If a secondary response packet is received from an IoT device, it means that the local area network and the Internet can communicate normally, but the central control device fails. You can temporarily bypass the central control device and poll each IoT device in the local area network to determine the device status of each IoT device and update the device status information of each IoT device.

[0086] Types of central control device failures include: the central control device is damaged, the central control device is reset and network configuration has not yet been completed. After the central control device failure is eliminated, the central control device can normally receive the secondary response packet returned by the communication module.

[0087] In this case, the device status reporting source information in the device status information may be the communication module or the normal connection status.

[0088] Step S470: If the secondary response packet returned by the IoT device through the communication module is not received, it is determined that the network connection state is a disconnected state.

[0089] If no secondary response packet is received from the IoT device, it indicates that the local area network and the Internet cannot communicate normally. Furthermore, if the central control device corresponds to multiple IoT devices, if no secondary response packet is received from the multiple IoT devices via the communication module, the network connection state is determined to be disconnected.

[0090] In order to make the embodiments of the present application easier to understand, the device status reporting method of the embodiments of the present application is described below in conjunction with specific smart home application scenarios.

[0091] like Figure 5 , which is a schematic diagram of a smart home application scenario according to an embodiment of the present application.

[0092] In the smart home application scenario, the device status reporting system includes: cloud server, WiFi module (i.e. communication module), user terminal, home host (i.e. central control device) and Internet of Things device (i.e. Internet of Things device).

[0093] A communication module is used to establish a local area network (LAN), which includes at least one central control device. Each central control device corresponds to at least one IoT device. Furthermore, in a smart home application scenario, the WiFi module, each home host, and each IoT device corresponding to each home host are connected to the same LAN.

[0094] In the smart home application scenario, the Internet of Things device supports WiFi protocol, Message Queuing Telemetry Transport (MQTT) protocol, Bluetooth Low Energy (BLE) protocol for communication, and can be normally configured and controlled through the application program (APP) of the user terminal and the instruction is issued. The home host can normally communicate with the Internet of Things device, and the home host has the right to report the device status of the Internet of Things device to the cloud server. The home host and all Internet of Things devices can be configured through the WiFi module and can view the device information through the APP.

[0095] In the case of normal WiFi module, the WiFi module can normally connect to the local area network and the Internet, so that all devices can normally connect to the Internet.

[0096] In the case of normal WiFi module, the device status of the home host and the device status of other Internet of Things devices are pushed by the home host. Specifically, because the cloud server checks whether the Internet of Things device is online through polling, when the number of Internet of Things devices is too large, the cloud server sends a first heartbeat packet to each Internet of Things device, which is too large in pressure and has a large time cost in waiting for the first response packet returned by each Internet of Things device. The embodiment of the application uses the home host to build a distributed system, uses the home host as a key node in the distributed system, and uses the home host to poll the device status of each Internet of Things device and store it in the storage space of the home host. When the Internet of Things device, the home host and the WiFi module can normally access the Internet, the polling message (first heartbeat packet) of the cloud server will be sent to the home host through the WiFi module, and the home host will report the device status of the Internet of Things device stored in the storage space to the cloud server, so that the cloud server updates the device status information of the Internet of Things device using the received device status of the Internet of Things device. After the cloud server completes the update, it can send the updated device status of the Internet of Things device to the user terminal, so that the user can view the current device status of the Internet of Things device. Further, in order to improve the reporting efficiency, the home host can only report the device status of the Internet of Things device whose device status has changed to the cloud server through the WiFi module.

[0097] In the case of WiFi module exception, the WiFi module cannot normally connect to the local area network and the Internet, and the local area network and the Internet are disconnected, so that all devices in the local area network cannot connect to the Internet. Further, the WiFi module exception can be caused by the disconnection of the network cable of the WiFi module, etc. The WiFi module can normally work, but cannot connect to the Internet. At this time, the WiFi module, the home host and the Internet of Things device corresponding to the home host form a local area network.

[0098] In the case of WiFi module exception, the home host and the Internet of Things device can normally communicate with the WiFi module. At this time, the home host can be used as an offline home host, and the home host and the Internet of Things device can communicate through the BLE protocol. When the home host and the Internet of Things device can normally communicate, the home host marks the device state of the Internet of Things device in the device state list as "online", but at this time, since the cloud server does not receive the first level response packet pushed by the key node (the home host), the cloud server will traverse the Internet of Things devices under the home host respectively, that is, poll each Internet of Things device corresponding to the central control device. If no response packet is received, these Internet of Things devices can be marked as "offline" first. At this time, if the user terminal accesses the local area network, when the user opens the preset APP in the user terminal, the user terminal can establish a communication connection with the home host through offline authentication, and the home host reports the device state of the Internet of Things device stored in the storage space to the user terminal. The user terminal uses mobile phone traffic to report the device state of the Internet of Things device to the cloud server, and the cloud server marks the device data of this type, that is, the user terminal reports the device state of the Internet of Things device because the WiFi module cannot connect to the Internet, and the device state of the Internet of Things device is reported through data traffic. Further, in order to improve the reporting efficiency, the home host can only report the device state of the Internet of Things device whose device state has changed to the cloud server through the user terminal.

[0099] In the smart home application scenario, it is assumed that each family has several air conditioners, multiple smart sockets, multiple smart switches, an ice washing machine and many other electrical appliances. At this time, the number of device states that each family needs to report is dozens or even hundreds. At this time, the home host can effectively reduce the order of magnitude of the reported device states, and effectively reduce the polling pressure and polling time of the cloud server by reporting the device states of the Internet of Things devices.

[0100] The application embodiment also provides a device state reporting device arranged in a central control device. As shown in Figure 6 the device state reporting device arranged in the central control device according to an embodiment of the application is a structural diagram.

[0101] The device state reporting apparatus arranged in the central control device comprises:

[0102] The first determination module 610 is configured to determine the device state of the Internet of Things device by polling the Internet of Things device in the local area network.

[0103] The detection module 620 is configured to detect the network connection state between the local area network and the Internet.

[0104] The second determination module 630 is configured to determine the state reporting device corresponding to the network connection state.

[0105] The reporting module 640 is configured to send the device state of the Internet of Things device to the state reporting device, so that the state reporting device reports the device state of the Internet of Things device to the cloud server in the Internet.

[0106] The functions of the apparatus described in the embodiments of the present application have been described in the above method embodiments, and thus the descriptions of the embodiments that are not described in detail can be referred to the relevant descriptions in the foregoing embodiments, which will not be repeated here.

[0107] The embodiments of the present application further provide a device state reporting apparatus arranged in a cloud server. Figure 7 As shown in the figure, it is a structural diagram of the device state reporting apparatus arranged in the cloud server according to an embodiment of the present application.

[0108] The device state reporting apparatus arranged in the cloud server comprises:

[0109] The receiving module 710 is configured to receive the device state of the Internet of Things device reported by the state reporting device; wherein the device state of the Internet of Things device is sent by the central control device in the local area network to the state reporting device.

[0110] The third determination module 720 is configured to determine the network connection state between the local area network and the Internet.

[0111] The updating module 730 is configured to update the device state information corresponding to the Internet of Things device according to the device state of the Internet of Things device and the network connection state.

[0112] The functions of the apparatus described in the embodiments of the present application have been described in the above method embodiments, and thus the descriptions of the embodiments that are not described in detail can be referred to the relevant descriptions in the foregoing embodiments, which will not be repeated here.

[0113] The embodiments of the present application further provide a device state reporting apparatus, as shown in the figure, it is a structural diagram of the device state reporting apparatus according to an embodiment of the present application. Figure 8

[0114] ​The reporting device of the device state comprises a processor 810, a communication interface 820, a memory 830 and a communication bus 840. The processor 810, the communication interface 820 and the memory 830 complete mutual communication through the communication bus 840.

[0115] The memory 830 is used for storing a computer program.

[0116] In an embodiment of the present application, the processor 810 is used for executing the program stored in the memory 830, and realizes the reporting method of the device state executed by the central control device provided in any one of the preceding method embodiments, comprising: determining the device state of an Internet of Things device in a local area network by polling the Internet of Things device; detecting a network connection state between the local area network and the Internet; determining a state reporting device corresponding to the network connection state; and sending the device state of the Internet of Things device to the state reporting device, so that the state reporting device reports the device state of the Internet of Things device to a cloud server in the Internet.

[0117] The determination of the state reporting device corresponding to the network connection state comprises: if the network connection state is a disconnection state, establishing a communication connection with a user terminal accessing the local area network and determining the user terminal as the state reporting device; and if the network connection state is a normal connection state, determining a communication module connecting the local area network and the Internet as the state reporting device.

[0118] The sending of the device state of the Internet of Things device to the state reporting device, so that the state reporting device reports the device state of the Internet of Things device to the cloud server in the Internet, comprises: if the state reporting device corresponding to the network connection state is a user terminal, sending the device state of the Internet of Things device to the user terminal, so that the user terminal reports the device state of the Internet of Things device to the cloud server through a data network; and if the state reporting device corresponding to the network connection state is a communication module, after receiving a first heartbeat packet from the cloud server forwarded by the communication module, sending the device state of the Internet of Things device to the communication module, so that the communication module reports the device state of the Internet of Things device to the cloud server through the Internet.

[0119] In another embodiment of the present application, the processor 810, when executing the program stored in the memory 830, implements the method for reporting the device state executed by the cloud server provided by any one of the preceding method embodiments, including: receiving the device state of the Internet of Things device reported by a state reporting device; wherein the device state of the Internet of Things device is sent by a central control device in a local area network to the state reporting device; determining the network connection state between the local area network and the Internet; and updating the device state information corresponding to the Internet of Things device according to the device state of the Internet of Things device and the network connection state.

[0120] The determination of the network connection state between the local area network and the Internet includes: if it is determined that the state reporting device is a user terminal accessing the local area network, then the network connection state is determined to be a disconnected state; and if it is determined that the state reporting device is a communication module for connecting the Internet and the local area network, then the network connection state is determined to be a normally connected state.

[0121] The determination of the network connection state between the local area network and the Internet includes: sending a first heartbeat packet to the central control device in the local area network through the communication module; if a first response packet returned by the central control device is received, then the network connection state is determined to be a normally connected state; otherwise, a second heartbeat packet is sent to the Internet of Things device through the communication module; and if a second response packet returned by the Internet of Things device through the communication module is not received, then the network connection state is determined to be a disconnected state.

[0122] The present application also provides a computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method for reporting the device state executed by the central control device provided by any one of the preceding method embodiments or the steps of the method for reporting the device state executed by the cloud server provided by any one of the preceding method embodiments. Since the method for reporting the device state executed by the central control device and the method for reporting the device state executed by the cloud server have been described in detail above, the description of the present embodiment will not be elaborated here, and reference can be made to the related description in the preceding embodiments.

[0123] The device embodiments described above are only schematic, wherein the units illustrated as separate components can or can not be physically separate, and the components illustrated as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment.

[0124] Those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course can be implemented by hardware. Based on such an understanding, the technical solutions described above essentially or in other words make contributions to the related art, and can be embodied in a software product form, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, or an optical disk, and includes a plurality of instructions to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0125] It is to be understood that the terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises", "comprising", "includes", "including" and "has" are inclusive and therefore specify the presence of stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their occurrence in the particular order

[0126] The above description is merely that of specific embodiments of the present application, and thus is not intended to limit the present application. Based on the above description, those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the generic principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for reporting device status, characterized in that: Applied in central control equipment, including: Determine the device status of the IoT device by polling the IoT device in the local area network; Detecting the network connection status between the local area network and the Internet; Determine a status reporting device corresponding to the network connection status; The device status of the Internet of Things device is sent to the status reporting device, so that the status reporting device reports the device status of the Internet of Things device to the cloud server in the Internet.

2. The method according to claim 1, characterized in that The determining of a status reporting device corresponding to the network connection status includes: If the network connection state is a disconnected state, establishing a communication connection with a user terminal connected to the local area network and determining the user terminal as the state reporting device; If the network connection status is a normal connection status, a communication module used to connect the local area network and the Internet is determined as the status reporting device.

3. The method according to claim 2, characterized in that The sending the device status of the Internet of Things device to the status reporting device, so that the status reporting device reports the device status of the Internet of Things device to the cloud server in the Internet, includes: If the status reporting device corresponding to the network connection status is a user terminal, sending the device status of the Internet of Things device to the user terminal, so that the user terminal reports the device status of the Internet of Things device to the cloud server through the data network; If the status reporting device corresponding to the network connection status is a communication module, then after receiving the first-level heartbeat packet forwarded by the communication module from the cloud server, the device status of the Internet of Things device is sent to the communication module, so that the communication module reports the device status of the Internet of Things device to the cloud server through the Internet.

4. A method for reporting device status, characterized in that: Applications in cloud servers include: Receiving the device status of the Internet of Things device reported by the status reporting device; wherein the device status of the Internet of Things device is sent by the central control device in the local area network to the status reporting device; Determining a network connection status between the local area network and the Internet; Update the device status information corresponding to the IoT device according to the device status of the IoT device and the network connection status.

5. The method according to claim 4, characterized in that Determining the network connection status between the local area network and the Internet includes: If it is determined that the status reporting device is a user terminal accessing the local area network, determining that the network connection status is a disconnected state; If it is determined that the status reporting device is a communication module for connecting the Internet and the local area network, then the network connection status is determined to be a normal connection status.

6. The method according to claim 4, characterized in that Determining the network connection status between the local area network and the Internet includes: Sending a level one heartbeat packet to the central control device in the local area network through the communication module; If a first-level response packet returned by the central control device is received, it is determined that the network connection status is a normal connection status; otherwise, a second-level heartbeat packet is sent to the Internet of Things device through the communication module; If the secondary response packet returned by the IoT device through the communication module is not received, it is determined that the network connection state is disconnected.

7. A device status reporting system, characterized in that: The device status reporting system includes: an Internet of Things device, a central control device, a status reporting device, and a cloud server; wherein the Internet of Things device, the central control device, and the status reporting device are connected to the same local area network, and the cloud server is connected to the Internet; The central control device determines the device status of the IoT device by polling the IoT device in the local area network; detects the network connection status between the local area network and the Internet; determines the status reporting device corresponding to the network connection status; sends the device status of the IoT device to the status reporting device, so that the status reporting device reports the device status of the IoT device to the cloud server in the Internet; The cloud server receives the device status of the Internet of Things device reported by the status reporting device; wherein the device status of the Internet of Things device is sent by the central control device in the local area network to the status reporting device; determines the network connection status between the local area network and the Internet; and updates the device status information corresponding to the Internet of Things device according to the device status of the Internet of Things device and the network connection status.

8. A device for reporting device status, characterized in that: The reporting device for the device status of the central control device includes: A first determining module is configured to determine the device status of the IoT device by polling the IoT device in the local area network; A detection module, used to detect the network connection status between the local area network and the Internet; A second determining module is used to determine a status reporting device corresponding to the network connection status; A reporting module, configured to send the device status of the IoT device to the status reporting device, so that the status reporting device reports the device status of the IoT device to the cloud server in the Internet; The device status reporting device set up on the cloud server includes: A receiving module, configured to receive the device status of an IoT device reported by a status reporting device; wherein the device status of the IoT device is sent by a central control device in a local area network to the status reporting device; A third determining module is used to determine the network connection status between the local area network and the Internet; An updating module is used to update the device status information corresponding to the IoT device according to the device status of the IoT device and the network connection status.

9. A device for reporting device status, characterized in that: include: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; At least one memory connected to the at least one bus, wherein the processor is configured to: execute a device status reporting program stored in the memory to implement the device status reporting method executed on the central control device according to any one of claims 1 to 3, or implement the device status reporting method executed on the cloud server according to any one of claims 4 to 6.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are executed to implement the device status reporting method executed on the central control device according to any one of claims 1 to 3, or to implement the device status reporting method executed on the cloud server according to any one of claims 4 to 6.

Citation Information

Patent Citations

  • Method, device, terminal and system for reporting offline information of Internet-of-Things equipment

    CN111769978A

  • State reporting method, device and equipment and computer readable storage medium

    CN112910740A