[go: up one dir, main page]

CN107205084A - Network speed processing method, device and the terminal of application program - Google Patents

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

Info

Publication number
CN107205084A
CN107205084A CN201710330723.1A CN201710330723A CN107205084A CN 107205084 A CN107205084 A CN 107205084A CN 201710330723 A CN201710330723 A CN 201710330723A CN 107205084 A CN107205084 A CN 107205084A
Authority
CN
China
Prior art keywords
application program
list
application
terminal
network speed
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
CN201710330723.1A
Other languages
Chinese (zh)
Other versions
CN107205084B (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
Expired - Fee Related 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本公开是关于一种应用程序的网速处理方法、装置及终端,其中,该方法包括:设置应用程序列表,应用程序列表中包括至少一个被限制网速的应用程序的标识;将与应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。从而可以限制应用程序的网速,保证前台程序的网络访问,不需要杀死其他进程的方式去保证前台的应用程序的网速,不会影响到终端上其他服务的运行和使用,从而使得很多服务可以正常被使用,提高用户体检。

The present disclosure relates to a network speed processing method, device, and terminal of an application program, wherein the method includes: setting an application program list, the application program list includes at least one application program whose network speed is limited; The network speed of the application program corresponding to the identification of the application program in the list is limited to the network speed of the preset ratio of the network speed of the terminal. In this way, the network speed of the application program can be limited, the network access of the foreground program can be guaranteed, and the network speed of the application program in the foreground does not need to be killed by killing other processes, which will not affect the operation and use of other services on the terminal, thus making many The service can be used normally, improving the user's physical examination.

Description

应用程序的网速处理方法、装置及终端Application program network speed processing method, device and terminal

技术领域technical field

本公开涉及终端技术领域,尤其涉及应用程序的网速处理方法、装置及终端。The present disclosure relates to the technical field of terminals, and in particular to a method, device and terminal for network speed processing of application programs.

背景技术Background technique

随着终端技术的发展,终端已经成为人们生活、工作中的重要工具。很多终端都采用安卓系统,终端中具有各应用程序,而大部分应用程序的功能都依赖网络完成实现。在多个应用程序运行的时候,所有应用程序都会连接网络,在网络带宽固定的情况下,必然会存在进程之间互相抢占网速的情况。With the development of terminal technology, the terminal has become an important tool in people's life and work. Many terminals adopt the Android system, and there are various application programs in the terminal, and most of the functions of the application programs rely on the network to complete the realization. When multiple applications are running, all applications will be connected to the network. In the case of a fixed network bandwidth, there will inevitably be situations where processes preempt each other for network speed.

相关技术中,在终端的多个应用程序运行的时候,由于各应用程序都会连接网络,会采用杀死其他进程的方式保证前台的应用程序的网速。In related technologies, when multiple application programs on the terminal are running, since each application program is connected to the network, the network speed of the application program in the foreground is guaranteed by killing other processes.

然而相关技术中,杀死其他进程的方式保证前台的应用程序的网速的方式,会影响到终端上其他服务的运行和使用,进而造成很多服务无法正常被使用,造成用户体检较差。However, in related technologies, the way of killing other processes to ensure the network speed of the foreground application program will affect the operation and use of other services on the terminal, and then cause many services to be unable to be used normally, resulting in poor physical examination of users.

发明内容Contents of the invention

为克服相关技术中存在的问题,本公开提供一种应用程序的网速处理方法、装置及终端,用于解决现有技术中会影响到终端上其他服务的运行和使用,进而造成很多服务无法正常被使用,造成用户体检较差的问题。In order to overcome the problems existing in the related technologies, the present disclosure provides a network speed processing method, device and terminal for application programs, which are used to solve the problems in the prior art that would affect the operation and use of other services on the terminal, thereby causing many services to fail. Normal use, resulting in poor physical examination of users.

根据本公开实施例的第一方面,提供一种应用程序的网速处理方法,包括:According to the first aspect of the embodiments of the present disclosure, there is provided a network speed processing method for an application, including:

设置应用程序列表,所述应用程序列表中包括至少一个被限制网速的应用程序的标识;An application program list is set, and the application program list includes at least one identification of an application program whose network speed is limited;

将与所述应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。Limiting the network speed of the application program corresponding to the application program identifier in the application program list to a preset ratio of the network speed of the terminal.

进一步地,所述方法,还包括:Further, the method also includes:

通过网络防火墙并根据各应用程序的标识,设置所述应用程序列表。The application program list is set through the network firewall and according to the identification of each application program.

进一步地,所述根据各应用程序的标识,设置所述应用程序列表,包括:Further, setting the application list according to the identification of each application includes:

获取应用程序的切换事件,并根据所述切换事件确定应用程序的包名;Obtain the switching event of the application program, and determine the package name of the application program according to the switching event;

根据所述应用程序的包名,确定应用程序的标识;Determine the identity of the application program according to the package name of the application program;

在所述切换事件表明应用程序位于终端前台时,确定是否将应用程序的标识添加至所述应用程序列表中,在所述切换事件表明应用程序位于终端后台时,将应用程序的标识从所述应用程序列表中移除,以设置所述应用程序列表。When the switching event indicates that the application is in the foreground of the terminal, determine whether to add the identification of the application to the application list, and when the switching event indicates that the application is in the background of the terminal, change the identification of the application from the Removed from the application list to set the application list.

进一步地,在所述切换事件表明应用程序位于终端前台时,确定是否将应用程序的标识添加至所述应用程序列表中,包括:Further, when the switching event indicates that the application is in the foreground of the terminal, determining whether to add the identification of the application to the application list includes:

在所述切换事件表明应用程序位于终端前台时,若确定应用程序不是系统核心进程的应用程序,则将应用程序的标识添加至所述应用程序列表中;When the switching event indicates that the application is in the foreground of the terminal, if it is determined that the application is not an application of the system core process, the application identification is added to the application list;

或者,or,

在所述切换事件表明应用程序位于终端前台时,若确定应用程序不是白名单中的应用程序,则将应用程序的标识添加至所述应用程序列表中,其中,所述白名单中包括有用户设置的各应用程序的名称。When the switching event indicates that the application is in the foreground of the terminal, if it is determined that the application is not an application in the white list, then add the identification of the application to the application list, wherein the white list includes the user The name of each application that is set.

进一步地,所述获取应用程序的切换事件,包括:Further, the acquisition of the switching event of the application program includes:

通过扩展ActivityManagerService提供的监控应用程序的接口,获取应用程序的切换事件。By extending the monitoring application interface provided by ActivityManagerService, the switching event of the application is obtained.

本公开的实施例提供的技术方案可以包括以下有益效果:通过设置应用程序列表,应用程序列表中包括至少一个被限制网速的应用程序的标识;将与应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。从而可以限制应用程序的网速,保证前台程序的网络访问,不需要杀死其他进程的方式去保证前台的应用程序的网速,不会影响到终端上其他服务的运行和使用,从而使得很多服务可以正常被使用,提高用户体检。The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: by setting the application list, the application list includes at least one identification of the application whose network speed is limited; it will correspond to the identification of the application in the application list The network speed of the application is limited to the preset ratio of the network speed of the terminal. In this way, the network speed of the application program can be limited, the network access of the foreground program can be guaranteed, and the network speed of the application program in the foreground does not need to be killed by killing other processes, which will not affect the operation and use of other services on the terminal, thus making many The service can be used normally, improving the user's physical examination.

根据本公开实施例的第二方面,提供一种应用程序的网速处理装置,包括:According to the second aspect of the embodiments of the present disclosure, there is provided an application program network speed processing device, including:

确定模块,被配置为设置应用程序列表,所述应用程序列表中包括至少一个被限制网速的应用程序的标识;The determination module is configured to set an application program list, the application program list includes at least one identification of the application program whose network speed is limited;

限制模块,被配置为将与所述应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。The limiting module is configured to limit the network speed of the application program corresponding to the identification of the application program in the application program list to a preset ratio network speed of the network speed of the terminal.

进一步地,所述装置,还包括:Further, the device also includes:

设置模块,被配置为通过网络防火墙并根据各应用程序的标识,设置所述应用程序列表。The setting module is configured to set the application program list through the network firewall and according to the identification of each application program.

进一步地,所述设置模块,被具体配置为:Further, the setting module is specifically configured as:

获取子模块,被配置为获取应用程序的切换事件,并根据所述切换事件确定应用程序的包名;The obtaining submodule is configured to obtain the switching event of the application program, and determine the package name of the application program according to the switching event;

确定子模块,被配置为根据所述应用程序的包名,确定应用程序的标识;A determining submodule configured to determine the identity of the application program according to the package name of the application program;

设置子模块,被配置为在所述切换事件表明应用程序位于终端前台时,确定是否将应用程序的标识添加至所述应用程序列表中,在所述切换事件表明应用程序位于终端后台时,将应用程序的标识从所述应用程序列表中移除,以设置所述应用程序列表。The setting submodule is configured to determine whether to add the identification of the application to the application list when the switching event indicates that the application is in the foreground of the terminal, and when the switching event indicates that the application is in the background of the terminal, the The identification of the application is removed from the application list to set the application list.

进一步地,所述设置子模块,被配置为:Further, the setting submodule is configured to:

在所述切换事件表明应用程序位于终端前台时,若确定应用程序不是系统核心进程的应用程序,则将应用程序的标识添加至所述应用程序列表中;When the switching event indicates that the application is in the foreground of the terminal, if it is determined that the application is not an application of the system core process, the application identification is added to the application list;

或者,or,

在所述切换事件表明应用程序位于终端前台时,若确定应用程序不是白名单中的应用程序,则将应用程序的标识添加至所述应用程序列表中,其中,所述白名单中包括有用户设置的各应用程序的名称。When the switching event indicates that the application is in the foreground of the terminal, if it is determined that the application is not an application in the white list, then add the identification of the application to the application list, wherein the white list includes the user The name of each application that is set.

进一步地,所述获取子模块,被具体配置为:Further, the acquiring submodule is specifically configured as:

通过扩展ActivityManagerService提供的监控应用程序的接口,获取应用程序的切换事件。By extending the monitoring application interface provided by ActivityManagerService, the switching event of the application is obtained.

本公开的实施例提供的技术方案可以包括以下有益效果:通过设置应用程序列表,应用程序列表中包括至少一个被限制网速的应用程序的标识;将与应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。从而可以限制应用程序的网速,保证前台程序的网络访问,不需要杀死其他进程的方式去保证前台的应用程序的网速,不会影响到终端上其他服务的运行和使用,从而使得很多服务可以正常被使用,提高用户体检。The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: by setting the application list, the application list includes at least one identification of the application whose network speed is limited; it will correspond to the identification of the application in the application list The network speed of the application is limited to the preset ratio of the network speed of the terminal. In this way, the network speed of the application program can be limited, the network access of the foreground program can be guaranteed, and the network speed of the application program in the foreground does not need to be killed by killing other processes, which will not affect the operation and use of other services on the terminal, thus making many The service can be used normally, improving the user's physical examination.

根据本公开实施例的第三方面,提供一种终端,包括:According to a third aspect of the embodiments of the present disclosure, a terminal is provided, including:

处理器,以及用于存储处理器可执行指令的存储器;a processor, and memory for storing instructions executable by the processor;

其中,所述处理器被配置为:设置应用程序列表,所述应用程序列表中包括至少一个被限制网速的应用程序的标识;将与所述应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。Wherein, the processor is configured to: set an application program list, the application program list includes at least one identification of the application program whose network speed is limited; the application program corresponding to the identification program in the application program list The network speed of the program is limited to the preset proportional network speed of the terminal's network speed.

本公开的实施例提供的技术方案可以包括以下有益效果:通过设置应用程序列表,应用程序列表中包括至少一个被限制网速的应用程序的标识;将与应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。从而可以限制应用程序的网速,保证前台程序的网络访问,不需要杀死其他进程的方式去保证前台的应用程序的网速,不会影响到终端上其他服务的运行和使用,从而使得很多服务可以正常被使用,提高用户体检。The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: by setting the application list, the application list includes at least one identification of the application whose network speed is limited; it will correspond to the identification of the application in the application list The network speed of the application is limited to the preset ratio of the network speed of the terminal. In this way, the network speed of the application program can be limited, the network access of the foreground program can be guaranteed, and the network speed of the application program in the foreground does not need to be killed by killing other processes, which will not affect the operation and use of other services on the terminal, thus making many The service can be used normally, improving the user's physical examination.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。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 present disclosure.

附图说明Description of 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.

图1是根据一示例性实施例示出的一种应用程序的网速处理方法实施例一的流程图;Fig. 1 is a flow chart of Embodiment 1 of a method for processing network speed of an application according to an exemplary embodiment;

图2是根据一示例性实施例示出的一种应用程序的网速处理方法实施例二的流程图;Fig. 2 is a flow chart of Embodiment 2 of a method for processing network speed of an application according to an exemplary embodiment;

图3是根据一示例性实施例示出的一种应用程序的网速处理装置实施例三的框图Fig. 3 is a block diagram of Embodiment 3 of an application program network speed processing device according to an exemplary embodiment

图4是根据一示例性实施例示出的一种应用程序的网速处理装置实施例四的框图;Fig. 4 is a block diagram of Embodiment 4 of an application program network speed processing device according to an exemplary embodiment;

图5是根据一示例性实施例示出的一种终端的实体的框图;Fig. 5 is a block diagram of an entity of a terminal according to an exemplary embodiment;

图6是根据一示例性实施例示出的一种终端设备800的框图。Fig. 6 is a block diagram showing a terminal device 800 according to an exemplary 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, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with aspects of the invention as recited in the appended claims.

图1是根据一示例性实施例示出的一种应用程序的网速处理方法实施例一的流程图,如图1所示,该方法主要是用在终端中,该终端包括移动终端、个人终端等等,例如触屏手机、平板电脑、个人电脑等,该应用程序的网速处理方法包括以下步骤。Fig. 1 is a flow chart of Embodiment 1 of a method for processing network speed of an application according to an exemplary embodiment. As shown in Fig. 1, the method is mainly used in a terminal, and the terminal includes a mobile terminal, a personal terminal Etc., such as touch-screen mobile phones, tablet computers, personal computers, etc., the network speed processing method of the application program includes the following steps.

在步骤S11中,设置应用程序列表,所述应用程序列表中包括至少一个被限制网速的应用程序的标识。In step S11, an application program list is set, and the application program list includes at least one identification of an application program whose network speed is limited.

在本步骤中,提供了一个应用程序列表,该应用程序列表可以采用规则链sleep的形式。首先需要设置该应用程序列表,在这个应用程序列表包括有至少一个应用程序的标识,在该应用程序列表中的各应用程序是被限制了网速的应用程序。In this step, an application list is provided, and the application list may be in the form of a rule chain sleep. Firstly, the application program list needs to be set, and the application program list includes at least one application program identification, and each application program in the application program list is an application program whose network speed is limited.

举例来说,在应用程序列表中,包括了应用程序(Application,简称APP)的标识A、应用程序的标识B、应用程序的标识C,这些应用程序是被限制了网速的应用程序。For example, the application program list includes application program (Application, APP for short) identification A, application identification B, and application identification C, and these application programs are application programs whose network speed is limited.

在步骤S12中,将与所述应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。In step S12, the network speed of the application program corresponding to the application program identifier in the application program list is limited to the network speed of the preset ratio of the network speed of the terminal.

在本步骤中,可以将属于应用程序列表中的、且与各应用程序的标识对应的各应用程序的网速,限制到终端的网速的预设比例网速。In this step, the network speed of each application program belonging to the application program list and corresponding to the identifier of each application program may be limited to a preset ratio of the network speed of the terminal.

举例来说,可以将将属于应用程序列表中的与各应用程序的标识对应的各应用程序的网速,限制到终端可以达到的最高网速的5%;其中,中等可以达到的最高网速的网络值可以通过监控终端的历史网速得到,也可以使用经验值。For example, the network speed of each application program corresponding to the identification of each application program belonging to the application program list can be limited to 5% of the maximum network speed that the terminal can achieve; among them, the medium maximum network speed can be achieved The network value of can be obtained by monitoring the historical network speed of the terminal, or by using experience values.

本实施例通过设置应用程序列表,应用程序列表中包括至少一个被限制网速的应用程序的标识;将与应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。从而可以限制应用程序的网速,保证前台程序的网络访问,不需要杀死其他进程的方式去保证前台的应用程序的网速,不会影响到终端上其他服务的运行和使用,从而使得很多服务可以正常被使用,提高用户体检。In this embodiment, by setting the application program list, the application program list includes at least one application program whose network speed is limited; the network speed of the application program corresponding to the application program identification in the application program list is limited to the network speed of the terminal. The preset ratio of network speeds. In this way, the network speed of the application program can be limited, the network access of the foreground program can be guaranteed, and the network speed of the application program in the foreground does not need to be killed by killing other processes, which will not affect the operation and use of other services on the terminal, thus making many The service can be used normally, improving the user's physical examination.

在上述图1所示的实施例的基础上,图2是根据一示例性实施例示出的一种应用程序的网速处理方法实施例二的流程图,如图2所示,在步骤S11之前,还包括以下步骤:On the basis of the embodiment shown in FIG. 1 above, FIG. 2 is a flow chart of Embodiment 2 of a network speed processing method for an application program according to an exemplary embodiment. As shown in FIG. 2 , before step S11 , also includes the following steps:

在步骤S21中,通过网络防火墙并根据各应用程序的标识,设置所述应用程序列表。In step S21, the application program list is set through the network firewall and according to the identification of each application program.

其中,步骤S21的具体实现方式为:获取应用程序的切换事件,并根据所述切换事件确定应用程序的包名;Wherein, the specific implementation manner of step S21 is: acquiring the switching event of the application program, and determining the package name of the application program according to the switching event;

根据所述应用程序的包名,确定应用程序的标识;Determine the identity of the application program according to the package name of the application program;

在所述切换事件表明应用程序位于终端前台时,确定是否将应用程序的标识添加至所述应用程序列表中,在所述切换事件表明应用程序位于终端后台时,将应用程序的标识从所述应用程序列表中移除,以设置所述应用程序列表。When the switching event indicates that the application is in the foreground of the terminal, determine whether to add the identification of the application to the application list, and when the switching event indicates that the application is in the background of the terminal, change the identification of the application from the Removed from the application list to set the application list.

其中,在所述切换事件表明应用程序位于终端前台时,确定是否将应用程序的标识添加至所述应用程序列表中,包括:Wherein, when the switching event indicates that the application is in the foreground of the terminal, determining whether to add the identification of the application to the application list includes:

在所述切换事件表明应用程序位于终端前台时,若确定应用程序不是系统核心进程的应用程序,则将应用程序的标识添加至所述应用程序列表中;When the switching event indicates that the application is in the foreground of the terminal, if it is determined that the application is not an application of the system core process, the application identification is added to the application list;

或者,or,

在所述切换事件表明应用程序位于终端前台时,若确定应用程序不是白名单中的应用程序,则将应用程序的标识添加至所述应用程序列表中,其中,所述白名单中包括有用户设置的各应用程序的名称。When the switching event indicates that the application is in the foreground of the terminal, if it is determined that the application is not an application in the white list, then add the identification of the application to the application list, wherein the white list includes the user The name of each application that is set.

其中,所述获取应用程序的切换事件,包括:Wherein, the acquisition of the switching event of the application includes:

通过扩展ActivityManagerService提供的监控应用程序的接口,获取应用程序的切换事件。By extending the monitoring application interface provided by ActivityManagerService, the switching event of the application is obtained.

在本步骤中,通过网络防火墙Iptable命令,去设置Netfilter,进而根据各应用程序的标识设置一个应用程序列表。In this step, the Netfilter is set through the Iptable command of the network firewall, and then an application list is set according to the identification of each application.

其中,Iptable为LINUX下网络防火墙的配置工具,Netfilter为Linux内核中控制网络防火墙的模块。通过以下代码过程,去设置应用程序列表,将属于这个应用程序列表的应用程序的网络被限制在终端可以达到的最高网速的5%:Among them, Iptable is a configuration tool of the network firewall under LINUX, and Netfilter is a module controlling the network firewall in the Linux kernel. Through the following code process, set the application list, and limit the network of the application belonging to this application list to 5% of the maximum network speed that the terminal can achieve:

execIptables(V4V6,"-t",REFER_TABLE_NAME,"-A",REFER_CHAIN_NAME,"-o", inf,"-j",TRAFFIC_CHAIN_NAME,NULL); 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", "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); 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);} 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);} 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); }

进而通过以上代码,可以设置出应用程序列表,其中,该应用程序列表可以采用规则链sleep的形式进行表示。Furthermore, through the above code, an application program list can be set, wherein the application program list can be expressed in the form of a rule chain sleep.

具体来说,首先,获取应用程序的切换事件,可以通过扩展ActivityManagerService提供的监控应用程序的接口,去获取应用程序的切换事件,从而可以通过扩展ActivityManagerService提供的监控位于前台的应用程序APP的接口,及时收到应用程序APP切换的事件;然后根据切换事件确定应用程序的包名。其中,应用程序的切换事件指的是应用程序从终端前台切换到终端后台的事件,或者应用程序从终端后台切换至终端前台的事件;在该切换事件中会携带应用程序的包名等等信息。Specifically, first of all, to obtain the switching event of the application program, you can obtain the switching event of the application program by extending the monitoring application program interface provided by the ActivityManagerService, so that you can monitor the application program APP in the foreground by extending the interface provided by the ActivityManagerService, Receive the event of APP switching in time; then determine the package name of the application according to the switching event. Among them, the switching event of the application program refers to the event that the application program switches from the terminal foreground to the terminal background, or the event that the application program switches from the terminal background to the terminal foreground; the switching event will carry information such as the package name of the application .

接着,就可以根据确定出的应用程序APP的包名,去得到该应用程序APP的标识,以对应用程序APP的标识进行操作,例如应用程序APP的标识可以采用uid进行表示。Then, according to the determined package name of the application program APP, the identification of the application program APP can be obtained to operate on the identification program of the application program APP. For example, the identification of the application program APP can be represented by uid.

然后,在确定切换事件表明应用程序APP位于终端前台的时候,此时应用程序APP在终端的前台运行,然后就需要确定是否将该应用程序APP的标识,添加至应用程序列表中。具体来说,在切换事件表明应用程序APP位于终端前台的时候,若确定该应用程序APP不是系统核心进程的应用程序,则将该应用程序APP的标识添加至应用程序列表中;或者,在切换事件表明应用程序位于终端前台时,若确定该应用程序APP不是白名单中的应用程序,则将该应用程序APP的标识添加至应用程序列表中,其中,白名单中具有有用户设置的各应用程序的名称。从而对于后台运行的系统核心进程的应用程序APP,不添加到应用程序列表中;而且允许用户添加白名单,在白名单中、且在后台运行的应用程序,也不加入应用程序列表中。Then, when it is determined that the switching event indicates that the application APP is in the foreground of the terminal, the application APP is running in the foreground of the terminal at this time, and then it is necessary to determine whether to add the identification 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 it is determined that the application program APP is not an application program of the system core process, the identification of the application program APP is added to the application program list; or, when switching When the event indicates that the application program is in the foreground of the terminal, if it is determined that the application program APP is not an application program in the white list, the identification of the application program APP is added to the application program list, wherein the white list has each application with user settings The name of the program. Therefore, the application program APP of the system core process running in the background is not added to the application program list; and the user is allowed to add a white list, and the application program in the white list and running in the background is not added to the application program list.

在切换事件表明应用程序APP不在前台运行的时候,将该应用程序APP的标识,从应用程序列表中移除;从而在切换事件表明应用程序APP从终端前台退出的时候,从应用程序列表中将得到的应用程序APP的标识移除,而将其他应用程序APP添加到应用程序列表中。When the switch event indicates that the application program APP is not running in the foreground, remove the identification of the application program APP from the application program list; thus when the switch event indicates that the application program APP exits from the terminal foreground, remove it from the application program list The identifier of the obtained application APP is removed, and other application programs APP are added to the application program list.

从而通过以上过程去设置应用程序列表。So through the above process to set the application list.

举例来说,在切换事件表明应用程序APP位于终端前台的时候,若确定该应用程序APP不是系统核心进程的应用程序,则将该应用程序APP的标识uid添加至规则链sleep中;或者,在切换事件表明应用程序位于终端前台时,若确定该应用程序APP不是白名单中的应用程序,则将该应用程序APP的标识uid添加至规则链sleep中。在切换事件表明应用程序APP不在前台运行的时候,将该应用程序APP的标识uid,从规则链sleep中移除。For example, when the switching event indicates that the application program APP is in the foreground of the terminal, if it is determined that the application program APP is not an application program of the system core process, the identification uid of the application program APP is added to the rule chain sleep; or, in When the switching event indicates that the application program is in the foreground of the terminal, if it is determined that the application program APP is not an application program in the white list, the identification uid of the application program APP is added to the rule chain sleep. When the switching event indicates that the application APP is not running in the foreground, the identification uid of the application APP is removed from the rule chain sleep.

本实施例通过网络防火墙并根据各应用程序的标识,设置应用程序列表,其中,应用程序列表中包括至少一个被限制网速的应用程序的标识;将与应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。从而可以限制应用程序的网速,保证前台程序的网络访问,不需要杀死其他进程的方式去保证前台的应用程序的网速,不会影响到终端上其他服务的运行和使用,从而使得很多服务可以正常被使用,提高用户体检。从而可以通过扩展ActivityManagerService提供的监控应用程序的接口,获取应用程序的切换事件,进而获取到应用程序的标识,然后通过Linux内核Netfiler提供的网络管理机制控制后台应用程序的网速,将应用程序限制为后台程序的最高网速,进而保证前台程序的网络访问;不需要杀死其他进程的方式去保证前台的应用程序的网速,不会影响到终端上其他服务的运行和使用,从而使得很多服务可以正常被使用,提高用户体检。In this embodiment, the application program list is set through the network firewall and according to the identification of each application program, wherein the application program list includes the identification of at least one application program whose network speed is limited; it will correspond to the application program identification in the application program list The network speed of the application is limited to the preset ratio of the network speed of the terminal. In this way, the network speed of the application program can be limited, the network access of the foreground program can be guaranteed, and the network speed of the application program in the foreground does not need to be killed by killing other processes, which will not affect the operation and use of other services on the terminal, thus making many The service can be used normally, improving the user's physical examination. Therefore, by extending the monitoring application interface provided by ActivityManagerService, the switching event of the application program can be obtained, and then the identification of the application program can be obtained, and then the network speed of the background application program can be controlled through the network management mechanism provided by the Linux kernel Netfiler, and the application program can be limited. It is the highest network speed of the background program, thereby ensuring the network access of the foreground program; it does not need to kill other processes to ensure the network speed of the foreground application program, and will not affect the operation and use of other services on the terminal, thus making many The service can be used normally, improving the user's physical examination.

图3是根据一示例性实施例示出的一种应用程序的网速处理装置实施例三的框图。参照图3,该装置包括:Fig. 3 is a block diagram of Embodiment 3 of an application program network speed processing device according to an exemplary embodiment. Referring to Figure 3, the device includes:

确定模块31,被配置为设置应用程序列表,所述应用程序列表中包括至少一个被限制网速的应用程序的标识;The determination module 31 is configured to set an application program list, the application program list includes at least one identification of the application program whose network speed is limited;

限制模块32,被配置为将与所述应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。The limiting module 32 is configured to limit the network speed of the application program corresponding to the identification of the application program in the application program list to a preset ratio of the network speed of the terminal.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

本实施例通过设置应用程序列表,应用程序列表中包括至少一个被限制网速的应用程序的标识;将与应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。从而可以限制应用程序的网速,保证前台程序的网络访问,不需要杀死其他进程的方式去保证前台的应用程序的网速,不会影响到终端上其他服务的运行和使用,从而使得很多服务可以正常被使用,提高用户体检。In this embodiment, by setting the application program list, the application program list includes at least one application program whose network speed is limited; the network speed of the application program corresponding to the application program identification in the application program list is limited to the network speed of the terminal. The preset ratio of network speeds. In this way, the network speed of the application program can be limited, the network access of the foreground program can be guaranteed, and the network speed of the application program in the foreground does not need to be killed by killing other processes, which will not affect the operation and use of other services on the terminal, thus making many The service can be used normally, improving the user's physical examination.

在上述图3所示的实施例的基础上,图4是根据一示例性实施例示出的一种应用程序的网速处理装置实施例四的框图。参照图4,该装置还包括:On the basis of the above embodiment shown in FIG. 3 , FIG. 4 is a block diagram of Embodiment 4 of an application program network speed processing device according to an exemplary embodiment. Referring to Figure 4, the device also includes:

设置模块41,被配置为通过网络防火墙并根据各应用程序的标识,设置所述应用程序列表。The setting module 41 is configured to set the application program list through the network firewall and according to the identification of each application program.

所述设置模块41,被具体配置为:The setting module 41 is specifically configured as:

获取子模块411,被配置为获取应用程序的切换事件,并根据所述切换事件确定应用程序的包名;The obtaining sub-module 411 is configured to obtain the switching event of the application program, and determine the package name of the application program according to the switching event;

确定子模块412,被配置为根据所述应用程序的包名,确定应用程序的标识;The determining submodule 412 is configured to determine the identifier of the application program according to the package name of the application program;

设置子模块413,被配置为在所述切换事件表明应用程序位于终端前台时,确定是否将应用程序的标识添加至所述应用程序列表中,在所述切换事件表明应用程序位于终端后台时,将应用程序的标识从所述应用程序列表中移除,以设置所述应用程序列表。The setting submodule 413 is configured to determine whether to add the identification of the application to the application list when the switching event indicates that the application is in the foreground of the terminal, and when the switching event indicates that the application is in the background of the terminal, An identification of an application is removed from the application list to set the application list.

其中,所述设置子模块413,被配置为:Wherein, the setting submodule 413 is configured as:

在所述切换事件表明应用程序位于终端前台时,若确定应用程序不是系统核心进程的应用程序,则将应用程序的标识添加至所述应用程序列表中;When the switching event indicates that the application is in the foreground of the terminal, if it is determined that the application is not an application of the system core process, the application identification is added to the application list;

或者,or,

在所述切换事件表明应用程序位于终端前台时,若确定应用程序不是白名单中的应用程序,则将应用程序的标识添加至所述应用程序列表中,其中,所述白名单中包括有用户设置的各应用程序的名称。When the switching event indicates that the application is in the foreground of the terminal, if it is determined that the application is not an application in the white list, then add the identification of the application to the application list, wherein the white list includes the user The name of each application that is set.

所述获取子模块411,被具体配置为:The acquiring submodule 411 is specifically configured as:

通过扩展ActivityManagerService提供的监控应用程序的接口,获取应用程序的切换事件。By extending the monitoring application interface provided by ActivityManagerService, the switching event of the application is obtained.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

本实施例通过网络防火墙并根据各应用程序的标识,设置应用程序列表,其中,应用程序列表中包括至少一个被限制网速的应用程序的标识;将与应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。从而可以限制应用程序的网速,保证前台程序的网络访问,不需要杀死其他进程的方式去保证前台的应用程序的网速,不会影响到终端上其他服务的运行和使用,从而使得很多服务可以正常被使用,提高用户体检。从而可以通过扩展ActivityManagerService提供的监控应用程序的接口,获取应用程序的切换事件,进而获取到应用程序的标识,然后通过Linux内核Netfiler提供的网络管理机制控制后台应用程序的网速,将应用程序限制为后台程序的最高网速,进而保证前台程序的网络访问;不需要杀死其他进程的方式去保证前台的应用程序的网速,不会影响到终端上其他服务的运行和使用,从而使得很多服务可以正常被使用,提高用户体检。In this embodiment, the application program list is set through the network firewall and according to the identification of each application program, wherein the application program list includes the identification of at least one application program whose network speed is limited; it will correspond to the application program identification in the application program list The network speed of the application is limited to the preset ratio of the network speed of the terminal. In this way, the network speed of the application program can be limited, the network access of the foreground program can be guaranteed, and the network speed of the application program in the foreground does not need to be killed by killing other processes, which will not affect the operation and use of other services on the terminal, thus making many The service can be used normally, improving the user's physical examination. Therefore, by extending the monitoring application interface provided by ActivityManagerService, the switching event of the application program can be obtained, and then the identification of the application program can be obtained, and then the network speed of the background application program can be controlled through the network management mechanism provided by the Linux kernel Netfiler, and the application program can be limited. It is the highest network speed of the background program, thereby ensuring the network access of the foreground program; it does not need to kill other processes to ensure the network speed of the foreground application program, and will not affect the operation and use of other services on the terminal, so that many The service can be used normally, improving the user's physical examination.

图5是根据一示例性实施例示出的一种终端的实体的框图。参照图5,该终端可以具体实现为:处理器71,以及被配置为存储处理器可执行指令的存储器72;Fig. 5 is a block diagram showing entities of a terminal according to an exemplary embodiment. Referring to FIG. 5, the terminal may be specifically implemented as: a processor 71, and a memory 72 configured to store instructions executable by the processor;

其中,所述处理器71被配置为:设置应用程序列表,所述应用程序列表中包括至少一个被限制网速的应用程序的标识;将与所述应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。Wherein, the processor 71 is configured to: set an application program list, the application program list includes at least one identification of the application program whose network speed is limited; The network speed of the application is limited to the preset ratio of the network speed of the terminal.

在上述实施例中,应理解,该处理器可以是中央处理单元(英文:CentralProcessing Unit,简称:CPU),还可以是其他通用处理器、数字信号处理器(英文:DigitalSignal Processor,简称:DSP)、专用集成电路(英文:Application Specific IntegratedCircuit,简称:ASIC)等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,而前述的存储器可以是只读存储器(英文:read-only memory,缩写:ROM)、随机存取存储器(英文:random access memory,简称:RAM)、快闪存储器、硬盘或者固态硬盘。SIM卡也称为用户身份识别卡、智能卡,数字移动电话机必须装上此卡方能使用。即在电脑芯片上存储了数字移动电话客户的信息,加密的密钥以及用户的电话簿等内容。结合本发明实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。In the foregoing embodiments, it should be understood that the processor may be a central processing unit (English: Central Processing Unit, referred to as: CPU), and may also be other general-purpose processors, digital signal processors (English: DigitalSignal Processor, referred to as: DSP) , Application Specific Integrated Circuit (English: Application Specific Integrated Circuit, referred to as: ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., and the aforementioned memory can be a read-only memory (English: read-only memory, abbreviated: ROM), random access memory (English: : random access memory, referred to as: RAM), flash memory, hard disk or solid state disk. SIM card is also known as subscriber identification card, smart card, digital mobile phone must be equipped with this card before it can be used. That is, the information of the digital mobile phone customer, the encrypted key and the user's phone book are stored on the computer chip. The steps of the methods disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.

关于上述实施例中的终端,其中各个模块执行操作的具体方式已经在有关该方法和装置的实施例中进行了详细描述,此处将不做详细阐述说明。With regard to the terminal in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments of the method and apparatus, and will not be described in detail here.

本实施例通过设置应用程序列表,应用程序列表中包括至少一个被限制网速的应用程序的标识;将与应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。从而可以限制应用程序的网速,保证前台程序的网络访问,不需要杀死其他进程的方式去保证前台的应用程序的网速,不会影响到终端上其他服务的运行和使用,从而使得很多服务可以正常被使用,提高用户体检。In this embodiment, by setting the application program list, the application program list includes at least one application program whose network speed is limited; the network speed of the application program corresponding to the application program identification in the application program list is limited to the network speed of the terminal. The preset proportional network speed of the network speed. In this way, the network speed of the application program can be limited, the network access of the foreground program can be guaranteed, and the network speed of the application program in the foreground does not need to be killed by killing other processes, which will not affect the operation and use of other services on the terminal, thus making many The service can be used normally, improving the user's physical examination.

图6是根据一示例性实施例示出的一种终端设备800的框图。例如,终端设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Fig. 6 is a block diagram showing a terminal device 800 according to an exemplary 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.

参照图6,终端设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。Referring to FIG. 6 , terminal device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814 , and the communication component 816.

处理组件802通常控制终端设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operations of the terminal device 800, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802 .

存储器804被配置为存储各种类型的数据以支持在终端设备800的操作。这些数据的示例包括用于在终端设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。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 the terminal device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 can be implemented by any type of volatile or non-volatile storage device or their combination, 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 Disk.

电源组件806为终端设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为终端设备800生成、管理和分配电力相关联的组件。The power supply component 806 provides power to various components of the terminal device 800 . Power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for end device 800 .

多媒体组件808包括在所述终端设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当终端设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 808 includes a screen providing an output interface between the terminal device 800 and the 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 input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 808 includes a front camera and/or a rear 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 can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.

音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当终端设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is 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. Received audio signals may be further stored in memory 804 or sent via communication component 816 . In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.

传感器组件814包括一个或多个传感器,用于为终端设备800提供各个方面的状态评估。例如,传感器组件814可以检测到终端设备800的打开/关闭状态,组件的相对定位,例如所述组件为终端设备800的显示器和小键盘,传感器组件814还可以检测终端设备800或终端设备800一个组件的位置改变,用户与终端设备800接触的存在或不存在,终端设备800方位或加速/减速和终端设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。The sensor component 814 includes one or more sensors for providing status assessment of various aspects of the terminal device 800 . For example, the sensor component 814 can detect the opening/closing state of the terminal device 800, the relative positioning of the components, for example, the components are the display and the keypad of the terminal device 800, and the sensor component 814 can also detect the terminal device 800 or a terminal device 800 Changes in the positions of components, presence or absence of user contact with the terminal device 800 , orientation or acceleration/deceleration of the terminal device 800 and temperature changes of the terminal device 800 . Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

通信组件816被配置为便于终端设备800和其他设备之间有线或无线方式的通信。终端设备800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 816 is configured to facilitate wired or wireless communications between the terminal device 800 and other devices. The terminal device 800 can access a wireless network based on communication standards, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

在示例性实施例中,终端设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, 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 A programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.

在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器804,上述指令可由终端设备800的处理器820执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as a memory 804 including instructions, which can be executed by the processor 820 of the terminal device 800 to complete the above method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.

一种非临时性计算机可读存储介质,当所述存储介质中的指令由移动终端的处理器执行时,使得移动终端能够执行一种应用程序的网速处理方法,所述方法包括:A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the mobile terminal, the mobile terminal can execute a network-speed processing method of an application program, the method comprising:

设置应用程序列表,所述应用程序列表中包括至少一个被限制网速的应用程序的标识;An application program list is set, and the application program list includes at least one identification of an application program whose network speed is limited;

将与所述应用程序列表中的应用程序的标识对应的应用程序的网速,限制为终端的网速的预设比例网速。Limiting the network speed of the application program corresponding to the application program identifier in the application program list to a preset ratio of the network speed of the terminal.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。Other embodiments of the invention will be readily 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 modification, use or adaptation of the present invention, these modifications, uses or adaptations follow the general principles of the present invention and include common knowledge or conventional technical means in the technical field not disclosed in this disclosure . The specification and examples are to be considered exemplary only, with a true scope and spirit of the invention being indicated by the following claims.

应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。It should be understood that the present invention is not limited to the precise constructions which have been described above and shown in the accompanying drawings, and 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 (11)

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;
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.
2. The method of claim 1, further comprising:
and setting the application program list through a network firewall according to the identification of each application program.
3. The method according to claim 2, wherein the setting the application list according to the identifier of each application 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;
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.
4. The method of claim 3, wherein determining whether to add an identification of an application to the list of applications when the handover event indicates that the application is located in the foreground of the terminal comprises:
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;
or,
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.
5. The method of claim 3 or 4, wherein the obtaining the switching event of the application program comprises:
and acquiring a switching event of the application program by expanding an interface of the monitoring application program provided by the ActivityManagerService.
6. 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;
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.
7. The apparatus of claim 6, further comprising:
and the setting module is configured to set the application program list through a network firewall according to the identification of each application program.
8. The apparatus of claim 7, wherein the setup 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.
9. The apparatus of claim 8, wherein the settings 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;
or,
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.
10. The apparatus according to claim 8 or 9, wherein 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.
11. 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; 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.
CN201710330723.1A 2017-05-11 2017-05-11 Application program network speed processing method, device and terminal Expired - Fee Related CN107205084B (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (2)

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

Family

ID=59905678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710330723.1A Expired - Fee Related CN107205084B (en) 2017-05-11 2017-05-11 Application program network speed processing method, device and terminal

Country Status (1)

Country Link
CN (1) CN107205084B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108040330A (en) * 2017-11-30 2018-05-15 努比亚技术有限公司 WiFi directional transmission methods, mobile terminal and readable storage medium storing program for executing
CN108156632A (en) * 2017-12-22 2018-06-12 奇酷互联网络科技(深圳)有限公司 Control the method, apparatus and mobile terminal of WiFi network speeds
CN108391307A (en) * 2018-02-09 2018-08-10 北京小米移动软件有限公司 Power consumption management-control method, device and storage medium based on android system
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
CN110505660A (en) * 2019-07-23 2019-11-26 维沃移动通信有限公司 A network rate adjustment method and terminal equipment
CN112564939A (en) * 2020-11-11 2021-03-26 深圳市友华通信技术有限公司 Gateway control method, computer device, and storage medium
CN114024717A (en) * 2021-10-09 2022-02-08 深圳市广和通无线股份有限公司 Application program flow control method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100064230A1 (en) * 2008-09-09 2010-03-11 Applied Systems, Inc. Method and apparatus for remotely displaying screen files and efficiently handling remote operator input
CN104125269A (en) * 2014-06-30 2014-10-29 广州酷狗计算机科技有限公司 Speed limiting method and device
CN105159781A (en) * 2015-08-25 2015-12-16 广东欧珀移动通信有限公司 Method, device and intelligent terminal for adjusting application network speed of intelligent terminal
US20160035392A1 (en) * 2012-11-22 2016-02-04 Didja, Inc. Systems and methods for clipping video segments
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
CN106095547A (en) * 2016-06-03 2016-11-09 北京小米移动软件有限公司 Application program networking control method and device
CN106453150A (en) * 2016-10-11 2017-02-22 东软集团股份有限公司 Traffic control method and device
CN106533988A (en) * 2016-10-26 2017-03-22 维沃移动通信有限公司 Control method for network speed of application and mobile terminal

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100064230A1 (en) * 2008-09-09 2010-03-11 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
CN104125269A (en) * 2014-06-30 2014-10-29 广州酷狗计算机科技有限公司 Speed limiting method and device
CN105159781A (en) * 2015-08-25 2015-12-16 广东欧珀移动通信有限公司 Method, device and intelligent terminal for adjusting application network speed of intelligent terminal
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
CN106095547A (en) * 2016-06-03 2016-11-09 北京小米移动软件有限公司 Application program networking control method and device
CN106453150A (en) * 2016-10-11 2017-02-22 东软集团股份有限公司 Traffic control method and device
CN106533988A (en) * 2016-10-26 2017-03-22 维沃移动通信有限公司 Control method for network speed of application and mobile terminal

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108040330A (en) * 2017-11-30 2018-05-15 努比亚技术有限公司 WiFi directional transmission methods, mobile terminal and readable storage medium storing program for executing
CN108156632A (en) * 2017-12-22 2018-06-12 奇酷互联网络科技(深圳)有限公司 Control the method, apparatus and mobile terminal of WiFi network speeds
CN108391307A (en) * 2018-02-09 2018-08-10 北京小米移动软件有限公司 Power consumption management-control method, device and storage medium based on android system
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
CN110505660A (en) * 2019-07-23 2019-11-26 维沃移动通信有限公司 A network rate adjustment method and terminal equipment
CN110505660B (en) * 2019-07-23 2023-07-14 维沃移动通信有限公司 A network rate adjustment method and terminal equipment
CN112564939A (en) * 2020-11-11 2021-03-26 深圳市友华通信技术有限公司 Gateway control method, computer device, and storage medium
CN112564939B (en) * 2020-11-11 2023-06-06 深圳市友华通信技术有限公司 Gateway control method, computer device, and storage medium
CN114024717A (en) * 2021-10-09 2022-02-08 深圳市广和通无线股份有限公司 Application program flow control method, device, equipment and storage medium
CN114024717B (en) * 2021-10-09 2024-04-05 深圳市广和通无线股份有限公司 Control method, device, equipment and storage medium for application program flow

Also Published As

Publication number Publication date
CN107205084B (en) 2020-12-18

Similar Documents

Publication Publication Date Title
CN107205084B (en) Application program network speed processing method, device and terminal
WO2017113666A1 (en) Application interface switching method and device
US20170060260A1 (en) Method and device for connecting external equipment
CN107094094B (en) Application networking method and device and terminal
CN107102772A (en) Touch control method and device
CN105704766A (en) Control method and device of double-card mobile terminal
US20170293494A1 (en) Method and device for starting application interface
CN106101433A (en) Notification message display packing and device
CN106528385A (en) System fluency monitoring method and apparatus, and terminal
CN106537288A (en) Application autostart control method and device
CN106201250A (en) Account changing method and device
CN106465160A (en) Network function switching method and device
CN107371222B (en) Virtual card disabling method and device
CN106648392B (en) The method and device of pasting data
CN105786561B (en) Method and device for calling process
CN106293717A (en) The processing method of the setting of terminal, device and terminal
CN107295462A (en) Wireless connection control method and device
CN106790450B (en) Method for caching and processing, device and server
CN106658668A (en) Information processing method and device
CN106708930A (en) Application page refreshing method and application page refreshing device
CN107070816B (en) Application identification method, device and mobile terminal
CN106060104A (en) Application management method and device
CN107203315A (en) Processing method, device and the terminal of click event
CN106777052A (en) Using method for pushing, device and terminal
CN106663173A (en) Safety scanning method and device and electronic 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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201218