CN104159231A - Method for optimizing background flow of client, and client - Google Patents

Method for optimizing background flow of client, and client Download PDF

Info

Publication number
CN104159231A
CN104159231A CN201410409171.XA CN201410409171A CN104159231A CN 104159231 A CN104159231 A CN 104159231A CN 201410409171 A CN201410409171 A CN 201410409171A CN 104159231 A CN104159231 A CN 104159231A
Authority
CN
China
Prior art keywords
application
network
connecting request
network connecting
judge
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.)
Pending
Application number
CN201410409171.XA
Other languages
Chinese (zh)
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 Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201410409171.XA priority Critical patent/CN104159231A/en
Publication of CN104159231A publication Critical patent/CN104159231A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a method for optimizing the background flow of a client, and the client. The method comprises the following steps: acquiring a network connection request, and reorienting the network connection request to a local service process, wherein the local service process is provided by a local VPN (Virtual Private Network) service; judging whether a first application which initiates the network connection request is a background running application or not in the local service process; and if the first application which initiates the network connection request is judged to be the background running application, transmitting prompt information to prompt a user to disable a network connection behavior which generates background flow of the first application. When the first application which initiates the network connection request is judged to be the background running application through the local service process, the prompt information is transmitted to prompt the user to disable the network connection behavior which generates background flow of the first application, so that certain infrequently-used background running applications of the user or certain malicious software can be prevented from generating unnecessary flow on the background, and flow is better saved for the user.

Description

The optimization method of client background flow and client
Technical field
The present invention relates to Internet technical field, be specifically related to a kind of optimization method and client of client background flow.
Background technology
Along with the development of the universal and development of Mobile Internet technology of smart mobile phone, surfing Internet with cell phone becomes " mobile phone netizen " indispensable demand.
Current, when bringing very large recreational and playability along with smart mobile phone to user, the application on smart mobile phone is also more and more, makes the surfing flow of smart mobile phone explode many.In addition, some malicious application also continue to bring out like the mushrooms after rain, some malicious application can be in the time that user be unwitting, the unnecessary flow of generation stealthily on backstage, this not only can consume original with regard to not enough electric weight, the more important thing is unconsciously and has increased an added flow expense to user, therefore, how to allow user better save flow and use, prevent that some malicious application from producing unnecessary flow and becoming user's a active demand on backstage.
Summary of the invention
In view of the above problems, the present invention has been proposed to a kind of optimization method and client of the client background flow that overcomes the problems referred to above or address the above problem are at least in part provided.
According to an aspect of the present invention, provide a kind of optimization method of client background flow, having comprised:
Obtain network connecting request, described network connecting request is redirected to local service process, described local service process is provided by local VPN service;
In described local service process, judge whether the first application of the described network connecting request of initiation is the application at running background;
If judge the first application being applied as at running background of initiating described network connecting request, send information and forbid that for pointing out user to select the network that described the first application produces background traffic connects behavior.
According to a further aspect in the invention, provide a kind of client, having comprised:
Redirection module, is suitable for obtaining network connecting request, and described network connecting request is redirected to local service process, and described local service process is provided by local VPN service;
Judge module, is suitable in described local service process, judges whether the first application of the described network connecting request of initiation is the application at running background;
Reminding module, judges the first application being applied as at running background of initiating described network connecting request if be suitable for, send information and forbid that for pointing out user to select the network that described the first application produces background traffic connects behavior.
The present invention is by obtaining network connecting request, network connecting request is redirected to local service process, local service process is provided by local VPN service, in local service process, whether the first application that further judges initiation network connecting request is the application at running background, if judge the first application being applied as at running background of initiating network connecting request, send information and forbid that for pointing out user to select the first application produces the network connection behavior of background traffic.Like this, can prevent that the application program at running background or some Malwares that some users are of little use from producing unnecessary flow on backstage, thereby can better save flow for user.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to better understand technological means of the present invention, and can be implemented according to the content of specification, and for above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Brief description of the drawings
By reading below detailed description of the preferred embodiment, various other advantage and benefits will become cheer and bright for those of ordinary skill in the art.Accompanying drawing is only for the object of preferred implementation is shown, and do not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 shows optimization method embodiment mono-schematic flow sheet of client background flow provided by the invention;
Fig. 2 shows optimization method embodiment bis-schematic flow sheets of client background flow provided by the invention;
Fig. 3 shows the present invention the each background application flow query interface schematic diagram providing is provided;
Fig. 4 shows the present invention the application total flow query interface schematic diagram providing is provided;
Fig. 5 shows the structured flowchart of the embodiment mono-of client provided by the invention;
Fig. 6 shows the structured flowchart of the embodiment bis-of client provided by the invention.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Although shown exemplary embodiment of the present disclosure in accompanying drawing, but should be appreciated that and can realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order more thoroughly to understand the disclosure that these embodiment are provided, and can be by the those skilled in the art that conveys to complete the scope of the present disclosure.
The embodiment of the present invention is based on the inner local VPN service (VPN client) creating of client and realizes.Herein, client can be the mobile client device that smart mobile phone, plate type computer etc. have mobile networking service.The operating system of client, for the ease of using VPN service, has been opened multiple system interfaces (API), and in the situation that obtaining user's confirmation, VPN service can obtain the authority of other application of control and management.Particularly, the API providing by call operation system, the VPN service of client inside can be opened, in the time that accesses network is wanted in other application of client, the processing that the network connecting request initiated of application is all served through local VPN, makes the client can be effectively and accesses network resource safely.
Taking a kind of application scenarios as example, client is in the time installing or start first the independently application (hereinafter referred to as the present invention's application) for realizing the present invention program, the present invention applies and need to create local VPN service, the information of trusting or distrusting this application is sent in now the present invention application to user, if user selects to trust, the present invention applies the local VPN service that creates.After creating local VPN service, owing to allowing the application in VPN framework to there is higher control to other application in operating system framework, so the control hierarchy that the present invention's application connects for network is applied higher than other.The network of in user will use some application and wish using the process of these application, these application being initiated connects while processing, start the present invention's application of the local VPN service of above-mentioned establishment, that clicks the present invention's application arranges switch for starting VPN client.Starting after VPN client, carry out the method that the present embodiment provides.
Fig. 1 shows optimization method embodiment mono-schematic flow sheet of client background flow provided by the invention.As shown in Figure 1, the method comprises the steps:
Step S100, obtain network connecting request, network connecting request is redirected to local service process, local service process is provided by local VPN service.
Description based on is above known, and after the present invention applies the local VPN service of establishment, the control hierarchy that the present invention's application connects for network is applied higher than other.In the time that network connecting request is sent in other application, the present invention applies and can tackle network connecting request, and the local service process that network connecting request is redirected in the present invention's application is carried out subsequent treatment.Be applied as example with microblogging, in the time that user starts the network connecting request of microblogging application initiation access microblogging content, because the control hierarchy that the present invention's application connects network is applied higher than microblogging, the present invention applies this network connecting request of interception, and the local service process that network connecting request is redirected in the present invention's application is carried out subsequent treatment.
Step S101, in local service process, judge initiate network connecting request first application whether be the application at running background.
In the time that user starts the network connecting request of the first application initiation, because the control hierarchy that the present invention's application connects network is applied higher than microblogging, the present invention applies this network connecting request of interception, whether the first application that judges initiation network connecting request is the application at running background, if judge the first application being applied as at running background of initiating network connecting request, perform step S102.
Step S102, send information and connect behavior for the network of pointing out user to select to forbid the first application and producing background traffic.
Judge while initiating application that first of network connecting request is applied as at running background when client, send information to user, to point out user to select to forbid the network that the first application produces background traffic to connect behavior.
The embodiment of the present invention is by obtaining network connecting request, network connecting request is redirected to local service process, local service process is provided by local VPN service, in local service process, whether the first application that further judges initiation network connecting request is the application at running background, if judge the first application being applied as at running background of initiating network connecting request, send information and forbid that for pointing out user to select the first application produces the network connection behavior of background traffic.Like this, can prevent that the application program at running background or some Malwares that some users are of little use from producing unnecessary flow on backstage, thereby can better save flow for user.
Fig. 2 shows optimization method embodiment bis-schematic flow sheets of client background flow provided by the invention.As shown in Figure 2, the method comprises the steps:
Step S200, obtain network connecting request, network connecting request is redirected to local service process, local service process is provided by local VPN service.
, be not repeated here referring to the step S100 in said method embodiment mono-about the detailed description of this step.
Step S201, in local service process, determine that whether network connection type is with any one in lower network: 2G network, 3G network and 4G network.
After obtaining the network connecting request of initiating, determine that whether network connection type is with any one in lower network: 2G network, 3G network and 4G network, if determine, network connection type is any one in 2G network, 3G network and 4G network, performs step S202.
Step S202, judge initiate network connecting request first application whether be the application at running background.
If determine that network connection type is any one in 2G network, 3G network and 4G network, further judge whether the first application of initiation network connecting request is the application at running background.Concrete, in the time that client screen lights, starting timing routine, timing routine is for calling the system interface of the second apply names that obtains current the second application at front stage operation; According to the result of obtaining of timing routine, be the second apply names by the information updating of recording in the front stage operation list of application of client maintenance; Obtain the first apply names of the first application of initiating network connecting request by inquiry system file, judge that whether the first apply names is consistent with the second apply names recording in front stage operation list of application, if inconsistent, judge the first application being applied as at running background of initiating network connecting request, perform step S203.
Wherein, first the first apply names that inquiry system file obtains the first application of initiating network connecting request specifically comprises the steps:, obtains address corresponding to network connecting request and port; For example, getpeername interface is provided in Android system, when local service process receives after network connecting request, obtain socket corresponding to this network connecting request, this socket is passed to getpeername interface, just can obtain local address and the port of the application of initiating network connecting request, i.e. ip:port.Then, according to address corresponding to network connecting request and interface querying system file, obtain the first application identities of the first application of initiating network connecting request, wherein, the system file that the embodiment of the present invention will be inquired about comprises one or more in following file :/proc/net/tcp; / proc/net/udp; / proc/net/tcp6, before inquiry system file/proc/net/tcp6, needing address and port is IPV6 agreement by IPV4 protocol conversion.For example, said system file record has the situation that in current system, all tcp connect and/or udp connects, taking Android system as example, the network connection information that in current system, all tcp connect and/or udp connects is all kept in proc file, in be kept at/proc/net/tcp of the network connection information file that relevant tcp connects, be kept at/the proc/net/udp of network connection information that relevant udp connects, also has in be kept at/proc/net/tcp6 of some network connection informations.Particularly, in the time of inquiry, first inquiry/proc/net/tcp file; If do not inquired, then inquiry/proc/net/udp file; If also do not inquired, finally inquiry/proc/net/tcp6 file.Finally, call the system interface for obtaining apply names according to the first application identities, obtain the first apply names of the first application of initiating network connecting request; For example, the getApplicationName interface that utilizes Android system to provide, the apply names that obtains initiating network connecting request.
Step S203, judge whether the first application belongs to the application of recording in background traffic white list, background traffic white list record be the application that allows to produce background traffic.
It should be noted that, the application of recording in background traffic white list can be instant messaging application, such as QQ, micro-letter etc., and these are in the application that allows to produce background traffic that is applied as of background traffic white list record.Do not belong to the application of recording in background traffic white list if judge the first application, perform step S204, belong to the application of recording in background traffic white list if judge the first application, perform step S205~S207.
Step S204, send information and connect behavior for the network of pointing out user to select to forbid the first application and producing background traffic.
Concrete, if user selects the network that allows the first application to produce background traffic to connect behavior, perform step S205~S207, if user selects the network of forbidding the first application generation background traffic to connect behavior, perform step S209.
Step S205, permission are sent network connecting request to network side.
The background traffic that step S206, statistics the first application produce.
Step S207, judge first application produce background traffic whether exceed preset flow threshold value.
Concrete, statistics the first application produces how many flows on backstage every day, and upload on vpn server, the data on flows that vpn server is uploaded all users is analyzed, the first application that calculates each user is how many at the average flow value of running background generation every day, and this average flow value is returned to the present invention's application as preset flow threshold value.Active user first is applied generation every day by the present invention's application background traffic and preset flow threshold value compare, if the background traffic of the first application generation every day exceedes preset flow threshold value, perform step S208.
Step S208, send information and occur abnormal for the background traffic of pointing out user first and applying.
User, after receiving that abnormal prompt information appears in background traffic, can select to forbid that the first application produces the network connection behavior of background traffic.
Step S209, return to network connection failure message to the first application.
The embodiment of the present invention is by obtaining network connecting request, network connecting request is redirected to local service process, local service process is provided by local VPN service, in local service process, whether the first application that further judges initiation network connecting request is the application at running background, if judge the first application being applied as at running background of initiating network connecting request, further judge whether the first application belongs to the application of recording in background traffic white list, if the first application belongs to the application of recording in background traffic white list, allow to send network connecting request to network side, if the first application does not belong to the application of recording in background traffic white list, send information and forbid that for pointing out user to select the first application produces the network connection behavior of background traffic.Like this, for some instant communication softwares, allow to send network connecting request to network side, can facilitate the real-time information of watching of user; The application program at running background being of little use for some users or some Malwares, send information and forbid that for pointing out user to select the first application produces the network connection behavior of background traffic, can prevent that it from producing unnecessary flow on backstage, thereby can better save flow for user.In addition, for allowed network connecting request, can also add up background traffic, if background traffic exceedes average background traffic, can point out user's background traffic to occur abnormal, thereby realize the object of monitoring background traffic in real time.
Based on above-described scheme, the present invention also provides the interface schematic diagram of the present invention's application in client.Particularly, Fig. 3 shows the present invention the each background application flow query interface schematic diagram providing is provided.As shown in Figure 3, user can inquire about the flow that consumes while respectively applying in backstage under 2G network, 3G network and 4G network and the discharge record of saving, taking " 360 bodyguard " as example, the flow consuming when this is applied in backstage is 485.1K, saving background traffic is 143.9K, and the method for wherein saving background traffic can be the method that connects in some cases behavior (returning to network connection failure message to application) according to user's operation intercepting network provided by the invention.Fig. 4 shows the present invention the application total flow query interface schematic diagram providing is provided, as shown in Figure 4, and the discharge record that this interface shows the flow of background application wastage in bulk or weight and altogether saves.
Fig. 5 shows the structured flowchart of the embodiment mono-of client provided by the invention.As shown in Figure 5, client comprises: redirection module 301, judge module 302 and reminding module 303; Wherein
Redirection module 301, is suitable for obtaining network connecting request, and network connecting request is redirected to local service process, and local service process is provided by local VPN service;
Concrete, after client creates local VPN service, the control hierarchy that client connects for network is applied higher than other.In the time that network connecting request is sent in other application, redirection module 301 can be tackled network connecting request, network connecting request is redirected to local service process and carries out subsequent treatment.Be applied as example with microblogging, in the time that user starts the network connecting request of microblogging application initiation access microblogging content, because the control hierarchy that the present invention's application connects network is applied higher than microblogging, redirection module 301 these network connecting request of interception, the local service process that network connecting request is redirected in the present invention's application is carried out subsequent treatment.
Judge module 302, is suitable in local service process, judges whether the first application of initiation network connecting request is the application at running background.
In the time that user starts the network connecting request of the first application initiation, because the control hierarchy that client connects network is applied higher than microblogging, after redirection module 301 these network connecting request of interception, judge module 302 judges whether the first application of initiation network connecting request is the application at running background.
Reminding module 303, judges the first application being applied as at running background of initiating network connecting request if be suitable for, send information and forbid that for pointing out user to select the first application produces the network connection behavior of background traffic.
The embodiment of the present invention is obtained network connecting request by redirection module 301, network connecting request is redirected to local service process, local service process is provided by local VPN service, in local service process, whether the first application that is judged initiation network connecting request by judge module 302 is the application at running background, if judge the first application being applied as at running background of initiating network connecting request, reminding module 303 sends information and forbids that for pointing out user to select the first application produces the network connection behavior of background traffic.Like this, can prevent that the application program at running background or some Malwares that some users are of little use from producing unnecessary flow on backstage, thereby can better save flow for user.
Fig. 6 shows the structured flowchart of the embodiment bis-of client provided by the invention.As shown in Figure 6, client comprises: redirection module 401, judge module 402, reminding module 403, start module 404, update module 405, return to module 406, statistical module 407, network connection type determination module 408 and sending module 409; Wherein
Redirection module 401, is suitable for obtaining network connecting request, and network connecting request is redirected to local service process, and local service process is provided by local VPN service;
Judge module 402, is suitable in local service process, judges whether the first application of initiation network connecting request is the application at running background;
Reminding module 403, judges the first application being applied as at running background of initiating network connecting request if be suitable for, send information and forbid that for pointing out user to select the first application produces the network connection behavior of background traffic.
Optionally, client further comprises:
Start module 404, be suitable in the time that client screen lights, start timing routine, timing routine is for calling the system interface of the second apply names that obtains current the second application at front stage operation;
Update module 405, is suitable for the result of obtaining according to timing routine, is the second apply names by the information updating of recording in the front stage operation list of application of client maintenance.
Optionally, judge module 402 is further adapted for: the first apply names that obtains the first application of initiating network connecting request by inquiry system file; Judge that whether the first apply names is consistent with the second apply names recording in front stage operation list of application, if inconsistent, judge the first application being applied as at running background of initiating network connecting request.
Optionally, judge module 402 is also suitable for: before reminding module 403 sends information, judge whether the first application belongs to the application of recording in background traffic white list, and what background traffic white list recorded is the application that allows to produce background traffic;
Sending module 409, judges the first application and belongs to the application of recording in background traffic white list if be suitable for judge module 402, sends network connecting request to network side;
Judge the first application and do not belong to the application of recording in background traffic white list if described reminding module 403 is specifically suitable for judge module 402, send information and connect behavior for the network of pointing out user to select to forbid the first application to produce background traffic.
Optionally, client further comprises:
Return to module 406, be suitable for after reminding module 402 sends information, if user selects to forbid that the first application produces the network connection behavior of background traffic, return to network connection failure message to the first application;
Described sending module 409 is also suitable for: if user selects the network that allows the first application to produce background traffic to connect behavior, allow to send network connecting request to network side.
Optionally, client further comprises: statistical module 407, is suitable for allowing client after network side sends network connecting request the background traffic that statistics the first application produces;
Judge module 402 is also suitable for judging whether the background traffic that the first application produces exceedes preset flow threshold value;
Exceed preset flow threshold value if reminding module 403 is also suitable for the background traffic that judge module 402 judges that the first application produces, send information and occur abnormal for the background traffic of pointing out user first and applying.
Optionally, client further comprises:
Network connection type determination module 408, be suitable for before judge module 402 judges whether the first application of initiating network connecting request is the application at running background, determine that whether network connection type is with any one in lower network: 2G network, 3G network and 4G network;
Judge module 402 is further adapted for: if determine, network connection type is any one in 2G network, 3G network and 4G network, judges whether the first application of initiation network connecting request is the application at running background.
Optionally, judge module 402 is further adapted for: the first apply names that obtains the first application of initiating network connecting request by inquiry system file, call the system interface for obtaining address, opposite end and port, obtain address corresponding to network connecting request and port, according to address corresponding to network connecting request and interface querying system file, obtain the first application identities of the first application of initiating network connecting request, call the system interface for obtaining apply names according to the first application identities, obtain the first apply names of the first application of initiating network connecting request.
Optionally, system file comprises one or more in following file :/proc/net/tcp; / proc/net/udp; / proc/net/tcp6.
Optionally, judge module 402 is further adapted for: before inquiry system file/proc/net/tcp6, be IPV6 agreement by address and port by IPV4 protocol conversion.
Client implementation of the present invention example is for carrying out the correlation step described in said method embodiment mono-and embodiment of the method two, and the technique effect of its know-why and generation is similar, does not repeat them here.
The algorithm providing at this is intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with demonstration.Various general-purpose systems also can with based on using together with this teaching.According to description above, it is apparent constructing the desired structure of this type systematic.In addition, the present invention is not also for any certain programmed language.It should be understood that and can utilize various programming languages to realize content of the present invention described here, and the description of above language-specific being done is in order to disclose preferred forms of the present invention.
In the specification that provided herein, a large amount of details are described.But, can understand, embodiments of the invention can be put into practice in the situation that there is no these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand one or more in each inventive aspect, in the above in the description of exemplary embodiment of the present invention, each feature of the present invention is grouped together into single embodiment, figure or sometimes in its description.But, the method for the disclosure should be construed to the following intention of reflection: the present invention for required protection requires than the more feature of feature of clearly recording in each claim.Or rather, as reflected in claims below, inventive aspect is to be less than all features of disclosed single embodiment above.Therefore, claims of following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can the module in the equipment in embodiment are adaptively changed and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and can put them in addition multiple submodules or subelement or sub-component.At least some in such feature and/or process or unit are mutually repelling, and can adopt any combination to combine all processes or the unit of disclosed all features in this specification (comprising claim, summary and the accompanying drawing followed) and disclosed any method like this or equipment.Unless clearly statement in addition, in this specification (comprising claim, summary and the accompanying drawing followed) disclosed each feature can be by providing identical, be equal to or the alternative features of similar object replaces.
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature instead of further feature included in other embodiment, the combination of the feature of different embodiment means within scope of the present invention and forms different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with compound mode arbitrarily.
All parts embodiment of the present invention can realize with hardware, or realizes with the software module of moving on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that and can use in practice microprocessor or digital signal processor (DSP) to realize according to the some or all functions of the some or all parts in the smart mobile phone equipment of the embodiment of the present invention.The present invention can also be embodied as part or all equipment or the device program (for example, computer program and computer program) for carrying out method as described herein.Realizing program of the present invention and can be stored on computer-readable medium like this, or can there is the form of one or more signal.Such signal can be downloaded and obtain from internet website, or provides on carrier signal, or provides with any other form.
It should be noted above-described embodiment the present invention will be described instead of limit the invention, and those skilled in the art can design alternative embodiment in the case of not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and is not listed as element or step in the claims.Being positioned at word " " before element or " one " does not get rid of and has multiple such elements.The present invention can be by means of including the hardware of some different elements and realizing by means of the computer of suitably programming.In the unit claim of having enumerated some devices, several in these devices can be to carry out imbody by same hardware branch.The use of word first, second and C grade does not represent any order.Can be title by these word explanations.
The optimization method that the invention discloses A1, a kind of client background flow, comprising:
Obtain network connecting request, described network connecting request is redirected to local service process, described local service process is provided by local VPN service;
In described local service process, judge whether the first application of the described network connecting request of initiation is the application at running background;
If judge the first application being applied as at running background of initiating described network connecting request, send information and forbid that for pointing out user to select the network that described the first application produces background traffic connects behavior.
A2, method as described in A1, judge described the first application of initiating described network connecting request further comprises before whether being the application at running background:
In the time that client screen lights, start timing routine, described timing routine is for calling the system interface of the second apply names that obtains current the second application at front stage operation;
According to the result of obtaining of described timing routine, be described the second apply names by the information updating of recording in the front stage operation list of application of described client maintenance.
A3, method as described in A2, describedly judge whether the first application of initiating described network connecting request is the application at running background, comprising:
Obtain the first apply names of the first application of initiating described network connecting request by inquiry system file;
Judge that whether described the first apply names is consistent with the second apply names recording in described front stage operation list of application; If inconsistent, judge the first application being applied as at running background of initiating described network connecting request.
A4, method as described in A1~A3 any one, further comprise before sending information described: judge the application that described the first application is recorded in whether belonging to background traffic white list, described background traffic white list record be the application that allows to produce background traffic;
Belong to the application of recording in background traffic white list if judge described the first application, described method also comprises: allow to send described network connecting request to network side;
Do not belong to the application of recording in background traffic white list if judge described the first application, carry out the step of sending described information.
A5, method as described in A1, further comprise after sending information described:
If user selects to forbid that the network that described the first application produces background traffic connects behavior, return to network connection failure message to described the first application;
If user selects the network that allows described the first application to produce background traffic to connect behavior, allow to send described network connecting request to network side.
A6, method as described in A4 or A5 further comprise after described permission client is sent described network connecting request to network side:
Add up the background traffic that described the first application produces;
Judge that whether the background traffic that described the first application produces exceedes preset flow threshold value, if so, sends information abnormal for pointing out the background traffic of the first application described in user to occur.
A7, method as described in A1~A6 any one, judge described the first application of initiating described network connecting request further comprises before whether being the application at running background: determine that whether network connection type is with any one in lower network: 2G network, 3G network and 4G network;
Described judge initiate described network connecting request first application whether be to be specially in the application of running background:
If determine, described network connection type is any one in 2G network, 3G network and 4G network, judges whether the first application of the described network connecting request of initiation is the application at running background.
A8, method as described in A3, described the first apply names that obtains the first application of initiating described network connecting request by inquiry system file further comprises:
Call the system interface for obtaining address, opposite end and port, obtain address corresponding to described network connecting request and port;
According to address corresponding to described network connecting request and interface querying system file, obtain the first application identities of the first application of described initiation network connecting request;
Call the system interface for obtaining apply names according to described the first application identities, obtain the first apply names of the first application of described initiation network connecting request.
A9, method as described in A8, described system file comprises one or more in following file :/proc/net/tcp; / proc/net/udp; / proc/net/tcp6.
A10, method as described in A9 also comprised: be IPV6 agreement by described address and port by IPV4 protocol conversion before inquiry system file/proc/net/tcp6.
The invention also discloses B11, a kind of client, comprising:
Redirection module, is suitable for obtaining network connecting request, and described network connecting request is redirected to local service process, and described local service process is provided by local VPN service;
Judge module, is suitable in described local service process, judges whether the first application of the described network connecting request of initiation is the application at running background;
Reminding module, judges the first application being applied as at running background of initiating described network connecting request if be suitable for, send information and forbid that for pointing out user to select the network that described the first application produces background traffic connects behavior.
B12, client as described in B11, further comprise:
Start module, be suitable for before described judge module judges whether the first application of the described network connecting request of initiation is the application at running background, in the time that client screen lights, start timing routine, described timing routine is for calling the system interface of the second apply names that obtains current the second application at front stage operation;
Update module, is suitable for the result of obtaining according to described timing routine, is described the second apply names by the information updating of recording in the front stage operation list of application of described client maintenance.
B13, client as described in B12, described judge module is further adapted for:
Obtain the first apply names of the first application of initiating described network connecting request by inquiry system file;
Judge that whether described the first apply names is consistent with the second apply names recording in described front stage operation list of application, if inconsistent, judge the first application being applied as at running background of initiating described network connecting request.
B14, client as described in B11~B13 any one, described judge module is further adapted for: before described reminding module sends information, judge whether described the first application belongs to the application of recording in background traffic white list, and what described background traffic white list recorded is the application that allows to produce background traffic;
Described client also comprises: sending module, if be suitable for described judge module judge described first application belong to the application of recording in background traffic white list, send described network connecting request to network side;
Judge described the first application and do not belong to the application of recording in background traffic white list if described reminding module is specifically suitable for described judge module, send information and connect behavior for the network of pointing out user to select to forbid described the first application to produce background traffic.
B15, client as described in B14 further comprise: return to module, be suitable for after described reminding module sends information, if user selects to forbid that the network that described the first application produces background traffic connects behavior, return to network connection failure message to described the first application;
Described sending module is also suitable for: if after described reminding module sends information, user selects the network that allows described the first application to produce background traffic to connect behavior, allows to send described network connecting request to network side.
B16, client as described in B14 or B15 further comprise:
Statistical module, is suitable for after described permission client is sent described network connecting request to network side, adds up the background traffic that described the first application produces;
Described judge module, is also suitable for judging whether the background traffic that described the first application produces exceedes preset flow threshold value;
Described reminding module, the background traffic that described judge module judges that described the first application produces if be also suitable for exceedes preset flow threshold value, sends information abnormal for pointing out the background traffic of the first application described in user to occur.
B17, client as described in B11~B16 any one, further comprise:
Network connection type determination module, be suitable for before described judge module judges whether the first application of initiating described network connecting request is the application at running background, determine that whether network connection type is with any one in lower network: 2G network, 3G network and 4G network;
Described judge module is further adapted for: if determine, described network connection type is any one in 2G network, 3G network and 4G network, judges whether the first application of the described network connecting request of initiation is the application at running background.
B18, client as described in B13, described judge module is further adapted for:
Obtain the first apply names of the first application of initiating described network connecting request by inquiry system file, call the system interface for obtaining address, opposite end and port, obtain address corresponding to described network connecting request and port, according to address corresponding to described network connecting request and interface querying system file, obtain the first application identities of the first application of described initiation network connecting request, call the system interface for obtaining apply names according to described the first application identities, obtain the first apply names of the first application of described initiation network connecting request.
B19, client as described in B18, described system file comprises one or more in following file :/proc/net/tcp; / proc/net/udp; / proc/net/tcp6.
B20, client as described in B19, described judge module is further adapted for: before inquiry system file/proc/net/tcp6, be IPV6 agreement by described address and port by IPV4 protocol conversion.

Claims (10)

1. an optimization method for client background flow, comprising:
Obtain network connecting request, described network connecting request is redirected to local service process, described local service process is provided by local VPN service;
In described local service process, judge whether the first application of the described network connecting request of initiation is the application at running background;
If judge the first application being applied as at running background of initiating described network connecting request, send information and forbid that for pointing out user to select the network that described the first application produces background traffic connects behavior.
2. method according to claim 1, judges described the first application of initiating described network connecting request further comprises before whether being the application at running background:
In the time that client screen lights, start timing routine, described timing routine is for calling the system interface of the second apply names that obtains current the second application at front stage operation;
According to the result of obtaining of described timing routine, be described the second apply names by the information updating of recording in the front stage operation list of application of described client maintenance.
3. method according to claim 2, described judge initiate described network connecting request first application whether be the application at running background, comprising:
Obtain the first apply names of the first application of initiating described network connecting request by inquiry system file;
Judge that whether described the first apply names is consistent with the second apply names recording in described front stage operation list of application; If inconsistent, judge the first application being applied as at running background of initiating described network connecting request.
4. according to the method described in claim 1~3 any one, further comprise before sending information described: judge the application that described the first application is recorded in whether belonging to background traffic white list, described background traffic white list record be the application that allows to produce background traffic;
Belong to the application of recording in background traffic white list if judge described the first application, described method also comprises: allow to send described network connecting request to network side;
Do not belong to the application of recording in background traffic white list if judge described the first application, carry out the step of sending described information.
5. method according to claim 1, further comprises after sending information described:
If user selects to forbid that the network that described the first application produces background traffic connects behavior, return to network connection failure message to described the first application;
If user selects the network that allows described the first application to produce background traffic to connect behavior, allow to send described network connecting request to network side.
6. a client, comprising:
Redirection module, is suitable for obtaining network connecting request, and described network connecting request is redirected to local service process, and described local service process is provided by local VPN service;
Judge module, is suitable in described local service process, judges whether the first application of the described network connecting request of initiation is the application at running background;
Reminding module, judges the first application being applied as at running background of initiating described network connecting request if be suitable for, send information and forbid that for pointing out user to select the network that described the first application produces background traffic connects behavior.
7. client according to claim 6, further comprises:
Start module, be suitable for before described judge module judges whether the first application of the described network connecting request of initiation is the application at running background, in the time that client screen lights, start timing routine, described timing routine is for calling the system interface of the second apply names that obtains current the second application at front stage operation;
Update module, is suitable for the result of obtaining according to described timing routine, is described the second apply names by the information updating of recording in the front stage operation list of application of described client maintenance.
8. client according to claim 6, described judge module is further adapted for:
Obtain the first apply names of the first application of initiating described network connecting request by inquiry system file;
Judge that whether described the first apply names is consistent with the second apply names recording in described front stage operation list of application, if inconsistent, judge the first application being applied as at running background of initiating described network connecting request.
9. according to the client described in claim 6~8 any one, described judge module is further adapted for: before described reminding module sends information, judge whether described the first application belongs to the application of recording in background traffic white list, and what described background traffic white list recorded is the application that allows to produce background traffic;
Described client also comprises: sending module, if be suitable for described judge module judge described first application belong to the application of recording in background traffic white list, send described network connecting request to network side;
Judge described the first application and do not belong to the application of recording in background traffic white list if described reminding module is specifically suitable for described judge module, send information and connect behavior for the network of pointing out user to select to forbid described the first application to produce background traffic.
10. client according to claim 9 further comprises: return to module, be suitable for after described reminding module sends information, if user selects to forbid that the network that described the first application produces background traffic connects behavior, return to network connection failure message to described the first application;
Described sending module is also suitable for: if after described reminding module sends information, user selects the network that allows described the first application to produce background traffic to connect behavior, allows to send described network connecting request to network side.
CN201410409171.XA 2014-08-19 2014-08-19 Method for optimizing background flow of client, and client Pending CN104159231A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410409171.XA CN104159231A (en) 2014-08-19 2014-08-19 Method for optimizing background flow of client, and client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410409171.XA CN104159231A (en) 2014-08-19 2014-08-19 Method for optimizing background flow of client, and client

Publications (1)

Publication Number Publication Date
CN104159231A true CN104159231A (en) 2014-11-19

Family

ID=51884617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410409171.XA Pending CN104159231A (en) 2014-08-19 2014-08-19 Method for optimizing background flow of client, and client

Country Status (1)

Country Link
CN (1) CN104159231A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468558A (en) * 2014-11-28 2015-03-25 东莞宇龙通信科技有限公司 Data security management method, device and terminal
CN104484259A (en) * 2014-11-25 2015-04-01 北京奇虎科技有限公司 Application program traffic monitoring method and device, and mobile terminal
CN104486138A (en) * 2014-11-25 2015-04-01 北京奇虎科技有限公司 Flow monitoring method and device and monitoring server
CN106502778A (en) * 2016-10-26 2017-03-15 深圳市金立通信设备有限公司 A kind of terminal and its process scheduling optimization method
CN106937282A (en) * 2015-12-29 2017-07-07 北界创想(北京)软件有限公司 VPN cut-in methods and system based on mobile terminal
WO2017215087A1 (en) * 2016-06-16 2017-12-21 宇龙计算机通信科技(深圳)有限公司 Method and terminal for controlling navigation operation
CN108476076A (en) * 2015-10-27 2018-08-31 黑莓有限公司 Resource is detected to access
CN108834203A (en) * 2018-06-29 2018-11-16 Oppo(重庆)智能科技有限公司 Method for switching network, device, terminal and storage medium
CN112787828A (en) * 2021-01-08 2021-05-11 重庆创通联智物联网有限公司 Application flow statistical method and device and mobile electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102257760A (en) * 2008-12-17 2011-11-23 北方电讯网络有限公司 Secure remote access public communication environment
CN102694903A (en) * 2011-03-22 2012-09-26 联想(北京)有限公司 Method and apparatus for data communication
CN103037337A (en) * 2012-12-11 2013-04-10 广东欧珀移动通信有限公司 Method intercepting sent short message and device thereof
CN103391234A (en) * 2013-08-01 2013-11-13 厦门市美亚柏科信息股份有限公司 Method for realizing multi-user fixed port mapping and PPTP VPN server side
CN103986719A (en) * 2014-05-26 2014-08-13 厦门美图之家科技有限公司 Method for preventing background flow of application programs from being wasted

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102257760A (en) * 2008-12-17 2011-11-23 北方电讯网络有限公司 Secure remote access public communication environment
CN102694903A (en) * 2011-03-22 2012-09-26 联想(北京)有限公司 Method and apparatus for data communication
CN103037337A (en) * 2012-12-11 2013-04-10 广东欧珀移动通信有限公司 Method intercepting sent short message and device thereof
CN103391234A (en) * 2013-08-01 2013-11-13 厦门市美亚柏科信息股份有限公司 Method for realizing multi-user fixed port mapping and PPTP VPN server side
CN103986719A (en) * 2014-05-26 2014-08-13 厦门美图之家科技有限公司 Method for preventing background flow of application programs from being wasted

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DMITRY BOKOTEY: "《CCIE Security实验指南》", 31 December 2013 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484259A (en) * 2014-11-25 2015-04-01 北京奇虎科技有限公司 Application program traffic monitoring method and device, and mobile terminal
CN104486138A (en) * 2014-11-25 2015-04-01 北京奇虎科技有限公司 Flow monitoring method and device and monitoring server
CN104468558B (en) * 2014-11-28 2018-01-09 东莞宇龙通信科技有限公司 The method, apparatus and terminal of data safety management
CN104468558A (en) * 2014-11-28 2015-03-25 东莞宇龙通信科技有限公司 Data security management method, device and terminal
CN108476076B (en) * 2015-10-27 2021-10-08 黑莓有限公司 Method, electronic device and computer readable medium for monitoring resource access
CN108476076A (en) * 2015-10-27 2018-08-31 黑莓有限公司 Resource is detected to access
CN106937282B (en) * 2015-12-29 2020-12-18 北界创想(北京)软件有限公司 VPN access method and system based on mobile terminal
CN106937282A (en) * 2015-12-29 2017-07-07 北界创想(北京)软件有限公司 VPN cut-in methods and system based on mobile terminal
WO2017215087A1 (en) * 2016-06-16 2017-12-21 宇龙计算机通信科技(深圳)有限公司 Method and terminal for controlling navigation operation
CN106502778A (en) * 2016-10-26 2017-03-15 深圳市金立通信设备有限公司 A kind of terminal and its process scheduling optimization method
CN108834203A (en) * 2018-06-29 2018-11-16 Oppo(重庆)智能科技有限公司 Method for switching network, device, terminal and storage medium
CN108834203B (en) * 2018-06-29 2021-01-26 Oppo(重庆)智能科技有限公司 Network switching method, device, terminal and storage medium
CN112787828A (en) * 2021-01-08 2021-05-11 重庆创通联智物联网有限公司 Application flow statistical method and device and mobile electronic device
CN112787828B (en) * 2021-01-08 2023-03-21 重庆创通联智物联网有限公司 Application flow statistical method and device and mobile electronic device

Similar Documents

Publication Publication Date Title
CN104159231A (en) Method for optimizing background flow of client, and client
KR101665492B1 (en) Management method for embedded universal integrated circuit card, related device and system
US11418937B2 (en) Context-based dynamic policy system for mobile devices and supporting network infrastructure
CN110311929B (en) Access control method and device, electronic equipment and storage medium
CN104092792A (en) Method, system and client-side for achieving flow optimization based on domain name resolution request
CN105354492B (en) Communication terminal and its message informing control method and device
US10581993B2 (en) Method for forwarding traffic in application on mobile intelligent terminal
CN105282047A (en) Access request processing method and device
CN104092691A (en) Implementation method for implementing root-authority-free networking firewall and client-side
CN104484259A (en) Application program traffic monitoring method and device, and mobile terminal
CN110633442A (en) Pushing method and device and electronic equipment
CN103108320A (en) Method and system for monitoring application program of mobile device
CN103595766A (en) Method and device for achieving push notification of extensive application program
CN111246311A (en) Data transmission method and device, storage medium and electronic equipment
CN103973704A (en) Domain name resolution method, device and system based on WIFI device
CN103997521A (en) File operating method and device based on router and router
CN103179552A (en) Method and device for inquiring information of opposite call party
CN104394067A (en) Local area network communication method and device
CN104735657A (en) Security terminal verification method, device and system and wireless access point binding method
CN104539508A (en) Access control method and device
CN113556359B (en) Communication protocol conversion method, device, system and gateway device
CN113595927A (en) Method and device for processing mirror flow in bypass mode
CN103138961B (en) server control method, controlled server and central control server
CN105075189A (en) Receiving a communication event
CN105446803A (en) Application management method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20141119