CN106559546A - Method and apparatus of the control software using network internet - Google Patents

Method and apparatus of the control software using network internet Download PDF

Info

Publication number
CN106559546A
CN106559546A CN201510629637.1A CN201510629637A CN106559546A CN 106559546 A CN106559546 A CN 106559546A CN 201510629637 A CN201510629637 A CN 201510629637A CN 106559546 A CN106559546 A CN 106559546A
Authority
CN
China
Prior art keywords
backstage
software
taboo
strategy
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510629637.1A
Other languages
Chinese (zh)
Other versions
CN106559546B (en
Inventor
徐雄威
杨朗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510629637.1A priority Critical patent/CN106559546B/en
Publication of CN106559546A publication Critical patent/CN106559546A/en
Application granted granted Critical
Publication of CN106559546B publication Critical patent/CN106559546B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72463User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions to restrict the functionality of the device

Abstract

The present invention relates to a kind of method and apparatus of control software using network internet.The method comprising the steps of:Obtain the trigger action for prohibiting backstage setting to selected software;By the software and corresponding taboo backstage strategy generating command script;The command script is performed, the taboo backstage configuration strategy of the software is obtained;Detect the current operating conditions of the software;Network internet is carried out according to the taboo backstage configuration strategy of the software according to the current operating conditions of the software.Method and apparatus of the above-mentioned control software using network internet, by software and corresponding taboo backstage strategy generating command script, the taboo backstage configuration strategy of software has been obtained after performing command script, after inspection software current operating conditions, network internet is carried out according to the taboo backstage configuration strategy of software, running software is realized and cannot be networked at backstage, network internet can be normally used at foreground, avoiding software causes flow to waste using network on backstage, saves network traffics.

Description

Method and apparatus of the control software using network internet
Technical field
The present invention relates to network control field, method of more particularly to a kind of control software using network internet And device.
Background technology
With the popularization of mobile terminal and the Internet, increasing user gets used to installing on mobile terminals Various softwares, and network is connected by running software, and network is accessed, need to consume substantial amounts of net Network flow.Regular software is required for consumption network flow when operating in foreground and backstage, wherein, software is rear Platform refers to software without the view with user mutual, and software refers to the software or logical that user is currently in use on foreground Know that there is the view with user mutual on hurdle etc..
Traditional mode can only allow software overall network to network, if allowing software overall network to network, i.e., Allow software all use network internet on foreground and backstage, when exit the software or by software exchange to backstage after, Software continues consumption network flow on backstage, can cause the waste of larger network traffics.
The content of the invention
Based on this, it is necessary to software overall network can only be allowed to network for traditional software networking control, be made Into the problem that flow is wasted, there is provided a kind of control software ensure that software on foreground using the method for network When use network internet, forbid software to use network internet on backstage, it is to avoid software causes stream at backstage Amount is wasted, and saves network traffics.
Additionally, there is a need to the device for providing that a kind of control software uses network, ensure that software on foreground When use network internet, forbid software to use network internet on backstage, it is to avoid software causes stream at backstage Amount is wasted, and saves network traffics.
A kind of control software is comprised the following steps using the method for network internet:
Obtain the trigger action for prohibiting backstage setting to selected software;
According to the trigger action by the selected software and corresponding taboo backstage strategy generating command script;
The command script is performed, the taboo backstage configuration strategy of the software is obtained;
Detect the current operating conditions of the software;
Network connection is carried out according to the taboo backstage configuration strategy of the software according to the current operating conditions of the software Net.
A kind of device of control software using network internet, including:
Operation acquisition module, for obtaining the trigger action for prohibiting backstage setting to selected software;
Generation module, for according to the trigger action will the selected software and corresponding taboo backstage strategy Generate command script;
Performing module, for performing the command script, obtains the taboo backstage configuration strategy of the software;
State detection module, for detecting the current operating conditions of the software;
Networking module, configures according to the taboo backstage of the software for the current operating conditions according to the software Strategy carries out network internet.
Method and apparatus of the above-mentioned control software using network internet, will be software and corresponding taboo backstage strategy raw Into command script, the taboo backstage configuration strategy of software after performing command script, is obtained, inspection software is currently transported After row state, network internet is carried out according to the taboo backstage configuration strategy of software, running software is realized on backstage Shi Wufa is networked, network internet can be normally used at foreground, it is to avoid software uses network on backstage Cause flow to waste, save network traffics.
Description of the drawings
Fig. 1 is the internal structure schematic diagram of terminal in one embodiment;
The flow chart that Fig. 2 uses the method for network internet for control software in one embodiment;
Fig. 3 is flow detailed schematic diagram in one embodiment;
Fig. 4 is the detail flowchart of the method that control software uses network internet in another embodiment;
Fig. 5 uses the structured flowchart of the device of network internet for control software in one embodiment;
Fig. 6 is the structured flowchart of the device that control software uses network internet in another embodiment;
Fig. 7 is the structured flowchart of the device that control software uses network internet in another embodiment.
Specific embodiment
In order that the objects, technical solutions and advantages of the present invention become more apparent, below in conjunction with accompanying drawing and reality Example is applied, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only Only to explain the present invention, it is not intended to limit the present invention.
Fig. 1 is the internal structure schematic diagram of terminal in one embodiment.As shown in figure 1, the terminal includes passing through Processor, storage medium, internal memory, network interface, display screen and input equipment that system bus connects.Its In, the storage medium of terminal is stored with operating system, also including a kind of control software using network internet dress Put, the control software is used to realize the side that a kind of control software uses network internet using the device of network internet Method.The processor is used to provide calculating and control ability, supports the operation of whole terminal.Internal memory in terminal Environment is provided using the operation of the device of network internet for the control software in storage medium, network interface is used for Network service is carried out with server, data that request of data is returned to server, the reception server etc. are such as sent. The display screen of terminal can be LCDs or electric ink display screen etc., and input equipment can be shown The touch layer covered on screen, or the button arranged in terminal enclosure, trace ball or Trackpad, also may be used Being external keyboard, Trackpad or mouse etc..The terminal can be mobile phone, panel computer or individual number Word assistant.It will be understood by those skilled in the art that the structure illustrated in Fig. 1, only with application scheme phase The block diagram of the part-structure of pass, does not constitute the restriction of the terminal being applied thereon to application scheme, tool The terminal of body can be included than more or less of part shown in figure, or combine some parts, or tool There are different part arrangements.
The flow chart that Fig. 2 uses the method for network internet for control software in one embodiment.As shown in Fig. 2 A kind of control software is comprised the following steps using the method for network internet:
Step 202, obtains the trigger action for prohibiting backstage setting to selected software.
Specifically, runs software house keeper application program on mobile terminals, can in software house keeper's application program View and various softwares on mobile terminals and systems soft ware etc. are installed.In software house keeper's application program it is Software is provided to be prohibited backstage, forbids, allows three kinds of settings.Prohibit backstage setting and refer to that software is allowed at foreground Using network internet, do not allow to use network internet at backstage.Setting is forbidden to refer to software on foreground with after Platform does not allow to use network internet.Setting is allowed to refer to that software can all use network internet on foreground and backstage. Obtain the trigger action of prohibiting backstage setting of the user to selected software.Can be by carrying out a little to prohibiting backstage setting Hit or the mode such as touch-control produces trigger action.
Fig. 3 is flow detailed schematic diagram in one embodiment.As shown in figure 3, counting in flow details Universal flow, inside the province flow bag and domestic flow bag data, and control there is provided internet software, on software Three kinds of set-up modes are provided in network control system, that is, is prohibited backstage, is forbidden, allows.It is provided which after each software Three kinds of set-up modes, flow-control that user can be as needed to each software are configured.For example, apply Program A, application program B, application program C and application program D, wherein, click on setting for application program A Putting appearance allows, prohibits backstage and forbid three kinds of modes, can select to prohibit backstage, to forbid application program A to exist Backstage uses network internet, it is allowed to which application program A uses network internet on foreground.Application program C is set Taboo backstage is set to, and application program D is arranged to allow (allowing network internet to be used on foreground and backstage). Additionally, the total amount value and residual stream value of universal flow is also recorded in flow details;Domestic flow and inside the province The total amount value and residual stream value of flow, the total amount value of night special flow and residual stream value.
Step 204, according to the trigger action by selected software and corresponding taboo backstage strategy generating order foot This.
Specifically, taboo backstage strategy is referred to and forbids to software design patterns software backstage to use network internet or allow soft Part backstage uses network internet.Taboo backstage strategy in the present embodiment is to forbid software backstage to use network internet, Software foreground is allowed to use network internet.The command forms of the command script of generation may include order prefix, net Network strategy calls service, software identification, prohibits backstage strategy.The command forms of such as command script are:service call netpolicy 1 i32 10093 i32 0.Wherein, service call are order prefix;Netpolicy represents net Network strategy calls service, and 1 represents the method for calling networkpolicymanagerservice, i.e. setUidPolicy Method, is to specify specifically used method;First i32 represents the Uid (mark) of software, and 100093 are For the Uid of software;Second i32 represents that the taboo backstage of the setting of the Uid to software is tactful, second i32 Numeral afterwards, 0 expression software can use network internet, 1 expression to forbid software to use net on backstage on backstage Network is networked, and is that 1 expression forbids software to use network internet on backstage herein.
Network can be mobile network, WiFi network etc., and preferred network is mobile network.Mobile network can wrap Include the mobile data transfer network such as 2G, 3G, 4G, but not limited to this.
Step 206, performs the command script, obtains the taboo backstage configuration strategy of the software.
Specifically, call network strategy management service perform the command script carry out prohibit backstage arrange obtain software Taboo backstage configuration strategy.In the present embodiment, by arranging application strategy interface interchange network strategy management clothes Business arranges the taboo backstage configuration strategy for prohibiting that backstage obtains software.Taboo backstage configuration strategy is referred to forbids backstage to use Network internet.
Step 208, detects the current operating conditions of the software.
Specifically, software current operating conditions can be to operate in foreground or on backstage.Software refers to use on foreground Software that family is currently in use or informing etc. have the view with user mutual.On backstage, software refers to that software does not have With the view of user mutual.
Step 210, carries out net according to the taboo backstage configuration strategy of the software according to the current operating conditions of the software Network is networked.
Specifically, when running software is on foreground, according to the taboo backstage configuration strategy of software, net can be carried out Network is networked.When running software is on backstage, according to the taboo backstage configuration strategy of software, software cannot use net Network is networked.
Method of the above-mentioned control software using network internet, by software and corresponding taboo backstage strategy generating order Script, has obtained the taboo backstage configuration strategy of software, inspection software current operating conditions after performing command script Afterwards, network internet is carried out according to the taboo backstage configuration strategy of software, realizing running software cannot at backstage Networked, network internet can be normally used at foreground, it is to avoid software is caused stream using network on backstage Amount is wasted, and saves network traffics.
Fig. 4 is the detail flowchart of the method that control software uses network internet in another embodiment.Such as Fig. 4 Shown, a kind of control software is comprised the following steps using the method for network internet:
Step 402, detection operating system arrange function with the presence or absence of backstage is prohibited, if so, then execution step 404, If it is not, then arranging without taboo backstage.
Specifically, detect that operating system arranges function with the presence or absence of backstage is prohibited, can be using detection operating system Version whether be more than or equal to indicated release, if so, then exist and prohibit backstage function is set, if it is not, then not Exist and prohibit backstage setting function.Prohibit after backstage setting function, thereafter because certain version of operating system is present Version typically has identical function.For example there is taboo backstage that function is set in Android4.0, then version thereafter Originally it is respectively provided with taboo backstage and function is set.
Step 404, shows that prohibiting backstage is arranged.
Specifically, show the taboo backstage of software on a user interface, forbid, allow three kinds of settings.Prohibit backstage Setting refers to that software allows to use network internet at foreground, does not allow to use network internet at backstage.Prohibit Only arrange and refer to that software does not allow to use network internet on foreground and backstage.Setting is allowed to refer to software front Platform and backstage can all use network internet.
Step 406, obtains the trigger action for prohibiting backstage setting to selected software.
Specifically, obtain the trigger action of prohibiting backstage setting of the user to selected software.Can be after to taboo Platform is arranged to be clicked on or the mode such as touch-control produces trigger action.
Step 408, has detected whether super administration authority, if so, then execution step 410, if it is not, performing Step 412.
Specifically, authority of the super administration authority equivalent to operating system, has systematic all permissions.Cause Using service call command calls be android system networkPolicyManagerService in Service, the service are the services that a system is hidden, it is therefore desirable to have Root authority (i.e. super administration authority).
Step 410, according to the trigger action by the selected software and corresponding taboo backstage strategy generating order foot This, then execution step 414.
Specifically, taboo backstage strategy is referred to and forbids to software design patterns software backstage to use network internet or allow soft Part backstage uses network internet.Taboo backstage strategy in the present embodiment is to forbid software backstage to use network internet. The command forms of the command script of generation may include order prefix, network strategy call service, software identification, Prohibit backstage strategy.The command forms of such as command script are:service call netpolicy 1 i32 10093 i32 1. Wherein, service call are order prefix;Netpolicy represents that network strategy calls service, 1 expression to call The method of networkpolicymanagerservice, i.e. setUidPolicy methods, are to specify specifically used Method;First i32 represents the Uid (mark) of software, and 100093 are the Uid of software;Second i32 Represent the taboo backstage strategy of the setting to the Uid of software, the numeral after second i32,0 represents that software can be with Use network internet, 1 expression to forbid software network internet to be used on backstage on backstage, be that 1 expression is forbidden herein Software uses network internet on backstage.
Step 412, output obtain the guidance information of super administration authority.
Specifically, guidance information is referred to for guiding user to arrange software management application program so as to had Super administration authority.
Step 414, performs the command script, obtains the taboo backstage configuration strategy of the software.
Specifically, call network strategy management service perform the command script carry out prohibit backstage arrange obtain software Taboo backstage configuration strategy.In the present embodiment, by setUidPolicy (setting application strategy) interface interchange Network strategy management service arranges the taboo backstage configuration strategy for prohibiting that backstage obtains software.Prohibiting backstage configuration strategy is Finger forbids backstage to use network internet.
Step 416, detects the current operating conditions of the software.
Specifically, software current operating conditions can be to operate in foreground or on backstage.Software refers to use on foreground Software that family is currently in use or informing etc. have the view with user mutual.On backstage, software refers to that software does not have With the view of user mutual.
Step 418, carries out net according to the taboo backstage configuration strategy of the software according to the current operating conditions of the software Network is networked.
Specifically, when running software is on foreground, according to the taboo backstage configuration strategy of software, net can be carried out Network is networked.When running software is on backstage, according to the taboo backstage configuration strategy of software, software cannot use net Network is networked.
Method of the above-mentioned control software using network internet, by detecting that operating system is set with the presence or absence of backstage is prohibited Put function, it is ensured that there is taboo backstage and function is set, be just configured, and surpass by detecting whether to have Level administration authority, using rights management can effective control prohibit backstage arrange authority, improve safety, will be soft Part and corresponding taboo backstage strategy generating command script, the taboo backstage that software has been obtained after performing command script are matched somebody with somebody Strategy is put, after inspection software current operating conditions, network internet is carried out according to the taboo backstage configuration strategy of software, Realize running software to be networked at backstage, network internet can be normally used at foreground, it is to avoid Software causes flow to waste using network on backstage, saves network traffics.
In one embodiment, call the network strategy management service execution command script to carry out taboo backstage to set Put and obtain the taboo backstage configuration strategy step of the software and include:Prohibit in obtaining the command script in the strategy of backstage The taboo background class offset of setting, is calculated the taboo backstage configuration strategy of the software according to the taboo background class offset.
Specifically, by setUidPolicy interface interchange NetworkPolicyManagerService (i.e. networks Tactical management is serviced) arrange and prohibit consistency operation.In order to ensure that software house keeper application program prohibits backstage, state is set It is consistent with system, using the MyNetworkPolicyManager classes defined in software house keeper's application program come The order for prohibiting consistency operation is generated, and the taboo background state of synchronizing software house keeper's application program is to after system taboo Platform is arranged.It can be the first value or second value to prohibit background class offset, and the first value is represented allows backstage to join using network Net.Second value is represented forbids backstage to use network internet.Such as first value can be 0, and second value can be 1, or The value of person first can be 1, and second value can be 0 etc..
Further, above-mentioned control software is also included using the method for network internet:The taboo backstage of the software is matched somebody with somebody Put strategy write caching;The taboo backstage configuration strategy of the software in caching is updated to system convention and is concentrated; The taboo backstage configuration strategy that the system convention is concentrated by finger daemon is called to update in kernel setup.
Specifically, by setUidPolicyUnchecked () in NetworkPolicyManagerService The old policy data for prohibiting backstage is obtained, and new taboo backstage strategy is added into caching.Detectable new configuration plan It is slightly whether identical with current configuration strategy, if identical, it is not required to update, if it is different, then matching somebody with somebody using new Put the current configuration strategy of policy replacement.
After updateRulesForUidLocked will be according to taboo in the NetworkPolicyManagerService Platform types value calculates specific taboo backstage configuration strategy, by new taboo backstage configuration strategy write caching.
By setUidNetworkRules in NetworkPolicyManagerService by the software in caching Taboo backstage configuration strategy update to system convention concentration.
Realize that interface INetworkManagementService will be soft by NetworkManagementService The service for prohibiting backstage configuration strategy write kernel of part, and matched somebody with somebody by setUidNetworkRules setting taboos backstage Put tactful in android system.
Prohibit backstage configuration strategy to kernel by calling Network Daemon finger daemons to update in native layers In configuration.Configuration that Network Daemon finger daemons are responsible for being related to network with some, operation, management, The related functional realiey such as inquiry, such as bandwidth control (Bandwidth), traffic statistics, network address translation, Shared verification, configuration routing table, interface configuration managements etc..
The user interface that finger daemon is provided by linux kernels such as netlink, Virtual File Systems, with kernel Communication or direct-execution system module, management network related part.
Additionally, can call NativeDaemonConnector's in NetworkManagementService Execute methods, perform the order for prohibiting backstage, using the bandwidth control command of NativeDaemon " bandwidth " realizes allowing still to forbid surfing the Net using above-mentioned, and command forms are:bandwidth Addnaughtyapps 10019, wherein, " bandwidth " is control command, " addnaughtyapps " table Show command type, it is allowed to authorize background access network, 10019 is the Uid (mark) of software.Final order It is that order is write by linux kernel execution by Socket.
Fig. 5 uses the structured flowchart of the device of network internet for control software in one embodiment.Such as Fig. 5 institutes Show, a kind of control software using network internet device, including operation acquisition module 502, generation module 504, Performing module 506, state detection module 508 and networking module 510.Wherein:
Operation acquisition module 502 is used to obtain the trigger action for prohibiting backstage setting to selected software.
Specifically, runs software house keeper application program on mobile terminals, can in software house keeper's application program View and various softwares on mobile terminals and systems soft ware etc. are installed.In software house keeper's application program it is Software is provided to be prohibited backstage, forbids, allows three kinds of settings.Prohibit backstage setting and refer to that software is allowed at foreground Using network internet, do not allow to use network internet at backstage.Setting is forbidden to refer to software on foreground with after Platform does not allow to use network internet.Setting is allowed to refer to that software can all use network internet on foreground and backstage. Obtain the trigger action of prohibiting backstage setting of the user to selected software.Can be by carrying out a little to prohibiting backstage setting Hit or the mode such as touch-control produces trigger action.
Generation module 504 for according to the trigger action will the selected software and corresponding taboo backstage strategy it is raw Into command script.
Specifically, taboo backstage strategy is referred to and forbids to software design patterns software backstage to use network internet or allow soft Part backstage uses network internet.Taboo backstage strategy in the present embodiment is to forbid software backstage to use network internet. The command forms of the command script of generation may include order prefix, network strategy call service, software identification, Prohibit backstage strategy.The command forms of such as command script are:service call netpolicy 1 i32 10093 i32 0. Wherein, service call are order prefix;Netpolicy represents that network strategy calls service, 1 expression to call The method of networkpolicymanagerservice, i.e. setUidPolicy methods, are to specify specifically used Method;First i32 represents the Uid (mark) of software, and 100093 are the Uid of software;Second i32 Represent the taboo backstage strategy of the setting to the Uid of software, the numeral after second i32,0 represents that software can be with Use network internet, 1 expression to forbid software network internet to be used on backstage on backstage, be that 1 expression is forbidden herein Software uses network internet on backstage.
Network can be mobile network, WiFi network etc., and preferred network is mobile network.Mobile network can wrap Include the mobile data transfer network such as 2G, 3G, 4G, but not limited to this.
Performing module 506 is used to perform the command script, obtains the taboo backstage configuration strategy of the software.
Specifically, call network strategy management service perform the command script carry out prohibit backstage arrange obtain software Taboo backstage configuration strategy.In the present embodiment, by arranging application strategy interface interchange network strategy management clothes Business arranges the taboo backstage configuration strategy for prohibiting that backstage obtains software.Taboo backstage configuration strategy is referred to forbids backstage to use Network internet.
State detection module 508 is used for the current operating conditions for detecting the software.
Specifically, software current operating conditions can be to operate in foreground or on backstage.Software refers to use on foreground Software that family is currently in use or informing etc. have the view with user mutual.On backstage, software refers to that software does not have With the view of user mutual.
Networking module 510 configures plan according to the taboo backstage of the software for the current operating conditions according to the software Network internet is carried out slightly.
Specifically, when running software is on foreground, according to the taboo backstage configuration strategy of software, net can be carried out Network is networked.When running software is on backstage, according to the taboo backstage configuration strategy of software, software cannot use net Network is networked.
Device of the above-mentioned control software using network internet, by software and corresponding taboo backstage strategy generating order Script, has obtained the taboo backstage configuration strategy of software, inspection software current operating conditions after performing command script Afterwards, network internet is carried out according to the taboo backstage configuration strategy of software, realizing running software cannot at backstage Networked, network internet can be normally used at foreground, it is to avoid software is caused stream using network on backstage Amount is wasted, and saves network traffics.
Fig. 6 is the structured flowchart of the device that control software uses network internet in another embodiment.Such as Fig. 6 It is shown, a kind of device of control software using network internet, including operation acquisition module 502, generation module 504th, performing module 506, state detection module 508 and networking module 510, also including system detectio module 512nd, authority detection module 514 and output module 516.Wherein:
Before system detectio module 512 is for the trigger action for prohibiting backstage setting in acquisition to selected software, Detection operating system arranges function with the presence or absence of backstage is prohibited, and if so, then shows that prohibiting backstage is arranged, if it is not, then Arrange without backstage is prohibited.
Specifically, show the taboo backstage of software on a user interface, forbid, allow three kinds of settings.Prohibit backstage Setting refers to that software allows to use network internet at foreground, does not allow to use network internet at backstage.Prohibit Only arrange and refer to that software does not allow to use network internet on foreground and backstage.Setting is allowed to refer to software front Platform and backstage can all use network internet.
Operation acquisition module 502 is used to obtain the trigger action for prohibiting backstage setting to selected software.
After authority detection module 514 is for the trigger action for prohibiting backstage setting in acquisition to selected software, Super administration authority is detected whether.
Specifically, detect that operating system arranges function with the presence or absence of backstage is prohibited, can be using detection operating system Version whether be more than or equal to indicated release, if so, then exist and prohibit backstage function is set, if it is not, then not Exist and prohibit backstage setting function.Prohibit after backstage setting function, thereafter because certain version of operating system is present Version typically has identical function.For example there is taboo backstage that function is set in Android4.0, then version thereafter Originally it is respectively provided with taboo backstage and function is set.
When the generation module 504 is additionally operable to detect super administration authority, according to the trigger action by the institute The software of choosing and corresponding taboo backstage strategy generating command script.
When output module 516 is used to detect no super administration authority, output obtains super administration authority Guidance information.
Device of the above-mentioned control software using network internet, by detecting that operating system is set with the presence or absence of backstage is prohibited Put function, it is ensured that there is taboo backstage and function is set, be just configured, and surpass by detecting whether to have Level administration authority, using rights management can effective control prohibit backstage arrange authority, improve safety, will be soft Part and corresponding taboo backstage strategy generating command script, the taboo backstage that software has been obtained after performing command script are matched somebody with somebody Strategy is put, after inspection software current operating conditions, network internet is carried out according to the taboo backstage configuration strategy of software, Realize running software to be networked at backstage, network internet can be normally used at foreground, it is to avoid Software causes flow to waste using network on backstage, saves network traffics.
In one embodiment, performing module 506 is additionally operable to call network strategy management service to perform the order Script carries out prohibiting the taboo backstage configuration strategy that backstage setting obtains the software.
Specifically, after the taboo that performing module 506 is set in prohibiting backstage strategy in being additionally operable to obtain the command script Platform types value, is calculated the taboo backstage configuration strategy of the software according to the taboo background class offset.
Specifically, by setUidPolicy interface interchange NetworkPolicyManagerService (i.e. networks Tactical management is serviced) arrange and prohibit consistency operation.By in NetworkPolicyManagerService UpdateRulesForUidLocked will calculate specific taboo backstage configuration strategy according to background class offset is prohibited, will New taboo backstage configuration strategy write caching.
Additionally, it is consistent with system in order to ensure software house keeper application program taboo backstage setting state, using soft MyNetworkPolicyManager classes defined in part house keeper's application program prohibit the life of consistency operation to generate Order, and the taboo background state of synchronizing software house keeper's application program is to the backstage setting of system taboo.Prohibit background type Value can be the first value or second value, and the first value is represented allows backstage to use network internet.Second value is represented forbids Backstage uses network internet.Such as first value can be 0, and it can be 1 that second value can be the 1, or first value, the Two-value can be 0 etc..
Fig. 7 is the structured flowchart of the device that control software uses network internet in another embodiment.Such as Fig. 7 It is shown, device of a kind of control software using network internet, except including operation acquisition module 502, generating mould Block 504, performing module 506, state detection module 508, networking module 510, system detectio module 512, Authority detection module 514 and output module 516, also including writing module 518, update module 520 and change Module 522.Wherein:
Writing module 518 is cached for the taboo backstage configuration strategy of the software is write.
Specifically, by setUidPolicyUnchecked () in NetworkPolicyManagerService The old policy data for prohibiting backstage is obtained, and new taboo backstage strategy is added into caching.Detectable new configuration plan It is slightly whether identical with current configuration strategy, if identical, it is not required to update, if it is different, then matching somebody with somebody using new Put the current configuration strategy of policy replacement.
Update module 520 arrives system convention collection for the taboo backstage configuration strategy of the software in caching is updated In.By setUidNetworkRules in NetworkPolicyManagerService by the software in caching Taboo backstage configuration strategy update to system convention concentration.
The taboo backstage configuration strategy that change module 522 is used to call finger daemon to concentrate the system convention updates To in kernel setup.
Prohibit backstage configuration strategy to kernel by calling Network Daemon finger daemons to update in native layers In configuration.Configuration that Network Daemon finger daemons are responsible for being related to network with some, operation, management, The related functional realiey such as inquiry, such as bandwidth control (Bandwidth), traffic statistics, network address translation, Shared verification, configuration routing table, interface configuration managements etc..
One of ordinary skill in the art will appreciate that all or part of flow process in realizing above-described embodiment method, Computer program be can be by instruct the hardware of correlation to complete, it is non-easy that described program can be stored in one In the property lost computer read/write memory medium, the program is upon execution, it may include such as the enforcement of above-mentioned each method The flow process of example.Wherein, described storage medium can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) etc..
Embodiment described above only expresses the several embodiments of the present invention, and its description is more concrete and detailed, But therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for this area Those of ordinary skill for, without departing from the inventive concept of the premise, can also make it is some deformation and Improve, these belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be with appended Claim is defined.

Claims (12)

1. a kind of control software is comprised the following steps using the method for network internet:
Obtain the trigger action for prohibiting backstage setting to selected software;
According to the trigger action by the selected software and corresponding taboo backstage strategy generating command script;
The command script is performed, the taboo backstage configuration strategy of the software is obtained;
Detect the current operating conditions of the software;
Network connection is carried out according to the taboo backstage configuration strategy of the software according to the current operating conditions of the software Net.
2. method according to claim 1, it is characterised in that after the taboo to selected software is obtained After the step of trigger action that platform is arranged, methods described also includes:
Super administration authority is detected whether, if so, then according to the trigger action by the selected software And corresponding taboo backstage strategy generating command script, if it is not, then output obtains the guiding letter of super administration authority Breath.
3. method according to claim 1, it is characterised in that the execution command script, obtains To the software taboo backstage configuration strategy the step of include:
Call the network strategy management service execution command script to carry out the setting of taboo backstage and obtain the software Prohibit backstage configuration strategy.
4. method according to claim 3, it is characterised in that described to call network strategy management service Performing the command script carries out prohibiting bag the step of backstage setting obtains the taboo backstage configuration strategy of the software Include:
The taboo background class offset set in prohibiting backstage strategy in obtaining the command script, according to the taboo backstage Types value is calculated the taboo backstage configuration strategy of the software.
5. method according to claim 4, it is characterised in that methods described also includes:
By the taboo backstage configuration strategy write caching of the software;
The taboo backstage configuration strategy of the software in caching is updated to system convention and is concentrated;
The taboo backstage configuration strategy that the system convention is concentrated by finger daemon is called to update in kernel setup.
6. method according to claim 1, it is characterised in that in the acquisition to selected software Before the step of prohibiting the trigger action of backstage setting, methods described also includes:
Detection operating system arranges function with the presence or absence of backstage is prohibited, and if so, then shows that prohibiting backstage is arranged, if it is not, Then arrange without taboo backstage.
7. a kind of control software uses the device of network internet, it is characterised in that include:
Operation acquisition module, for obtaining the trigger action for prohibiting backstage setting to selected software;
Generation module, for according to the trigger action will the selected software and corresponding taboo backstage strategy Generate command script;
Performing module, for performing the command script, obtains the taboo backstage configuration strategy of the software;
State detection module, for detecting the current operating conditions of the software;
Networking module, configures according to the taboo backstage of the software for the current operating conditions according to the software Strategy carries out network internet.
8. device according to claim 7, it is characterised in that described device also includes:
Authority detection module, for obtain to selected software prohibit backstage arrange trigger action after, Super administration authority is detected whether;
When the generation module is additionally operable to detect super administration authority, will be described according to the trigger action Selected software and corresponding taboo backstage strategy generating command script;
Output module, for detecting during no super administration authority, output obtains drawing for super administration authority Lead information.
9. device according to claim 7, it is characterised in that the performing module is additionally operable to call net Command script described in network tactical management service execution carries out prohibiting the taboo backstage configuration that backstage setting obtains the software Strategy.
10. device according to claim 9, it is characterised in that the performing module is additionally operable to obtain The taboo background class offset set in prohibiting backstage strategy in the command script, according to the taboo background class offset meter Calculation obtains the taboo backstage configuration strategy of the software.
11. devices according to claim 10, it is characterised in that described device also includes:
Writing module, for the taboo backstage configuration strategy write of the software is cached;
Update module, for the taboo backstage configuration strategy of the software in caching is updated to system convention collection In;
Change module, the taboo backstage configuration strategy for calling finger daemon to concentrate the system convention update To in kernel setup.
12. devices according to claim 7, it is characterised in that described device also includes:
System detectio module, for obtain to selected software prohibit backstage arrange trigger action before, Detection operating system arranges function with the presence or absence of backstage is prohibited, and if so, then shows that prohibiting backstage is arranged, if it is not, then Arrange without backstage is prohibited.
CN201510629637.1A 2015-09-28 2015-09-28 Method and device for controlling software to use network networking Active CN106559546B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510629637.1A CN106559546B (en) 2015-09-28 2015-09-28 Method and device for controlling software to use network networking

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510629637.1A CN106559546B (en) 2015-09-28 2015-09-28 Method and device for controlling software to use network networking

Publications (2)

Publication Number Publication Date
CN106559546A true CN106559546A (en) 2017-04-05
CN106559546B CN106559546B (en) 2020-09-04

Family

ID=58416657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510629637.1A Active CN106559546B (en) 2015-09-28 2015-09-28 Method and device for controlling software to use network networking

Country Status (1)

Country Link
CN (1) CN106559546B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355771A (en) * 2008-09-22 2009-01-28 深圳华为通信技术有限公司 Mobile terminal and method for configuring parameter information
CN102981835A (en) * 2012-11-02 2013-03-20 福州博远无线网络科技有限公司 Android application program permanent Root permission acquiring method
CN103150292A (en) * 2013-03-29 2013-06-12 北京奇虎科技有限公司 Method and device for replacing system font file
KR20140013495A (en) * 2012-07-24 2014-02-05 주식회사 케이티 Method and apparatus for controlling of background data transmission in mobile communication system
CN104009892A (en) * 2014-06-12 2014-08-27 北京奇虎科技有限公司 Monitoring method and device for traffic of mobile terminal and client side
CN104063303A (en) * 2014-06-30 2014-09-24 上海斐讯数据通信技术有限公司 Method for acquiring and freeing root permissions
CN104066088A (en) * 2014-06-06 2014-09-24 Tcl通讯(宁波)有限公司 Wireless internet access strategy method, system and definition method for mobile terminal
CN104348628A (en) * 2014-12-01 2015-02-11 北京奇虎科技有限公司 Method and device for obtaining local Root authority
CN104486138A (en) * 2014-11-25 2015-04-01 北京奇虎科技有限公司 Flow monitoring method and device and monitoring server
CN104572158A (en) * 2013-10-29 2015-04-29 腾讯科技(深圳)有限公司 Method and device for running application program by superuser identity
CN104902430A (en) * 2015-05-19 2015-09-09 广东欧珀移动通信有限公司 Method and system for flow control of intelligent terminal

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355771A (en) * 2008-09-22 2009-01-28 深圳华为通信技术有限公司 Mobile terminal and method for configuring parameter information
KR20140013495A (en) * 2012-07-24 2014-02-05 주식회사 케이티 Method and apparatus for controlling of background data transmission in mobile communication system
CN102981835A (en) * 2012-11-02 2013-03-20 福州博远无线网络科技有限公司 Android application program permanent Root permission acquiring method
CN103150292A (en) * 2013-03-29 2013-06-12 北京奇虎科技有限公司 Method and device for replacing system font file
CN104572158A (en) * 2013-10-29 2015-04-29 腾讯科技(深圳)有限公司 Method and device for running application program by superuser identity
CN104066088A (en) * 2014-06-06 2014-09-24 Tcl通讯(宁波)有限公司 Wireless internet access strategy method, system and definition method for mobile terminal
CN104009892A (en) * 2014-06-12 2014-08-27 北京奇虎科技有限公司 Monitoring method and device for traffic of mobile terminal and client side
CN104063303A (en) * 2014-06-30 2014-09-24 上海斐讯数据通信技术有限公司 Method for acquiring and freeing root permissions
CN104486138A (en) * 2014-11-25 2015-04-01 北京奇虎科技有限公司 Flow monitoring method and device and monitoring server
CN104348628A (en) * 2014-12-01 2015-02-11 北京奇虎科技有限公司 Method and device for obtaining local Root authority
CN104902430A (en) * 2015-05-19 2015-09-09 广东欧珀移动通信有限公司 Method and system for flow control of intelligent terminal

Also Published As

Publication number Publication date
CN106559546B (en) 2020-09-04

Similar Documents

Publication Publication Date Title
Cui et al. Securing display path for security-sensitive applications on mobile devices
CN104102882B (en) Protection method and device for privacy data of application program
CN103891242B (en) System and method for profile based filtering of outgoing information in a mobile environment
US10565379B2 (en) System, apparatus and method for instruction level behavioral analysis without binary instrumentation
US8938780B2 (en) Display authentication
CN108475217A (en) System and method for virtual machine of auditing
CN106462713B (en) The interface display method and terminal of terminal
JP6984710B2 (en) Computer equipment and memory management method
CN107656750A (en) Update of plug-in method and device
CN107102885A (en) The method and device of Android simulator is detected using ADB modes
CN107111511A (en) Access control method, device and system
CN107395594A (en) A kind of automatic identifying method for pulling identifying code
CN111596971B (en) Application cleaning method and device, storage medium and electronic equipment
CN107480001A (en) System recovery method and device
JP2004158007A (en) Computer access authorization
CN111695151A (en) Application permission setting method and device, electronic equipment and readable storage medium
CN106487793A (en) application installation method and device
CN108319849A (en) Equipment strategy management system based on Android twin containers system and management domain implementation method
CN108920253A (en) A kind of the virtual machine monitoring system and monitoring method of no agency
CN109246467A (en) Label is to the method, apparatus of sharing video frequency, video camera and smart phone
CN108092911A (en) A kind of method, terminal and computer-readable medium for managing data traffic
CN102929802B (en) A kind of guard method of storage resources and system
CN105897931B (en) Network exempts from method of flow control and device
CN108038378A (en) High in the clouds detection function is by the method for malicious modification, terminal device and storage medium
CN106559546A (en) Method and apparatus of the control software using network internet

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant