[go: up one dir, main page]

CN106533988B - A kind of application program network speed control method and mobile terminal - Google Patents

A kind of application program network speed control method and mobile terminal Download PDF

Info

Publication number
CN106533988B
CN106533988B CN201610951605.8A CN201610951605A CN106533988B CN 106533988 B CN106533988 B CN 106533988B CN 201610951605 A CN201610951605 A CN 201610951605A CN 106533988 B CN106533988 B CN 106533988B
Authority
CN
China
Prior art keywords
network speed
real
mobile terminal
application program
occupied
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610951605.8A
Other languages
Chinese (zh)
Other versions
CN106533988A (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 Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201610951605.8A priority Critical patent/CN106533988B/en
Publication of CN106533988A publication Critical patent/CN106533988A/en
Application granted granted Critical
Publication of CN106533988B publication Critical patent/CN106533988B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/80Actions related to the user profile or the type of traffic
    • H04L47/801Real time traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/76Admission control; Resource allocation using dynamic resource allocation, e.g. in-call renegotiation requested by the user or requested by the network in response to changing network conditions
    • H04L47/765Admission control; Resource allocation using dynamic resource allocation, e.g. in-call renegotiation requested by the user or requested by the network in response to changing network conditions triggered by the end-points
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/80Actions related to the user profile or the type of traffic
    • H04L47/803Application aware

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

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

Figure 201610951605

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: acquiring the real-time network speed of the mobile terminal; determining the real-time network speed occupied by a first foreground application running in the foreground of the mobile terminal; The real-time network speed occupied by the foreground application, adjust the real-time network speed occupied by at least one background application running in the background of the mobile terminal. The present invention also provides a mobile terminal. With the method provided by the present invention, the real-time network speed occupied by the background application running on the mobile terminal is adjusted, so as to allocate more real-time network speed to the first foreground application, so as to ensure the smooth running of the first foreground application It solves the problem that the foreground application cannot run smoothly in the prior art.

Figure 201610951605

Description

一种应用程序网速的控制方法及移动终端A kind of application program network speed control method and mobile terminal

技术领域technical field

本发明涉及移动通信技术领域,尤其涉及一种应用程序网速的控制方法及移动终端。The present invention relates to the technical field of mobile communication, in particular to a method for controlling the 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 has been further accelerated. In the field of mobile terminals, more and more Internet-based applications have appeared. Such as video applications, music applications, social applications, games, news reading browsers, cloud storage applications, etc. More and more applications on mobile terminals need to be networked to run, including the application itself, which also needs to be networked for version update. Therefore, at the same time, there may be multiple applications running in the network on the mobile terminal to perform data interaction with the application server.

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

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

发明内容SUMMARY OF THE INVENTION

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

第一方面,本发明实施例提供了一种应用程序网速的控制方法,应用于移动终端,包括:In a first aspect, an 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:

获取所述移动终端的实时网速;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;

根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速。The real-time network speed occupied by at least one background application running in the background of the mobile terminal is adjusted 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, an embodiment of the present invention also provides a mobile terminal, comprising:

实时网速获取模块,用于获取所述移动终端的实时网速;a real-time network speed obtaining module, used for obtaining 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 configured 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 method for controlling the network speed of an application program 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 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, so that more The real-time network speed is allocated to the first foreground application to ensure smooth running of the first foreground application. On the other hand, by dynamically adjusting the real-time network speed occupied by background applications, the smooth running of background applications with network speed requirements is also guaranteed.

附图说明Description of drawings

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

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

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

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

图4是本发明实施例四的移动终端的结构图之一;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 the fourth embodiment of the present invention;

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

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

图8是本发明实施例五的移动终端结构图;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 ways

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

实施例一:Example 1:

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

步骤100,获取所述移动终端的实时网速。Step 100: Obtain 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 acquiring the sum of the network speeds of all TCP/IP network ports of the mobile terminal. In the embodiment of the present invention, a specific method for obtaining the real-time network speed of the mobile terminal is described by taking obtaining the downlink network speed as an example. During specific implementation, you can apply for downloading data by sending a test data 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 all TCP/IP network ports per unit time. The total 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: Determine 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, determine all the applications that occupy the real-time network speed among the applications running on the mobile terminal. In 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 on the network interface, the identifier of the application program occupying the network speed, such as the application program name, can be obtained. , and, the TCP/IP port occupied by the application. By calling the network interface provided by the operating system, the network speed of each TCP/IP port can also be obtained. Then, a first foreground application running in the foreground that occupies the real-time network speed is determined among all the applications that occupy the real-time network speed. Refer to the prior art for a specific solution for determining the application program running in the foreground of the mobile terminal. By matching the determined identifier of the first foreground application with the determined identifiers of all applications occupying the real-time network speed, it can be determined whether the first foreground application occupies the real-time network speed, that is, the mobile The first foreground application running on the terminal that occupies the real-time network 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 the 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 it is determined that there is a first foreground application in the applications 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 whether it is necessary to occupied the real-time network speed It controls the background application program to reduce the real-time network speed occupied by the background application, and allocate more real-time network speed to the first foreground application to ensure the smooth running of the foreground application and further improve the user experience. During specific implementation, the real-time network speed occupied by the background application may be reduced by suspending at least one background application or reducing the real-time network speed occupied by the at least one background application.

本发明实施例公开的应用程序网速的控制方法,通过获取所述移动终端的实时网速,然后确定在所述移动终端前台运行的第一前台应用程序所占用所述实时网速,最后,根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速,以将更多的实时网速分配给第一前台应用程序,以保证第一前台应用程序运行的流畅性。另一方面,通过动态调整后台应用程序所占用的实时网速,也保障了具有网速要求的后台应用程序的流畅运行。The method for controlling the network speed of an application program 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 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, so that more The real-time network speed is allocated to the first foreground application to ensure smooth running of the first foreground application. On the other hand, by dynamically adjusting the real-time network speed occupied by background applications, the smooth running of background applications with network speed requirements is also guaranteed.

实施例二:Embodiment 2:

参见图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 steps 200 to 230 .

步骤200,检测移动终端的网络连接状态是否发生变化,若是,执行步骤210,否则结束。In step 200, it is detected whether the network connection state of the mobile terminal changes, if so, step 210 is executed, otherwise, the process ends.

所述网络连接状态发生变化包括:开启移动网络、连接WIFI、从第一网络切换至第二网络中的至少一种。所述获取所述移动终端的实时网速的步骤之前,所述方法还包括:检测移动终端的网络连接状态;若检测到所述网络连接状态发生变化,则执行所述获取所述移动终端的实时网速的步骤。比如,当移动终端发生从GSM数据网络进入到无线网络,或移动终端开启4G网络,或移动终端接入网线等网络状态变化时,移动终端接入网络的网速通常会发生变化。移动终端的网络连接模块实时监测移动终端的网络连接状态,包括移动终端的网络接口接入网络设备的连接和断开状态、移动终端的网络设置的开启和关闭、连接状态等的网络连接状态的变化。The change in the network connection state 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 acquiring the real-time network speed of the mobile terminal, the method further includes: detecting the network connection state of the mobile terminal; if it is detected that the network connection state changes, executing the acquiring the network connection state of the mobile terminal. Steps to 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 network status changes such as the mobile terminal accesses the network cable, the network speed of the mobile terminal accessing 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 settings of the mobile terminal, the connection status and other network connection status. Variety.

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

所述获取所述移动终端的实时网速包括:获取所述移动终端至少三个时间段内的网速;基于所述至少三个时间段内的网速,判断所述移动终端的网速是否稳定;若网速稳定,则将所述三个时间段内的网速的平均值确定为所述移动终端的实时网速;若网速不稳定,则将所述至少三个时间段中取值最大的网速确定为所述移动终端的实时网速。本发明的实施例中,以获取下行网速为例说明获取移动终端的实时网速的具体方法。具体实施时,可以通过向每个TCP/IP网络端口发送测试数据包,申请下载数据;然后统计每个TCP/IP网络端口单位时间内下载数据量,将所有TCP/IP网络端口单位时间内下载数据量的总和,作为所述移动终端在当前网络连接状态下的最大实时网速。优选的,重复测量所述最大实时网速的多次,以判断当前网络连接是否稳定,若多次测量得到的所述最大实时网速差值在预设范围内,说明当前网络连接稳定,否则,说明当前网络连接不稳定。在当前网络连接稳定的情况下,将所述多次测量得到的所述最大实时网速的平均值作为所述移动终端的实时网速;在当前网络连接不稳定的情况下,选择一个最大实时网速作为所述移动终端的实时网速。通过多次测量网速值,以判断网速是否稳定,并根据网速的稳定状态计算移动终端的实时网速,使得获取的实时网速更准确,进一步提高了网速控制的准确性。The acquiring the real-time network speed of the mobile terminal includes: acquiring the network speed of the mobile terminal in at least three time periods; and judging whether the network speed of the mobile terminal is based on the network speed in the at least three time periods. 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 the real-time network speed of the mobile terminal is described by taking obtaining the downlink network speed as an example. During specific implementation, you can apply for downloading data by sending a test data 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 all TCP/IP network ports per unit time. The total amount of data is used as the maximum real-time network speed of the mobile terminal in the current network connection state. Preferably, the maximum real-time network speed is repeatedly measured 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 taken as the real-time network speed of the mobile terminal; when the current network connection is unstable, a maximum real-time network speed is selected. The network speed is used as the real-time network speed of the mobile terminal. By measuring the network speed value multiple times to determine 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: Determine the real-time network speed occupied by the first foreground application running in the foreground of the mobile terminal.

确定所述移动终端上运行的前台应用程序所占用的实时网速的具体实施方式参见实施例一种的县官步骤,此处不再赘述。For the specific implementation manner of determining the real-time network speed occupied by the foreground application running on the mobile terminal, refer to the steps of the magistrate in the first embodiment, 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 that occupy the real-time network speed, the TCP/IP ports occupied by each application, and the real-time network speed corresponding to each TCP/IP port, as shown in the following table .

Figure BDA0001141564710000061
Figure BDA0001141564710000061

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

然后,在占用所述实时网速的所有应用程序中确定占用所述实时网速的第一前台应用程序。确定移动终端上运行的第一前台应用程序的具体方案参见现有技术。例如,在Android平台上,获取当前运行的应用堆栈,处于所述应用堆栈最顶层的应用程序如APP5就是第一前台应用程序。在移动终端运行的应用程序中,同一时间只有一个前台应用程序,可以有多个后台应用程序。最后,将获取的第一前台应用程序APP5的标识与确定的占用所述实时网速的所有应用程序的标识依次进行匹配,若匹配成功,则说明所述占用所述实时网速的应用程序中包含第一前台应用程序,所述第一前台应用程序即占用所述实时网速的前台应用程序。Then, a first foreground application occupying the real-time network speed is determined among all the applications occupying the real-time network speed. Refer to the prior art for a specific solution for determining the first foreground application running on the mobile terminal. For example, on the Android platform, the currently running application stack is obtained, and the application at the topmost layer of the application stack, such as APP5, is the first foreground application. Among the applications running on the mobile terminal, there is only one foreground application at the same time, and there can be multiple background applications. Finally, match the acquired identifier of the first foreground application APP5 with the determined identifiers of all applications occupying the real-time network speed in turn. If the matching is successful, it means that the applications occupying the real-time network speed are among the A first foreground application is included, and the first foreground application is a foreground application that occupies 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 it is determined that there is a first foreground application in the applications 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 whether it is necessary to occupied the real-time network speed Control the background application program to reduce the real-time network speed occupied by the background application, and allocate more real-time network speed to the first foreground application to ensure the smooth running of the first foreground application and further improve the user experience. . During specific implementation, the real-time network speed occupied by the background application may be reduced by suspending at least one background application or reducing the real-time network speed occupied by the at least one application afterward. 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: Compare the real-time network speed occupied by the first foreground application with the 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. 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 the front-end and back-end applications, first set the corresponding preset first network speed threshold for each application of the mobile terminal when it runs 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 continuously detect the occupied by the first foreground application When the real-time network speed occupied by the first foreground application is lower than the corresponding preset first network speed threshold, the network speed occupied by the background application is reduced. Among them, N is a preset proportional coefficient, for example, the value is 0.8; Vmax is the 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, on the premise of ensuring the smooth running 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, repeatedly detect the real-time network speed occupied by the first foreground application, if the real-time network speed occupied by the first foreground application reaches the preset first network speed threshold , the real-time network speed occupied by other background applications will not be adjusted, 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, you can preferentially adjust the real-time network speed occupied by the background application that occupies the most real-time network speed. During specific implementation, the adjusting the real-time network speed occupied by at least one background application includes: sorting the at least one background application running in the background of the mobile terminal in descending order of the occupied real-time network speed ; sequentially adjust the real-time network speed occupied by the at least one background application after sorting, until the real-time network speed occupied by the first foreground application 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 background application after sorting until the real-time network speed occupied by the first foreground application is greater than or equal to the preset first network speed threshold, including: Reduce the real-time network speed occupied by the sorted at least one background application in sequence; in 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. network speed; if it is detected that 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 adjustment of the real-time network speed occupied by the at least one background application program is stopped. 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 the order of occupying the real-time network speed from high to low, the obtained background application sequence For: APP1, APP2, APP4, APP3. Then, from front to back, firstly adjust the real-time network speed occupied by the first background application APP1. After that, 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 first network speed threshold, the real-time network speed occupied by the background application APP2 is continuously adjusted. By analogy, after each adjustment of a background application, 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 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, it is not necessary to adjust other background applications. Until the real-time network speed occupied by the first foreground application is greater than or equal to the preset first network speed threshold.

优选的,为了保证用户体验,对于一些重要的后台应用程序,不能停止运行,可以通过在保证该后台应用程序占用进行可能少的实时网速的前提下,调整至少一个后台应用程序所占用实时网速。具体实施时,可以预先设置网速白名单,对于网速白名单中的应用程序保证其占用的最低实时网速,对于白名单之外的后台应用程序,通过将其暂停降低其占用的实时网速。所述依次降低排序后的所述至少一个后台应用程序所占用的实时网速,包括:对于排序后的所述至少一个后台应用程序中的每个应用程序,判断所述后台应用程序是否在预设的网速白名单中;若所述后台应用程序在预设的网速白名单中,则将所述后台应用程序所占用的实时网速的调整至预设第二网速阈值;若所述后台应用程序不在预设的网速白名单中,则暂停所述后台应用程序的运行。Preferably, in order to ensure user experience, some important background applications cannot be stopped running. On the premise that the real-time network speed occupied by the background application is guaranteed to be as low as possible, the real-time network occupied by at least one background application can be adjusted. speed. During specific implementation, a network speed whitelist can be set in advance. For the applications in the network speed whitelist, the minimum real-time network speed occupied by them is guaranteed. For background applications outside the whitelist, the real-time network speed occupied by them can be reduced by suspending them. speed. The step of sequentially reducing the real-time network speed occupied by the sorted at least one background application includes: for each application in the sorted at least one background application, judging whether the background application is in the pre-preset mode. If the background application is in the preset network speed whitelist, then the real-time network speed occupied by the background application is adjusted 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 take the application shown in Table 1 as an example, wherein: APP5 is the first foreground application, APP1, APP2, APP4, APP3 are background applications, the real-time network speed of the mobile terminal is 200KB/S, and the The preset first network speed threshold is 0.8×200=160KB/S, and the background application APP1 is in the preset network speed whitelist. After arranging the background applications according to the occupied real-time network speed from high to low, the obtained background application sequence 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, reduce the real-time network speed occupied by the background application APP1 to the corresponding preset second network speed threshold, such as 60KB/S. After that, 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 80KB/S, the real-time network speed occupied by the first foreground application If it is 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. After that, 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 If it is still less than the preset first network speed threshold, continue to adjust the next background application program APP4. By analogy, after each pause or reduction of the network speed occupied by a background application, 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 Set the first network speed threshold, 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, it is not necessary to adjust other 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.

当所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值之后,结束网速调整。After 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 is ended.

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

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

步骤300,检测移动终端的网络连接状态是否发生变化,若是,执行步骤310,否则结束。In step 300, it is detected whether the network connection state of the mobile terminal changes, if so, step 310 is executed, otherwise, the process ends.

检测移动终端的网络连接状态是否发生变化的具体实施方式参见实施例二,此处不再赘述。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: Obtain the real-time network speed of the mobile terminal.

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

步骤320,确定在所述移动终端前台运行的第一前台应用程序所占用的实时网速。Step 320: Determine 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 acquiring 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.

根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速的具体实施方式参见实施例二,此处不再赘述。For the specific implementation 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, refer to Implementation Example 2 will not be repeated here.

步骤340,检测在所述移动终端前台运行的应用程序的变化信息。Step 340, detecting the change information of the application 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; the background application may switch to the foreground, or end running. 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 running in the foreground of the mobile terminal; if the change information is detected: 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.

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

步骤350,判断所述移动终端前台运行的应用程序是否由所述第一前台应用程序切换至第二前台应用程序,若是,则跳转至步骤310,否则结束。Step 350: Determine whether the application running in the foreground of the mobile terminal is switched from the first foreground application to the second foreground application, if so, 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, the real-time network speed of the mobile terminal is re-acquired, and according to the currently running foreground application and background application, Re-adjust the network speed.

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

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

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

实施例四:Embodiment 4:

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

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

前台应用确定模块420,用于确定在所述移动终端前台运行的第一前台应用程序所占用的实时网速;A foreground application determining module 420, configured 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 obtained by the real-time network speed obtaining module 410 and the real-time network speed occupied by the first foreground application determined by the foreground application determining 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 The real-time network speed 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, so as to allocate more real-time network speeds to The first foreground application is used to ensure the smooth running of the first foreground application.

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

判断单元4301,用于将所述第一前台应用程序所占用的实时网速与预设第一网速阈值进行比较,并判断所述第一前台应用程序所占用的实时网速是否小于预设第一网速阈值;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 less 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。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 further includes a port mapping module (not shown in the figure), configured to record the network ports occupied by the applications running on the mobile terminal and the occupied network ports by establishing a port mapping table. Real-time network speed, as well as the application speed of each application. Optionally, the port mapping module is further configured to record that the applications occupying the network port are foreground applications or applications in the network speed whitelist or common background applications.

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

排序子单元43021,用于按照所占用实时网速由高到低的顺序,对在所述移动终端后台运行的至少一个后台应用程序进行排序;The sorting subunit 43021 is used to sort at least one background application 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 used to sequentially adjust the real-time network speed occupied by the at least one background application after the sorting, until the real-time network speed occupied by the first foreground application is greater than or equal to the preset first 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 the sorting;

在调整所述至少一个后台应用程序所占用的实时网速的过程中,检测所述第一前台应用程序所占用的实时网速;In 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;

若检测到所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值,则停止所述至少一个后台应用程序所占用的实时网速的调整。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, the step of sequentially reducing the real-time network speed occupied by the at least one background application after the sequence includes:

对于排序后的所述至少一个后台应用程序中的每个应用程序,判断所述后台应用程序是否在预设的网速白名单中;For each application in the sorted at least one background application, determine whether the background application is in the 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 whitelist, the running of the background application program is suspended.

可选的,如图7所示,所述移动终端40还包括:Optionally, as shown in FIG. 7 , the mobile terminal 40 further 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 state changes. The change in the network connection state 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 obtaining 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;

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

第二网速确定单元,用于若网速不稳定,则将所述至少三个时间段中取值最大的网速确定为所述移动终端的实时网速。The second network speed determining 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 further includes:

切换检测模块460,用于检测在所述移动终端前台运行的应用程序的变化信息;A handover detection module 460, configured to detect the change information of the application 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, the step of acquiring the real-time network speed of the mobile terminal is performed.

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

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

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

实施例五:Embodiment 5:

图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 , memory 802 , at least one network interface 804 and user interface 803 . The various components in the mobile terminal 800 are coupled together by a bus system 805 . It can be understood that the bus system 805 is used to implement the connection 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, for the sake of clarity, the various buses are labeled as bus system 805 in FIG. 8 .

其中,用户接口803可以包括显示器、键盘或者点击设备(例如,鼠标,轨迹球(trackball)、触感板、触摸屏或者触控板等。本实施例通过触摸屏检测用户对桌面文件夹的触发操作,如点击、按压等。The user interface 803 may include a display, a keyboard or a pointing device (for example, a mouse, a trackball, a touch pad, a touch screen or a touch pad, etc.) 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 non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be Read-Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (ErasablePROM, EPROM), Electrically Erasable Program read-only memory (Electrically EPROM, EEPROM) or flash memory. The volatile memory may be Random Access Memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double data rate synchronous dynamic random access memory (DoubleDataRateSDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (SynchlinkDRAM, SLDRAM) and direct memory bus random access Memory (DirectRambusRAM, DRRAM). The memory 802 of the systems and methods described herein is intended to include, but not be limited to, these and any other suitable types of memory.

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

其中,操作系统8021,包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序8022,包含各种应用程序,例如媒体播放器(MediaPlayer)、浏览器(Browser)等,用于实现各种应用业务。实现本发明实施例方法的程序可以包含在应用程序8022中。在本发明实施例中,通过调用存储器802存储的程序或指令,具体的,可以是应用程序8022中存储的程序或指令。通过用户接口803中的触摸屏检测用户使用应用程序的操作,并检测用户点击桌面文件夹的触发操作或打开桌面文件夹的触发操作,以及检测启动应用程序的触发操作。处理器801用于获取所述移动终端的实时网速;确定在所述移动终端前台运行的第一前台应用程序所占用的实时网速;根据所述移动终端的实时网速和所述第一前台应用程序所占用的实时网速,调整在所述移动终端后台运行的至少一个后台应用程序所占用的实时网速。The operating system 8021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing 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., for implementing various application services. The program for implementing the method of the embodiment of the present invention may be included in the application program 8022 . In this embodiment of the present invention, by calling the program or instruction stored in the memory 802 , specifically, the program or instruction stored in the application program 8022 may be used. Through the touch screen in the user interface 803, the user's operation of using the application program is detected, and the trigger operation of the user clicking on the desktop folder or the trigger operation of opening the desktop folder, and the trigger operation of starting the application program are detected. The processor 801 is configured to acquire 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; 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中的用户对应用程序的使用次数,结合其硬件完成上述方法的步骤。The method part disclosed in the above 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 capability. In the implementation process, each step of the above-mentioned method may be completed by an integrated logic circuit of hardware in the processor 801 or an instruction 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 possible Programming logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps, and logical block diagrams disclosed in the embodiments of the present invention can 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 method disclosed in conjunction with the embodiments of the present invention may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory 802, and the processor 801 reads the usage times of the application program by the user 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 will be appreciated that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more Application Specific Integrated Circuits (ASIC), Digital Signal Processing (DSP), Digital Signal Processing Device (DSP Device, DSPD), programmable logic Devices (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.

对于软件实现,可通过执行本文所述功能的模块(例如过程、函数等)来实现本文所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。For a software implementation, the techniques described herein may be implemented through modules (eg, procedures, functions, etc.) that perform the functions described herein. Software codes may be stored in memory and executed by a processor. The memory can be implemented in 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 less than the preset first network speed threshold, adjust the real-time network speed occupied by at least one background application; 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 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 running in the background of the mobile terminal according to the order of the occupied real-time network speed from high to low; adjust the sorted at least one background application in sequence; The real-time network speed occupied by the 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.

可选地,处理器801还用于:依次降低排序后的所述至少一个后台应用程序所占用的实时网速;在调整所述至少一个后台应用程序所占用的实时网速的过程中,检测所述第一前台应用程序所占用的实时网速;若检测到所述第一前台应用程序所占用的实时网速大于或等于所述预设第一网速阈值,则停止所述至少一个后台应用程序所占用的实时网速的调整。Optionally, the processor 801 is further configured to: sequentially reduce 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, 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, stop the at least one background The adjustment of the real-time network speed used by the application.

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

可选地,处理器801还用于:检测移动终端的网络连接状态;若检测到所述网络连接状态发生变化,则执行所述获取所述移动终端的实时网速的步骤。其中,所述网络连接状态发生变化包括:开启移动网络、连接WIFI、从第一网络切换至第二网络中的至少一种。Optionally, the processor 801 is further configured to: detect the network connection state of the mobile terminal; and execute the step of acquiring the real-time network speed of the mobile terminal if it is detected that the network connection state changes. The change in the network connection state 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; based on the network speed in the at least three time periods, determine 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; if the network speed is unstable, the maximum value among the at least three time periods is determined. The network speed is determined as the real-time network speed of the mobile terminal.

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

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

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

实施例六:Embodiment 6:

图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 (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可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 930 may be configured to receive a trigger operation input by a user, and generate a signal input related to user settings and function control of the mobile terminal. Specifically, in this embodiment of the present invention, the input unit 930 may include a touch panel 931 . The touch panel 931, also called a touch screen, can collect the user's touch operations on or near it (such as the user's operations on the touch panel 931 using any suitable objects or accessories such as a finger, a stylus, etc.) The specified program drives the corresponding connection 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 then sends it to the touch controller. To the processor 960, and can receive commands sent by the processor 960 and execute them. In addition, the touch panel 931 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 931, the input unit 930 may also include other input devices 932, and the other input devices 932 may include but are not limited to physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, etc. one or more of.

其中,显示单元940可用于显示由用户输入的信息或提供给用户的信息以及移动终端900的各种菜单界面。显示单元940可包括显示面板941,可选的,可以采用LCD或有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板941。The display unit 940 may be used to display information input by the user or information provided to the user and various menu interfaces of the mobile terminal 900 . The display unit 940 may include a display panel 941. Alternatively, 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 transmitted to the processor 960 to determine the type of touch event, and then the processor The 960 provides corresponding visual output on the touch display depending on the type of touch event.

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

其中处理器960是移动终端900的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在第一存储器921内的软件程序和/或模块,以及调用存储在第二存储器922内的数据,执行移动终端900的各种功能和处理数据,从而对移动终端900进行整体监控。可选的,处理器960可包括一个或多个处理单元。The processor 960 is the control center of the mobile terminal 900, uses various interfaces and lines to connect various parts of the entire mobile phone, 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, processor 960 may include one or more processing units.

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

可选地,处理器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 the sequence; in 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, stop the at least one background The adjustment of the real-time network speed used by the application.

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

可选地,处理器960还用于:检测移动终端的网络连接状态;若检测到所述网络连接状态发生变化,则执行所述获取所述移动终端的实时网速的步骤。其中,所述网络连接状态发生变化包括:开启移动网络、连接WIFI、从第一网络切换至第二网络中的至少一种。Optionally, the processor 960 is further configured to: detect the network connection state of the mobile terminal; and execute the step of acquiring the real-time network speed of the mobile terminal if it is detected that the network connection state changes. The change in the network connection state 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; based on the network speed in the at least three time periods, determine 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; if the network speed is unstable, the maximum value among the at least three time periods is determined. The network speed is determined as the real-time network speed of the mobile terminal.

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

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

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

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的移动终端的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the mobile terminal described above, reference may be made 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 apparatus and method may be implemented in other manners. For example, the apparatus 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 may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.

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

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

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

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

本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于移动终端实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments may 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 related parts, please refer to the partial description of the method embodiment.

Claims (12)

1. A method for controlling the network speed of an application program is applied to a mobile terminal, and is characterized by comprising the following steps:
acquiring the real-time network speed of the mobile terminal; the real-time network speed is the sum of the network speeds of all TCP/IP network ports of the mobile terminal;
determining the real-time network speed occupied by a first foreground application program running on a foreground of the mobile terminal; the real-time network speed occupied by the first foreground application program is obtained by calculating the sum of the network speeds of all TCP/IP ports occupied by the first foreground application program;
adjusting the real-time network speed occupied by at least one background application program 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 program;
the step of adjusting the real-time network speed occupied by at least one background application program 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 program comprises the following steps:
comparing the real-time network speed occupied by the first foreground application program with a preset first network speed threshold value;
if the real-time network speed occupied by the first foreground application program is smaller than the preset first network speed threshold value, adjusting the real-time network speed occupied by at least one background application program;
the preset first network speed threshold value is equal to the product of a preset proportionality coefficient and the real-time network speed of the mobile terminal, and the preset proportionality coefficient is greater than 0 and smaller than 1;
after the step of adjusting the real-time network speed occupied by at least one background application program 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 program, the method further includes:
detecting change information of an application program running in a foreground of the mobile terminal;
if the change information is detected to be: and switching the application program running in the foreground of the mobile terminal from the first foreground application program to a second foreground application program, and executing the step of acquiring the real-time network speed of the mobile terminal.
2. The method of claim 1, wherein the step of adjusting the real-time network speed occupied by the at least one background application comprises:
sequencing at least one background application program running in the background of the mobile terminal according to the sequence of the occupied real-time network speed from high to low;
and sequentially adjusting the real-time network speed occupied by the sequenced at least one 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 value.
3. The method according to claim 2, wherein the step of sequentially adjusting the real-time network speed occupied by the sequenced at least one 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 value includes:
sequentially reducing the real-time network speed occupied by the sequenced at least one background application program;
detecting the real-time network speed occupied by the first foreground application program in the process of adjusting the real-time network speed occupied by the at least one background application program;
and if the real-time network speed occupied by the first foreground application program is detected to be greater than or equal to the preset first network speed threshold value, stopping the adjustment of the real-time network speed occupied by the at least one background application program.
4. The method of claim 3, wherein the step of sequentially reducing the real-time network speed occupied by the sequenced at least one background application comprises:
for each application program in the at least one sequenced background application program, judging whether the background application program is in a preset network speed white list or not;
if the background application program is in a preset network speed white list, adjusting the real-time network speed occupied by the background application program to a preset second network speed threshold value;
and if the background application program is not in the preset network speed white list, suspending the running of the background application program.
5. The method according to any of claims 1 to 4, wherein the step of obtaining the real-time wire speed of the mobile terminal is preceded by the method further comprising:
detecting a network connection state of the mobile terminal;
if the network connection state is detected to be changed, executing the step of acquiring the real-time network speed of the mobile terminal;
wherein the network connection state changing comprises: at least one of starting a mobile network, connecting WIFI and switching from a first network to a second network.
6. The method according to claim 1, wherein the step of obtaining the real-time wire speed of the mobile terminal comprises:
acquiring network speeds of the mobile terminal in at least three time periods;
judging whether the network speed of the mobile terminal is stable or not based on the network speeds in the at least three time periods;
if the network speed is stable, determining the average value of the network speeds in the three time periods as the real-time network speed of the mobile terminal;
and if the network speed is unstable, determining the network speed with the maximum value in the at least three time periods as the real-time network speed of the mobile terminal.
7. A mobile terminal, comprising:
the real-time network speed acquisition module is used for acquiring the real-time network speed of the mobile terminal; the real-time network speed is the sum of the network speeds of all TCP/IP network ports of the mobile terminal;
the foreground application determining module is used for determining the real-time network speed occupied by a first foreground application program running on a foreground of the mobile terminal; the real-time network speed occupied by the first foreground application program is obtained by calculating the sum of the network speeds of all TCP/IP ports occupied by the first foreground application program;
the network speed adjusting module is used for adjusting the real-time network speed occupied by at least one background application program running in the background of the mobile terminal according to the real-time network speed of the mobile terminal acquired by the real-time network speed acquiring module and the real-time network speed occupied by the first foreground application program determined by the foreground application determining module;
the network speed adjusting module comprises:
the judging unit is used for comparing the real-time network speed occupied by the first foreground application program with a preset first network speed threshold value and judging whether the real-time network speed occupied by the first foreground application program is smaller than the preset first network speed threshold value or not;
the network speed adjusting unit is used for adjusting the real-time network speed occupied by at least one background application program if the real-time network speed occupied by the first foreground application program is smaller than the preset first network speed threshold value;
the preset first network speed threshold value is equal to the product of a preset proportionality coefficient and the real-time network speed of the mobile terminal, and the preset proportionality coefficient is greater than 0 and smaller than 1;
the switching detection module is used for detecting the change information of the application program running in the foreground of the mobile terminal;
a second skip module, configured to, if the change information detected by the handover detection module is: and switching the application program running in the foreground of the mobile terminal from the first foreground application program to a second foreground application program, and executing the step of acquiring the real-time network speed of the mobile terminal.
8. The mobile terminal according to claim 7, wherein the network speed adjusting unit comprises:
the sequencing subunit is used for sequencing at least one background application program running in the background of the mobile terminal according to the sequence of the occupied real-time network speed from high to low;
and the network speed adjusting subunit is used for sequentially adjusting the real-time network speed occupied by the sequenced at least one 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 value.
9. The mobile terminal of claim 8, wherein the wire speed adjustment subunit is configured to:
sequentially reducing the real-time network speed occupied by the sequenced at least one background application program;
detecting the real-time network speed occupied by the first foreground application program in the process of adjusting the real-time network speed occupied by the at least one background application program;
and if the real-time network speed occupied by the first foreground application program is detected to be greater than or equal to the preset first network speed threshold value, stopping the adjustment of the real-time network speed occupied by the at least one background application program.
10. The mobile terminal of claim 9, wherein the sequentially reducing the real-time network speed occupied by the sequenced at least one background application comprises:
for each application program in the at least one sequenced background application program, judging whether the background application program is in a preset network speed white list or not;
if the background application program is in a preset network speed white list, adjusting the real-time network speed occupied by the background application program to a preset second network speed threshold value;
and if the background application program is not in the preset network speed white list, suspending the running of the background application program.
11. The mobile terminal according to any of claims 7 to 10, further comprising:
the network connection state detection module is used for detecting the network connection state of the mobile terminal;
the first skip module is used for calling the real-time network speed acquisition module to acquire the real-time network speed of the mobile terminal if the change of the network connection state is detected;
wherein the network connection state changing comprises: at least one of starting a mobile network, connecting WIFI and switching from a first network to a second network.
12. The mobile terminal of claim 7, wherein the real-time network speed obtaining module comprises:
the network speed acquisition unit is used for acquiring 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 speeds in at least three time periods acquired by the network speed acquiring unit;
a first network speed determining unit, configured to determine, if the network speed is stable, an average value of the network speeds in the three time periods as a real-time network speed of the mobile terminal;
and the second network speed determining unit is used for determining the network speed with the maximum value in the at least three time periods as the real-time network speed of the mobile terminal if the network speed is unstable.
CN201610951605.8A 2016-10-26 2016-10-26 A kind of application program network speed control method and mobile terminal Active CN106533988B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610951605.8A CN106533988B (en) 2016-10-26 2016-10-26 A kind of application program network speed control method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610951605.8A CN106533988B (en) 2016-10-26 2016-10-26 A kind of application program network speed control method and mobile terminal

Publications (2)

Publication Number Publication Date
CN106533988A CN106533988A (en) 2017-03-22
CN106533988B true CN106533988B (en) 2020-07-14

Family

ID=58326838

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610951605.8A Active CN106533988B (en) 2016-10-26 2016-10-26 A kind of application program network speed control method and mobile terminal

Country Status (1)

Country Link
CN (1) CN106533988B (en)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106951327B (en) * 2017-03-23 2018-11-30 维沃移动通信有限公司 The detection method and mobile terminal of a kind of application program to systematic influence
CN107205084B (en) * 2017-05-11 2020-12-18 北京小米移动软件有限公司 Application program network speed processing method, device and terminal
CN107147591A (en) * 2017-06-23 2017-09-08 青岛海信移动通信技术股份有限公司 The data processing method and terminal of terminal
CN107436716A (en) * 2017-07-14 2017-12-05 珠海格力电器股份有限公司 File transmission method and device and electronic equipment
CN107786738B (en) * 2017-10-18 2019-10-25 Oppo广东移动通信有限公司 Network control method and device
CN107948949A (en) * 2017-10-20 2018-04-20 北京珠穆朗玛移动通信有限公司 Network management, mobile terminal and device
CN108040330B (en) * 2017-11-30 2021-04-27 努比亚技术有限公司 WiFi directional transmission method, mobile terminal and readable storage medium
CN108156632B (en) * 2017-12-22 2021-11-23 奇酷互联网络科技(深圳)有限公司 Method and device for controlling WiFi network speed and mobile terminal
CN109992369B (en) * 2017-12-29 2021-06-08 Oppo广东移动通信有限公司 Application processing method and apparatus, electronic device, and computer-readable storage medium
CN110032439A (en) * 2018-01-10 2019-07-19 广东欧珀移动通信有限公司 Resource management method, resource management device, mobile terminal and computer-readable storage medium
CN110018888A (en) * 2018-01-10 2019-07-16 广东欧珀移动通信有限公司 Method for managing resource, device, mobile terminal and computer readable storage medium
CN110035169A (en) * 2018-01-12 2019-07-19 广东欧珀移动通信有限公司 Process processing method and apparatus, electronic device, and computer-readable storage medium
CN109120541B (en) * 2018-08-01 2022-09-09 Oppo(重庆)智能科技有限公司 Method, device, terminal equipment and storage medium for limiting network speed
CN109684090A (en) * 2018-12-19 2019-04-26 三星电子(中国)研发中心 A kind of resource allocation methods and device
CN111385239A (en) * 2018-12-27 2020-07-07 茂杉信息技术(上海)有限公司 Network security online monitoring system
CN110505660B (en) * 2019-07-23 2023-07-14 维沃移动通信有限公司 A network rate adjustment method and terminal equipment
CN111526529B (en) * 2020-04-30 2023-03-28 维沃移动通信有限公司 Network prompting method and device and electronic equipment
CN112291799B (en) * 2020-10-23 2024-04-09 北京小米移动软件有限公司 Download network speed determination method and device, user equipment and storage medium
CN114760228A (en) * 2020-12-25 2022-07-15 深圳Tcl新技术有限公司 Network speed testing method and device, intelligent equipment and storage medium
CN112929238B (en) * 2021-03-19 2022-12-16 中网道科技集团股份有限公司 Network information acquisition method, device and equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799738A (en) * 2010-01-27 2010-08-11 华为终端有限公司 Method and device for dynamically adjusting compression rate of browser
CN103942319A (en) * 2014-04-25 2014-07-23 北京金山网络科技有限公司 Searching method and device
CN104168606A (en) * 2014-07-24 2014-11-26 深圳天珑无线科技有限公司 Network speed control method of mobile terminal
CN105159781A (en) * 2015-08-25 2015-12-16 广东欧珀移动通信有限公司 Method, device and intelligent terminal for adjusting application network speed of intelligent terminal

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100717933B1 (en) * 2004-09-17 2007-05-11 주식회사 케이티 Real-time Internet Speed User Setting System in High Speed Internet Network and Its Method
KR101326983B1 (en) * 2009-12-21 2014-01-15 한국전자통신연구원 Apparatus and method for controlling traffic
WO2012006595A2 (en) * 2010-07-09 2012-01-12 Nicolas Girard Transparent proxy architecture for multi-path data connections
CN105389193B (en) * 2015-12-25 2019-04-26 北京奇虎科技有限公司 Application acceleration processing method, device and system, server
CN105721262A (en) * 2016-02-27 2016-06-29 深圳市美贝壳科技有限公司 Method capable of saving communication traffics of mobile terminals and intelligent devices
CN105975323A (en) * 2016-06-27 2016-09-28 北京金山安全软件有限公司 Application management method and device and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799738A (en) * 2010-01-27 2010-08-11 华为终端有限公司 Method and device for dynamically adjusting compression rate of browser
CN103942319A (en) * 2014-04-25 2014-07-23 北京金山网络科技有限公司 Searching method and device
CN104168606A (en) * 2014-07-24 2014-11-26 深圳天珑无线科技有限公司 Network speed control method of mobile terminal
CN105159781A (en) * 2015-08-25 2015-12-16 广东欧珀移动通信有限公司 Method, device and intelligent terminal for adjusting application network speed of intelligent terminal

Also Published As

Publication number Publication date
CN106533988A (en) 2017-03-22

Similar Documents

Publication Publication Date Title
CN106533988B (en) A kind of application program network speed control method and mobile terminal
CN107466077B (en) A kind of network switching method and mobile terminal
CN108549513B (en) Application display method, device, storage medium and electronic device
US10725646B2 (en) Method and apparatus for switching screen interface and terminal
JP6185320B2 (en) Electronic device and method for changing set value
CN106775828B (en) Application installation method and device, computer equipment
CN107861730B (en) Application processing method and mobile terminal
CN107835033A (en) Control method, device, terminal equipment and storage medium of antenna tuning switch
WO2020007114A1 (en) Method and apparatus for switching split-screen application, storage medium, and electronic device
WO2019072020A1 (en) Network bandwidth management method, terminal and computer storage medium
CN106200970B (en) The method and terminal of a kind of split screen display available
TW201504918A (en) Method, device and moving terminal for examining messages
CN107566015A (en) Antenna control method, device, storage medium and electronic equipment
CN108563416B (en) Application display method, device, storage medium and electronic device
CN109033247A (en) A kind of management method of application program, device, storage medium and terminal
CN108595218A (en) Method and device for loading system dynamic library
CN107648844A (en) A kind of game mode method to set up and mobile terminal
CN111078108A (en) Screen display method and device, storage medium and mobile terminal
CN106455018A (en) Method for processing video call and mobile terminal
CN106502808A (en) Method, device and terminal for copying files
WO2025077644A1 (en) Business traffic load balancing method and system, device, and medium
US20140282058A1 (en) Electronic device with a funiction of applying applications of different operating systems, system and method thereof
CN107463395B (en) Component calling method and device
CN106057213A (en) Method and apparatus for displaying voice pitch data
CN107728898B (en) Information processing method and mobile terminal

Legal Events

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