CN107205084B - Network speed processing method and device of application program and terminal - Google Patents

Network speed processing method and device of application program and terminal Download PDF

Info

Publication number
CN107205084B
CN107205084B CN201710330723.1A CN201710330723A CN107205084B CN 107205084 B CN107205084 B CN 107205084B CN 201710330723 A CN201710330723 A CN 201710330723A CN 107205084 B CN107205084 B CN 107205084B
Authority
CN
China
Prior art keywords
application program
list
identifier
terminal
switching event
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.)
Active
Application number
CN201710330723.1A
Other languages
Chinese (zh)
Other versions
CN107205084A (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.)
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 CN201710330723.1A priority Critical patent/CN107205084B/en
Publication of CN107205084A publication Critical patent/CN107205084A/en
Application granted granted Critical
Publication of CN107205084B publication Critical patent/CN107205084B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution

Abstract

The disclosure relates to a network speed processing method, a device and a terminal of an application program, wherein the method comprises the following steps: setting an application program list, wherein the application program list comprises at least one identifier of an application program with limited network speed; and limiting the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal. Therefore, the network speed of the application program can be limited, the network access of the foreground program is guaranteed, the network speed of the application program of the foreground program is guaranteed in a mode of not killing other processes, the running and the use of other services on the terminal are not affected, a lot of services can be normally used, and the physical examination of a user is improved.

Description

Network speed processing method and device of application program and terminal
Technical Field
The present disclosure relates to the field of terminal technologies, and in particular, to a network speed processing method and apparatus for an application program, and a terminal.
Background
With the development of terminal technology, terminals have become important tools in people's life and work. Many terminals adopt android systems, each application program is arranged in each terminal, and the functions of most application programs are realized by depending on networks. When a plurality of application programs are operated, all the application programs are connected with a network, and under the condition that the network bandwidth is fixed, the network speed is inevitably preempted among the processes.
In the related art, when a plurality of applications of a terminal run, since each application is connected to a network, the network speed of the application of a foreground is guaranteed by killing other processes.
However, in the related art, the way of killing other processes to ensure the network speed of the application program in the foreground may affect the operation and use of other services on the terminal, and further cause that many services cannot be used normally, resulting in poor physical examination of the user.
Disclosure of Invention
In order to solve the problems in the related art, the present disclosure provides a network speed processing method, device and terminal for an application program, which are used to solve the problem in the prior art that the operation and use of other services on the terminal are affected, and further, many services cannot be normally used, and the physical examination of a user is poor.
According to a first aspect of the embodiments of the present disclosure, there is provided a method for processing a network speed of an application, including:
setting an application program list, wherein the application program list comprises at least one identifier of an application program with limited network speed;
and limiting the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal.
Further, the method further comprises:
and setting the application program list through a network firewall according to the identification of each application program.
Further, the setting the application program list according to the identifier of each application program includes:
acquiring a switching event of an application program, and determining a package name of the application program according to the switching event;
determining the identifier of the application program according to the package name of the application program;
and when the switching event indicates that the application program is positioned in the foreground of the terminal, determining whether to add the identifier of the application program into the application program list, and when the switching event indicates that the application program is positioned in the background of the terminal, removing the identifier of the application program from the application program list so as to set the application program list.
Further, when the switching event indicates that the application program is located in the foreground of the terminal, determining whether to add the identifier of the application program to the application program list includes:
when the switching event indicates that the application program is positioned at the foreground of the terminal, if the application program is determined not to be the application program of the system core process, adding the identifier of the application program to the application program list;
alternatively, the first and second electrodes may be,
and when the switching event indicates that the application program is positioned in the foreground of the terminal, if the application program is determined not to be the application program in a white list, adding the identifier of the application program to the application program list, wherein the white list comprises the name of each application program set by the user.
Further, the acquiring a switching event of an application includes:
and acquiring a switching event of the application program by expanding an interface of the monitoring application program provided by the ActivityManagerService.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: setting an application program list, wherein the application program list comprises at least one identifier of an application program with limited network speed; and limiting the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal. Therefore, the network speed of the application program can be limited, the network access of the foreground program is guaranteed, the network speed of the application program of the foreground program is guaranteed in a mode of not killing other processes, the running and the use of other services on the terminal are not affected, a lot of services can be normally used, and the physical examination of a user is improved.
According to a second aspect of the embodiments of the present disclosure, there is provided a network speed processing apparatus for an application program, including:
the determining module is configured to set an application program list, and the application program list comprises at least one identifier of an application program with limited network speed;
and the limiting module is configured to limit the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal.
Further, the apparatus further comprises:
and the setting module is configured to set the application program list through a network firewall according to the identification of each application program.
Further, the setting module is specifically configured to:
the acquisition submodule is configured to acquire a switching event of the application program and determine a package name of the application program according to the switching event;
the determining submodule is configured to determine the identifier of the application program according to the package name of the application program;
and the setting submodule is configured to determine whether to add the identifier of the application program to the application program list when the switching event indicates that the application program is positioned in the foreground of the terminal, and remove the identifier of the application program from the application program list when the switching event indicates that the application program is positioned in the background of the terminal so as to set the application program list.
Further, the setup submodule is configured to:
when the switching event indicates that the application program is positioned at the foreground of the terminal, if the application program is determined not to be the application program of the system core process, adding the identifier of the application program to the application program list;
alternatively, the first and second electrodes may be,
and when the switching event indicates that the application program is positioned in the foreground of the terminal, if the application program is determined not to be the application program in a white list, adding the identifier of the application program to the application program list, wherein the white list comprises the name of each application program set by the user.
Further, the obtaining sub-module is specifically configured to:
and acquiring a switching event of the application program by expanding an interface of the monitoring application program provided by the ActivityManagerService.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: setting an application program list, wherein the application program list comprises at least one identifier of an application program with limited network speed; and limiting the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal. Therefore, the network speed of the application program can be limited, the network access of the foreground program is guaranteed, the network speed of the application program of the foreground program is guaranteed in a mode of not killing other processes, the running and the use of other services on the terminal are not affected, a lot of services can be normally used, and the physical examination of a user is improved.
According to a third aspect of the embodiments of the present disclosure, there is provided a terminal, including:
a processor, and a memory for storing processor-executable instructions;
wherein the processor is configured to: setting an application program list, wherein the application program list comprises at least one identifier of an application program with limited network speed; and limiting the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: setting an application program list, wherein the application program list comprises at least one identifier of an application program with limited network speed; and limiting the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal. Therefore, the network speed of the application program can be limited, the network access of the foreground program is guaranteed, the network speed of the application program of the foreground program is guaranteed in a mode of not killing other processes, the running and the use of other services on the terminal are not affected, a lot of services can be normally used, and the physical examination of a user is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow diagram illustrating a first embodiment of a method for network speed processing of an application in accordance with an illustrative embodiment;
FIG. 2 is a flowchart illustrating a second embodiment of a method for network speed processing of an application according to an illustrative embodiment;
FIG. 3 is a block diagram of a third embodiment of a wire speed processing apparatus for an application according to an exemplary embodiment
FIG. 4 is a block diagram illustrating a fourth embodiment of a wire speed processing apparatus for an application according to an illustrative embodiment;
FIG. 5 is a block diagram illustrating entities of a terminal in accordance with an exemplary embodiment;
fig. 6 is a block diagram illustrating a terminal device 800 according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a first embodiment of a method for processing a network speed of an application, as shown in fig. 1, the method is mainly used in a terminal, the terminal includes a mobile terminal, a personal terminal and the like, such as a touch screen mobile phone, a tablet computer, a personal computer and the like, and the method for processing the network speed of the application includes the following steps.
In step S11, an application list is set, wherein the application list includes an identifier of at least one network-speed-limited application.
In this step, a list of applications is provided, which may be in the form of a regular chain sleep. First, the application list is set, where the application list includes at least one application identifier, and each application in the application list is a network speed-limited application.
For example, the Application list includes an identifier a of an Application (APP), an identifier B of the Application, and an identifier C of the Application, which are network speed-limited applications.
In step S12, the network speed of the application program corresponding to the identifier of the application program in the application program list is limited to the preset proportion network speed of the terminal.
In this step, the network speed of each application program that belongs to the application program list and corresponds to the identifier of each application program may be limited to a preset ratio network speed of the terminal.
For example, the network speed of each application program corresponding to the identifier of each application program in the application program list may be limited to 5% of the highest network speed that the terminal can reach; the network value of the highest network speed which can be reached in the middle can be obtained by monitoring the historical network speed of the terminal, and an empirical value can also be used.
In the embodiment, an application program list is set, where the application program list includes an identifier of at least one application program with a limited network speed; and limiting the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal. Therefore, the network speed of the application program can be limited, the network access of the foreground program is guaranteed, the network speed of the application program of the foreground program is guaranteed in a mode of not killing other processes, the running and the use of other services on the terminal are not affected, a lot of services can be normally used, and the physical examination of a user is improved.
On the basis of the embodiment shown in fig. 1, fig. 2 is a flowchart of a second embodiment of a network speed processing method for an application according to an exemplary embodiment, and as shown in fig. 2, before step S11, the method further includes the following steps:
in step S21, the application list is set up through the network firewall according to the identifier of each application.
The specific implementation manner of step S21 is as follows: acquiring a switching event of an application program, and determining a package name of the application program according to the switching event;
determining the identifier of the application program according to the package name of the application program;
and when the switching event indicates that the application program is positioned in the foreground of the terminal, determining whether to add the identifier of the application program into the application program list, and when the switching event indicates that the application program is positioned in the background of the terminal, removing the identifier of the application program from the application program list so as to set the application program list.
When the switching event indicates that the application program is located in the foreground of the terminal, determining whether to add the identifier of the application program to the application program list comprises the following steps:
when the switching event indicates that the application program is positioned at the foreground of the terminal, if the application program is determined not to be the application program of the system core process, adding the identifier of the application program to the application program list;
alternatively, the first and second electrodes may be,
and when the switching event indicates that the application program is positioned in the foreground of the terminal, if the application program is determined not to be the application program in a white list, adding the identifier of the application program to the application program list, wherein the white list comprises the name of each application program set by the user.
Wherein the acquiring of the switching event of the application program includes:
and acquiring a switching event of the application program by expanding an interface of the monitoring application program provided by the ActivityManagerService.
In this step, Netfilter is set through the network firewall Iptable command, and then an application program list is set according to the identifier of each application program.
The IPtable is a configuration tool of the network firewall under LINUX, and the Netfilter is a module for controlling the network firewall in the Linux kernel. By setting up the application list, the network of applications belonging to this application list is limited to 5% of the maximum network speed that can be reached by the terminal, by the following code procedure:
execIptables(V4V6,"-t",REFER_TABLE_NAME,"-A",REFER_CHAIN_NAME,"-o",inf,"-j",TRAFFIC_CHAIN_NAME,NULL);
execIptables(V4V6,"-t",REFER_TABLE_NAME,"-A",TRAFFIC_CHAIN_NAME,"-p","udp","--dport","53","-j","CLASSIFY","--set-class",mForegroundPriority.c_str(),NULL);
execIptables(V4V6,"-t",REFER_TABLE_NAME,"-A",TRAFFIC_CHAIN_NAME,"-p","tcp","--dport","53","-j","CLASSIFY","--set-class",mForegroundPriority.c_str(),NULL);
if(prio>0){res=execIptables(V4V6,"-t",REFER_TABLE_NAME,"-A",TRAFFIC_CHAIN_NAME,"-m","owner","--uid-owner",uid,"-j","CLASSIFY","--set-class",mForegroundPriority.c_str(),NULL);}
else{res=execIptables(V4V6,"-t",REFER_TABLE_NAME,"-D",TRAFFIC_CHAIN_NAME,"-m","owner","--uid-owner",uid,"-j","CLASSIFY","--set-class",mForegroundPriority.c_str(),NULL);}
further, through the above codes, an application list may be set, where the application list may be represented in a form of a rule chain sleep.
Specifically, firstly, a switching event of an application program is obtained, and the switching event of the application program can be obtained by expanding an interface for monitoring the application program provided by activityManagerservice, so that the switching event of the application program APP can be received in time by expanding the interface for monitoring the application program APP positioned at a foreground provided by activityManagerservice; the package name of the application is then determined from the switching event. The switching event of the application program refers to an event that the application program is switched from a terminal foreground to a terminal background, or an event that the application program is switched from the terminal background to the terminal foreground; the switching event carries information such as the package name of the application program.
Then, the identifier of the application program APP can be obtained according to the determined package name of the application program APP, so as to operate the identifier of the application program APP, for example, the identifier of the application program APP can be represented by uid.
Then, when it is determined that the switching event indicates that the application APP is located in the foreground of the terminal, the application APP runs in the foreground of the terminal, and then it needs to be determined whether to add the identifier of the application APP to the application list. Specifically, when the switching event indicates that the application program APP is located in the foreground of the terminal, if the application program APP is determined not to be the application program of the system core process, adding the identifier of the application program APP to an application program list; or, when the switching event indicates that the application program is located in the foreground of the terminal, if it is determined that the application program APP is not an application program in a white list, adding an identifier of the application program APP to the application program list, where the white list has names of the application programs set by the user. Therefore, the APP of the system core process running in the background is not added to the application program list; but also allows the user to add white lists, applications that are in the white list and run in the background, and not in the application list.
When the switching event indicates that the application program APP is not in foreground operation, removing the identifier of the application program APP from the application program list; therefore, when the switching event indicates that the application program APP exits from the terminal foreground, the obtained identification of the application program APP is removed from the application program list, and other application program APP is added to the application program list.
Thereby setting the application list through the above procedure.
For example, when the switching event indicates that the application program APP is located in the foreground of the terminal, if it is determined that the application program APP is not an application program of a system core process, adding the identifier uid of the application program APP to a regular chain sleep; or, when the switching event indicates that the application program is located in the foreground of the terminal, if it is determined that the application program APP is not the application program in the white list, adding the identifier uid of the application program APP to the regular chain sleep. And when the switching event indicates that the application program APP is not operated in the foreground, removing the identifier uid of the application program APP from the rule chain sleep.
In this embodiment, an application program list is set through a network firewall according to an identifier of each application program, where the application program list includes an identifier of at least one network-speed-limited application program; and limiting the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal. Therefore, the network speed of the application program can be limited, the network access of the foreground program is guaranteed, the network speed of the application program of the foreground program is guaranteed in a mode of not killing other processes, the running and the use of other services on the terminal are not affected, a lot of services can be normally used, and the physical examination of a user is improved. Therefore, the switching event of the application program can be obtained by expanding the interface of the monitoring application program provided by the ActivityManagerService, and then the identification of the application program is obtained, then the network speed of the background application program is controlled by a network management mechanism provided by a Linux kernel Netfiler, the application program is limited to the highest network speed of the background program, and the network access of the foreground program is further ensured; the network speed of the application program of the foreground is ensured without killing other processes, and the running and the use of other services on the terminal are not influenced, so that a plurality of services can be normally used, and the physical examination of the user is improved.
Fig. 3 is a block diagram of a third embodiment of a wire speed processing apparatus for an application according to an exemplary embodiment. Referring to fig. 3, the apparatus includes:
a determining module 31 configured to set an application program list, where the application program list includes an identifier of at least one network speed limited application program;
and the limiting module 32 is configured to limit the network speed of the application program corresponding to the identifier of the application program in the application program list to a preset proportion network speed of the terminal.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In the embodiment, an application program list is set, where the application program list includes an identifier of at least one application program with a limited network speed; and limiting the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal. Therefore, the network speed of the application program can be limited, the network access of the foreground program is guaranteed, the network speed of the application program of the foreground program is guaranteed in a mode of not killing other processes, the running and the use of other services on the terminal are not affected, a lot of services can be normally used, and the physical examination of a user is improved.
On the basis of the embodiment shown in fig. 3, fig. 4 is a block diagram of a fourth embodiment of a wire speed processing device of an application according to an exemplary embodiment. Referring to fig. 4, the apparatus further includes:
and the setting module 41 is configured to set the application program list according to the identification of each application program through a network firewall.
The setting module 41 is specifically configured to:
the obtaining sub-module 411 is configured to obtain a switching event of the application program, and determine a package name of the application program according to the switching event;
a determining submodule 412 configured to determine an identifier of the application program according to the package name of the application program;
a setting submodule 413 configured to determine whether to add the identifier of the application to the application list when the switching event indicates that the application is located in the foreground of the terminal, and remove the identifier of the application from the application list when the switching event indicates that the application is located in the background of the terminal, so as to set the application list.
Wherein the setting submodule 413 is configured to:
when the switching event indicates that the application program is positioned at the foreground of the terminal, if the application program is determined not to be the application program of the system core process, adding the identifier of the application program to the application program list;
alternatively, the first and second electrodes may be,
and when the switching event indicates that the application program is positioned in the foreground of the terminal, if the application program is determined not to be the application program in a white list, adding the identifier of the application program to the application program list, wherein the white list comprises the name of each application program set by the user.
The obtaining sub-module 411 is specifically configured to:
and acquiring a switching event of the application program by expanding an interface of the monitoring application program provided by the ActivityManagerService.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In this embodiment, an application program list is set through a network firewall according to an identifier of each application program, where the application program list includes an identifier of at least one network-speed-limited application program; and limiting the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal. Therefore, the network speed of the application program can be limited, the network access of the foreground program is guaranteed, the network speed of the application program of the foreground program is guaranteed in a mode of not killing other processes, the running and the use of other services on the terminal are not affected, a lot of services can be normally used, and the physical examination of a user is improved. Therefore, the switching event of the application program can be obtained by expanding the interface of the monitoring application program provided by the ActivityManagerService, and then the identification of the application program is obtained, then the network speed of the background application program is controlled by a network management mechanism provided by a Linux kernel Netfiler, the application program is limited to the highest network speed of the background program, and the network access of the foreground program is further ensured; the network speed of the application program of the foreground is ensured without killing other processes, and the running and the use of other services on the terminal are not influenced, so that a plurality of services can be normally used, and the physical examination of the user is improved.
Fig. 5 is a block diagram illustrating entities of a terminal according to an example embodiment. Referring to fig. 5, the terminal may be embodied as: a processor 71, and a memory 72 configured to store processor-executable instructions;
wherein the processor 71 is configured to: setting an application program list, wherein the application program list comprises at least one identifier of an application program with limited network speed; and limiting the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal.
In the above embodiments, it should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, and the aforementioned memory may be a read-only memory (ROM), a Random Access Memory (RAM), a flash memory, a hard disk, or a solid state disk. SIM cards, also known as subscriber identity cards, smart cards, must be installed in a digital mobile phone for use. That is, the information of the digital mobile phone client, the encrypted key and the contents of the user's phone book are stored on the computer chip. The steps of a method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
With regard to the terminal in the above-described embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method and apparatus, and will not be elaborated herein.
In the embodiment, an application program list is set, where the application program list includes an identifier of at least one application program with a limited network speed; and limiting the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal. Therefore, the network speed of the application program can be limited, the network access of the foreground program is guaranteed, the network speed of the application program of the foreground program is guaranteed in a mode of not killing other processes, the running and the use of other services on the terminal are not affected, a lot of services can be normally used, and the physical examination of a user is improved.
Fig. 6 is a block diagram illustrating a terminal device 800 according to an example embodiment. For example, the terminal device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
Referring to fig. 6, terminal device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the terminal device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the terminal device 800. Examples of such data include instructions for any application or method operating on terminal device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 806 provide power to the various components of terminal device 800. Power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for terminal device 800.
The multimedia component 808 comprises a screen providing an output interface between the terminal device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. When the terminal device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive an external audio signal when the terminal device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
Sensor component 814 includes one or more sensors for providing various aspects of state assessment for terminal device 800. For example, sensor assembly 814 may detect an open/closed status of terminal device 800, the relative positioning of components, such as a display and keypad of terminal device 800, sensor assembly 814 may also detect a change in the position of terminal device 800 or a component of terminal device 800, the presence or absence of user contact with terminal device 800, orientation or acceleration/deceleration of terminal device 800, and a change in the temperature of terminal device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
Communication component 816 is configured to facilitate communications between terminal device 800 and other devices in a wired or wireless manner. The terminal device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the terminal device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein, which when executed by a processor of a mobile terminal, enable the mobile terminal to perform a method of wire speed processing of an application, the method comprising:
setting an application program list, wherein the application program list comprises at least one identifier of an application program with limited network speed;
and limiting the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (3)

1. A method for processing the network speed of an application program is characterized by comprising the following steps:
setting an application program list, wherein the application program list comprises at least one identifier of an application program with limited network speed;
limiting the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal;
wherein the content of the first and second substances,
further comprising:
setting the application program list through a network firewall according to the identification of each application program;
wherein the content of the first and second substances,
the setting the application program list according to the identifier of each application program comprises:
acquiring a switching event of an application program, and determining a package name of the application program according to the switching event;
determining the identifier of the application program according to the package name of the application program;
when the switching event indicates that the application program is positioned in the background of the terminal, determining whether to add the identifier of the application program into the application program list, and when the switching event indicates that the application program is positioned in the foreground of the terminal, removing the identifier of the application program from the application program list to set the application program list;
wherein the content of the first and second substances,
when the switching event indicates that the application program is located in the background of the terminal, determining whether to add the identifier of the application program to the application program list, including:
when the switching event indicates that the application program is positioned at the background of the terminal, if the application program is determined not to be the application program of the system core process, adding the identifier of the application program into the application program list;
alternatively, the first and second electrodes may be,
when the switching event indicates that the application program is located in the background of the terminal, if the application program is determined not to be the application program in a white list, adding an identifier of the application program to the application program list, wherein the white list comprises names of the application programs set by a user;
wherein the content of the first and second substances,
the acquiring of the switching event of the application program comprises the following steps:
and acquiring a switching event of the application program by expanding an interface of the monitoring application program provided by the ActivityManagerService.
2. An apparatus for processing an application program at a network speed, comprising:
the determining module is configured to set an application program list, and the application program list comprises at least one identifier of an application program with limited network speed;
the limiting module is configured to limit the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal;
wherein the content of the first and second substances,
further comprising:
the setting module is configured to set the application program list through a network firewall according to the identification of each application program;
wherein the content of the first and second substances,
the setting module is specifically configured to:
the acquisition submodule is configured to acquire a switching event of the application program and determine a package name of the application program according to the switching event;
the determining submodule is configured to determine the identifier of the application program according to the package name of the application program;
the setting submodule is configured to determine whether to add the identifier of the application program to the application program list when the switching event indicates that the application program is located in the background of the terminal, and remove the identifier of the application program from the application program list to set the application program list when the switching event indicates that the application program is located in the foreground of the terminal;
wherein the content of the first and second substances,
the setting sub-module configured to:
when the switching event indicates that the application program is positioned at the background of the terminal, if the application program is determined not to be the application program of the system core process, adding the identifier of the application program into the application program list;
alternatively, the first and second electrodes may be,
when the switching event indicates that the application program is located in the background of the terminal, if the application program is determined not to be the application program in a white list, adding an identifier of the application program to the application program list, wherein the white list comprises names of the application programs set by a user;
wherein the content of the first and second substances,
the acquisition submodule is specifically configured to:
and acquiring a switching event of the application program by expanding an interface of the monitoring application program provided by the ActivityManagerService.
3. A terminal, comprising:
a processor, and a memory for storing processor-executable instructions;
wherein the processor is configured to: setting an application program list, wherein the application program list comprises at least one identifier of an application program with limited network speed; limiting the network speed of the application program corresponding to the identifier of the application program in the application program list to be a preset proportion network speed of the terminal;
wherein the processor is further configured to:
setting the application program list through a network firewall according to the identification of each application program;
wherein the content of the first and second substances,
the setting the application program list according to the identifier of each application program comprises:
acquiring a switching event of an application program, and determining a package name of the application program according to the switching event;
determining the identifier of the application program according to the package name of the application program;
when the switching event indicates that the application program is positioned in the background of the terminal, determining whether to add the identifier of the application program into the application program list, and when the switching event indicates that the application program is positioned in the foreground of the terminal, removing the identifier of the application program from the application program list to set the application program list;
wherein the content of the first and second substances,
when the switching event indicates that the application program is located in the background of the terminal, determining whether to add the identifier of the application program to the application program list, including:
when the switching event indicates that the application program is positioned at the background of the terminal, if the application program is determined not to be the application program of the system core process, adding the identifier of the application program into the application program list;
alternatively, the first and second electrodes may be,
when the switching event indicates that the application program is located in the background of the terminal, if the application program is determined not to be the application program in a white list, adding an identifier of the application program to the application program list, wherein the white list comprises names of the application programs set by a user;
wherein the content of the first and second substances,
and acquiring a switching event of the application program by expanding an interface of the monitoring application program provided by the ActivityManagerService.
CN201710330723.1A 2017-05-11 2017-05-11 Network speed processing method and device of application program and terminal Active CN107205084B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710330723.1A CN107205084B (en) 2017-05-11 2017-05-11 Network speed processing method and device of application program and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710330723.1A CN107205084B (en) 2017-05-11 2017-05-11 Network speed processing method and device of application program and terminal

Publications (2)

Publication Number Publication Date
CN107205084A CN107205084A (en) 2017-09-26
CN107205084B true CN107205084B (en) 2020-12-18

Family

ID=59905678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710330723.1A Active CN107205084B (en) 2017-05-11 2017-05-11 Network speed processing method and device of application program and terminal

Country Status (1)

Country Link
CN (1) CN107205084B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108040330B (en) * 2017-11-30 2021-04-27 努比亚技术有限公司 WiFi directional transmission method, mobile terminal and readable storage medium
CN108156632B (en) * 2017-12-22 2021-11-23 奇酷互联网络科技(深圳)有限公司 Method and device for controlling WiFi network speed and mobile terminal
CN108391307B (en) * 2018-02-09 2021-11-23 北京小米移动软件有限公司 Power consumption control method and device based on android system and storage medium
CN109286571A (en) * 2018-08-22 2019-01-29 奇酷互联网络科技(深圳)有限公司 The method, apparatus and storage device of mobile terminal and application program limit core and limit net
CN109684090A (en) * 2018-12-19 2019-04-26 三星电子(中国)研发中心 A kind of resource allocation methods and device
CN110505660B (en) * 2019-07-23 2023-07-14 维沃移动通信有限公司 Network rate adjusting method and terminal equipment
CN112564939B (en) * 2020-11-11 2023-06-06 深圳市友华通信技术有限公司 Gateway control method, computer device, and storage medium
CN114024717B (en) * 2021-10-09 2024-04-05 深圳市广和通无线股份有限公司 Control method, device, equipment and storage medium for application program flow

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105338550A (en) * 2015-09-22 2016-02-17 网易传媒科技(北京)有限公司 Method and device for managing connection of wireless network
CN106059952A (en) * 2016-04-29 2016-10-26 宇龙计算机通信科技(深圳)有限公司 Bandwidth application management method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8732588B2 (en) * 2008-09-09 2014-05-20 Applied Systems, Inc. Method and apparatus for remotely displaying screen files and efficiently handling remote operator input
US20160035392A1 (en) * 2012-11-22 2016-02-04 Didja, Inc. Systems and methods for clipping video segments
CN104125269B (en) * 2014-06-30 2018-08-14 广州酷狗计算机科技有限公司 Method for limiting speed and device
CN105159781B (en) * 2015-08-25 2018-11-27 广东欧珀移动通信有限公司 Adjust the method, apparatus and intelligent terminal of intelligent terminal application network speed
CN106095547A (en) * 2016-06-03 2016-11-09 北京小米移动软件有限公司 Application program networking control method and device
CN106453150B (en) * 2016-10-11 2019-10-18 东软集团股份有限公司 Flow control method and device
CN106533988B (en) * 2016-10-26 2020-07-14 维沃移动通信有限公司 Application program network speed control method and mobile terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105338550A (en) * 2015-09-22 2016-02-17 网易传媒科技(北京)有限公司 Method and device for managing connection of wireless network
CN106059952A (en) * 2016-04-29 2016-10-26 宇龙计算机通信科技(深圳)有限公司 Bandwidth application management method and device

Also Published As

Publication number Publication date
CN107205084A (en) 2017-09-26

Similar Documents

Publication Publication Date Title
CN107205084B (en) Network speed processing method and device of application program and terminal
EP3188066B1 (en) A method and an apparatus for managing an application
EP3306441A1 (en) Temperature control method and apparatus
EP3188520A1 (en) Method and device for enabling virtual subscriber identity module card
CN109219036B (en) Method and device for unbinding equipment and electronic equipment
CN107102772B (en) Touch control method and device
US20170060260A1 (en) Method and device for connecting external equipment
CN107094094B (en) Application networking method and device and terminal
CN109314913B (en) Access control limiting method and device
EP3076745A1 (en) Methods and apparatuses for controlling wireless access point
CN105163290B (en) roaming prompting method and device
CN107463372B (en) Data-driven page updating method and device
CN107132983B (en) Split-screen window operation method and device
CN105227426B (en) Application interface switching method and device and terminal equipment
CN107371222B (en) Virtual card disabling method and device
CN106506808B (en) Method and device for prompting communication message
CN106201738B (en) System broadcast calling method and device
CN105786561B (en) Method and device for calling process
CN111225111A (en) Function control method, function control device, and storage medium
CN107070816B (en) Application identification method and device and mobile terminal
CN106708930B (en) Method and device for refreshing application page
CN106060104B (en) Application management method and device
KR102019710B1 (en) Fingerprint authentication methods, devices, programs and recording media
US10019604B2 (en) Method and apparatus of verifying terminal and medium
CN107708106B (en) User identification card management method and user identification card management device

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