CN113965554B - Method for acquiring wireless internet terminal information based on MQTT protocol - Google Patents

Method for acquiring wireless internet terminal information based on MQTT protocol Download PDF

Info

Publication number
CN113965554B
CN113965554B CN202010624622.7A CN202010624622A CN113965554B CN 113965554 B CN113965554 B CN 113965554B CN 202010624622 A CN202010624622 A CN 202010624622A CN 113965554 B CN113965554 B CN 113965554B
Authority
CN
China
Prior art keywords
terminal
message
mqtt
server
kick
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
Application number
CN202010624622.7A
Other languages
Chinese (zh)
Other versions
CN113965554A (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.)
Beijing Shenzhou Digital Cloud Information Technology Co ltd
Original Assignee
Beijing Shenzhou Digital Cloud Information 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 Beijing Shenzhou Digital Cloud Information Technology Co ltd filed Critical Beijing Shenzhou Digital Cloud Information Technology Co ltd
Priority to CN202010624622.7A priority Critical patent/CN113965554B/en
Publication of CN113965554A publication Critical patent/CN113965554A/en
Application granted granted Critical
Publication of CN113965554B publication Critical patent/CN113965554B/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/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • 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 method for acquiring wireless internet terminal information based on an MQTT protocol, wherein a terminal is connected with WIFI; the AP periodically sends the information of the terminal to the AC; the AC encapsulates the terminal information into a message according to the agreed JSON format, and sends the message to an MQTT server; and the WEB application server receives the terminal information sent by the MQTT server and stores the database. The invention also discloses a method for downloading the terminal based on the MQTT protocol.

Description

Method for acquiring wireless internet terminal information based on MQTT protocol
Technical Field
The invention relates to a method for acquiring wireless internet terminal information, in particular to a method for acquiring wireless internet terminal information based on an MQTT protocol.
Background
The wireless controller (Wireless Access Point Controller) is a network device, abbreviated as AC, for centralized control of wireless APs, is a core of a wireless network, and is responsible for managing all wireless APs in the wireless network, and includes: issuing configuration, modifying relevant configuration parameters, intelligent radio frequency management, access security control and the like.
A typical networking mode of a wireless authentication internet system consists of six basic elements: an authentication terminal, an access device (AP), a wireless controller (AC), a WEB application server, a Portal server and an AAA server (Radius). The authentication internet process based on the six elements comprises the steps that when an end user accesses a network, an internet address is input into a web page browser, an http request is redirected to a Portal server when passing through an AP, and a web authentication homepage of the Portal server is displayed on the browser; the user inputs a user name and a password on a web authentication homepage and submits the user name and the password, and the Portal server transmits authentication information of the user to the AC; the AC communicates with the AAA server to finish user authentication, record terminal information MAC and Internet IP, and start charging; when authentication passes, the AC notifies the AP to allow the user to access the internet.
The current processing operation on the information of the wireless internet terminal (iPhone, android, notebook, etc.) generally comprises: and storing and displaying basic information of the wireless internet terminal, actively enabling the authenticated internet terminal to be offline according to the internet strategy, and the like.
The general flow of acquiring the wireless internet terminal information is as follows: the AP periodically reports the authenticated information of the internet terminal to the AC through a TCP protocol, the AC reports the information to the WEB application server through an HTTP protocol, and the WEB application server processes and analyzes the reported information and stores a database.
The general flow of actively letting authenticated internet surfing terminals offline is as follows: the user accesses the WEB application server through the browser, selects a terminal needing to be kicked off from the authenticated terminal, and the WEB application server sends a kicking off message to the AC through a UDP protocol; the AC searches for which AP the terminal is accessed on according to the MAC in the message, and then notifies the corresponding AP to log off the terminal; and sending a success message to the AC after the AP operation is successful.
The AC reports to the WEB application server through the HTTP protocol, and because the HTTP is in short connection, when the reporting terminals are more and the reporting period is shorter, the uploading efficiency is lower.
In an actual network environment, a situation that a firewall is crossed between a WEB application server and a wireless controller may exist when a set of wireless authentication internet access system is distributed, and the wireless controller does not have a fixed public network IP, so that the WEB application server cannot directly send UDP messages to an AC. This requires the configuration of corresponding pass-through IP and pass-through ports at the firewall, or the addition of corresponding trans-NAT mapping policies, which greatly increases the complexity of product deployment and configuration, as well as the difficulty of problem localization.
Disclosure of Invention
The invention aims to improve efficiency and stability of a method for processing wireless internet terminal information based on an internet of things protocol MQTT.
The invention further aims to improve efficiency and stability of the method for kicking off the terminal based on the MQTT protocol.
The technical scheme provided by the invention is as follows:
a method for acquiring wireless internet terminal information based on MQTT protocol,
the terminal is connected with the WIFI;
the AP periodically sends the information of the terminal to the AC;
the AC encapsulates the terminal information into a message according to the agreed JSON format, and sends the message to an MQTT server;
and the WEB application server receives the terminal information sent by the MQTT server and stores the database.
As a further preferred option, after the terminal is connected to WIFI, the AP intercepts the HTTP request sent by the terminal, and when the terminal is not authenticated, the AP redirects the HTTP request of the terminal to a Portal authentication page, and after the user inputs a user name and password in the authentication page, the AC notifies the AP to release the HTTP request of the terminal.
As a further preferred aspect, the terminal information includes a User-Agent field and a network traffic of the MAC, IP, HTTP request.
As a further preferred aspect, the message is composed of a terminal information acquisition identifier, a message request or a corresponding identifier, a message version, a message global ID and a message body.
As a further preference, the message body consists of a terminal MAC, a terminal IP, a terminal type and a terminal traffic.
A method for kicking off a terminal to be off line based on an MQTT protocol,
checking terminal information authenticated to access the internet through a WEB browser, and selecting a terminal needing to be off line;
the WEB server takes the MAC and IP addresses of the selected terminal as offline kicking parameters, encapsulates the parameters into a JSON-format message and then sends the JSON-format message to the MQTT server;
after the wireless AC control server monitors the kick-off message on the MQTT server, the terminal item recorded in the AC is searched and deleted through the MAC of the message, and then the AP is notified;
the AP receives the kick-off message of the AC, deletes the corresponding terminal record from the AP, returns the result to the AC, and sends the result to the MQTT server by the AC;
after the WEB application management server monitors the kick-off line result message on the MQTT server, the result is analyzed, and finally a kick-off success or failure prompt is given on a WEB page.
As a further preferred aspect, the message format is composed of a terminal offline identifier, a message request or a corresponding identifier, a message version, a message global ID, and a message body.
As a further preference, the message body consists of a terminal MAC and a terminal IP.
Compared with the prior art, the invention has the following beneficial effects:
compared with the mode of acquiring terminal information by adopting the HTTP protocol, the data processing efficiency is improved based on the MQTT protocol.
Compared with the mode that UDP protocol is adopted to inform AC to kick off the line to the terminal, the MQTT protocol is based on to improve the implementation efficiency and stability when the firewall exists.
In an actual network environment, since firewall configuration modes are basically different among various manufacturers, the system is deployed to implementation personnel, and the network environment is configured with increased complexity. If the MQTT protocol is adopted, the AC can be connected to the MQTT server only by ensuring that the background application management can be connected to the MQTT server.
Drawings
Fig. 1 is a diagram of a network topology according to the present invention.
Detailed Description
The present invention is described in further detail below with reference to the drawings to enable those skilled in the art to practice the invention by referring to the description.
MQTT (Message Queuing Telemetry Transport) is a message protocol under the ISO standard (ISO/IEC PRF 20922) based on the publish/subscribe paradigm. It works on the TCP/IP protocol family and is a publish/subscribe message protocol designed for remote devices with low hardware performance and in poor network conditions.
The invention mainly comprises the following components which cooperate with each other: the system comprises a background WEB application manager, an MQTT server, a wireless AC control server, a wireless Access Point (AP) and a surfing terminal, wherein the network topology structure of the background WEB application manager, the MQTT server, the wireless AC control server, the wireless Access Point (AP) and the surfing terminal is shown in figure 1.
The wireless controller AC reports the terminal information to the WEB application server through the MQTT protocol, and the WEB application server analyzes, processes and stores the database after receiving the terminal information. The WEB application server sends a message for actively enabling the Internet surfing terminal to be offline to the wireless AC through the MQTT protocol, and the AC equipment informs the AP access equipment after receiving the offline kicking message to stop the Internet surfing service of the terminal.
The technical scheme of the invention is a method for processing terminal information based on MQTT protocol, which comprises the steps of acquiring terminal basic information such as MAC, IP, terminal type and terminal internet surfing flow, and actively enabling authenticated internet surfing terminals to be offline.
The process of obtaining the terminal basic information is as follows:
the terminal is connected with the WIFI SSID, the AP intercepts an HTTP request sent by the terminal, when the terminal is not authenticated, the AP redirects the HTTP request of the terminal to a Portal authentication page, and after a user inputs a user name and password to be authenticated successfully in the authentication page, the AC informs the AP of releasing the HTTP request of the terminal.
The AP periodically transmits information such as a User-Agent field and an internet traffic requested by the information MAC, IP, HTTP of the terminal to the AC.
And the AC packages the terminal information into a message according to the agreed JSON format and sends the message to the MQTT server.
And the WEB application server receives the terminal information sent by the MQTT server, analyzes and processes the terminal information and stores the database.
The active kick authentication terminal is off line, and the flow of stopping the internet service is as follows:
and checking the terminal information authenticated to be online through a WEB browser, and selecting a terminal needing to be offline.
And the WEB server takes the MAC and IP addresses of the selected terminal as offline kicking parameters, encapsulates the parameters into a JSON-format message and then sends the JSON-format message to the MQTT server.
After the wireless AC control server monitors the kick-off message on the MQTT server, the terminal item recorded in the AC is searched and deleted through the MAC of the message, and then the AP is notified.
The AP receives the kick-off message of the AC, deletes the corresponding terminal record from the AP, returns the result to the AC, and sends the result to the MQTT server by the AC.
After the WEB application management server monitors the kick-off line result message on the MQTT server, the result is analyzed, and finally a kick-off success or failure prompt is given on a WEB page.
The key of the invention is to design an MQTT message between a background application system and an AC device, wherein the message adopts a JSON data transmission format.
The message format of the terminal information acquisition is as follows:
Figure BDA0002565970180000051
the message format of the kick terminal off line is as follows:
Figure BDA0002565970180000061
although embodiments of the present invention have been disclosed above, it is not limited to the details and embodiments shown and described, it is well suited to various fields of use for which the invention would be readily apparent to those skilled in the art, and accordingly, the invention is not limited to the specific details and illustrations shown and described herein, without departing from the general concepts defined in the claims and their equivalents.

Claims (3)

1. A method for kicking off a terminal to be off line based on MQTT protocol is characterized in that,
checking terminal information authenticated to access the internet through a WEB browser, and selecting a terminal needing to be off line;
the WEB application management server takes the MAC and IP addresses of the selected terminal as offline kicking parameters, encapsulates the parameters into a JSON format message and then sends the JSON format message to the MQTT server;
after the wireless AC control server monitors the kick-off message on the MQTT server, the terminal item recorded in the AC is searched and deleted through the MAC of the message, and then the AP is notified;
the AP receives the kick-off message of the AC, deletes the corresponding terminal record from the AP, returns the result to the AC, and sends the result to the MQTT server by the AC;
after the WEB application management server monitors the kick-off line result message on the MQTT server, the result is analyzed, and finally a kick-off success or failure prompt is given on a WEB page.
2. The method for kicking off a terminal based on MQTT protocol as set forth in claim 1, wherein the message format is composed of a terminal drop identifier, a message request or corresponding message identifier, a message version, a message global ID, a message body.
3. The MQTT protocol kicking terminal off-line based method of claim 2, wherein the message body consists of a terminal MAC and a terminal IP.
CN202010624622.7A 2020-07-02 2020-07-02 Method for acquiring wireless internet terminal information based on MQTT protocol Active CN113965554B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010624622.7A CN113965554B (en) 2020-07-02 2020-07-02 Method for acquiring wireless internet terminal information based on MQTT protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010624622.7A CN113965554B (en) 2020-07-02 2020-07-02 Method for acquiring wireless internet terminal information based on MQTT protocol

Publications (2)

Publication Number Publication Date
CN113965554A CN113965554A (en) 2022-01-21
CN113965554B true CN113965554B (en) 2023-06-23

Family

ID=79459255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010624622.7A Active CN113965554B (en) 2020-07-02 2020-07-02 Method for acquiring wireless internet terminal information based on MQTT protocol

Country Status (1)

Country Link
CN (1) CN113965554B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1326383A1 (en) * 2002-01-08 2003-07-09 Sonera Oyj Information transmission in a wireless network
CN104980412A (en) * 2014-04-14 2015-10-14 阿里巴巴集团控股有限公司 Application client, server and corresponding Portal authentication method
CN107181792A (en) * 2017-04-21 2017-09-19 珠海派诺科技股份有限公司 Remote equipment management method and device based on MQTT and n2n VPN
CN109769249A (en) * 2019-01-30 2019-05-17 新华三技术有限公司 A kind of authentication method, system and its apparatus
CN111356149A (en) * 2018-12-24 2020-06-30 中兴通讯股份有限公司 Wireless network configuration method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1326383A1 (en) * 2002-01-08 2003-07-09 Sonera Oyj Information transmission in a wireless network
CN104980412A (en) * 2014-04-14 2015-10-14 阿里巴巴集团控股有限公司 Application client, server and corresponding Portal authentication method
CN107181792A (en) * 2017-04-21 2017-09-19 珠海派诺科技股份有限公司 Remote equipment management method and device based on MQTT and n2n VPN
CN111356149A (en) * 2018-12-24 2020-06-30 中兴通讯股份有限公司 Wireless network configuration method and device
CN109769249A (en) * 2019-01-30 2019-05-17 新华三技术有限公司 A kind of authentication method, system and its apparatus

Also Published As

Publication number Publication date
CN113965554A (en) 2022-01-21

Similar Documents

Publication Publication Date Title
US11134543B2 (en) Interworking LPWAN end nodes in mobile operator network
EP3005660B1 (en) Data aggregation
US11388265B2 (en) Machine-to-machine protocol indication and negotiation
US10575153B2 (en) Enhanced operations between service layer and management layer in an M2M system by allowing the execution of a plurality of commands on a plurality of devices
US20230247388A1 (en) Communication system, method and device for miniature intelligent sensor
CN110351385B (en) Home gateway system and data forwarding method
US20030172112A1 (en) Method for the optimization of network traffic, and associated implementation device
EP1741036A2 (en) Service level assurance system and method for wired and wireless broadband networks
JP2002007238A (en) Mobile communication system and its gateway selecting method
CN106713090A (en) Smart home system
CN107615791A (en) Apparatus and method for adding M2M services
KR101705279B1 (en) Server and method for providing device management service and device to be provided the service
US11700301B2 (en) Service registration based on service capabilities requirements and preferences
US7764639B2 (en) Method and device for connection of a device to a wireless network
CN113965554B (en) Method for acquiring wireless internet terminal information based on MQTT protocol
CN111884938B (en) Router information acquisition method and device
WO2019083941A1 (en) Methods to enable data continuity service
EP2936891B1 (en) Method, control node, gateway and computer program for enabling communication with a newly detected device
US20220124008A1 (en) Automated Service Layer Message Flow Management In A Communications Network
CN112491583A (en) Data acquisition and analysis method and device
EP3912329B1 (en) Automated service layer message flow management in a communications network
EP1398916B1 (en) Method and device for connection of a device to a wireless network
CN116599729A (en) Access control method, device, electronic equipment and storage medium
CN114125843A (en) Intelligent device network distribution method, device and equipment
CN114268979A (en) Safe communication method for north interface of network management terminal

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