CN106533988B - Application program network speed control method and mobile terminal - Google Patents

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
application program
mobile terminal
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

Abstract

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 comprises the following steps: acquiring the real-time network speed 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; and 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 invention also provides the mobile terminal. By the method provided by the invention, the real-time network speed occupied by the background application program running on the mobile terminal is adjusted to distribute more real-time network speeds to the first foreground application program, so that the running smoothness of the first foreground application program is ensured, and the problem that the foreground application program cannot run smoothly in the prior art is solved.

Description

Application program network speed control method and mobile terminal
Technical Field
The invention relates to the technical field of mobile communication, in particular to a method for controlling the network speed of an application program and a mobile terminal.
Background
With the popularization of mobile terminals, the development of the mobile internet era is further accelerated, and more internet-based application programs appear in the field of mobile terminals. Such as video applications, music applications, social applications, games, news reading browsers, cloud disk-like storage applications, and so forth. More and more applications on mobile terminals need to be networked to run, including applications themselves which also need to be networked for version updates. Therefore, at the same time, a plurality of applications may exist on the mobile terminal, and the applications are operated in a networking mode and interact with the application server.
However, under the condition of insufficient or unstable network bandwidth, the foreground application on the mobile terminal, such as a browser and a video application, is affected by the network speed, and when data interaction is performed with the server side on the network side, the situations of slow loading, failed loading of pictures, or jamming and the like often occur, which seriously affects the user experience.
Therefore, in the prior art, smooth operation of foreground application programs cannot be guaranteed under the condition that the network speed is limited.
Disclosure of Invention
The invention provides a method for controlling the network speed of an application program and a mobile terminal, which solve the problem that the foreground application program cannot smoothly run 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 an application program network speed, which is applied to a mobile terminal, and includes:
acquiring the real-time network speed 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;
and 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.
In a second aspect, an embodiment of the present invention further provides a mobile terminal, including:
the real-time network speed acquisition module is used for acquiring the real-time network speed 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;
and 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 method for controlling the network speed of the application program disclosed by the embodiment of the invention comprises the steps of acquiring the real-time network speed of the mobile terminal, then determining the real-time network speed occupied by a first foreground application program running on a foreground of the mobile terminal, and finally adjusting the real-time network speed occupied by at least one background application program running on a 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 so as to distribute more real-time network speeds to the first foreground application program, thereby ensuring the smoothness of the running of the first foreground application program. On the other hand, the smooth running of the background application program with the network speed requirement is also ensured by dynamically adjusting the real-time network speed occupied by the background application program.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart of a method for controlling the network speed of an application according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a method for controlling the network speed of an application according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a method for controlling the network speed of an application according to a third embodiment of the present invention;
fig. 4 is one of the structural diagrams of a mobile terminal according to a fourth embodiment of the present invention;
fig. 5 is a second structural diagram of a mobile terminal according to a fourth embodiment of the present invention;
fig. 6 is a third structural diagram of a mobile terminal according to a fourth embodiment of the present invention;
fig. 7 is a fourth of the structure diagram of the mobile terminal according to the fourth embodiment of the present invention;
fig. 8 is a structure diagram of a mobile terminal according to a fifth embodiment of the present invention;
fig. 9 is a configuration diagram of a mobile terminal according to a sixth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
the embodiment provides a method for controlling the network speed of an application program, as shown in fig. 1, the method includes: step 100 to step 120.
And step 100, acquiring the real-time network speed of the mobile terminal.
The obtaining of the real-time network speed of the mobile terminal is specifically to obtain 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 acquiring a real-time network speed of a mobile terminal is described by taking an example of acquiring a downlink network speed. In specific implementation, the data can be applied for downloading by sending a test data packet to each TCP/IP network port; then, the download data volume of each TCP/IP network port in unit time is counted, and the sum of the download data volumes of all the TCP/IP network ports in unit time is used as the maximum real-time network speed of the mobile terminal in the current network connection state.
And step 110, determining the real-time network speed occupied by the first foreground application program running on the foreground of the mobile terminal.
Firstly, all the application programs occupying the real-time network speed in the application programs running on the mobile terminal are determined. In specific implementation, when an application program of the mobile terminal calls a network interface provided by an operating system to perform data transmission, by registering a monitoring event or a hook function in the network interface, an identifier of the application program occupying the network speed, such as an application program name, and a TCP/IP port occupied by the application program, can be obtained. The network speed of each TCP/IP port can be obtained by calling a network interface provided by an operating system. And then, determining a first foreground application program which occupies the real-time network speed and runs in a foreground from all the application programs occupying the real-time network speed. The specific scheme for determining the application program running in the foreground of the mobile terminal is referred to in the prior art. And matching the determined identifier of the first foreground application program with the determined identifiers of all the application programs occupying the real-time network speed, so as to determine whether the first foreground application program occupies the real-time network speed, namely the first foreground application program operating on the mobile terminal and occupying the real-time network speed. In practical application, each application program may occupy multiple TCP/IP ports for data transmission, and the real-time network speed occupied by each application program is the sum of the network speeds of all the TCP/IP ports occupied by the application program. And calculating the sum of the network speeds of all TCP/IP ports occupied by the first foreground application program to obtain the real-time network speed occupied by the first foreground application program.
And step 120, 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.
After determining that the first foreground application program exists in the application program occupying the real-time network speed, judging whether the background application program occupying the real-time network speed needs to be controlled or not according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application program so as to reduce the real-time network speed occupied by the background application program, distributing more real-time network speeds to the first foreground application program so as to ensure the smoothness of the operation of the foreground application program and further improve the user experience. In specific implementation, the real-time network speed occupied by the background application program can be reduced by suspending the at least one background application program or reducing the real-time network speed occupied by the at least one background application program.
The method for controlling the network speed of the application program disclosed by the embodiment of the invention comprises the steps of acquiring the real-time network speed of the mobile terminal, then determining the real-time network speed occupied by a first foreground application program running on a foreground of the mobile terminal, and finally adjusting the real-time network speed occupied by at least one background application program running on a 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 so as to distribute more real-time network speeds to the first foreground application program, thereby ensuring the smoothness of the running of the first foreground application program. On the other hand, the smooth running of the background application program with the network speed requirement is also ensured by dynamically adjusting the real-time network speed occupied by the background application program.
Example two:
referring to fig. 2, the present embodiment provides a method for controlling an application program network speed, where the method includes: step 200 to step 230.
Step 200, detecting whether the network connection state of the mobile terminal changes, if so, executing step 210, otherwise, ending.
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. Before the step of obtaining the real-time network speed of the mobile terminal, the method further includes: detecting a network connection state of the mobile terminal; and if the network connection state is detected to be changed, executing the step of acquiring the real-time network speed of the mobile terminal. For example, when the mobile terminal enters the wireless network from the GSM data network, or the mobile terminal opens the 4G network, or the mobile terminal accesses the network cable, the network speed of the mobile terminal accessing the network will change. The network connection module of the mobile terminal monitors the network connection state of the mobile terminal in real time, and the network connection state comprises the connection and disconnection state of a network interface access network device of the mobile terminal, the opening and closing of the network setting of the mobile terminal, the connection state and the like.
And step 210, acquiring the real-time network speed of the mobile terminal.
The acquiring the real-time network 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. In the embodiment of the present invention, a specific method for acquiring a real-time network speed of a mobile terminal is described by taking an example of acquiring a downlink network speed. In specific implementation, the data can be applied for downloading by sending a test data packet to each TCP/IP network port; then, the download data volume of each TCP/IP network port in unit time is counted, and the sum of the download data volumes of all the TCP/IP network ports in unit time 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 for multiple times to judge whether the current network connection is stable, if the maximum real-time network speed difference obtained by the multiple measurements is within a preset range, the current network connection is stable, and if not, the current network connection is unstable. Taking the average value of the maximum real-time network speed obtained by the multiple measurements as the real-time network speed of the mobile terminal under the condition that the current network connection is stable; and under the condition that the current network connection is unstable, selecting a maximum real-time network speed as the real-time network speed of the mobile terminal. The network speed value is measured for multiple times to judge whether the network speed is stable, and the real-time network speed of the mobile terminal is calculated according to the stable state of the network speed, so that the acquired real-time network speed is more accurate, and the accuracy of network speed control is further improved.
Step 220, determining the real-time network speed occupied by the first foreground application program running on the foreground of the mobile terminal.
For a specific implementation of determining the real-time network speed occupied by the foreground application running on the mobile terminal, refer to the county officer step in the first embodiment, which is not described herein again.
In specific implementation, a TCP port mapping table may be established for recording the application programs occupying the real-time network speed, the TCP/IP ports occupied by each application program, and the real-time network speed corresponding to each TCP/IP port, as shown in the following table.
Figure BDA0001141564710000061
Table 1: TCP port mapping table
And then, determining a first foreground application program occupying the real-time network speed in all the application programs occupying the real-time network speed. For determining a specific scheme of a first foreground application running on a mobile terminal, refer to the prior art. For example, on an Android platform, a currently running application stack is obtained, and an application program at the topmost layer of the application stack, such as APP5, is a first foreground application program. In the application programs run by the mobile terminal, only one foreground application program is available at the same time, and a plurality of background application programs can be available. And finally, sequentially matching the obtained identifiers of the first foreground application APP5 with the determined identifiers of all the applications occupying the real-time network speed, and if the matching is successful, indicating that the applications occupying the real-time network speed include a first foreground application, wherein the first foreground application occupies the foreground application of the real-time network speed.
And step 230, 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.
After determining that the first foreground application program exists in the application program occupying the real-time network speed, judging whether the background application program occupying the real-time network speed needs to be controlled or not according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application program so as to reduce the real-time network speed occupied by the background application program, distributing more real-time network speeds to the first foreground application program, ensuring the running smoothness of the first foreground application program and further improving the user experience. In specific implementation, the real-time network speed occupied by the background application program can be reduced by suspending at least one background application program or reducing the real-time network speed occupied by at least one application program. During specific implementation, according to the real-time network speed of the mobile terminal and the real-time network speed occupied by the first foreground application, adjusting the real-time network speed occupied by at least one background application running in the background of the mobile terminal includes: comparing the real-time network speed occupied by the first foreground application program with a preset first network speed threshold value; and if the real-time network speed occupied by the first foreground application program is less 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 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 larger than 0 and smaller than 1. In order to reasonably distribute the network speed occupied by the foreground application program and the background application program, firstly, setting a corresponding preset first network speed threshold value for each application program of the mobile terminal when the foreground application program runs, wherein when the real-time network speed occupied by the first foreground application program is greater than or equal to the corresponding preset first network speed threshold value, the real-time network speed occupied by the background application program does not need to be adjusted, but the network speed occupied by the first foreground application program is continuously detected; and when the real-time network speed occupied by the first foreground application program is smaller than the corresponding preset first network speed threshold value, reducing the network speed occupied by the background application program. Wherein N is a preset proportionality coefficient, for example, the value is 0.8; vmax is the real-time network speed. When the real-time network speed occupied by the background application program is adjusted, in order to fully utilize the network speed and ensure that the background application program is properly operated on the premise of ensuring the smooth operation of the first foreground application program, a mode of adjusting one by one is adopted. After the real-time network speed occupied by one background application program is adjusted, the real-time network speed occupied by the first foreground application program is repeatedly detected, if the real-time network speed occupied by the first foreground application program reaches a preset first network speed threshold value, the real-time network speed occupied by other background application programs is not adjusted, and otherwise, the real-time network speed occupied by the next background application program is continuously adjusted.
In order to improve the efficiency of adjusting the network speed, the real-time network speed occupied by the background application program occupying the most real-time network speed can be preferentially adjusted. In specific implementation, the adjusting the real-time network speed occupied by the at least one background application program includes: 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. The adjusting the real-time network speed occupied by the sequenced at least one background application program in sequence 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 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. Taking the application programs in table 1 as an example, the background application programs include: APP1, APP2, APP3 and APP4, after the background application programs occupying the network speed are arranged in sequence from high to low according to the real-time network speed, the obtained background application program sequence is as follows: APP1, APP2, APP4, APP 3. Then, from front to back, the real-time wire speed occupied by the first background application APP1 is preferentially adjusted. And then, re-determining the real-time network speed occupied by the first foreground application program. And if the real-time network speed occupied by the first foreground application program is less than a preset first network speed threshold value, continuously adjusting the real-time network speed occupied by the background application program APP 2. And so on, after adjusting each background application program, re-determining the real-time network speed occupied by the first foreground application program, and if the real-time network speed occupied by the first foreground application program is less than a preset first network speed threshold value, continuing to adjust the background application program; and if the real-time network speed occupied by the first foreground application program is greater than or equal to a preset first network speed threshold value, other background application programs do not need to be adjusted. Until the real-time network speed occupied by the first foreground application program is greater than or equal to a preset first network speed threshold value.
Preferably, in order to ensure user experience, for some important background applications, the running cannot be stopped, and the real-time network speed occupied by at least one background application can be adjusted on the premise of ensuring that the background application occupies a possibly small real-time network speed. During specific implementation, the network speed white list can be preset, the lowest real-time network speed occupied by the application programs in the network speed white list is ensured, and the real-time network speed occupied by the background application programs outside the white list is reduced by suspending the background application programs. The sequentially reducing the real-time network speed occupied by the sequenced at least one background application program comprises the following steps: 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.
Still taking the application program shown in table 1 as an example, where APP5 is a first foreground application program, APP1, APP2, APP4, and APP3 are background application programs, the real-time network speed of the mobile terminal is 200KB/S, the preset first network speed threshold of APP5 is 0.8 × ═ 160KB/S, the background application program APP1 is in a preset network speed white list, the obtained background application program sequences are APP 7, APP2, APP4, and app3 after arranging the background application programs in the order of the occupied real-time network speed from high to low, then, preferentially adjust the real-time network speed occupied by the first background application program 1 from forward to backward, because APP1 is in the preset network speed white list, first, if the real-time network speed occupied by APP1 is reduced to the corresponding preset second network speed threshold, if the real-time network speed occupied by the first background application program is still smaller than the preset first background application program, if the first background application program is still smaller than the preset first background application program, then the preset background application program is still occupied by the first background application program, if the first background application program is smaller than the preset background application program, then the first background application program is still occupied by the first background application program, if the first background application program, the first background application program is still smaller than the preset network speed threshold, then the preset network speed threshold, the first background application program is still occupied by the first background application program, if the first background application program, the preset network speed is still occupied by the first background application program, the foreground application program, the first background application program is still suspended real-time network speed is still suspended, if the first background application program, the second background application program, the foreground application program, if the background application program is still suspended, if the second background application program, the second background application program is still suspended application program, the first background application program, if the second background application program is still suspended application program, the second background application program, if the second background application program is still suspended in the first background application program, if the foreground application program, the foreground.
And when 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, finishing the network speed adjustment.
The network speed adjusting efficiency is further improved by preferentially adjusting the real-time network speed occupied by the background application program occupying the most real-time network speed.
The method for controlling the network speed of the application program disclosed by the embodiment of the invention comprises the steps of detecting whether the network connection state of the mobile terminal is changed or not, if so, acquiring the real-time network speed of the mobile terminal, then determining the real-time network speed occupied by a first foreground application program running on a foreground of the mobile terminal, and finally adjusting the real-time network speed occupied by at least one background application program running on a 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 so as to distribute more real-time network speeds to the first foreground application program and ensure the running smoothness of the foreground application program. By presetting the network speed white list, the smooth operation of foreground application programs can be effectively guaranteed, and the smooth operation of important background application programs can also be guaranteed.
Example three:
referring to fig. 3, the present embodiment provides a method for controlling an application program network speed, where the method includes: step 300 to step 350.
Step 300, detecting whether the network connection state of the mobile terminal changes, if so, executing step 310, otherwise, ending.
For a specific implementation of detecting whether the network connection status of the mobile terminal changes, refer to embodiment two, which is not described herein again.
And 310, acquiring the real-time network speed of the mobile terminal.
For specific implementation, refer to example two, which is not described herein again.
And 320, determining the real-time network speed occupied by the first foreground application program running on the foreground of the mobile terminal.
For a specific implementation of obtaining the real-time network speed of the mobile terminal, refer to embodiment two, which is not described herein again.
And 330, 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.
Referring to embodiment two, the detailed 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 is not described herein again.
Step 340, detecting the change information of the application program running in the foreground of the mobile terminal.
The application programs running in the foreground and the background of the mobile terminal can be dynamically changed, namely: the foreground application program may end running or change to running in the background; background applications may be switched to foreground operation or end operation, and in order to timely and accurately control the network speed of the applications, the operation state of the applications needs to be monitored in real time. 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 comprises the following steps: 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.
In a specific implementation, the prior art may be adopted to detect the change information of the application program running on the foreground of the mobile terminal, for example, in an android system, the change information of the application program running on the foreground of the mobile terminal may be detected by judging whether the application program at the top of the currently running application stack changes.
Step 350, judging whether the application program operated by the foreground of the mobile terminal is switched from the first foreground application program to a second foreground application program, if so, skipping to step 310, otherwise, ending.
And when the application program operated by the foreground of the mobile terminal is not switched from the first foreground application program to the second foreground application program, re-acquiring the real-time network speed of the mobile terminal, and re-adjusting the network speed according to the currently operated foreground application program and the background application program.
The network speed adjusting efficiency is further improved by preferentially adjusting the real-time network speed occupied by the background application program occupying the most real-time network speed.
The network speed control is carried out by monitoring the change information of the application program in real time and acquiring the real-time network speed of the mobile terminal and the real-time network speed occupied by at least one application program running in the background again according to the change information of the foreground application program, so that the network speed of the application program can be controlled timely and accurately, and the accuracy of the network speed control is further improved.
The method for controlling the network speed of the application program disclosed by the embodiment of the invention comprises the steps of detecting whether the network connection state of the mobile terminal is changed or not, if so, acquiring the real-time network speed of the mobile terminal, then determining the real-time network speed occupied by a first foreground application program running on a foreground of the mobile terminal, and finally adjusting the real-time network speed occupied by at least one background application program running on a 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 so as to distribute more real-time network speeds to the first foreground application program and ensure the running smoothness of the foreground application program. By presetting the network speed white list, the smooth operation of foreground application programs can be effectively guaranteed, and the smooth operation of important background application programs can also be guaranteed.
Example four:
referring to fig. 4, correspondingly, the embodiment of the present invention further 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 to third embodiments, and achieve the same effects. The mobile terminal 40 includes:
a real-time network speed obtaining module 410, configured to obtain a real-time network speed of the mobile terminal;
a foreground application determining module 420, configured to determine a real-time network speed occupied by a first foreground application running on a foreground of the mobile terminal;
a network speed adjusting module 430, configured to adjust a 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 acquired by the real-time network speed acquiring module 410 and the real-time network speed occupied by the first foreground application determined by the foreground application determining module 420.
The mobile terminal disclosed by the embodiment of the invention obtains the real-time network speed of the mobile terminal, then determines the real-time network speed occupied by a first foreground application program running on a foreground of the mobile terminal, and finally adjusts the real-time network speed occupied by at least one background application program running on a 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 so as to distribute more real-time network speeds to the first foreground application program and ensure the smoothness of the running of the first foreground application program.
Optionally, as shown in fig. 5, the network speed adjusting module 430 includes:
a determining 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 smaller than the preset first network speed threshold;
a network speed adjusting unit 4302, configured to adjust a real-time network speed occupied by at least one background application if the real-time network speed occupied by the first foreground application is smaller than the preset first network speed threshold;
the preset first network speed threshold 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 larger than 0 and smaller than 1.
In specific implementation, the mobile terminal further includes a port mapping module (not shown in the figure) configured to record, by establishing a port mapping table, a network port occupied by an application program running on the mobile terminal, a real-time network speed occupied by each network port, and an application network speed of each application program. Optionally, the port mapping module is further configured to record that the application occupying the network port is a foreground application or an application in the network speed white list or a common background application.
Optionally, as shown in fig. 6, the network speed adjusting unit 4302 includes:
the sorting subunit 43021 is configured to sort, according to an order that the occupied real-time network speed is from high to low, at least one background application running in the background of the mobile terminal;
a network speed adjusting subunit 43022, configured to sequentially adjust 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.
Optionally, the network speed adjusting subunit 43022 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.
Optionally, the sequentially reducing the real-time network speed occupied by the sequenced at least one background application includes:
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.
Optionally, as shown in fig. 7, the mobile terminal 40 further includes:
a network connection state detection module 440, configured to detect a network connection state of the mobile terminal;
a first skip module 450, 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. 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.
The real-time network speed obtaining module 410 includes:
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.
Optionally, as shown in fig. 7, the mobile terminal 40 further includes:
a handover detection module 460, configured to detect change information of an application running in a foreground of the mobile terminal;
a second skipping module 470, configured to, if the switching detection module 460 detects that the change information 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.
The network speed adjusting efficiency is further improved by preferentially adjusting the real-time network speed occupied by the background application program occupying the most real-time network speed.
The network speed control is carried out by monitoring the change information of the application program in real time and acquiring the real-time network speed of the mobile terminal and the real-time network speed occupied by at least one application program running in the background again according to the change information of the foreground application program, so that the network speed of the application program can be controlled timely and accurately, and the accuracy of the network speed control is further improved.
The mobile terminal disclosed by the embodiment of the invention detects whether the network connection state of the mobile terminal changes, if so, the real-time network speed of the mobile terminal is acquired, then the real-time network speed occupied by a first foreground application program running on a foreground of the mobile terminal is determined, and finally, the real-time network speed occupied by at least one background application program running on a 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 program, so that more real-time network speeds are distributed to the first foreground application program, and the smoothness of the running of the first foreground application program is ensured. On the other hand, the network speed white list is preset, so that smooth running of foreground application programs can be effectively guaranteed, and important background application programs can be guaranteed to run smoothly.
Example five:
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 a user interface 803. The various components in the mobile terminal 800 are coupled together by a bus system 805. It is understood that the bus system 805 is used to enable communications among the components connected. The bus system 805 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 805 in fig. 8.
The user interface 803 may include a display, a keyboard, or a pointing device (e.g., a mouse, a trackball, a touch pad, a touch screen, a touch pad, etc., in this embodiment, a user's trigger operation on the desktop folder, such as clicking, pressing, etc., is detected through the touch screen.
It is to be understood that the memory 802 in embodiments of the present invention may be either volatile memory or non-volatile memory, or may include both volatile and non-volatile memory, wherein non-volatile memory may be Read-only memory (ROM), programmable Read-only memory (programmable ROM), erasable programmable Read-only memory (EPROM ), electrically erasable programmable Read-only memory (EEPROM), or flash memory volatile memory may be Random Access Memory (RAM), which serves as external cache memory, by way of example and not limitation, many forms of RAM are available, such as static random access memory (staticiram, SRAM), dynamic random access memory (dynamicdram, DRAM), synchronous dynamic random access memory (syncronous, SDRAM), double data rate synchronous dynamic random access memory (doubtatatare SDRAM, ddrsrssram), Enhanced dynamic random access memory (Enhanced, synchronous, SDRAM, synchronous DRAM, or drtrk DRAM, synchronous DRAM, or any other type of RAM suitable for accessing RAM systems including but not limited to the teachings herein.
In some embodiments, memory 802 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof: an operating system 8021 and application programs 8022. The memory 802 is also used to buffer upstream and downstream signals.
The operating system 8021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application 8022 includes various applications, such as a media player (MediaPlayer), a Browser (Browser), and the like, for implementing various application services. A program implementing a method according to an embodiment of the present invention may be included in application program 8022. In the embodiment of the present invention, the program or the instruction stored in the memory 802 is called, and specifically, may be a program or an instruction stored in the application program 8022. The operation of the user using the application program is detected through the touch screen in the user interface 803, and the triggering operation of the user clicking the desktop folder or opening the desktop folder is detected, as well as the triggering operation of starting the application program. The processor 801 is configured to obtain a real-time network speed 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; and 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.
Portions of the methods disclosed in the embodiments of the present invention described above may be implemented in the processor 801 or implemented by the processor 801. The processor 801 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 801. The Processor 801 may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable Gate Array (FPGA) or other programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. 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 connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 802, and the processor 801 reads the number of times of using the application program by the user in the memory 802, and completes the steps of the method in combination with the hardware thereof.
For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable logic devices (P L D), Field-Programmable Gate arrays (FPGAs), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Optionally, the processor 801 is further configured to: 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 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 larger than 0 and smaller than 1.
Optionally, the processor 801 is further configured to: 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.
Optionally, the processor 801 is further 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.
Optionally, the processor 801 is further configured to: 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.
Optionally, the processor 801 is further configured to: detecting a network connection state of the mobile terminal; and 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.
Optionally, the processor 801 is further configured to: 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.
Optionally, the processor 801 is further configured to: 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.
The mobile terminal 800 can implement each process implemented by the mobile terminal in the foregoing embodiments, and details are not repeated here to avoid repetition.
Through the embodiment of the invention, the real-time network speed occupied by the background application program running on the mobile terminal is adjusted to distribute more real-time network speeds to the first foreground application program, so that the running smoothness of the first foreground application program is ensured, and the problem that the foreground application program cannot run smoothly in the prior art is solved. The network speed adjusting efficiency is further improved by preferentially adjusting the real-time network speed occupied by the background application program occupying the most real-time network speed. By presetting the network speed white list, the smooth operation of foreground application programs can be effectively guaranteed, and the smooth operation of important background application programs can also be guaranteed.
Example six:
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 (PDA), or a vehicle-mounted computer.
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.
The input unit 930 may be used, among other things, to receive a trigger operation input by a user and to generate signal inputs related to user settings and function control of the mobile terminal. Specifically, in the embodiment of the present invention, the input unit 930 may include a touch panel 931. The touch panel 931, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 931 (for example, a user may operate the touch panel 931 by using a finger, a stylus pen, or any other suitable object or accessory), and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 931 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 960, where the touch controller can receive and execute commands sent by the processor 960. In addition, the touch panel 931 may be implemented by various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. 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, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 940 may include a display panel 941, and optionally, the display panel 941 may be configured in the form of L CD or an Organic light Emitting Diode (O L ED).
It should be noted that the touch panel 931 may overlay the display panel 941 to form a touch display screen, and when the touch display screen detects a touch operation on or near the touch display screen, the touch display screen transmits the touch operation to the processor 960 to determine the type of the touch event, and then the processor 960 provides a corresponding visual output on the touch display screen according to the type of the touch event.
The touch display screen comprises an application program interface display area and a common control display area. The arrangement modes of the application program interface display area and the common control display area are not limited, and can be an arrangement mode which can distinguish two display areas, such as vertical arrangement, left-right arrangement and the like. The application interface display area may be used to display an interface of an application. Each interface may contain at least one interface element such as an icon and/or widget desktop control for an application. The application interface display area may also be an empty interface that does not contain any content. The common control display area is used for displaying controls with high utilization rate, such as application icons like setting buttons, interface numbers, scroll bars, phone book icons and the like.
The processor 960 is a control center of the mobile terminal 900, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the mobile terminal 900 and processes data by operating or executing software programs and/or modules stored in the first memory 921 and calling data stored in the second memory 922, thereby integrally monitoring the mobile terminal 900. Optionally, processor 960 may include one or more processing units.
In the embodiment of the present invention, the processor 960 is configured to obtain the real-time network speed of the mobile terminal by calling the software program and/or module stored in the first memory 921 and/or the data stored in the second memory 922; determining the real-time network speed occupied by a first foreground application program running on a foreground of the mobile terminal; and 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.
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 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 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 larger than 0 and smaller than 1.
Optionally, the processor 960 is further configured to: 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.
Optionally, the processor 960 is further 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.
Optionally, the processor 960 is further configured to: 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.
Optionally, the processor 960 is further configured to: detecting a network connection state of the mobile terminal; and 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.
Optionally, the processor 960 is further configured to: 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.
Optionally, the processor 960 is further configured to: 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.
Therefore, by the mobile terminal of the embodiment, more real-time network speeds are allocated to the first foreground application program by adjusting the real-time network speed occupied by the background application program running on the mobile terminal, so that the running smoothness of the first foreground application program is ensured, and the problem that the foreground application program cannot run smoothly in the prior art is solved. The network speed adjusting efficiency is further improved by preferentially adjusting the real-time network speed occupied by the background application program occupying the most real-time network speed. By presetting the network speed white list, the smooth operation of foreground application programs can be effectively guaranteed, and the smooth operation of important background application programs can also be guaranteed.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the mobile terminal described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the embodiment of the mobile terminal, since it is basically similar to the embodiment of the method, the description is relatively simple, and for relevant points, reference may be made to part of the description of the embodiment of the method.

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 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 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 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 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 北京小米移动软件有限公司 Network speed processing method and device of application program 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 珠海格力电器股份有限公司 Document transmission method, device and electronic equipment
CN107786738B (en) * 2017-10-18 2019-10-25 Oppo广东移动通信有限公司 Network control method and equipment
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 program processing method and device, electronic equipment 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
CN110032439A (en) * 2018-01-10 2019-07-19 广东欧珀移动通信有限公司 Method for managing resource, device, mobile terminal and computer readable storage medium
CN110035169A (en) * 2018-01-12 2019-07-19 广东欧珀移动通信有限公司 Process handling method and device, electronic equipment, 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 维沃移动通信有限公司 Network rate adjusting 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 北京小米移动软件有限公司 Method and device for determining download network speed, 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 and apparatus for adjusting network speed of application of intelligent terminal and 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 주식회사 케이티 Apparatus and method for real-time management of Internet accessing speed for subscribers in high-speed Internet
KR101326983B1 (en) * 2009-12-21 2014-01-15 한국전자통신연구원 Apparatus and method for controlling traffic
US9253015B2 (en) * 2010-07-09 2016-02-02 Attila Technologies, Llc Transparent proxy architecture for multi-path data connections
CN105389193B (en) * 2015-12-25 2019-04-26 北京奇虎科技有限公司 Accelerated processing method, device and system, the server of application
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 and apparatus for adjusting network speed of application of intelligent terminal and intelligent terminal

Also Published As

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

Similar Documents

Publication Publication Date Title
CN106533988B (en) Application program network speed control method and mobile terminal
US10917515B2 (en) Method for switching applications in split screen mode, computer device and computer-readable storage medium
US20150153943A1 (en) Method and device for managing progress indicator display
CN105786878B (en) Display method and device of browsing object
US20170199662A1 (en) Touch operation method and apparatus for terminal
CN108076117B (en) Data downloading method and user terminal
CN108984064B (en) Split screen display method and device, storage medium and electronic equipment
US20180348980A1 (en) Method and apparatus for switching screen interface and terminal
WO2020007147A1 (en) Application switching method and apparatus for split screen, storage medium, and electronic device
CN107066268B (en) Display position switching method and device for widget application
WO2020007114A1 (en) Method and apparatus for switching split-screen application, storage medium, and electronic device
WO2020007116A1 (en) Split-screen window adjustment method and apparatus, storage medium and electronic device
WO2014036817A1 (en) Terminal and method for dynamically loading application program interface
WO2020007144A1 (en) Switching method and device for split screen application, storage medium and electronic device
CN108563416B (en) Application display method and device, storage medium and electronic equipment
CN110221765B (en) Video file playing method and device, storage medium and terminal
CN111338745B (en) Deployment method and device of virtual machine and intelligent device
CN111651030A (en) Sensor detection method and device, storage medium and mobile terminal
US20140282058A1 (en) Electronic device with a funiction of applying applications of different operating systems, system and method thereof
CN111078108A (en) Screen display method and device, storage medium and mobile terminal
CN108564539B (en) Method and device for displaying image
CN107463395B (en) Component calling method and device
CN105426242B (en) Data transmission method and device
CN111538706A (en) Data compression method and device, storage medium and mobile terminal
CN109902484B (en) Processing method of associated application and 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