CN113596140B - Information publishing method and device based on MQTT protocol - Google Patents
Information publishing method and device based on MQTT protocol Download PDFInfo
- Publication number
- CN113596140B CN113596140B CN202110846359.0A CN202110846359A CN113596140B CN 113596140 B CN113596140 B CN 113596140B CN 202110846359 A CN202110846359 A CN 202110846359A CN 113596140 B CN113596140 B CN 113596140B
- Authority
- CN
- China
- Prior art keywords
- instruction
- information
- issuing
- protocol
- information issuing
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/143—Termination or inactivation of sessions, e.g. event-controlled end of session
- H04L67/145—Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/562—Brokering proxy services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Computer And Data Communications (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the application provides an information release method and device based on an MQTT protocol, which are applied to middleware of a server, wherein the middleware is driven by a golang language, and the method comprises the following steps: acquiring an information issuing instruction issued by an issuing terminal; determining a shared instruction protocol of all topics, wherein the shared instruction protocol indicates instruction composition specifications which are commonly met by instructions issued under all topics; judging whether the information issuing instruction meets the instruction composition specification or not; and if the information issuing instruction meets the instruction composition specification, issuing the information issuing instruction under a target theme to which the information issuing instruction belongs. According to the embodiment of the application, through adopting the golang language to drive the middleware and uniformly issuing the instruction composition specification of the instructions under each theme, not only can the issue of the message be processed with high performance, but also the labor cost and the time cost can be saved in related products and development flows used on the basis of the mqtt protocol client.
Description
Technical Field
The application relates to the technical field of information display, in particular to an information publishing method and device based on an MQTT protocol.
Background
At present, the terminal information issuing industry commonly adopts an MQTT protocol, uses an Emqx client-side as a middleware based on the MQTT protocol, realizes the issuing and pushing of the information in a production environment based on java, nodejs, php and other languages, and takes up certain advantages by the ecology and the use universality of the middleware, but realizes the issuing and pushing of the information based on java, nodejs, php and other languages, so that the performance of the middleware does not have absolute advantages.
In addition, in related products and development flows used by the MQTT protocol-based client, there may occur non-uniformity or non-standardization of the instruction protocol, and such non-standardization of the instruction protocol may cause an increase in maintenance development cost, labor cost, time cost, and the like over time.
Accordingly, the prior art has drawbacks and needs to be improved and developed.
Disclosure of Invention
The embodiment of the application provides an information release method and device based on an MQTT protocol, which can process release of information with high performance and can save labor cost and time cost in related products and development flows used by clients based on the mqTT protocol.
The embodiment of the application provides an information release method based on an MQTT protocol, which is applied to middleware of a server, wherein the middleware is driven by a golang language, and the method comprises the following steps:
acquiring an information issuing instruction issued by an issuing terminal;
determining a shared instruction protocol of all topics, wherein the shared instruction protocol indicates instruction composition specifications which are commonly met by instructions issued under all topics;
judging whether the information issuing instruction meets the instruction composition specification or not;
and if the information issuing instruction meets the instruction composition specification, issuing the information issuing instruction under a target theme to which the information issuing instruction belongs.
In the information issuing method based on the MQTT protocol according to the embodiment of the present application, the determining whether the information issuing instruction meets the instruction composition specification includes:
analyzing the information issuing instruction and judging whether the information issuing instruction consists of a theme and a load;
and if the information issuing instruction consists of the theme and the load, judging that the information issuing instruction meets the instruction composition specification.
In the information issuing method based on the MQTT protocol according to the embodiment of the present application, if the information issuing instruction is composed of the theme and the payload, the judging that the information issuing instruction meets the instruction composition specification includes:
and if the information issuing instruction consists of the theme and the load and the theme consists of the item identifier, the terminal identifier and the service identifier, judging that the information issuing instruction meets the instruction composition specification.
In the information issuing method based on the MQTT protocol according to the embodiment of the present application, if the information issuing instruction meets the instruction composition specification, issuing the information issuing instruction under a target subject to which the information issuing instruction belongs, including:
and if the information issuing instruction consists of the theme and the load and the theme consists of the item identifier, the terminal identifier and the service identifier, issuing the information issuing instruction under the target theme to which the information issuing instruction belongs.
In the information issuing method based on the MQTT protocol according to the embodiment of the present application, after determining whether the information issuing instruction meets the instruction composition specification, the method further includes:
if the information issuing instruction does not meet the instruction composition specification, the information issuing instruction is not issued under a target theme to which the information issuing instruction belongs;
and sending the shared instruction protocol to the issuing terminal, and triggering the issuing terminal to update the instruction protocol used by the information issuing instruction into the shared instruction protocol.
In the information issuing method based on the MQTT protocol according to the embodiment of the present application, the sending the shared instruction protocol to the issuing terminal triggers the issuing terminal to update the instruction protocol used by the information issuing instruction to the shared instruction protocol, and further includes:
and acquiring first data information of a subscription terminal, and storing the first data information in a redis database of the golang language for use based on a cache length connection function of the golang language.
In the information publishing method based on the MQTT protocol according to the embodiment of the present application, the obtaining the first data information of the subscription terminal, and storing the first data information in a redis database of the golang language for use based on a cache length connection function of the golang language, includes:
acquiring first data information of the subscription terminal, and storing the first data information in a redis database of the golang language for use based on a trans-port protocol cached in a net dependency database of the golang language in advance.
In the information issuing method based on the MQTT protocol according to the embodiment of the present application, the information issuing instruction issued by the issuing terminal is obtained, including
And starting a interception port through the middleware, and acquiring the information issuing instruction through the interception port.
In the information issuing method based on the MQTT protocol according to the embodiment of the present application, before the information issuing instruction is issued under the target theme to which the information issuing instruction belongs, the method further includes:
and reloading the information issuing instruction so that the reloaded information issuing instruction can be identified by the subscription terminal.
The embodiment of the application also provides an information release device based on the MQTT protocol, which comprises:
the acquisition module is used for acquiring an information issuing instruction issued by the issuing terminal;
the determining module is used for determining a shared instruction protocol of all topics, wherein the shared instruction protocol indicates an instruction composition specification which is jointly satisfied by instructions issued under all topics;
the judging module is used for judging whether the information issuing instruction meets the instruction composition specification;
and the issuing module is used for issuing the information issuing instruction under the target theme to which the information issuing instruction belongs if the information issuing instruction meets the instruction composition specification.
According to the embodiment of the application, the method and the device adopt the golang language to drive the middleware, the natural advantages of the golang language are utilized, the release of the message can be processed with high performance, and the long connection is stable and efficient due to the cache long connection function of the golang language, so that the disaster situations of massive go-cooperation concurrency and CPU occupation caused by special reasons (such as useless data) are avoided. In addition, by uniformly issuing the instruction composition specification of the instructions under each theme, the labor cost and the time cost can be saved in related products and development flows used by the client based on the mqtt protocol.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the description of the embodiments will be briefly described below. It is evident that the drawings in the following description are only some embodiments of the application and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of an information publishing method based on MQTT protocol according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of an information publishing device based on MQTT protocol according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
Referring to fig. 1, fig. 1 is a flow chart of an information publishing method based on MQTT protocol according to an embodiment of the present application. The method may comprise the steps of:
step 101, obtaining an information issuing instruction issued by an issuing terminal.
Among them, MQTT (Message Queuing Telemetry Transport, message queue telemetry transport protocol), is a "lightweight" communication protocol based on publish/subscribe (pub/sub) mode, for which it requires a message middleware built on TCP/IP protocol, published 1999 by IBM. The biggest advantage of MQTT is that it can provide real-time reliable messaging services to connected remote devices with very little code and limited bandwidth. As an instant messaging protocol with low cost and low bandwidth occupation, the method has wider application in the aspects of Internet of things, small-sized equipment, mobile application and the like.
MQTT is a client-server based message publish/subscribe transport protocol. The MQTT protocol is lightweight, simple, open and easy to implement, which makes it very versatile. In many cases, including in limited environments, such as: machine-to-machine (M2M) communication and internet of things (IoT). It has been widely used in communication with sensors, occasionally dialed medical devices, smart homes, and some miniaturized devices over satellite links.
The implementation of the MQTT protocol requires the communication between the client and the server, and in the communication process, the MQTT protocol has three identities: publishes, proxies (servers), subscribers (subscribers). Wherein, the publisher and subscriber of the message are clients, the message proxy is a server, and the message publisher can be subscriber at the same time.
The MQTT server, referred to as a "message Broker" (Broker), may be an application or a device. It is located between the message publisher and subscriber, and it can:
(1) Accepting a network connection from a client;
(2) Receiving application information issued by a client;
(3) Processing subscription and unsubscribe requests from clients;
(4) The application message is forwarded to the subscribing client.
It should be noted that, the publisher terminal in this case is the publisher in the MQTT, and the subscriber terminal in this case is the subscriber in the MQTT.
The Golang language comes from Google corporation, has the advantages of simple grammar, high performance and quick compiling, and combines two devices of Goroutine and Channel to enable the Goroutine and Channel to have concurrent and asynchronous programming, highly supports concurrency, is a programming language with big data, micro services and concurrent and has strong compiling checking, strict coding specification and complete software life cycle, and has strong stability, because the Golang language provides tools for each link of the software life cycle (development, test, deployment, maintenance and the like), such as go tool, gofmt, go test and the like.
The application can process the release of the information with high performance by adopting the golang language to drive the middleware and utilizing the natural advantages of the golang language.
In some embodiments, the acquiring the information issuing instruction issued by the issuing terminal includes:
and starting a interception port through the middleware, and acquiring the information issuing instruction through the interception port.
For example, when the issuing terminal issues an information issuing instruction a, the server opens the interception port through the middleware, and obtains the information issuing instruction a through the interception port.
Step 102, determining a shared instruction protocol of all topics, wherein the shared instruction protocol indicates an instruction composition specification which is jointly satisfied by the instructions issued under each topic.
The issuing terminal sends a plurality of information issuing instructions to the server, so that the server issues the information issuing instructions under the target subject to which the information issuing instructions belong, and in the prior art, because the information issuing instructions are not standardized and unified, the related products used by the client based on the MQTT protocol and the development flow are increased along with the time due to the fact that strict instruction standards are not provided. The application formulates the shared protocol instruction of all topics, and uniformly issues the instruction composition specification of the instructions under each topic, thereby saving labor cost and time cost in related products and development processes used on the basis of the mqtt protocol client, achieving the development and use specifications, being stable and easy to maintain and expand.
Step 103, judging whether the information issuing instruction meets the instruction composition specification.
Because the instruction composition specification which is jointly met by the instructions issued under each theme is formulated, when the information issuing instruction issued by the issuing terminal comes in, the server side judges whether the information issuing instruction issued by the issuing terminal meets the instruction composition specification.
In some embodiments, the determining whether the information-issuing instruction meets the instruction composition specification comprises:
analyzing the information issuing instruction and judging whether the information issuing instruction consists of a theme and a load;
and if the information issuing instruction consists of the theme and the load, judging that the information issuing instruction meets the instruction composition specification.
Where the topic is a tag connected to an application message that matches the subscription of the server. The server will send a message to each client subscribing to the matched tag. The payload is the content that the message subscriber (subscriber terminal) specifically receives.
In some embodiments, if the information issuing instruction is composed of the subject and the load, determining that the information issuing instruction meets the instruction composition specification includes:
and if the information issuing instruction consists of the theme and the load and the theme consists of the item identifier, the terminal identifier and the service identifier, judging that the information issuing instruction meets the instruction composition specification.
The project identifier is the project name, what the project name is called, and what the project identifier is. For example, the item name is a restaurant item, the item identifier is a restaurant item, the item name is C, the item identifier is C, the item name is ordering, and the item identifier is ordering.
The terminal number is the terminal number of the publisher. For example, the terminal number of the publisher is a, and then the terminal number is a; the terminal number of the publisher is 12, and the terminal number is 12.
The service identifier is the service name, what the service name is called, and what the service identifier is. For example, the service name is order, and the service identifier is order; the service name is meal delivery, and the service identifier is meal delivery.
The information issuing instruction is calculated to satisfy the instruction composition specification only when the information issuing instruction is composed of a subject and a load, and the subject is composed of an item identification, a terminal identification, and a service identification.
And S104, if the information issuing instruction meets the instruction composition specification, issuing the information issuing instruction under a target theme to which the information issuing instruction belongs.
That is, when the information issuing instruction issued by the issuing terminal meets the instruction composition specification, the middleware of the server issues the information issuing instruction under the target subject to which the information issuing instruction belongs
In some embodiments, after the determining whether the information issue instruction meets the instruction composition specification, further comprising:
if the information issuing instruction does not meet the instruction composition specification, the information issuing instruction is not issued under a target theme to which the information issuing instruction belongs;
and sending the shared instruction protocol to the issuing terminal, and triggering the issuing terminal to update the instruction protocol used by the information issuing instruction into the shared instruction protocol.
When the information issuing instruction does not meet the instruction composition specification, the server side does not issue the information issuing instruction under the target subject to which the information issuing instruction belongs, and also sends a shared instruction protocol to the issuing terminal so as to trigger the issuing terminal to update the instruction protocol used by the information issuing instruction into the shared instruction protocol, thereby avoiding that the next issuing terminal continues to send the information issuing instruction which does not meet the instruction composition specification.
In some embodiments, the sending the shared instruction protocol to the issuing terminal triggers the issuing terminal to update the instruction protocol used by the information issuing instruction to the shared instruction protocol, and further includes:
and acquiring first data information of a subscription terminal, and storing the first data information in a redis database of the golang language for use based on a cache length connection function of the golang language.
The first data information may be a heartbeat of the subscription terminal, an online time length of the subscription terminal, a broadcast of the subscription terminal, and the like. The long connection is a connection between the client and the server, so as to realize the purpose of data transmission before the client and the server, the long connection is a lost connection, the resource consumption is needed for each long connection, the purpose of caching the long connection is to achieve the effect of recycling, the lost resource is not needed to be lost again, and the resource is saved. And storing the first data information into a redis database of the golang language for use through a cache long connection function of the golang language.
In some embodiments, the obtaining the first data information of the subscription terminal, based on the cache long connection function of the golang language, stores the first data information in a redis database of the golang language for use, includes:
acquiring first data information of the subscription terminal, and storing the first data information in a redis database of the golang language for use based on a trans-port protocol cached in a net dependency database of the golang language in advance.
The heartbeat broadcasting of the data transmitted at high frequency requires a stable system, and the use of the trans-port protocol cached in the net dependency library of the golang language can save the overhead, greatly help the stability of the system, ensure the heartbeat and ensure that the data transmitted at high frequency is more stable.
In some embodiments, before the issuing the information issuing instruction under the target theme to which the information issuing instruction belongs, the method further includes:
and reloading the information issuing instruction so that the reloaded information issuing instruction can be identified by a subscription terminal.
The information issuing instruction is reloaded, and the information issuing instruction is mainly combined into an instruction which can be identified by a terminal, so that the information issuing instruction is reloaded before being issued under a target theme to which the information issuing instruction belongs, and the reloaded information issuing instruction can be identified by the subscription terminal.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present application, which is not described herein.
In particular, the application is not limited by the order of execution of the steps described, as some of the steps may be performed in other orders or concurrently without conflict.
From the above, the information issuing method based on the MQTT protocol provided by the embodiment of the present application obtains the information issuing instruction issued by the issuing terminal; determining a shared instruction protocol of all topics, wherein the shared instruction protocol indicates instruction composition specifications which are commonly met by instructions issued under all topics; judging whether the information issuing instruction meets the instruction composition specification or not; and if the information issuing instruction meets the instruction composition specification, issuing the information issuing instruction under a target theme to which the information issuing instruction belongs. The embodiment of the application can process the release of the message with high performance by adopting the golang language to drive the middleware and utilizing the natural advantages of the golang language, and can ensure that the long connection is stable and efficient by adding the cache long connection function of the golang language, thereby avoiding the disaster condition that a large amount of go-together are concurrent and the CPU is full due to special reasons (such as useless data). In addition, by uniformly issuing the instruction composition specification of the instructions under each theme, the labor cost and the time cost can be saved in related products and development flows used by the client based on the mqtt protocol.
The embodiment of the application also provides an information release device based on the MQTT protocol, referring to fig. 2, fig. 2 is a schematic structural diagram of the information release device based on the MQTT protocol provided by the embodiment of the application.
The MQTT protocol-based information issuing apparatus 30 may include:
an acquisition module 31, configured to acquire an information issue instruction issued by an issue terminal;
a determining module 32, configured to determine a shared instruction protocol of all topics, where the shared instruction protocol indicates an instruction composition specification that is satisfied by the instructions issued under each topic;
a judging module 33, configured to judge whether the information issuing instruction meets the instruction composition specification;
and the issuing module 34 is configured to issue the information issuing instruction under a target subject to which the information issuing instruction belongs if the information issuing instruction meets the instruction composition specification.
In some embodiments, the obtaining module 31 is configured to obtain first data information of a subscription terminal, and store the first data information in a redis database of the golang language for use based on a cache long connection function of the golang language.
In some embodiments, the obtaining module 31 is configured to obtain first data information of the subscription terminal, and store the first data information in a redis database of the golang language for use based on a trans-port protocol cached in a net dependency database of the golang language in advance.
In some embodiments, the obtaining module 31 is configured to open a listening port through the middleware, and obtain the information issuing instruction through the listening port.
In some embodiments, the determining module 33 is configured to parse the information issue command and determine whether the information issue command is composed of a theme and a load; and if the information issuing instruction consists of the theme and the load, judging that the information issuing instruction meets the instruction composition specification.
In some embodiments, the determining module 33 is configured to determine that the information issuing instruction meets the instruction composition specification if the information issuing instruction is composed of the theme and the load, and the theme is composed of an item identifier, a terminal identifier, and a service identifier.
In some embodiments, the determining module 33 is configured to issue the information issue instruction under a target theme to which the information issue instruction belongs if the information issue instruction is composed of the theme and the load, and the theme is composed of an item identifier, a terminal identifier, and a service identifier.
In some embodiments, the issuing module 34 is configured to, if the information issuing instruction does not meet the instruction composition specification, not issue the information issuing instruction under a target subject to which the information issuing instruction belongs; and sending the shared instruction protocol to the issuing terminal, and triggering the issuing terminal to update the instruction protocol used by the information issuing instruction into the shared instruction protocol.
As can be seen from the above, the information issuing device 30 based on the MQTT protocol provided by the embodiment of the present application obtains the information issuing instruction issued by the issuing terminal through the obtaining module 31; the determination module 32 determines a shared instruction protocol for all topics indicating an instruction composition specification that the instructions issued under each topic together meet; the judging module 33 judges whether the information issuing instruction satisfies the instruction composition specification; the issuing module 34 is configured to issue the information issuing instruction under a target subject to which the information issuing instruction belongs if the information issuing instruction meets the instruction composition specification. According to the embodiment of the application, the method and the device adopt the golang language to drive the middleware, the natural advantages of the golang language are utilized, the release of the message can be processed with high performance, and the long connection is stable and efficient due to the cache long connection function of the golang language, so that the disaster situations of massive go-cooperation concurrency and CPU occupation caused by special reasons (such as useless data) are avoided. In addition, by uniformly issuing the instruction composition specification of the instructions under each theme, the labor cost and the time cost can be saved in related products and development flows used by the client based on the mqtt protocol.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
The information publishing method and device based on the MQTT protocol provided by the embodiment of the application are described in detail, and specific examples are applied to explain the principle and implementation mode of the application, and the description of the above embodiment is only used for helping to understand the technical scheme and core idea of the application; those of ordinary skill in the art will appreciate that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.
Claims (10)
1. The information release method based on the MQTT protocol is characterized by being applied to middleware of a server, wherein the middleware is driven by a golang language, and the method comprises the following steps:
acquiring an information issuing instruction issued by an issuing terminal;
determining a shared instruction protocol of all topics, wherein the shared instruction protocol indicates instruction composition specifications which are commonly met by instructions issued under all topics;
judging whether the information issuing instruction meets the instruction composition specification or not;
and if the information issuing instruction meets the instruction composition specification, issuing the information issuing instruction under a target theme to which the information issuing instruction belongs.
2. The MQTT protocol-based information distribution method according to claim 1, wherein the judging whether the information distribution instruction satisfies the instruction composition specification comprises:
analyzing the information issuing instruction and judging whether the information issuing instruction consists of a theme and a load;
and if the information issuing instruction consists of the theme and the load, judging that the information issuing instruction meets the instruction composition specification.
3. The MQTT protocol-based information distribution method according to claim 2, wherein the judging that the information distribution instruction satisfies the instruction composition specification if the information distribution instruction is composed of the subject matter and the load comprises:
and if the information issuing instruction consists of the theme and the load and the theme consists of the item identifier, the terminal identifier and the service identifier, judging that the information issuing instruction meets the instruction composition specification.
4. The MQTT protocol-based information distribution method according to claim 3, wherein if the information distribution instruction satisfies the instruction composition specification, the information distribution instruction is distributed under a target topic to which the information distribution instruction belongs, comprising:
and if the information issuing instruction consists of the theme and the load and the theme consists of the item identifier, the terminal identifier and the service identifier, issuing the information issuing instruction under the target theme to which the information issuing instruction belongs.
5. The MQTT protocol-based information distribution method according to claim 1, wherein after determining whether the information distribution instruction satisfies the instruction composition specification, further comprising:
if the information issuing instruction does not meet the instruction composition specification, the information issuing instruction is not issued under a target theme to which the information issuing instruction belongs;
and sending the shared instruction protocol to the issuing terminal, and triggering the issuing terminal to update the instruction protocol used by the information issuing instruction into the shared instruction protocol.
6. The MQTT protocol-based information issuing method according to claim 5, wherein the sending the shared instruction protocol to the issuing terminal triggers the issuing terminal to update the instruction protocol used by the information issuing instruction to the shared instruction protocol, further comprising:
and acquiring first data information of a subscription terminal, and storing the first data information in a redis database of the golang language for use based on a cache length connection function of the golang language.
7. The MQTT protocol-based information distribution method of claim 6, wherein the obtaining the first data information of the subscriber terminal, storing the first data information in the redis database of the golang language for use based on the cache long connection function possessed by the golang language, comprises:
acquiring first data information of the subscription terminal, and storing the first data information in a redis database of the golang language for use based on a trans-port protocol cached in a net dependency database of the golang language in advance.
8. The MQTT protocol-based information distribution method according to claim 1, wherein the obtaining the information distribution instruction issued by the distribution terminal comprises:
and starting a interception port through the middleware, and acquiring the information issuing instruction through the interception port.
9. The MQTT protocol-based information distribution method according to claim 1, wherein the distributing the information distribution instruction before the information distribution instruction belongs to the target subject, further comprises:
and reloading the information issuing instruction so that the reloaded information issuing instruction can be identified by the subscription terminal.
10. An information release device based on MQTT protocol, wherein the information release device is implemented by a golang language driver, the device comprising:
the acquisition module is used for acquiring an information issuing instruction issued by the issuing terminal;
the determining module is used for determining a shared instruction protocol of all topics, wherein the shared instruction protocol indicates an instruction composition specification which is jointly satisfied by instructions issued under all topics;
the judging module is used for judging whether the information issuing instruction meets the instruction composition specification;
and the issuing module is used for issuing the information issuing instruction under the target theme to which the information issuing instruction belongs if the information issuing instruction meets the instruction composition specification.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110846359.0A CN113596140B (en) | 2021-07-26 | 2021-07-26 | Information publishing method and device based on MQTT protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110846359.0A CN113596140B (en) | 2021-07-26 | 2021-07-26 | Information publishing method and device based on MQTT protocol |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113596140A CN113596140A (en) | 2021-11-02 |
CN113596140B true CN113596140B (en) | 2023-09-22 |
Family
ID=78250178
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110846359.0A Active CN113596140B (en) | 2021-07-26 | 2021-07-26 | Information publishing method and device based on MQTT protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113596140B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114422497B (en) * | 2022-01-20 | 2023-05-30 | 重庆长安汽车股份有限公司 | Remote control method for vehicle atmosphere lamp and readable storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107111565A (en) * | 2014-11-21 | 2017-08-29 | 国际商业机器公司 | Carry out publish/subscribe message transmission using message structure |
KR20170125252A (en) * | 2016-05-04 | 2017-11-14 | 전자부품연구원 | Message Fragmentation Method using a MQTT Protocol in M2M/IoT Platforms |
CN109428922A (en) * | 2017-08-29 | 2019-03-05 | 华为技术有限公司 | A kind of subscription dissemination method and server |
CN111131501A (en) * | 2019-12-31 | 2020-05-08 | 郑州信大捷安信息技术股份有限公司 | MQTT protocol-based message pushing system and method |
CN210807342U (en) * | 2019-12-19 | 2020-06-19 | 南京欣威视通信息科技股份有限公司 | Internet of things information publishing system based on MQTT |
CN111371889A (en) * | 2020-03-03 | 2020-07-03 | 广州致远电子有限公司 | Message processing method and device, Internet of things system and storage medium |
CN112104620A (en) * | 2020-08-30 | 2020-12-18 | 浪潮金融信息技术有限公司 | Remote instruction issuing method based on MQTT protocol |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8843580B2 (en) * | 2011-02-20 | 2014-09-23 | International Business Machines Corporation | Criteria-based message publication control and feedback in a publish/subscribe messaging environment |
US10334067B2 (en) * | 2017-01-02 | 2019-06-25 | International Business Machines Corporation | MQTT cluster shared subscription hub for fat-pipe cloud applications |
-
2021
- 2021-07-26 CN CN202110846359.0A patent/CN113596140B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107111565A (en) * | 2014-11-21 | 2017-08-29 | 国际商业机器公司 | Carry out publish/subscribe message transmission using message structure |
KR20170125252A (en) * | 2016-05-04 | 2017-11-14 | 전자부품연구원 | Message Fragmentation Method using a MQTT Protocol in M2M/IoT Platforms |
CN109428922A (en) * | 2017-08-29 | 2019-03-05 | 华为技术有限公司 | A kind of subscription dissemination method and server |
CN210807342U (en) * | 2019-12-19 | 2020-06-19 | 南京欣威视通信息科技股份有限公司 | Internet of things information publishing system based on MQTT |
CN111131501A (en) * | 2019-12-31 | 2020-05-08 | 郑州信大捷安信息技术股份有限公司 | MQTT protocol-based message pushing system and method |
CN111371889A (en) * | 2020-03-03 | 2020-07-03 | 广州致远电子有限公司 | Message processing method and device, Internet of things system and storage medium |
CN112104620A (en) * | 2020-08-30 | 2020-12-18 | 浪潮金融信息技术有限公司 | Remote instruction issuing method based on MQTT protocol |
Non-Patent Citations (2)
Title |
---|
C. Sengul ; Brunel University ; A. Kirby ; Oxbotica ; P. Fremantle ; University of Portsmouth ; .MQTT-TLS profile of ACE draft-ietf-ace-mqtt-tls-profile-06.IETF .2020,全文. * |
林浒等.基于MQTT协议的即时消息业务设计与实现.《计算机系统应用》.2017,(第03期), * |
Also Published As
Publication number | Publication date |
---|---|
CN113596140A (en) | 2021-11-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9578081B2 (en) | System and method for providing an actively invalidated client-side network resource cache | |
CN102546794B (en) | Method for directly communicating browser client with back-end server as well as gateway and communication system | |
US8495228B2 (en) | System and method for optimizing download user service delivery to roaming clients | |
CN109756559B (en) | Construction and use method for distributed data distribution service of embedded airborne system | |
CN102224715A (en) | Optimized polling in low resource devices | |
CN101917326A (en) | Distributed trans-coding system and task scheduling method thereof | |
US20130318208A1 (en) | Dynamic package creation for predictive page load optimization | |
CN102111437A (en) | Simple object access protocol (SOAP) extension-based WEB service transmission compression method | |
CN113132376A (en) | Media data processing method, device and system, electronic equipment and storage medium | |
CN113596140B (en) | Information publishing method and device based on MQTT protocol | |
CN112019597B (en) | Distributed data receiving system and data receiving method | |
CN104243610A (en) | Distributed file transmission service method | |
CN103685381A (en) | Method, system and device for downloading webpage resources | |
CN113472889A (en) | Scheduling system and method of microservice | |
CN114051041A (en) | Intelligent agricultural machinery system and communication method based on RabbitMQ and MQTT | |
CN112600881A (en) | Method, device, server and storage medium for providing service of internet of things | |
CN110213330B (en) | Pre-push system, method, device, electronic equipment and computer readable medium | |
CN111124717A (en) | Message delivery method, system and computer storage medium | |
CN108614820B (en) | Method and device for realizing streaming source data analysis | |
CN112131014B (en) | Decision engine system and business processing method thereof | |
CN103873443A (en) | Information processing method, local proxy server and network proxy server | |
CN116800787A (en) | Vehicle-mounted communication method and system based on Ethernet communication protocol | |
CN115914319A (en) | Remote management method and system for virtual reality equipment | |
CN112468359B (en) | Log acquisition system and method for power system Internet of things edge Internet of things agent device | |
CN108259576B (en) | Software and hardware real-time information transmission system and method |
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 |