WO2019024197A1 - 一种基于udp传输的应用程序认证方法及系统 - Google Patents

一种基于udp传输的应用程序认证方法及系统 Download PDF

Info

Publication number
WO2019024197A1
WO2019024197A1 PCT/CN2017/102723 CN2017102723W WO2019024197A1 WO 2019024197 A1 WO2019024197 A1 WO 2019024197A1 CN 2017102723 W CN2017102723 W CN 2017102723W WO 2019024197 A1 WO2019024197 A1 WO 2019024197A1
Authority
WO
WIPO (PCT)
Prior art keywords
udp
application
request
access device
wireless access
Prior art date
Application number
PCT/CN2017/102723
Other languages
English (en)
French (fr)
Inventor
王斌
Original Assignee
上海斐讯数据通信技术有限公司
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 上海斐讯数据通信技术有限公司 filed Critical 上海斐讯数据通信技术有限公司
Publication of WO2019024197A1 publication Critical patent/WO2019024197A1/zh

Links

Images

Classifications

    • 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/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/164Adaptation or special uses of UDP protocol
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication

Definitions

  • the present invention relates to the field of wireless network technologies, and in particular, to an application authentication method and system based on UDP transmission.
  • Portal authentication technology is an easy-to-use identity authentication technology whose main purpose is to verify the identity of the client accessing the network.
  • the user When an unauthenticated user accesses the Internet, the user is forced to log in to the designated portal site, and the user can access the service for free. If the user needs to access other resources on the Internet, Portal authentication must be performed on the portal. Only after the Portal authentication is passed can the user be authenticated. Use internet resources.
  • APP is a third-party application for smartphones and is only used to provide online services.
  • more and more APP manufacturers have added automatic Internet access functions to the app, such as "one-click Internet access.”
  • the prior art mainly implements an automatic Internet access function by embedding a browser in the APP.
  • the browser is started to access the preset public network address, and the Http request sent by the APP client is intercepted by the wireless access device and returns a redirect message, so that the browser launches the portal. Certification page.
  • the user obtains the right to access the Internet by filling in the username and password on the authentication page.
  • the APP authentication method based on the APP application and the device thereof disclosed in the patent document disclosed in the patent document CN104158808A discloses a Portal authentication method based on an APP application and an apparatus thereof, which are applied to an access device, the method comprising Receiving a TCP three-way handshake connection request initiated by the user terminal to the APP application server, determining whether the connection request has passed the portal authentication or in the white list, and if yes, forwarding the TCP connection request packet of the user terminal, so that the user terminal and the APP application server A TCP connection is established; otherwise, the fake APP application server establishes a TCP connection with the user terminal; receives the Get request message of the Http sent by the user terminal, parses the URL in the message, and adds the IP address of the APP application server to the white list, The user terminal returns an RST message to notify the user terminal to The APP application server re-initiates a TCP three-way handshake connection request.
  • the "Portal authentication method and authentication server" disclosed in the patent document of the publication CN105162802A is applicable to the field of communication technology, and provides a Portal authentication method and an authentication server, the method comprising: setting an APP client access time a URL to be authenticated by the portal and a corresponding Http header field when the APP client accesses the URL; if the portal authentication is performed, if the URL to be accessed in the authentication request message sent by the APP client is received and the set is If the URL is the same, and the Http header field in the authentication request message is the same as the set Http header field, the authentication is determined to be successful, and an authentication pass message is sent to the wireless access device.
  • Http-based APP authentication is not necessary for APP.
  • Http belongs to the TCP category. In the whole interaction process, it has a great impact on the operation efficiency of the AP.
  • the technical problem to be solved by the present invention is to provide an application authentication method and system based on UDP transmission, and perform a UDP interaction process between the APP and the AP to make the APP more convenient in the Portal server. Authentication is performed on it, and the UDP interaction process is beneficial to alleviate the pressure on the AP.
  • An application authentication method based on UDP transmission comprising the steps of:
  • the UDP request format includes: a first feature code, application authentication request information, and a first cyclic redundancy check code.
  • the UDP response format includes: a second feature code, application authentication response information, Portal server address information, and a second cyclic redundancy check code.
  • the first feature code is the same as the second feature code.
  • step S1 when the wireless access device receives the UDP request sent by the application, it is checked whether the first cyclic redundancy check code is correct;
  • the wireless access device sends a UDP response including the Portal server address information to the application.
  • the wireless access device sends a UDP response to the application requesting the application to resend the UDP request.
  • step S2 when the application receives the UDP response sent by the wireless access device, it is checked whether the second cyclic redundancy check code is correct;
  • step S3 is performed.
  • the application resends the UDP request to the wireless access device.
  • An application authentication system based on UDP transmission comprising: a user terminal installed with an authentication application, a wireless access device, and a Portal server;
  • the application is configured to send a UDP request to the wireless access device, to receive a UDP response sent by the wireless access device, and to send a website access request to the Portal server according to the Portal server address information;
  • the wireless access device is configured to receive a UDP request sent by an application, and configured to send a UDP response to the application;
  • the Portal server is configured to receive a website access request sent by an application.
  • the wireless access device is further configured to: when receiving the UDP request sent by the application, check whether the first cyclic redundancy check code is correct;
  • the application is further configured to check whether the second cyclic redundancy check code is correct when receiving a UDP response sent by the wireless access device.
  • UDP is used instead of HTTP in TCP mode. Since UDP does not require an application and a wireless access device to perform TCP three-way handshake, the load on the wireless access device can be greatly reduced, and the operating efficiency of the wireless access device can be improved.
  • FIG. 1 is a flowchart of an application authentication method based on UDP transmission according to Embodiment 1 of the present invention
  • FIG. 2 is a structural diagram of an application authentication system based on UDP transmission according to Embodiment 3 of the present invention.
  • first, second, and the like in the specification and claims of the present invention are used to distinguish different objects, and are not intended to describe a specific order.
  • first, second, etc. may be used to distinguish feature codes in embodiments of the present invention, but these feature codes should not be limited to these terms.
  • the first feature code may also be referred to as a third feature code without departing from the scope of the embodiments of the present invention.
  • the second feature code may also be referred to as a fourth feature code.
  • the first cyclic redundancy check code and the second cyclic redundancy check code are also included. These terms are only used to distinguish these objects from each other.
  • the wireless access device (AP) involved in the embodiment of the present invention may be a wireless router, or may be a network entity having a function of a wireless router.
  • FIG. 1 is a flowchart of a method for authenticating an application based on UDP transmission according to the embodiment.
  • an application authentication method based on UDP transmission in this embodiment includes the following steps:
  • the authentication APP sends a UDP request to the wireless access device, where the UDP request format includes: a first signature, and application authentication request information.
  • the AP After receiving the UDP request sent by the APP, the AP generates a corresponding UDP response according to the application authentication request information in the UDP request, and sends the UDP response to the APP, where the UDP response format includes: Signature, application authentication response information, Portal server address information.
  • the first feature code is the same as the second feature code.
  • the APP After receiving the UDP response sent by the AP, the APP obtains the Portal server address information and initiates a website access request to the Portal server.
  • This embodiment uses the UDP mechanism for APP authentication.
  • APP is proprietary to APP developers. All can use the traditional HTTP-based Portal authentication method, but other methods can be used.
  • This embodiment uses the UDP method instead of the HTTP TCP method. UDP does not require the APP and the AP to perform a TCP three-way handshake, which greatly reduces the compliance.
  • UDP is the abbreviation of User Datagram Protocol.
  • the Chinese name is User Datagram Protocol.
  • It is a connectionless transport layer protocol in the OSI (Open System Interconnection) reference model. It provides a transaction-oriented simple and unreliable information transmission service.
  • IETF RFC 768 is the official specification of UDP.
  • the UDP protocol is used in the network to process data packets in the same way as the TCP protocol. It is a connectionless protocol.
  • the transport layer is on the upper layer of the IP protocol.
  • the UDP payload (effective data) is defined in the following format: the top of the Payload is a 10 byte feature code, and the feature code is a random number, representing an interaction, belonging to the same interactive request (request) and response (response).
  • the signatures are consistent.
  • the signature code is followed by an information message.
  • the payload of the UDP request packet sent by the APP is in the following format:
  • the feature code corresponds to the first feature code, followed by a string: “APP Auth request”.
  • the AP After receiving the UDP request, the AP generates and sends a payload of the UDP response packet.
  • a payload of the UDP response packet In the following format:
  • the signature corresponds to the second signature, followed by a string: "APP Auth request" and Portal server address information.
  • the signature of the UDP response is consistent with the signature of the UDP request to indicate that the request and response belong to the same interaction.
  • This embodiment provides an application authentication method based on UDP transmission, and uses UDP instead of HTTP TCP. Since UDP does not require an application and a wireless access device to perform TCP three-way handshake, the load of the wireless access device can be greatly reduced. Improve the efficiency of wireless access equipment.
  • UDP has the disadvantage of not providing packet grouping, assembling, and sorting of data packets, that is, after the message is sent, it is impossible to know whether it arrives safely and completely. Especially in the environment where the network quality is very unsatisfactory, the UDP protocol packet loss is more serious. Therefore, in this embodiment, the UDP packet based on the CRC check is used.
  • CRC Cyclic Redundancy Check
  • Cyclic Redundancy Check CRC is the Cyclic Redundancy Check (Cyclic Redundancy Check): It is the most commonly used error checking code in the field of data communication. Its characteristic is that the length of the information field and the check field can be arbitrarily selected.
  • Cyclic Redundancy Check CRC is a data transmission error detection function that performs polynomial calculation on data and attaches the result to the back of the frame. The receiving device also performs a similar algorithm to ensure the correctness and completeness of the data transmission. Sex.
  • the UDP request format includes: a first feature code, application authentication request information, and a first cyclic redundancy check code (CRC).
  • CRC cyclic redundancy check code
  • the UDP response format includes: a second signature, application authentication response information, Portal server address information, and a second cyclic redundancy check code (CRC).
  • CRC cyclic redundancy check code
  • the payload of the UDP request packet sent by the APP is in the following format:
  • the feature code corresponds to the first feature code, followed by a string: “APP Auth request”, and the following CRC corresponds to the first cyclic redundancy check code.
  • the AP After receiving the UDP request, the AP generates and sends a payload of the UDP response packet.
  • a payload of the UDP response packet In the following format:
  • the feature code corresponds to the second feature code, followed by a character string: “APP Auth request” and Portal server address information, and the following CRC corresponds to the second cyclic redundancy check code.
  • step S1 when the wireless access device receives the UDP request sent by the application, it is checked whether the first cyclic redundancy check code is correct.
  • the wireless access device sends a UDP response including the Portal server address information to the application.
  • the wireless access device sends a UDP response requesting the application to resend the UDP request to the application.
  • step S2 when the application receives the UDP response sent by the wireless access device, it is checked whether the second cyclic redundancy check code is correct.
  • step S3 is performed.
  • the second cyclic redundancy check code is incorrect, it indicates that there is a loss of the UDP protocol data packet, and the application resends the UDP request to the wireless access device.
  • the basic principle of the radio access device and the application program checking whether the cyclic redundancy check code (CRC) is correct is: splicing the parity code of the R bit after the K bit information code, and the entire coding length is N bits. Therefore, this code is also called (N, K) code.
  • N, K cyclic redundancy check code
  • the specific generation process of the check code is as follows: suppose the information to be transmitted is represented by a polynomial C(X), and C(x) is shifted to the left by R bits (which can be expressed as C(x)*2 R ), so that C(x) The R bit will be vacated on the right side, which is the position of the check code. The remainder obtained by dividing C(x)*2 R by the generator polynomial G(x) is the check code.
  • Any code consisting of a binary bit string can be in one-to-one correspondence with a polynomial whose coefficients are only '0' and '1'.
  • the polynomial corresponding to the code 1010111 is x 6 + x 4 + x 2 + x + 1
  • the polynomial is the code 101111 corresponding to x 5 + x 3 + x 2 + x + 1.
  • the UDP packet based on the CRC check is used to improve the stability and security of UDP packet transmission.
  • FIG. 2 is a structural diagram of an application authentication system based on UDP transmission in the embodiment.
  • an application 110 authentication system based on UDP transmission includes: an authentication application 110 is installed.
  • the application 110 is configured to send a UDP request to the wireless access device 200, to receive a UDP response sent by the wireless access device 200, and to send a website access request to the Portal server 300 according to the address information of the Portal server 300. ;
  • the wireless access device 200 is configured to receive a UDP request sent by the application 110, and configured to send a UDP response to the application 110.
  • the Portal server 300 is configured to receive a website access request sent by the application 110.
  • the wireless access device 200 is further configured to: when receiving the UDP request sent by the application 110, check whether the first cyclic redundancy check code is correct;
  • the application 110 is further configured to check whether the second cyclic redundancy check code is correct when receiving the UDP response sent by the wireless access device 200.
  • the application 110 includes:
  • the first sending module 111 is configured to send a UDP request to the wireless access device 200;
  • the first receiving module 112 is configured to receive a UDP response sent by the wireless access device 200.
  • the second sending module 113 is configured to send a website access request to the Portal server 300 according to the address information of the Portal server 300.
  • the wireless access device 200 includes:
  • the second receiving module 210 is configured to receive a UDP request sent by the application 110.
  • the third sending module 220 is configured to send a UDP response to the application 110.
  • the Portal server 300 includes:
  • the third receiving module 310 is configured to receive a website access request sent by the application 110.
  • the wireless access device 200 further includes:
  • the first checking module 230 is configured to check whether the first cyclic redundancy check code is correct when receiving the UDP request sent by the application 110.
  • the application 110 also includes:
  • the second checking module 114 is configured to check whether the second cyclic redundancy check code is correct when receiving the UDP response sent by the wireless access device 200.
  • This embodiment provides an application authentication system based on UDP transmission, which uses UDP instead of HTTP TCP. Since UDP does not require an application and a wireless access device to perform TCP three-way handshake, the load on the wireless access device can be greatly reduced. Improve the efficiency of wireless access equipment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了一种基于UDP传输的应用程序认证方法及系统,该方法包括步骤:S1.发送UDP请求至无线接入设备,所述UDP请求包含应用程序认证请求信息;S2.接收无线接入设备发送的UDP响应,所述UDP响应包含应用程序认证响应信息及Portal服务器地址信息;S3.根据所述Portal服务器地址信息向所述Portal服务器发送网站访问请求。本发明优点在于:(1)采用UDP方式代替HTTP的TCP方式,由于UDP不需要应用程序和无线接入设备进行TCP三次握手,可以大大减轻无线接入设备的负荷,提高无线接入设备运行效率;(2)采用基于CRC校验的UDP报文,能提高UDP报文传输的稳定安全性能。

Description

一种基于UDP传输的应用程序认证方法及系统 技术领域
本发明涉及无线网络技术领域,尤其涉及一种基于UDP传输的应用程序认证方法及系统。
背景技术
Portal认证技术是一种简单易用的身份认证技术,其主要目的是为了验证接入网络的客户端身份。当未认证用户上网时,强制用户登录到指定门户网站站点,用户可以免费访问其中的服务;若用户需要访问互联网中的其他资源时,必须在门户网站进行Portal认证,只有Portal认证通过后才能够使用互联网资源。
APP为智能手机的第三方应用程序,仅用来提供在线服务。为了吸引用户安装APP,越来越多的APP厂商在APP中添加了自动上网功能,比如“一键上网”。然而,现有技术主要通过在APP中内嵌浏览器来实现自动上网功能。当用户打开所述“一键上网”功能时,启动浏览器访问预设的公网地址,APP客户端发出的Http请求会被无线接入设备截获并返回重定向报文,使得浏览器推出Portal认证页面。用户通过在所述认证页面上填写用户名、密码来获得上网权限。
如公开号为CN104158808A的专利文献公开的“基于APP应用的Portal认证方法及其装置”,该发明公开了一种基于APP应用的Portal认证方法及其装置,应用于接入设备上,该方法包括:接收用户终端向APP应用服务器发起的TCP三次握手连接请求,判断连接请求是否已通过Portal认证或者在白名单内,若是,则转发用户终端的TCP连接请求报文,使用户终端与APP应用服务器建立TCP连接;否则仿冒APP应用服务器与用户终端建立TCP连接;接收用户终端发送的Http的Get请求报文,解析该报文中的URL,将APP应用服务器的IP地址加入到白名单内,向用户终端返回RST报文,通知用户终端向 APP应用服务器重新发起TCP三次握手连接请求。
又如公开号为CN105162802A的专利文献公开的“Portal认证方法及认证服务器”,该发明适用于通信技术领域,提供了一种Portal认证方法及认证服务器,所述方法包括:设置APP客户端访问时需进行Portal认证的URL以及所述APP客户端访问所述URL时对应的Http包头字段;在进行Portal认证时,若接收到的APP客户端发送的认证请求消息中的待访问URL和所设置的URL相同,且所述认证请求消息中的Http包头字段和所设置的Http包头字段相同,则确定认证成功,并向无线接入设备发出认证通过消息。
事实上,基于Http的APP认证对APP来说并不是必须的,Http属于TCP范畴,在整个交互过程中,对AP的运行效率影响很大。
发明内容
针对上述现有技术的现状,本发明所要解决的技术问题在于提供一种基于UDP传输的应用程序认证方法及系统,通过APP和AP间进行UDP交互过程,来使得APP可以更方便的在Portal服务器上进行认证,并且UDP交互过程有利于减轻AP的压力。
本发明解决上述技术问题所采用的技术方案为:
一种基于UDP传输的应用程序认证方法,包括步骤:
S1.发送UDP请求至无线接入设备,所述UDP请求包含应用程序认证请求信息;
S2.接收无线接入设备发送的UDP响应,所述UDP响应包含应用程序认证响应信息及Portal服务器地址信息;
S3.根据所述Portal服务器地址信息向所述Portal服务器发送网站访问请求。
进一步地,步骤S1中,所述UDP请求格式包括:第一特征码、应用程序认证请求信息及第一循环冗余校验码。
进一步地,步骤S2中,所述UDP响应格式包括:第二特征码、应用程序认证响应信息、Portal服务器地址信息及第二循环冗余校验码。
进一步地,所述第一特征码与所述第二特征码相同。
进一步地,步骤S1中,当无线接入设备接收应用程序发送的UDP请求时,检查所述第一循环冗余校验码是否正确;
若所述第一循环冗余校验码正确,则无线接入设备向所述应用程序发送包含Portal服务器地址信息的UDP响应。
进一步地,若所述第一循环冗余校验码错误,则无线接入设备向所述应用程序发送要求应用程序重新发送UDP请求的UDP响应。
进一步地,步骤S2中,当应用程序接收无线接入设备发送的UDP响应时,检查所述第二循环冗余校验码是否正确;
若所述第二循环冗余校验码正确,则执行步骤S3。
进一步地,若所述第二循环冗余校验码错误,则应用程序重新发送UDP请求至无线接入设备。
一种基于UDP传输的应用程序认证系统,包括:安装有认证应用程序的用户终端、无线接入设备及Portal服务器;
所述应用程序用于发送UDP请求至无线接入设备;用于接收无线接入设备发送的UDP响应;用于根据所述Portal服务器地址信息向所述Portal服务器发送网站访问请求;
所述无线接入设备用于接收应用程序发送的UDP请求;用于向所述应用程序发送UDP响应;
所述Portal服务器用于接收应用程序发送的网站访问请求。
进一步地,所述无线接入设备还用于当接收到应用程序发送的UDP请求时,检查所述第一循环冗余校验码是否正确;
所述应用程序还用于当接收到无线接入设备发送的UDP响应时,检查所述第二循环冗余校验码是否正确。
本发明优点在于:
(1)采用UDP方式代替HTTP的TCP方式,由于UDP不需要应用程序和无线接入设备进行TCP三次握手,可以大大减轻无线接入设备的负荷,提高无线接入设备运行效率;
(2)采用基于CRC校验的UDP报文,能提高UDP报文传输的稳定安全性能。
附图说明
图1为本发明实施例一中一种基于UDP传输的应用程序认证方法流程图;
图2为本发明实施例三中一种基于UDP传输的应用程序认证系统结构图。
具体实施方式
以下是本发明的具体实施例并结合附图,对本发明的技术方案作进一步的描述,但本发明并不限于这些实施例。
需要说明的是,在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。
在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。
另外,本发明的说明书和权利要求书及附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。例如,在本发明实施例中可能采用术语第一、第二等来区分特征码,但这些特征码不应限于这些术语。例如,在不脱离本发明实施例范围的情况下,第一特征码也可以被称为第三特征码,类似地,第二特征码也可以被称为第四特征码。类似的还包括第一循环冗余校验码及第二循环冗余校验码。这些术语仅用来将这些对象彼此区分开。
本发明实施例涉及的无线接入设备(AP),可以为无线路由器,还可以为具有无线路由器的功能的网络实体。
以下为本发明具体实施例。
实施例一
图1为本实施例中一种基于UDP传输的应用程序认证方法流程图,如图1所示,本实施例中一种基于UDP传输的应用程序认证方法包括步骤:
S1.发送UDP请求至无线接入设备,所述UDP请求包含应用程序认证请求信息;
本步骤中,用户终端通过应用程序(APP)进行网络认证时,认证APP发送UDP请求至无线接入设备,所述UDP请求格式包括:第一特征码、应用程序认证请求信息。
S2.接收无线接入设备发送的UDP响应,所述UDP响应包含应用程序认证响应信息及Portal服务器地址信息;
本步骤中,当AP接收APP发送的UDP请求后,根据该UDP请求中的应用程序认证请求信息,生成对应的UDP响应,并将该UDP响应发送至APP,所述UDP响应格式包括:第二特征码、应用程序认证响应信息、Portal服务器地址信息。
其中,所述第一特征码与所述第二特征码相同。
S3.根据所述Portal服务器地址信息向所述Portal服务器发送网站访问请求。
本步骤中,当APP接收AP发送的UDP响应后,获取其中的Portal服务器地址信息,并向该Portal服务器发起网站访问请求。
本实施例采用UDP机制进行APP认证。首先我们应该注意上APP都是APP开发者私有的,所有可以采用传统的基于HTTP的Portal认证方法,但也可以用其他方法。本实施例采用UDP方式来代替HTTP的TCP方式。UDP不需要APP和AP进行TCP三次握手,就大大减轻了符合。
UDP是User Datagram Protocol的简称,中文名是用户数据报协议,是OSI(Open System Interconnection,开放式系统互联)参考模型中一种无连接的传输层协议,提供面向事务的简单不可靠信息传送服务,IETF RFC 768是UDP的正式规范。UDP协议在网络中与TCP协议一样用于处理数据包,是一种无连接的协议。在OSI模型中,在第四层——传输层,处于IP协议的上一层。
本实施例中,将UDP payload(有效数据)定义格式如下:Payload最前面为一10byte特征码,特征码为一随机数字,代表一次交互,属于同一次交互request(请求)和response(响应)的特征码一致。特征码之后为信息报文。
本实施例中APP发送的UDP request报文的payload按以下格式:
特征码 “APP Auth request”
其中特征码对应第一特征码,其后为一字符串:“APP Auth request”。
AP收到UDP request后,则生成及发送的UDP response报文的payload 按以下格式:
特征码 “APP Auth response” Portal URL
其中特征码对应第二特征码,其后为一字符串:“APP Auth request”及Portal服务器地址信息。
需要说明的是,UDP response的特征码和UDP request的特征码一致,以表明属于是同一次交互的request和response。
本实施例提供一种基于UDP传输的应用程序认证方法,采用UDP方式代替HTTP的TCP方式,由于UDP不需要应用程序和无线接入设备进行TCP三次握手,可以大大减轻无线接入设备的负荷,提高无线接入设备运行效率。
实施例二
由于UDP有不提供数据包分组、组装和不能对数据包进行排序的缺点,也就是说,当报文发送之后,是无法得知其是否安全完整到达的。尤其在网络质量令人十分不满意的环境下,UDP协议数据包丢失会比较严重,因此本实施例中采用基于CRC校验的UDP报文。
CRC即循环冗余校验码(Cyclic Redundancy Check):是数据通信领域中最常用的一种查错校验码,其特征是信息字段和校验字段的长度可以任意选定。循环冗余检查(CRC)是一种数据传输检错功能,对数据进行多项式计算,并将得到的结果附在帧的后面,接收设备也执行类似的算法,以保证数据传输的正确性和完整性。
本实施例中,步骤S1中,所述UDP请求格式包括:第一特征码、应用程序认证请求信息及第一循环冗余校验码(CRC)。
步骤S2中,所述UDP响应格式包括:第二特征码、应用程序认证响应信息、Portal服务器地址信息及第二循环冗余校验码(CRC)。
本实施例中APP发送的UDP request报文的payload按以下格式:
特征码 “APP Auth request” CRC
其中特征码对应第一特征码,其后为一字符串:“APP Auth request”,后面的CRC对应第一循环冗余校验码。
AP收到UDP request后,则生成及发送的UDP response报文的payload 按以下格式:
特征码 “APP Auth response” Portal URL CRC
其中特征码对应第二特征码,其后为一字符串:“APP Auth request”及Portal服务器地址信息,后面的CRC对应第二循环冗余校验码。
本实施例中,步骤S1中,当无线接入设备接收应用程序发送的UDP请求时,检查所述第一循环冗余校验码是否正确;
若所述第一循环冗余校验码正确,则无线接入设备向所述应用程序发送包含Portal服务器地址信息的UDP响应。
若所述第一循环冗余校验码错误,则表示UDP协议数据包存在丢失情况,无线接入设备向所述应用程序发送要求应用程序重新发送UDP请求的UDP响应。
本实施例中,步骤S2中,当应用程序接收无线接入设备发送的UDP响应时,检查所述第二循环冗余校验码是否正确;
若所述第二循环冗余校验码正确,则执行步骤S3。
若所述第二循环冗余校验码错误,则表示UDP协议数据包存在丢失情况,应用程序重新发送UDP请求至无线接入设备。
本实施例中,无线接入设备及应用程序检查循环冗余校验码(CRC)是否正确的基本原理为:在K位信息码后再拼接R位的校验码,整个编码长度为N位,因此,这种编码也叫(N,K)码。对于一个给定的(N,K)码,可以证明存在一个最高次幂为N-K=R的多项式G(x)。根据G(x)可以生成K位信息的校验码,而G(x)叫做这个CRC码的生成多项式。校验码的具体生成过程为:假设要发送的信息用多项式C(X)表示,将C(x)左移R位(可表示成C(x)*2R),这样C(x)的右边就会空出R位,这就是校验码的位置。用C(x)*2R除以生成多项式G(x)得到的余数就是校验码。
任意一个由二进制位串组成的代码都可以和一个系数仅为‘0’和‘1’取值的多项式一一对应。例如:代码1010111对应的多项式为x6+x4+x2+x+1,而多项式为x5+x3+x2+x+1对应的代码101111。
本实施例中采用基于CRC校验的UDP报文,能提高UDP报文传输的稳定安全性能。
实施例三
图2为本实施例中一种基于UDP传输的应用程序认证系统结构图,如图2所示,本实施例中一种基于UDP传输的应用程序110认证系统包括:安装有认证应用程序110的用户终端100、无线接入设备200及Portal服务器300;
所述应用程序110用于发送UDP请求至无线接入设备200;用于接收无线接入设备200发送的UDP响应;用于根据所述Portal服务器300地址信息向所述Portal服务器300发送网站访问请求;
所述无线接入设备200用于接收应用程序110发送的UDP请求;用于向所述应用程序110发送UDP响应;
所述Portal服务器300用于接收应用程序110发送的网站访问请求。
所述无线接入设备200还用于当接收到应用程序110发送的UDP请求时,检查所述第一循环冗余校验码是否正确;
所述应用程序110还用于当接收到无线接入设备200发送的UDP响应时,检查所述第二循环冗余校验码是否正确。
所述应用程序110包括:
第一发送模块111,用于发送UDP请求至无线接入设备200;
第一接收模块112,用于接收无线接入设备200发送的UDP响应;
第二发送模块113,用于根据所述Portal服务器300地址信息向所述Portal服务器300发送网站访问请求;
所述无线接入设备200包括:
第二接收模块210,用于接收应用程序110发送的UDP请求;
第三发送模块220,用于向所述应用程序110发送UDP响应;
所述Portal服务器300包括:
第三接收模块310,用于接收应用程序110发送的网站访问请求。
此外,所述无线接入设备200还包括:
第一检查模块230,用于当接收到应用程序110发送的UDP请求时,检查所述第一循环冗余校验码是否正确;
所述应用程序110还包括:
第二检查模块114,用于当接收到无线接入设备200发送的UDP响应时,检查所述第二循环冗余校验码是否正确。
本实施例提供一种基于UDP传输的应用程序认证系统,采用UDP方式代替HTTP的TCP方式,由于UDP不需要应用程序和无线接入设备进行TCP三次握手,可以大大减轻无线接入设备的负荷,提高无线接入设备运行效率。
本文中所描述的具体实施例仅仅是对本发明精神作举例说明。本发明所属技术领域的技术人员可以对所描述的具体实施例做各种各样的修改或补充或采用类似的方式替代,但并不会偏离本发明的精神或者超越所附权利要求书所定义的范围。

Claims (10)

  1. 一种基于UDP传输的应用程序认证方法,其特征在于,包括步骤:
    S1.发送UDP请求至无线接入设备,所述UDP请求包含应用程序认证请求信息;
    S2.接收无线接入设备发送的UDP响应,所述UDP响应包含应用程序认证响应信息及Portal服务器地址信息;
    S3.根据所述Portal服务器地址信息向所述Portal服务器发送网站访问请求。
  2. 如权利要求1所述的一种基于UDP传输的应用程序认证方法,其特征在于,步骤S1中,所述UDP请求格式包括:第一特征码、应用程序认证请求信息及第一循环冗余校验码。
  3. 如权利要求1所述的一种基于UDP传输的应用程序认证方法,其特征在于,步骤S2中,所述UDP响应格式包括:第二特征码、应用程序认证响应信息、Portal服务器地址信息及第二循环冗余校验码。
  4. 如权利要求2或3所述的一种基于UDP传输的应用程序认证方法,其特征在于,所述第一特征码与所述第二特征码相同。
  5. 如权利要求2所述的一种基于UDP传输的应用程序认证方法,其特征在于,步骤S1中,当无线接入设备接收应用程序发送的UDP请求时,检查所述第一循环冗余校验码是否正确;
    若所述第一循环冗余校验码正确,则无线接入设备向所述应用程序发送包含Portal服务器地址信息的UDP响应。
  6. 如权利要求5所述的一种基于UDP传输的应用程序认证方法,其特征在于,若所述第一循环冗余校验码错误,则无线接入设备向所述应用程序发送要求应用程序重新发送UDP请求的UDP响应。
  7. 如权利要求3所述的一种基于UDP传输的应用程序认证方法,其特征在于,步骤S2中,当应用程序接收无线接入设备发送的UDP响应时,检查所述第二循环冗余校验码是否正确;
    若所述第二循环冗余校验码正确,则执行步骤S3。
  8. 如权利要求7所述的一种基于UDP传输的应用程序认证方法,其特征 在于,若所述第二循环冗余校验码错误,则应用程序重新发送UDP请求至无线接入设备。
  9. 一种基于UDP传输的应用程序认证系统,其特征在于,包括:安装有认证应用程序的用户终端、无线接入设备及Portal服务器;
    所述应用程序用于发送UDP请求至无线接入设备;用于接收无线接入设备发送的UDP响应;用于根据所述Portal服务器地址信息向所述Portal服务器发送网站访问请求;
    所述无线接入设备用于接收应用程序发送的UDP请求;用于向所述应用程序发送UDP响应;
    所述Portal服务器用于接收应用程序发送的网站访问请求。
  10. 如权利要求9所述的一种基于UDP传输的应用程序认证系统,其特征在于,所述无线接入设备还用于当接收到应用程序发送的UDP请求时,检查第一循环冗余校验码是否正确;
    所述应用程序还用于当接收到无线接入设备发送的UDP响应时,检查第二循环冗余校验码是否正确。
PCT/CN2017/102723 2017-08-02 2017-09-21 一种基于udp传输的应用程序认证方法及系统 WO2019024197A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710650754.5A CN107426228A (zh) 2017-08-02 2017-08-02 一种基于udp传输的应用程序认证方法及系统
CN201710650754.5 2017-08-02

Publications (1)

Publication Number Publication Date
WO2019024197A1 true WO2019024197A1 (zh) 2019-02-07

Family

ID=60436531

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/102723 WO2019024197A1 (zh) 2017-08-02 2017-09-21 一种基于udp传输的应用程序认证方法及系统

Country Status (2)

Country Link
CN (1) CN107426228A (zh)
WO (1) WO2019024197A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112114294A (zh) * 2020-09-24 2020-12-22 北京无线电测量研究所 一种雷达目标模拟器的控制方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143204A (zh) * 2010-11-26 2011-08-03 华为技术有限公司 一种内容分发网络中实现超文本传输协议重定向的方法、装置及系统
CN104852919A (zh) * 2015-05-14 2015-08-19 杭州华三通信技术有限公司 实现门户Portal认证的方法及装置
CN105162761A (zh) * 2015-07-28 2015-12-16 上海斐讯数据通信技术有限公司 一种Portal认证URL的动态选择方法、系统、及无线接入点
CN106453233A (zh) * 2016-08-10 2017-02-22 深圳市中兴物联科技股份有限公司 一种基于udp的数据传输方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104158808B (zh) * 2014-08-19 2018-03-16 新华三技术有限公司 基于APP应用的Portal认证方法及其装置
CN105162802B (zh) * 2015-09-29 2018-10-23 华讯方舟科技有限公司 Portal认证方法及认证服务器

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143204A (zh) * 2010-11-26 2011-08-03 华为技术有限公司 一种内容分发网络中实现超文本传输协议重定向的方法、装置及系统
CN104852919A (zh) * 2015-05-14 2015-08-19 杭州华三通信技术有限公司 实现门户Portal认证的方法及装置
CN105162761A (zh) * 2015-07-28 2015-12-16 上海斐讯数据通信技术有限公司 一种Portal认证URL的动态选择方法、系统、及无线接入点
CN106453233A (zh) * 2016-08-10 2017-02-22 深圳市中兴物联科技股份有限公司 一种基于udp的数据传输方法及装置

Also Published As

Publication number Publication date
CN107426228A (zh) 2017-12-01

Similar Documents

Publication Publication Date Title
US9584480B2 (en) System for and method of securing a network utilizing credentials
Shelby et al. The constrained application protocol (CoAP)
US9088416B2 (en) Method for securely associating data with HTTP and HTTPS sessions
EP3120591B1 (en) User identifier based device, identity and activity management system
US8869258B2 (en) Facilitating token request troubleshooting
WO2017000272A1 (zh) 一种无线系统接入控制方法及装置
US10277586B1 (en) Mobile authentication with URL-redirect
JP2007528650A (ja) エンティティの第1のidおよび第2のidの検証方法
KR20040084996A (ko) 패킷과 패킷 인증 방법 및 구조
CN110771116B (zh) 一种加密数据流的识别方法、设备、存储介质及系统
CN107517194B (zh) 一种内容分发网络的回源认证方法和装置
CN109040059B (zh) 受保护的tcp通信方法、通信装置及存储介质
WO2013056619A1 (zh) 一种身份联合的方法、IdP、SP及系统
EP3182672A1 (en) Result reporting for authentication, authorization and accounting protocols
WO2023050524A1 (zh) 基于im的用户身份验证方法、装置、服务器及其存储介质
CN110474922B (zh) 一种通信方法、pc系统及接入控制路由器
CN110730189A (zh) 一种通信认证方法、装置、设备及存储介质
CN113055357B (zh) 单包验证通信链路可信的方法、装置、计算设备及存储介质
CN110417804B (zh) 一种适于单片机实现的双向身份认证加密通信方法及系统
WO2019024197A1 (zh) 一种基于udp传输的应用程序认证方法及系统
CN101783806B (zh) 一种Portal证书认证方法及其装置
CN105577738A (zh) 一种处理终端信息的方法、装置及系统
WO2023036348A1 (zh) 一种加密通信方法、装置、设备及介质
CN115333782A (zh) 数据发送方法、数据接收方法、存储介质及计算机设备
CN107078941B (zh) 将ip数据包传输到ip地址的方法、处理装置和移动设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17920178

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17920178

Country of ref document: EP

Kind code of ref document: A1