CN104519560A - Mobile terminal request intercepting method and mobile terminal - Google Patents
Mobile terminal request intercepting method and mobile terminal Download PDFInfo
- Publication number
- CN104519560A CN104519560A CN201410757832.8A CN201410757832A CN104519560A CN 104519560 A CN104519560 A CN 104519560A CN 201410757832 A CN201410757832 A CN 201410757832A CN 104519560 A CN104519560 A CN 104519560A
- Authority
- CN
- China
- Prior art keywords
- request
- mobile terminal
- network
- redirection information
- network server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. Transmission Power Control [TPC] or power classes
- H04W52/02—Power saving arrangements
- H04W52/0209—Power saving arrangements in terminal devices
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W88/00—Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
- H04W88/02—Terminal devices
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
- Telephonic Communication Services (AREA)
Abstract
本发明公开了一种拦截移动终端请求的方法,通过获取第一请求的响应消息中相同的重定向信息的次数;在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求。本发明还公开了一种移动终端,实现通过响应消息获取当前网络不可用时,拦截安装在手机等移终端的应用程序向网络服务器不断发送的网络连接的请求的目的,从而降低手机等移动终端的耗电量,减少网络服务器的负载,提高网络服务器的稳定性。
The invention discloses a method for intercepting a mobile terminal request, by obtaining the number of times of the same redirection information in the response message of the first request; when the number of times of the redirection information exceeds the preset number of times, the interception application is started , to intercept the first request. The invention also discloses a mobile terminal, which realizes the purpose of intercepting the network connection request continuously sent to the network server by the application program installed on the mobile terminal such as the mobile phone when the current network is unavailable through the response message, thereby reducing the mobile terminal such as the mobile phone. Power consumption, reduce the load on the web server, and improve the stability of the web server.
Description
技术领域technical field
本发明涉及移动终端领域,尤其涉及一种拦截移动终端请求的方法及移动终端。The invention relates to the field of mobile terminals, in particular to a method for intercepting a mobile terminal request and a mobile terminal.
背景技术Background technique
现在手机或者PAD等移动终端应用越来越广泛,移动终端通过运营商数据流量上网和wifi上网对功耗的影响很大,特别是现在很多第三方开发的应用程序经常在后台连网,导致手机功耗降不下来。Nowadays, mobile terminals such as mobile phones or PADs are more and more widely used. Mobile terminals accessing the Internet through operator data traffic and wifi have a great impact on power consumption, especially now that many applications developed by third parties are often connected to the Internet in the background, resulting in Power consumption cannot be reduced.
现在很多wifi热点可以先允许手机等移动终端接入自己的网络,当移动终端的微信等应用软件向wifi热点发送连接网络的请求时,首先是根据重定向跳转到身份验证网页,只有完成身份验证后才能正常的接入网络;而对于运营商网络,有诸多运营商对于欠费的用户并不直接停掉用户的网络数据流量,而是允许用户接入,在这种情况下,移动终端的微信等应用软件向运营商的服务器发送连接网络的请求时,也是根据重定向跳转到运营商交费网站去充值。Now many wifi hotspots can first allow mobile terminals such as mobile phones to access their own network. When mobile terminal WeChat and other application software sends a request to connect to the network to the wifi hotspot, it will first jump to the identity verification webpage according to the redirection. After verification, you can access the network normally; and for the operator network, many operators do not directly stop the user's network data traffic for the user who owes the fee, but allow the user to access. In this case, the mobile terminal When application software such as WeChat sends a request to the operator's server to connect to the network, it also jumps to the operator's payment website to recharge according to the redirection.
对于上述两种情况,当用户在没有验证身份或者完成充值时,手机等移动终端实际上不能连接到外部网络的,但安装在手机等移终端的微信等应用程序是不清楚这情况的,还是会不断向网络服务器发送连接网络的请求,但又得不到网络服务器正常的响应。这样不但会增加手机等移动终端的耗电量,还会增加网络服务器的负载,影响网络服务器的稳定性。For the above two cases, when the user has not verified his identity or completed the recharge, the mobile terminal such as the mobile phone cannot actually connect to the external network, but the WeChat and other applications installed on the mobile terminal such as the mobile phone do not know this situation, or It will continue to send requests to the web server to connect to the network, but it will not get a normal response from the web server. This will not only increase the power consumption of mobile terminals such as mobile phones, but also increase the load of the network server and affect the stability of the network server.
发明内容Contents of the invention
本发明提供一种拦截移动终端请求的方法及移动终端,主要目的在于解决如何降低移动终端功耗的技术问题。The invention provides a method for intercepting a request of a mobile terminal and a mobile terminal, the main purpose of which is to solve the technical problem of how to reduce the power consumption of the mobile terminal.
为实现上述目的,本发明提供的一种拦截移动终端请求的方法,所述拦截移动终端请求的方法包括:In order to achieve the above object, the present invention provides a method for intercepting a mobile terminal request, the method for intercepting a mobile terminal request includes:
获取第一请求的响应消息中相同的重定向信息的次数,所述第一请求为非浏览器的应用程序向网络服务器发送的网络连接的请求;Obtain the number of times of the same redirection information in the response message of the first request, the first request being a request for a network connection sent by a non-browser application to the network server;
在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求。When the number of times of the redirection information exceeds the preset number of times, an interception application is started to intercept the first request.
优选地,所述在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求之后,还包括:Preferably, when the number of times of the redirection information exceeds the preset number of times, the interception application is started, and after the first request is intercepted, it also includes:
向所述网络服务器发送第二请求,所述第二请求为浏览器向所述网络服务器发送的网络验证的请求;sending a second request to the web server, where the second request is a network authentication request sent by the browser to the web server;
在所述浏览器和所述网络服务器建立网络验证的情况下,接收第一请求,并向所述网络服务器发送所述第一请求。When the browser establishes network authentication with the network server, a first request is received and the first request is sent to the network server.
优选地,所述获取第一请求的响应消息中相同的重定向信息的次数之后,还包括:Preferably, after the number of times of obtaining the same redirection information in the response message of the first request, it further includes:
判断所述第一请求的响应消息中的重定向的次数与预先设置的次数的大小。Judging the size of the number of times of redirection in the response message of the first request and the preset number of times.
优选地,所述在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求之后,还包括:Preferably, when the number of times of the redirection information exceeds the preset number of times, the interception application is started, and after the first request is intercepted, it also includes:
开启定时侦测器,所述定时侦测器用于获取所述浏览器是否通过所述网络服务器验证的信息。A timing detector is turned on, and the timing detector is used to obtain information on whether the browser passes the verification of the network server.
优选地,所述在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求,包括:Preferably, when the number of times of the redirection information exceeds the preset number of times, starting the interception application and intercepting the first request includes:
在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用;When the number of times of the redirection information exceeds a preset number of times, start the blocking application;
若向所述网络服务器发送所述第一请求的情况下,判断是否需要拦截所述第一请求;If the first request is sent to the network server, determine whether to intercept the first request;
若判断需要拦截所述第一请求,则丢弃所述第一请求;If it is judged that the first request needs to be intercepted, discarding the first request;
若判断不需要拦截所述第一请求,则向所述网络服务器发送所述第一请求。If it is judged that the first request does not need to be intercepted, the first request is sent to the network server.
此外,为实现上述目的,本发明还提供移动终端,所述移动终端包括:In addition, in order to achieve the above purpose, the present invention also provides a mobile terminal, which includes:
获取单元,用于获取第一请求的响应消息中相同的重定向信息的次数,所述第一请求为非浏览器的应用程序向网络服务器发送的网络连接的请求;An acquisition unit, configured to acquire the number of times of the same redirection information in the response message of the first request, where the first request is a request for a network connection sent by a non-browser application to the network server;
拦截单元,用于在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求。An intercepting unit, configured to start an intercepting application to intercept the first request when the number of times of redirection information exceeds a preset number of times.
优选地,所述移动终端还包括:Preferably, the mobile terminal further includes:
第一发送单元,用于向所述网络服务器发送第二请求,所述第二请求为浏览器向所述网络服务器发送的网络验证的请求;a first sending unit, configured to send a second request to the web server, where the second request is a network verification request sent by the browser to the web server;
第二发送单元,在所述浏览器和所述网络服务器建立网络验证的情况下,接收第一请求,并向所述网络服务器发送所述第一请求。The second sending unit receives the first request and sends the first request to the web server when the browser establishes network authentication with the web server.
优选地,所述移动终端还包括:Preferably, the mobile terminal further includes:
第一判断单元,用于判断所述第一请求的响应消息中的重定向的次数与预先设置的次数的大小。The first judging unit is configured to judge the number of times of redirection in the response message of the first request and the preset number of times.
优选地,所述移动终端还包括:Preferably, the mobile terminal further includes:
开启单元,用于开启定时侦测器,所述定时侦测器用于获取所述浏览器是否通过所述网络服务器验证的信息。The opening unit is used for opening the timing detector, and the timing detector is used for acquiring information whether the browser passes the authentication of the network server.
优选地,所述拦截单元包括:Preferably, the interception unit includes:
开启单元,用于在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用;An opening unit, configured to open the interception application when the number of times of the redirection information exceeds a preset number of times;
第二判断单元,用于若向所述网络服务器发送所述第一请求的情况下,判断是否需要拦截所述第一请求;A second judging unit, configured to judge whether to intercept the first request if the first request is sent to the network server;
丢弃单元,用于若判断需要拦截所述第一请求,则丢弃所述第一请求;a discarding unit, configured to discard the first request if it is judged that the first request needs to be intercepted;
第三发送单元,用于若判断不需要拦截所述第一请求,则向所述网络服务器发送所述第一请求。A third sending unit, configured to send the first request to the network server if it is judged that the first request does not need to be intercepted.
本发明实施例通过获取第一请求的响应消息中相同的重定向信息的次数,在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求,实现通过响应消息获取当前网络不可用时,拦截安装在手机等移终端的应用程序向网络服务器不断发送的网络连接的请求的目的,从而降低手机等移动终端的耗电量,减少网络服务器的负载,提高网络服务器的稳定性。In the embodiment of the present invention, by obtaining the number of times of the same redirection information in the response message of the first request, when the number of times of the redirection information exceeds the preset number of times, the interception application is started, and the first request is intercepted to realize When the current network is unavailable through the response message, the purpose of intercepting the network connection request continuously sent by the application program installed on the mobile terminal such as the mobile phone to the network server is to reduce the power consumption of the mobile terminal such as the mobile phone, reduce the load of the network server, and improve Stability of the web server.
附图说明Description of drawings
图1为本发明拦截移动终端请求的方法第一实施例的流程示意图;FIG. 1 is a schematic flowchart of a first embodiment of a method for intercepting a mobile terminal request according to the present invention;
图2为本发明拦截移动终端请求的方法第二实施例的流程示意图;FIG. 2 is a schematic flowchart of a second embodiment of a method for intercepting a mobile terminal request according to the present invention;
图3为本发明拦截移动终端请求的方法第三实施例的流程示意图;FIG. 3 is a schematic flowchart of a third embodiment of a method for intercepting a mobile terminal request according to the present invention;
图4为本发明拦截移动终端请求的方法第四实施例的流程示意图;FIG. 4 is a schematic flowchart of a fourth embodiment of a method for intercepting a mobile terminal request according to the present invention;
图5为本发明移动终端第一实施例的功能模块示意图;FIG. 5 is a schematic diagram of functional modules of the first embodiment of the mobile terminal of the present invention;
图6为本发明移动终端第二实施例的功能模块示意图;FIG. 6 is a schematic diagram of functional modules of the second embodiment of the mobile terminal of the present invention;
图7为本发明移动终端第三实施例的功能模块示意图;FIG. 7 is a schematic diagram of functional modules of a third embodiment of the mobile terminal of the present invention;
图8为本发明移动终端第四实施例的功能模块示意图。FIG. 8 is a schematic diagram of functional modules of a fourth embodiment of a mobile terminal according to the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
本发明提供一种拦截移动终端请求的方法。The invention provides a method for intercepting a mobile terminal request.
参照图1,图1为本发明拦截移动终端请求的方法第一实施例的流程示意图。Referring to FIG. 1 , FIG. 1 is a schematic flowchart of a first embodiment of a method for intercepting a mobile terminal request according to the present invention.
在第一实施例中,该拦截移动终端请求的方法包括:In the first embodiment, the method for intercepting a mobile terminal request includes:
步骤101,获取第一请求的响应消息中相同的重定向信息的次数,所述第一请求为非浏览器的应用程序向网络服务器发送的网络连接的请求;Step 101, obtaining the number of times of the same redirection information in the response message of the first request, the first request being a request for a network connection sent by a non-browser application to a network server;
具体的,移动终端的微信等应用软件向网络服务器发送连接网络的请求时,若此时所述移动终端还未和所述网络服务器建立网络连接,例如,登录wifi热点时所述移动终端还未完成登录所述wifi热点的身份验证,此时wifi热点会向所述移动终端针对所述请求发送响应消息,所述响应消息中携带验证身份的重定向信息。Specifically, when the application software such as WeChat of the mobile terminal sends a request for connecting to the network to the network server, if the mobile terminal has not established a network connection with the network server at this time, for example, the mobile terminal has not yet established a network connection when logging into a wifi hotspot. After completing the identity verification for logging into the wifi hotspot, the wifi hotspot will send a response message to the mobile terminal in response to the request, and the response message carries identity verification redirection information.
移动终端的微信等应用软件向网络服务器发送连接网络的请求时,若此时所述移动终端还未和所述网络服务器建立网络连接,例如,所述移动终端处于欠费的状态,此时网络服务器会向所述移动终端针对所述请求发送响应消息,所述响应消息携带充值交费的重定向信息。When application software such as WeChat of the mobile terminal sends a request to connect to the network to the network server, if the mobile terminal has not established a network connection with the network server at this time, for example, the mobile terminal is in arrears, and the network The server sends a response message to the mobile terminal in response to the request, and the response message carries recharge and payment redirection information.
其中,重定向信息用于定向浏览器进行网络验证的信息。Wherein, the redirection information is used to direct the browser to perform network verification.
获取重定向信息的次数可以是获取相同的重定向信息的次数或者是获取不同的重定向信息的次数。例如,可以针对所述响应消息中携带验证身份的重定向信息的次数设置第一阈值,也可以针对所述响应消息携带充值交费的重定向信息的次数设置第二阈值,也可以针对所述响应消息中携带验证身份的重定向信息和所述响应消息携带充值交费的重定向信息的次数设置第三阈值,所述第一阈值、第二阈值和第三阈值可以相同,也可以不同。The number of times of obtaining redirection information may be the number of times of obtaining the same redirection information or the number of times of obtaining different redirection information. For example, a first threshold may be set for the number of times that the response message carries redirection information for identity verification, or a second threshold may be set for the number of times for the response message to carry redirection information for recharge and payment, or a second threshold may be set for the A third threshold is set for the number of times that the response message carries redirection information for identity verification and the response message carries recharge and payment redirection information, and the first threshold, second threshold, and third threshold may be the same or different.
步骤102,在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求。Step 102, when the number of times of redirecting information exceeds a preset number of times, start an interception application to intercept the first request.
具体的,假设获取网络服务器向微信等应用软件发送的第一请求的响应消息中,携带重定向信息的次数超过预先设置的次数时,开启拦截所述第一请求的功能,并允许所述浏览器完成所述重定向信息的内容,例如,若重定向信息内容为通过wifi热点的身份验证,则允许所述浏览器向wifi热点发送身份验证的请求。若重定向信息内容为到运营商交费网站去充值交费,则允许所述浏览器跳转到所述运营商的交费网站完成充值交费业务。Specifically, it is assumed that when the response message of the first request sent by the web server to application software such as WeChat contains redirection information for more than the preset number of times, the function of intercepting the first request is enabled and the browsing is allowed. The browser completes the content of the redirection information, for example, if the content of the redirection information is authentication through the wifi hotspot, the browser is allowed to send an authentication request to the wifi hotspot. If the content of the redirection information is to go to the operator's payment website to recharge and pay, then the browser is allowed to jump to the operator's payment website to complete the recharge and payment service.
优选地,所述在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求,包括:Preferably, when the number of times of the redirection information exceeds the preset number of times, starting the interception application and intercepting the first request includes:
在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用;When the number of times of the redirection information exceeds a preset number of times, start the blocking application;
若向所述网络服务器发送所述第一请求的情况下,判断是否需要拦截所述第一请求;If the first request is sent to the network server, determine whether to intercept the first request;
若判断需要拦截所述第一请求,则丢弃所述第一请求;If it is judged that the first request needs to be intercepted, discarding the first request;
若判断不需要拦截所述第一请求,则向所述网络服务器发送所述第一请求。If it is judged that the first request does not need to be intercepted, the first request is sent to the network server.
具体的,若微信等应用软件向所述网络服务器发送第一请求时,首先判断是否需要拦截该第一请求,如是,则拦截所述第一请求;若否,则向所述网络服务器发送该第一请求。Specifically, if the application software such as WeChat sends the first request to the network server, it is first judged whether the first request needs to be intercepted, if so, then intercept the first request; if not, then send the first request to the network server first request.
本发明实施例通过获取第一请求的响应消息中相同的重定向信息的次数,在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求,实现通过响应消息获取当前网络不可用时,拦截安装在手机等移终端的应用程序向网络服务器不断发送的网络连接的请求的目的,从而降低手机等移动终端的耗电量,减少网络服务器的负载,提高网络服务器的稳定性。In the embodiment of the present invention, by obtaining the number of times of the same redirection information in the response message of the first request, when the number of times of the redirection information exceeds the preset number of times, the interception application is started, and the first request is intercepted to realize When the current network is unavailable through the response message, the purpose of intercepting the network connection request continuously sent by the application program installed on the mobile terminal such as the mobile phone to the network server is to reduce the power consumption of the mobile terminal such as the mobile phone, reduce the load of the network server, and improve Stability of the web server.
参照图2,图2为本发明拦截移动终端请求的方法第二实施例的流程示意图。Referring to FIG. 2 , FIG. 2 is a schematic flowchart of a second embodiment of a method for intercepting a mobile terminal request according to the present invention.
在第一实施例的基础上,在步骤102之后,还包括:On the basis of the first embodiment, after step 102, it also includes:
步骤103,向所述网络服务器发送第二请求,所述第二请求为浏览器向所述网络服务器发送的网络验证的请求;Step 103, sending a second request to the network server, where the second request is a network authentication request sent by the browser to the network server;
在所述浏览器和所述网络服务器建立网络验证的情况下,接收第一请求,并向所述网络服务器发送所述第一请求。When the browser establishes network authentication with the network server, a first request is received and the first request is sent to the network server.
具体的,若所述浏览器和所述网络服务器建立网络连接,例如,所述浏览器完成身份验证或者充值交费等重定向信息的内容后,移动终端允许微信等应用软件向所述网络服务器发送连接网络的请求。Specifically, if the browser establishes a network connection with the network server, for example, after the browser completes the content of redirection information such as identity verification or recharge payment, the mobile terminal allows application software such as WeChat to send information to the network server. Send a request to connect to the network.
本发明实施例通过获取第一请求的响应消息中相同的重定向信息的次数,在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求,实现通过响应消息获取当前网络不可用时,拦截安装在手机等移终端的应用程序向网络服务器不断发送的网络连接的请求的目的,从而降低手机等移动终端的耗电量,减少网络服务器的负载,提高网络服务器的稳定性。In the embodiment of the present invention, by obtaining the number of times of the same redirection information in the response message of the first request, when the number of times of the redirection information exceeds the preset number of times, the interception application is started, and the first request is intercepted to realize When the current network is unavailable through the response message, the purpose of intercepting the network connection request continuously sent by the application program installed on the mobile terminal such as the mobile phone to the network server is to reduce the power consumption of the mobile terminal such as the mobile phone, reduce the load of the network server, and improve Stability of the web server.
参照图3,图3为本发明拦截移动终端请求的方法第三实施例的流程示意图。Referring to FIG. 3 , FIG. 3 is a schematic flowchart of a third embodiment of a method for intercepting a mobile terminal request according to the present invention.
在第一实施例的基础上,步骤101之后,还包括:On the basis of the first embodiment, after step 101, it also includes:
步骤104,判断所述第一请求的响应消息中的重定向的次数与预先设置的次数的大小。Step 104, judging the size of the number of times of redirection in the response message of the first request and the preset number of times.
具体的,一种方式为:判断所述第一请求的响应消息中携带的验证身份的重定向信息的次数与预先设置的第一阈值的大小;Specifically, one manner is: judging the number of times of redirection information for identity verification carried in the response message of the first request and the size of a preset first threshold;
另一方式为:判断所述第一请求的响应消息中携带的充值交费的重定向信息的次数与预先设置的第二阈值的大小;Another way is: judging the number of times of recharge and payment redirection information carried in the response message of the first request and the size of the preset second threshold;
更进一步,可以判断所述第一请求的响应消息中携带的验证身份的重定向信息的次数和携带的充值交费的重定向信息的次数与预先设置的第三阈值的大小。Furthermore, the number of times of redirection information for identity verification and the number of times of redirection information for recharge and payment carried in the response message of the first request may be judged to be greater than or equal to a preset third threshold.
本发明实施例通过获取第一请求的响应消息中相同的重定向信息的次数,在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求,实现通过响应消息获取当前网络不可用时,拦截安装在手机等移终端的应用程序向网络服务器不断发送的网络连接的请求的目的,从而降低手机等移动终端的耗电量,减少网络服务器的负载,提高网络服务器的稳定性。In the embodiment of the present invention, by obtaining the number of times of the same redirection information in the response message of the first request, when the number of times of the redirection information exceeds the preset number of times, the interception application is started, and the first request is intercepted to realize When the current network is unavailable through the response message, the purpose of intercepting the network connection request continuously sent by the application program installed on the mobile terminal such as the mobile phone to the network server is to reduce the power consumption of the mobile terminal such as the mobile phone, reduce the load of the network server, and improve Stability of the web server.
参照图4,图4为本发明拦截移动终端请求的方法第四实施例的流程示意图。Referring to FIG. 4 , FIG. 4 is a schematic flowchart of a fourth embodiment of a method for intercepting a mobile terminal request according to the present invention.
在第一实施例的基础上,步骤102之后,还包括:On the basis of the first embodiment, after step 102, it also includes:
步骤105,开启定时侦测器,所述定时侦测器用于获取所述浏览器是否通过所述网络服务器验证的信息。In step 105, a timing detector is turned on, and the timing detector is used to obtain information about whether the browser passes the authentication of the network server.
具体的,在移动终端拦截微信等应用软件向网络服务器发送第一请求,但允许浏览器向网络服务器发送第二请求,移动终端可以在预先设置的时间内检测浏览器是否已经建立与所述网络服务器的网络连接,例如,所述浏览器是否已经完成验证身份或者充值交费的重定向信息的内容。Specifically, when the mobile terminal intercepts application software such as WeChat to send the first request to the web server, but allows the browser to send the second request to the web server, the mobile terminal can detect whether the browser has established a connection with the network within a preset time. The network connection of the server, for example, whether the browser has completed identity verification or recharge and payment redirection information content.
本发明实施例通过获取第一请求的响应消息中相同的重定向信息的次数,在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求,实现通过响应消息获取当前网络不可用时,拦截安装在手机等移终端的应用程序向网络服务器不断发送的网络连接的请求的目的,从而降低手机等移动终端的耗电量,减少网络服务器的负载,提高网络服务器的稳定性。In the embodiment of the present invention, by obtaining the number of times of the same redirection information in the response message of the first request, when the number of times of the redirection information exceeds the preset number of times, the interception application is started, and the first request is intercepted to realize When the current network is unavailable through the response message, the purpose of intercepting the network connection request continuously sent by the application program installed on the mobile terminal such as the mobile phone to the network server is to reduce the power consumption of the mobile terminal such as the mobile phone, reduce the load of the network server, and improve Stability of the web server.
本发明提供一种移动终端。The present invention provides a mobile terminal.
参照图5,图5为本发明移动终端第一实施例的功能模块示意图。Referring to FIG. 5 , FIG. 5 is a schematic diagram of functional modules of the first embodiment of the mobile terminal according to the present invention.
在第一实施例中,该移动终端包括:In the first embodiment, the mobile terminal includes:
获取单元501,用于获取第一请求的响应消息中相同的重定向信息的次数,所述第一请求为非浏览器的应用程序向网络服务器发送的网络连接的请求;The obtaining unit 501 is configured to obtain the number of times of the same redirection information in the response message of the first request, where the first request is a request for a network connection sent by a non-browser application to the network server;
具体的,移动终端的微信等应用软件向网络服务器发送连接网络的请求时,若此时所述移动终端还未和所述网络服务器建立网络连接,例如,登录wifi热点时所述移动终端还未完成登录所述wifi热点的身份验证,此时wifi热点会向所述移动终端针对所述请求发送响应消息,所述响应消息中携带验证身份的重定向信息。Specifically, when the application software such as WeChat of the mobile terminal sends a request for connecting to the network to the network server, if the mobile terminal has not established a network connection with the network server at this time, for example, the mobile terminal has not yet established a network connection when logging into a wifi hotspot. After completing the identity verification for logging into the wifi hotspot, the wifi hotspot will send a response message to the mobile terminal in response to the request, and the response message carries identity verification redirection information.
移动终端的微信等应用软件向网络服务器发送连接网络的请求时,若此时所述移动终端还未和所述网络服务器建立网络连接,例如,所述移动终端处于欠费的状态,此时网络服务器会向所述移动终端针对所述请求发送响应消息,所述响应消息携带充值交费的重定向信息。When application software such as WeChat of the mobile terminal sends a request to connect to the network to the network server, if the mobile terminal has not established a network connection with the network server at this time, for example, the mobile terminal is in arrears, and the network The server sends a response message to the mobile terminal in response to the request, and the response message carries recharge and payment redirection information.
其中,获取重定向信息的次数可以是获取相同的重定向信息的次数或者是获取不同的重定向信息的次数。例如,可以针对所述响应消息中携带验证身份的重定向信息的次数设置第一阈值,也可以针对所述响应消息携带充值交费的重定向信息的次数设置第二阈值,也可以针对所述响应消息中携带验证身份的重定向信息和所述响应消息携带充值交费的重定向信息的次数设置第三阈值,所述第一阈值、第二阈值和第三阈值可以相同,也可以不同。Wherein, the number of times of obtaining redirection information may be the number of times of obtaining the same redirection information or the number of times of obtaining different redirection information. For example, a first threshold may be set for the number of times that the response message carries redirection information for identity verification, or a second threshold may be set for the number of times for the response message to carry redirection information for recharge and payment, or a second threshold may be set for the A third threshold is set for the number of times that the response message carries redirection information for identity verification and the response message carries recharge and payment redirection information, and the first threshold, second threshold, and third threshold may be the same or different.
拦截单元502,用于在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求。The interception unit 502 is configured to start an interception application to intercept the first request when the number of times of redirection information exceeds a preset number of times.
具体的,假设获取网络服务器向微信等应用软件发送的第一请求的响应消息中,携带重定向信息的次数超过预先设置的次数时,开启拦截所述第一请求的功能,并允许所述浏览器完成所述重定向信息的内容,例如,若重定向信息内容为通过wifi热点的身份验证,则允许所述浏览器向wifi热点发送身份验证的请求。若重定向信息内容为到运营商交费网站去充值交费,则允许所述浏览器跳转到所述运营商的交费网站完成充值交费业务。Specifically, it is assumed that when the response message of the first request sent by the web server to application software such as WeChat contains redirection information for more than the preset number of times, the function of intercepting the first request is enabled and the browsing is allowed. The browser completes the content of the redirection information, for example, if the content of the redirection information is authentication through the wifi hotspot, the browser is allowed to send an authentication request to the wifi hotspot. If the content of the redirection information is to go to the operator's payment website to recharge and pay, then the browser is allowed to jump to the operator's payment website to complete the recharge and payment service.
优选地,所述拦截单元502包括:Preferably, the interception unit 502 includes:
开启单元5021,用于在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用;The opening unit 5021 is used to open the interception application when the number of times of the redirection information exceeds the preset number of times;
第二判断单元5022,用于若向所述网络服务器发送所述第一请求的情况下,判断是否需要拦截所述第一请求;The second judging unit 5022 is configured to judge whether to intercept the first request if the first request is sent to the network server;
丢弃单元5023,用于若判断需要拦截所述第一请求,则丢弃所述第一请求;A discarding unit 5023, configured to discard the first request if it is judged that the first request needs to be intercepted;
第三发送单元5024,用于若判断不需要拦截所述第一请求,则向所述网络服务器发送所述第一请求。The third sending unit 5024 is configured to send the first request to the network server if it is judged that the first request does not need to be intercepted.
本发明实施例通过获取第一请求的响应消息中相同的重定向信息的次数,在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求,实现通过响应消息获取当前网络不可用时,拦截安装在手机等移终端的应用程序向网络服务器不断发送的网络连接的请求的目的,从而降低手机等移动终端的耗电量,减少网络服务器的负载,提高网络服务器的稳定性。In the embodiment of the present invention, by obtaining the number of times of the same redirection information in the response message of the first request, when the number of times of the redirection information exceeds the preset number of times, the interception application is started, and the first request is intercepted to realize When the current network is unavailable through the response message, the purpose of intercepting the network connection request continuously sent by the application program installed on the mobile terminal such as the mobile phone to the network server is to reduce the power consumption of the mobile terminal such as the mobile phone, reduce the load of the network server, and improve Stability of the web server.
参照图6,图6为本发明移动终端第二实施例的功能模块示意图。Referring to FIG. 6 , FIG. 6 is a schematic diagram of functional modules of a second embodiment of a mobile terminal according to the present invention.
在第一实施例的基础上,该移动终端还包括:On the basis of the first embodiment, the mobile terminal also includes:
第一发送单元503,用于向所述网络服务器发送第二请求,所述第二请求为浏览器向所述网络服务器发送的网络验证的请求;The first sending unit 503 is configured to send a second request to the network server, where the second request is a network verification request sent by the browser to the network server;
第二发送单元504,在所述浏览器和所述网络服务器建立网络验证的情况下,接收第一请求,并向所述网络服务器发送所述第一请求。The second sending unit 504 receives the first request and sends the first request to the web server when the browser establishes network authentication with the web server.
具体的,若所述浏览器和所述网络服务器建立网络连接,例如,所述浏览器完成身份验证或者充值交费等重定向信息的内容后,移动终端允许微信等应用软件向所述网络服务器发送连接网络的请求。Specifically, if the browser establishes a network connection with the network server, for example, after the browser completes the content of redirection information such as identity verification or recharge payment, the mobile terminal allows application software such as WeChat to send information to the network server. Send a request to connect to the network.
本发明实施例通过获取第一请求的响应消息中相同的重定向信息的次数,在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求,实现通过响应消息获取当前网络不可用时,拦截安装在手机等移终端的应用程序向网络服务器不断发送的网络连接的请求的目的,从而降低手机等移动终端的耗电量,减少网络服务器的负载,提高网络服务器的稳定性。In the embodiment of the present invention, by obtaining the number of times of the same redirection information in the response message of the first request, when the number of times of the redirection information exceeds the preset number of times, the interception application is started, and the first request is intercepted to realize When the current network is unavailable through the response message, the purpose of intercepting the network connection request continuously sent by the application program installed on the mobile terminal such as the mobile phone to the network server is to reduce the power consumption of the mobile terminal such as the mobile phone, reduce the load of the network server, and improve Stability of the web server.
参照图7,图7为本发明移动终端第三实施例的功能模块示意图。Referring to FIG. 7 , FIG. 7 is a schematic diagram of functional modules of a third embodiment of a mobile terminal according to the present invention.
在第一实施例的基础上,该移动终端还包括:On the basis of the first embodiment, the mobile terminal also includes:
第一判断单元505,用于判断所述第一请求的响应消息中的重定向的次数与预先设置的次数的大小。The first judging unit 505 is configured to judge the number of times of redirection in the response message of the first request and the preset number of times.
具体的,一种方式为:判断所述第一请求的响应消息中携带的验证身份的重定向信息的次数与预先设置的第一阈值的大小;Specifically, one manner is: judging the number of times of redirection information for identity verification carried in the response message of the first request and the size of a preset first threshold;
另一方式为:判断所述第一请求的响应消息中携带的充值交费的重定向信息的次数与预先设置的第二阈值的大小;Another way is: judging the number of times of recharge and payment redirection information carried in the response message of the first request and the size of the preset second threshold;
更进一步,可以判断所述第一请求的响应消息中携带的验证身份的重定向信息的次数和携带的充值交费的重定向信息的次数与预先设置的第三阈值的大小。Furthermore, the number of times of redirection information for identity verification and the number of times of redirection information for recharge and payment carried in the response message of the first request may be judged to be greater than or equal to a preset third threshold.
本发明实施例通过获取第一请求的响应消息中相同的重定向信息的次数,在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求,实现通过响应消息获取当前网络不可用时,拦截安装在手机等移终端的应用程序向网络服务器不断发送的网络连接的请求的目的,从而降低手机等移动终端的耗电量,减少网络服务器的负载,提高网络服务器的稳定性。In the embodiment of the present invention, by obtaining the number of times of the same redirection information in the response message of the first request, when the number of times of the redirection information exceeds the preset number of times, the interception application is started, and the first request is intercepted to realize When the current network is unavailable through the response message, the purpose of intercepting the network connection request continuously sent by the application program installed on the mobile terminal such as the mobile phone to the network server is to reduce the power consumption of the mobile terminal such as the mobile phone, reduce the load of the network server, and improve Stability of the web server.
参照图8,图8为本发明移动终端第四实施例的功能模块示意图。Referring to FIG. 8 , FIG. 8 is a schematic diagram of functional modules of a fourth embodiment of a mobile terminal according to the present invention.
在第一实施例的基础上,该移动终端还包括:On the basis of the first embodiment, the mobile terminal also includes:
开启单元506,用于开启定时侦测器,所述定时侦测器用于获取所述浏览器是否通过所述网络服务器验证的信息。The enabling unit 506 is configured to enable a timing detector, and the timing detector is configured to acquire information about whether the browser passes the authentication of the network server.
具体的,在移动终端拦截微信等应用软件向网络服务器发送第一请求,但允许浏览器向网络服务器发送第二请求,移动终端可以在预先设置的时间内检测浏览器是否已经建立与所述网络服务器的网络连接,例如,所述浏览器是否已经完成验证身份或者充值交费的重定向信息的内容。Specifically, when the mobile terminal intercepts application software such as WeChat to send the first request to the web server, but allows the browser to send the second request to the web server, the mobile terminal can detect whether the browser has established a connection with the network within a preset time. The network connection of the server, for example, whether the browser has completed identity verification or recharge and payment redirection information content.
本发明实施例通过获取第一请求的响应消息中相同的重定向信息的次数,在所述重定向信息的次数超过预先设置的次数的情况下,开启拦截应用,拦截所述第一请求,实现通过响应消息获取当前网络不可用时,拦截安装在手机等移终端的应用程序向网络服务器不断发送的网络连接的请求的目的,从而降低手机等移动终端的耗电量,减少网络服务器的负载,提高网络服务器的稳定性。In the embodiment of the present invention, by obtaining the number of times of the same redirection information in the response message of the first request, when the number of times of the redirection information exceeds the preset number of times, the interception application is started, and the first request is intercepted to realize When the current network is unavailable through the response message, the purpose of intercepting the network connection request continuously sent by the application program installed on the mobile terminal such as the mobile phone to the network server is to reduce the power consumption of the mobile terminal such as the mobile phone, reduce the load of the network server, and improve Stability of the web server.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process conversion made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technical fields , are all included in the scope of patent protection of the present invention in the same way.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410757832.8A CN104519560B (en) | 2014-12-10 | 2014-12-10 | Intercept the method and mobile terminal of mobile terminal request |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410757832.8A CN104519560B (en) | 2014-12-10 | 2014-12-10 | Intercept the method and mobile terminal of mobile terminal request |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104519560A true CN104519560A (en) | 2015-04-15 |
CN104519560B CN104519560B (en) | 2017-11-17 |
Family
ID=52794138
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410757832.8A Expired - Fee Related CN104519560B (en) | 2014-12-10 | 2014-12-10 | Intercept the method and mobile terminal of mobile terminal request |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104519560B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105391706A (en) * | 2015-10-30 | 2016-03-09 | 宁波萨瑞通讯有限公司 | Arrearage Internet access limiting method, system and mobile terminal |
CN105577966A (en) * | 2015-05-29 | 2016-05-11 | 宇龙计算机通信科技(深圳)有限公司 | Data service processing method and device and terminal |
CN106304251A (en) * | 2015-06-29 | 2017-01-04 | 展讯通信(上海)有限公司 | Mobile terminal network connection control method and device |
CN107493206A (en) * | 2017-08-16 | 2017-12-19 | 广东欧珀移动通信有限公司 | A kind of network detecting method, network detection means and intelligent terminal |
CN109561487A (en) * | 2017-09-25 | 2019-04-02 | 中兴通讯股份有限公司 | Reduce the method, apparatus and mobile terminal of mobile terminal energy consumption |
CN109840418A (en) * | 2019-02-19 | 2019-06-04 | Oppo广东移动通信有限公司 | Jump control method and device for application program, storage medium and terminal |
CN112104641A (en) * | 2020-09-11 | 2020-12-18 | 中国联合网络通信集团有限公司 | Login form conversion method and device, storage medium and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101010977A (en) * | 2004-08-31 | 2007-08-01 | 艾利森电话股份有限公司 | Limit redirections in an unlicensed mobile access network |
CN102291390A (en) * | 2011-07-14 | 2011-12-21 | 南京邮电大学 | Method for defending against denial of service attack based on cloud computation platform |
EP2687050A1 (en) * | 2011-03-18 | 2014-01-22 | Qualcomm Incorporated | Management of network access requests |
CN103873322A (en) * | 2014-03-10 | 2014-06-18 | 联想(北京)有限公司 | Information processing method and communication terminal |
-
2014
- 2014-12-10 CN CN201410757832.8A patent/CN104519560B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101010977A (en) * | 2004-08-31 | 2007-08-01 | 艾利森电话股份有限公司 | Limit redirections in an unlicensed mobile access network |
EP2687050A1 (en) * | 2011-03-18 | 2014-01-22 | Qualcomm Incorporated | Management of network access requests |
CN102291390A (en) * | 2011-07-14 | 2011-12-21 | 南京邮电大学 | Method for defending against denial of service attack based on cloud computation platform |
CN103873322A (en) * | 2014-03-10 | 2014-06-18 | 联想(北京)有限公司 | Information processing method and communication terminal |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105577966A (en) * | 2015-05-29 | 2016-05-11 | 宇龙计算机通信科技(深圳)有限公司 | Data service processing method and device and terminal |
CN106304251A (en) * | 2015-06-29 | 2017-01-04 | 展讯通信(上海)有限公司 | Mobile terminal network connection control method and device |
CN106304251B (en) * | 2015-06-29 | 2019-11-26 | 展讯通信(上海)有限公司 | Mobile terminal network connection control method and device |
CN105391706A (en) * | 2015-10-30 | 2016-03-09 | 宁波萨瑞通讯有限公司 | Arrearage Internet access limiting method, system and mobile terminal |
CN107493206A (en) * | 2017-08-16 | 2017-12-19 | 广东欧珀移动通信有限公司 | A kind of network detecting method, network detection means and intelligent terminal |
CN107493206B (en) * | 2017-08-16 | 2019-04-23 | Oppo广东移动通信有限公司 | A network detection method, network detection device and intelligent terminal |
CN109561487A (en) * | 2017-09-25 | 2019-04-02 | 中兴通讯股份有限公司 | Reduce the method, apparatus and mobile terminal of mobile terminal energy consumption |
CN109840418A (en) * | 2019-02-19 | 2019-06-04 | Oppo广东移动通信有限公司 | Jump control method and device for application program, storage medium and terminal |
CN109840418B (en) * | 2019-02-19 | 2021-01-01 | Oppo广东移动通信有限公司 | Application jump control method, device, storage medium and terminal |
CN112104641A (en) * | 2020-09-11 | 2020-12-18 | 中国联合网络通信集团有限公司 | Login form conversion method and device, storage medium and electronic equipment |
CN112104641B (en) * | 2020-09-11 | 2022-07-29 | 中国联合网络通信集团有限公司 | Login form conversion method, device, storage medium and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN104519560B (en) | 2017-11-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104519560B (en) | Intercept the method and mobile terminal of mobile terminal request | |
US11700529B2 (en) | Methods and systems for validating mobile devices of customers via third parties | |
US11093598B2 (en) | Identity authentication method and apparatus | |
US9237154B2 (en) | Secure and automatic connection to wireless network | |
CN105007581B (en) | A kind of network access authentication method and client | |
CN104917727B (en) | A kind of method, system and device of account's authentication | |
CN104636924B (en) | Secure payment method, server and system | |
CN104270250B (en) | WiFi internets online connection authentication method based on asymmetric whole encryption | |
CN105162802B (en) | Portal authentication method and certificate server | |
CA3073190C (en) | Mobile number verification for mobile network-based authentication | |
WO2017177691A1 (en) | Portal authentication method and system | |
CN103024740A (en) | Method and system for accessing internet by mobile terminal | |
US10326852B2 (en) | Proxy for monitoring special handling of content within a service network | |
CN103916852A (en) | Data transmission method and mobile terminal | |
CN107864475A (en) | The quick authentication methods of WiFi based on Portal+ dynamic passwords | |
CN103024741A (en) | Short message authentication method and system | |
CN103259785B (en) | The authentication method of virtual token and system | |
CN104125605B (en) | A kind of implementation method and device for asking to set up WIFI connections | |
CN105577621B (en) | Business operation verification method, device and system | |
CN107172185A (en) | Network collocating method and device | |
CN103139205B (en) | Message processing method, device and the webserver | |
CN110248326B (en) | Data processing method and device | |
CN103297966B (en) | Realize the access authentication method and device of WLAN | |
CN110460613A (en) | A kind of gateway portal authentication method | |
CN103619005A (en) | Method and system for obtaining cell phone number of 3G network user |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
CP01 | Change in the name or title of a patent holder | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20171117 |
|
CF01 | Termination of patent right due to non-payment of annual fee |