CN112559219A - Internet of things offline message management method, device, equipment and storage medium - Google Patents
Internet of things offline message management method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN112559219A CN112559219A CN202011531282.XA CN202011531282A CN112559219A CN 112559219 A CN112559219 A CN 112559219A CN 202011531282 A CN202011531282 A CN 202011531282A CN 112559219 A CN112559219 A CN 112559219A
- Authority
- CN
- China
- Prior art keywords
- internet
- message
- things
- offline
- offline message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9024—Graphs; Linked lists
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16Y—INFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
- G16Y30/00—IoT infrastructure
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the application discloses a method, a device, equipment and a storage medium for managing an offline message of the Internet of things. According to the technical scheme, when the terminal of the internet of things is offline, the offline message linked list is established for the terminal of the internet of things, when the terminal of the internet of things in an offline state exists in the terminal of the internet of things pointed by the push message sent by the service platform, the push message is cached as the offline message and recorded in the corresponding offline message linked list, when the terminal of the internet of things is online again, the corresponding offline message is obtained based on the corresponding offline message linked list and sent to the terminal of the internet of things, the push message sent by the service platform can be accurately sent to the terminal of the internet of things, normal work of the terminal of the internet of things is guaranteed, and normal management of the internet of things message is guaranteed.
Description
Technical Field
The embodiment of the application relates to the technical field of the Internet of things, in particular to a method, a device, equipment and a storage medium for managing an offline message of the Internet of things.
Background
The existing internet of things system generally comprises a service platform, an internet of things platform and internet of things equipment, wherein the internet of things platform is used as a message middleware between the service platform and the internet of things equipment, and the functions of equipment management and message forwarding can be realized.
After the internet of things platform receives the push Message sent by the service platform, the push Message can be sent to the internet of things device through an MQTT (Message Queuing Telemetry Transport) protocol. However, when the internet of things device is in an offline state, the internet of things platform discards the push message after the message retransmission fails, and the situation that the internet of things device cannot work normally after being online exists, which is not beneficial to the management of the internet of things device.
Disclosure of Invention
The embodiment of the application provides an Internet of things offline message management method, device, equipment and storage medium, so as to ensure effective pushing of messages.
In a first aspect, an embodiment of the present application provides an internet of things offline message management method, including:
in response to the offline state of the terminal of the Internet of things, establishing an offline message linked list for the terminal of the Internet of things;
determining the Internet of things terminals pointed by a push message sent by a service platform, and determining whether the pointed Internet of things terminals have the Internet of things terminals in an offline state;
caching the push message into an offline message based on the internet of things terminal in an offline state, and recording the offline message in an offline message linked list corresponding to the internet of things terminal;
and responding to the online of the terminal of the Internet of things, determining to acquire an offline message based on the offline message linked list corresponding to the terminal of the Internet of things, and sending the offline message to the terminal of the Internet of things.
Further, before creating an offline message linked list for the terminal of the internet of things in response to the offline state of the terminal of the internet of things, the method further includes:
receiving heartbeat data packets uploaded by all internet of things terminals at regular time, and determining that all the internet of things terminals are in an online state or an offline state according to the heartbeat data packets.
Further, the recording the offline message in the offline message linked list corresponding to the internet of things terminal includes:
determining an offline message linked list corresponding to the Internet of things terminal in an offline state;
and determining a cache address of the offline message, and recording the cache address to the determined offline message linked list.
Further, the offline message linked list also records the message aging of the offline message;
after the step of recording the cache address to the determined offline message linked list, the method further includes:
and maintaining the offline message linked list according to the message timeliness corresponding to each offline message in the offline message linked list.
Further, the offline message linked list also records a conflict type and a message type of the offline message, wherein the conflict type includes a conflict-free type and a conflict type;
the recording the cache address to the determined offline message linked list includes:
determining a conflict type of the offline message, and if the conflict type is a conflict-free type, directly recording the cache address to the determined offline message linked list;
if the conflict type is a conflict type, determining the message type of the offline message, and judging whether the offline message linked list of the terminal of the Internet of things records the same message type;
if the same message type exists, replacing the cache address corresponding to the same message type in the offline message linked list by the cache address, otherwise, directly recording the cache address to the determined offline message linked list.
Further, the caching the push message as an offline message includes:
judging whether the push message is an instant message or not, if so, discarding the push message when the retransmission times of the push message reach a retransmission threshold value; otherwise, caching the push message as an offline message.
Further, after the sending the offline message to the internet of things terminal, the method further includes:
deleting the offline message linked list corresponding to the online Internet of things terminal, comparing the cache address of the cached offline message with the cache addresses in the offline message linked lists, and deleting the offline message of which the cache address is not recorded by the offline message linked list according to the comparison result.
In a second aspect, an embodiment of the present application provides an offline message management device for an internet of things, including an offline inspection module, an offline cache module, a linked list update module, and a message push module, where:
the offline checking module is used for responding to the offline state of the terminal of the Internet of things and establishing an offline message linked list for the terminal of the Internet of things;
the offline cache module is used for determining the internet of things terminals to which the push messages sent by the service platform point, and determining whether the internet of things terminals in an offline state exist in the pointed internet of things terminals;
the linked list updating module is used for caching the push message into an offline message based on the internet of things terminal in an offline state, and recording the offline message in an offline message linked list corresponding to the internet of things terminal;
the message pushing module is used for responding to the online of the Internet of things terminal, determining to acquire an offline message based on the offline message linked list corresponding to the Internet of things terminal, and sending the offline message to the Internet of things terminal.
In a third aspect, an embodiment of the present application provides an internet of things offline message management device, including: a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of internet of things offline message management as described in the first aspect.
In a fourth aspect, embodiments of the present application provide a storage medium containing computer-executable instructions for performing the method of internet of things offline message management as set forth in the first aspect when executed by a computer processor.
According to the embodiment of the application, when the terminal of the Internet of things is offline, the offline message linked list is established for the terminal of the Internet of things, when the terminal of the Internet of things in an offline state exists in the terminal of the Internet of things pointed by the push message sent by the service platform, the push message is cached as the offline message and recorded in the corresponding offline message linked list, when the terminal of the Internet of things is on line again, the corresponding offline message is obtained based on the corresponding offline message linked list and sent to the terminal of the Internet of things, the push message sent by the service platform can be accurately sent to the terminal of the Internet of things, normal work of the terminal of the Internet of things is guaranteed, and normal management of the information of the Internet.
Drawings
Fig. 1 is a flowchart of an internet of things offline message management method according to an embodiment of the present disclosure;
fig. 2 is a flowchart of another method for managing offline messages of the internet of things according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an internet of things offline message management apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an internet of things offline message management device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, specific embodiments of the present application will be described in detail with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some but not all of the relevant portions of the present application are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Fig. 1 is a flowchart of an internet of things offline message management method according to an embodiment of the present disclosure, where the internet of things offline message management method according to the embodiment of the present disclosure may be executed by an internet of things offline message management device, and the internet of things offline message management device may be implemented in a hardware and/or software manner and integrated in an internet of things offline message management device.
The following description will be given by taking an example of a method for executing the internet of things offline message management by the internet of things offline message management device. Referring to fig. 1, the internet of things offline message management method includes:
s101: and responding to the offline state of the terminal of the Internet of things, and establishing an offline message linked list for the terminal of the Internet of things.
The internet of things offline message management device provided by the embodiment is in communication connection with the service platform through an internet network, and the internet of things offline message management device and the plurality of internet of things terminals are connected in the internet of things network. The Internet of things terminal subscribes topic messages from the service platform based on the MQTT protocol, and when the service platform generates messages to be pushed corresponding to a certain topic, the service platform generates push messages pointing to the Internet of things terminal (equipment ID) subscribed with the corresponding topic and sends the push messages to the Internet of things offline message management device.
Illustratively, the internet of things offline message management device determines that the internet of things terminal is in an online state or an offline state according to a heartbeat data packet uploaded by the internet of things terminal, and when the internet of things terminal is determined to be in the offline state, an offline message linked list is created for the internet of things terminal based on a Redis database, and a corresponding relation between the offline message linked list and a device ID of the corresponding internet of things terminal is determined. The offline message linked list is used for recording offline messages which need to be sent to the terminal of the internet of things.
S102: the method comprises the steps of determining the Internet of things terminals pointed by push messages sent by a service platform, and determining whether the pointed Internet of things terminals have the Internet of things terminals in an off-line state.
Illustratively, after receiving the push message sent by the service platform, the internet of things offline message management device analyzes the push message to determine the device ID carried by the push message, and can determine the internet of things terminal to which the push message is directed according to the device ID. It can be understood that one push message may be directed to multiple internet of things terminals, that is, multiple internet of things terminals may subscribe to the same topic from the service platform at the same time.
Further, after the internet of things terminal pointed by the push message is determined, whether the internet of things terminal is on line or not can be obtained according to the heartbeat timestamp corresponding to the heartbeat data packet which is sent by the internet of things terminal latest. It can be understood that if the distance between the heartbeat timestamp corresponding to the heartbeat data packet and the current time does not exceed the set time threshold, it can be determined that the corresponding internet of things terminal is online, and a push message is sent to the online internet of things terminal, and if the distance between the heartbeat timestamp corresponding to the heartbeat data packet and the current time exceeds the set time threshold, it is determined that the corresponding internet of things terminal is in an offline state.
S103: and caching the push message into an offline message based on the Internet of things terminal in an offline state, and recording the offline message in an offline message linked list corresponding to the Internet of things terminal.
Illustratively, when an internet of things terminal in an offline state exists in the internet of things terminals to which the push message points, the push message is normally sent to the internet of things terminal in the online state, and then the offline message is cached as the offline message.
Further, the internet of things terminal in the offline state corresponding to the offline message is determined (i.e., the internet of things terminal in the offline state determined in step S102), and the corresponding offline message linked list is determined based on the device IDs of the internet of things terminals (if the corresponding offline message linked list is not retrieved, an offline message linked list is newly established for the corresponding internet of things terminal), and the offline message is recorded in the offline message linked lists.
S104: and responding to the online of the terminal of the Internet of things, determining to acquire an offline message based on the offline message linked list corresponding to the terminal of the Internet of things, and sending the offline message to the terminal of the Internet of things.
Illustratively, when the internet of things terminal is on line again (the state is changed from the off-line state to the on-line state), the internet of things terminal sends a heartbeat data packet to the internet of things off-line message management device, and whether the internet of things terminal is on line again can be determined based on the heartbeat data packet.
Illustratively, when the terminal of the internet of things is online, the offline message linked list corresponding to the terminal of the internet of things is obtained according to the device ID, the offline message is obtained according to the offline message linked list, and the obtained offline message is sent to the terminal of the internet of things.
In a possible embodiment, after an offline message is successfully sent to the internet of things terminal which is online, the offline message linked list corresponding to the internet of things terminal is deleted.
The offline message linked list is created for the terminal of the internet of things when the terminal of the internet of things is offline, the pushed message is cached as the offline message and recorded in the corresponding offline message linked list when the terminal of the internet of things pointed by the pushed message sent by the service platform exists in the terminal of the internet of things in the offline state, the corresponding offline message is obtained based on the corresponding offline message linked list and sent to the terminal of the internet of things when the terminal of the internet of things is on line again, the pushed message sent by the service platform can be accurately sent to the terminal of the internet of things, normal work of the terminal of the internet of things is guaranteed, and normal management of the message of the internet of things is guaranteed.
On the basis of the foregoing embodiments, fig. 2 is a flowchart of another method for managing an offline message of the internet of things according to an embodiment of the present application, which is an embodiment of the method for managing an offline message of the internet of things. Referring to fig. 2, the internet of things offline message management method includes:
s201: receiving heartbeat data packets uploaded by all internet of things terminals at regular time, and determining that all the internet of things terminals are in an online state or an offline state according to the heartbeat data packets.
Specifically, after each internet of things terminal is successfully accessed to the internet of things network, a heartbeat data packet is regularly sent to the internet of things offline message management device, and the heartbeat data packet records a device ID corresponding to the internet of things terminal and a heartbeat timestamp for generating the heartbeat data packet.
The internet of things offline message management device receives heartbeat data packets uploaded by the internet of things terminal at regular time, determines corresponding equipment ID according to the heartbeat data packets, records heartbeat time stamps corresponding to the equipment ID and receiving the heartbeat data packets latest, confirms whether the distance between the corresponding heartbeat time stamps and the current time exceeds a set time threshold value or not based on the equipment ID, determines that the internet of things terminal is in an offline state if the distance exceeds the set time threshold value, and determines that the internet of things terminal is in an online state if the distance does not exceed the set time threshold value.
S202: and responding to the offline state of the terminal of the Internet of things, and establishing an offline message linked list for the terminal of the Internet of things.
S203: the method comprises the steps of determining the Internet of things terminals pointed by push messages sent by a service platform, and determining whether the pointed Internet of things terminals have the Internet of things terminals in an off-line state.
S204: judging whether the push message is an instant message or not based on the existence of the internet of things terminal in an offline state, if so, discarding the push message when the number of times of retransmission of the push message reaches a retransmission threshold value; otherwise, caching the push message as an offline message.
Specifically, when an internet of things terminal in an offline state exists in the internet of things terminals pointed by the push message, the push message is analyzed, a field corresponding to the type of the instant message in the push message is determined, and whether the push message is the instant message or not can be determined according to the field.
It should be explained that the instant message can be understood as a push message that needs the internet of things terminal to respond in time, after the response aging of the instant message is passed, the internet of things terminal does not need to respond to the push message, otherwise, the normal operation of the device is affected. When the service platform sends the push message, a corresponding mark is added in a field of the push message corresponding to the instant message type according to whether the push message is the instant message, and whether the push message is the instant message can be determined according to the mark.
Further, if the push message is an instant message, the push message is sent to the internet of things terminal again according to the device ID until the retransmission times reach the retransmission threshold, and the push message is discarded when the retransmission times reach the retransmission threshold. If the push message is a non-instant message, after the push message is successfully sent to the terminal of the internet of things in an online state, caching the push message as an offline message, and determining a cache address of the offline message.
S205: determining an offline message linked list corresponding to the internet of things terminal in an offline state, determining a cache address of the offline message, and recording the cache address to the determined offline message linked list.
The offline message link list provided by the present embodiment further records message timeliness, conflict types, and message types of the offline message, where the conflict types include a conflict-free type and a conflict type.
Specifically, after the push message is cached as an offline message and a cache address of the offline message is determined, the internet of things terminals in an offline state to which the determined push message points are determined, and offline message linked lists corresponding to the internet of things terminals are determined.
Further, a cache address of the offline message is determined, the cache address is recorded into the determined offline message linked list, and the message aging, the conflict type and the message type of the offline message are correspondingly recorded in the offline message linked list according to fields which are recorded in the push message and reflect the message aging, the conflict type and the message type.
In a possible embodiment, the recording the cache address to the determined offline message linked list specifically includes steps S2051 to S2055:
s2051: and judging whether the conflict type of the offline message is a conflict-free type. If so, go to step S2053, otherwise, go to step S2052.
Optionally, the data recorded in the offline message is consistent with the push message, that is, the offline message also records fields with response message aging, conflict type, and message type. And determining the conflict type of the offline message according to the field which reflects the conflict type in the offline message, if the conflict type is a conflict-free type, jumping to the step S2053, and if the conflict type is a conflict-containing type, jumping to the step S2052.
S2052: and directly recording the cache address to the determined offline message linked list.
And if the conflict type of the offline message is a conflict-free type, adding the cache address of the offline message to the offline message linked list corresponding to each determined internet of things terminal in the offline state, and recording the corresponding message timeliness, conflict type and message type in the offline message linked list.
S2053: and determining the message type of the offline message, and judging whether the offline message linked list of the Internet of things terminal records the same message type. And if so, jumping to step S2054, otherwise, jumping to step S2055.
If the conflict type of the offline message is a conflict type, the message type of the offline message is further determined according to the field which reflects the message type in the offline message. After the message type of the offline message is determined, whether a message type consistent with the message type corresponding to the current offline message is recorded in each offline message linked list is sequentially determined for each offline message linked list, if so, the step S2054 is skipped, otherwise, the step S2055 is skipped.
S2054: and replacing the cache address corresponding to the same message type in the offline message linked list by the cache address.
If the same message type is recorded in the offline message linked list, replacing the cache address of the current offline message with the cache address corresponding to the same message type originally recorded in the offline message linked list, and recording the corresponding message timeliness, conflict type and message type in the offline message linked list.
S2055: otherwise, directly recording the cache address to the determined offline message linked list.
If the same message type is not recorded in the offline message linked list, the cache address is directly recorded in the offline message linked list corresponding to the internet of things terminal, and the corresponding message timeliness, conflict type and message type are recorded in the offline message linked list.
In a possible embodiment, after recording the cache address to the determined offline message linked list, the method further includes: and maintaining the offline message linked list according to the message timeliness corresponding to each offline message in the offline message linked list.
Specifically, the message aging corresponding to each cache address in each offline message linked list is traversed according to a set time interval, and when the current time exceeds the message aging, the corresponding cache address, the corresponding message aging, the corresponding conflict type and the corresponding message type are deleted from the offline message linked list. And meanwhile, checking whether a cache address is recorded in the offline message linked list or not, and if not, deleting the offline message linked list to realize the maintenance of the offline message linked list.
S206: and responding to the online of the terminal of the Internet of things, determining to acquire an offline message based on the offline message linked list corresponding to the terminal of the Internet of things, and sending the offline message to the terminal of the Internet of things.
S207: deleting the offline message linked list corresponding to the online Internet of things terminal, comparing the cache address of the cached offline message with the cache addresses in the offline message linked lists, and deleting the offline message of which the cache address is not recorded by the offline message linked list according to the comparison result.
Specifically, after responding to the online of the terminal of the internet of things and successfully sending all offline messages recorded by the offline message linked list to the terminal of the internet of things, the offline message linked list corresponding to the terminal of the internet of things is deleted.
Further, the cache addresses of all cached offline messages and the cache addresses recorded in all offline message linked lists are obtained. And aiming at the cache address of each offline message, comparing the cache address of the offline message with the cache addresses recorded in each offline message linked list in sequence until the cache address consistent with the cache address of the offline message is found in the offline message linked list, searching the cache address of the next offline message, and if the cache address of the offline message is not found by traversing all the cache addresses recorded in the offline message linked lists, considering that the cache address corresponding to the offline message is not recorded by the offline message linked list, deleting the offline message, and reducing the occupation of the offline message on the cache space.
The offline message linked list is created for the terminal of the internet of things when the terminal of the internet of things is offline, the pushed message is cached as the offline message and recorded in the corresponding offline message linked list when the terminal of the internet of things pointed by the pushed message sent by the service platform exists in the terminal of the internet of things in the offline state, the corresponding offline message is obtained based on the corresponding offline message linked list and sent to the terminal of the internet of things when the terminal of the internet of things is on line again, the pushed message sent by the service platform can be accurately sent to the terminal of the internet of things, normal work of the terminal of the internet of things is guaranteed, and normal management of the message of the internet of things is guaranteed. Meanwhile, the offline message linked list is maintained based on the message timeliness of the offline message, so that the effective offline message is transmitted to the Internet of things terminal, the offline message linked list is updated according to the conflict type and the message type of the offline message, and the situation that the normal work is influenced because the terminal of the Internet of things receives the conflicting offline message is reduced.
Fig. 3 is a schematic structural diagram of an internet of things offline message management device according to an embodiment of the present application. As shown in fig. 3, the internet of things offline message management apparatus includes an offline checking module 31, an offline caching module 32, a linked list updating module 33, and a message pushing module 34.
The offline checking module 31 is configured to, in response to an offline state of an internet of things terminal, create an offline message linked list for the internet of things terminal; the offline cache module 32 is configured to determine an internet of things terminal to which a push message sent by a service platform points, and determine whether an internet of things terminal in an offline state exists in the pointed internet of things terminal; the linked list updating module 33 is configured to cache the push message as an offline message based on the presence of the internet of things terminal in an offline state, and record the offline message in an offline message linked list corresponding to the internet of things terminal; the message pushing module 34 is configured to, in response to the online of the internet of things terminal, determine to obtain an offline message based on the offline message linked list corresponding to the internet of things terminal, and send the offline message to the internet of things terminal.
The offline message linked list is created for the terminal of the internet of things when the terminal of the internet of things is offline, the pushed message is cached as the offline message and recorded in the corresponding offline message linked list when the terminal of the internet of things pointed by the pushed message sent by the service platform exists in the terminal of the internet of things in the offline state, the corresponding offline message is obtained based on the corresponding offline message linked list and sent to the terminal of the internet of things when the terminal of the internet of things is on line again, the pushed message sent by the service platform can be accurately sent to the terminal of the internet of things, normal work of the terminal of the internet of things is guaranteed, and normal management of the message of the internet of things is guaranteed.
The embodiment of the application also provides the Internet of things offline message management equipment, and the Internet of things offline message management equipment can be integrated with the Internet of things offline message management device provided by the embodiment of the application. Fig. 4 is a schematic structural diagram of an internet of things offline message management device according to an embodiment of the present application. Referring to fig. 4, the internet of things offline message management apparatus includes: an input device 43, an output device 44, a memory 42, and one or more processors 41; the memory 42 for storing one or more programs; when executed by the one or more processors 41, the one or more programs cause the one or more processors 41 to implement the method for managing offline messages of the internet of things as provided in the above embodiments. Wherein the input device 43, the output device 44, the memory 42 and the processor 41 may be connected by a bus or other means, for example, in fig. 4.
The memory 42, which is a storage medium readable by a computing device, can be used to store software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the internet of things offline message management method according to any embodiment of the present application (for example, the offline checking module 31, the offline caching module 32, the linked list updating module 33, and the message pushing module 34 in the internet of things offline message management apparatus). The memory 42 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the device, and the like. Further, the memory 42 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 42 may further include memory located remotely from processor 41, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 43 may be used to receive input numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 44 may include a display device such as a display screen.
The processor 41 executes various functional applications and data processing of the device by executing software programs, instructions and modules stored in the memory 42, so as to implement the above-mentioned internet of things offline message management method.
The internet of things offline message management device, the internet of things offline message management equipment and the internet of things offline message management computer can be used for executing the internet of things offline message management method provided by any embodiment, and have corresponding functions and beneficial effects.
Embodiments of the present application further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the method for managing offline messages of the internet of things provided in the foregoing embodiments, where the method for managing offline messages of the internet of things includes: in response to the offline state of the terminal of the Internet of things, establishing an offline message linked list for the terminal of the Internet of things; determining the Internet of things terminals pointed by a push message sent by a service platform, and determining whether the pointed Internet of things terminals have the Internet of things terminals in an offline state; caching the push message into an offline message based on the internet of things terminal in an offline state, and recording the offline message in an offline message linked list corresponding to the internet of things terminal; and responding to the online of the terminal of the Internet of things, determining to acquire an offline message based on the offline message linked list corresponding to the terminal of the Internet of things, and sending the offline message to the terminal of the Internet of things.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium provided in this embodiment of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the method for managing offline messages of the internet of things described above, and may also perform related operations in the method for managing offline messages of the internet of things provided in any embodiment of the present application.
The device, the apparatus, and the storage medium for managing offline messages of the internet of things provided in the foregoing embodiments may execute the method for managing offline messages of the internet of things provided in any embodiment of the present application, and reference may be made to the method for managing offline messages of the internet of things provided in any embodiment of the present application without detailed technical details described in the foregoing embodiments.
The foregoing is considered as illustrative of the preferred embodiments of the invention and the technical principles employed. The present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the claims.
Claims (10)
1. An Internet of things offline message management method is characterized by comprising the following steps:
in response to the offline state of the terminal of the Internet of things, establishing an offline message linked list for the terminal of the Internet of things;
determining the Internet of things terminals pointed by a push message sent by a service platform, and determining whether the pointed Internet of things terminals have the Internet of things terminals in an offline state;
caching the push message into an offline message based on the internet of things terminal in an offline state, and recording the offline message in an offline message linked list corresponding to the internet of things terminal;
and responding to the online of the terminal of the Internet of things, determining to acquire an offline message based on the offline message linked list corresponding to the terminal of the Internet of things, and sending the offline message to the terminal of the Internet of things.
2. The internet of things offline message management method of claim 1, wherein before creating an offline message linked list for the internet of things terminal in response to an offline state of the internet of things terminal, the method further comprises:
receiving heartbeat data packets uploaded by all internet of things terminals at regular time, and determining that all the internet of things terminals are in an online state or an offline state according to the heartbeat data packets.
3. The internet of things offline message management method according to claim 1, wherein the recording of the offline message in an offline message linked list corresponding to the internet of things terminal includes:
determining an offline message linked list corresponding to the Internet of things terminal in an offline state;
and determining a cache address of the offline message, and recording the cache address to the determined offline message linked list.
4. The internet of things offline message management method according to claim 3, wherein the offline message linked list further records a message age of the offline message;
after the step of recording the cache address to the determined offline message linked list, the method further includes:
and maintaining the offline message linked list according to the message timeliness corresponding to each offline message in the offline message linked list.
5. The internet of things offline message management method according to claim 3, wherein the offline message linked list further records a conflict type and a message type of the offline message, and the conflict type includes a conflict-free type and a conflict type;
the recording the cache address to the determined offline message linked list includes:
determining a conflict type of the offline message, and if the conflict type is a conflict-free type, directly recording the cache address to the determined offline message linked list;
if the conflict type is a conflict type, determining the message type of the offline message, and judging whether the offline message linked list of the terminal of the Internet of things records the same message type;
if the same message type exists, replacing the cache address corresponding to the same message type in the offline message linked list by the cache address, otherwise, directly recording the cache address to the determined offline message linked list.
6. The internet of things offline message management method of claim 1, wherein the caching the push message as an offline message comprises:
judging whether the push message is an instant message or not, if so, discarding the push message when the retransmission times of the push message reach a retransmission threshold value; otherwise, caching the push message as an offline message.
7. The internet of things offline message management method of claim 1, further comprising, after sending the offline message to the internet of things terminal:
deleting the offline message linked list corresponding to the online Internet of things terminal, comparing the cache address of the cached offline message with the cache addresses in the offline message linked lists, and deleting the offline message of which the cache address is not recorded by the offline message linked list according to the comparison result.
8. The utility model provides a thing networking off-line message management device which characterized in that, includes off-line inspection module, off-line buffer module, linked list update module and message propelling movement module, wherein:
the offline checking module is used for responding to the offline state of the terminal of the Internet of things and establishing an offline message linked list for the terminal of the Internet of things;
the offline cache module is used for determining the internet of things terminals to which the push messages sent by the service platform point, and determining whether the internet of things terminals in an offline state exist in the pointed internet of things terminals;
the linked list updating module is used for caching the push message into an offline message based on the internet of things terminal in an offline state, and recording the offline message in an offline message linked list corresponding to the internet of things terminal;
the message pushing module is used for responding to the online of the Internet of things terminal, determining to acquire an offline message based on the offline message linked list corresponding to the Internet of things terminal, and sending the offline message to the Internet of things terminal.
9. An internet of things offline message management device, comprising: a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the internet of things offline message management method of any of claims 1-7.
10. A storage medium containing computer-executable instructions, which when executed by a computer processor, perform the method of internet of things offline message management of any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011531282.XA CN112559219A (en) | 2020-12-22 | 2020-12-22 | Internet of things offline message management method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011531282.XA CN112559219A (en) | 2020-12-22 | 2020-12-22 | Internet of things offline message management method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112559219A true CN112559219A (en) | 2021-03-26 |
Family
ID=75031681
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011531282.XA Pending CN112559219A (en) | 2020-12-22 | 2020-12-22 | Internet of things offline message management method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112559219A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113709257A (en) * | 2021-10-09 | 2021-11-26 | 天翼物联科技有限公司 | Message cache expiration monitoring method, device, equipment and medium |
CN114172944A (en) * | 2021-11-04 | 2022-03-11 | 航天信息股份有限公司 | Message pushing method and system based on Internet of things access platform |
WO2023116701A1 (en) * | 2021-12-23 | 2023-06-29 | 天翼物联科技有限公司 | Data information pushing method and apparatus based on internet of things platform, and device and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101242357A (en) * | 2008-01-17 | 2008-08-13 | 中兴通讯股份有限公司 | A realization method for mobile IP user notification service |
CN105323205A (en) * | 2014-05-30 | 2016-02-10 | 中兴通讯股份有限公司 | Message pushing processing method, message pushing processing device, pushing server and application server |
CN105471700A (en) * | 2014-08-06 | 2016-04-06 | 腾讯科技(北京)有限公司 | Information processing method, information processing device and information processing system |
CN105591810A (en) * | 2015-10-22 | 2016-05-18 | 杭州华三通信技术有限公司 | Backup information sending method and device |
CN111371854A (en) * | 2020-02-24 | 2020-07-03 | 南京甄视智能科技有限公司 | Method and device for sending offline message in Internet of things, storage medium and server |
-
2020
- 2020-12-22 CN CN202011531282.XA patent/CN112559219A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101242357A (en) * | 2008-01-17 | 2008-08-13 | 中兴通讯股份有限公司 | A realization method for mobile IP user notification service |
CN105323205A (en) * | 2014-05-30 | 2016-02-10 | 中兴通讯股份有限公司 | Message pushing processing method, message pushing processing device, pushing server and application server |
CN105471700A (en) * | 2014-08-06 | 2016-04-06 | 腾讯科技(北京)有限公司 | Information processing method, information processing device and information processing system |
CN105591810A (en) * | 2015-10-22 | 2016-05-18 | 杭州华三通信技术有限公司 | Backup information sending method and device |
CN111371854A (en) * | 2020-02-24 | 2020-07-03 | 南京甄视智能科技有限公司 | Method and device for sending offline message in Internet of things, storage medium and server |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113709257A (en) * | 2021-10-09 | 2021-11-26 | 天翼物联科技有限公司 | Message cache expiration monitoring method, device, equipment and medium |
CN113709257B (en) * | 2021-10-09 | 2024-04-23 | 天翼物联科技有限公司 | Message cache out-of-date monitoring method, device, equipment and medium |
CN114172944A (en) * | 2021-11-04 | 2022-03-11 | 航天信息股份有限公司 | Message pushing method and system based on Internet of things access platform |
WO2023116701A1 (en) * | 2021-12-23 | 2023-06-29 | 天翼物联科技有限公司 | Data information pushing method and apparatus based on internet of things platform, and device and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112559219A (en) | Internet of things offline message management method, device, equipment and storage medium | |
WO2016061898A1 (en) | Method and system for accessing channel of live broadcast room | |
US20080168122A1 (en) | Publish/subscribe system | |
CN110413650B (en) | Method, device, equipment and storage medium for processing service data | |
CN110740145B (en) | Message consumption method and device, storage medium and electronic equipment | |
CN112367149B (en) | Message acquisition method, device, equipment and storage medium | |
CN113596017B (en) | Protocol analysis method and device, soft gateway and storage medium | |
CN112929241A (en) | Network testing method and device | |
CN114500633B (en) | Data forwarding method, related device, program product and data transmission system | |
CN114244752A (en) | Flow statistical method, device and equipment | |
CN109286684B (en) | Communication connection processing method and device, proxy server and storage medium | |
CN113411152B (en) | DMA method for supporting high-certainty network message receiving for TSN end system | |
CN112838980B (en) | Message processing method, system, device, electronic equipment and storage medium | |
US11334623B2 (en) | Key value store using change values for data properties | |
CN108183926B (en) | Data packet processing method and device | |
US11714692B2 (en) | Classical management of qubit requests | |
CN113645008B (en) | Message protocol timeout retransmission method and system based on linked list | |
CN109040168A (en) | Block chain information transmission method, electronic equipment, storage medium and system | |
CN112559220A (en) | Internet of things offline message sending method, device, equipment and storage medium | |
US20220046108A1 (en) | Local interconnect network (lin) messaging between lin partitions separated by a backbone communication network | |
US20120278409A1 (en) | Mail system | |
CN111061744B (en) | Graph data updating method and device, computer equipment and storage medium | |
CN114374705A (en) | Service cluster and message pushing method | |
CN109309583B (en) | Information acquisition method and device based on distributed system, electronic equipment and medium | |
CN114697147B (en) | Equipment searching method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210326 |