CN113596619A - Fire-fighting Internet of things multi-device state judgment method, device, equipment and storage medium - Google Patents

Fire-fighting Internet of things multi-device state judgment method, device, equipment and storage medium Download PDF

Info

Publication number
CN113596619A
CN113596619A CN202110692477.0A CN202110692477A CN113596619A CN 113596619 A CN113596619 A CN 113596619A CN 202110692477 A CN202110692477 A CN 202110692477A CN 113596619 A CN113596619 A CN 113596619A
Authority
CN
China
Prior art keywords
equipment
internet
things
linked list
fire
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.)
Granted
Application number
CN202110692477.0A
Other languages
Chinese (zh)
Other versions
CN113596619B (en
Inventor
栗楠
吴思欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Panhai Data Technology Co ltd
Original Assignee
Shenzhen Panhai Data Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Panhai Data Technology Co ltd filed Critical Shenzhen Panhai Data Technology Co ltd
Priority to CN202110692477.0A priority Critical patent/CN113596619B/en
Publication of CN113596619A publication Critical patent/CN113596619A/en
Application granted granted Critical
Publication of CN113596619B publication Critical patent/CN113596619B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q9/00Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y40/00IoT characterised by the purpose of the information processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2854Wide area networks, e.g. public data networks
    • H04L12/2856Access arrangements, e.g. Internet access
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9015Buffering arrangements for supporting a linked list
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention discloses a method, a device, equipment and a storage medium for judging the state of multiple pieces of equipment of a fire-fighting Internet of things. According to the access mode of the Internet of things fire fighting equipment, the Internet of things fire fighting equipment is divided into normally connected equipment and normally connected equipment; receiving a first device message of the normally connected device, and judging the device online state of the normally connected device according to the first device message; receiving a second device message of the non-connected device, and judging the on-line state of the non-connected device according to the second device message; judging whether the frequently-connected equipment is disconnected from the communication connection with the Internet of things platform or not; if the equipment is disconnected, the frequently-connected equipment is judged to be in an equipment offline state; acquiring heartbeat timeout information of the non-connected equipment; and judging that the abnormal connection equipment is in an off-line state according to the heartbeat timeout information. The fire-fighting Internet of things multi-device state judging method can reliably and effectively judge the online and offline states of a plurality of fire-fighting devices on the Internet of things platform, and is high in accuracy.

Description

Fire-fighting Internet of things multi-device state judgment method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of Internet of things, in particular to a method, a device, equipment and a storage medium for judging the state of multiple pieces of equipment in the fire-fighting Internet of things.
Background
In the field of fire-fighting internet of things, an internet of things platform often needs to judge the online and offline states of equipment, and then the online condition of the equipment is displayed on the platform. The diversity of thing networking equipment producer and equipment type leads to thing networking fire equipment to connect the mode of thing networking platform eight flowers to on-line and off-line state that judges thing networking fire equipment for thing networking platform causes the difficulty. The mode that the IOT fire fighting equipment is connected with the IOT platform mainly comprises 1) forwarding an IOT fire fighting equipment message to the IOT platform by an operator platform, wherein the IOT fire fighting equipment is not directly connected with the IOT platform and has heartbeat; 2) the Internet of things fire fighting equipment is directly connected with the Internet of things platform, the Internet of things fire fighting equipment is often disconnected from the Internet of things platform and enters a dormant state, and a heartbeat exists; 3) the thing allies oneself with fire fighting equipment lug connection thing networking platform, thing allies oneself with fire fighting equipment can not the dormancy, and the connection keeps always, does not have the heartbeat. At present, when judging thing allies oneself with fire-fighting equipment and going on the line, the thing allies oneself with fire-fighting equipment of sign when thing allies oneself with fire-fighting equipment's connection is received to the thing networking platform often, then, thing networking platform can regularly collect thing allies oneself with fire-fighting equipment's message, resets the timer when receiving thing allies oneself with fire-fighting equipment's heartbeat or other messages, does not receive thing allies oneself with fire-fighting equipment message for a long time and can lead to the timer overtime, thereby think the equipment off-line, the timer often can be realized with the timer that thing networking platform programming language environment provided. Above-mentioned scheme, there will be some problems in the condition to actual thing networking equipment: 1) the Internet of things fire fighting equipment is not directly connected with the Internet of things platform, and when equipment information is forwarded by the operator platform, the Internet of things fire fighting equipment cannot be connected to judge to enable the Internet of things fire fighting equipment to be on line; 2) due to the fact that the network of the Internet of things equipment is unstable, when the Internet of things fire fighting equipment is on line, the platform is repeatedly connected, and therefore misjudgment is easily caused when the Internet of things platform establishes judgment equipment on line through connection;
3) the timer implementation described above is not applicable to multi-device timing schemes. Therefore, how to reliably and accurately judge the state of the internet of things fire fighting equipment becomes a problem to be solved urgently by technical personnel in the field.
Disclosure of Invention
Aiming at the defects, the embodiment of the invention provides a method, a device, equipment and a storage medium for judging the state of multiple pieces of equipment of a fire-fighting internet of things, and aims to solve the problems in the prior art.
In a first aspect, an embodiment of the present invention provides a method for determining a state of multiple devices in a fire protection internet of things, where the method includes:
dividing the Internet of things fire fighting equipment into normally connected equipment and normally connected equipment according to the access mode of the Internet of things fire fighting equipment;
the normally connected equipment is not dormant and always keeps connection with the Internet of things platform and has no heartbeat mechanism; the non-connected device dormancy and the Internet of things platform are not always connected and have a heartbeat mechanism, or the non-connected device is forwarded by an operator platform, and has a heartbeat mechanism;
receiving a first device message of the normally connected device, and judging the device online state of the normally connected device according to the first device message;
receiving a second device message of the non-connected device, and judging the on-line state of the non-connected device according to the second device message;
judging whether the normally connected equipment is disconnected from the communication connection with the Internet of things platform or not;
if the equipment is disconnected, the normally connected equipment is judged to be in an equipment offline state;
acquiring heartbeat timeout information of the non-connected equipment;
and judging that the non-connected equipment is in an off-line state according to the heartbeat timeout information.
Preferably, the acquiring heartbeat timeout information of the very connected device includes:
and the overtime judgment of the heartbeat overtime information is realized by a globally shared ordered linked list timer.
Preferably, the timeout determination of the heartbeat timeout information is implemented by a globally shared ordered linked list timer, and includes:
calling an ordered linked list interface to transmit a timed overtime callback function;
writing an overtime index and matters needing to be finished in overtime in the callback function;
and calling the ID of the non-connected equipment and the timed millisecond number in the ordered linked list to write the ordered linked list into the ordered linked list by an ordered linked list interface.
Preferably, the ordered linked list manager includes:
providing an installation interface of an overtime callback function for an application program and a writing interface for writing data into the ordered linked list; wherein an application characterizes a timing application of a very connected device;
when the data are controlled to be inserted into the ordered linked list, the ordered linked list is ordered according to the weight value of the inserted data;
taking out the first 10 data of the ordered linked list every second at regular time, comparing the data with the millisecond number of the current time, and judging whether the time is out;
if yes, calling an overtime callback function, and deleting the overtime data in the chain table.
Preferably, when the control inserts data into the ordered linked list, the ordering of the ordered linked list according to the weight value of the inserted data includes:
controlling the data inserted into the ordered link list to be arranged in an ascending order according to the weight value;
adding a mutual exclusion lock when operating the ordered linked list;
and controlling the mutually exclusive lock to be released in a timeout mode.
Preferably, in the ordered linked list, the writing the ID of the very-connected device and the timed millisecond number into the ordered linked list by calling an ordered linked list interface comprises:
searching whether the ID of the very-connected equipment to be set exists in the ordered linked list or not;
if yes, abandoning the inserted data;
and if not, inserting data into the ordered linked list.
Preferably, when the control inserts data into the ordered linked list, the ordering of the ordered linked list according to the weight value of the inserted data includes:
each data in the ordered list contains two fields, the non-connected device ID and the number of milliseconds of non-connected device timing, the sum of the number of milliseconds of non-connected device timing and the number of milliseconds of the current time being equal to the weight value.
In a second aspect, an embodiment of the present invention provides a device for determining a state of multiple devices in a fire protection internet of things, where the device includes:
the classification module is used for dividing the Internet of things fire fighting equipment into normally connected equipment and normally connected equipment according to the access mode of the Internet of things fire fighting equipment;
the normally connected equipment is not dormant and always keeps connection with the Internet of things platform and has no heartbeat mechanism; the non-connected device dormancy and the Internet of things platform are not always connected and have a heartbeat mechanism, or the non-connected device is forwarded by an operator platform, and has a heartbeat mechanism;
the first online judging module is used for receiving a first device message of the normally connected device and judging the online state of the normally connected device according to the first device message;
the second online judging module is used for receiving a second device message of the unconnected device and judging the online state of the unconnected device according to the second device message;
the communication connection judging module is used for judging whether the normally connected equipment is disconnected from the communication connection with the Internet of things platform or not;
the first offline judgment module is used for judging that the frequently-connected equipment is in an equipment offline state if the frequently-connected equipment is disconnected;
the heartbeat timeout information acquisition module is used for acquiring heartbeat timeout information of the disconnected equipment;
and the second off-line judgment module is used for judging that the unconnected equipment is in an equipment off-line state according to the heartbeat timeout information.
In a third aspect, an embodiment of the present invention provides a multiple device status determining device for a fire fighting internet of things, including: at least one processor, at least one memory, and computer program instructions stored in the memory, which when executed by the processor, implement the method of the first aspect of the embodiments described above.
In a fourth aspect, embodiments of the present invention provide a storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of the first aspect in the above embodiments.
In summary, the method, the apparatus, the device and the storage medium for judging the state of multiple devices of the fire-fighting internet of things are provided by the embodiments of the present invention. According to the access mode of the Internet of things fire fighting equipment, the Internet of things fire fighting equipment is divided into normally connected equipment and normally connected equipment; the normally connected equipment is not dormant and always keeps connection with the Internet of things platform and has no heartbeat mechanism; the non-connected device dormancy and the Internet of things platform are not always connected and have a heartbeat mechanism, or the non-connected device is forwarded by an operator platform, and has a heartbeat mechanism; receiving a first device message of the normally connected device, and judging the device online state of the normally connected device according to the first device message; receiving a second device message of the non-connected device, and judging the on-line state of the non-connected device according to the second device message; judging whether the normally connected equipment is disconnected from the communication connection with the Internet of things platform or not; if the equipment is disconnected, the normally connected equipment is judged to be in an equipment offline state; acquiring heartbeat timeout information of the non-connected equipment; and judging that the non-connected equipment is in an off-line state according to the heartbeat timeout information. Therefore, the fire-fighting Internet of things multi-device state judging method can reliably and effectively judge the online and offline states of a plurality of fire-fighting devices on the Internet of things platform, and is high in accuracy.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for judging the state of multiple devices of the fire-fighting internet of things according to the embodiment of the invention.
Fig. 2 is a flowchart of the timeout determination of the heartbeat timeout information in the method for determining the state of multiple devices in the fire-fighting internet of things according to the embodiment of the invention, which is implemented by a globally shared ordered linked list timer.
Fig. 3 is a flowchart of the ordered linked list management program of the method for judging the state of multiple devices in the fire-fighting internet of things according to the embodiment of the invention.
Fig. 4 is a flowchart illustrating that when the control inserts data into the ordered linked list in the method for judging the state of multiple devices in a fire fighting internet of things according to the embodiment of the invention, the ordered linked list is sorted according to the weight value of the inserted data.
Fig. 5 is a flowchart of the method for judging the state of multiple devices in the fire-fighting internet of things according to the embodiment of the present invention, where the ID of the non-connected device and the timed millisecond number are called from the ordered linked list to write into the ordered linked list through an ordered linked list interface.
FIG. 6 is a schematic diagram of an ordered linked list implementation multi-timer control method for a multi-device state judgment method of a fire-fighting Internet of things according to an embodiment of the invention.
Fig. 7 is a schematic structural diagram of a fire-fighting internet of things multi-device state judgment device according to an embodiment of the invention.
Fig. 8 is a schematic structural diagram of a multiple device state judgment device of the fire fighting internet of things according to an embodiment of the invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Referring to fig. 1, the embodiment of the invention provides a method for judging the states of multiple pieces of fire fighting equipment in the internet of things, and the method for judging the states of the multiple pieces of fire fighting equipment in the internet of things can reliably and effectively judge the online states and the offline states of the multiple pieces of fire fighting equipment on the internet of things platform, and is high in accuracy.
The method comprises the following steps:
s1, dividing the Internet of things fire fighting equipment into normally connected equipment and normally connected equipment according to the access mode of the Internet of things fire fighting equipment;
the normally connected equipment is not dormant and always keeps connection with the Internet of things platform and has no heartbeat mechanism; the non-connected device dormancy and the Internet of things platform are not always connected and have a heartbeat mechanism, or the non-connected device is forwarded by an operator platform, and has a heartbeat mechanism;
s2, receiving a first device message of the normally connected device, and judging the device online state of the normally connected device according to the first device message;
s3, receiving a second device message of the non-connected device, and judging the device online state of the non-connected device according to the second device message;
s4, judging whether the frequently-connected equipment is disconnected from the communication connection with the Internet of things platform;
s5, if the device is disconnected, judging that the frequently-connected device is in the device offline state;
s6, acquiring heartbeat timeout information of the non-connected equipment;
and S7, judging that the non-connected equipment is in an off-line state according to the heartbeat timeout information.
Specifically, the normally connected device and the non-normally connected device in this embodiment both consider the internet of things fire fighting device to be on-line when the internet of things platform receives the message of the internet of things fire fighting device, rather than establishing connection to judge that the internet of things fire fighting device is on-line, thereby effectively avoiding misjudgment on the on-line of the device; entering subsequent logic for judging the offline of the Internet of things fire fighting equipment after the Internet of things fire fighting equipment is on line; when the offline judgment is carried out on the Internet of things fire fighting equipment, the Internet of things fire fighting equipment is considered to be offline when the connection of the equipment is disconnected by the frequently-connected equipment; and the equipment is connected very much, and after the heartbeat of the equipment is overtime, the Internet of things fire-fighting equipment is considered to be offline.
Preferably, the acquiring heartbeat timeout information of the very connected device includes:
and the overtime judgment of the heartbeat overtime information is realized by a globally shared ordered linked list timer.
Preferably, referring to fig. 2, the timeout determination of the heartbeat timeout information is implemented by a globally shared ordered list timer, and includes:
s61, calling the ordered linked list interface to transfer the timed overtime callback function;
s62, writing the overtime index and the items to be completed in the callback function;
and S63, in the ordered linked list, calling the ID of the non-connected equipment and the timed millisecond number to write the ordered linked list into the ordered linked list by the ordered linked list interface.
Preferably, referring to fig. 5, said writing the ID of the non-connected device and the timed millisecond number in the ordered linked list into the ordered linked list by calling the ordered linked list interface comprises:
s631, searching whether the ID of the non-connected equipment to be set exists in the ordered linked list;
s632, if the data exists, discarding the inserted data;
and S633, inserting data into the ordered linked list if the data do not exist.
Preferably, referring to fig. 3, the ordered linked list management program includes:
s601, providing an installation interface for an application overtime callback function and a writing interface for writing data into the ordered linked list; wherein an application characterizes a timing application of a very connected device;
s602, when the data are inserted into the ordered linked list, the ordered linked list is controlled to be sorted according to the weight value of the inserted data;
s603, taking out the first 10 data of the ordered linked list every second at regular time, comparing the data with the millisecond number of the current time, and judging whether the time is out;
and S604, if the link table is overtime, calling an overtime callback function, and deleting the overtime data in the link table.
Preferably, referring to fig. 4, when controlling to insert data into the ordered linked list, the ordering of the ordered linked list according to the weight value of the inserted data includes:
s6021, controlling the data inserted into the ordered link list to be arranged in an ascending order according to the weight value;
s6022, adding a mutual exclusion lock when the ordered linked list is operated;
and S6023, controlling the mutual exclusion lock to be released overtime.
Preferably, when the control inserts data into the ordered linked list, the ordering of the ordered linked list according to the weight value of the inserted data includes:
each data in the ordered list contains two fields, the non-connected device ID and the number of milliseconds of non-connected device timing, the sum of the number of milliseconds of non-connected device timing and the number of milliseconds of the current time being equal to the weight value.
Preferably, referring to fig. 6, the timer of the non-connected device in this embodiment is implemented by using an ordered linked list, and the application program is: when the non-connected equipment needs timing, firstly calling a callback function with timing overtime transmitted by the ordered linked list interface, and writing an overtime index and matters needing to be finished when overtime is required in the callback function; wherein the timeout indicator characterizes whether the disconnected device sends information overtime; judging the offline of the abnormal connection equipment and deleting the ID of the abnormal connection equipment according to the heartbeat timeout information by the item characterization needing to be completed in time out; it calls the ordered list interface to write to the list with the device ID of the very connected device and the timed number of milliseconds.
The management program is as follows: providing an installation interface of a timed application overtime callback function of the non-connected equipment and an interface for writing data elements into the ordered linked list; the ordered linked list needs to ensure that the linked list can be sorted according to the weight values inserted when the data elements are inserted into the linked list every time, and the data elements in the linked list are arranged in an ascending order according to the weight values in the embodiment; because the ordered linked list is globally shared, a mutual exclusion lock is required to be added when the linked list is operated, and the mutual exclusion lock can be released overtime. Each data element in the ordered link list comprises two fields, namely a device ID of the non-connected device and the timing millisecond number of the non-connected device, wherein the timing millisecond number of the non-connected device plus the millisecond number of the current time is a weight value of ordered link list sequencing; the management program takes out the first 10 data elements of the ordered linked list every second at regular time and compares the data elements with the millisecond number of the current time to judge whether the time is overtime; if the time is out, calling a callback function of the time is out, wherein the parameters of the callback function are two fields of the equipment ID of the non-connected equipment and the millisecond number timed by the non-connected equipment, which are stored in the ordered chain table, and then deleting the elements of the time out in the chain table.
Preferably, in this embodiment, when the online state is determined, the internet of things platform receives a message of the internet of things fire fighting equipment, and sets the online state of the internet of things fire fighting equipment to be online; when the offline state is judged, if the offline state is abnormal connection equipment, starting a timer, and if the timer receives the information of the abnormal connection equipment before the timeout, the online state of the abnormal connection equipment is unchanged, and the system resets the timer; if no message of the non-connected equipment is received until the timer is overtime, the online state of the non-connected equipment is set to be an offline state; if the connection is disconnected, the online state of the normally connected equipment is set to be an offline state, otherwise, the normally connected equipment is kept to be the online state all the time.
Referring to fig. 7, an embodiment of the present invention provides a fire fighting internet of things multi-device state determination apparatus, where the apparatus includes:
the system comprises a classification module 1, a first communication module and a second communication module, wherein the classification module is used for dividing the Internet of things fire-fighting equipment into normally connected equipment and normally connected equipment according to an access mode of the Internet of things fire-fighting equipment;
the normally connected equipment is not dormant and always keeps connection with the Internet of things platform and has no heartbeat mechanism; the non-connected device dormancy and the Internet of things platform are not always connected and have a heartbeat mechanism, or the non-connected device is forwarded by an operator platform, and has a heartbeat mechanism;
the first online judging module 2 is configured to receive a first device message of the normally connected device, and judge a device online state of the normally connected device according to the first device message;
the second online judging module 3 is configured to receive a second device message of the non-connected device, and judge the device online state of the non-connected device according to the second device message;
the communication connection judging module 4 is used for judging whether the frequently-connected equipment is disconnected from the communication connection with the Internet of things platform or not by the judging module;
the first offline judgment module 5 is configured to judge that the frequently-connected device is in a device offline state if the frequently-connected device is disconnected;
a heartbeat timeout information obtaining module 6, configured to obtain heartbeat timeout information of the disconnected device;
and the second offline judgment module 7 is configured to judge, according to the heartbeat timeout information, that the unconnected device is in a device offline state.
In addition, the method for judging the state of multiple devices of the fire fighting internet of things in the embodiment of the invention described in conjunction with fig. 1 can be realized by a device for judging the state of multiple devices of the fire fighting internet of things. Fig. 8 shows a hardware structure diagram of a multiple device state judgment device of the fire fighting internet of things according to an embodiment of the invention.
The fire protection internet of things multi-device state determination device may include a processor 401 and a memory 402 storing computer program instructions.
Specifically, the processor 401 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured as one or more Integrated circuits implementing embodiments of the present invention.
Memory 402 may include mass storage for data or instructions. By way of example, and not limitation, memory 402 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, tape, or Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 402 may include removable or non-removable (or fixed) media, where appropriate. The memory 402 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 402 is a non-volatile solid-state memory. In a particular embodiment, the memory 402 includes Read Only Memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory or a combination of two or more of these.
The processor 401 reads and executes the computer program instructions stored in the memory 402 to implement any one of the above-described methods for determining the state of multiple devices in the fire protection internet of things.
In one example, the fire fighting internet of things multi-device state determination device may further include a communication interface 403 and a bus 410. As shown in fig. 8, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 to complete communication therebetween.
The communication interface 403 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiments of the present invention.
Bus 410 includes hardware, software, or both coupling the components of the fire protection internet of things multi-device status determining device to each other. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. Bus 410 may include one or more buses, where appropriate. Although specific buses have been described and shown in the embodiments of the invention, any suitable buses or interconnects are contemplated by the invention.
In addition, by combining the method for judging the states of multiple devices of the fire-fighting internet of things in the embodiment, the embodiment of the invention can be realized by providing a computer-readable storage medium. The computer readable storage medium having stored thereon computer program instructions; when executed by the processor, the computer program instructions implement any one of the fire protection internet of things multi-device state judgment methods in the embodiments.
In summary, the method, the apparatus, the device and the storage medium for judging the state of multiple devices of the fire-fighting internet of things are provided by the embodiments of the present invention. According to the access mode of the Internet of things fire fighting equipment, the Internet of things fire fighting equipment is divided into normally connected equipment and normally connected equipment; the normally connected equipment is not dormant and always keeps connection with the Internet of things platform and has no heartbeat mechanism; the non-connected device dormancy and the Internet of things platform are not always connected and have a heartbeat mechanism, or the non-connected device is forwarded by an operator platform, and has a heartbeat mechanism; receiving a first device message of the normally connected device, and judging the device online state of the normally connected device according to the first device message; receiving a second device message of the non-connected device, and judging the on-line state of the non-connected device according to the second device message; judging whether the normally connected equipment is disconnected from the communication connection with the Internet of things platform or not; if the equipment is disconnected, the normally connected equipment is judged to be in an equipment offline state; acquiring heartbeat timeout information of the non-connected equipment; and judging that the non-connected equipment is in an off-line state according to the heartbeat timeout information. Therefore, the fire-fighting Internet of things multi-device state judging method can reliably and effectively judge the online and offline states of a plurality of fire-fighting devices on the Internet of things platform, and is high in accuracy.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.

Claims (10)

1. A fire-fighting Internet of things multi-device state judgment method is characterized by comprising the following steps:
dividing the Internet of things fire fighting equipment into normally connected equipment and normally connected equipment according to the access mode of the Internet of things fire fighting equipment;
the normally connected equipment is not dormant and always keeps connection with the Internet of things platform and has no heartbeat mechanism; the non-connected device dormancy and the Internet of things platform are not always connected and have a heartbeat mechanism, or the non-connected device is forwarded by an operator platform, and has a heartbeat mechanism;
receiving a first device message of the normally connected device, and judging the device online state of the normally connected device according to the first device message;
receiving a second device message of the non-connected device, and judging the on-line state of the non-connected device according to the second device message;
judging whether the normally connected equipment is disconnected from the communication connection with the Internet of things platform or not;
if the equipment is disconnected, the normally connected equipment is judged to be in an equipment offline state;
acquiring heartbeat timeout information of the non-connected equipment;
and judging that the non-connected equipment is in an off-line state according to the heartbeat timeout information.
2. The fire-fighting internet of things multi-device state judgment method according to claim 1, wherein the acquiring heartbeat timeout information of the non-connected device comprises:
and the overtime judgment of the heartbeat overtime information is realized by a globally shared ordered linked list timer.
3. The fire-fighting internet of things multi-device state judgment method as claimed in claim 2, wherein the overtime judgment of the heartbeat timeout information is realized through a globally shared ordered linked list timer, and comprises the following steps:
calling an ordered linked list interface to transmit a timed overtime callback function;
writing an overtime index and matters needing to be finished in overtime in the callback function;
and calling the ID of the non-connected equipment and the timed millisecond number in the ordered linked list to write the ordered linked list into the ordered linked list by an ordered linked list interface.
4. The fire protection internet of things multi-device state judgment method as claimed in claim 2, wherein the ordered linked list management program comprises:
providing an installation interface of an overtime callback function for an application program and a writing interface for writing data into the ordered linked list; wherein an application characterizes a timing application of a very connected device;
when the data are controlled to be inserted into the ordered linked list, the ordered linked list is ordered according to the weight value of the inserted data;
taking out the first 10 data of the ordered linked list every second at regular time, comparing the data with the millisecond number of the current time, and judging whether the time is out;
if yes, calling an overtime callback function, and deleting the overtime data in the chain table.
5. The fire-fighting internet of things multi-device state judgment method according to claim 4, wherein when the control inserts data into the ordered linked list, the ordering of the ordered linked list according to the weight value of the inserted data comprises:
controlling the data inserted into the ordered link list to be arranged in an ascending order according to the weight value;
adding a mutual exclusion lock when operating the ordered linked list;
and controlling the mutually exclusive lock to be released in a timeout mode.
6. The fire-fighting internet of things multi-device state judgment method as claimed in claim 3, wherein the writing of the IDs of the non-connected devices and the timed milliseconds into the ordered linked list by calling an ordered linked list interface from the ordered linked list comprises:
searching whether the ID of the very-connected equipment to be set exists in the ordered linked list or not;
if yes, abandoning the inserted data;
and if not, inserting data into the ordered linked list.
7. The fire-fighting internet of things multi-device state judgment method according to claim 6, wherein when the control inserts data into the ordered linked list, the ordering of the ordered linked list according to the weight value of the inserted data comprises:
each data in the ordered list contains two fields, the non-connected device ID and the number of milliseconds of non-connected device timing, the sum of the number of milliseconds of non-connected device timing and the number of milliseconds of the current time being equal to the weight value.
8. The utility model provides a fire control thing networking multi-device state judges device which characterized in that, the device includes:
the classification module is used for dividing the Internet of things fire fighting equipment into normally connected equipment and normally connected equipment according to the access mode of the Internet of things fire fighting equipment;
the normally connected equipment is not dormant and always keeps connection with the Internet of things platform and has no heartbeat mechanism; the non-connected device dormancy and the Internet of things platform are not always connected and have a heartbeat mechanism, or the non-connected device is forwarded by an operator platform, and has a heartbeat mechanism;
the first online judging module is used for receiving a first device message of the normally connected device and judging the online state of the normally connected device according to the first device message;
the second online judging module is used for receiving a second device message of the unconnected device and judging the online state of the unconnected device according to the second device message;
the communication connection judging module is used for judging whether the normally connected equipment is disconnected from the communication connection with the Internet of things platform or not;
the first offline judgment module is used for judging that the frequently-connected equipment is in an equipment offline state if the frequently-connected equipment is disconnected;
the heartbeat timeout information acquisition module is used for acquiring heartbeat timeout information of the disconnected equipment;
and the second off-line judgment module is used for judging that the unconnected equipment is in an equipment off-line state according to the heartbeat timeout information.
9. The utility model provides a fire control thing networking multi-device state judgement equipment which characterized in that includes: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method of any of claims 1-7.
10. A storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1-7.
CN202110692477.0A 2021-06-22 2021-06-22 Fire-fighting Internet of things multi-equipment state judging method, device, equipment and storage medium Active CN113596619B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110692477.0A CN113596619B (en) 2021-06-22 2021-06-22 Fire-fighting Internet of things multi-equipment state judging method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110692477.0A CN113596619B (en) 2021-06-22 2021-06-22 Fire-fighting Internet of things multi-equipment state judging method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113596619A true CN113596619A (en) 2021-11-02
CN113596619B CN113596619B (en) 2023-11-24

Family

ID=78244304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110692477.0A Active CN113596619B (en) 2021-06-22 2021-06-22 Fire-fighting Internet of things multi-equipment state judging method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113596619B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314549A (en) * 2022-06-30 2022-11-08 青岛海尔科技有限公司 Offline device management method, storage medium and electronic device
CN117118876A (en) * 2023-10-20 2023-11-24 美云智数科技有限公司 Heartbeat connection detection method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301134A (en) * 2014-08-27 2015-01-21 烽火通信科技股份有限公司 Management method and system based on massive timers in software design
CN105071996A (en) * 2015-08-31 2015-11-18 浙江开盈信息科技有限公司 Terminal on-line detection method, terminal and server
CN105553685A (en) * 2015-10-13 2016-05-04 福州开发区慧聚通信技术有限公司 Network equipment online state monitoring system and method
US20170006135A1 (en) * 2015-01-23 2017-01-05 C3, Inc. Systems, methods, and devices for an enterprise internet-of-things application development platform
WO2018232961A1 (en) * 2017-06-19 2018-12-27 深圳市盛路物联通讯技术有限公司 Method and system for updating internet of things routing table in conjunction with convergence unit information
CN111634764A (en) * 2020-05-20 2020-09-08 无锡八英里电子科技有限公司 Internet of things terminal abnormity mutual diagnosis method under scene of multiple elevators in same machine room
CN112148567A (en) * 2020-09-24 2020-12-29 广东科徕尼智能科技有限公司 Intelligent device active operation and maintenance method, device and storage medium
CN112969064A (en) * 2021-02-08 2021-06-15 智洋创新科技股份有限公司 Redis cache timeout-based equipment online state calculation method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301134A (en) * 2014-08-27 2015-01-21 烽火通信科技股份有限公司 Management method and system based on massive timers in software design
US20170006135A1 (en) * 2015-01-23 2017-01-05 C3, Inc. Systems, methods, and devices for an enterprise internet-of-things application development platform
CN105071996A (en) * 2015-08-31 2015-11-18 浙江开盈信息科技有限公司 Terminal on-line detection method, terminal and server
CN105553685A (en) * 2015-10-13 2016-05-04 福州开发区慧聚通信技术有限公司 Network equipment online state monitoring system and method
WO2018232961A1 (en) * 2017-06-19 2018-12-27 深圳市盛路物联通讯技术有限公司 Method and system for updating internet of things routing table in conjunction with convergence unit information
CN111634764A (en) * 2020-05-20 2020-09-08 无锡八英里电子科技有限公司 Internet of things terminal abnormity mutual diagnosis method under scene of multiple elevators in same machine room
CN112148567A (en) * 2020-09-24 2020-12-29 广东科徕尼智能科技有限公司 Intelligent device active operation and maintenance method, device and storage medium
CN112969064A (en) * 2021-02-08 2021-06-15 智洋创新科技股份有限公司 Redis cache timeout-based equipment online state calculation method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
何中旭,王悦,李继繁,王莹,刘晓萌,宋文华,: ""消防物联网大数据平台的构建及应用"", 《南开大学学报(自然科学版)》, vol. 53, no. 05 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314549A (en) * 2022-06-30 2022-11-08 青岛海尔科技有限公司 Offline device management method, storage medium and electronic device
CN115314549B (en) * 2022-06-30 2024-03-22 青岛海尔科技有限公司 Offline equipment management method, storage medium and electronic device
CN117118876A (en) * 2023-10-20 2023-11-24 美云智数科技有限公司 Heartbeat connection detection method and device, electronic equipment and storage medium
CN117118876B (en) * 2023-10-20 2024-03-08 美云智数科技有限公司 Heartbeat connection detection method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113596619B (en) 2023-11-24

Similar Documents

Publication Publication Date Title
CN113596619A (en) Fire-fighting Internet of things multi-device state judgment method, device, equipment and storage medium
CN110213068B (en) Message middleware monitoring method and related equipment
EP0469812B1 (en) Detection of duplicate alias addresses
CN102484606B (en) Communication system and communication apparatus status determining method
WO2005010641A2 (en) Management of large scale cabling systems
CN106646186B (en) Batch test method and system for chips
EP0467696A1 (en) Testing a communications network for duplicate station addresses
CN104104542B (en) A kind of real-time intelligent troubleshooting method based on RS485
CN103647662A (en) Fault monitoring alarm method and apparatus
JPH09181737A (en) Communication method for small scale network
CN105404224A (en) Method and apparatus for processing machine room fault
CN107241216A (en) Maintain the method and device of the stable transmission of critical data
US8108736B2 (en) Multi-partition computer system, failure handling method and program therefor
CN109150587B (en) Maintenance method and device
CN112532467A (en) Method, device and system for realizing fault detection
JP2013236184A (en) In-vehicle communication system, communication abnormality monitoring method of in-vehicle communication system, and communication abnormality monitoring program of in-vehicle communication system
CN106301708A (en) Processing method and processing device when a kind of information sends unsuccessfully
US20100229041A1 (en) Device and method for expediting feedback on changes of connection status of monitioring equipments
CN106789139B (en) Multipoint fault processing method and device
CN113009246B (en) PSE device detection device and PSE device detection method
CN108337135B (en) Communication control system, method and device
JP4437416B2 (en) Network maintenance system
CN113110970A (en) Method, device, equipment and medium for monitoring components in server working mode
CN116488724B (en) Optical fiber communication test method, medium and system using same
CN114710389B (en) Information processing method and information processing apparatus

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant after: Shenzhen Pengxin Data Technology Co.,Ltd.

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: Shenzhen Panhai Data Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant