CN113452787A - Topic subscription forwarding management method, device, equipment and storage medium based on MQTT - Google Patents

Topic subscription forwarding management method, device, equipment and storage medium based on MQTT Download PDF

Info

Publication number
CN113452787A
CN113452787A CN202110721954.1A CN202110721954A CN113452787A CN 113452787 A CN113452787 A CN 113452787A CN 202110721954 A CN202110721954 A CN 202110721954A CN 113452787 A CN113452787 A CN 113452787A
Authority
CN
China
Prior art keywords
mqtt
server
controlling
topic
internet
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
CN202110721954.1A
Other languages
Chinese (zh)
Other versions
CN113452787B (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 Xinlongpeng Technology Co ltd
Original Assignee
Shenzhen Xinlongpeng 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 Xinlongpeng Technology Co ltd filed Critical Shenzhen Xinlongpeng Technology Co ltd
Priority to CN202110721954.1A priority Critical patent/CN113452787B/en
Publication of CN113452787A publication Critical patent/CN113452787A/en
Application granted granted Critical
Publication of CN113452787B publication Critical patent/CN113452787B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures

Abstract

The invention discloses a topic subscription forwarding management method, a topic subscription forwarding management device, topic subscription forwarding management equipment and a topic subscription forwarding management storage medium based on MQTT. According to the method, the domain name of the MQTT cloud server is resolved into a local IP address through the control server according to domain name hijacking; controlling a first Internet of things terminal to acquire the analyzed local IP address and establishing MQTT connection with a server according to the local IP address; controlling the first Internet of things terminal to perform MQTT server topic subscription to the server; controlling the server to establish MQTT connection with the MQTT cloud server; controlling the server to send locally stored MQTT topic subscription information to the MQTT cloud server; according to the sending result, the server is controlled to inform the first Internet of things terminal that the MQTT cloud server is successfully connected; and controlling the first Internet of things terminal to resend the terminal state information. The topic subscription forwarding management method based on the MQTT can shorten the time delay, reduce the network flow and improve the efficiency of the application program and the safety of data.

Description

Topic subscription forwarding management method, device, equipment and storage medium based on MQTT
Technical Field
The invention relates to the technical field of printing, in particular to a topic subscription forwarding management method, a topic subscription forwarding management device, topic subscription forwarding management equipment and a topic subscription forwarding management storage medium based on MQTT.
Background
At present, the internet of things is spread throughout our lives, such as smart homes, smart medical, smart agriculture, smart transportation, smart cities and the like. Massive internet of things equipment goes into the internet and goes to the cloud, and equipment data information which increases explosively adopts a cloud centralized processing mode in the prior art, so that the requirements for rapid transmission and processing of a large amount of data cannot be met. Therefore, the local communication management function of the access of the Internet of things equipment is realized; how to solve the problems of unstable network, high time delay and the like which restrict user experience through an MQTT communication protocol with low overhead and low bandwidth occupation 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 topic subscription forwarding management method, a topic subscription forwarding management device, topic subscription forwarding management equipment and a topic subscription forwarding management storage medium based on MQTT (maximum likelihood test) so as to solve the problems in the prior art.
In a first aspect, an embodiment of the present invention provides a topic subscription forwarding management method based on MQTT, where the method includes:
the control server resolves the domain name of the MQTT cloud server into a local IP address according to domain name hijacking;
controlling a first Internet of things terminal to acquire the analyzed local IP address and establishing MQTT connection with the server according to the local IP address;
controlling the first Internet of things terminal to perform MQTT server topic subscription to the server;
controlling the server to establish MQTT connection with the MQTT cloud server;
controlling the server to send locally stored MQTT topic subscription information to the MQTT cloud server;
according to the sending result, the server is controlled to inform the first Internet of things terminal that the MQTT cloud server is successfully connected;
and controlling the first Internet of things terminal to resend the terminal state information.
Preferably, the method further comprises:
controlling the first Internet of things terminal to cancel MQTT server topic subscription to the server;
controlling the server to establish MQTT connection with the MQTT cloud server;
controlling the server to send MQTT topic subscription cancelling information to the MQTT cloud server;
according to the sending result, the server is controlled to inform the first Internet of things terminal that the MQTT cloud server is successfully connected;
and controlling the first Internet of things terminal to resend the terminal state information.
Preferably, the method further comprises:
controlling the server to resolve the domain name of the MQTT cloud server into a local IP address according to domain name hijacking;
controlling a second networking terminal to acquire the analyzed local IP address and establishing MQTT connection with the server according to the local IP address;
controlling the second networking terminal to subscribe the MQTT server theme to the server;
controlling the server to establish MQTT connection with the MQTT cloud server;
controlling the server to send locally stored MQTT topic subscription information to the MQTT cloud server;
according to the sending result, the server is controlled to inform the second networking terminal that the connection with the cloud server is successful;
and controlling the second networking terminal to resend the terminal state information.
Preferably, the controlling the first internet of things terminal to subscribe to the MQTT server topic from the server includes:
controlling the first Internet of things terminal to send an MQTT topic subscription request message to the server;
according to the MQTT topic subscription request message, storing the MQTT topic subscription request message as an MQTT topic subscription information list;
controlling the first Internet of things terminal to issue an MQTT topic message;
and after receiving the MQTT topic message, the server positions the MQTT topic subscription information list according to the MQTT topic message.
Preferably, after the MQTT cloud server receives the MQTT topic message, locating the MQTT topic subscription information list according to the MQTT topic message further includes:
and judging whether the MQTT cloud server forwards the MQTT theme message to other Internet of things terminals.
Preferably, the controlling the first internet of things terminal to subscribe to the MQTT server topic from the server further includes:
controlling the first Internet of things terminal or the cloud server to issue an MQTT topic message;
after receiving the MQTT topic message, the server positions the MQTT topic subscription information list according to the MQTT topic message;
and judging whether to forward the MQTT theme message to other physical network terminals or the MQTT cloud server.
Preferably, the subscription request message according to the MQTT topic is stored as an MQTT topic subscription information list;
controlling the MQTT cloud server to receive the MQTT topic subscription request message;
analyzing and processing the MQTT topic subscription request message;
and under the mode of a HASH table, taking the MQTT theme as a KEY value and storing the KEY value as the MQTT theme subscription information list.
In a second aspect, an embodiment of the present invention provides an MQTT-based topic subscription forwarding management apparatus, where the apparatus includes:
the resolution control module is used for controlling the server to resolve the domain name of the MQTT cloud server into a local IP address according to domain name hijacking;
the first MQTT connection establishing module is used for controlling the first Internet of things terminal to acquire the analyzed local IP address and establishing MQTT connection with the server according to the local IP address;
the first topic subscription control module is used for controlling the first Internet of things terminal to subscribe the MQTT server topic to the server;
the second MQTT connection establishing module is used for controlling the server to establish MQTT connection with the MQTT cloud server;
the second topic subscription control module is used for controlling the server to send locally stored MQTT topic subscription information to the MQTT cloud server;
the notification module is used for controlling the server to notify the first internet of things terminal that the MQTT cloud server is successfully connected according to the sending result;
and the state sending module is used for controlling the first Internet of things terminal to resend the terminal state information.
In a third aspect, an embodiment of the present invention provides a topic subscription forwarding management device based on MQTT, 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 theme subscription forwarding management method, device, equipment and storage medium based on MQTT provided by the embodiments of the present invention. According to the method, the domain name of the MQTT cloud server is resolved into a local IP address through the control server according to domain name hijacking; controlling a first Internet of things terminal to acquire the analyzed local IP address and establishing MQTT connection with a server according to the local IP address; controlling the first Internet of things terminal to perform MQTT server topic subscription to the server; controlling the server to establish MQTT connection with the MQTT cloud server; controlling the server to send locally stored MQTT topic subscription information to the MQTT cloud server; according to the sending result, the server is controlled to inform the first Internet of things terminal that the MQTT cloud server is successfully connected; and controlling the first Internet of things terminal to resend the terminal state information. Therefore, the topic subscription forwarding management method based on the MQTT can realize the local communication management function of the access of the Internet of things equipment; by means of the MQTT communication protocol with low overhead and low bandwidth occupation, the problems of unstable network and high time delay which restrict user experience are solved, and the current situations that the transmission of mass information of the MQTT cloud server is slow and the processing is difficult are relieved.
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 topic subscription forwarding management method based on MQTT according to an embodiment of the present invention.
Fig. 2 is a flowchart of a topic subscription forwarding management method based on MQTT according to another embodiment of the present invention.
Fig. 3 is a flowchart of the method for topic subscription and forwarding management based on MQTT according to the embodiment of the present invention, where the flowchart controls the first internet-of-things terminal to subscribe to an MQTT server topic from the server.
Fig. 4 is a flowchart of the method for topic subscription and forwarding management based on MQTT according to the MQTT topic subscription request message, stored as an MQTT topic subscription information list.
Fig. 5 is a schematic diagram illustrating an operation principle of a topic subscription forwarding management method based on MQTT according to an embodiment of the present invention.
Fig. 6 is a schematic diagram illustrating an operation principle of a topic subscription forwarding management method based on MQTT according to another embodiment of the present invention.
Fig. 7 is a schematic structural diagram of a topic subscription and forwarding management device based on MQTT according to an embodiment of the present invention.
Fig. 8 is a schematic structural diagram of a topic subscription forwarding management device based on MQTT according to an embodiment of the present 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, an embodiment of the present invention provides a theme subscription forwarding management method based on MQTT, which can implement a local communication management function of internet of things device access; by means of the MQTT communication protocol with low overhead and low bandwidth occupation, the problems of unstable network and high time delay which restrict user experience are solved, and the current situations that the transmission of mass information of the MQTT cloud server is slow and the processing is difficult are relieved.
The method comprises the following steps:
s1, the control server resolves the domain name of the MQTT cloud server into a local IP address according to domain name hijacking;
specifically, in this embodiment, domain name hijacking is to intercept a request for domain name resolution in a hijacked network range, analyze a domain name of the request, release the request outside the MQTT cloud server range, and resolve the request into a local IP address of the cloud server.
S2, controlling the first Internet of things terminal to obtain the analyzed local IP address, and establishing MQTT connection with the server according to the local IP address;
s3, controlling the first Internet of things terminal to subscribe the MQTT server theme to the server;
s4, controlling the server to establish MQTT connection with the MQTT cloud server;
s5, controlling the server to send locally stored MQTT topic subscription information to the MQTT cloud server;
s6, controlling the server to inform the first Internet of things terminal that the MQTT cloud server is successfully connected according to the sending result;
and S7, controlling the first Internet of things terminal to resend the terminal state information.
Preferably, in this embodiment, an MQTT server topic subscription request sent by the first internet-of-things terminal to the server is first stored in a local storage of the server, and when the server notifies the first internet-of-things terminal that the MQTT cloud server is successfully connected, the first internet-of-things terminal resends the terminal state information, so that a situation that a large amount of data cannot be quickly transmitted and processed in a centralized processing mode of the MQTT cloud server is avoided, a time delay is shortened, a bandwidth is increased, a transmission efficiency is increased, and a data transmission safety is ensured.
Preferably, referring to fig. 2, the method further includes:
s3' controlling the first Internet of things terminal to cancel MQTT server topic subscription from the server;
s4' controlling the server to establish MQTT connection with the MQTT cloud server;
s5' controlling the server to send MQTT topic subscription canceling information to the MQTT cloud server;
s6', controlling the server to inform the first Internet of things terminal that the MQTT cloud server is successfully connected according to the sending result;
and S7', the first Internet of things terminal is controlled to resend the terminal state information.
Specifically, in this embodiment, the first internet of things terminal may further send an MQTT server topic subscription cancellation request to the server.
Preferably, the method further comprises:
controlling the server to resolve the domain name of the MQTT cloud server into a local IP address according to domain name hijacking;
controlling a second networking terminal to acquire the analyzed local IP address and establishing MQTT connection with the server according to the local IP address;
controlling the second networking terminal to subscribe the MQTT server theme to the server;
controlling the server to establish MQTT connection with the MQTT cloud server;
controlling the server to send locally stored MQTT topic subscription information to the MQTT cloud server;
according to the sending result, the server is controlled to inform the second networking terminal that the connection with the cloud server is successful;
and controlling the second networking terminal to resend the terminal state information.
Specifically, in the embodiment, please refer to fig. 5 and fig. 6, one or more terminal devices of the internet of things accessing the server may be provided. When a plurality of terminal devices of the internet of things are accessed to the server, the server resolves the domain name of the MQTT cloud server into a local IP address according to domain name hijacking; the plurality of internet of things terminal devices acquire the analyzed local IP addresses and establish MQTT connection with the server according to the local IP addresses; the method comprises the steps that MQTT server theme subscription requests or MQTT server subscription cancellation requests sent by a plurality of Internet of things terminal devices to a server are firstly stored in a local memory of the server, and when the server informs the plurality of Internet of things terminal devices to be successfully connected with an MQTT cloud server, the plurality of Internet of things terminal devices resend terminal state information, so that the situation that the rapid transmission and processing requirements of a large amount of data cannot be met in a centralized processing mode of the MQTT cloud server is avoided, time delay is shortened, bandwidth is improved, transmission efficiency is improved, and data transmission safety is guaranteed.
Preferably, referring to fig. 3, the controlling the first internet of things terminal to subscribe to the MQTT server topic includes:
s31, controlling the first Internet of things terminal to send an MQTT topic subscription request message to the server;
s32, storing the MQTT topic subscription request message as an MQTT topic subscription information list;
s33, controlling the first Internet of things terminal to issue an MQTT topic message;
and S34, after receiving the MQTT topic message, the server positions the MQTT topic subscription information list according to the MQTT topic message.
Preferably, after the MQTT cloud server receives the MQTT topic message, locating the MQTT topic subscription information list according to the MQTT topic message further includes:
s35, judging whether the MQTT cloud server forwards the MQTT theme message to other Internet of things terminals.
Preferably, the controlling the first internet of things terminal to subscribe to the MQTT server topic from the server further includes:
controlling the first Internet of things terminal or the cloud server to issue an MQTT topic message;
after receiving the MQTT topic message, the server positions the MQTT topic subscription information list according to the MQTT topic message;
and judging whether to forward the MQTT theme message to other physical network terminals or the MQTT cloud server.
Preferably, referring to fig. 4, the subscription information list stored as MQTT topic subscription information according to the MQTT topic subscription request message includes;
s321, controlling the MQTT cloud server to receive the MQTT topic subscription request message;
s322, analyzing and processing the MQTT topic subscription request message;
s323, under the mode of the HASH table, the MQTT theme is used as a KEY value and is stored as the MQTT theme subscription information list.
Preferably, the theme subscription forwarding management method based on the MQTT can be operated on a router or a home gateway, so that the deployment cost is reduced; the number of the terminal devices of the internet of things can be set according to needs, and is not particularly limited herein. In addition, the MQTT theme message forwarding function of the embodiment can also set filtering rules to meet application requirements of various occasions.
Referring to fig. 7, an embodiment of the present invention provides an MQTT-based topic subscription forwarding management apparatus, where the apparatus includes:
the resolution control module 1 is used for controlling the server to resolve the domain name of the MQTT cloud server into a local IP address according to domain name hijacking;
the first MQTT connection establishing module 2 is used for controlling the first Internet of things terminal to acquire the analyzed local IP address and establishing MQTT connection with the server according to the local IP address;
the first topic subscription control module 3 is used for controlling the first internet of things terminal to subscribe the MQTT server topic to the server;
the second MQTT connection establishing module 4 is used for controlling the server to establish MQTT connection with the MQTT cloud server;
the second topic subscription control module 5 is used for controlling the server to send locally stored MQTT topic subscription information to the MQTT cloud server;
the notification module 6 is used for controlling the server to notify the first internet of things terminal that the MQTT cloud server is successfully connected according to the sending result;
and the state sending module 7 is used for controlling the first internet of things terminal to resend the terminal state information.
In addition, the theme subscription forwarding management method based on MQTT described in the embodiment of the present invention in conjunction with fig. 1 may be implemented by a theme subscription forwarding management device based on MQTT. Fig. 8 is a schematic hardware structure diagram of a topic subscription forwarding management device based on MQTT according to an embodiment of the present invention.
An MQTT-based topic subscription forwarding management 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 embodiments of the theme subscription forwarding management method based on MQTT.
In one example, the MQTT-based topic subscription forwarding management 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 that couple the components of the MQTT-based topic subscription forwarding management device to one another. 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, in combination with the theme subscription forwarding management method based on MQTT in the foregoing embodiment, an embodiment of the present invention may provide a computer-readable storage medium to implement the method. The computer readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any one of the above embodiments of the MQTT-based topic subscription forwarding management method.
In summary, the theme subscription forwarding management method, device, equipment and storage medium based on MQTT provided by the embodiments of the present invention. According to the method, the domain name of the MQTT cloud server is resolved into a local IP address through the control server according to domain name hijacking; controlling a first Internet of things terminal to acquire the analyzed local IP address and establishing MQTT connection with a server according to the local IP address; controlling the first Internet of things terminal to perform MQTT server topic subscription to the server; controlling the server to establish MQTT connection with the MQTT cloud server; controlling the server to send locally stored MQTT topic subscription information to the MQTT cloud server; according to the sending result, the server is controlled to inform the first Internet of things terminal that the MQTT cloud server is successfully connected; and controlling the first Internet of things terminal to resend the terminal state information. According to the theme subscription forwarding management method based on the MQTT, the MQTT theme message forwarding path is quickly positioned on the internet of things terminal user side or the network edge side through a localized deployment scheme and a stored MQTT theme subscription information HASH list, the localized forwarding function of the MQTT theme message of the internet of things terminal is realized, the problem that the MQTT theme message of the internet of things terminal needs to be forwarded through the cloud is solved, the time delay is shortened, and the network flow is reduced; therefore, the local communication management function of the access of the equipment of the Internet of things can be realized; by means of the MQTT communication protocol with low overhead and low bandwidth occupation, the problems of unstable network and high time delay which restrict user experience are solved, and the current situations that the transmission of mass information of the MQTT cloud server is slow and the processing is difficult are relieved.
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 topic subscription forwarding management method based on MQTT is characterized by comprising the following steps:
the control server resolves the domain name of the MQTT cloud server into a local IP address according to domain name hijacking;
controlling a first Internet of things terminal to acquire the analyzed local IP address and establishing MQTT connection with the server according to the local IP address;
controlling the first Internet of things terminal to perform MQTT server topic subscription to the server;
controlling the server to establish MQTT connection with the MQTT cloud server;
controlling the server to send locally stored MQTT topic subscription information to the MQTT cloud server;
according to the sending result, the server is controlled to inform the first Internet of things terminal that the MQTT cloud server is successfully connected;
and controlling the first Internet of things terminal to resend the terminal state information.
2. The MQTT-based topic subscription forwarding management method according to claim 1, wherein the method further comprises:
controlling the first Internet of things terminal to cancel MQTT server topic subscription to the server;
controlling the server to establish MQTT connection with the MQTT cloud server;
controlling the server to send MQTT topic subscription cancelling information to the MQTT cloud server;
according to the sending result, the server is controlled to inform the first Internet of things terminal that the MQTT cloud server is successfully connected;
and controlling the first Internet of things terminal to resend the terminal state information.
3. The MQTT-based topic subscription forwarding management method according to claim 1, wherein the method further comprises:
controlling the server to resolve the domain name of the MQTT cloud server into a local IP address according to domain name hijacking;
controlling a second networking terminal to acquire the analyzed local IP address and establishing MQTT connection with the server according to the local IP address;
controlling the second networking terminal to subscribe the MQTT server theme to the server;
controlling the server to establish MQTT connection with the MQTT cloud server;
controlling the server to send locally stored MQTT topic subscription information to the MQTT cloud server;
according to the sending result, the server is controlled to inform the second networking terminal that the connection with the cloud server is successful;
and controlling the second networking terminal to resend the terminal state information.
4. The MQTT-based topic subscription forwarding management method of claim 1, wherein the controlling the first IOT terminal to subscribe to the MQTT server topic comprises:
controlling the first Internet of things terminal to send an MQTT topic subscription request message to the server;
according to the MQTT topic subscription request message, storing the MQTT topic subscription request message as an MQTT topic subscription information list;
controlling the first Internet of things terminal to issue an MQTT topic message;
and after receiving the MQTT topic message, the server positions the MQTT topic subscription information list according to the MQTT topic message.
5. The MQTT-based topic subscription forwarding management method according to claim 1, wherein after the MQTT cloud server receives the MQTT topic message, locating the MQTT topic message on the MQTT topic subscription information list according to the MQTT topic message further comprises:
and judging whether the MQTT cloud server forwards the MQTT theme message to other Internet of things terminals.
6. The MQTT-based topic subscription forwarding management method according to claim 1, wherein the controlling the first internet of things terminal to subscribe to the MQTT server topic from the server further comprises:
controlling the first Internet of things terminal or the cloud server to issue an MQTT topic message;
after receiving the MQTT topic message, the server positions the MQTT topic subscription information list according to the MQTT topic message;
and judging whether to forward the MQTT theme message to other physical network terminals or the MQTT cloud server.
7. The MQTT-based topic subscription forwarding management method of claim 5, wherein the MQTT topic subscription request message is stored as an MQTT topic subscription information list;
controlling the MQTT cloud server to receive the MQTT topic subscription request message;
analyzing and processing the MQTT topic subscription request message;
and under the mode of a HASH table, taking the MQTT theme as a KEY value and storing the KEY value as the MQTT theme subscription information list.
8. An MQTT-based topic subscription forwarding management device, characterized in that the device comprises:
the resolution control module is used for controlling the server to resolve the domain name of the MQTT cloud server into a local IP address according to domain name hijacking;
the first MQTT connection establishing module is used for controlling the first Internet of things terminal to acquire the analyzed local IP address and establishing MQTT connection with the server according to the local IP address;
the first topic subscription control module is used for controlling the first Internet of things terminal to subscribe the MQTT server topic to the server;
the second MQTT connection establishing module is used for controlling the server to establish MQTT connection with the MQTT cloud server;
the second topic subscription control module is used for controlling the server to send locally stored MQTT topic subscription information to the MQTT cloud server;
the notification module is used for controlling the server to notify the first internet of things terminal that the MQTT cloud server is successfully connected according to the sending result;
and the state sending module is used for controlling the first Internet of things terminal to resend the terminal state information.
9. A topic subscription forwarding management device based on MQTT, comprising: 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.
CN202110721954.1A 2021-06-28 2021-06-28 Topic subscription forwarding management method, device, equipment and storage medium based on MQTT Active CN113452787B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110721954.1A CN113452787B (en) 2021-06-28 2021-06-28 Topic subscription forwarding management method, device, equipment and storage medium based on MQTT

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110721954.1A CN113452787B (en) 2021-06-28 2021-06-28 Topic subscription forwarding management method, device, equipment and storage medium based on MQTT

Publications (2)

Publication Number Publication Date
CN113452787A true CN113452787A (en) 2021-09-28
CN113452787B CN113452787B (en) 2022-05-31

Family

ID=77813750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110721954.1A Active CN113452787B (en) 2021-06-28 2021-06-28 Topic subscription forwarding management method, device, equipment and storage medium based on MQTT

Country Status (1)

Country Link
CN (1) CN113452787B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114172947A (en) * 2021-12-09 2022-03-11 福建环宇通信息科技股份公司 Communication method and device between Internet of things devices
CN114466447A (en) * 2021-12-15 2022-05-10 四川天邑康和通信股份有限公司 Cloud management end management system based on WiFi6 router
CN114584614A (en) * 2022-01-17 2022-06-03 北京智芯微电子科技有限公司 Information interaction method used between intelligent terminal and acquisition terminal
CN116668270A (en) * 2023-05-15 2023-08-29 深圳市晶存科技有限公司 Internet of things data transmission 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
US20120207137A1 (en) * 2009-11-03 2012-08-16 Zte Corporation Method for Managing Local IP Access Connection
CN105099882A (en) * 2015-07-09 2015-11-25 杭州电子科技大学 MQTT-based cloud pushing method and system
EP3043585A1 (en) * 2015-01-12 2016-07-13 Verisign, Inc. Systems and methods for providing iot services
CN109151043A (en) * 2018-09-06 2019-01-04 北京赛佰特科技有限公司 Message delivery system based on cloud service
CN110266794A (en) * 2019-06-20 2019-09-20 四川长虹电器股份有限公司 Method for subscribing and system are acted on behalf of based on MQTT server
CN110650070A (en) * 2018-06-26 2020-01-03 九阳股份有限公司 Household appliance network configuration method and WiFi module
US20200067903A1 (en) * 2018-08-24 2020-02-27 International Business Machines Corporation Integration of Publish-Subscribe Messaging with Authentication Tokens
CN112929437A (en) * 2021-02-05 2021-06-08 中国石油大学(北京) Data transmission system, method and device based on Internet of things MQTT technical framework

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120207137A1 (en) * 2009-11-03 2012-08-16 Zte Corporation Method for Managing Local IP Access Connection
EP3043585A1 (en) * 2015-01-12 2016-07-13 Verisign, Inc. Systems and methods for providing iot services
CN105099882A (en) * 2015-07-09 2015-11-25 杭州电子科技大学 MQTT-based cloud pushing method and system
CN110650070A (en) * 2018-06-26 2020-01-03 九阳股份有限公司 Household appliance network configuration method and WiFi module
US20200067903A1 (en) * 2018-08-24 2020-02-27 International Business Machines Corporation Integration of Publish-Subscribe Messaging with Authentication Tokens
CN109151043A (en) * 2018-09-06 2019-01-04 北京赛佰特科技有限公司 Message delivery system based on cloud service
CN110266794A (en) * 2019-06-20 2019-09-20 四川长虹电器股份有限公司 Method for subscribing and system are acted on behalf of based on MQTT server
CN112929437A (en) * 2021-02-05 2021-06-08 中国石油大学(北京) Data transmission system, method and device based on Internet of things MQTT technical framework

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
任亨: ""基于MQTT协议的消息推送集群系统的设计与实现"", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
冯春倩: ""基于MQTT的物联网设备接入及网络通信方法的研究"", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114172947A (en) * 2021-12-09 2022-03-11 福建环宇通信息科技股份公司 Communication method and device between Internet of things devices
CN114172947B (en) * 2021-12-09 2023-11-24 福建环宇通信息科技股份公司 Communication method and device between Internet of things devices
CN114466447A (en) * 2021-12-15 2022-05-10 四川天邑康和通信股份有限公司 Cloud management end management system based on WiFi6 router
CN114466447B (en) * 2021-12-15 2023-08-11 四川天邑康和通信股份有限公司 Cloud management end management system based on WiFi6 router
CN114584614A (en) * 2022-01-17 2022-06-03 北京智芯微电子科技有限公司 Information interaction method used between intelligent terminal and acquisition terminal
CN116668270A (en) * 2023-05-15 2023-08-29 深圳市晶存科技有限公司 Internet of things data transmission method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113452787B (en) 2022-05-31

Similar Documents

Publication Publication Date Title
CN113452787B (en) Topic subscription forwarding management method, device, equipment and storage medium based on MQTT
US11082436B1 (en) System and method for offloading packet processing and static analysis operations
CN109314863B (en) Diameter edge proxy attack detection
US10419378B2 (en) Net-based email filtering
US20160119367A1 (en) Method, apparatus, and system for cooperative defense on network
CN112566185B (en) Base station service data distribution method, device, storage medium and base station
CN105635084A (en) Apparatus and method for authenticating terminal
EP3200486A1 (en) Connection establishment method, device, and system
CN111385180B (en) Communication tunnel construction method, device, equipment and medium
CN111277602A (en) Network data packet identification processing method and device, electronic equipment and storage medium
US9967214B2 (en) Direct client-to-client internet relay chat for softap clients
CN109617972B (en) Connection establishing method and device, electronic equipment and storage medium
WO2014194744A1 (en) A method, client, server, and system for processing data
CN112637373B (en) Method and equipment for keeping dumb terminal online
CN107547561B (en) Method and device for carrying out DDOS attack protection processing
CN110198298B (en) Information processing method, device and storage medium
CN113423120A (en) Data distribution processing method and device based on private network terminal and electronic equipment
CN113872949B (en) Address resolution protocol response method and related device
CN113472644B (en) Path addressing method and network service system
CN111935206B (en) Message processing method, device and network equipment
EP3890271A1 (en) Systems, methods, and media for authorizing external network access requests
US10944894B2 (en) Image capturing apparatus, client apparatus, method, and storage medium
CN112689284B (en) Wireless network password modification method, device, equipment and storage medium
CN115150363B (en) IP address updating method, gateway device, gateway down-hanging device and storage medium
CN110768983B (en) Message processing method and device

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
GR01 Patent grant
GR01 Patent grant