Movatterモバイル変換


[0]ホーム

URL:


CN106533988A - Control method for network speed of application and mobile terminal - Google Patents

Control method for network speed of application and mobile terminal
Download PDF

Info

Publication number
CN106533988A
CN106533988ACN201610951605.8ACN201610951605ACN106533988ACN 106533988 ACN106533988 ACN 106533988ACN 201610951605 ACN201610951605 ACN 201610951605ACN 106533988 ACN106533988 ACN 106533988A
Authority
CN
China
Prior art keywords
network speed
real
mobile terminal
occupied
time
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
CN201610951605.8A
Other languages
Chinese (zh)
Other versions
CN106533988B (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co LtdfiledCriticalVivo Mobile Communication Co Ltd
Priority to CN201610951605.8ApriorityCriticalpatent/CN106533988B/en
Publication of CN106533988ApublicationCriticalpatent/CN106533988A/en
Application grantedgrantedCritical
Publication of CN106533988BpublicationCriticalpatent/CN106533988B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明提供了一种应用程序网速的控制方法,应用于移动终端,属于移动通信技术领域。所述方法包括:获取所述移动终端的实时网速;确定在所述移动终端前台运行的第一前台应用程序所占用的实时网速;根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序占用的实时网速。本发明还提供了一种移动终端。通过本发明提供的方法,调整所述移动终端上运行的后台应用程序占用的实时网速,以将更多的实时网速分配给第一前台应用程序,以保证第一前台应用程序运行的流畅性,解决了现有技术中前台应用程序无法流畅运行的问题。

The invention provides a method for controlling the network speed of an application program, which is applied to a mobile terminal and belongs to the technical field of mobile communication. The method includes: obtaining the real-time network speed of the mobile terminal; determining the real-time network speed occupied by the first foreground application running in the foreground of the mobile terminal; according to the real-time network speed of the mobile terminal and the first The real-time network speed occupied by the foreground application program adjusts the real-time network speed occupied by at least one background application program running in the background of the mobile terminal. The invention also provides a mobile terminal. Through the method provided by the present invention, adjust the real-time network speed occupied by the background application program running on the mobile terminal, so as to allocate more real-time network speed to the first foreground application program, so as to ensure the smooth operation of the first foreground application program The invention solves the problem that the foreground application program cannot run smoothly in the prior art.

Description

Translated fromChinese
一种应用程序网速的控制方法及移动终端Application program network speed control method and mobile terminal

技术领域technical field

本发明涉及移动通信技术领域,尤其涉及一种应用程序网速的控制方法及移动终端。The invention relates to the technical field of mobile communication, in particular to a method for controlling network speed of an application program and a mobile terminal.

背景技术Background technique

随着移动终端的普及,进一步加速了移动互联网时代的发展,在移动终端领域,出现了越来越多的基于互联网的应用程序。如视频应用、音乐应用、社交应用、游戏、新闻阅读浏览器、云盘类的存储应用等。移动终端上越来越多的应用都需要联网运行,包括应用程序本身也需要联网进行版本更新。因此,在同一时刻,移动终端上可能存在多个应用在联网运行,与应用服务器进行数据交互。With the popularization of mobile terminals, the development of the mobile Internet era is further accelerated, and more and more Internet-based applications appear in the field of mobile terminals. Such as video applications, music applications, social applications, games, news reading browsers, storage applications such as cloud disks, etc. More and more applications on mobile terminals need to run on the Internet, including the application itself also needs to be updated on the Internet. Therefore, at the same time, there may be multiple applications on the mobile terminal running on the network and exchanging data with the application server.

然而,在网络带宽不充足或不稳定的情况下,受网速的影响,移动终端上的前台应用,如浏览器、视频应用等,在与网络侧的服务器端进行数据交互时,经常会出现加载缓慢、图片加载失败,或者卡顿等情况,严重影响了用户体验。However, when the network bandwidth is insufficient or unstable, due to the influence of the network speed, foreground applications on the mobile terminal, such as browsers, video applications, etc., often appear when interacting with the server on the network side. Slow loading, failure to load pictures, or freezing, etc., seriously affect the user experience.

可见,现有技术中在网速受限的情况下,无法保证前台应用程序的流畅运行。It can be seen that in the prior art, the smooth operation of the foreground application program cannot be guaranteed under the condition that the network speed is limited.

发明内容Contents of the invention

本发明提供一种应用程序网速的控制方法及移动终端,解决现有技术中在网速受限的情况下,导致前台应用程序无法流畅运行的问题。The invention provides a method for controlling the network speed of an application program and a mobile terminal, which solves the problem in the prior art that the foreground application program cannot run smoothly when the network speed is limited.

第一方面,本发明实施例提供了一种应用程序网速的控制方法,应用于移动终端,包括:In the first aspect, the embodiment of the present invention provides a method for controlling the network speed of an application program, which is applied to a mobile terminal, including:

获取所述移动终端的实时网速;Obtain the real-time network speed of the mobile terminal;

确定在所述移动终端前台运行的第一前台应用程序所占用的实时网速;Determine the real-time network speed occupied by the first foreground application running in the foreground of the mobile terminal;

根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速。Adjusting the real-time network speed occupied by at least one background application running in the background of the mobile terminal according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application.

第二方面,本发明实施例还提供了一种移动终端,包括:In a second aspect, the embodiment of the present invention also provides a mobile terminal, including:

实时网速获取模块,用于获取所述移动终端的实时网速;A real-time network speed acquisition module, configured to obtain the real-time network speed of the mobile terminal;

前台应用确定模块,用于确定在所述移动终端前台运行的第一前台应用程序所占用的实时网速;A foreground application determining module, configured to determine the real-time network speed occupied by the first foreground application running in the foreground of the mobile terminal;

网速调整模块,用于根据所述实时网速获取模块获取的所述移动终端的实时网速和所述前台应用确定模块确定的第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速。The network speed adjustment module is used to adjust the real-time network speed of the mobile terminal obtained by the real-time network speed acquisition module and the real-time network speed occupied by the first foreground application determined by the foreground application determination module. The real-time network speed occupied by at least one background application running in the background of the mobile terminal.

本发明实施例公开的应用程序网速的控制方法,通过获取所述移动终端的实时网速,然后确定在所述移动终端前台运行的第一前台应用程序所占用所述实时网速,最后,根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速,以将更多的实时网速分配给第一前台应用程序,以保证第一前台应用程序运行的流畅性。另一方面,通过动态调整后台应用程序所占用的实时网速,也保障了具有网速要求的后台应用程序的流畅运行。The application program network speed control method disclosed in the embodiment of the present invention obtains the real-time network speed of the mobile terminal, then determines the real-time network speed occupied by the first foreground application program running in the foreground of the mobile terminal, and finally, According to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application program, adjust the real-time network speed occupied by at least one background application program running in the background of the mobile terminal, so that more The real-time network speed is assigned to the first foreground application to ensure the smooth operation of the first foreground application. On the other hand, by dynamically adjusting the real-time network speed occupied by background applications, the smooth operation of background applications with network speed requirements is also guaranteed.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对本发明的实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required in the embodiments of the present invention. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1是本发明实施例一的应用程序网速的控制方法的流程图;FIG. 1 is a flow chart of a method for controlling network speed of an application program in Embodiment 1 of the present invention;

图2是本发明实施例二的应用程序网速的控制方法的流程图;FIG. 2 is a flow chart of a method for controlling the network speed of an application program in Embodiment 2 of the present invention;

图3是本发明实施例三的应用程序网速的控制方法的流程图;FIG. 3 is a flow chart of a method for controlling the network speed of an application program according to Embodiment 3 of the present invention;

图4是本发明实施例四的移动终端的结构图之一;FIG. 4 is one of the structural diagrams of the mobile terminal according to Embodiment 4 of the present invention;

图5是本发明实施例四的移动终端的结构图之二;FIG. 5 is the second structural diagram of the mobile terminal according to Embodiment 4 of the present invention;

图6是本发明实施例四的移动终端的结构图之三;FIG. 6 is the third structural diagram of the mobile terminal according to the fourth embodiment of the present invention;

图7是本发明实施例四的移动终端的结构图之四;FIG. 7 is a fourth structural diagram of a mobile terminal according to Embodiment 4 of the present invention;

图8是本发明实施例五的移动终端结构图;FIG. 8 is a structural diagram of a mobile terminal according to Embodiment 5 of the present invention;

图9是本发明实施例六的移动终端结构图。FIG. 9 is a structural diagram of a mobile terminal according to Embodiment 6 of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

实施例一:Embodiment one:

本实施例提供了一种应用程序网速的控制方法,如图1所示,该方法包括:步骤100至步骤120。This embodiment provides a method for controlling the network speed of an application program. As shown in FIG. 1 , the method includes: Step 100 to Step 120 .

步骤100,获取所述移动终端的实时网速。Step 100, acquiring the real-time network speed of the mobile terminal.

获取所述移动终端的实时网速具体为获取所述移动终端的所有TCP/IP网络端口的网速之和。本发明的实施例中,以获取下行网速为例说明获取移动终端的实时网速的具体方法。具体实施时,可以通过向每个TCP/IP网络端口发送测试数据包,申请下载数据;然后统计每个TCP/IP网络端口单位时间内下载数据量,将所有TCP/IP网络端口单位时间内下载数据量的总和,作为所述移动终端在当前网络连接状态下的最大实时网速。Acquiring the real-time network speed of the mobile terminal is specifically obtaining the sum of network speeds of all TCP/IP network ports of the mobile terminal. In the embodiment of the present invention, a specific method for obtaining a real-time network speed of a mobile terminal is described by taking obtaining a downlink network speed as an example. During specific implementation, you can apply for downloading data by sending a test packet to each TCP/IP network port; then count the amount of data downloaded per unit time of each TCP/IP network port, and download The sum of the amount of data is used as the maximum real-time network speed of the mobile terminal in the current network connection state.

步骤110,确定在所述移动终端前台运行的第一前台应用程序所占用的实时网速。Step 110, determining the real-time network speed occupied by the first foreground application running in the foreground of the mobile terminal.

首先,确定所述移动终端上运行的应用程序中占用所述实时网速的所有应用程序。具体实施时,当移动终端的应用程序调用操作系统提供的网络接口进行数据传输时,通过在所述网络接口注册监控事件或钩子函数,可以获得占用网速的应用程序的标识,如应用程序名,以及,该应用程序所占用的TCP/IP端口。通过调用操作系统提供的网络接口,还可以获取每个TCP/IP端口的网速。然后,在占用所述实时网速的所有应用程序中确定占用所述实时网速的在前台运行的第一前台应用程序。确定在移动终端前台运行的应用程序的具体方案参见现有技术。通过将确定的第一前台应用程序的标识与确定的占用所述实时网速的所有应用程序的标识进行匹配,即可以确定第一前台应用程序是否占用实时网速,也即确定了所述移动终端上运行的占用实时网速的第一前台应用程序。在实际应用中,每个应用程序可能在占用多个TCP/IP端口进行数据传输,每个应用程序占用的实时网速为该应用程序占用的所有TCP/IP端口的网速之和。通过计算所述第一前台应用程序占用的所有TCP/IP端口的网速之和得到所述第一前台应用程序所占用的实时网速。First, among the application programs running on the mobile terminal, all the application programs occupying the real-time network speed are determined. During specific implementation, when the application program of the mobile terminal calls the network interface provided by the operating system for data transmission, by registering monitoring events or hook functions in the network interface, the identification of the application program occupying the network speed can be obtained, such as the application program name , and, the TCP/IP port used by the application. By calling the network interface provided by the operating system, you can also obtain the network speed of each TCP/IP port. Then, among all the application programs occupying the real-time network speed, the first foreground application program running in the foreground occupying the real-time network speed is determined. For a specific solution of determining the application program running in the foreground of the mobile terminal, refer to the prior art. By matching the determined identifier of the first foreground application program with the determined identifiers of all applications occupying the real-time network speed, it can be determined whether the first foreground application program occupies the real-time network speed, that is, it is determined that the mobile The first foreground application running on the terminal that consumes real-time internet speed. In practical applications, each application may occupy multiple TCP/IP ports for data transmission, and the real-time network speed occupied by each application is the sum of the network speeds of all TCP/IP ports occupied by the application. The real-time network speed occupied by the first foreground application is obtained by calculating the sum of network speeds of all TCP/IP ports occupied by the first foreground application.

步骤120,根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速。Step 120: Adjust the real-time network speed occupied by at least one background application running in the background of the mobile terminal according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application.

在确定占用实时网速的应用程序中存在第一前台应用程序之后,进一步根据所述移动终端的实时网速、所述第一前台应用程序所占用的实时网速判断是否需要对占用实时网速的后台应用程序进行控制,以减小后台应用程序占用的实时网速,将更多的实时网速分配给第一前台应用程序,以保证前台应用程序运行的流畅性,进一步提升了用户体验。具体实施时,可以通过暂停至少一个后台应用程序或者降低至少一个后台应用程序所占用的实时网速等方式减小后台应用程序占用的实时网速。After determining that there is a first foreground application program in the application program occupying the real-time network speed, it is further judged according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application program whether it is necessary to use the real-time network speed The background application program is controlled to reduce the real-time network speed occupied by the background application program, and more real-time network speed is allocated to the first foreground application program to ensure the smooth operation of the foreground application program and further improve the user experience. During specific implementation, the real-time network speed occupied by the background application program can be reduced by suspending at least one background application program or reducing the real-time network speed occupied by the at least one background application program.

本发明实施例公开的应用程序网速的控制方法,通过获取所述移动终端的实时网速,然后确定在所述移动终端前台运行的第一前台应用程序所占用所述实时网速,最后,根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速,以将更多的实时网速分配给第一前台应用程序,以保证第一前台应用程序运行的流畅性。另一方面,通过动态调整后台应用程序所占用的实时网速,也保障了具有网速要求的后台应用程序的流畅运行。The application program network speed control method disclosed in the embodiment of the present invention obtains the real-time network speed of the mobile terminal, then determines the real-time network speed occupied by the first foreground application program running in the foreground of the mobile terminal, and finally, According to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application program, adjust the real-time network speed occupied by at least one background application program running in the background of the mobile terminal, so that more The real-time network speed is assigned to the first foreground application to ensure the smooth operation of the first foreground application. On the other hand, by dynamically adjusting the real-time network speed occupied by background applications, the smooth operation of background applications with network speed requirements is also guaranteed.

实施例二:Embodiment two:

参见图2,本实施例提供了一种应用程序网速的控制方法,该方法包括:步骤200至步骤230。Referring to FIG. 2 , this embodiment provides a method for controlling the network speed of an application program, and the method includes: Step 200 to Step 230 .

步骤200,检测移动终端的网络连接状态是否发生变化,若是,执行步骤210,否则结束。Step 200, detect whether the network connection status of the mobile terminal changes, if yes, execute step 210, otherwise end.

所述网络连接状态发生变化包括:开启移动网络、连接WIFI、从第一网络切换至第二网络中的至少一种。所述获取所述移动终端的实时网速的步骤之前,所述方法还包括:检测移动终端的网络连接状态;若检测到所述网络连接状态发生变化,则执行所述获取所述移动终端的实时网速的步骤。比如,当移动终端发生从GSM数据网络进入到无线网络,或移动终端开启4G网络,或移动终端接入网线等网络状态变化时,移动终端接入网络的网速通常会发生变化。移动终端的网络连接模块实时监测移动终端的网络连接状态,包括移动终端的网络接口接入网络设备的连接和断开状态、移动终端的网络设置的开启和关闭、连接状态等的网络连接状态的变化。The change in the network connection status includes: at least one of turning on the mobile network, connecting to WIFI, and switching from the first network to the second network. Before the step of obtaining the real-time network speed of the mobile terminal, the method further includes: detecting the network connection status of the mobile terminal; if it is detected that the network connection status changes, then performing the step of obtaining the mobile terminal Steps for real-time internet speed. For example, when the mobile terminal enters the wireless network from the GSM data network, or the mobile terminal turns on the 4G network, or the mobile terminal accesses the network cable and other network status changes, the network speed at which the mobile terminal accesses the network usually changes. The network connection module of the mobile terminal monitors the network connection status of the mobile terminal in real time, including the connection and disconnection status of the network interface of the mobile terminal accessing the network device, the opening and closing of the network setting of the mobile terminal, and the connection status of the network connection status, etc. Variety.

步骤210,获取所述移动终端的实时网速。Step 210, acquiring the real-time network speed of the mobile terminal.

所述获取所述移动终端的实时网速包括:获取所述移动终端至少三个时间段内的网速;基于所述至少三个时间段内的网速,判断所述移动终端的网速是否稳定;若网速稳定,则将所述三个时间段内的网速的平均值确定为所述移动终端的实时网速;若网速不稳定,则将所述至少三个时间段中取值最大的网速确定为所述移动终端的实时网速。本发明的实施例中,以获取下行网速为例说明获取移动终端的实时网速的具体方法。具体实施时,可以通过向每个TCP/IP网络端口发送测试数据包,申请下载数据;然后统计每个TCP/IP网络端口单位时间内下载数据量,将所有TCP/IP网络端口单位时间内下载数据量的总和,作为所述移动终端在当前网络连接状态下的最大实时网速。优选的,重复测量所述最大实时网速的多次,以判断当前网络连接是否稳定,若多次测量得到的所述最大实时网速差值在预设范围内,说明当前网络连接稳定,否则,说明当前网络连接不稳定。在当前网络连接稳定的情况下,将所述多次测量得到的所述最大实时网速的平均值作为所述移动终端的实时网速;在当前网络连接不稳定的情况下,选择一个最大实时网速作为所述移动终端的实时网速。通过多次测量网速值,以判断网速是否稳定,并根据网速的稳定状态计算移动终端的实时网速,使得获取的实时网速更准确,进一步提高了网速控制的准确性。The obtaining the real-time network speed of the mobile terminal includes: obtaining the network speed of the mobile terminal in at least three time periods; based on the network speed in the at least three time periods, judging whether the network speed of the mobile terminal is Stable; if the network speed is stable, the average value of the network speed in the three time periods is determined as the real-time network speed of the mobile terminal; The network speed with the largest value is determined as the real-time network speed of the mobile terminal. In the embodiment of the present invention, a specific method for obtaining a real-time network speed of a mobile terminal is described by taking obtaining a downlink network speed as an example. During specific implementation, you can apply for downloading data by sending a test packet to each TCP/IP network port; then count the amount of data downloaded per unit time of each TCP/IP network port, and download The sum of the amount of data is used as the maximum real-time network speed of the mobile terminal in the current network connection state. Preferably, repeatedly measuring the maximum real-time network speed multiple times to determine whether the current network connection is stable, if the maximum real-time network speed difference obtained by multiple measurements is within a preset range, it means that the current network connection is stable, otherwise , indicating that the current network connection is unstable. When the current network connection is stable, the average value of the maximum real-time network speed obtained by the multiple measurements is used as the real-time network speed of the mobile terminal; when the current network connection is unstable, select a maximum real-time network speed The network speed is used as the real-time network speed of the mobile terminal. By measuring the network speed value multiple times to judge whether the network speed is stable, and calculating the real-time network speed of the mobile terminal according to the stable state of the network speed, the obtained real-time network speed is more accurate, and the accuracy of network speed control is further improved.

步骤220,确定在所述移动终端前台运行的第一前台应用程序所占用的实时网速。Step 220, determining the real-time network speed occupied by the first foreground application running in the foreground of the mobile terminal.

确定所述移动终端上运行的前台应用程序所占用的实时网速的具体实施方式参见实施例一种的县官步骤,此处不再赘述。For a specific implementation manner of determining the real-time network speed occupied by the foreground application program running on the mobile terminal, refer to the magistrate step in Embodiment 1, which will not be repeated here.

具体实施时,可以建立TCP端口映射表,用于记录占用实时网速的应用程序,以及每个应用程序占用的TCP/IP端口,以及各TCP/IP端口对应的实时网速,如下表所示。During specific implementation, a TCP port mapping table can be established to record the applications occupying the real-time network speed, the TCP/IP ports occupied by each application program, and the real-time network speed corresponding to each TCP/IP port, as shown in the following table .

表1:TCP端口映射表Table 1: TCP port mapping table

然后,在占用所述实时网速的所有应用程序中确定占用所述实时网速的第一前台应用程序。确定移动终端上运行的第一前台应用程序的具体方案参见现有技术。例如,在Android平台上,获取当前运行的应用堆栈,处于所述应用堆栈最顶层的应用程序如APP5就是第一前台应用程序。在移动终端运行的应用程序中,同一时间只有一个前台应用程序,可以有多个后台应用程序。最后,将获取的第一前台应用程序APP5的标识与确定的占用所述实时网速的所有应用程序的标识依次进行匹配,若匹配成功,则说明所述占用所述实时网速的应用程序中包含第一前台应用程序,所述第一前台应用程序即占用所述实时网速的前台应用程序。Then, among all the application programs occupying the real-time network speed, the first foreground application program occupying the real-time network speed is determined. For a specific solution for determining the first foreground application running on the mobile terminal, refer to the prior art. For example, on the Android platform, the currently running application stack is obtained, and the application program at the top of the application stack, such as APP5, is the first foreground application program. Among the application programs running on the mobile terminal, there is only one foreground application program at the same time, and there may be multiple background application programs. Finally, match the acquired first foreground application program APP5 identification with the determined identifications of all application programs occupying the real-time network speed in sequence. If the matching is successful, it means that the application programs occupying the real-time network speed A first foreground application program is included, and the first foreground application program is a foreground application program occupying the real-time network speed.

步骤230,根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速。Step 230: Adjust the real-time network speed occupied by at least one background application running in the background of the mobile terminal according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application.

在确定占用实时网速的应用程序中存在第一前台应用程序之后,进一步根据所述移动终端的实时网速、所述第一前台应用程序所占用的实时网速判断是否需要对占用实时网速的后台应用程序进行控制,以减小后台应用程序占用的实时网速,将更多的实时网速分配给第一前台应用程序,以保证第一前台应用程序运行的流畅性,进一步提升用户体验。具体实施时,可以通过暂停至少一个后台应用程序或者降低后至少一个台应用程序占用的实时网速等方式减小后台应用程序占用的实时网速。具体实施时,根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速包括:将所述第一前台应用程序所占用的实时网速与预设第一网速阈值进行比较;若所述第一前台应用程序所占用的实时网速小于所述预设第一网速阈值,则调整至少一个后台应用程序所占用的实时网速。其中,所述预设第一网速阈值等于预设比例系数与所述移动终端的实时网速的乘积,所述预设比例系数大于0且小于1。为了合理的分配前后台应用程序占用的网速,首先对移动终端的每个应用程序设置期在前台运行时相应的预设第一网速阈值,如预设第一网速阈值=N*Vmax,当第一前台应用程序所占用的实时网速大于或等于相应的预设第一网速阈值时,不需要调整后台应用程序占用的实时网速,而是不断检测第一前台应用程序所占用的网速;当第一前台应用程序所占用的实时网速小于相应的预设第一网速阈值时,降低后台应用程序占用的网速。其中,N为预设比例系数,例如取值为0.8;Vmax为实时网速。在调整后台应用程序占用的实时网速时,为了充分利用网络速度,在保证第一前台应用程序流畅运行的前提下,使后台应用程序也得到适当的运行,采用逐个调整的方式。即对一个后台应用程序占用的实时网速进行调整后,重复检测第一前台应程序所占用的实时网速,若当第一前台应用程序所占用的实时网速达到了预设第一网速阈值,则不再调整其他后台应用程序占用的实时网速,否则,继续调整下一个后台应用程序占用的实时网速。After determining that there is a first foreground application program in the application program occupying the real-time network speed, it is further judged according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application program whether it is necessary to use the real-time network speed Control the background application program to reduce the real-time network speed occupied by the background application program, and allocate more real-time network speed to the first foreground application program to ensure the smooth operation of the first foreground application program and further improve user experience . During specific implementation, the real-time network speed occupied by the background application program can be reduced by suspending at least one background application program or reducing the real-time network speed occupied by at least one subsequent application program. During specific implementation, according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application, adjusting the real-time network speed occupied by at least one background application running in the background of the mobile terminal includes: Comparing the real-time network speed occupied by the first foreground application with a preset first network speed threshold; if the real-time network speed occupied by the first foreground application is less than the preset first network speed threshold, Then adjust the real-time network speed occupied by at least one background application. Wherein, the preset first network speed threshold is equal to the product of a preset proportional coefficient and the real-time network speed of the mobile terminal, and the preset proportional coefficient is greater than 0 and less than 1. In order to reasonably allocate the network speed occupied by front-end and back-end applications, first set the corresponding preset first network speed threshold for each application program of the mobile terminal when running in the foreground, such as the preset first network speed threshold=N*Vmax , when the real-time network speed occupied by the first foreground application is greater than or equal to the corresponding preset first network speed threshold, there is no need to adjust the real-time network speed occupied by the background application, but to continuously detect the network speed occupied by the first foreground application network speed; when the real-time network speed occupied by the first foreground application program is lower than the corresponding preset first network speed threshold, reduce the network speed occupied by the background application program. Wherein, N is a preset proportional coefficient, for example, a value of 0.8; Vmax is a real-time network speed. When adjusting the real-time network speed occupied by the background application, in order to make full use of the network speed and ensure the smooth operation of the first foreground application, the background application can also be properly run, and the adjustment method is adopted one by one. That is, after adjusting the real-time network speed occupied by a background application program, repeatedly detect the real-time network speed occupied by the first foreground application program, if the real-time network speed occupied by the first foreground application program reaches the preset first network speed threshold , then no longer adjust the real-time network speed occupied by other background applications, otherwise, continue to adjust the real-time network speed occupied by the next background application.

为了提高调整网速的效率,可以优先调整占用实时网速最多的后台应用程序所占用的实时网速。具体实施时,所述调整至少一个后台应用程序所占用的实时网速,包括:按照所占用实时网速由高到低的顺序,对在所述移动终端后台运行的至少一个后台应用程序进行排序;依次调整排序后的所述至少一个后台应用程序所占用的实时网速,直至所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值。所述依次调整排序后的所述至少一个后台应用程序所占用的实时网速,直至所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值,包括:依次降低排序后的所述至少一个后台应用程序所占用的实时网速;在调整所述至少一个后台应用程序所占用的实时网速的过程中,检测所述第一前台应用程序所占用的实时网速;若检测到所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值,则停止所述至少一个后台应用程序所占用的实时网速的调整。以表1中的应用程序为例,后台应用程序包括:APP1、APP2、APP3和APP4,占用网速的后台应用程序按照占用实时网速由高到低的顺序排列后,得到的后台应用程序序列为:APP1、APP2、APP4、APP3。然后,从前向后,优先调整第一个后台应用程序APP1占用的实时网速。之后,重新确定所述第一前台应用程序所占用的实时网速。若所述第一前台应用程序所占用的实时网速小于预设第一网速阈值,则继续调整后台应用程序APP2占用的实时网速。依此类推,每调整一个后台应用程序之后,重新确定所述第一前台应用程序所占用的实时网速,若所述第一前台应用程序所占用的实时网速小于预设第一网速阈值,则继续调整后台应用程序;若所述第一前台应用程序所占用的实时网速大于或等于预设第一网速阈值,则不需要再调整其他后台应用程序。直至所述第一前台应用程序所占用的实时网速大于或等于预设第一网速阈值。In order to improve the efficiency of adjusting the network speed, the real-time network speed occupied by the background applications occupying the most real-time network speed can be adjusted preferentially. During specific implementation, the adjustment of the real-time network speed occupied by at least one background application program includes: sorting at least one background application program running in the background of the mobile terminal according to the order of the occupied real-time network speed from high to low ; sequentially adjusting the real-time network speed occupied by the at least one sorted background application program until the real-time network speed occupied by the first foreground application program is greater than or equal to the preset first network speed threshold. The sequentially adjusting the real-time network speed occupied by the at least one sorted background application until the real-time network speed occupied by the first foreground application is greater than or equal to the preset first network speed threshold includes: Decreasing the real-time network speed occupied by the at least one background application in sequence; during the process of adjusting the real-time network speed occupied by the at least one background application, detecting the real-time network speed occupied by the first foreground application Network speed; if it is detected that the real-time network speed occupied by the first foreground application is greater than or equal to the preset first network speed threshold, then stop the adjustment of the real-time network speed occupied by the at least one background application. Taking the applications in Table 1 as an example, the background applications include: APP1, APP2, APP3, and APP4. After the background applications occupying the network speed are arranged in order of occupying the real-time network speed from high to low, the obtained sequence of background applications is These are: APP1, APP2, APP4, APP3. Then, from front to back, firstly adjust the real-time network speed occupied by the first background application APP1. Afterwards, the real-time network speed occupied by the first foreground application is re-determined. If the real-time network speed occupied by the first foreground application program is less than the preset first network speed threshold, continue to adjust the real-time network speed occupied by the background application program APP2. By analogy, after each adjustment of a background application program, re-determine the real-time network speed occupied by the first foreground application program, if the real-time network speed occupied by the first foreground application program is less than the preset first network speed threshold , then continue to adjust the background application; if the real-time network speed occupied by the first foreground application is greater than or equal to the preset first network speed threshold, then there is no need to adjust other background applications. Until the real-time network speed occupied by the first foreground application program is greater than or equal to the preset first network speed threshold.

优选的,为了保证用户体验,对于一些重要的后台应用程序,不能停止运行,可以通过在保证该后台应用程序占用进行可能少的实时网速的前提下,调整至少一个后台应用程序所占用实时网速。具体实施时,可以预先设置网速白名单,对于网速白名单中的应用程序保证其占用的最低实时网速,对于白名单之外的后台应用程序,通过将其暂停降低其占用的实时网速。所述依次降低排序后的所述至少一个后台应用程序所占用的实时网速,包括:对于排序后的所述至少一个后台应用程序中的每个应用程序,判断所述后台应用程序是否在预设的网速白名单中;若所述后台应用程序在预设的网速白名单中,则将所述后台应用程序所占用的实时网速的调整至预设第二网速阈值;若所述后台应用程序不在预设的网速白名单中,则暂停所述后台应用程序的运行。Preferably, in order to ensure the user experience, for some important background applications, the operation cannot be stopped, and the real-time network speed occupied by at least one background application can be adjusted under the premise of ensuring that the background application occupies a possible low real-time network speed. speed. During specific implementation, a network speed whitelist can be set in advance. For applications in the network speed whitelist, the minimum real-time network speed occupied by them can be guaranteed. For background applications outside the whitelist, the real-time network speed occupied by them can be reduced by suspending them. speed. The sequentially reducing the real-time network speed occupied by the at least one background application program after sorting includes: for each application program in the at least one background application program after sorting, judging whether the background application program is in the preset in the preset network speed whitelist; if the background application is in the preset network speed whitelist, adjust the real-time network speed occupied by the background application to the preset second network speed threshold; if the If the background application program is not in the preset network speed whitelist, the running of the background application program is suspended.

仍以表1中所示的应用程序为例,其中:APP5为第一前台应用程序,APP1、APP2、APP4、APP3为后台应用程序,移动终端的实时网速为200KB/S,应用程序APP5的预设第一网速阈值为0.8×200=160KB/S,后台应用程序APP1在预设的网速白名单中。将后台应用程序按照所占用实时网速由高到低的顺序排列后,得到的后台应用程序序列为:APP1、APP2、APP4、APP3。然后,从前向后,优先调整第一个后台应用程序APP1占用的实时网速。因为APP1在预设的网速白名单中,因此,首先将后台应用程序APP1占用的实时网速降低至对应的预设第二网速阈值,如60KB/S。之后,重新确定所述第一前台应用程序所占用的实时网速,若所述第一前台应用程序所占用的实时网速为80KB/S,所述第一前台应用程序所占用的实时网速仍小于预设第一网速阈值,则继续调整下一个后台应用程序APP2。后台应用程序APP2不再预设的网速白名单中,因此,暂停后台应用程序APP2。之后,重新确定所述第一前台应用程序所占用的实时网速,若所述第一前台应用程序所占用的实时网速为135KB/S,所述第一前台应用程序所占用的实时网速仍小于预设第一网速阈值,则继续调整下一个后台应用程序APP4。依此类推,每暂停或降低一个后台应用程序占用的网速之后,重新确定所述第一前台应用程序所占用的实时网速,若所述第一前台应用程序所占用的实时网速小于预设第一网速阈值,则继续调整后台应用程序占用的实时网速;若所述第一前台应用程序所占用的实时网速大于或等于预设第一网速阈值,则不需要再调整其他后台应用程序。直至所述第一前台应用程序所占用的实时网速大于或等于预设第一网速阈值。Still taking the application program shown in Table 1 as an example, wherein: APP5 is the first foreground application program, APP1, APP2, APP4, APP3 are background application programs, the real-time network speed of the mobile terminal is 200KB/S, and the application program APP5 The preset first network speed threshold is 0.8×200=160KB/S, and the background application APP1 is in the preset network speed white list. After arranging the background applications in descending order of the real-time network speed they occupy, the sequence of background applications obtained is: APP1, APP2, APP4, APP3. Then, from front to back, firstly adjust the real-time network speed occupied by the first background application APP1. Because APP1 is in the preset network speed whitelist, firstly, the real-time network speed occupied by the background application APP1 is reduced to the corresponding preset second network speed threshold, such as 60KB/S. Afterwards, re-determine the real-time network speed occupied by the first foreground application program, if the real-time network speed occupied by the first foreground application program is 80KB/S, the real-time network speed occupied by the first foreground application program Still less than the preset first network speed threshold, continue to adjust the next background application program APP2. The background application APP2 is no longer in the preset network speed whitelist, therefore, the background application APP2 is suspended. Afterwards, re-determine the real-time network speed occupied by the first foreground application, if the real-time network speed occupied by the first foreground application is 135KB/S, the real-time network speed occupied by the first foreground application Still less than the preset first network speed threshold, continue to adjust the next background application APP4. By analogy, after every time the network speed occupied by a background application is suspended or reduced, the real-time network speed occupied by the first foreground application is re-determined, if the real-time network speed occupied by the first foreground application is less than the preset If the first network speed threshold is set, then continue to adjust the real-time network speed occupied by the background application; if the real-time network speed occupied by the first foreground application is greater than or equal to the preset first network speed threshold, then there is no need to adjust other network speeds. background application. Until the real-time network speed occupied by the first foreground application program is greater than or equal to the preset first network speed threshold.

当所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值之后,结束网速调整。When the real-time network speed occupied by the first foreground application is greater than or equal to the preset first network speed threshold, the network speed adjustment ends.

通过优先调整占用实时网速最多的后台应用程序所占用的实时网速,进一步提高了调整网速的效率。By giving priority to adjusting the real-time network speed occupied by the background applications occupying the most real-time network speed, the efficiency of network speed adjustment is further improved.

本发明实施例公开的应用程序网速的控制方法,通过检测移动终端的网络连接状态是否发生变化,若是则获取所述移动终端的实时网速,然后确定在所述移动终端前台运行的第一前台应用程序所占用所述实时网速,最后,根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速,以将更多的实时网速分配给第一前台应用程序,以保证前台应用程序运行的流畅性。通过预先设置网速白名单,不仅可以有效的保障前台应用程序的流畅运行,对于重要的后台应用程序,也能够保障其流畅运行。The application program network speed control method disclosed in the embodiment of the present invention detects whether the network connection status of the mobile terminal changes, and if so, obtains the real-time network speed of the mobile terminal, and then determines the first application running in the foreground of the mobile terminal. The real-time network speed occupied by the foreground application, and finally, adjust at least one background application running in the background of the mobile terminal according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application The real-time network speed occupied by the program is used to allocate more real-time network speed to the first foreground application program to ensure smooth operation of the foreground application program. By pre-setting the network speed whitelist, not only can effectively ensure the smooth operation of foreground applications, but also ensure the smooth operation of important background applications.

实施例三:Embodiment three:

参见图3,本实施例提供了一种应用程序网速的控制方法,该方法包括:步骤300至步骤350。Referring to FIG. 3 , this embodiment provides a method for controlling the network speed of an application program, and the method includes: Step 300 to Step 350 .

步骤300,检测移动终端的网络连接状态是否发生变化,若是,执行步骤310,否则结束。Step 300, detect whether the network connection status of the mobile terminal changes, if yes, execute step 310, otherwise end.

检测移动终端的网络连接状态是否发生变化的具体实施方式参见实施例二,此处不再赘述。For a specific implementation manner of detecting whether the network connection state of the mobile terminal changes, refer to Embodiment 2, which will not be repeated here.

步骤310,获取所述移动终端的实时网速。Step 310, acquiring the real-time network speed of the mobile terminal.

的具体实施方式参见实施例二,此处不再赘述。For the specific implementation manner, please refer to the second embodiment, which will not be repeated here.

步骤320,确定在所述移动终端前台运行的第一前台应用程序所占用的实时网速。Step 320, determining the real-time network speed occupied by the first foreground application running in the foreground of the mobile terminal.

获取所述移动终端的实时网速的具体实施方式参见实施例二,此处不再赘述。For a specific implementation manner of obtaining the real-time network speed of the mobile terminal, refer to Embodiment 2, which will not be repeated here.

步骤330,根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速。Step 330: Adjust the real-time network speed occupied by at least one background application running in the background of the mobile terminal according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application.

根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速的具体实施方式参见实施例二,此处不再赘述。According to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application, adjust the real-time network speed occupied by at least one background application running in the background of the mobile terminal. Example 2 will not be repeated here.

步骤340,检测在所述移动终端前台运行的应用程序的变化信息。Step 340, detecting change information of the application program running in the foreground of the mobile terminal.

移动终端前台和后台运行的应用程序会动态改变,即:前台应用程序可能结束运行,或者转为后台运行;后台应用程序可能转为前台运行,或者结束运行,为了及时、准确地对应用程序的网速进行控制,需要实时监控所述应用程序的运行状态。所述根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速的步骤之后,还包括:检测在所述移动终端前台运行的应用程序的变化信息;若检测到所述变化信息为:在所述移动终端前台运行的应用程序由所述第一前台应用程序切换至第二前台应用程序,则执行所述获取所述移动终端的实时网速的步骤。The applications running in the foreground and background of the mobile terminal will change dynamically, that is: the foreground application may end running or turn to the background; To control the network speed, it is necessary to monitor the running status of the application program in real time. After the step of adjusting the real-time network speed occupied by at least one background application running in the background of the mobile terminal according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application, It also includes: detecting the change information of the application program running in the foreground of the mobile terminal; if the change information is detected: the application program running in the foreground of the mobile terminal is switched from the first foreground application program to the second foreground The application program executes the step of obtaining the real-time network speed of the mobile terminal.

具体实施时,检测在所述移动终端前台运行的应用程序的变化信息可以采用现有技术,例如在安卓系统中,通过判断当前运行的应用堆栈中栈顶的应用程序是否变化,可以检测在所述移动终端前台运行的应用程序的变化信息。During specific implementation, existing technology can be used to detect the change information of the application program running in the foreground of the mobile terminal. Describes the change information of the application programs running in the foreground of the mobile terminal.

步骤350,判断所述移动终端前台运行的应用程序是否由所述第一前台应用程序切换至第二前台应用程序,若是,则跳转至步骤310,否则结束。Step 350, judging whether the application running in the foreground of the mobile terminal is switched from the first foreground application to the second foreground application, if yes, jump to step 310, otherwise end.

当所述移动终端前台运行的应用程序是否所述第一前台应用程序切换至第二前台应用程序后,重新获取移动终端的实时网速,并根据当前运行的的前台应用程序和后台应用程序,重新进行网速调整。When the application running in the foreground of the mobile terminal is switched from the first foreground application to the second foreground application, reacquire the real-time network speed of the mobile terminal, and according to the currently running foreground application and background application, Re-adjust the network speed.

通过优先调整占用实时网速最多的后台应用程序所占用的实时网速,进一步提高了调整网速的效率。By giving priority to adjusting the real-time network speed occupied by the background applications occupying the most real-time network speed, the efficiency of network speed adjustment is further improved.

通过实时监控应用程序的变化信息,根据前台应用程序的变化信息重新获取移动终端的实时网速,以及后台运行的至少一个应用程序所占用的实时网速,以进行网速控制,可以及时、准确地对应用程序的网速进行控制,进一步提高了网速控制的准确性。By monitoring the change information of the application program in real time, reacquiring the real-time network speed of the mobile terminal according to the change information of the foreground application program, and the real-time network speed occupied by at least one application program running in the background, so as to control the network speed, which can be timely and accurate Control the network speed of the application program, and further improve the accuracy of network speed control.

本发明实施例公开的应用程序网速的控制方法,通过检测移动终端的网络连接状态是否发生变化,若是则获取所述移动终端的实时网速,然后确定在所述移动终端前台运行的第一前台应用程序所占用所述实时网速,最后,根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速,以将更多的实时网速分配给第一前台应用程序,以保证前台应用程序运行的流畅性。通过预先设置网速白名单,不仅可以有效的保障前台应用程序的流畅运行,对于重要的后台应用程序,也能够保障其流畅运行。The application program network speed control method disclosed in the embodiment of the present invention detects whether the network connection status of the mobile terminal changes, and if so, obtains the real-time network speed of the mobile terminal, and then determines the first application running in the foreground of the mobile terminal. The real-time network speed occupied by the foreground application, and finally, adjust at least one background application running in the background of the mobile terminal according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application The real-time network speed occupied by the program is used to allocate more real-time network speed to the first foreground application program to ensure smooth operation of the foreground application program. By pre-setting the network speed whitelist, not only can effectively ensure the smooth operation of foreground applications, but also ensure the smooth operation of important background applications.

实施例四:Embodiment four:

参考图4,相应地,本发明实施例还公开了一种移动终端40,能实现实施例一至实施例三中的应用程序网速的控制方法的细节,并达到相同的效果。所述移动终端40,包括:Referring to FIG. 4 , correspondingly, the embodiment of the present invention also discloses a mobile terminal 40 capable of implementing the details of the application program network speed control method in Embodiment 1 to Embodiment 3, and achieving the same effect. The mobile terminal 40 includes:

实时网速获取模块410,用于获取所述移动终端的实时网速;A real-time network speed acquisition module 410, configured to obtain the real-time network speed of the mobile terminal;

前台应用确定模块420,用于确定在所述移动终端前台运行的第一前台应用程序所占用的实时网速;The foreground application determination module 420 is used to determine the real-time network speed occupied by the first foreground application running in the foreground of the mobile terminal;

网速调整模块430,用于根据所述实时网速获取模块410获取的所述移动终端的实时网速和所述前台应用确定模块420确定的第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速。The network speed adjustment module 430 is configured to adjust the real-time network speed of the mobile terminal according to the real-time network speed obtained by the real-time network speed acquisition module 410 and the real-time network speed occupied by the first foreground application program determined by the foreground application determination module 420. The real-time network speed occupied by at least one background application running in the background of the mobile terminal.

本发明实施例公开的移动终端,通过获取所述移动终端的实时网速,然后确定在所述移动终端前台运行的第一前台应用程序所占用所述实时网速,最后,根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速,以将更多的实时网速分配给第一前台应用程序,以保证第一前台应用程序运行的流畅性。The mobile terminal disclosed in the embodiment of the present invention obtains the real-time network speed of the mobile terminal, then determines the real-time network speed occupied by the first foreground application running in the foreground of the mobile terminal, and finally, according to the mobile terminal Real-time network speed and the real-time network speed occupied by the first foreground application program, adjust the real-time network speed occupied by at least one background application program running in the background of the mobile terminal, so as to allocate more real-time network speed to The first foreground application program is used to ensure smooth operation of the first foreground application program.

可选的,如图5所示,所述网速调整模块430包括:Optionally, as shown in FIG. 5, the network speed adjustment module 430 includes:

判断单元4301,用于将所述第一前台应用程序所占用的实时网速与预设第一网速阈值进行比较,并判断所述第一前台应用程序所占用的实时网速是否小于预设第一网速阈值;A judging unit 4301, configured to compare the real-time network speed occupied by the first foreground application with a preset first network speed threshold, and determine whether the real-time network speed occupied by the first foreground application is lower than the preset The first network speed threshold;

网速调整单元4302,用于若所述第一前台应用程序所占用的实时网速小于所述预设第一网速阈值,则调整至少一个后台应用程序所占用的实时网速;A network speed adjustment unit 4302, configured to adjust the real-time network speed occupied by at least one background application if the real-time network speed occupied by the first foreground application is less than the preset first network speed threshold;

其中,所述预设第一网速阈值等于预设比例系数与所述移动终端的实时网速的乘积,所述预设比例系数大于0且小于1。Wherein, the preset first network speed threshold is equal to the product of a preset proportional coefficient and the real-time network speed of the mobile terminal, and the preset proportional coefficient is greater than 0 and less than 1.

具体实施时,所述移动终端还包括端口映射模块(图中未示出),用于通过建立端口映射表记录所述移动终端上运行的应用程序占用的网络端口,以及各网络端口被占用的实时网速,以及各应用程序的应用网速。可选的,所述端口映射模块还用于记录占用网络端口的应用程序为前台应用程序或网速白名单中的应用程序或普通后台应用程序。During specific implementation, the mobile terminal also includes a port mapping module (not shown in the figure), which is used to record the network ports occupied by the application programs running on the mobile terminal by establishing a port mapping table, and the occupied network ports of each network port. Real-time internet speed, and application internet speed for each application. Optionally, the port mapping module is also used to record that the application program occupying the network port is a foreground application program or an application program in the network speed white list or a common background application program.

可选的,如图6所示,所述网速调整单元4302包括:Optionally, as shown in FIG. 6, the network speed adjustment unit 4302 includes:

排序子单元43021,用于按照所占用实时网速由高到低的顺序,对在所述移动终端后台运行的至少一个后台应用程序进行排序;The sorting subunit 43021 is configured to sort at least one background application program running in the background of the mobile terminal according to the order of the occupied real-time network speed from high to low;

网速调整子单元43022,用于依次调整排序后的所述至少一个后台应用程序所占用的实时网速,直至所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值。The network speed adjustment subunit 43022 is configured to sequentially adjust the real-time network speed occupied by the at least one sorted background application until the real-time network speed occupied by the first foreground application is greater than or equal to the preset second A network speed threshold.

可选的,所述网速调整子单元43022用于:Optionally, the network speed adjustment subunit 43022 is used for:

依次降低排序后的所述至少一个后台应用程序所占用的实时网速;sequentially reducing the real-time network speed occupied by the at least one background application after sorting;

在调整所述至少一个后台应用程序所占用的实时网速的过程中,检测所述第一前台应用程序所占用的实时网速;In the process of adjusting the real-time network speed occupied by the at least one background application program, detecting the real-time network speed occupied by the first foreground application program;

若检测到所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值,则停止所述至少一个后台应用程序所占用的实时网速的调整。If it is detected that the real-time network speed occupied by the first foreground application is greater than or equal to the preset first network speed threshold, the adjustment of the real-time network speed occupied by the at least one background application is stopped.

可选的,所述依次降低排序后的所述至少一个后台应用程序所占用的实时网速,包括:Optionally, said sequentially reducing the real-time network speed occupied by said at least one background application after sorting includes:

对于排序后的所述至少一个后台应用程序中的每个应用程序,判断所述后台应用程序是否在预设的网速白名单中;For each of the sorted at least one background application, determine whether the background application is in a preset network speed whitelist;

若所述后台应用程序在预设的网速白名单中,则将所述后台应用程序所占用的实时网速的调整至预设第二网速阈值;If the background application is in the preset network speed whitelist, adjusting the real-time network speed occupied by the background application to a preset second network speed threshold;

若所述后台应用程序不在预设的网速白名单中,则暂停所述后台应用程序的运行。If the background application program is not in the preset network speed white list, then suspend the running of the background application program.

可选的,如图7所示,所述移动终端40还包括:Optionally, as shown in FIG. 7, the mobile terminal 40 also includes:

网络连接状态检测模块440,用于检测移动终端的网络连接状态;A network connection state detection module 440, configured to detect the network connection state of the mobile terminal;

第一跳转模块450,用于若检测到所述网络连接状态发生变化,则调用所述实时网速获取模块,以获取所述移动终端的实时网速。其中,所述网络连接状态发生变化包括:开启移动网络、连接WIFI、从第一网络切换至第二网络中的至少一种。The first jumping module 450 is configured to call the real-time network speed obtaining module to obtain the real-time network speed of the mobile terminal if it is detected that the network connection status changes. Wherein, the change of the network connection status includes: at least one of turning on the mobile network, connecting to WIFI, and switching from the first network to the second network.

所述实时网速获取模块410包括:The real-time network speed acquisition module 410 includes:

网速获取单元,用于获取所述移动终端至少三个时间段内的网速;A network speed obtaining unit, configured to obtain the network speed of the mobile terminal in at least three time periods;

网速判断单元,用于基于所述网速获取单元获取的至少三个时间段内的网速,判断所述移动终端的网速是否稳定;A network speed judging unit, configured to judge whether the network speed of the mobile terminal is stable based on the network speed obtained by the network speed obtaining unit in at least three time periods;

第一网速确定单元,用于若网速稳定,则将所述三个时间段内的网速的平均值确定为所述移动终端的实时网速;The first network speed determination unit is configured to determine the average value of the network speeds within the three time periods as the real-time network speed of the mobile terminal if the network speed is stable;

第二网速确定单元,用于若网速不稳定,则将所述至少三个时间段中取值最大的网速确定为所述移动终端的实时网速。The second network speed determination unit is configured to determine the network speed with the largest value in the at least three time periods as the real-time network speed of the mobile terminal if the network speed is unstable.

可选的,如图7所示,所述移动终端40还包括:Optionally, as shown in FIG. 7, the mobile terminal 40 also includes:

切换检测模块460,用于检测在所述移动终端前台运行的应用程序的变化信息;A switch detection module 460, configured to detect change information of an application program running in the foreground of the mobile terminal;

第二跳转模块470,用于若所述切换检测模块460检测到所述变化信息为:在所述移动终端前台运行的应用程序由所述第一前台应用程序切换至第二前台应用程序,则执行所述获取所述移动终端的实时网速的步骤。The second jumping module 470 is configured to, if the switching detection module 460 detects that the change information is: the application running in the foreground of the mobile terminal is switched from the first foreground application to the second foreground application, Then execute the step of acquiring the real-time network speed of the mobile terminal.

通过优先调整占用实时网速最多的后台应用程序所占用的实时网速,进一步提高了调整网速的效率。By giving priority to adjusting the real-time network speed occupied by the background applications occupying the most real-time network speed, the efficiency of network speed adjustment is further improved.

通过实时监控应用程序的变化信息,根据前台应用程序的变化信息重新获取移动终端的实时网速,以及后台运行的至少一个应用程序所占用的实时网速,以进行网速控制,可以及时、准确地对应用程序的网速进行控制,进一步提高了网速控制的准确性。By monitoring the change information of the application program in real time, reacquiring the real-time network speed of the mobile terminal according to the change information of the foreground application program, and the real-time network speed occupied by at least one application program running in the background, so as to control the network speed, which can be timely and accurate Control the network speed of the application program, and further improve the accuracy of network speed control.

本发明实施例公开的移动终端,通过检测移动终端的网络连接状态是否发生变化,若是则获取所述移动终端的实时网速,然后确定在所述移动终端前台运行的第一前台应用程序所占用所述实时网速,最后,根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序占用的实时网速,以将更多的实时网速分配给第一前台应用程序,以保证第一前台应用程序运行的流畅性。另一方面,通过预先设置网速白名单,不仅可以有效的保障前台应用程序的流畅运行,对于重要的后台应用程序,也能够保障其流畅运行。The mobile terminal disclosed in the embodiment of the present invention detects whether the network connection status of the mobile terminal changes, and if so, obtains the real-time network speed of the mobile terminal, and then determines the occupation of the first foreground application program running in the foreground of the mobile terminal. The real-time network speed, finally, according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application program, adjust the real-time network speed occupied by at least one background application running in the background of the mobile terminal. speed, so as to allocate more real-time network speeds to the first foreground application program, so as to ensure the smooth operation of the first foreground application program. On the other hand, by pre-setting the network speed whitelist, not only can effectively ensure the smooth running of foreground applications, but also ensure the smooth running of important background applications.

实施例五:Embodiment five:

图8是本发明另一个实施例的移动终端的框图。图8所示的移动终端800包括:至少一个处理器801、存储器802、至少一个网络接口804和用户接口803。移动终端800中的各个组件通过总线系统805耦合在一起。可理解,总线系统805用于实现这些组件之间的连接通信。总线系统805除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图8中将各种总线都标为总线系统805。FIG. 8 is a block diagram of a mobile terminal according to another embodiment of the present invention. The mobile terminal 800 shown in FIG. 8 includes: at least one processor 801 , a memory 802 , at least one network interface 804 and a user interface 803 . Various components in the mobile terminal 800 are coupled together through a bus system 805 . It can be understood that the bus system 805 is used to realize connection and communication between these components. In addition to the data bus, the bus system 805 also includes a power bus, a control bus and a status signal bus. However, the various buses are labeled as bus system 805 in FIG. 8 for clarity of illustration.

其中,用户接口803可以包括显示器、键盘或者点击设备(例如,鼠标,轨迹球(trackball)、触感板、触摸屏或者触控板等。本实施例通过触摸屏检测用户对桌面文件夹的触发操作,如点击、按压等。Wherein, the user interface 803 may include a display, a keyboard, or a pointing device (for example, a mouse, a trackball (trackball), a touch panel, a touch screen, or a touch panel, etc. This embodiment detects a user's trigger operation on the desktop folder through the touch screen, such as Click, press, etc.

可以理解,本发明实施例中的存储器802可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-OnlyMemory,ROM)、可编程只读存储器(ProgrammableROM,PROM)、可擦除可编程只读存储器(ErasablePROM,EPROM)、电可擦除可编程只读存储器(ElectricallyEPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(RandomAccessMemory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(StaticRAM,SRAM)、动态随机存取存储器(DynamicRAM,DRAM)、同步动态随机存取存储器(SynchronousDRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(DoubleDataRateSDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(SynchlinkDRAM,SLDRAM)和直接内存总线随机存取存储器(DirectRambusRAM,DRRAM)。本文描述的系统和方法的存储器802旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 802 in the embodiment of the present invention may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the non-volatile memory can be read-only memory (Read-OnlyMemory, ROM), programmable read-only memory (ProgrammableROM, PROM), erasable programmable read-only memory (ErasablePROM, EPROM), electrically erasable Programming read-only memory (Electrically EPROM, EEPROM) or flash memory. The volatile memory may be random access memory (Random Access Memory, RAM), which acts as an external cache. By way of illustration and not limitation, many forms of RAM are available such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (Synchronous DRAM, SDRAM), Double data rate synchronous dynamic random access memory (DoubleDataRateSDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (SynchlinkDRAM, SLDRAM) and direct memory bus random access Memory (Direct Rambus RAM, DRRAM). Memory 802 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

在一些实施方式中,存储器802存储了如下的元素,可执行模块或者数据结构,或者他们的子集,或者他们的扩展集:操作系统8021和应用程序8022。存储器802还用于缓存上行信号和下行信号。In some implementations, the memory 802 stores the following elements, executable modules or data structures, or their subsets, or their extended sets: an operating system 8021 and an application program 8022 . The memory 802 is also used for buffering uplink signals and downlink signals.

其中,操作系统8021,包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序8022,包含各种应用程序,例如媒体播放器(MediaPlayer)、浏览器(Browser)等,用于实现各种应用业务。实现本发明实施例方法的程序可以包含在应用程序8022中。在本发明实施例中,通过调用存储器802存储的程序或指令,具体的,可以是应用程序8022中存储的程序或指令。通过用户接口803中的触摸屏检测用户使用应用程序的操作,并检测用户点击桌面文件夹的触发操作或打开桌面文件夹的触发操作,以及检测启动应用程序的触发操作。处理器801用于获取所述移动终端的实时网速;确定在所述移动终端前台运行的第一前台应用程序所占用的实时网速;根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速。Among them, the operating system 8021 includes various system programs, such as framework layer, core library layer, driver layer, etc., for realizing various basic services and processing hardware-based tasks. The application program 8022 includes various application programs, such as a media player (MediaPlayer), a browser (Browser), etc., and is used to implement various application services. The program for realizing the method of the embodiment of the present invention may be included in the application program 8022 . In the embodiment of the present invention, the programs or instructions stored in the memory 802 are called, specifically, the programs or instructions stored in the application program 8022 may be used. The touch screen in the user interface 803 detects the user's operation of using the application program, detects the trigger operation of clicking the desktop folder or opening the desktop folder, and detects the trigger operation of starting the application program. The processor 801 is used to obtain the real-time network speed of the mobile terminal; determine the real-time network speed occupied by the first foreground application program running in the foreground of the mobile terminal; according to the real-time network speed of the mobile terminal and the first The real-time network speed occupied by the foreground application program adjusts the real-time network speed occupied by at least one background application program running in the background of the mobile terminal.

上述本发明实施例揭示的方法部分可以应用于处理器801中,或者由处理器801实现。处理器801可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器801中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器801可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(FieldProgrammable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器802,处理器801读取存储器802中的用户对应用程序的使用次数,结合其硬件完成上述方法的步骤。Part of the methods disclosed in the foregoing embodiments of the present invention may be applied to the processor 801 or implemented by the processor 801 . The processor 801 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 801 or instructions in the form of software. The above-mentioned processor 801 may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other available Program logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the methods disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory 802, and the processor 801 reads the number of times the user uses the application program in the memory 802, and completes the steps of the above method in combination with its hardware.

可以理解的是,本文描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(ApplicationSpecific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable LogicDevice,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。It should be understood that the embodiments described herein may be implemented by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing device (DSP Device, DSPD), programmable logic Device (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing the functions described in this application or a combination thereof.

对于软件实现,可通过执行本文所述功能的模块(例如过程、函数等)来实现本文所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。For a software implementation, the techniques described herein can be implemented through modules (eg, procedures, functions, and so on) that perform the functions described herein. Software codes can be stored in memory and executed by a processor. Memory can be implemented within the processor or external to the processor.

可选地,处理器801还用于:将所述第一前台应用程序所占用的实时网速与预设第一网速阈值进行比较;若所述第一前台应用程序所占用的实时网速小于所述预设第一网速阈值,则调整至少一个后台应用程序所占用的实时网速;其中,所述预设第一网速阈值等于预设比例系数与所述移动终端的实时网速的乘积,所述预设比例系数大于0且小于1。Optionally, the processor 801 is further configured to: compare the real-time network speed occupied by the first foreground application with a preset first network speed threshold; if the real-time network speed occupied by the first foreground application is If it is less than the preset first network speed threshold, adjust the real-time network speed occupied by at least one background application program; wherein, the preset first network speed threshold is equal to the preset proportional coefficient and the real-time network speed of the mobile terminal The product of , the preset proportional coefficient is greater than 0 and less than 1.

可选地,处理器801还用于:按照所占用实时网速由高到低的顺序,对在所述移动终端后台运行的至少一个后台应用程序进行排序;依次调整排序后的所述至少一个后台应用程序所占用的实时网速,直至所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值。Optionally, the processor 801 is further configured to: sort at least one background application program running in the background of the mobile terminal in descending order of the occupied real-time network speed; and sequentially adjust the sorted at least one background application program. The real-time network speed occupied by the background application program until the real-time network speed occupied by the first foreground application program is greater than or equal to the preset first network speed threshold.

可选地,处理器801还用于:依次降低排序后的所述至少一个后台应用程序所占用的实时网速;在调整所述至少一个后台应用程序所占用的实时网速的过程中,检测所述第一前台应用程序所占用的实时网速;若检测到所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值,则停止所述至少一个后台应用程序所占用的实时网速的调整。Optionally, the processor 801 is further configured to: sequentially reduce the real-time network speed occupied by the sorted at least one background application program; during the process of adjusting the real-time network speed occupied by the at least one background application program, detect The real-time network speed occupied by the first foreground application; if it is detected that the real-time network speed occupied by the first foreground application is greater than or equal to the preset first network speed threshold, then stop the at least one background Real-time internet speed adjustments taken by applications.

可选地,处理器801还用于:对于排序后的所述至少一个后台应用程序中的每个应用程序,判断所述后台应用程序是否在预设的网速白名单中;若所述后台应用程序在预设的网速白名单中,则将所述后台应用程序所占用的实时网速的调整至预设第二网速阈值;若所述后台应用程序不在预设的网速白名单中,则暂停所述后台应用程序的运行。Optionally, the processor 801 is further configured to: for each of the sorted at least one background application, determine whether the background application is in a preset network speed whitelist; if the background The application program is in the preset network speed white list, then adjust the real-time network speed occupied by the background application program to the preset second network speed threshold; if the background application program is not in the preset network speed white list , suspend the running of the background application program.

可选地,处理器801还用于:检测移动终端的网络连接状态;若检测到所述网络连接状态发生变化,则执行所述获取所述移动终端的实时网速的步骤。其中,所述网络连接状态发生变化包括:开启移动网络、连接WIFI、从第一网络切换至第二网络中的至少一种。Optionally, the processor 801 is further configured to: detect the network connection status of the mobile terminal; if it is detected that the network connection status changes, execute the step of acquiring the real-time network speed of the mobile terminal. Wherein, the change of the network connection status includes: at least one of turning on the mobile network, connecting to WIFI, and switching from the first network to the second network.

可选地,处理器801还用于:获取所述移动终端至少三个时间段内的网速;基于所述至少三个时间段内的网速,判断所述移动终端的网速是否稳定;若网速稳定,则将所述三个时间段内的网速的平均值确定为所述移动终端的实时网速;若网速不稳定,则将所述至少三个时间段中取值最大的网速确定为所述移动终端的实时网速。Optionally, the processor 801 is further configured to: acquire the network speed of the mobile terminal in at least three time periods; determine whether the network speed of the mobile terminal is stable based on the network speed in the at least three time periods; If the network speed is stable, then the average value of the network speed in the three time periods is determined as the real-time network speed of the mobile terminal; if the network speed is unstable, then the maximum value in the at least three time periods is determined The network speed of is determined as the real-time network speed of the mobile terminal.

可选地,处理器801还用于:检测在所述移动终端前台运行的应用程序的变化信息;若检测到所述变化信息为:在所述移动终端前台运行的应用程序由所述第一前台应用程序切换至第二前台应用程序,则执行所述获取所述移动终端的实时网速的步骤。Optionally, the processor 801 is further configured to: detect change information of the application program running in the foreground of the mobile terminal; if the change information is detected: the application program running in the foreground of the mobile terminal is replaced by the first When the foreground application is switched to the second foreground application, the step of obtaining the real-time network speed of the mobile terminal is executed.

移动终端800能够实现前述实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。The mobile terminal 800 can implement various processes implemented by the mobile terminal in the foregoing embodiments, and details are not repeated here to avoid repetition.

通过本发明的实施例,调整所述移动终端上运行的后台应用程序占用的实时网速,以将更多的实时网速分配给第一前台应用程序,以保证第一前台应用程序运行的流畅性,解决了现有技术中前台应用程序无法流畅运行的问题。通过优先调整占用实时网速最多的后台应用程序所占用的实时网速,进一步提高了调整网速的效率。通过预先设置网速白名单,不仅可以有效的保障前台应用程序的流畅运行,对于重要的后台应用程序,也能够保障其流畅运行。Through the embodiment of the present invention, the real-time network speed occupied by the background application program running on the mobile terminal is adjusted to allocate more real-time network speed to the first foreground application program, so as to ensure the smooth operation of the first foreground application program The invention solves the problem that the foreground application program cannot run smoothly in the prior art. By giving priority to adjusting the real-time network speed occupied by the background applications occupying the most real-time network speed, the efficiency of network speed adjustment is further improved. By pre-setting the network speed whitelist, not only can effectively ensure the smooth operation of foreground applications, but also ensure the smooth operation of important background applications.

实施例六:Embodiment six:

图9是本发明另一个实施例的移动终端的结构示意图。具体地,图9中的移动终端可以为手机、平板电脑、个人数字助理(PersonalDigital Assistant,PDA)、或车载电脑等。Fig. 9 is a schematic structural diagram of a mobile terminal according to another embodiment of the present invention. Specifically, the mobile terminal in FIG. 9 may be a mobile phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA), or a vehicle-mounted computer.

图9中的移动终端包括射频(Radio Frequency,RF)电路910、存储器920、输入单元930、显示单元940、处理器960、音频电路970、通信模块980和电源990。The mobile terminal in FIG. 9 includes a radio frequency (Radio Frequency, RF) circuit 910 , a memory 920 , an input unit 930 , a display unit 940 , a processor 960 , an audio circuit 970 , a communication module 980 and a power supply 990 .

其中,输入单元930可用于接收用户输入的触发操作,以及产生与移动终端的用户设置以及功能控制有关的信号输入。具体地,本发明实施例中,该输入单元930可以包括触控面板931。触控面板931,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板931上的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板931可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给该处理器960,并能接收处理器960发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板931。除了触控面板931,输入单元930还可以包括其他输入设备932,其他输入设备932可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。Wherein, the input unit 930 can be used to receive a trigger operation input by a user, and generate signal input related to user setting and function control of the mobile terminal. Specifically, in the embodiment of the present invention, the input unit 930 may include a touch panel 931 . The touch panel 931, also referred to as a touch screen, can collect user's touch operations on or near it (such as the user's operation on the touch panel 931 using any suitable object or accessory such as a finger, a stylus), and The specified program drives the corresponding connected device. Optionally, the touch panel 931 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to to the processor 960, and can receive and execute commands sent by the processor 960. In addition, the touch panel 931 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 931, the input unit 930 may also include other input devices 932, which may include but not limited to physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, etc. one or more of.

其中,显示单元940可用于显示由用户输入的信息或提供给用户的信息以及移动终端900的各种菜单界面。显示单元940可包括显示面板941,可选的,可以采用LCD或有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板941。Wherein, the display unit 940 can be used to display information input by the user or provided to the user and various menu interfaces of the mobile terminal 900 . The display unit 940 may include a display panel 941. Optionally, the display panel 941 may be configured in the form of an LCD or an organic light-emitting diode (Organic Light-Emitting Diode, OLED).

应注意,触控面板931可以覆盖显示面板941,形成触摸显示屏,当该触摸显示屏检测到在其上或附近的触摸操作后,传送给处理器960以确定触摸事件的类型,随后处理器960根据触摸事件的类型在触摸显示屏上提供相应的视觉输出。It should be noted that the touch panel 931 can cover the display panel 941 to form a touch display screen. When the touch display screen detects a touch operation on or near it, it is sent to the processor 960 to determine the type of the touch event, and then the processor The 960 provides corresponding visual output on the touch display screen according to the type of the touch event.

触摸显示屏包括应用程序界面显示区及常用控件显示区。该应用程序界面显示区及该常用控件显示区的排列方式并不限定,可以为上下排列、左右排列等可以区分两个显示区的排列方式。该应用程序界面显示区可以用于显示应用程序的界面。每一个界面可以包含至少一个应用程序的图标和/或widget桌面控件等界面元素。该应用程序界面显示区也可以为不包含任何内容的空界面。该常用控件显示区用于显示使用率较高的控件,例如,设置按钮、界面编号、滚动条、电话本图标等应用程序图标等。The touch display screen includes an application program interface display area and a common control display area. The arrangement of the display area of the application program interface and the display area of the commonly used controls is not limited, and may be an arrangement in which the two display areas can be distinguished, such as vertical arrangement, left-right arrangement, and the like. The application program interface display area can be used to display the interface of the application program. Each interface may include at least one interface element such as an icon of an application program and/or a widget desktop control. The application program interface display area can also be an empty interface without any content. The commonly used control display area is used to display controls with a high usage rate, for example, application icons such as setting buttons, interface numbers, scroll bars, and phonebook icons.

其中处理器960是移动终端900的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在第一存储器921内的软件程序和/或模块,以及调用存储在第二存储器922内的数据,执行移动终端900的各种功能和处理数据,从而对移动终端900进行整体监控。可选的,处理器960可包括一个或多个处理单元。Wherein the processor 960 is the control center of the mobile terminal 900, utilizes various interfaces and lines to connect various parts of the whole mobile phone, and runs or executes the software programs and/or modules stored in the first memory 921, and calls the software programs and/or modules stored in the second memory 921. The data in the memory 922 executes various functions of the mobile terminal 900 and processes data, so as to monitor the mobile terminal 900 as a whole. Optionally, the processor 960 may include one or more processing units.

在本发明实施例中,通过调用存储该第一存储器921内的软件程序和/或模块和/或该第二存储器922内的数据,处理器960用于获取所述移动终端的实时网速;确定在所述移动终端前台运行的第一前台应用程序所占用的实时网速;根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速。In the embodiment of the present invention, the processor 960 is used to acquire the real-time network speed of the mobile terminal by invoking and storing the software programs and/or modules in the first memory 921 and/or the data in the second memory 922; Determine the real-time network speed occupied by the first foreground application program running in the foreground of the mobile terminal; according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application program, adjust the The real-time network speed occupied by at least one background application running in the background of the terminal.

可选地,处理器960用于将所述第一前台应用程序所占用的实时网速与预设第一网速阈值进行比较;若所述第一前台应用程序所占用的实时网速小于所述预设第一网速阈值,则调整至少一个后台应用程序所占用的实时网速;其中,所述预设第一网速阈值等于预设比例系数与所述移动终端的实时网速的乘积,所述预设比例系数大于0且小于1。Optionally, the processor 960 is configured to compare the real-time network speed occupied by the first foreground application with a preset first network speed threshold; if the real-time network speed occupied by the first foreground application is less than the specified The preset first network speed threshold, then adjust the real-time network speed occupied by at least one background application program; wherein, the preset first network speed threshold is equal to the product of the preset proportional coefficient and the real-time network speed of the mobile terminal , the preset proportional coefficient is greater than 0 and less than 1.

可选地,处理器960还用于:按照所占用实时网速由高到低的顺序,对在所述移动终端后台运行的至少一个后台应用程序进行排序;依次调整排序后的所述至少一个后台应用程序所占用的实时网速,直至所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值。Optionally, the processor 960 is further configured to: sort at least one background application program running in the background of the mobile terminal in descending order of the occupied real-time network speed; sequentially adjust the sorted at least one background application program. The real-time network speed occupied by the background application program until the real-time network speed occupied by the first foreground application program is greater than or equal to the preset first network speed threshold.

可选地,处理器960还用于:依次降低排序后的所述至少一个后台应用程序所占用的实时网速;在调整所述至少一个后台应用程序所占用的实时网速的过程中,检测所述第一前台应用程序所占用的实时网速;若检测到所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值,则停止所述至少一个后台应用程序所占用的实时网速的调整。Optionally, the processor 960 is further configured to: sequentially reduce the real-time network speed occupied by the at least one background application after sorting; during the process of adjusting the real-time network speed occupied by the at least one background application, detect The real-time network speed occupied by the first foreground application; if it is detected that the real-time network speed occupied by the first foreground application is greater than or equal to the preset first network speed threshold, then stop the at least one background Real-time internet speed adjustments taken by applications.

可选地,处理器960还用于:对于排序后的所述至少一个后台应用程序中的每个应用程序,判断所述后台应用程序是否在预设的网速白名单中;若所述后台应用程序在预设的网速白名单中,则将所述后台应用程序所占用的实时网速的调整至预设第二网速阈值;若所述后台应用程序不在预设的网速白名单中,则暂停所述后台应用程序的运行。Optionally, the processor 960 is further configured to: for each of the sorted at least one background application, determine whether the background application is in the preset network speed white list; if the background The application program is in the preset network speed white list, then adjust the real-time network speed occupied by the background application program to the preset second network speed threshold; if the background application program is not in the preset network speed white list , suspend the running of the background application program.

可选地,处理器960还用于:检测移动终端的网络连接状态;若检测到所述网络连接状态发生变化,则执行所述获取所述移动终端的实时网速的步骤。其中,所述网络连接状态发生变化包括:开启移动网络、连接WIFI、从第一网络切换至第二网络中的至少一种。Optionally, the processor 960 is further configured to: detect the network connection status of the mobile terminal; if it is detected that the network connection status changes, execute the step of acquiring the real-time network speed of the mobile terminal. Wherein, the change of the network connection status includes: at least one of turning on the mobile network, connecting to WIFI, and switching from the first network to the second network.

可选地,处理器960还用于:获取所述移动终端至少三个时间段内的网速;基于所述至少三个时间段内的网速,判断所述移动终端的网速是否稳定;若网速稳定,则将所述三个时间段内的网速的平均值确定为所述移动终端的实时网速;若网速不稳定,则将所述至少三个时间段中取值最大的网速确定为所述移动终端的实时网速。Optionally, the processor 960 is further configured to: acquire the network speed of the mobile terminal in at least three time periods; determine whether the network speed of the mobile terminal is stable based on the network speed in the at least three time periods; If the network speed is stable, then the average value of the network speed in the three time periods is determined as the real-time network speed of the mobile terminal; if the network speed is unstable, then the maximum value in the at least three time periods is determined The network speed of is determined as the real-time network speed of the mobile terminal.

可选地,处理器960还用于:检测在所述移动终端前台运行的应用程序的变化信息;若检测到所述变化信息为:在所述移动终端前台运行的应用程序由所述第一前台应用程序切换至第二前台应用程序,则执行所述获取所述移动终端的实时网速的步骤。Optionally, the processor 960 is further configured to: detect change information of the application program running in the foreground of the mobile terminal; if the change information is detected: the application program running in the foreground of the mobile terminal is replaced by the first When the foreground application is switched to the second foreground application, the step of obtaining the real-time network speed of the mobile terminal is executed.

可见,通过本实施例的移动终端,通过调整所述移动终端上运行的后台应用程序占用的实时网速,以将更多的实时网速分配给第一前台应用程序,以保证第一前台应用程序运行的流畅性,解决了现有技术中前台应用程序无法流畅运行的问题。通过优先调整占用实时网速最多的后台应用程序所占用的实时网速,进一步提高了调整网速的效率。通过预先设置网速白名单,不仅可以有效的保障前台应用程序的流畅运行,对于重要的后台应用程序,也能够保障其流畅运行。It can be seen that through the mobile terminal of this embodiment, by adjusting the real-time network speed occupied by the background application program running on the mobile terminal, more real-time network speed is allocated to the first foreground application program, so as to ensure that the first foreground application program The smooth running of the program solves the problem that the foreground application program cannot run smoothly in the prior art. By giving priority to adjusting the real-time network speed occupied by the background applications occupying the most real-time network speed, the efficiency of network speed adjustment is further improved. By pre-setting the network speed whitelist, not only can effectively ensure the smooth operation of foreground applications, but also ensure the smooth operation of important background applications.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的移动终端的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the mobile terminal described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.

所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于移动终端实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the mobile terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for relevant parts, refer to the part of the description of the method embodiment.

Claims (16)

Translated fromChinese
1.一种应用程序网速的控制方法,应用于移动终端,其特征在于,所述方法包括:1. A method for controlling the speed of an application program, applied to a mobile terminal, characterized in that the method comprises:获取所述移动终端的实时网速;Obtain the real-time network speed of the mobile terminal;确定在所述移动终端前台运行的第一前台应用程序所占用的实时网速;Determine the real-time network speed occupied by the first foreground application running in the foreground of the mobile terminal;根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速。Adjusting the real-time network speed occupied by at least one background application running in the background of the mobile terminal according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application.2.根据权利要求1所述的方法,其特征在于,所述根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速的步骤,包括:2. The method according to claim 1, characterized in that, according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application program, the real-time network speed running in the background of the mobile terminal is adjusted. Steps for real-time internet speeds consumed by at least one background application, including:将所述第一前台应用程序所占用的实时网速与预设第一网速阈值进行比较;Comparing the real-time network speed occupied by the first foreground application with a preset first network speed threshold;若所述第一前台应用程序所占用的实时网速小于所述预设第一网速阈值,则调整至少一个后台应用程序所占用的实时网速;If the real-time network speed occupied by the first foreground application is less than the preset first network speed threshold, then adjust the real-time network speed occupied by at least one background application;其中,所述预设第一网速阈值等于预设比例系数与所述移动终端的实时网速的乘积,所述预设比例系数大于0且小于1。Wherein, the preset first network speed threshold is equal to the product of a preset proportional coefficient and the real-time network speed of the mobile terminal, and the preset proportional coefficient is greater than 0 and less than 1.3.根据权利要求2所述的方法,其特征在于,所述调整至少一个后台应用程序所占用的实时网速的步骤,包括:3. The method according to claim 2, wherein the step of adjusting the real-time network speed occupied by at least one background application program comprises:按照所占用实时网速由高到低的顺序,对在所述移动终端后台运行的至少一个后台应用程序进行排序;Sorting at least one background application program running in the background of the mobile terminal according to the order of the occupied real-time network speed from high to low;依次调整排序后的所述至少一个后台应用程序所占用的实时网速,直至所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值。The real-time network speed occupied by the at least one sorted background application is sequentially adjusted until the real-time network speed occupied by the first foreground application is greater than or equal to the preset first network speed threshold.4.根据权利要求3所述的方法,其特征在于,所述依次调整排序后的所述至少一个后台应用程序所占用的实时网速,直至所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值的步骤,包括:4. The method according to claim 3, wherein said sequentially adjusting the real-time network speed occupied by said at least one background application program after sorting, until the real-time network speed occupied by said first foreground application program The step of being greater than or equal to the preset first network speed threshold includes:依次降低排序后的所述至少一个后台应用程序所占用的实时网速;sequentially reducing the real-time network speed occupied by the at least one background application after sorting;在调整所述至少一个后台应用程序所占用的实时网速的过程中,检测所述第一前台应用程序所占用的实时网速;In the process of adjusting the real-time network speed occupied by the at least one background application program, detecting the real-time network speed occupied by the first foreground application program;若检测到所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值,则停止所述至少一个后台应用程序所占用的实时网速的调整。If it is detected that the real-time network speed occupied by the first foreground application is greater than or equal to the preset first network speed threshold, the adjustment of the real-time network speed occupied by the at least one background application is stopped.5.根据权利要求4所述的方法,其特征在于,所述依次降低排序后的所述至少一个后台应用程序所占用的实时网速的步骤,包括:5. The method according to claim 4, wherein the step of sequentially reducing the real-time network speed occupied by the at least one background application after sorting comprises:对于排序后的所述至少一个后台应用程序中的每个应用程序,判断所述后台应用程序是否在预设的网速白名单中;For each of the sorted at least one background application, determine whether the background application is in a preset network speed whitelist;若所述后台应用程序在预设的网速白名单中,则将所述后台应用程序所占用的实时网速的调整至预设第二网速阈值;If the background application is in the preset network speed whitelist, adjusting the real-time network speed occupied by the background application to a preset second network speed threshold;若所述后台应用程序不在预设的网速白名单中,则暂停所述后台应用程序的运行。If the background application program is not in the preset network speed white list, then suspend the running of the background application program.6.根据权利要求1至5中任一项所述的方法,其特征在于,所述获取所述移动终端的实时网速的步骤之前,所述方法还包括:6. The method according to any one of claims 1 to 5, wherein before the step of obtaining the real-time network speed of the mobile terminal, the method further comprises:检测移动终端的网络连接状态;Detect the network connection status of the mobile terminal;若检测到所述网络连接状态发生变化,则执行所述获取所述移动终端的实时网速的步骤;If it is detected that the network connection status changes, the step of obtaining the real-time network speed of the mobile terminal is executed;其中,所述网络连接状态发生变化包括:开启移动网络、连接WIFI、从第一网络切换至第二网络中的至少一种。Wherein, the change of the network connection status includes: at least one of turning on the mobile network, connecting to WIFI, and switching from the first network to the second network.7.根据权利要求1所述的方法,其特征在于,所述获取所述移动终端的实时网速的步骤,包括:7. The method according to claim 1, wherein the step of obtaining the real-time network speed of the mobile terminal comprises:获取所述移动终端至少三个时间段内的网速;Obtaining the network speed of the mobile terminal in at least three time periods;基于所述至少三个时间段内的网速,判断所述移动终端的网速是否稳定;Based on the network speed in the at least three time periods, it is judged whether the network speed of the mobile terminal is stable;若网速稳定,则将所述三个时间段内的网速的平均值确定为所述移动终端的实时网速;If the network speed is stable, then the average value of the network speed in the three time periods is determined as the real-time network speed of the mobile terminal;若网速不稳定,则将所述至少三个时间段中取值最大的网速确定为所述移动终端的实时网速。If the network speed is unstable, the network speed with the largest value in the at least three time periods is determined as the real-time network speed of the mobile terminal.8.根据权利要求1所述的方法,其特征在于,所述根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速的步骤之后,所述方法还包括:8. The method according to claim 1, characterized in that, according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application program, adjusting the real-time network speed running in the background of the mobile terminal After the step of at least one background application occupying the real-time internet speed, the method further includes:检测在所述移动终端前台运行的应用程序的变化信息;Detecting change information of an application program running in the foreground of the mobile terminal;若检测到所述变化信息为:在所述移动终端前台运行的应用程序由所述第一前台应用程序切换至第二前台应用程序,则执行所述获取所述移动终端的实时网速的步骤。If it is detected that the change information is: the application running in the foreground of the mobile terminal is switched from the first foreground application to the second foreground application, then perform the step of obtaining the real-time network speed of the mobile terminal .9.一种移动终端,其特征在于,包括:9. A mobile terminal, characterized in that, comprising:实时网速获取模块,用于获取所述移动终端的实时网速;A real-time network speed acquisition module, configured to obtain the real-time network speed of the mobile terminal;前台应用确定模块,用于确定在所述移动终端前台运行的第一前台应用程序所占用的实时网速;A foreground application determining module, configured to determine the real-time network speed occupied by the first foreground application running in the foreground of the mobile terminal;网速调整模块,用于根据所述实时网速获取模块获取的所述移动终端的实时网速和所述前台应用确定模块确定的第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速。The network speed adjustment module is used to adjust the real-time network speed of the mobile terminal obtained by the real-time network speed acquisition module and the real-time network speed occupied by the first foreground application determined by the foreground application determination module. The real-time network speed occupied by at least one background application running in the background of the mobile terminal.10.根据权利要求9所述的移动终端,其特征在于,所述网速调整模块包括:10. The mobile terminal according to claim 9, wherein the network speed adjustment module comprises:判断单元,用于将所述第一前台应用程序所占用的实时网速与预设第一网速阈值进行比较,并判断所述第一前台应用程序所占用的实时网速是否小于预设第一网速阈值;A judging unit, configured to compare the real-time network speed occupied by the first foreground application with a preset first network speed threshold, and determine whether the real-time network speed occupied by the first foreground application is lower than the preset first threshold. a network speed threshold;网速调整单元,用于若所述第一前台应用程序所占用的实时网速小于所述预设第一网速阈值,则调整至少一个后台应用程序所占用的实时网速;A network speed adjustment unit, configured to adjust the real-time network speed occupied by at least one background application if the real-time network speed occupied by the first foreground application is less than the preset first network speed threshold;其中,所述预设第一网速阈值等于预设比例系数与所述移动终端的实时网速的乘积,所述预设比例系数大于0且小于1。Wherein, the preset first network speed threshold is equal to the product of a preset proportional coefficient and the real-time network speed of the mobile terminal, and the preset proportional coefficient is greater than 0 and less than 1.11.根据权利要求10所述的移动终端,其特征在于,所述网速调整单元包括:11. The mobile terminal according to claim 10, wherein the network speed adjustment unit comprises:排序子单元,用于按照所占用实时网速由高到低的顺序,对在所述移动终端后台运行的至少一个后台应用程序进行排序;The sorting subunit is used to sort at least one background application program running in the background of the mobile terminal according to the order of the occupied real-time network speed from high to low;网速调整子单元,用于依次调整排序后的所述至少一个后台应用程序所占用的实时网速,直至所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值。The network speed adjustment subunit is configured to sequentially adjust the real-time network speed occupied by the at least one sorted background application until the real-time network speed occupied by the first foreground application is greater than or equal to the preset first Internet speed threshold.12.根据权利要求11所述的移动终端,其特征在于,所述网速调整子单元用于:12. The mobile terminal according to claim 11, wherein the network speed adjustment subunit is used for:依次降低排序后的所述至少一个后台应用程序所占用的实时网速;sequentially reducing the real-time network speed occupied by the at least one background application after sorting;在调整所述至少一个后台应用程序所占用的实时网速的过程中,检测所述第一前台应用程序所占用的实时网速;In the process of adjusting the real-time network speed occupied by the at least one background application program, detecting the real-time network speed occupied by the first foreground application program;若检测到所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值,则停止所述至少一个后台应用程序所占用的实时网速的调整。If it is detected that the real-time network speed occupied by the first foreground application is greater than or equal to the preset first network speed threshold, the adjustment of the real-time network speed occupied by the at least one background application is stopped.13.根据权利要求12所述的移动终端,其特征在于,所述依次降低排序后的所述至少一个后台应用程序所占用的实时网速,包括:13. The mobile terminal according to claim 12, wherein said sequentially reducing the real-time network speed occupied by said at least one background application after sorting comprises:对于排序后的所述至少一个后台应用程序中的每个应用程序,判断所述后台应用程序是否在预设的网速白名单中;For each of the sorted at least one background application, determine whether the background application is in a preset network speed whitelist;若所述后台应用程序在预设的网速白名单中,则将所述后台应用程序所占用的实时网速的调整至预设第二网速阈值;If the background application is in the preset network speed whitelist, adjusting the real-time network speed occupied by the background application to a preset second network speed threshold;若所述后台应用程序不在预设的网速白名单中,则暂停所述后台应用程序的运行。If the background application program is not in the preset network speed white list, then suspend the running of the background application program.14.根据权利要求9至13中任一项所述的移动终端,其特征在于,还包括:14. The mobile terminal according to any one of claims 9 to 13, further comprising:网络连接状态检测模块,用于检测移动终端的网络连接状态;The network connection state detection module is used to detect the network connection state of the mobile terminal;第一跳转模块,用于若检测到所述网络连接状态发生变化,则调用所述实时网速获取模块,以获取所述移动终端的实时网速;The first jump module is used to call the real-time network speed acquisition module to obtain the real-time network speed of the mobile terminal if it is detected that the network connection state changes;其中,所述网络连接状态发生变化包括:开启移动网络、连接WIFI、从第一网络切换至第二网络中的至少一种。Wherein, the change of the network connection status includes: at least one of turning on the mobile network, connecting to WIFI, and switching from the first network to the second network.15.根据权利要求9所述的移动终端,其特征在于,所述实时网速获取模块包括:15. The mobile terminal according to claim 9, wherein the real-time network speed acquisition module comprises:网速获取单元,用于获取所述移动终端至少三个时间段内的网速;A network speed obtaining unit, configured to obtain the network speed of the mobile terminal in at least three time periods;网速判断单元,用于基于所述网速获取单元获取的至少三个时间段内的网速,判断所述移动终端的网速是否稳定;A network speed judging unit, configured to judge whether the network speed of the mobile terminal is stable based on the network speed obtained by the network speed obtaining unit in at least three time periods;第一网速确定单元,用于若网速稳定,则将所述三个时间段内的网速的平均值确定为所述移动终端的实时网速;The first network speed determination unit is configured to determine the average value of the network speeds within the three time periods as the real-time network speed of the mobile terminal if the network speed is stable;第二网速确定单元,用于若网速不稳定,则将所述至少三个时间段中取值最大的网速确定为所述移动终端的实时网速。The second network speed determination unit is configured to determine the network speed with the largest value in the at least three time periods as the real-time network speed of the mobile terminal if the network speed is unstable.16.根据权利要求9所述的移动终端,其特征在于,还包括:16. The mobile terminal according to claim 9, further comprising:切换检测模块,用于检测在所述移动终端前台运行的应用程序的变化信息;A handover detection module, configured to detect change information of an application program running in the foreground of the mobile terminal;第二跳转模块,用于若所述切换检测模块检测到所述变化信息为:在所述移动终端前台运行的应用程序由所述第一前台应用程序切换至第二前台应用程序,则执行所述获取所述移动终端的实时网速的步骤。The second jump module is used to execute if the switching detection module detects that the change information is: the application running in the foreground of the mobile terminal is switched from the first foreground application to the second foreground application. The step of acquiring the real-time network speed of the mobile terminal.
CN201610951605.8A2016-10-262016-10-26 A kind of application program network speed control method and mobile terminalActiveCN106533988B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610951605.8ACN106533988B (en)2016-10-262016-10-26 A kind of application program network speed control method and mobile terminal

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610951605.8ACN106533988B (en)2016-10-262016-10-26 A kind of application program network speed control method and mobile terminal

Publications (2)

Publication NumberPublication Date
CN106533988Atrue CN106533988A (en)2017-03-22
CN106533988B CN106533988B (en)2020-07-14

Family

ID=58326838

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610951605.8AActiveCN106533988B (en)2016-10-262016-10-26 A kind of application program network speed control method and mobile terminal

Country Status (1)

CountryLink
CN (1)CN106533988B (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106951327A (en)*2017-03-232017-07-14维沃移动通信有限公司Detection method and mobile terminal of a kind of application program to systematic influence
CN107147591A (en)*2017-06-232017-09-08青岛海信移动通信技术股份有限公司The data processing method and terminal of terminal
CN107205084A (en)*2017-05-112017-09-26北京小米移动软件有限公司Network speed processing method, device and the terminal of application program
CN107436716A (en)*2017-07-142017-12-05珠海格力电器股份有限公司File transmission method and device and electronic equipment
CN107786738A (en)*2017-10-182018-03-09广东欧珀移动通信有限公司Network control method and equipment
CN107948949A (en)*2017-10-202018-04-20北京珠穆朗玛移动通信有限公司Network management, mobile terminal and device
CN108040330A (en)*2017-11-302018-05-15努比亚技术有限公司WiFi directional transmission methods, mobile terminal and readable storage medium storing program for executing
CN108156632A (en)*2017-12-222018-06-12奇酷互联网络科技(深圳)有限公司Control the method, apparatus and mobile terminal of WiFi network speeds
CN109120541A (en)*2018-08-012019-01-01Oppo(重庆)智能科技有限公司Limit method, apparatus, terminal device and the storage medium of network speed
CN109684090A (en)*2018-12-192019-04-26三星电子(中国)研发中心A kind of resource allocation methods and device
CN109992369A (en)*2017-12-292019-07-09广东欧珀移动通信有限公司 Application processing method and apparatus, electronic device, and computer-readable storage medium
CN110018888A (en)*2018-01-102019-07-16广东欧珀移动通信有限公司Method for managing resource, device, mobile terminal and computer readable storage medium
CN110032439A (en)*2018-01-102019-07-19广东欧珀移动通信有限公司Resource management method, resource management device, mobile terminal and computer-readable storage medium
CN110035169A (en)*2018-01-122019-07-19广东欧珀移动通信有限公司 Process processing method and apparatus, electronic device, and computer-readable storage medium
CN110505660A (en)*2019-07-232019-11-26维沃移动通信有限公司 A network rate adjustment method and terminal equipment
CN111385239A (en)*2018-12-272020-07-07茂杉信息技术(上海)有限公司Network security online monitoring system
CN111526529A (en)*2020-04-302020-08-11维沃移动通信有限公司Network prompting method and device and electronic equipment
CN112291799A (en)*2020-10-232021-01-29北京小米移动软件有限公司Download network speed determining method and device, user equipment and storage medium
CN112929238A (en)*2021-03-192021-06-08中网道科技集团股份有限公司Network information acquisition method, device, equipment and readable storage medium
CN114760228A (en)*2020-12-252022-07-15深圳Tcl新技术有限公司Network speed testing method and device, intelligent equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
KR20060025868A (en)*2004-09-172006-03-22주식회사 케이티 Real-time Internet Speed User Setting System in High Speed Internet Network and Its Method
CN101799738A (en)*2010-01-272010-08-11华为终端有限公司Method and device for dynamically adjusting compression rate of browser
US20110149727A1 (en)*2009-12-212011-06-23Electronics And Telecommunications Research InstituteApparatus and method for controlling traffic
US20130111038A1 (en)*2010-07-092013-05-02Attila Technologies, LlcTransparent Proxy Architecture for Multi-Path Data Connections
CN103942319A (en)*2014-04-252014-07-23北京金山网络科技有限公司Searching method and device
CN104168606A (en)*2014-07-242014-11-26深圳天珑无线科技有限公司Network speed control method of mobile terminal
CN105159781A (en)*2015-08-252015-12-16广东欧珀移动通信有限公司 Method, device and intelligent terminal for adjusting application network speed of intelligent terminal
CN105389193A (en)*2015-12-252016-03-09北京奇虎科技有限公司Accelerating processing method, device and system for application, and server
CN105721262A (en)*2016-02-272016-06-29深圳市美贝壳科技有限公司Method capable of saving communication traffics of mobile terminals and intelligent devices
CN105975323A (en)*2016-06-272016-09-28北京金山安全软件有限公司Application management method and device and terminal

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
KR20060025868A (en)*2004-09-172006-03-22주식회사 케이티 Real-time Internet Speed User Setting System in High Speed Internet Network and Its Method
US20110149727A1 (en)*2009-12-212011-06-23Electronics And Telecommunications Research InstituteApparatus and method for controlling traffic
CN101799738A (en)*2010-01-272010-08-11华为终端有限公司Method and device for dynamically adjusting compression rate of browser
US20130111038A1 (en)*2010-07-092013-05-02Attila Technologies, LlcTransparent Proxy Architecture for Multi-Path Data Connections
CN103942319A (en)*2014-04-252014-07-23北京金山网络科技有限公司Searching method and device
CN104168606A (en)*2014-07-242014-11-26深圳天珑无线科技有限公司Network speed control method of mobile terminal
CN105159781A (en)*2015-08-252015-12-16广东欧珀移动通信有限公司 Method, device and intelligent terminal for adjusting application network speed of intelligent terminal
CN105389193A (en)*2015-12-252016-03-09北京奇虎科技有限公司Accelerating processing method, device and system for application, and server
CN105721262A (en)*2016-02-272016-06-29深圳市美贝壳科技有限公司Method capable of saving communication traffics of mobile terminals and intelligent devices
CN105975323A (en)*2016-06-272016-09-28北京金山安全软件有限公司Application management method and device and terminal

Cited By (26)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106951327A (en)*2017-03-232017-07-14维沃移动通信有限公司Detection method and mobile terminal of a kind of application program to systematic influence
CN107205084A (en)*2017-05-112017-09-26北京小米移动软件有限公司Network speed processing method, device and the terminal of application program
CN107147591A (en)*2017-06-232017-09-08青岛海信移动通信技术股份有限公司The data processing method and terminal of terminal
CN107436716A (en)*2017-07-142017-12-05珠海格力电器股份有限公司File transmission method and device and electronic equipment
CN107786738A (en)*2017-10-182018-03-09广东欧珀移动通信有限公司Network control method and equipment
WO2019076213A1 (en)*2017-10-182019-04-25Oppo广东移动通信有限公司Network control method and device
CN107948949A (en)*2017-10-202018-04-20北京珠穆朗玛移动通信有限公司Network management, mobile terminal and device
CN108040330A (en)*2017-11-302018-05-15努比亚技术有限公司WiFi directional transmission methods, mobile terminal and readable storage medium storing program for executing
CN108040330B (en)*2017-11-302021-04-27努比亚技术有限公司WiFi directional transmission method, mobile terminal and readable storage medium
CN108156632A (en)*2017-12-222018-06-12奇酷互联网络科技(深圳)有限公司Control the method, apparatus and mobile terminal of WiFi network speeds
CN109992369A (en)*2017-12-292019-07-09广东欧珀移动通信有限公司 Application processing method and apparatus, electronic device, and computer-readable storage medium
CN110018888A (en)*2018-01-102019-07-16广东欧珀移动通信有限公司Method for managing resource, device, mobile terminal and computer readable storage medium
CN110032439A (en)*2018-01-102019-07-19广东欧珀移动通信有限公司Resource management method, resource management device, mobile terminal and computer-readable storage medium
CN110035169A (en)*2018-01-122019-07-19广东欧珀移动通信有限公司 Process processing method and apparatus, electronic device, and computer-readable storage medium
CN109120541B (en)*2018-08-012022-09-09Oppo(重庆)智能科技有限公司Method, device, terminal equipment and storage medium for limiting network speed
CN109120541A (en)*2018-08-012019-01-01Oppo(重庆)智能科技有限公司Limit method, apparatus, terminal device and the storage medium of network speed
CN109684090A (en)*2018-12-192019-04-26三星电子(中国)研发中心A kind of resource allocation methods and device
CN111385239A (en)*2018-12-272020-07-07茂杉信息技术(上海)有限公司Network security online monitoring system
CN110505660A (en)*2019-07-232019-11-26维沃移动通信有限公司 A network rate adjustment method and terminal equipment
CN110505660B (en)*2019-07-232023-07-14维沃移动通信有限公司 A network rate adjustment method and terminal equipment
CN111526529A (en)*2020-04-302020-08-11维沃移动通信有限公司Network prompting method and device and electronic equipment
CN111526529B (en)*2020-04-302023-03-28维沃移动通信有限公司Network prompting method and device and electronic equipment
CN112291799A (en)*2020-10-232021-01-29北京小米移动软件有限公司Download network speed determining method and device, user equipment and storage medium
CN112291799B (en)*2020-10-232024-04-09北京小米移动软件有限公司 Download network speed determination method and device, user equipment and storage medium
CN114760228A (en)*2020-12-252022-07-15深圳Tcl新技术有限公司Network speed testing method and device, intelligent equipment and storage medium
CN112929238A (en)*2021-03-192021-06-08中网道科技集团股份有限公司Network information acquisition method, device, equipment and readable storage medium

Also Published As

Publication numberPublication date
CN106533988B (en)2020-07-14

Similar Documents

PublicationPublication DateTitle
CN106533988B (en) A kind of application program network speed control method and mobile terminal
CN106231662B (en) A switching control method of terminal antenna and terminal
CN108549513B (en) Application display method, device, storage medium and electronic device
CN106775828B (en) Application installation method and device, computer equipment
CN106919313A (en)The startup method and mobile terminal of a kind of application program
CN107256129A (en) Method and device for switching applications in split-screen mode and related equipment
CN108595218B (en)Method and device for loading dynamic library of system
CN109033247A (en)A kind of management method of application program, device, storage medium and terminal
CN106200970B (en)The method and terminal of a kind of split screen display available
CN106529312B (en)Permission control method and device of mobile terminal and mobile terminal
CN107566015A (en) Antenna control method, device, storage medium and electronic equipment
WO2020007114A1 (en)Method and apparatus for switching split-screen application, storage medium, and electronic device
WO2014036817A1 (en)Terminal and method for dynamically loading application program interface
CN108563416B (en) Application display method, device, storage medium and electronic device
CN107145386B (en)Data migration method, terminal device and computer readable storage medium
CN106843868A (en)Method, device and mobile terminal that a kind of many accounts are logged in
CN106529332B (en)A kind of authority control method of mobile terminal, device and mobile terminal
CN106502808A (en) Method, device and terminal for copying files
US20140282058A1 (en)Electronic device with a funiction of applying applications of different operating systems, system and method thereof
WO2025077644A1 (en)Business traffic load balancing method and system, device, and medium
CN107291327A (en)Application control method and related product
CN107562262A (en)A kind of method, terminal and computer-readable recording medium for responding touch control operation
WO2021092806A1 (en)Screen parameter adjustment method and apparatus, and terminal device
CN106776040A (en) A resource allocation method and device
CN106057213A (en)Method and apparatus for displaying voice pitch data

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp