Message pushing method, electronic equipment and storage medium
By storing and using the first message push address generated after being bound to the terminal object in the IoT device, the problem of message push when the IoT device is not bound is solved, and efficient resource utilization and information security protection are achieved.
Patent Information
- Application Number
- CN202411345242.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-21
AI Technical Summary
If existing IoT devices are unbinded before or after being bound by terminal objects, messages will still be pushed to the cloud platform, resulting in the risk of resource waste and information leakage.
By storing the first message push address in the Internet of Things device, the address is only stored and used after the Internet of Things device establishes a binding relationship with the terminal object. When the IoT device detects the message reporting condition, it will check whether the address is stored locally. If it exists, the target message will be sent to the corresponding regional node, and the regional node will then send the message to the terminal object with the binding relationship.
It effectively reduces the resource consumption of unbound IoT devices pushing messages to the cloud platform, protects terminal object information from being leaked, and improves the utilization of IoT resources.
Smart Images

Figure CN119342029A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Things, and in particular to a message push method, electronic device, and storage medium. Background Art
[0002] The existing solution for message push of IoT devices mainly reduces the amount of message sending and redundant alarms by setting alarm thresholds or optimizing message triggering rules. However, the current solution does not solve the problem that messages will still be pushed to the cloud platform when the IoT device is not bound to the terminal object before or after being unbound. Summary of the invention
[0003] The present application at least provides a message push method, electronic device, and storage medium, which can improve the utilization rate of Internet of Things resources.
[0004] The first aspect of the present application provides a message push method, the method comprising: detecting that a message reporting condition is currently met, the Internet of Things device searching whether a first message push address is stored locally, and obtaining a search result, wherein the first message push address is stored by the Internet of Things device after establishing a binding relationship with a terminal object, and the first message push address is the address of a first regional node storing the binding relationship, the terminal object with the binding relationship can manage the Internet of Things device through a cloud platform, the cloud platform is supported by multiple regional nodes, and the first regional node is one of the regional nodes; based on the search result, determining whether to send the target message to be reported to the first regional node, wherein the first regional node is used to send the target message to the terminal object with a binding relationship with the Internet of Things device.
[0005] Among them, based on the search result, determining whether to send the target message to the first regional node includes at least one of the following steps: in response to the first message push address being stored locally, sending the target message to the first regional node according to the first message push address; in response to the first message push address not being stored locally, determining not to send the target message to any regional node.
[0006] The message reporting condition includes at least one of a change in device status and a device triggering an alarm.
[0007] Among them, when it is detected that the message reporting conditions are currently met, the Internet of Things device searches whether the first message push address is stored locally, and before obtaining the search result, it also includes: receiving the first message push address sent by the first area node, and storing the first message push address locally, wherein the first message push address is obtained by searching from the node address mapping information after the first area node receives the device binding request of the terminal object, and the device binding request is used to request the first area node to establish and locally store the binding relationship between the Internet of Things device and the terminal object, and the node address mapping information includes the mapping relationship between each area node and the corresponding address; and / or, responding to the address clearing instruction sent by the first area node, and clearing the locally stored first message push address; wherein the address clearing instruction is sent by the first area node after receiving the device unbinding request of the terminal object, and the device unbinding request is used to request the first area node to delete the binding relationship.
[0008] The first regional node is a regional node corresponding to the region where the terminal object is located.
[0009] Wherein, it also includes: sending an address acquisition request to the second regional node, wherein the second regional node is the regional node corresponding to the area where the Internet of Things device is located, and the address acquisition request is used to request the second regional node to determine whether it is the first regional node with a binding relationship stored locally; receiving a second message push address sent by the first regional node, wherein the second message push address is sent when the second regional node determines that it is the first regional node, or is sent by broadcasting to the first regional node when it determines that it is not the first regional node; according to the second message push address, updating the first message push address of the first regional node stored locally.
[0010] A second aspect of the present application provides a message push method, the method comprising: a first regional node receives a target message reported by an Internet of Things device, the target message is sent according to a first message push address stored locally when the Internet of Things device detects that a message reporting condition is currently met, the first message push address is the address of the first regional node, and is stored locally after the Internet of Things device establishes a binding relationship with a terminal object, the terminal object with a binding relationship can manage the Internet of Things device through a cloud platform, the cloud platform is supported by multiple regional nodes, and the first regional node is one of the regional nodes; based on the locally stored binding relationship, the target message is sent to the terminal object.
[0011] Wherein, the IoT device does not send the target message to any regional node if the first message push address is not stored locally; and / or the message reporting condition includes at least one of a change in device status and a device triggering an alarm.
[0012] Among them, before the first regional node receives the target message reported by the Internet of Things device, it also includes: receiving a device binding request of the terminal object; establishing and locally storing the binding relationship between the Internet of Things device and the terminal object, and searching the address with a mapping relationship with the first regional node from the node address mapping information as the first message push address, and sending the first message push address to the Internet of Things device, the node address mapping information includes the mapping relationship between each regional node and the corresponding address; and / or, after sending the target message to the terminal object based on the locally stored binding relationship, it also includes: receiving a device unbinding request of the terminal object; deleting the locally stored binding relationship; and sending an address clearing instruction to the Internet of Things device, the address clearing instruction is used to instruct the Internet of Things device to clear the locally stored first message push address.
[0013] The first regional node is a regional node corresponding to the region where the terminal object is located.
[0014] The method further includes: when the first regional node is a regional node corresponding to the region where the IoT device is located, receiving an address acquisition request sent by the IoT device, determining whether a binding relationship is stored locally in response to the address acquisition request, and in response to the binding relationship being stored locally, searching for an address with a mapping relationship with the first regional node from the node address mapping information as the second message push address, and sending the second message push address to the IoT device, so that the IoT device updates the first message push address of the first regional node stored locally according to the second message push address; and / or, when the first regional node is not a regional node corresponding to the region where the IoT device is located, receiving an address acquisition request broadcasted by the second regional node, determining whether a binding relationship is stored locally in response to the address acquisition request, and in response to the binding relationship being stored locally, searching for an address with a mapping relationship with the first regional node from the node address mapping information as the second message push address, and sending the second message push address to the IoT device, so that the IoT device updates the first message push address of the first regional node stored locally according to the second message push address, wherein the second regional node is a regional node corresponding to the region where the IoT device is located, and the address acquisition request is sent when the second regional node receives the address acquisition request sent by the IoT device and determines that no binding relationship is stored locally.
[0015] The third aspect of the present application provides an electronic device, including a memory and a processor coupled to each other, the processor being used to execute program instructions stored in the memory to implement the message push method in the first aspect above, or to implement the message push method in the second aspect above.
[0016] The fourth aspect of the present application provides a computer-readable storage medium having program instructions stored thereon. When the program instructions are executed by a processor, the message push method in the first aspect or the message push method in the second aspect is implemented.
[0017] In the above scheme, after the IoT device detects that it currently meets the message reporting conditions, it will search whether the first message push address is stored locally to obtain the search result. If the search result is that the first message push address is stored locally, the target message to be reported can be sent to the first regional node according to the first message push address, and the first regional node can send the target message to the terminal object with a binding relationship with the IoT device according to the binding relationship between the IoT device and the terminal object stored therein. The first message push address is stored by the IoT device after the binding relationship is established with the terminal object, so that the IoT device will not be able to send messages to the cloud platform before it is bound, which can reduce the resource consumption caused by the unbound IoT device pushing messages to the cloud platform, so as to improve the utilization rate of IoT resources, and at the same time protect the information of the terminal object from being leaked.
[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0020] Figure 1 This is a flow chart of an embodiment of a message push method of the present application;
[0021] Figure 2 It is a structural diagram of an embodiment of a message push system of the present application;
[0022] Figure 3 This is a flow chart of another embodiment of the message push method of the present application;
[0023] Figure 4 It is a flowchart of an embodiment of a device binding method of the present application;
[0024] Figure 5 This is a flow chart of another embodiment of the message push method of the present application;
[0025] Figure 6 It is a flowchart of an embodiment of a method for updating a device address of the present application;
[0026] Figure 7 It is a flowchart of an embodiment of a method for unbinding a device of the present application;
[0027] Figure 8 This is a schematic diagram of the framework of an embodiment of a message push device of the present application;
[0028] Fig. 9 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;
[0029] Fig.10 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0030] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0031] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0032] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character "f" in this article generally indicates that the previously associated objects are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B and C.
[0033] See also Figure 1 , Figure 1 This is a flow chart of an embodiment of the message push method of this application. In this embodiment, the IoT device is the execution subject, and the IoT device can be any electronic device that communicates and exchanges data with each other through the Internet, such as a camera, a desk lamp, an air conditioner and other household appliances. Specifically, this implementation method may include the following steps:
[0034] Step S110: When it is detected that the message reporting condition is currently met, the IoT device searches whether the first message push address is stored locally and obtains a search result.
[0035] This application is mainly used in the field of Internet of Things. It restricts the message push of IoT devices in the Internet of Things, so that IoT devices cannot push messages to regional nodes if they are not bound to terminal objects, thereby improving the utilization rate of IoT resources and avoiding the leakage of relevant information of terminal objects.
[0036] Please refer to Figure 2, the message push system 200 includes a cloud platform 210, a plurality of IoT devices 230 and a plurality of terminal objects, the cloud platform 210 is supported by a plurality of regional nodes 220, and the first regional node 2201 is one of the regional nodes 220. Among them, the first message push address is stored after the IoT device 230 establishes a binding relationship with the terminal object, and the first message push address is the address of the first regional node 2201 storing the binding relationship, and the terminal object with the binding relationship can manage the IoT device 230 through the cloud platform 210, for example, the terminal object can control the switch of the IoT device 230 or control the temperature of the IoT device 230 through the cloud platform 210, or control the brightness of the IoT device 230, etc. It can be understood that each regional node 220 in the cloud platform 210 can be connected to one or more IoT devices 230 for communication, and / or can be connected to one or more terminal objects for communication.
[0037] In some embodiments, a timed detection function can be set for the IoT device 230, and the IoT device 230 itself can be detected at a preset interval to obtain a detection result, and the detection result is judged whether it meets the message reporting condition. If the message reporting condition is met, it is necessary to find whether the first message push address is stored locally, and if the first message push address is found to be stored locally, the target message is reported to the corresponding regional node 220 according to the first message push address; otherwise, it is not reported. Among them, the preset interval time can be set to 3 seconds, 10 seconds, etc., and is not specifically limited here. The message reporting condition may include at least one of a change in the device status and a device triggering an alarm.
[0038] For example, when the IoT device 230 is a desk lamp, its locally stored state is the off state. The desk lamp is detected at a preset interval of 5 seconds. When it is detected that the state of the desk lamp has changed to the on state, it indicates that the device state of the desk lamp has changed. Therefore, in order to report the target message to the terminal object, first find out whether the desk lamp has a first message push address stored locally, so as to determine the first area node 2201 storing the binding relationship between the desk lamp and the terminal object through the first message push address. If the desk lamp has a first message push address stored locally, the target message is sent to the corresponding first area node 2201 through the first message push address, and then the target message is forwarded to the terminal object bound to the desk lamp through the first area node 2201 to prompt the terminal object. Among them, the target message is that the device state of the desk lamp has changed from the off state to the on state.
[0039] For another example, when the IoT device 230 is an air conditioner, it is set with a minimum temperature threshold of 18°C. When the air conditioner is operating normally, its temperature is displayed as 20°C. After 5 seconds, it is detected again, and the detection result is that its temperature has changed to 16°C, which is lower than the minimum temperature threshold, and the device triggering alarm condition has been met. Therefore, in order to notify the terminal object of the target message, first find out whether the air conditioner has a first message push address stored locally, so as to determine the first area node 2201 storing the binding relationship between the air conditioner and the terminal object through the first message push address. After determining the first area node 2201, the target message is forwarded to the terminal object bound to the air conditioner through the first area node 2201, so as to provide it to the terminal object for viewing. Among them, the target message is an alarm message that the air conditioner temperature is lower than the minimum temperature threshold.
[0040] In addition, in addition to the timing detection function, a real-time detection function can also be set. The IoT device 230 detects its own status in real time. If the detection result satisfies the message reporting condition, it then detects whether the IoT device 230 has the first message push address stored locally.
[0041] In some embodiments, in order to successfully report the target message of the IoT device 230, it is a key step to detect whether the IoT device 230 has a first message push address stored locally. The first message push address stored by the IoT device 230 is obtained according to the device binding request sent by the terminal object. Specifically, the first message push address sent by the first regional node 2201 is received, and the first message push address is stored locally, and the first message push address is obtained by searching the node address mapping information after the first regional node 2201 receives the device binding request of the terminal object. The device binding request is used to request the first regional node 2201 to establish and locally store the binding relationship between the IoT device 230 and the terminal object, and the node address mapping information includes the mapping relationship between each regional node 220 and the corresponding address, so that the target message sent by the IoT device 230 is pushed to the regional node 220 with the same bound terminal object of the IoT device 230. Among them, the device binding request at least includes the unique identifier of the IoT device 230, and the device binding request can be for binding one IoT device 230, or for batch binding of multiple IoT devices 230, which is not specifically limited here.
[0042] In other embodiments, if the IoT device 230 is not bound to a terminal object, the message push address stored by the IoT device 230 is empty by default, and when the IoT device 230 determines that the message push address stored by it is empty, it will not push any message to the cloud platform 210.
[0043] In addition to sending a device binding request, the terminal object can also send a device unbinding request to release the binding relationship between the terminal object and the IoT device 230. Specifically, in response to the address clearing instruction sent by the first regional node 2201, the first message push address stored locally is cleared to ensure that the IoT device 230 does not push any message to the cloud platform 210 after unbinding. The address clearing instruction is sent by the first regional node 2201 after receiving the device unbinding request of the terminal object, and the device unbinding request is used to request the first regional node 2201 to delete the binding relationship.
[0044] It is understandable that the device unbinding request includes at least the unique identifier of the IoT device 230, and the device unbinding request can be to unbind one IoT device 230 or to unbind multiple IoT devices 230 in batches, which is not specifically limited here.
[0045] During the binding and unbinding process of the IoT device 230, the message push address of the IoT device 230 can be set and cleared, so as to control whether the IoT device 230 pushes the target message to the cloud platform 210, and determine the regional node 220 that receives the target message, so as to ensure that the IoT device 230 does not push the target message to the cloud platform 210 when it is not bound, and pushes the target message to the regional node where the bound terminal object is located after binding, so as to ensure that the terminal object and the IoT device 230 can push messages to the terminal object normally when they are in different regional nodes.
[0046] Step S120: Based on the search result, determine whether to send the target message to be reported to the first area node.
[0047] The first area node 2201 is used to send the target message to the terminal object that has a binding relationship with the Internet of Things device 230.
[0048] In some embodiments, after obtaining the search result, it can be determined according to the search result whether to send the target message to be reported to the first regional node 2201. Specifically, in response to the search result that the first message push address is stored locally, the target message is sent to the first regional node 2201 according to the first message push address. Alternatively, in response to the search result that the first message push address is not stored locally, it is determined not to send the target message to any regional node 220.
[0049] Under normal circumstances, the first regional node 2201 is the regional node 220 corresponding to the region where the terminal object is located, and the terminal object with which the Internet of Things device 230 has a binding relationship is also in the same region. In addition, it is also possible that the Internet of Things device 230 is sold to other regions, or the terminal object is moved to other regions, or the Internet of Things device 230 is reset, resulting in the loss of the first message push address stored therein, resulting in the Internet of Things device 230 and the terminal object with which it has a binding relationship not being in the same region. Therefore, the Internet of Things device 230 needs to set a synchronization process to ensure that the message push address of the Internet of Things device 230 is accurate. Specifically, please refer to steps S121 to S123.
[0050] Step S121: Send an address acquisition request to the second area node.
[0051] The second regional node 2202 is the regional node 220 corresponding to the region where the IoT device 230 is located, and the address acquisition request is used to request the second regional node 2202 to determine whether it is the first regional node 2201 with which the binding relationship is locally stored.
[0052] In some embodiments, before synchronization, the IoT device 230 does not know whether the regional node 220 corresponding to its region is the first regional node 2201 storing the binding relationship. Therefore, a timed synchronization function can be set for the IoT device 230, that is, an address acquisition request is sent to the regional node 220 corresponding to the region where the IoT device 230 is located at a preset time interval to determine whether the regional node 220 is the first regional node 2201 storing the binding relationship locally.
[0053] Step S122: Receive the second message push address sent by the first area node.
[0054] The second message push address is sent when the second area node 2202 determines that it is the first area node 2201, or is sent by broadcasting to the first area node 2201 when it determines that it is not the first area node 2201.
[0055] In some embodiments, after the Internet of Things device 230 sends an address acquisition request to the second regional node 2202 in its area, if the second regional node 2202 is the first regional node 2201, the second message push address it sends to the Internet of Things device 230 is the same as the first message push address stored by the Internet of Things device 230; if the second regional node 2202 is not the first regional node 2201, because the binding relationship stored in the second regional node 2202 is not the binding relationship of the Internet of Things device 230, the second regional node 2202 cannot send its corresponding second message push address, so the second regional node 2202 will broadcast the address acquisition request to other regional nodes 220 in the cloud platform 210, so that the regional node 220 that stores the binding relationship of the Internet of Things device 230 can receive the address acquisition request and send its corresponding message push address to the Internet of Things device 230.
[0056] Step S123: according to the second message push address, the first message push address of the first regional node stored locally is updated.
[0057] In some embodiments, the IoT device 230 updates the first message push address of the first regional node 2201 stored locally according to the received second message push address, so that the message push address of the IoT device 230 is synchronized with that of the cloud platform 210.
[0058] See also Figure 3 , Figure 3 2 is a flow chart of another embodiment of the message push method of the present application. In this embodiment, the first regional node 2201 is the execution subject, and the first regional node 2201 can be any device or apparatus that communicates with each other through the Internet and has a data storage function, such as a server or other device. Specifically, this implementation method may include the following steps:
[0059] Step S310: The first regional node receives a target message reported by an IoT device.
[0060] In some embodiments, the target message is sent according to the first message push address stored locally when the IoT device 230 detects that the message reporting condition is currently met. The first message push address is the address of the first regional node 2201, which is stored locally after the IoT device 230 establishes a binding relationship with the terminal object. The terminal object with the binding relationship can manage the IoT device 230 through the cloud platform 210. The cloud platform 210 is supported by multiple regional nodes 220, and the first regional node 2201 is one of the regional nodes 220. In general, the first regional node 2201 is the regional node 220 corresponding to the area where the terminal object is located, that is, the regional node 220 to which the IoT device 230 reports the target message according to the first message push address stored locally is the regional node 220 corresponding to the area where the terminal object is located. Among them, the message reporting condition includes at least one of a change in device status and a device triggering an alarm.
[0061] In addition, when the IoT device 230 does not store the first message push address locally, the target message is not sent to any regional node 220 .
[0062] Therefore, the premise that the first regional node 2201 can receive the target message reported by the IoT device 230 is that the first regional node 2201 locally stores the binding relationship between the IoT device 230 and the terminal object. As for the establishment of the binding relationship between the IoT device 230 and the terminal object, first, the first regional node 2201 needs to receive the device binding request of the terminal object, wherein the device binding request at least includes the unique identifier of the IoT device 230 to be bound and the terminal object information. Through the unique identifier of the IoT device 230 to be bound, the binding relationship between the IoT device 230 and the terminal object is established and stored locally, and the address with a mapping relationship with the first regional node 2201 is searched from the node address mapping information stored in the cloud platform 210 as the first message push address, and the first message push address is sent to the IoT device 230, and the node address mapping information contains the mapping relationship between each regional node 220 and the corresponding address.
[0063] Step S320: Based on the locally stored binding relationship, the target message is sent to the terminal object.
[0064] In some embodiments, the first area node 2201 sends the target message to the corresponding terminal object according to its locally stored binding relationship.
[0065] In some embodiments, the first area node 2201 may also receive a device unbinding request sent by the terminal object to release the binding relationship between the terminal object and the IoT device 230. Specifically, the first area node 2201 receives the device unbinding request of the terminal object, then deletes the locally stored binding relationship, and sends an address clearing instruction to the IoT device 230, where the address clearing instruction is used to instruct the IoT device 230 to clear the locally stored first message push address.
[0066] In addition, in order to synchronize the message push addresses stored by the IoT device 230 and the cloud platform 210, the IoT device 230 will send an address acquisition request to the regional node 220 corresponding to the region where it is located to update the first message push address stored locally. Specifically, in the case where the first regional node 2201 is the regional node 220 corresponding to the region where the IoT device 230 is located, the first regional node 2201 will directly receive the address acquisition request sent by the IoT device 230, and in response to the address acquisition request, determine whether a binding relationship is stored locally, and in response to the binding relationship being stored locally, search for an address with a mapping relationship with the first regional node 2201 from the node address mapping information as the second message push address, and send the second message push address to the IoT device 230, so that the IoT device 230 updates the first message push address of the first regional node 2201 stored locally according to the second message push address.
[0067] And / or, in the case where the first regional node 2201 is not the regional node 220 corresponding to the region where the IoT device 230 is located, the IoT device 230 will send an address acquisition request to the second regional node 2202 corresponding to the region where it is located. Because the second regional node 2202 does not store the binding relationship between the IoT device 230 and the terminal object, it will not be able to send a message push address to the IoT device 230. Therefore, the second regional node 2202 will broadcast the address acquisition request to other regional nodes 220 in the cloud platform 210. The first regional node 2201 receives the address acquisition request broadcast by the second regional node 2202, and determines whether the local area is If there is no binding relationship stored locally, and in response to the binding relationship being stored locally, an address having a mapping relationship with the first regional node 2201 is searched from the node address mapping information as the second message push address, and the second message push address is sent to the Internet of Things device 230, so that the Internet of Things device 230 updates the first message push address of the first regional node 2201 stored locally according to the second message push address, wherein the second regional node 2202 is the regional node 220 corresponding to the area where the Internet of Things device 230 is located, and the address acquisition request is sent when the second regional node 2202 receives the address acquisition request sent by the Internet of Things device 230 and determines that there is no binding relationship stored locally.
[0068] In a specific implementation scenario, the terminal object sends a device binding request to the cloud platform 210 to bind the IoT device 230: a desk lamp. Figure 4 , the terminal object sends a device binding request to the cloud platform 210, and the first area node 2201 in the area where the terminal object is located in the cloud platform 210 receives the device binding request. The first area node 2201 establishes a binding relationship between the desk lamp and the terminal object according to the device binding request, and stores the binding relationship locally. Then the first area node 2201 searches for the corresponding first message push address from the node address mapping information, and sends the first message push address to the desk lamp. After receiving the first message push address, the desk lamp will update the locally stored message push address.
[0069] After that, the lamp will periodically check its own status. Figure 5 When it is detected that the desk lamp itself satisfies at least one of the following conditions: the device status has changed or the device has triggered an alarm, the desk lamp searches whether the first message push address is stored locally and obtains the search result. When the first message push address is stored locally, the desk lamp sends the target message to the first regional node 2201 according to the first message push address, and the first regional node 2201 sends the target message to the terminal object according to the binding relationship stored therein. If the desk lamp does not store the first message push address locally, the desk lamp does not report the target message to any regional node 220.
[0070] At the same time, in order to avoid inconsistency between the first message push address stored in the desk lamp and the cloud platform 210, the desk lamp is also provided with a synchronization process. Figure 6 , the desk lamp will also send an address acquisition request to the second area node 2202 corresponding to the area where it is located. The address acquisition request is used to request the second area node 2202 to determine whether it is the first area node 2201 with which the local storage has a binding relationship. When the second area node 2202 is the first area node 2201, the second area node 2202 will directly send the second message push address to the desk lamp, and the desk lamp will update the locally stored message push address after receiving the second message push address. When the second area node 2202 is not the first area node 2201, the second area node 2202 will broadcast so that the first area node 2201 in the cloud platform 210 receives the broadcast and sends the second message push address to the desk lamp, and the desk lamp will update the locally stored message push address after receiving the second message push address.
[0071] In addition, when the terminal object no longer needs to use the desk lamp, you can also unbind the terminal object from the desk lamp. Figure 7, the terminal object initiates a device unbinding request to the cloud platform 210. After receiving the device unbinding request, the first regional node 2201 in the cloud platform 210 parses the device unbinding request and obtains the unique identifier of the IoT device 230 to be unbound. The IoT device 230 is determined to be a desk lamp through the unique identifier. Therefore, the first regional node 2201 will delete the locally stored binding relationship between the terminal object and the desk lamp. At the same time, the first regional node 2201 also sends an address clearing instruction to the desk lamp. After receiving the address clearing instruction, the desk lamp clears the locally stored first message push address to complete the unbinding.
[0072] In this embodiment, the message push address of the area where the bound terminal object is located is sent to the IoT device through the binding relationship, and the message push address locally stored in the IoT device is cleared when unbinding. This can ensure that the IoT device does not push any messages to the cloud platform before binding, effectively protect the privacy of the terminal object, and reduce the resource consumption caused by the unbound IoT device pushing messages to the cloud platform. After the IoT device is bound, the IoT device can be effectively delivered to the regional node where the terminal object information is stored, so that the push information of the terminal object can be obtained normally, ensuring that the target message can be delivered to the terminal object even when the terminal object and the IoT device are not in the same regional node.
[0073] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0074] See also Figure 8 , Figure 8 It is a schematic diagram of the framework of an embodiment of a message push device 800 of the present application. The message push device 800 includes a detection module 810 and a reporting module 820. The detection module 810 executes detection to find that the message reporting condition is currently met, and the Internet of Things device searches whether the first message push address is stored locally to obtain a search result, wherein the first message push address is stored by the Internet of Things device after establishing a binding relationship with the terminal object, and the first message push address is the address of the first regional node storing the binding relationship, and the terminal object with the binding relationship can manage the Internet of Things device through the cloud platform, and the cloud platform is supported by multiple regional nodes, and the first regional node is one of the regional nodes. The reporting module 820 executes based on the search result to determine whether to send the target message to be reported to the first regional node, wherein the first regional node is used to send the target message to the terminal object with a binding relationship with the Internet of Things device.
[0075] In some embodiments, the reporting module 820 determines whether to send the target message to the first regional node based on the search result, including at least one of the following steps: in response to the first message push address being stored locally, sending the target message to the first regional node according to the first message push address; in response to the first message push address not being stored locally, determining not to send the target message to any regional node.
[0076] In some embodiments, the message reporting condition executed by the detection module 810 includes at least one of a change in device status and a device triggering an alarm.
[0077] In some embodiments, the detection module 810 executes detection that the message reporting conditions are currently met, and the Internet of Things device searches whether the first message push address is stored locally. Before obtaining the search result, it also includes: receiving the first message push address sent by the first area node, and storing the first message push address locally, wherein the first message push address is obtained by the first area node from the node address mapping information after receiving the device binding request of the terminal object, and the device binding request is used to request the first area node to establish and locally store the binding relationship between the Internet of Things device and the terminal object, and the node address mapping information includes the mapping relationship between each area node and the corresponding address; and / or, responding to the address clearing instruction sent by the first area node, and clearing the locally stored first message push address; wherein the address clearing instruction is sent by the first area node after receiving the device unbinding request of the terminal object, and the device unbinding request is used to request the first area node to delete the binding relationship.
[0078] In some embodiments, the first regional node executed by the detection module 810 is a regional node corresponding to the region where the terminal object is located.
[0079] In some embodiments, the reporting module 820 also executes: sending an address acquisition request to a second regional node, wherein the second regional node is a regional node corresponding to the region where the Internet of Things device is located, and the address acquisition request is used to request the second regional node to determine whether it is a first regional node with a binding relationship stored locally; receiving a second message push address sent by the first regional node, wherein the second message push address is sent when the second regional node determines that it is the first regional node, or is sent by broadcasting to the first regional node when it determines that it is not the first regional node; and updating the first message push address of the first regional node stored locally according to the second message push address.
[0080] See also Fig. 9 , Fig. 91 is a schematic diagram of a framework of an embodiment of an electronic device 90 of the present application. The electronic device 90 includes a memory 91 and a processor 92 coupled to each other, and the processor 92 is used to execute program instructions stored in the memory 91 to implement the steps in any of the above-mentioned message push method embodiments. In a specific implementation scenario, the electronic device 90 may include but is not limited to: a microcomputer, a server, and in addition, the electronic device 90 may also include a mobile device such as a laptop computer and a tablet computer, which is not limited here.
[0081] Specifically, the processor 92 is used to control itself and the memory 91 to implement the steps in any of the above-mentioned message push method embodiments. The processor 92 can also be called a CPU (Central Processing Unit). The processor 92 may be an integrated circuit chip with signal processing capabilities. The processor 92 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 92 can be implemented by an integrated circuit chip.
[0082] See also Fig.10 , Fig.10 1 is a schematic diagram of a framework of an embodiment of a computer-readable storage medium 100 of the present application. The computer-readable storage medium 100 stores program instructions 1001 that can be executed by a processor, and the program instructions 1001 are used to implement the steps in any of the above-mentioned message push method embodiments.
[0083] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0084] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0085] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0086] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0087] If 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 application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
Claims
1. A message push method, characterized in that: include: It is detected that the message reporting condition is currently met, and the Internet of Things device searches whether a first message push address is stored locally to obtain a search result, wherein the first message push address is stored by the Internet of Things device after establishing a binding relationship with the terminal object, and the first message push address is an address of a first regional node storing the binding relationship, and the terminal object having the binding relationship can manage the Internet of Things device through a cloud platform, and the cloud platform is supported by multiple regional nodes, and the first regional node is one of the regional nodes; Based on the search result, determine whether to send the target message to be reported to the first area node, wherein the first area node is used to send the target message to a terminal object that has a binding relationship with the Internet of Things device.
2. The method according to claim 1, characterized in that The step of determining whether to send the target message to the first regional node based on the search result includes at least one of the following steps: In response to the first message push address being stored locally, sending the target message to the first regional node according to the first message push address; In response to the first message push address not being stored locally, it is determined not to send the target message to any of the regional nodes.
3. The method according to claim 1, characterized in that The message reporting condition includes at least one of a change in device status and a device triggering an alarm.
4. The method according to claim 1, characterized in that: After the message reporting condition is detected to be met, the IoT device searches whether the first message push address is stored locally, and before obtaining the search result, the method further includes: Receiving the first message push address sent by the first regional node, and storing the first message push address locally, wherein the first message push address is obtained by searching from the node address mapping information after the first regional node receives the device binding request of the terminal object, the device binding request is used to request the first regional node to establish and locally store the binding relationship between the Internet of Things device and the terminal object, and the node address mapping information includes the mapping relationship between each of the regional nodes and the corresponding address; and / or, Respond to the address clearing instruction sent by the first regional node, and clear the first message push address stored locally; wherein, the address clearing instruction is sent by the first regional node after receiving the device unbinding request of the terminal object, and the device unbinding request is used to request the first regional node to delete the binding relationship.
5. The method according to claim 1, characterized in that The first regional node is the regional node corresponding to the region where the terminal object is located.
6. The method according to any one of claims 1 to 5, characterized in that: Also includes: Sending an address acquisition request to a second regional node, wherein the second regional node is a regional node corresponding to the region where the IoT device is located, and the address acquisition request is used to request the second regional node to determine whether it is the first regional node that locally stores the binding relationship; receiving a second message push address sent by the first regional node, wherein the second message push address is sent when the second regional node determines that it is the first regional node, or is sent by notifying the first regional node through broadcasting when the second regional node determines that it is not the first regional node; According to the second message push address, the first message push address of the first regional node stored locally is updated.
7. A message push method, characterized in that: include: The first regional node receives a target message reported by an IoT device, wherein the target message is sent by the IoT device according to the first message push address stored locally when the IoT device detects that a message reporting condition is currently met, and the first message push address is the address of the first regional node, which is stored locally after the IoT device establishes a binding relationship with a terminal object, and the terminal object having the binding relationship can manage the IoT device through a cloud platform, and the cloud platform is supported by multiple regional nodes, and the first regional node is one of the regional nodes; Based on the locally stored binding relationship, the target message is sent to the terminal object.
8. The method according to claim 7, characterized in that The IoT device does not send the target message to any of the regional nodes if the first message push address is not stored locally; And / or, the message reporting condition includes at least one of a change in device status and a device triggering an alarm.
9. The method according to claim 7, characterized in that: Before the first regional node receives the target message reported by the IoT device, the method further includes: A device binding request of a terminal object is received; Establishing and locally storing a binding relationship between the IoT device and the terminal object, and, Searching for an address having a mapping relationship with the first regional node from the node address mapping information as the first message push address, and sending the first message push address to the Internet of Things device, wherein the node address mapping information includes a mapping relationship between each of the regional nodes and the corresponding address; and / or, After sending the target message to the terminal object based on the binding relationship stored locally, the method further includes: Receive a device unbinding request from a terminal object; Deleting the locally stored binding relationship; and, An address clearing instruction is sent to the Internet of Things device, where the address clearing instruction is used to instruct the Internet of Things device to clear the first message push address stored locally.
10. The method according to claim 7, characterized in that The first regional node is the regional node corresponding to the region where the terminal object is located.
11. The method according to any one of claims 7 to 10, characterized in that: Also includes: In the case where the first regional node is the regional node corresponding to the region where the IoT device is located, receiving an address acquisition request sent by the IoT device, determining whether the binding relationship is stored locally in response to the address acquisition request, and in response to the binding relationship being stored locally, searching for an address having a mapping relationship with the first regional node from the node address mapping information as the second message push address, and sending the second message push address to the IoT device, so that the IoT device updates the first message push address of the first regional node stored locally according to the second message push address; and / or, In the case that the first regional node is not the regional node corresponding to the area where the Internet of Things device is located, an address acquisition request broadcasted by the second regional node is received, and in response to the address acquisition request, it is determined whether the binding relationship is stored locally, and in response to the binding relationship being stored locally, an address having a mapping relationship with the first regional node is searched from the node address mapping information, and the address is used as the second message push address, and the second message push address is sent to the Internet of Things device, so that the Internet of Things device updates the first message push address of the first regional node stored locally according to the second message push address, wherein the second regional node is the regional node corresponding to the area where the Internet of Things device is located, and the address acquisition request is sent when the second regional node receives the address acquisition request sent by the Internet of Things device and determines that the binding relationship is not stored locally.
12. An electronic device, characterized in that: It includes a memory and a processor coupled to each other, and the processor is used to execute program instructions stored in the memory to implement the message push method described in any one of claims 1 to 6, or to implement the message push method described in any one of claims 7 to 11.
13. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by the processor, the message push method described in any one of claims 1 to 6 is implemented, or the message push method described in any one of claims 7 to 11 is implemented.