Communication method and access gateway based on mqtt topic subscription mechanism

An access gateway and topic subscription technology, applied in the field of communication, can solve the problems of complex message routing in distributed instant messaging applications, and achieve the effect of simplifying instant messaging solutions

Active Publication Date: 2020-07-31
QINGDAO HAIER INTELLIGENT HOME TECH CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0017] Aiming at the problem of complex routing of distributed instant messaging application messages in the related art, the present invention provides a communication method and an access gateway based on an MQTT topic subscription mechanism to solve the above technical problems

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Communication method and access gateway based on mqtt topic subscription mechanism
  • Communication method and access gateway based on mqtt topic subscription mechanism
  • Communication method and access gateway based on mqtt topic subscription mechanism

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0044] This embodiment provides an access gateway, figure 1 is a structural block diagram of an access gateway according to an embodiment of the present invention, such as figure 1 As shown, the access gateway includes: IMService (business processing module), MQTTClientI (internal client), MQTTClientR (external client) and MQTTServer (server), wherein,

[0045] IMService is the business processing module of the IM access gateway, responsible for the core business scheduling of the IM access gateway, including functions: user relationship management, access gateway and MQTTClientR mapping management, MQTTClientI and MQTTClientR calls, etc.

[0046] Its function is: used to register event notification with MQTTClientI, so that when the MQTTClientI receives the message from the MQTTServer, it will notify the IMService; it is also used to make the MQTTClientI subscribe to the topic of the MQTTServer; it is also used to create an MQTTClientR , so that the MQTTClientR is connected ...

Embodiment 2

[0054] This embodiment provides a communication method based on the MQTT topic subscription mechanism, figure 2 It is a flowchart of a communication method based on an MQTT topic subscription mechanism according to an embodiment of the present invention, such as figure 2 As shown, the method includes:

[0055] Step S202, start the IMService, MQTTClientI, MQTTClientR, and MQTTServer in the access gateway A and the corresponding access gateway B; wherein, MQTTClientI subscribes to the topic with the MQTTServer of the same access gateway, MQTTClientR connects with the MQTTServer of the corresponding access gateway, and subscribe topic;

[0056] Step S204, the first user goes online at access gateway A, and the second user goes online at access gateway B;

[0057] Step S206, based on the access gateway A and the access gateway B, the first user exchanges messages with the second user.

[0058] Through the above method, the complicated message routing function can be omitted, ...

Embodiment 3

[0076] image 3 is a schematic diagram of an access gateway startup process according to an embodiment of the present invention, as shown in image 3 As shown, the following steps need to be performed to start the access gateway (take the start of access gateway A as an example):

[0077] 1. The IMService that accesses gateway A registers event notification with MQTTClientI, that is, when MQTTClientI receives a message from MQTTServer, it will notify IMService in the form of an event callback function.

[0078] 2. The IMService of access gateway A invokes the function interface of MQTTClientI to make MQTTClientI subscribe to the MQTTServer topic. The topic message includes: the message (Topic : IM / Push / AG / *, IM / Rpt / User / {UserID} / *).

[0079] 3. The IMService of access gateway A is based on the preset access gateway list (assuming that the scale of the access gateway is fixed, each access gateway will be configured with a list of all access gateways, and the list of access ga...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a communication method and an access gateway based on an MQTT topic subscription mechanism. Wherein, the method includes: starting the IMService, MQTTClientI, MQTTClientR, and MQTTServer in the access gateway A and the corresponding access gateway B; the first user goes online at the access gateway A, and the second user goes online at the access gateway B; The ingress gateway A and the access gateway B, and the first user exchanges messages with the second user. The present invention solves the problem of complex message routing in distributed instant messaging applications in related technologies, and can save complex message routing functions. Messages can be based on the subscription relationship maintained by the server and message forwarding based on the subscription relationship, and message routing can be realized by itself Function. Therefore, there is no need to maintain the message routing table, which simplifies the instant communication solution.

Description

technical field [0001] The invention relates to the communication field, in particular to a communication method and an access gateway based on an MQTT topic subscription mechanism. Background technique [0002] Instant messaging (IM for short) is a terminal service that allows two or more people to use the Internet to transmit text messages, files, voice and video in real time. Instant messaging can be divided into enterprise instant messaging and website instant messaging according to the purpose of use, and can be divided into mobile instant messaging and PC instant messaging according to the loading object. The representative of mobile instant messaging is SMS, and the representative of PC instant messaging is video. [0003] MQTT (Message Queuing Telemetry Transport) is an instant messaging protocol developed by IBM, which may become an important part of the Internet of Things. The protocol supports all platforms and can connect almost all Internet-connected objects to...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): H04L12/58H04L29/06H04L12/66
CPCH04L12/66H04L51/04H04L65/4061H04L51/224H04L65/401
Inventor 张磊
Owner QINGDAO HAIER INTELLIGENT HOME TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products