CN106095547A - Application program networking control method and device - Google Patents

Application program networking control method and device Download PDF

Info

Publication number
CN106095547A
CN106095547A CN201610390500.XA CN201610390500A CN106095547A CN 106095547 A CN106095547 A CN 106095547A CN 201610390500 A CN201610390500 A CN 201610390500A CN 106095547 A CN106095547 A CN 106095547A
Authority
CN
China
Prior art keywords
networking
application
background application
behavior
background
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
CN201610390500.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 Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610390500.XA priority Critical patent/CN106095547A/en
Publication of CN106095547A publication Critical patent/CN106095547A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The disclosure discloses a kind of application program networking control method and device, belongs to networking control field.Described application program networking control method comprises determining that out just at the background application of running background;Detect whether described background application possesses networking behavior;When detecting that described background application possesses networking behavior, whether the networking speeds detecting described background application exceedes predetermined threshold;If detecting, the networking speeds of the background application possessing networking behavior exceedes described predetermined threshold, then interrupt the networking behavior of described background application.The disclosure solves the technical problem that the priority being interrupted application program that is relatively low and that have networking behavior is limited to when needing networking;Make application program possess network speed limitation function, low cost when need not manually run, cover comprehensively.

Description

Application program networking control method and device
Technical field
It relates to networking control field, particularly to a kind of application program networking control method and device.
Background technology
Many application programs require connect to network when using, either foreground application or background application, All may have networking behavior, wherein, foreground application is the application program operating in foreground, and background application is to operate in The application program on backstage.
Foreground application in order to make priority higher possesses enough network speeds, generally interrupts the most excellent of user's selection The networking behavior of the application program that first level is relatively low, and after the networking behavior of these application programs is interrupted, network at needs Shi Zehui is limited to.
Summary of the invention
The disclosure provides a kind of application program networking control method and device.Described technical scheme is as follows:
First aspect according to disclosure embodiment, it is provided that a kind of application program networking control method, described method includes: Determine just at the background application of running background;Whether the described background application that detection is determined possesses networking row For;When detecting that the described background application determined possesses networking behavior, detect the networking of described background application Whether speed exceedes predetermined threshold;If it is described predetermined to detect that the networking speeds of the background application possessing networking behavior exceedes Threshold value, then interrupt the networking behavior of described background application.By exceeding pre-at the networking speeds judging background application When determining threshold value, will exceed the background application of predetermined threshold networking behavior interrupt, due to can interrupt network speed bigger after The networking behavior of platform application program, therefore can ensure that the normal cluster behavior of foreground application, solves in correlation technique The technical problem that the priority being interrupted application program that is relatively low and that have networking behavior is limited to when needing networking;Reach Can ensure that foreground application can preferentially be networked, before the handover during platform application program, also can guarantee that the foreground after switching The effect of the normal cluster of application program.
Optionally, described method also comprises determining that out just at the foreground application of front stage operation;Detecting described foreground should Networking behavior whether is possessed by program;When described foreground application possesses networking behavior, after determining described in execution The step of the background application that platform runs.By after judging that foreground application just further determines that when possessing networking behavior Platform application program so that when foreground application possesses networking behavior, limits the networking behavior of background application, it is ensured that The preferential networking of foreground application.
Optionally, whether the described background application that described detection is determined possesses networking behavior, including: cut from gateway Obtain network packet;The mark of application program is parsed from described network packet;Detection identifies whether described in parsing Belong to the mark of described background application.By intercepting and capturing the network packet of gateway to determine the backstage possessing networking behavior Application program, the network packet sent due to all networking behaviors is required to be sent by gateway, therefore carries out at gateway Monitoring can judge that backstage possesses the application program of networking behavior exactly.
Optionally, whether the networking speeds of the described background application of described detection exceedes predetermined threshold, including: according to answering With the corresponding relation of program Yu predetermined threshold, determine the predetermined threshold corresponding with the described background application determined;Inspection Survey the networking speeds of described background application whether exceed described in the predetermined threshold determined.By the connection of background application Net spee compares with predetermined threshold, effectively determines the background application that networking speeds is too fast.
Optionally, the networking behavior of the described background application of described interruption, including: intercept and capture network packet from gateway; Filter out the network packet that networking speeds exceedes the background application of described predetermined threshold;The network filtered out described in abandoning Packet, forwards remaining network packet intercepted and captured.The background application of predetermined threshold is exceeded by filtering out networking speeds And interrupt networking behavior so that take the many background application interruption networkings of networked resources and ensure the connection of foreground application Net resource.
Optionally, described method also includes: when the background application being interrupted networking behavior is switched to front stage operation Time, switch to the networking behavior of the application program of front stage operation described in unlatching.Being interrupted of front stage operation is switched to by unlatching The networking behavior of the background application of networking behavior so that during user's background application before the handover, networking will not be limited It is fixed, so that the networking behavior of foreground application is constantly subjected to ensure.
Second aspect according to disclosure embodiment, it is provided that a kind of application program networking control device, described device includes: First determines module, is configured to determine that out just at the background application of running background;First detection module, is configured to inspection Survey described first and determine whether the described background application that module is determined possesses networking behavior;Second detection module, is joined Be set to when described first detection module detects that the described background application determined possesses networking behavior, detect described after Whether the networking speeds of platform application program exceedes predetermined threshold;Interrupt module, is configured as described second detection module detection When networking speeds to the background application possessing networking behavior exceedes described predetermined threshold, interrupt described background application Networking behavior.
Optionally, described device also includes: second determines module, and being configured to determine that out just should on the foreground of front stage operation Use program;3rd detection module, is configured to detect whether described foreground application possesses networking behavior;Described first determines Module, is additionally configured to, when described 3rd detection module detects that described foreground application possesses networking behavior, determine Just at the background application of running background.
Optionally, described first detection module, including: first intercepts and captures submodule, is configured to intercept and capture network number from gateway According to bag;Analyzing sub-module, is configured to intercept and capture to parse the described network packet that submodule intercepts from described first answer By the mark of program;First detection sub-module, be configured to detect described analyzing sub-module parse described in identify whether to belong to Mark in described background application.
Optionally, described second detection module, comprise determining that submodule, be configured to according to application program and predetermined threshold The corresponding relation of value, determines the predetermined threshold corresponding with the described background application determined;Second detection sub-module, quilt Be configured to detect the networking speeds of described background application whether exceed described in the predetermined threshold determined.
Optionally, described interrupt module, including: second intercepts and captures submodule, is configured to intercept and capture network packet from gateway; Screening submodule, is configured to filter out the network packet of the background application that networking speeds exceedes described predetermined threshold; Abandon submodule, be configured to the network packet filtered out described in abandoning, forward remaining network packet intercepted and captured.
Optionally, described device also includes: handover module, is configured as being interrupted the background application of networking behavior When being switched to front stage operation, described in unlatching, switch to the networking behavior of the application program of front stage operation.
The third aspect according to disclosure embodiment, it is provided that a kind of application program networking control device, described device includes: Processor;For storing the memorizer of described processor executable;Wherein, described processor is configured to: just determine Background application at running background;Whether the described background application that detection is determined possesses networking behavior;Work as detection To the described background application determined possess networking behavior time, whether the networking speeds detecting described background application surpasses Cross predetermined threshold;If detecting, the networking speeds of the background application possessing networking behavior exceedes described predetermined threshold, then in The networking behavior of disconnected described background application.
It should be appreciated that it is only exemplary that above general description and details hereinafter describe, can not be limited this Open.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meet the enforcement of the disclosure Example, and for explaining the principle of the disclosure together with description.
Fig. 1 is the flow chart according to a kind of application program networking control method shown in an exemplary embodiment;
Fig. 2 A is the flow chart according to a kind of application program networking control method shown in another exemplary embodiment;
Fig. 2 B is whether the background application determined according to the detection provided in an exemplary embodiment possesses networking The flow chart of behavior;
Fig. 2 C is whether the networking speeds according to the detection background application provided in an exemplary embodiment exceedes pre- Determine the flow chart of threshold value;
Fig. 2 D is the flow chart according to the networking behavior interrupting background application provided in an exemplary embodiment;
Fig. 3 is the block diagram according to a kind of application program networking control device shown in an exemplary embodiment;
Fig. 4 is the block diagram according to a kind of application program networking control device shown in another exemplary embodiment;
Fig. 5 is the block diagram according to a kind of device for controlling application program networking shown in an exemplary embodiment.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Explained below relates to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they are only with the most appended The example of the apparatus and method that some aspects that described in detail in claims, the disclosure are consistent.
Fig. 1 is the flow chart according to a kind of application program networking control method shown in an exemplary embodiment, this application Program networking control method can apply in smart machine, the smart machine said here include smart mobile phone, panel computer, Multimedia play equipment etc..As it is shown in figure 1, this application program networking control method can include following several step.
In step 110, determine just at the background application of running background.
In the step 120, whether the background application that detection is determined possesses networking behavior.
In step 130, when detecting that the background application determined possesses networking behavior, detect background application journey Whether the networking speeds of sequence exceedes predetermined threshold.
In step 140, if detecting, the networking speeds of the background application possessing networking behavior exceedes predetermined threshold, Then interrupt the networking behavior of this background application.
In sum, the application program networking control method provided in disclosure embodiment, by judging background application When the networking speeds of program exceedes predetermined threshold, the networking behavior exceeding the background application of predetermined threshold is interrupted, due to The networking behavior of the bigger background application of network speed can be interrupted, therefore can ensure that the normal cluster row of foreground application For, solve the priority being interrupted in correlation technique application program that is relatively low and that have networking behavior and be subject to when needs are networked The technical problem limited;Reach to can ensure that foreground application can preferentially be networked, before the handover during platform application program, also Can guarantee that the effect of the normal cluster of the foreground application after switching.
Fig. 2 A is the flow chart according to a kind of application program networking control method shown in another exemplary embodiment, should Can apply in smart machine with program networking control method, the smart machine said here includes smart mobile phone, flat board electricity Brain etc..As shown in Figure 2 A, this application program networking control may comprise steps of.
In step 210, determine just at the foreground application of front stage operation.
From the point of view of the intelligence system of smart machine, intelligence system may support application program at front stage operation, when Open another application program, and maintain this application program when front stage operation, then originally front stage operation application program then Running background can be automatically switched to.
To put it more simply, the application program operating in foreground is referred to as foreground application by the present embodiment, after operating in The application program of platform is referred to as background application.
In general, owing to foreground application is the application program that user currently wishes to run or use, and backstage should It is the application program that user the most temporarily and too pays close attention to by program, but still needs to run, to avoid user to miss background application Relevant information, therefore the priority of foreground application is generally greater than the priority of background application.It will be apparent that along with The use at family, when an application program is switched to running background by front stage operation, and its priority also can reduce;Otherwise, when one Application program is switched to front stage operation by running background, and its priority also can raise.
In a step 220, whether detection foreground application possesses networking behavior.
General, when foreground application possesses networking behavior, show that foreground application is currently needed for network data, The now networking behavior of background application then can affect the networking of foreground application, due to general foreground application Priority higher than the priority of background application, therefore smart machine needs first to detect whether foreground application possesses connection Net behavior.
In step 230, when foreground application possesses networking behavior, determine just in the background application of running background Program.
From the point of view of the intelligence system of smart machine, it is it is known that foreground application and background application, Such as it is unlocked and not at front stage operation when an application program, the most then this application program can be regarded as just on backstage The background application run.
In step 240, whether the background application that detection is determined possesses networking behavior.
After determining background application, owing to some background application possesses networking behavior, some background application Program does not has networking behavior, and needs to limit the part background application possessing networking behavior in the present embodiment, therefore Whether the background application that smart machine needs detection to determine here possesses networking behavior.
Smart machine, can be by shown in Fig. 2 B when whether the background application that detection is determined possesses networking behavior Step.
In step 241, intercept and capture network packet from gateway.
Here the gateway said refers to that the gateway of smart machine, general smart machine are connected intercommunication network with external network During packet, it is required to the gateway by smart machine, therefore can intercept and capture network packet from gateway.
Here the network packet said can be the packet that smart machine sends to outer net, it is also possible to be to connect from outer net The packet received.
In actual applications, gateway common in Fructus Mali pumilae system is iptables, and the gateway in other intelligence system is also Can be other title, the type of gateway and intelligence system is not defined.
In step 242, from network packet, parse the mark of application program.
The mark of application program can the mark of uniquely identification application, such as application program can be application program Bag name.
General, for any one application program, if this application program needs external network to send data, after packaging Network packet in generally carry the mark of this application program, in order to external network is when the network packet that feedback is corresponding Also adding the mark of this application program, such smart machine is when receiving the network packet of external network feedback, the most permissible The mark in network packet according to feedback knows that the network packet of this feedback is the response for which application program, this Time then the network packet of feedback can be pushed to correspondence application program.
From the foregoing, it will be observed that the network packet that sends of application program and the application network packet that receives all can carry There is the mark of this application program, so when gateway intercepts and captures network packet, then can parse application journey in network packet The mark of sequence.
In step 243, the mark identifying whether to belong to background application that detection parses.
Owing to smart machine may determine that background application, it can therefore be appreciated that the mark of all background applications, Therefore the mark identifying whether to belong to this background application parsed can be detected.
It will be apparent that parse identifies some mark that may belong to background application, one of them mark is also possible to Mark for foreground application.
When the mark parsed belongs to the mark of background application, then may determine that the backstage possessing this mark Application program possesses networking behavior.
When all marks parsed are not admitted to the mark of background application, then may determine that background application is equal Do not possess networking behavior, the mark being designated foreground application now parsed, and foreground application possess networking row For.
So, each mark for parsing all can be made whether to belong to the judgement of the mark of background application.
When determining that at least one background application possesses networking behavior, perform step 250.
In step 250, when the background application that detection is determined possesses networking behavior, background application is detected Networking speeds whether exceed predetermined threshold.
Here the networking speeds said can be understood as the size of the unit interval network packet by gateway, for same From the point of view of one background application is by network of network packet, smart machine can intercept these network packet and solve Analyse its size, the total size analyzing the network packet of period same background application is analyzed, according to when analyzing Section, this background application of unit of account time is by the size of the network packet of gateway.
Here the predetermined threshold said is the maximum networking speeds setting background application, the predetermined threshold said here Value all can be identical for each background application, or different.It is to say, the maximum networking of all of background application Speed could be arranged to identical value, or, the maximum networking speeds of different background applications could be arranged to different Value.
For example, when predetermined threshold is identical, can unify to be set to 20KB, 40KB etc., when predetermined threshold difference, Such as a example by game class application program, video class application program and browser, the predetermined threshold of game class application program is permissible For 40KB, the predetermined threshold of video class application program can be 30KB, and the predetermined threshold of browser can be 20KB.
When predetermined threshold for each background application can not simultaneously, smart machine be typically stored with each application journey Corresponding relation between sequence and predetermined threshold, in this case, whether the networking speeds of smart machine detection background application When exceeding predetermined threshold, can be realized by the step shown in Fig. 2 C.
In step 251, according to the corresponding relation of application program Yu predetermined threshold, determine and this background application pair The predetermined threshold answered.
In step 252, whether the networking speeds detecting this background application exceedes the predetermined threshold determined.
Optionally, when for application setting predetermined threshold, can be pre-set by the intelligence system of smart machine, also Can be configured as required by user, not concrete to the predetermined threshold of background application networking speeds in the present embodiment Value is defined.
Optionally, it is also possible to combining the period is defined the networking behavior of background application, such as in the predetermined late into the night Period, although user opens this foreground application and background application, or before causing opening certain due to false triggering Platform application program, but user does not generally have special concern foreground application in this period, the most then and detection is determined When background application possesses networking behavior, it is also possible to judge whether current time belongs to this predetermined period in the late into the night further, as Fruit is not belonging to this predetermined period in the late into the night, then whether the networking speeds performing detection background application exceedes the step of predetermined threshold Suddenly.
Interchangeable, before step 210 or step 230, first judge whether current time belongs to this predetermined period in the late into the night, If being not belonging to this predetermined period in the late into the night, then perform step 210 or step 230.
In step 260, if detecting, the networking speeds of the background application possessing networking behavior exceedes predetermined threshold, Then interrupt the networking behavior of this background application.
In order to ensure the networked resources of foreground application, need to interrupt taking the background application journey that networked resources is too much Sequence, therefore smart machine exceedes predetermined threshold at the networking speeds background application possessing networking behavior being detected, generally Show that this background application takies networked resources too much, the most then interrupt the networking behavior of this background application.
During the networking behavior of smart machine platform application program after the interruption, the step shown in Fig. 2 D can be included.
In step 261, intercept and capture network packet from gateway.
In step 262, the network packet that networking speeds exceedes the background application of predetermined threshold is filtered out.
In step 263, abandon the network packet filtered out, forward remaining network packet intercepted and captured.
Here the screening networking speeds said exceedes the network packet of the background application of predetermined threshold, is parsing Go out detect possess networking behavior and exceed the mark of background application of predetermined threshold, find out and backstage according to this mark The network packet that application program is corresponding.
Smart machine, after the network packet filtering out the background application that networking speeds exceedes predetermined threshold, can be lost Abandon the network packet filtered out, forward remaining network packet intercepted and captured.If the network packet being so dropped for The network packet of outer transmission, owing to outer net cannot receive this network packet, also will not respond to application program, therefore The networking behavior of this application program can be interrupted.
Interchangeable, step 250 and step 260 may alternatively be: the background application determined when detection possesses During networking behavior, interrupt the networking behavior of this background application.As long as namely background application possesses networking behavior, i.e. in The networking behavior of this background application disconnected, thus avoid taking of the networking Multi net voting resource of background application.
In a kind of possible implementation, background application is likely switched to front stage operation by user, and after this Platform application program has been interrupted networking behavior, and user need not the networking row of manually opened application program for convenience For, this problem can be solved by the step 270 in Fig. 2 A.
In step 270, when the background application being interrupted networking behavior is switched to front stage operation, open switching Networking behavior to the application program of front stage operation.
Optionally, smart machine is switched to front stage operation at any one application program and (can be switched to foreground by backstage Run, it is also possible to for being opened into the application program of front stage operation), all can automatically start the networking behavior of this application program.
It will be apparent that in other are applied, smart machine can not also consider whether foreground application possesses networking behavior, But directly determine just at the background application of running background, and then performing step 240, this scheme should in view of foreground Start not network behavior by program, but the follow-up situation that may open networking behavior, due to the backstage that networking speeds is too fast Application program has been defined networking behavior, therefore avoids the impact on foreground application networking behavior.
In sum, a kind of application program networking control method that disclosure embodiment provides, by judging that backstage should When exceeding predetermined threshold with the networking speeds of program, the networking behavior exceeding the background application of predetermined threshold is interrupted, by In the networking behavior of the bigger background application of network speed can be interrupted, therefore can ensure that the normal cluster of foreground application Behavior, solves the priority being interrupted in correlation technique application program that is relatively low and that have networking behavior and is subject to when needs are networked To the technical problem limited;Reach to can ensure that foreground application can preferentially be networked, before the handover during platform application program, Also can guarantee that the effect of the normal cluster of the foreground application after switching.
It addition, by just further determining that background application when judgement foreground application possesses networking behavior, make The networking behavior of background application when foreground application possesses networking behavior, must be limited, it is ensured that foreground application Preferential networking.
By the network packet of intercepting and capturing gateway to determine the background application possessing networking behavior, due to all The network packet that net behavior sends is required to be sent by gateway, therefore is monitored judging exactly at gateway Backstage possesses the application program of networking behavior.
Compared with predetermined threshold by the networking speeds of background application, effectively determine that networking speeds is too fast Background application.
Exceed the background application of predetermined threshold by filtering out networking speeds and interrupt networking behavior so that taking connection The background application that net resource is many interrupts networking and ensures the networked resources of foreground application.
The networking behavior of the background application being interrupted networking behavior of front stage operation is switched to so that use by unlatching During the background application before the handover of family, networking will not be limited to, so that the networking behavior of foreground application is subject to always To ensureing.
Following for disclosure device embodiment, may be used for performing method of disclosure embodiment.Real for disclosure device Execute the details not disclosed in example, refer to method of disclosure embodiment.
Fig. 3 is the block diagram according to a kind of application program networking control device shown in an exemplary embodiment, this application journey Sequence networking control device can apply in smart machine, and the smart machine said here includes smart mobile phone, panel computer etc.. As it is shown on figure 3, this application program networking control device includes but not limited to: first determine module 310, first detection module 320, Second detection module 330 and interrupt module 340.
First determines module 310, is configured to determine that out just at the background application of running background.
First detection module 320, is configured to detect first and determines whether the background application that module 310 is determined has Standby networking behavior.
Second detection module 330, is configured as first detection module 320 and the background application tool determined detected During standby networking behavior, whether the networking speeds detecting this background application exceedes predetermined threshold.
Interrupt module 340, is configured as the second detection module 330 and the background application possessing networking behavior detected Networking speeds when exceeding predetermined threshold, interrupt the networking behavior of background application.
In sum, the application program networking control device provided in disclosure embodiment, by judging background application When the networking speeds of program exceedes predetermined threshold, the networking behavior exceeding the background application of predetermined threshold is interrupted, due to The networking behavior of the bigger background application of network speed can be interrupted, therefore can ensure that the normal cluster row of foreground application For, solve the priority being interrupted in correlation technique application program that is relatively low and that have networking behavior and be subject to when needs are networked The technical problem limited;Reach to can ensure that foreground application can preferentially be networked, before the handover during platform application program, also Can guarantee that the effect of the normal cluster of the foreground application after switching.
Fig. 4 is the block diagram according to a kind of application program networking control device shown in another exemplary embodiment, this application Program networking control device can apply in smart machine, and the smart machine said here includes smart mobile phone, panel computer Deng.This application program networking control device may include that second determines module 410, the 3rd detection module 420, and first determines mould Block 430, first detection module 440, the second detection module 450, interrupt module 460, handover module 470.
Second determines module 410, is configured to determine that out just at the foreground application of front stage operation.
From the point of view of the system of smart machine, system one application program of possible support is at front stage operation, when opening another Individual application program, and maintain this application program when front stage operation, then script then can be by automatically at the application program of front stage operation Switch to running background.
3rd detection module 420, is configured to detect whether foreground application possesses networking behavior.
Second determines that module 410 and the 3rd detection module 420, for judging whether foreground application has networking behavior, lead to Cross second and determine that module 410 and the 3rd detection module 420 can decide whether that triggering first determines module 430, first Determine that module 430 is configured to determine that out just at the background application of running background.
From the point of view of the system of smart machine, it is it is known that foreground application and background application, such as When an application program is unlocked and not at front stage operation, the most then this application program can be regarded as just at running background Background application.
Optionally, when device be not provided with second determine module 410 and three detection modules 420 time, still can arrange First determines module 430.
First detection module 440, is configured to detect first and determines whether the background application that module 430 is determined has Standby networking behavior.
After determining background application, owing to some background application possesses networking behavior, some background application Program does not has networking behavior, and needs to limit the part background application possessing networking behavior in the present embodiment, therefore Whether the background application that smart machine needs detection to determine here possesses networking behavior.
Optionally, first detection module 440 may include that the first intercepting and capturing submodule 441, analyzing sub-module 442, first are examined Survey submodule 443.
First intercepts and captures submodule 441, is configured to intercept and capture network packet from gateway.
Here the gateway said refers to that the gateway of smart machine, general smart machine are connected intercommunication network with external network During packet, it is required to the gateway by smart machine, therefore can intercept and capture network packet from gateway.
Here the network packet said can be the packet that smart machine sends to outer net, it is also possible to be to connect from outer net The packet received.
Analyzing sub-module 442, is configured to intercept and capture to parse the network packet that submodule 441 intercepts from first answer By the mark of program.
The mark of application program can the mark of uniquely identification application, such as application program can be application program Bag name.
General, for any one application program, if this application program needs external network to send data, after packaging Network packet in generally carry the mark of this application program, in order to server when the network packet that feedback is corresponding also Adding the mark of this application program, such smart machine, then can basis when receiving the network packet of server feedback Mark in the network packet of feedback knows that the network packet of this feedback is the response for which application program, the most then The network packet of feedback can be pushed to the application program of correspondence.
From the foregoing, it will be observed that the network packet that sends of application program and the application network packet that receives all can carry There is the mark of this application program, so when gateway intercepts and captures network packet, then can parse application journey in network packet The mark of sequence.
First detection sub-module 443, be configured to detect identifying whether of parsing of analyzing sub-module 442 belong to backstage should By the mark of program.
Owing to smart machine may determine that background application, it can therefore be appreciated that the mark of all background applications, Therefore the mark identifying whether to belong to this background application parsed can be detected.
It will be apparent that parse identifies some mark that may belong to background application, one of them mark is also possible to Mark for foreground application.
When the mark parsed belongs to the mark of background application, then may determine that the backstage possessing this mark Application program possesses networking behavior.
When all marks parsed are not admitted to the mark of background application, then may determine that background application is equal Do not possess networking behavior, the mark being designated foreground application now parsed, and foreground application possess networking row For.
So, each mark for parsing all can be made whether to belong to the judgement of the mark of background application.
Second detection module 450, is configured as first detection module 440 and the background application tool determined detected During standby networking behavior, whether the networking speeds detecting this background application exceedes predetermined threshold.
Here the networking speeds said can be understood as the size of the unit interval network packet by gateway, for same From the point of view of one background application is by network of network packet, smart machine can intercept these network packet and solve Analyse its size, the total size analyzing the network packet of period same background application is analyzed, according to when analyzing Between, this background application of unit of account time is by the size of the network packet of gateway.
Here the predetermined threshold said is the maximum networking speeds setting background application, the predetermined threshold said here Value all can be identical for each background application, or different.It is to say, the maximum networking of all of background application Speed is set to identical value, or, the maximum networking speeds of different background applications could be arranged to different values.
Optionally, when predetermined threshold for each background application can not simultaneously, smart machine is typically stored with respectively Corresponding relation between individual application program and predetermined threshold, in this case, the second detection module 450 may include that and determines son Module the 451, second detection sub-module 452.
Determining submodule 451, be configured to the corresponding relation according to application program Yu predetermined threshold, determining should with backstage With predetermined threshold corresponding to program.
Whether second detection sub-module 452, be configured to detect the networking speeds of background application and exceed and determine Predetermined threshold.
Interrupt module 460, is configured as the second detection module 450 and the background application possessing networking behavior detected Networking speeds when exceeding predetermined threshold, interrupt the networking behavior of this background application.
In order to ensure the networked resources of foreground application, need to interrupt taking the background application journey that networked resources is too much Sequence, therefore smart machine exceedes predetermined threshold at the networking speeds background application possessing networking behavior being detected, generally Show that this background application takies networked resources too much, the most then interrupt the networking behavior of this background application.
Optionally, interrupt module 460 may include that the second intercepting and capturing submodule 461, screening submodule 462, abandons submodule 463。
Second intercepts and captures submodule 461, is configured to intercept and capture network packet from gateway.
Screening submodule 462, is configured to filter out the network of the background application that networking speeds exceedes predetermined threshold Packet.
Abandon submodule 463, be configured to abandon the network packet filtered out, forward remaining network data intercepted and captured Bag.
Smart machine, after the network packet filtering out the background application that networking speeds exceedes predetermined threshold, can be lost Abandon the network packet filtered out, forward remaining network packet intercepted and captured.If the network packet being so dropped for The network packet of outer transmission, owing to outer net cannot receive this network packet, also will not respond to application program, therefore The networking behavior of this application program can be interrupted.
Optionally, this application program networking control device can also include: handover module 470.
Handover module 470, is configured as being interrupted the background application of networking behavior when being switched to front stage operation, Open the networking behavior of the application program switching to front stage operation.
Optionally, smart machine is switched to front stage operation at any one application program and (can be switched to foreground by backstage Run, it is also possible to for being opened into the application program of front stage operation), all can automatically start the networking behavior of this application program.
In sum, the application program networking control device that disclosure embodiment provides, by judging background application journey When the networking speeds of sequence exceedes predetermined threshold, the networking behavior that will exceed the background application of predetermined threshold is interrupted, due to can To interrupt the networking behavior of the bigger background application of network speed, therefore can ensure that the normal cluster row of foreground application For, solve the priority being interrupted in correlation technique application program that is relatively low and that have networking behavior and be subject to when needs are networked The technical problem limited;Reach to can ensure that foreground application can preferentially be networked, before the handover during platform application program, also Can guarantee that the effect of the normal cluster of the foreground application after switching.
It addition, by just further determining that background application when judgement foreground application possesses networking behavior, make The networking behavior of background application when foreground application possesses networking behavior, must be limited, it is ensured that foreground application Preferential networking.
By the network packet of intercepting and capturing gateway to determine the background application possessing networking behavior, due to all The network packet that net behavior sends is required to be sent by gateway, therefore is monitored judging exactly at gateway Backstage possesses the application program of networking behavior.
Compared with predetermined threshold by the networking speeds of background application, effectively determine that networking speeds is too fast Background application.
Exceed the background application of predetermined threshold by filtering out networking speeds and interrupt networking behavior so that taking connection The background application that net resource is many interrupts networking and ensures the networked resources of foreground application.
The networking behavior of the background application being interrupted networking behavior of front stage operation is switched to so that use by unlatching During the background application before the handover of family, networking will not be limited to, so that the networking behavior of foreground application is subject to always To ensureing.
The disclosure one exemplary embodiment provides a kind of application program networking control device, it is possible to realizing the disclosure provides Application program networking control method, this application program networking control device includes: processor, is used for storing processor and can perform The memorizer of instruction;
Wherein, processor is configured to: determine just at the background application of running background;
Whether the described background application that detection is determined possesses networking behavior;
When detecting that the described background application determined possesses networking behavior, detect described background application Whether networking speeds exceedes predetermined threshold;
If detecting, the networking speeds of the background application possessing networking behavior exceedes described predetermined threshold, then interrupt institute State the networking behavior of background application.
Fig. 5 is the block diagram according to a kind of device for controlling application program networking shown in an exemplary embodiment.Example As, device 500 can be mobile phone, computer, digital broadcast terminal, messaging devices, game console, and flat board sets Standby, armarium, body-building equipment, personal digital assistant etc..
With reference to Fig. 5, device 500 can include following one or more assembly: processes assembly 502, memorizer 504, power supply Assembly 506, multimedia groupware 508, audio-frequency assembly 510, input/output (I/O) interface 512, sensor cluster 514, Yi Jitong Letter assembly 516.
Process assembly 502 and generally control the integrated operation of device 500, such as with display, call, data communication, phase The operation that machine operation and record operation are associated.Process assembly 502 and can include that one or more processor 518 performs to refer to Order, to complete all or part of step of above-mentioned method.Additionally, process assembly 502 can include one or more module, just Mutual in process between assembly 502 and other assemblies.Such as, process assembly 502 and can include multi-media module, many to facilitate Media component 508 and process between assembly 502 mutual.
Memorizer 504 is configured to store various types of data to support the operation at device 500.Showing of these data Example includes any application program for operating on device 500 or the instruction of method, contact data, telephone book data, disappears Breath, picture, video etc..Memorizer 504 can be by any kind of volatibility or non-volatile memory device or their group Close and realize, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), erasable compile Journey read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash Device, disk or CD.
The various assemblies that power supply module 506 is device 500 provide electric power.Power supply module 506 can include power management system System, one or more power supplys, and other generate, manage and distribute, with for device 500, the assembly that electric power is associated.
The screen of one output interface of offer that multimedia groupware 508 is included between device 500 and user.Real at some Executing in example, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen can To be implemented as touch screen, to receive the input signal from user.Touch panel include one or more touch sensor with Gesture on sensing touch, slip and touch panel.Touch sensor can not only sense touch or the border of sliding action, and And also detect and touch or persistent period that slide is relevant and pressure.In certain embodiments, multimedia groupware 508 includes One front-facing camera and/or post-positioned pick-up head.When device 500 is in operator scheme, during such as screening-mode or video mode, front Put photographic head and/or post-positioned pick-up head can receive outside multi-medium data.Each front-facing camera and post-positioned pick-up head can To be a fixing optical lens system or there is focal length and optical zoom ability.
Audio-frequency assembly 510 is configured to output and/or input audio signal.Such as, audio-frequency assembly 510 includes a Mike Wind (MIC), when device 500 is in operator scheme, during such as call model, logging mode and speech recognition mode, mike is joined It is set to receive external audio signal.The audio signal received can be further stored at memorizer 504 or via communication set Part 516 sends.In certain embodiments, audio-frequency assembly 510 also includes a speaker, is used for exporting audio signal.
I/O interface 512 provides interface for processing between assembly 502 and peripheral interface module, above-mentioned peripheral interface module can To be keyboard, put striking wheel, button etc..These buttons may include but be not limited to: home button, volume button, start button and lock Set button.
Sensor cluster 514 includes one or more sensor, for providing the state of various aspects to comment for device 500 Estimate.Such as, what sensor cluster 514 can detect device 500 opens/closed mode, the relative localization of assembly, such as assembly For display and the keypad of device 500, sensor cluster 514 can also detect device 500 or the position of 500 1 assemblies of device Put change, the presence or absence that user contacts, device 500 orientation or acceleration/deceleration and the temperature of device 500 with device 500 Change.Sensor cluster 514 can include proximity transducer, is configured to when not having any physical contact near detection The existence of object.Sensor cluster 514 can also include optical sensor, and such as CMOS or ccd image sensor, being used for should in imaging Use middle use.In certain embodiments, this sensor cluster 514 can also include acceleration transducer, gyro sensor, magnetic Sensor, pressure transducer or temperature sensor.
Communications component 516 is configured to facilitate the communication of wired or wireless mode between device 500 and other equipment.Device 500 can access wireless network based on communication standard, such as Wi-Fi, 2G or 3G, or combinations thereof.An exemplary reality Executing in example, communications component 516 receives the broadcast singal from external broadcasting management system or the relevant letter of broadcast via broadcast channel Breath.In one exemplary embodiment, communications component 516 also includes near-field communication (NFC) module, to promote junction service.Example As, can be based on RF identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, Bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 500 can be by one or more application specific integrated circuits (ASIC), numeral letter Number processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components realize, be used for performing the networking control of above-mentioned application program Method processed.
In the exemplary embodiment, a kind of non-transitory computer-readable recording medium including instruction, example are additionally provided As included the memorizer 504 of instruction, above-mentioned instruction can have been performed above-mentioned application program connection by the processor 518 of device 500 Network control method.Such as, non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD- ROM, tape, floppy disk and optical data storage devices etc..
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to its of the disclosure Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modification, purposes or Person's adaptations is followed the general principle of the disclosure and includes the undocumented common knowledge in the art of the disclosure Or conventional techniques means.Description and embodiments is considered only as exemplary, and the true scope of the disclosure and spirit are by following Claim is pointed out.
It should be appreciated that the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and And various modifications and changes can carried out without departing from the scope.The scope of the present disclosure is only limited by appended claim.

Claims (13)

1. an application program networking control method, it is characterised in that described method includes:
Determine just at the background application of running background;
Whether the described background application that detection is determined possesses networking behavior;
When detecting that the described background application determined possesses networking behavior, detect the networking of described background application Whether speed exceedes predetermined threshold;
If detecting, the networking speeds of the background application possessing networking behavior exceedes described predetermined threshold, then interrupt described after The networking behavior of platform application program.
Method the most according to claim 1, it is characterised in that described method also includes:
Determine just at the foreground application of front stage operation;
Detect whether described foreground application possesses networking behavior;
When described foreground application possesses networking behavior, determine described in execution just at the background application of running background Step.
Method the most according to claim 1, it is characterised in that whether the described background application that described detection is determined Possess networking behavior, including:
Network packet is intercepted and captured from gateway;
The mark of application program is parsed from described network packet;
Detect the mark identifying whether to belong to described background application described in parsing.
Method the most according to claim 1, it is characterised in that the networking speeds of the described background application of described detection is No exceed predetermined threshold, including:
According to the corresponding relation of application program Yu predetermined threshold, determine corresponding with the described background application determined pre- Determine threshold value;
Detect the networking speeds of described background application whether exceed described in the predetermined threshold determined.
Method the most according to claim 1, it is characterised in that the networking behavior of the described background application of described interruption, Including:
Network packet is intercepted and captured from gateway;
Filter out the network packet that networking speeds exceedes the background application of described predetermined threshold;
The network packet filtered out described in abandoning, forwards remaining network packet intercepted and captured.
6. according to described method arbitrary in claim 1 to 5, it is characterised in that described method also includes:
When the background application being interrupted networking behavior is switched to front stage operation, described in unlatching, switch to front stage operation The networking behavior of application program.
7. an application program networking control device, it is characterised in that described device includes:
First determines module, is configured to determine that out just at the background application of running background;
First detection module, is configured to detect described first and determines whether the described background application that module is determined possesses Networking behavior;
Second detection module, is configured as described first detection module and detects that the described background application determined possesses During networking behavior, whether the networking speeds detecting described background application exceedes predetermined threshold;
Interrupt module, is configured as described second detection module and the networking of the background application possessing networking behavior detected When speed exceedes described predetermined threshold, interrupt the networking behavior of described background application.
Device the most according to claim 7, it is characterised in that described device also includes:
Second determines module, is configured to determine that out just at the foreground application of front stage operation;
3rd detection module, is configured to detect whether described foreground application possesses networking behavior;
Described first determines module, is additionally configured to detect that described foreground application possesses connection at described 3rd detection module During net behavior, determine just at the background application of running background.
Device the most according to claim 7, it is characterised in that described first detection module, including:
First intercepts and captures submodule, is configured to intercept and capture network packet from gateway;
Analyzing sub-module, is configured to intercept and capture the described network packet that submodule intercepts from described first parse application The mark of program;
First detection sub-module, be configured to detect described analyzing sub-module parse described in identify whether to belong to described backstage The mark of application program.
Device the most according to claim 7, it is characterised in that described second detection module, including:
Determine submodule, be configured to the corresponding relation according to application program Yu predetermined threshold, determine and determine with described The predetermined threshold that background application is corresponding;
Second detection sub-module, be configured to detect the networking speeds of described background application whether exceed described in determine Predetermined threshold.
11. devices according to claim 7, it is characterised in that described interrupt module, including:
Second intercepts and captures submodule, is configured to intercept and capture network packet from gateway;
Screening submodule, is configured to filter out the network data of the background application that networking speeds exceedes described predetermined threshold Bag;
Abandon submodule, be configured to the network packet filtered out described in abandoning, forward remaining network packet intercepted and captured.
12. according to described device arbitrary in claim 7 to 11, it is characterised in that described device also includes:
Handover module, is configured as being interrupted the background application of networking behavior when being switched to front stage operation, opens institute State the networking behavior of the application program switching to front stage operation.
13. 1 kinds of application program networking control devices, it is characterised in that described device includes:
Processor;
For storing the memorizer of described processor executable;
Wherein, described processor is configured to:
Determine just at the background application of running background;
Whether the described background application that detection is determined possesses networking behavior;
When detecting that the described background application determined possesses networking behavior, detect the networking of described background application Whether speed exceedes predetermined threshold;
If detecting, the networking speeds of the background application possessing networking behavior exceedes described predetermined threshold, then interrupt described after The networking behavior of platform application program.
CN201610390500.XA 2016-06-03 2016-06-03 Application program networking control method and device Pending CN106095547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610390500.XA CN106095547A (en) 2016-06-03 2016-06-03 Application program networking control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610390500.XA CN106095547A (en) 2016-06-03 2016-06-03 Application program networking control method and device

Publications (1)

Publication Number Publication Date
CN106095547A true CN106095547A (en) 2016-11-09

Family

ID=57448145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610390500.XA Pending CN106095547A (en) 2016-06-03 2016-06-03 Application program networking control method and device

Country Status (1)

Country Link
CN (1) CN106095547A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775988A (en) * 2016-12-30 2017-05-31 广东欧珀移动通信有限公司 A kind of data processing method and equipment
CN106792892A (en) * 2016-11-23 2017-05-31 北京小米移动软件有限公司 The access control method and device of application program
CN107205084A (en) * 2017-05-11 2017-09-26 北京小米移动软件有限公司 Network speed processing method, device and the terminal of application program
CN107689958A (en) * 2017-09-03 2018-02-13 中国南方电网有限责任公司 A kind of network audit subsystem applied to cloud auditing system
CN107770092A (en) * 2017-11-06 2018-03-06 珠海市魅族科技有限公司 A kind of data transmission method, device, mobile terminal and storage medium
CN108401259A (en) * 2017-02-07 2018-08-14 蔡伟英 A kind of mobile terminal multi-mode formula internet access method and system
WO2019128540A1 (en) * 2017-12-29 2019-07-04 Oppo广东移动通信有限公司 Resource management method, mobile terminal and computer readable storage medium
CN110018888A (en) * 2018-01-10 2019-07-16 广东欧珀移动通信有限公司 Method for managing resource, device, mobile terminal and computer readable storage medium
CN111970675A (en) * 2020-08-10 2020-11-20 浙江每日互动网络科技股份有限公司 Early warning method and device and storage medium
CN112564939A (en) * 2020-11-11 2021-03-26 深圳市友华通信技术有限公司 Gateway control method, computer device, and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135561A (en) * 2013-07-08 2014-11-05 腾讯科技(深圳)有限公司 Method and device of reminding user of flow of terminal as well as terminal
CN105607979A (en) * 2015-12-18 2016-05-25 小米科技有限责任公司 Network interconnection control method and device
CN105635447A (en) * 2015-12-22 2016-06-01 安徽一拓通信科技集团股份有限公司 Method for preventing background flow loss of application program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135561A (en) * 2013-07-08 2014-11-05 腾讯科技(深圳)有限公司 Method and device of reminding user of flow of terminal as well as terminal
CN105607979A (en) * 2015-12-18 2016-05-25 小米科技有限责任公司 Network interconnection control method and device
CN105635447A (en) * 2015-12-22 2016-06-01 安徽一拓通信科技集团股份有限公司 Method for preventing background flow loss of application program

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106792892A (en) * 2016-11-23 2017-05-31 北京小米移动软件有限公司 The access control method and device of application program
CN106792892B (en) * 2016-11-23 2020-03-17 北京小米移动软件有限公司 Access control method and device for application program
CN106775988A (en) * 2016-12-30 2017-05-31 广东欧珀移动通信有限公司 A kind of data processing method and equipment
CN108401259A (en) * 2017-02-07 2018-08-14 蔡伟英 A kind of mobile terminal multi-mode formula internet access method and system
CN107205084A (en) * 2017-05-11 2017-09-26 北京小米移动软件有限公司 Network speed processing method, device and the terminal of application program
CN107689958A (en) * 2017-09-03 2018-02-13 中国南方电网有限责任公司 A kind of network audit subsystem applied to cloud auditing system
CN107770092A (en) * 2017-11-06 2018-03-06 珠海市魅族科技有限公司 A kind of data transmission method, device, mobile terminal and storage medium
WO2019128540A1 (en) * 2017-12-29 2019-07-04 Oppo广东移动通信有限公司 Resource management method, mobile terminal and computer readable storage medium
CN110018888A (en) * 2018-01-10 2019-07-16 广东欧珀移动通信有限公司 Method for managing resource, device, mobile terminal and computer readable storage medium
CN111970675A (en) * 2020-08-10 2020-11-20 浙江每日互动网络科技股份有限公司 Early warning method and device and storage medium
CN112564939A (en) * 2020-11-11 2021-03-26 深圳市友华通信技术有限公司 Gateway control method, computer device, and storage medium
CN112564939B (en) * 2020-11-11 2023-06-06 深圳市友华通信技术有限公司 Gateway control method, computer device, and storage medium

Similar Documents

Publication Publication Date Title
CN106095547A (en) Application program networking control method and device
CN105182784A (en) Method and device of controlling intelligent devices and terminal
CN104933170A (en) Information exhibition method and device
CN106487584A (en) The management method of router, router and mobile terminal
CN106792953A (en) The method and apparatus of network switching
CN105472303A (en) Privacy protection method and apparatus for video chatting
CN104717554A (en) Smart television control method and device and electronic equipment
CN106231640A (en) Wireless access point switching method and device
CN106201296A (en) Realize the method and device of false-touch prevention
CN107204883A (en) Network failure processing method and device
CN106413011A (en) Network switching method and device
CN104899501A (en) Dialog list display method and device and terminal
CN106462378A (en) Display method, apparatus and automobile data recorder
CN106899869A (en) Adjust method, the apparatus and system of volume of electronic device
CN106487996A (en) The emergency communication method of intelligent terminal and device
CN110249655A (en) Error reason report method and device
CN106462698A (en) Authority control method and authority control device
CN106572010A (en) Data package grabbing method and device, and terminal
CN104333641B (en) Call method and device
CN108280011A (en) Daily record grasping means and device
CN106034323A (en) Wireless-terminal-based automatic recovery method and relevant apparatus for data connection
CN104780574A (en) Method and device for network switchover
CN106231072A (en) The control method of prompting message, device and terminal unit
CN106201250A (en) Account changing method and device
CN106406659A (en) Double-open application establishing method and device

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: 20161109