CN117176749A - Internet of things management method, device, equipment and storage medium based on MQTT protocol - Google Patents
Internet of things management method, device, equipment and storage medium based on MQTT protocol Download PDFInfo
- Publication number
- CN117176749A CN117176749A CN202310831196.8A CN202310831196A CN117176749A CN 117176749 A CN117176749 A CN 117176749A CN 202310831196 A CN202310831196 A CN 202310831196A CN 117176749 A CN117176749 A CN 117176749A
- Authority
- CN
- China
- Prior art keywords
- terminal
- client
- mqtt
- legacy
- mqtt server
- 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
- 238000007726 management method Methods 0.000 title claims abstract description 49
- 230000000007 visual effect Effects 0.000 claims abstract description 54
- 238000004891 communication Methods 0.000 claims abstract description 53
- 238000000034 method Methods 0.000 claims abstract description 26
- 238000012545 processing Methods 0.000 claims abstract description 21
- 238000012544 monitoring process Methods 0.000 claims description 32
- 238000012800 visualization Methods 0.000 claims description 18
- 238000004806 packaging method and process Methods 0.000 claims description 7
- 230000007246 mechanism Effects 0.000 claims description 6
- 230000006855 networking Effects 0.000 claims 1
- 230000006870 function Effects 0.000 description 8
- 230000002159 abnormal effect Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000006872 improvement Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000000903 blocking effect Effects 0.000 description 1
- FFGPTBGBLSHEPO-UHFFFAOYSA-N carbamazepine Chemical compound C1=CC2=CC=CC=C2N(C(=O)N)C2=CC=CC=C21 FFGPTBGBLSHEPO-UHFFFAOYSA-N 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000012384 transportation and delivery Methods 0.000 description 1
- 238000013024 troubleshooting Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
The invention relates to the technical field of the Internet of things, in particular to an Internet of things management method, device, equipment and storage medium based on an MQTT protocol, which comprises the steps of constructing a WiFi communication end and an MQTT server end; accessing the client to an MQTT server through the WiFi communication terminal; the method comprises the steps that operation data of all terminals are collected through an MQTT server, and visual configuration is conducted on a client according to the operation data, so that a visual client is obtained; the method comprises the steps of sending a legacy command to each terminal in real time through an MQTT server, and acquiring legacy information of each terminal according to the legacy command; pushing the information of the will to the visual client through the WiFi communication terminal, and carrying out visual processing on the state data through the visual client to obtain the terminal online real-time data; when the system is used, the online state of each terminal can be inquired, and a legacy command is issued to the terminal at intervals so as to acquire the data of the terminal in the last running state and judge whether the terminal is in the online state.
Description
Technical Field
The invention relates to the technical field of the Internet of things, in particular to an Internet of things management method, device, equipment and storage medium based on an MQTT protocol.
Background
At present, intelligent application environments such as intelligent home, intelligent factories and intelligent shops are all based on TCP protocol for communication control, however, when any terminal is in abnormal condition of disconnection during use, the conventional TCP protocol is difficult to check, and if abnormal problems cannot be checked in time, serious safety problems can be caused.
It can be seen that there is a need for improvements and improvements in the art.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention aims to provide an internet of things management method, device, equipment and storage medium based on an MQTT protocol, which can inquire the online state of each terminal and issue a legacy instruction to the terminal at intervals so as to acquire data of the terminal in the last running state and judge whether the terminal is in the online state.
The invention provides an Internet of things management method based on an MQTT protocol, which comprises the following steps: constructing a WiFi communication end and an MQTT server end; accessing the client to an MQTT server through the WiFi communication terminal; the method comprises the steps that operation data of all terminals are collected through an MQTT server, and visual configuration is conducted on a client according to the operation data, so that a visual client is obtained; the method comprises the steps of sending a legacy command to each terminal in real time through an MQTT server, and acquiring legacy information of each terminal according to the legacy command; and pushing the information of the will to the visual client through the WiFi communication terminal, and performing visual processing on the state data through the visual client to obtain the terminal online real-time data.
Optionally, in a first implementation manner of the first aspect of the present invention, the sending, by the MQTT server, a legacy instruction to each terminal in real time, and acquiring, according to the legacy instruction, legacy information of each terminal includes: generating an identifier correspondingly according to the types of the terminals through the MQTT server, and packaging the identifier to obtain a legacy instruction; based on a heartbeat mechanism, sending corresponding heritage instructions to each terminal; and acquiring online time and working data fed back by each terminal according to the legacy command, and packaging the online time and the working data to obtain legacy information.
Optionally, in a second implementation manner of the first aspect of the present invention, after the constructing a WiFi communication end and an MQTT service end, the method further includes: performing authority configuration on the MQTT server so that the MQTT server is configured with a plurality of authority levels; and configuring corresponding subscription rights and publishing rights for the MQTT server according to different rights classes.
Optionally, in a third implementation manner of the first aspect of the present invention, the accessing, by the WiFi communication terminal, the client to the MQTT server includes: the access address and access authority of the client and the access address of the MQTT server are obtained; checking the access rights and each rights level through the WiFi communication terminal to obtain a target rights level corresponding to the access rights; and enabling the client to access the MQTT server according to the access address and the access address, and configuring the target authority level to the client.
Optionally, in a fourth implementation manner of the first aspect of the present invention, before pushing the information of the legacy to the visualization client through the WiFi communication end and performing visualization processing on the status data through the visualization client to obtain the online real-time data of the terminal, the method further includes: extracting equipment state data and equipment basic data from the information of the heritage; and carrying out de-duplication processing on the information of the heritage, eliminating the basic data of the equipment, and generating new information of the heritage according to the state data of the equipment.
Optionally, in a fifth implementation manner of the first aspect of the present invention, after pushing the information of the legacy to the visualization client through the WiFi communication end and performing visualization processing on the status data through the visualization client, the method further includes: accessing a third party monitoring source through a WiFi communication terminal, and acquiring real-time monitoring reference data from the third party monitoring source; producing a feedback control instruction according to the real-time monitoring reference data; pushing a feedback control instruction to a corresponding terminal through an MQTT server, and acquiring a working result of the corresponding terminal; and pushing the working result and the real-time monitoring reference data to the visual client through the WiFi communication terminal.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the constructing a WiFi communication end and an MQTT server end includes: constructing a WiFi communication terminal based on the ESP8266 module; and building an MQTT server based on an EMQ X Broker platform.
The second aspect of the present invention provides an internet of things management device based on MQTT protocol, including: the building module is used for building a WiFi communication end and an MQTT server end; the access module is used for accessing the client to the MQTT server through the WiFi communication terminal; the interface module is used for collecting the operation data of each terminal through the MQTT server and carrying out visual configuration on the client according to each operation data so as to obtain a visual client; the system comprises a legacy module, a MQTT server and a plurality of terminals, wherein the legacy module is used for sending a legacy instruction to each terminal in real time through the MQTT server and acquiring the legacy information of each terminal according to the legacy instruction; the monitoring module is used for pushing the information of the heritage to the visual client through the WiFi communication terminal, and carrying out visual processing on the state data through the visual client so as to obtain the online real-time data of the terminal.
The third aspect of the present invention provides an internet of things management device based on an MQTT protocol, where the internet of things management device based on the MQTT protocol includes: a memory and at least one processor, the memory having instructions stored therein; at least one of the processors invokes the instructions in the memory to cause the MQTT protocol-based internet of things management device to perform the steps of any of the MQTT protocol-based internet of things management methods described above.
A fourth aspect of the present invention provides a computer-readable storage medium having instructions stored thereon, which when executed by a processor, implement the steps of the MQTT-protocol-based internet of things management method of any one of the above.
According to the technical scheme, the client is accessed to the MQTT server which is already in the WiFi local area network through the WiFi communication terminal in advance, so that the intercommunication and interconnection between the client and the MQTT server are realized; when the client is connected with the MQTT server, the MQTT server acquires corresponding operation data according to terminals of different users, and performs visual configuration on the client according to personalized terminal configuration of the users so as to obtain a visual client; when monitoring, the MQTT server continuously and real-timely transmits a legacy command to each terminal so as to check the running state of each terminal, when the terminal receives the legacy command, the MQTT server feeds back the legacy information to the MQTT server, and the MQTT server pushes the legacy information to a visual client for visual processing, so that a user can quickly grasp the online state of the terminal according to the online real-time data of the terminal, once the terminal is accidentally disconnected or powered off, the terminal can retain the legacy information before disconnection and transmit the legacy information to the client, and the client can know the disconnection time and the online time of the terminal.
Drawings
Fig. 1 is a first flowchart of an internet of things management method based on MQTT protocol according to an embodiment of the present invention;
fig. 2 is a second flowchart of an internet of things management method based on MQTT protocol according to an embodiment of the present invention;
fig. 3 is a third flowchart of an internet of things management method based on MQTT protocol according to an embodiment of the present invention;
fig. 4 is a fourth flowchart of an internet of things management method based on MQTT protocol according to an embodiment of the present invention;
fig. 5 is a fifth flowchart of an internet of things management method based on MQTT protocol according to an embodiment of the present invention;
fig. 6 is a sixth flowchart of an internet of things management method based on MQTT protocol according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an internet of things management device based on MQTT protocol according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an internet of things management device based on an MQTT protocol according to an embodiment of the present invention.
Detailed Description
The invention provides an Internet of things management method, device, equipment and storage medium based on an MQTT protocol, which are used for connecting a client to an MQTT server which is already in a WiFi local area network through a WiFi communication terminal in advance so as to realize intercommunication and interconnection between the client and the MQTT server; when the client is connected with the MQTT server, the MQTT server acquires corresponding operation data according to terminals of different users, and performs visual configuration on the client according to personalized terminal configuration of the users so as to obtain a visual client; when monitoring, the MQTT server continuously and real-timely transmits a legacy command to each terminal so as to check the running state of each terminal, when the terminal receives the legacy command, the MQTT server feeds back the legacy information to the MQTT server, and the MQTT server pushes the legacy information to a visual client for visual processing, so that a user can quickly grasp the online state of the terminal according to the online real-time data of the terminal, once the terminal is accidentally disconnected or powered off, the terminal can retain the legacy information before disconnection and transmit the legacy information to the client, and the client can know the disconnection time and the online time of the terminal.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
For easy understanding, the following describes a specific flow of an embodiment of the present invention, referring to fig. 1, and an embodiment of an internet of things management method based on MQTT protocol in the embodiment of the present invention includes:
101. constructing a WiFi communication end and an MQTT server end;
102. accessing the client to an MQTT server through the WiFi communication terminal;
in this embodiment, it should be noted that, the client is a mobile phone app end or a computer software end or a tablet software end of the user, and the user remotely controls each intelligent terminal through the client; when the wireless communication system is used, a user logs in the WiFi local area network through the WiFi communication terminal in advance, so that the MQTT server terminal accessed to the accessed WiFi local area network is connected with the client terminal, and the intercommunication and interconnection between the client terminal and the MQTT server terminal are realized.
103. The method comprises the steps that operation data of all terminals are collected through an MQTT server, and visual configuration is conducted on a client according to the operation data, so that a visual client is obtained;
in this embodiment, the MQTT server is connected to each terminal (such as a temperature sensor, a humidity sensor, an infrared sensor, an illuminance sensor, etc.) in advance, and when the client is connected to the MQTT server, the MQTT server automatically collects operation data of each terminal, and each user individually sets different types of terminals according to their own needs, so that the MQTT server needs to obtain corresponding operation data according to the terminals of different users, and performs visual configuration on the client according to the configuration of the individual terminals of the users, so as to obtain a visual client, where a GUI graphical interface personalized by the user is provided.
In another embodiment, the client is visually configured by a Node-RED. The Node-RED is a tool based on graphic design, pays attention to visualization and interactivity of the flow, and has the advantages of easy use, rich functions, strong expandability, good instantaneity and the like. The graphic interface of the Node-RED is visual and easy to understand, supports the user to quickly establish and debug the data stream and the automation task, provides rich functions of a Node library, a debugging tool and the like, and can help the user to quickly establish and manage the data stream and the automation task.
104. The method comprises the steps of sending a legacy command to each terminal in real time through an MQTT server, and acquiring legacy information of each terminal according to the legacy command;
105. pushing the information of the will to the visual client through the WiFi communication terminal, and carrying out visual processing on the state data through the visual client to obtain the terminal online real-time data;
in this embodiment, the MQTT server continuously sends a legacy command to each terminal in real time to check the operation state of each terminal, after the terminal receives the legacy command, the terminal feeds back legacy information to the MQTT server, the legacy information reflects the operation state, operation parameters and other information of the corresponding terminal, and then pushes the legacy information to the visualization client for visualization processing, so that a user can quickly grasp the online state of the terminal according to online real-time data of the terminal, and once the terminal is accidentally disconnected or powered off, the terminal can retain the legacy information before disconnection and transmit the legacy information to the client, and the client can know the disconnection time and the online time of the legacy information.
In the embodiment of the invention, a user accesses the client to the MQTT server which is already in the WiFi local area network through the WiFi communication terminal in advance, so that the intercommunication and interconnection between the client and the MQTT server are realized; when the client is connected with the MQTT server, the MQTT server acquires corresponding operation data according to terminals of different users, and performs visual configuration on the client according to personalized terminal configuration of the users so as to obtain a visual client; when monitoring, the MQTT server continuously and real-timely transmits a legacy command to each terminal to check the running state of each terminal, when the terminal receives the legacy command, the MQTT server feeds back the legacy information to the MQTT server, and the MQTT server pushes the legacy information to the visual client for visual processing, so that a user can quickly grasp the online state of the terminal according to the online real-time data of the terminal, once the terminal is accidentally disconnected or powered off, the terminal can retain the legacy information before disconnection and transmit the legacy information to the client, and the client can know the specific time and online time of disconnection of the terminal.
Referring to fig. 2, a second embodiment of an internet of things management method based on MQTT protocol in an embodiment of the present invention includes:
201. generating an identifier correspondingly according to the types of the terminals through the MQTT server, and packaging the identifier to obtain a legacy instruction;
in this embodiment, during verification, the MQTT server generates a unique identifier according to the types of different terminals, so that the terminals can quickly make a response to the identifier, where the identifier is different from the formats of other instructions and can be represented by a string of character strings, a graphic code, and the like; and (3) packaging the identifier to obtain the heritage instruction which can be identified by the terminal.
202. Based on a heartbeat mechanism, sending corresponding heritage instructions to each terminal;
203. acquiring online time and working data fed back by each terminal according to the legacy command, and packaging the online time and the working data to obtain legacy information;
in this embodiment, the legacy instruction is sent to each terminal as a heartbeat packet based on the heartbeat mechanism, and if the MQTT server side does not receive a response of the heartbeat within a certain time, it may be determined that the connection of the terminal may be abnormal or disconnected. And the terminal is packaged according to the online time responded by the terminal and the working data to obtain the information of the heritage, so that a user can rapidly judge the running condition of the terminal according to the information of the heritage, and if the updated information of the heritage is not received for a long time, the problem that the terminal is possibly abnormal or disconnected can be judged.
Referring to fig. 3, a third embodiment of an internet of things management method based on MQTT protocol in an embodiment of the present invention includes:
301. performing authority configuration on the MQTT server so that the MQTT server is configured with a plurality of authority levels;
302. configuring corresponding subscription rights and publishing rights for the MQTT server according to different rights classes;
303. the access address and access authority of the client and the access address of the MQTT server are obtained;
304. checking the access rights and each rights level through the WiFi communication terminal to obtain a target rights level corresponding to the access rights;
305. enabling the client to access to the MQTT server according to the access address and the access address, and configuring the target authority level to the client;
in this embodiment, the usage rights of different users are different, in order to implement rights management of terminal control, rights configuration needs to be performed on the MQTT server to set rights levels of different levels (for example, a first level is the highest level, all functions of all terminals may be arbitrarily controlled, and the client may obtain operation data of all terminals, a second level is the next level of rights, some functions of the terminals may be controlled, and the client may only obtain operation data of terminals controllable in the rights, and so on), when the client is connected to the MQTT server, the MQTT server checks access rights of the client to configure the rights level of the client to obtain a target rights level, and the client may obtain operation data of the corresponding terminal according to subscription rights corresponding to the target rights level, and may initiate an instruction for controlling operations to the corresponding terminal according to the corresponding issuing rights when in use.
Referring to fig. 4, a fourth embodiment of an internet of things management method based on MQTT protocol in an embodiment of the present invention includes:
401. extracting equipment state data and equipment basic data from the information of the heritage;
402. performing duplication elimination processing on the information of the heritage, eliminating the basic data of the equipment, and generating new information of the heritage according to the state data of the equipment;
in this embodiment, in order to increase the transmission speed of the information about the legacy, the information about the legacy needs to be subjected to duplication removal, and the basic data (such as the information about the device name, the device position, the device description, etc.) of the device that does not have the actual content in the information about the legacy is removed, so as to obtain the information about the legacy after duplication removal, thereby greatly increasing the speed of data transmission.
Referring to fig. 5, a fifth embodiment of an internet of things management method based on MQTT protocol in an embodiment of the present invention includes:
501. accessing a third party monitoring source through a WiFi communication terminal, and acquiring real-time monitoring reference data from the third party monitoring source;
502. producing a feedback control instruction according to the real-time monitoring reference data;
503. pushing a feedback control instruction to a corresponding terminal through an MQTT server, and acquiring a working result of the corresponding terminal;
in this embodiment, in order to improve the control intelligence, an external third party monitoring source connected to the WiFi communication port may obtain real-time monitoring reference data to feedback control a corresponding terminal device, for example, the third party monitoring source is a weather forecast app, the corresponding terminal is feedback controlled by obtaining real-time monitoring reference data (i.e. weather data) of the app, when the weather data is displayed, assuming that the terminal is an intelligent window, a window closing instruction (i.e. feedback control instruction) is generated according to the real-time monitoring reference data, and the intelligent window executes a window closing action according to the window closing instruction and feeds back a corresponding working result to the MQTT server.
504. Pushing the working result and the real-time monitoring reference data to the visual client through the WiFi communication terminal;
in this embodiment, the working result and the real-time monitoring reference data of the terminal are pushed to the user through the WiFi communication terminal, so that the user can know the action executed by the terminal and the reason for executing the action.
Referring to fig. 6, a sixth embodiment of an internet of things management method based on MQTT protocol in an embodiment of the present invention includes:
601. constructing a WiFi communication terminal based on the ESP8266 module;
in this embodiment, the ESP8266 module is a low-cost, low-power-consumption, high-integration Wi-Fi module, developed by the lexin technology (Espressif Systems). The wireless network integrated micro-controller integrates a processor, a Wi-Fi wireless network chip and related peripheral circuits, and can realize communication connection between the micro-controller and a wireless network;
602. an MQTT server is built based on an EMQ X Broker platform;
in this embodiment, EMQX is an open-source distributed internet of things message middleware platform, also referred to as EMQ X Broker. Based on the MQTT protocol, the system provides reliable real-time message transfer service and is widely applied to the fields of Internet of things, intelligent home, industrial automation, smart city and the like. EMQX has the following main characteristics and functions: MQTT Broker: EMQX acts as an MQTT message proxy, providing high performance messaging services. It supports MQTT version 3.1/3.1.1/5.0 protocol and adopts asynchronous non-blocking I/O model to handle large-scale concurrent connection and high throughput message traffic. A distributed architecture: EMQX adopts a distributed architecture, and supports lateral expansion and load balancing. Multiple EMQX nodes may be clustered to achieve high availability and fault tolerance while providing horizontal expansion capability to accommodate the ever-increasing number of device connections and message volumes. Security and authentication: EMQX supports TLS/SSL encrypted transmission, and protects the security of messages. The system also provides the functions of subscription authentication, release authentication, client identity authentication and the like, and ensures that only authorized equipment and users can perform message interaction. A variety of protocols support: besides the MQTT protocol, the EMQX also supports other common message protocols, such as HTTP, webSocket, coAP, and the like, so that different devices and applications can conveniently access the platform by adopting a proper communication mode. Device management and monitoring: EMQX provides functions such as device connection management, session management, and device status monitoring. An administrator can conveniently manage equipment, check connection conditions and conduct real-time monitoring and fault troubleshooting. Plug-in mechanism and extensibility: EMQX has abundant plug-in mechanisms, can expand the function through installing and configuring the plug-in, meet the demands under different application scenes, such as data storage, message routing, message forwarding, etc. EMQX is a powerful and flexible open-source Internet of things message middleware platform, and reliable infrastructure and rich functional support are provided for message delivery of Internet of things applications.
The method for managing the internet of things based on the MQTT protocol in the embodiment of the present invention is described above, and the device for managing the internet of things based on the MQTT protocol in the embodiment of the present invention is described below, referring to fig. 7, one embodiment of the device for managing the internet of things based on the MQTT protocol in the embodiment of the present invention includes:
the building module 701 is used for building a WiFi communication end and an MQTT server end;
the access module 702 is configured to access the client to the MQTT server through the WiFi communication terminal;
the interface module 703 is configured to collect operation data of each terminal through the MQTT server, and perform visual configuration on the client according to each operation data, so as to obtain a visual client;
the legacy module 704 is configured to send a legacy command to each terminal in real time through the MQTT server, and obtain legacy information of each terminal according to the legacy command;
the monitoring module 705 is configured to push the information of the legacy to the visualization client through the WiFi communication end, and perform visualization processing on the status data through the visualization client, so as to obtain online real-time data of the terminal.
In this embodiment, the client is connected to the MQTT server already in the WiFi local area network through the building module 701 and the access module 702, so as to implement interworking between the client and the MQTT server; when the client is connected with the MQTT server, the MQTT server obtains corresponding operation data according to terminals of different users through an interface module 703, and performs visual configuration on the client according to personalized terminal configuration of the users so as to obtain a visual client; when monitoring, the MQTT server continuously and real-time transmits the legacy command to each terminal through the legacy command module 703 and the monitoring module 705 to check the running state of each terminal, when the terminal receives the legacy command, the MQTT server feeds back the legacy information to the MQTT server, and the MQTT server pushes the legacy information to the visual client for visual processing, the user can quickly grasp the online state of the terminal according to the online real-time data of the terminal, once the terminal is accidentally disconnected or powered off, the terminal can reserve and transmit the legacy information before disconnection to the client, and the client can know the disconnection time and the online time of the terminal
Fig. 7 above describes the MQTT protocol-based management device of the internet of things in the embodiment of the present invention in detail from the perspective of a modularized functional entity, and the MQTT protocol-based management device of the internet of things in the embodiment of the present invention is described in detail from the perspective of hardware processing.
Fig. 8 is a schematic structural diagram of an internet of things management device based on MQTT protocol according to an embodiment of the present invention, where the internet of things management device 800 based on MQTT protocol may generate relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 810 (e.g., one or more processors) and a memory 820, and one or more storage media 830 (e.g., one or more mass storage devices) storing application programs 833 or data 832. Wherein memory 820 and storage medium 830 can be transitory or persistent. The program stored on the storage medium 830 may include one or more modules (not shown), each of which may include a series of instruction operations on the MQTT protocol-based internet of things management device 800. Still further, the processor 810 may be configured to communicate with the storage medium 830, and execute a series of instruction operations in the storage medium 830 on the MQTT protocol-based internet of things management device 800, so as to implement the steps of the MQTT protocol-based internet of things management method provided in the above-mentioned method embodiments.
The MQTT protocol-based internet of things management device 800 may also include one or more power supplies 840, one or more wired or wireless network interfaces 850, one or more input/output interfaces 860, and/or one or more operating systems 831, such as Windows service, mac OS X, unix, linux, freeBSD, and the like. It will be appreciated by those skilled in the art that the MQTT protocol-based internet of things management device structure shown in fig. 8 does not constitute a limitation of MQTT protocol-based internet of things management devices, and may include more or less components than illustrated, or may combine certain components, or may be a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a nonvolatile computer readable storage medium, and the computer readable storage medium may also be a volatile computer readable storage medium, where instructions are stored in the computer readable storage medium, when the instructions run on a computer, cause the computer to execute steps of an internet of things management method based on the MQTT protocol.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the system or apparatus and unit described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the foregoing is merely a preferred example of the present invention, and the present invention is not limited thereto, but it is to be understood that modifications and equivalents of some of the technical features described in the foregoing embodiments may be made by those skilled in the art, although the present invention has been described in detail with reference to the foregoing embodiments. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. The Internet of things management method based on the MQTT protocol is characterized by comprising the following steps of:
constructing a WiFi communication end and an MQTT server end;
accessing the client to an MQTT server through the WiFi communication terminal;
the method comprises the steps that operation data of all terminals are collected through an MQTT server, and visual configuration is conducted on a client according to the operation data, so that a visual client is obtained;
the method comprises the steps of sending a legacy command to each terminal in real time through an MQTT server, and acquiring legacy information of each terminal according to the legacy command;
and pushing the information of the will to the visual client through the WiFi communication terminal, and performing visual processing on the state data through the visual client to obtain the terminal online real-time data.
2. The internet of things management method based on MQTT protocol according to claim 1, wherein the sending, by the MQTT server, the legacy command to each terminal in real time, and obtaining the legacy information of each terminal according to the legacy command, includes:
generating an identifier correspondingly according to the types of the terminals through the MQTT server, and packaging the identifier to obtain a legacy instruction;
based on a heartbeat mechanism, sending corresponding heritage instructions to each terminal;
and acquiring online time and working data fed back by each terminal according to the legacy command, and packaging the online time and the working data to obtain legacy information.
3. The method for managing the internet of things based on the MQTT protocol according to claim 2, wherein after the constructing the WiFi communication end and the MQTT server end, further comprises:
performing authority configuration on the MQTT server so that the MQTT server is configured with a plurality of authority levels;
and configuring corresponding subscription rights and publishing rights for the MQTT server according to different rights classes.
4. The method for managing internet of things based on MQTT protocol according to claim 3, wherein the accessing the client to the MQTT server through the WiFi communication terminal comprises:
the access address and access authority of the client and the access address of the MQTT server are obtained;
checking the access rights and each rights level through the WiFi communication terminal to obtain a target rights level corresponding to the access rights;
and enabling the client to access the MQTT server according to the access address and the access address, and configuring the target authority level to the client.
5. The method for managing internet of things based on MQTT protocol according to claim 1, wherein pushing the information of the legacy to the visualization client through the WiFi communication terminal, and performing visualization processing on the status data through the visualization client, so as to obtain the terminal online real-time data, further comprises:
extracting equipment state data and equipment basic data from the information of the heritage;
and carrying out de-duplication processing on the information of the heritage, eliminating the basic data of the equipment, and generating new information of the heritage according to the state data of the equipment.
6. The method for managing internet of things based on MQTT protocol according to claim 1, wherein pushing the information of the legacy to the visualization client through the WiFi communication terminal, and performing visualization processing on the status data through the visualization client, so as to obtain the online real-time data of the terminal, further comprises:
accessing a third party monitoring source through a WiFi communication terminal, and acquiring real-time monitoring reference data from the third party monitoring source;
producing a feedback control instruction according to the real-time monitoring reference data;
pushing a feedback control instruction to a corresponding terminal through an MQTT server, and acquiring a working result of the corresponding terminal;
and pushing the working result and the real-time monitoring reference data to the visual client through the WiFi communication terminal.
7. The method for managing the internet of things based on the MQTT protocol according to claim 1, wherein the constructing the WiFi communication end and the MQTT server end comprises:
constructing a WiFi communication terminal based on the ESP8266 module;
and building an MQTT server based on an EMQ X Broker platform.
8. The utility model provides a thing networking management device based on MQTT protocol which characterized in that includes:
the building module is used for building a WiFi communication end and an MQTT server end;
the access module is used for accessing the client to the MQTT server through the WiFi communication terminal;
the interface module is used for collecting the operation data of each terminal through the MQTT server and carrying out visual configuration on the client according to each operation data so as to obtain a visual client;
the system comprises a legacy module, a MQTT server and a plurality of terminals, wherein the legacy module is used for sending a legacy instruction to each terminal in real time through the MQTT server and acquiring the legacy information of each terminal according to the legacy instruction;
the monitoring module is used for pushing the information of the heritage to the visual client through the WiFi communication terminal, and carrying out visual processing on the state data through the visual client so as to obtain the online real-time data of the terminal.
9. The Internet of things management device based on the MQTT protocol is characterized by comprising: a memory and at least one processor, the memory having instructions stored therein;
at least one of the processors invokes the instructions in the memory to cause the MQTT protocol-based internet of things management device to perform the steps of the MQTT protocol-based internet of things management method of any of claims 1-7.
10. A computer readable storage medium having instructions stored thereon, which when executed by a processor, implement the steps of the MQTT protocol-based internet of things management method of any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310831196.8A CN117176749A (en) | 2023-07-06 | 2023-07-06 | Internet of things management method, device, equipment and storage medium based on MQTT protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310831196.8A CN117176749A (en) | 2023-07-06 | 2023-07-06 | Internet of things management method, device, equipment and storage medium based on MQTT protocol |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117176749A true CN117176749A (en) | 2023-12-05 |
Family
ID=88934394
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310831196.8A Pending CN117176749A (en) | 2023-07-06 | 2023-07-06 | Internet of things management method, device, equipment and storage medium based on MQTT protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117176749A (en) |
-
2023
- 2023-07-06 CN CN202310831196.8A patent/CN117176749A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112799789B (en) | Node cluster management method, device, equipment and storage medium | |
CN110737566B (en) | Host performance monitoring method and device, electronic equipment and storage medium | |
CN111031034A (en) | Multi-protocol convergence edge computing gateway | |
US10992494B2 (en) | Gateway round-robin system | |
US20210240497A1 (en) | Plugin framework to support zero touch management of heterogeneous infrastructure elements across distributed data centers | |
US8918492B2 (en) | Field panel with embedded webserver and method of accessing the same | |
CN104009938A (en) | Method and system for long connections based on router level | |
CN104010001B (en) | In mobile terminal, the method and system connecting communication is carried out in similar networking request | |
CN101894059B (en) | A kind of detection method of running status and system | |
KR20070120098A (en) | Method for setting home code in network system and device for network | |
CN103036732A (en) | Method, system and device for network monitoring process | |
CN117615043B (en) | Inter-service communication method and system on edge gateway | |
WO2012173853A1 (en) | Real-time data monitoring based on data push | |
WO2018072095A1 (en) | Load testing management method and system | |
Kovac et al. | Keeping eyes on your home: Open-source network monitoring center for mobile devices | |
CN110958291B (en) | Industrial vehicle data transmission system and method | |
CN117176749A (en) | Internet of things management method, device, equipment and storage medium based on MQTT protocol | |
KR20150088462A (en) | Method for linking network device in cloud environment and apparatus therefor | |
CN103618665A (en) | Method for pushing messages to client | |
CN114089711B (en) | Industrial equipment control management method, electronic equipment and storage medium | |
CN114679472A (en) | Communication system, method, apparatus, storage medium, and electronic device | |
CN114281563A (en) | Application program reconstruction method and device | |
CN113315830A (en) | Data transmission method of data engineering machine for industrial internet | |
CN104618190A (en) | Shell-based network bandwidth testing method under cluster environment | |
CN100375464C (en) | Method for data communication of every terminal when network interconnecting |
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 |