CN112035249B - Application program network duty ratio adjusting method, device and storage medium - Google Patents

Application program network duty ratio adjusting method, device and storage medium Download PDF

Info

Publication number
CN112035249B
CN112035249B CN202010861426.1A CN202010861426A CN112035249B CN 112035249 B CN112035249 B CN 112035249B CN 202010861426 A CN202010861426 A CN 202010861426A CN 112035249 B CN112035249 B CN 112035249B
Authority
CN
China
Prior art keywords
application program
network
target application
preset
adjusting
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
CN202010861426.1A
Other languages
Chinese (zh)
Other versions
CN112035249A (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.)
Maojia Technology Guangdong Co ltd
Original Assignee
Maojia Technology Guangdong 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 Maojia Technology Guangdong Co ltd filed Critical Maojia Technology Guangdong Co ltd
Priority to CN202010861426.1A priority Critical patent/CN112035249B/en
Publication of CN112035249A publication Critical patent/CN112035249A/en
Application granted granted Critical
Publication of CN112035249B publication Critical patent/CN112035249B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses an application program network duty ratio adjusting method, which detects the currently running application program; acquiring the activity state of each running application program, and determining a corresponding target application program according to the activity state; and adjusting the network duty ratio of the target application program according to a preset strategy. The invention also discloses an application program network duty ratio adjusting device and a storage medium. The invention aims to improve the running smoothness of an application running in the foreground by adjusting the network duty ratio of a target application.

Description

Application program network duty ratio adjusting method, device and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and apparatus for adjusting an application network duty ratio, and a storage medium.
Background
With the rapid development of communication technology, users develop various application programs when pursuing the requirement of convenience service, so that multiple application programs can be installed in common televisions and mobile phones, and as multiple applications can be operated in the background in the mobile phones or television sets, the operation of the application programs operated at the front end is blocked as the network resources occupied by the operation of the background application programs are continuously increased.
Disclosure of Invention
The invention mainly aims to provide a method and a device for adjusting the duty ratio of an application program network and a storage medium, and aims to solve the problem of the operation blocking of a front-end application program.
To achieve the above object, the present invention provides a method for adjusting an application network duty ratio, the method comprising:
detecting a currently running application program;
acquiring the activity state of each running application program, and determining a corresponding target application program according to the activity state;
and adjusting the network duty ratio of the target application program according to a preset strategy.
Optionally, the preset policy includes a first adjustment policy, and the step of adjusting the network duty ratio of the target application program according to the preset policy includes:
and when the active state of the target application program is the foreground running, adjusting the network duty ratio of the target application program according to the first adjusting strategy.
Optionally, the preset policy further includes a second adjustment policy, and after the step of adjusting the network duty ratio of the target application program according to the first adjustment policy, the method further includes:
acquiring a network traffic occupation value of the target application;
judging whether the fluctuation of the network traffic occupation value of the target application accords with a preset fluctuation rule according to the fluctuation condition of the obtained network traffic occupation value of the target application;
and if the fluctuation of the network traffic occupation value of the target application does not accord with a preset fluctuation rule, adjusting the network occupation ratio of the target application according to the second adjustment strategy.
Optionally, after the step of determining whether the fluctuation of the network traffic occupancy value of the target application program meets a preset fluctuation rule, the method further includes:
if the fluctuation of the network traffic occupation value of the target application accords with a preset fluctuation rule, returning to the step: and adjusting the network duty ratio of the target application program according to the first adjustment strategy.
Optionally, the step of adjusting the network duty ratio of the target application program according to the first adjustment policy includes:
and reducing the network ratio of the application programs running in the background to a preset percentage, wherein the application programs running in the background are application programs except for the target application program running in the foreground.
Optionally, the step of adjusting the network duty cycle of the target application according to the second adjustment policy includes:
setting the network duty ratio of other application programs to 0 or closing other application programs, wherein the other application programs are the application programs which are currently running except the target application program.
Optionally, before the step of detecting the currently running application program, the method includes:
after the application program is started, the application program is allocated to use a temporary port number according to a network communication protocol TCP/IP so as to enable the target application program to perform network access according to the temporary port number.
Optionally, after the step of adjusting the network duty ratio of the target application program according to a preset policy, the method further includes:
and when the exit of the target application program is detected, clearing the temporary port number allocated to the target application program according to the TCP/IP network communication protocol, and storing and recording information of a preset strategy executed by the target application program.
Optionally, after the step of adjusting the network duty ratio of the target application program according to a preset policy, the method further includes:
and when the target application program is operated in the foreground again, extracting the stored record information of the target application program, acquiring a stored preset strategy for executing the application program, and adjusting the network duty ratio of the target application program according to the stored preset strategy.
In addition, to achieve the above object, the present invention further provides an application network duty ratio adjustment device, which includes: the system comprises a memory, a processor and an application network duty ratio adjustment program stored on the memory and capable of running on the processor, wherein the application network duty ratio adjustment program realizes the steps of the application network duty ratio adjustment program method when being executed by the processor.
In addition, in order to achieve the above object, the present invention further provides a storage medium, wherein an application network duty ratio adjustment program is stored on the storage medium, and the application network duty ratio adjustment program when executed by a processor implements the steps of the application network duty ratio adjustment method described above.
The embodiment of the invention provides an application program network duty ratio adjusting method, which is used for detecting a currently running application program, further obtaining the active state of the running application program, determining a corresponding target application program according to the active state, and further realizing corresponding preset strategy adjustment of the network duty ratio of the target application program according to the active state of the target application program; the method and the device have the advantages that the network duty ratio of the target application program is adjusted, the network duty ratio of the application program operated by the foreground is improved, the operation smoothness of the application program of the foreground is improved, and the situation that the user experience is poor due to the fact that the application program of the foreground is blocked during operation is avoided.
Drawings
FIG. 1 is a schematic diagram of a device architecture of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a method for adjusting network duty cycle of an application program according to the present invention;
FIG. 3 is a detailed flowchart illustrating the step of adjusting the network duty ratio of the target application according to a preset policy in FIG. 2;
FIG. 4 is a flowchart illustrating the network duty ratio adjustment of the target application program according to the first adjustment policy/the second adjustment policy in FIG. 3.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The main solutions of the embodiments of the present invention are:
in the prior art, under the condition that the network speed received by the mobile terminal is fixed, as the network resources occupied by the running of the application program in the background are continuously increased, the situation of operation blocking of the application program running at the front end is caused.
The invention provides a solution, which is to detect the current running application program, further obtain the active state of the running application program, determine the corresponding target application program according to the active state, and further realize the corresponding adjustment of the network duty ratio of the target application program according to the preset strategy according to the active state of the target application program; the method and the device have the advantages that the network duty ratio of the target application program is adjusted, the network duty ratio of the application program operated by the foreground is improved, the operation smoothness of the application program of the foreground is improved, and the situation that the user experience is poor due to the fact that the application program of the foreground is blocked during operation is avoided.
Referring to fig. 1, fig. 1 is a schematic diagram of an apparatus structure of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the application network duty ratio adjustment device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may be an infrared receiving module for receiving control commands triggered by a user via a remote control, and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the configuration of the application network duty cycle adjustment device shown in fig. 1 does not constitute a limitation of the application network duty cycle adjustment device, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and an application network duty cycle adjustment program may be included in the memory 1005 as one type of storage medium.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to invoke the application network duty cycle adjustment program stored in the memory 1005 and perform the following operations:
detecting a currently running application program;
acquiring the activity state of each running application program, and determining a corresponding target application program according to the activity state;
and adjusting the network duty ratio of the target application program according to a preset strategy.
Further, the processor 1001 may call the application network duty cycle adjustment program stored in the memory 1005, and further perform the following operations:
and when the active state of the target application program is the foreground running, adjusting the network duty ratio of the target application program according to the first adjusting strategy.
Further, the processor 1001 may call the application network duty cycle adjustment program stored in the memory 1005, and further perform the following operations:
acquiring a network traffic occupation value of the target application;
judging whether the change value of the network traffic occupation value of the target application is larger than a preset value according to the fluctuation condition of the obtained network traffic occupation value of the target application;
and if the change value of the network traffic occupation value of the target application is larger than a preset value, adjusting the network occupation ratio of the target application according to the second adjustment strategy.
Further, the processor 1001 may call the application network duty cycle adjustment program stored in the memory 1005, and further perform the following operations:
if the change value of the network traffic occupation value of the target application is smaller than or equal to the preset value, returning to the step: and adjusting the network duty ratio of the target application program according to the first adjustment strategy.
Further, the processor 1001 may call the application network duty cycle adjustment program stored in the memory 1005, and further perform the following operations:
and reducing the network ratio of the application programs running in the background to a preset percentage, wherein the application programs running in the background are application programs except for the target application program running in the foreground.
Further, the processor 1001 may call the application network duty cycle adjustment program stored in the memory 1005, and further perform the following operations:
setting the network duty ratio of other application programs to 0 or closing other application programs, wherein the other application programs are the application programs which are currently running except the target application program.
Further, the processor 1001 may call the application network duty cycle adjustment program stored in the memory 1005, and further perform the following operations:
after the application program is started, the application program is allocated to use a temporary port number according to a network communication protocol TCP/IP so as to enable the target application program to perform network access according to the temporary port number.
Further, the processor 1001 may call the application network duty cycle adjustment program stored in the memory 1005, and further perform the following operations:
and when the exit of the target application program is detected, clearing the temporary port number allocated to the target application program according to the TCP/IP network communication protocol, and storing and recording information of a preset strategy executed by the target application program.
Further, the processor 1001 may call the application network duty cycle adjustment program stored in the memory 1005, and further perform the following operations:
and when the target application program is operated in the foreground again, extracting the recorded information stored by the target application program, acquiring a stored preset strategy for executing the application program, and adjusting the network duty ratio of the target application program according to the stored preset strategy.
The specific embodiments of the application network duty ratio adjustment device of the present invention are substantially the same as the embodiments of the application network duty ratio adjustment method described below, and are not described herein.
Referring to fig. 2, a first embodiment of an application network duty cycle adjustment method of the present invention provides a schematic diagram of an application network duty cycle adjustment method, the method comprising:
step S100, detecting the currently running application program;
in this embodiment, after the device for adjusting the network duty ratio of the application program is started, the device establishes an effective network connection, and when an operating system in the device receives a network resource application request sent by the application program, the application program is allocated to use a temporary port number according to a network communication protocol TCP/IP, and the application program realizes connection with a server through the allocated temporary port number, so that the application program performs network access according to the temporary port number. The same application program can have more than two temporary port numbers which are not repeated, so that one application program is connected with a plurality of temporary port numbers, and the network access rate of the application program is enhanced.
Step S200, the activity state of each running application program is obtained, and the corresponding target application program is determined according to the activity state.
In this embodiment, the active state of the application program is obtained by obtaining the active state of the application program, that is, by monitoring the active state where the application program is located, where the active state includes a foreground operation and a background operation, and the corresponding target application program is determined according to the active state.
And step S300, adjusting the network duty ratio of the target application program according to a preset strategy.
In this embodiment, according to the active state of the running target application program acquired in step S200, the network duty ratio of the target application program is adjusted by adopting the corresponding preset policy according to the active state to which the target application program belongs.
The embodiment provides an application program network duty ratio adjusting method, which is used for acquiring the active state of a currently running application program by monitoring the currently running application program, determining a corresponding target application program according to the active state, and adjusting the network duty ratio of the target application program according to a preset strategy corresponding to the active state of the target application program; the method and the device have the advantages that the network duty ratio of the target application program is adjusted, the network duty ratio of the application program operated by the foreground is improved, the operation smoothness of the application program of the foreground is improved, and the situation that the user experience is poor due to the fact that the application program of the foreground is blocked during operation is avoided.
Further, referring to fig. 3, the present invention provides a schematic diagram of a step refinement flow of adjusting the network duty ratio of the target application program according to a preset policy, based on the embodiment shown in fig. 2, the step of adjusting the network duty ratio of the target application program according to the preset policy includes:
step S310, when the active state of the target application program is the foreground running, adjusting the network duty ratio of the target application program according to the first adjustment policy.
In this embodiment, if the activity state of the target application program obtained in step S200 is foreground running, the network duty ratio of the target application program is adjusted according to the first adjustment policy at this time, specifically, the network duty ratio of the target application program is increased according to the first adjustment policy, in other words, the network duty ratio of the application program running in the background is reduced according to the preset first adjustment policy, so that the network duty ratio required for reserving enough network access for the application program running in the foreground is timely reserved, and the running efficiency of the foreground application is further enhanced.
The embodiment provides a method for adjusting the network duty ratio of an application program, when the active state of the target application program is foreground operation, that is, the application program is foreground application, the network duty ratio of the target application program can be adjusted according to a first adjustment strategy; the method and the device have the advantages that the network duty ratio of the target application program operated by the foreground is adjusted, the network duty ratio of the application program operated by the foreground is improved, the operation smoothness of the application program of the foreground is improved, and the situation that the user experience is poor due to the fact that the application program of the foreground is blocked during operation is avoided.
Further, referring to fig. 4, there is provided a schematic diagram of a step refinement flow of adjusting the network duty ratio of the target application program according to a first adjustment policy, based on the embodiment shown in fig. 3, the step of adjusting the network duty ratio of the target application program according to the first adjustment policy includes:
step S311, the network ratio of the application program running in the background is reduced to a preset percentage, wherein the application program running in the background is an application program except for the target application program running in the foreground.
In this embodiment, when the target application is a foreground application, in order to ensure smooth running of the foreground application, specifically, by reducing the network duty ratio of the application running in the background to a preset percentage, where the application running in the background is an application other than the target application running in the foreground, and further, the network duty ratio of the target application running in the foreground is improved. The specific adjustment of the reduced application network occupancy value satisfies the following calculation formula:
BW lowering =(BW1+BW2+BW3+...BWm)/(n Total (S) -n Target object )*(1-P1);
Wherein BW1, BW2, BW3, BWm, network occupancy values representing m background running applications running in the system;
BW lowering The network occupation value is reduced after the background application program performs preset adjustment;
n total (S) Is the sum of the number of port numbers occupied by the currently running application in the system;
n target object The number (n is equal to or greater than 2) of temporary port numbers allocated to a target application program running in the foreground by the system according to TCP/IP;
the P1 preset percentage refers to a percentage (0 < P1< 1) preset to perform the first regulation strategy.
According to the embodiment, a refinement scheme of adjusting the network occupation ratio of the target application according to the first adjustment strategy is provided, and a specific reduced network occupation value is calculated by combining the occupied temporary port number of the application running in the foreground and the total port number of the application running currently in the system with a preset percentage, so that the network traffic occupation values of other applications except the application running in the foreground are reduced, the network occupation ratio of the application running in the foreground is improved, the running smoothness of the application running in the foreground is improved, and the situation of poor user experience caused by the fact that the application running in the foreground is blocked is avoided.
Further, referring to fig. 3, after the step of adjusting the network duty cycle of the target application according to the first adjustment policy, the method includes:
step S320, obtaining the network traffic occupation value of the target application;
step S330, determining that the change value of the network traffic occupancy value of the target application program is greater than a preset value according to the obtained fluctuation condition of the network traffic occupancy value of the target application program.
In this embodiment, after the target application program is adjusted by the first adjustment policy, a situation that the target application program has fluctuation of network traffic in the running process often occurs, so in order to achieve the purpose of adjusting smooth running of the target application program, further needs to acquire the fluctuation situation of the network traffic of the target application program, the fluctuation comparison can be performed on the average value of the network traffic of the target application program within a set threshold time, and then the fluctuation comparison can be performed on the average value of the traffic between two adjacent threshold times, and further, by judging the change comparison between the average value of the network traffic acquired within a later threshold time and the average value of the network traffic acquired within the later threshold time, and further, by setting a preset value as the judgment for performing subsequent operations, for example, the average value of the traffic acquired within the later threshold time is greater than the average value of the traffic acquired within the earlier threshold time and exceeds 50%, if the preset value is set to exceed 50%, the change value of the target application program in this case will be greater than the preset value, and then the network fluctuation ratio in the running other than the target application program is considered to be reduced according to the second adjustment policy; otherwise, if the flow average value acquired at the later threshold time is greater than the flow average value acquired at the previous threshold time and does not exceed 50% upwards, the network duty ratio fluctuation of the application program is regarded as not great, namely the network access of the target application program is not affected; or the average value of the flow obtained in the later threshold time is smaller than or equal to the average value of the flow obtained in the previous threshold time, so that the network flow of the target application program does not need too much network duty ratio, and the preset strategy is not changed at the moment. In addition, the comparison of the average value of the network traffic of the target application program within the threshold time is to exclude the situation that the initial connection of the target application program is unstable, for example, the fluctuation consideration is not considered in a certain time for the application program to apply for resources and acquire the temporary port number, and the fluctuation consideration is not considered in a 3-second time for the port application is generally set.
And step S340, adjusting the network duty ratio of the target application program according to the second adjustment strategy.
In this embodiment, according to the comparison result obtained in step S330, if the change value of the network traffic occupancy value of the target application program is greater than a preset value, that is, the network traffic average value obtained at the later threshold time is greater than the network traffic average value obtained at the previous threshold time, and exceeds a certain preset value, the network occupancy ratio of the running application program other than the target application program is reduced according to the second adjustment policy. For example, the network traffic average detection period of the target application is set to 3 seconds, that is, the average value of the network traffic required by the running application is detected within 3 seconds, and the average value of the network traffic in the last 3 seconds is further calculated and compared with the previous network traffic average value, wherein the traffic average value acquired at the later threshold time is greater than the traffic average value acquired at the previous threshold time and exceeds 50% upwards, at which time the network duty ratio of the running application other than the target application is reduced according to the second adjustment strategy.
The embodiment provides an application program network duty ratio adjusting method, after the target application program is adjusted through a first adjusting strategy, aiming at the situation that the network traffic of the target application program occupies relatively large fluctuation, the network traffic of the target application program occupies relatively large trend of gradually increasing in total, the change value of the network traffic occupied value of the target application program is larger than a preset value, the network duty ratio of the target application program is adjusted according to a second adjusting strategy, the network duty ratio of the application program operated in the foreground is improved, the operation smoothness of the application program in the foreground is improved, and the situation that user experience is poor due to the fact that the application program in the foreground is blocked in operation is avoided.
Further, according to the ratio result obtained in step S330, if the network fluctuation condition of the target application program is smaller than or equal to the preset value, that is, the network flow average value obtained at the later threshold time is smaller than or equal to the network flow average value obtained at the previous threshold time or the network flow average value obtained at the later threshold time is larger than the network flow average value obtained at the previous threshold time, but does not exceed the preset value, it is indicated that the network duty ratio fluctuation of the target application program is not very large, and at this time, the network duty ratio of the target application program can be continuously adjusted according to the first adjustment policy without changing the adjustment policy adopted by the target application program.
Further, referring to fig. 4, there is provided a schematic diagram of a step refinement flow of adjusting the network duty ratio of the target application program according to a second adjustment policy, where the step of adjusting the network duty ratio of the target application program according to the second adjustment policy includes:
in step S341, the network duty ratio of the other application program is set to 0 or the other application program is closed, where the other application program is a currently running application program other than the target application program.
In this embodiment, the network duty ratio of other application programs is set to 0, that is, the currently running application programs except the target application program all stop using the network, that is, no network resource is allocated to the application programs; and closing other application programs, namely directly performing exit processing on the other application programs, wherein the other application programs are the application programs which are operated at present except the target application program, and further realizing the network resources which are connected exclusively by the target application program.
According to the embodiment, a refinement scheme of adjusting the network duty ratio of the target application program according to the second adjustment strategy is provided, when the network traffic duty ratio fluctuation of the target application program is relatively large after the target application program is adjusted by the first adjustment strategy, the network duty ratio of the currently operated application program except the target application program can be set to 0 or other application programs are closed, so that the target application program monopolizes network resources, the operation smoothness of the target application program is improved, and the situation that user experience is poor due to the fact that a foreground application program is blocked in operation is avoided.
Further, for the target application program running in the foreground, if the situation that the network duty ratio fluctuation of the application program is relatively large occurs, that is, the network flow average value acquired in the later threshold time is greater than the network flow average value acquired in the earlier threshold time and exceeds a certain preset value, at this time, the network duty ratio of the application program running in the background may be set to 0 or the application program running in the background may be closed preferentially according to the second adjustment policy.
Further, when the exit of the target application program is monitored, the system timely clears the temporary port number allocated to the target application program according to the TCP/IP network communication protocol, and records and stores the target application program.
Further, when the target application program is operated in the foreground again, the record information stored in the target application program is extracted, the stored preset strategy of execution of the application program is obtained, and the network duty ratio of the target application program is adjusted according to the stored preset strategy.
The specific embodiments of the storage medium of the present invention are substantially the same as the embodiments of the above-mentioned application network duty ratio adjustment method, and are not described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a tablet, a television, or an application network duty cycle adjustment device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (8)

1. A method for adjusting the duty cycle of an application network, the method comprising:
detecting the currently running application program, wherein before the step of detecting the currently running application program, the method comprises the following steps: after an application program is started, allocating the application program to use a temporary port number according to a network communication protocol TCP/IP so as to enable the application program to perform network access according to the temporary port number;
acquiring the activity state of each running application program, and determining a corresponding target application program according to the activity state;
adjusting the network occupancy rate of the target application program according to a preset strategy, wherein the preset strategy comprises a step of calculating a reduced network occupancy value according to the temporary port number occupied by the application program, the total port occupied by the application program, the network occupancy value occupied by the application program and a preset percentage, the preset strategy comprises a first adjustment strategy, and the step of adjusting the network occupancy rate of the target application program according to the preset strategy comprises the following steps: when the active state of the target application program is the foreground operation, reducing the network occupation ratio of the application program operated in the background to a preset percentage, wherein the application program operated in the background is an application program except the target application program operated in the foreground, and the calculation formula for reducing the network occupation ratio of the application program operated in the background is as follows: BW (BW) Lowering =(BW1+BW2+BW3+...BWm)/(n Total (S) -n Target object ) (1-P1), wherein BW1, BW2, BW3, BWm represents network occupancy values of m background running applications running in the system, BW Lowering The network occupation value is reduced after the background application program performs preset adjustment; n is n Total (S) Is the sum of the number of port numbers occupied by the currently running application in the system; n is n Target object The system allocates the number of temporary port numbers of the target application program running in the foreground according to TCP/IP, wherein n is more than or equal to 2, and the preset percentage of P1 refers to the preset percentage for executing the first regulation strategy, wherein P1 is more than 0 and less than 1.
2. The application network duty cycle adjustment method of claim 1, wherein the preset strategy further comprises a second adjustment strategy, and after the step of adjusting the network duty cycle of the target application according to the first adjustment strategy, further comprising:
acquiring a network traffic occupation value of the target application;
judging whether the change value of the network traffic occupation value of the target application is larger than a preset value according to the fluctuation condition of the obtained network traffic occupation value of the target application;
and if the change value of the network traffic occupation value of the target application is larger than a preset value, adjusting the network occupation ratio of the target application according to the second adjustment strategy.
3. The application network duty cycle adjustment method according to claim 2, wherein after the step of determining whether the change value of the network traffic occupancy value of the target application is greater than a preset value, the method further comprises:
if the change value of the network traffic occupation value of the target application is smaller than or equal to the preset value, returning to the step: and adjusting the network duty ratio of the target application program according to the first adjustment strategy.
4. The application network duty cycle adjustment method as recited in claim 2, said step of adjusting the network duty cycle of said target application according to said second adjustment policy comprising:
setting the network duty ratio of other application programs to 0 or closing other application programs, wherein the other application programs are the application programs which are currently running except the target application program.
5. The application network duty cycle adjustment method according to any one of claims 1 to 4, further comprising, after the step of adjusting the network duty cycle of the target application according to a preset policy:
and when the exit of the target application program is detected, clearing the temporary port number allocated to the target application program according to the TCP/IP network communication protocol, and storing and recording information of a preset strategy executed by the target application program.
6. The application network duty cycle adjustment method as set forth in claim 5, wherein after said step of adjusting the network duty cycle of said target application according to a preset policy, further comprising:
and when the target application program is operated in the foreground again, extracting the recorded information stored by the target application program, acquiring a stored preset strategy for executing the application program, and adjusting the network duty ratio of the target application program according to the stored preset strategy.
7. An application network duty cycle adjustment device, the device comprising:
memory, a processor and an application network duty cycle adjustment program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the application network duty cycle adjustment program method according to any one of claims 1 to 6.
8. A storage medium having stored thereon an application network duty cycle adjustment program which when executed by a processor performs the steps of the application network duty cycle adjustment method according to any one of claims 1 to 6.
CN202010861426.1A 2020-08-24 2020-08-24 Application program network duty ratio adjusting method, device and storage medium Active CN112035249B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010861426.1A CN112035249B (en) 2020-08-24 2020-08-24 Application program network duty ratio adjusting method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010861426.1A CN112035249B (en) 2020-08-24 2020-08-24 Application program network duty ratio adjusting method, device and storage medium

Publications (2)

Publication Number Publication Date
CN112035249A CN112035249A (en) 2020-12-04
CN112035249B true CN112035249B (en) 2023-06-13

Family

ID=73580823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010861426.1A Active CN112035249B (en) 2020-08-24 2020-08-24 Application program network duty ratio adjusting method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112035249B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112671672B (en) * 2020-12-16 2023-12-08 深圳Tcl新技术有限公司 Application flow control method, device, equipment and readable storage medium
CN112905269A (en) * 2021-02-09 2021-06-04 Oppo广东移动通信有限公司 Network access method, device, terminal and storage medium of application program

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108270696A (en) * 2018-03-23 2018-07-10 努比亚技术有限公司 Internet wide band distribution, mobile terminal and computer storage media
CN108334345A (en) * 2017-08-14 2018-07-27 广东欧珀移动通信有限公司 Applied program processing method, device, readable storage medium storing program for executing and mobile terminal
CN110187753A (en) * 2019-05-27 2019-08-30 Oppo广东移动通信有限公司 Application control method, device, terminal and computer readable storage medium
CN110493828A (en) * 2019-08-05 2019-11-22 深圳传音控股股份有限公司 A kind of internet wide band distribution, terminal and computer storage medium
CN111400037A (en) * 2020-03-09 2020-07-10 Oppo广东移动通信有限公司 Memory management method and device, computer storage medium and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108334345A (en) * 2017-08-14 2018-07-27 广东欧珀移动通信有限公司 Applied program processing method, device, readable storage medium storing program for executing and mobile terminal
CN108270696A (en) * 2018-03-23 2018-07-10 努比亚技术有限公司 Internet wide band distribution, mobile terminal and computer storage media
CN110187753A (en) * 2019-05-27 2019-08-30 Oppo广东移动通信有限公司 Application control method, device, terminal and computer readable storage medium
CN110493828A (en) * 2019-08-05 2019-11-22 深圳传音控股股份有限公司 A kind of internet wide band distribution, terminal and computer storage medium
CN111400037A (en) * 2020-03-09 2020-07-10 Oppo广东移动通信有限公司 Memory management method and device, computer storage medium and terminal

Also Published As

Publication number Publication date
CN112035249A (en) 2020-12-04

Similar Documents

Publication Publication Date Title
CN112035249B (en) Application program network duty ratio adjusting method, device and storage medium
US20200154265A1 (en) Sim card status determination method and sim card status determination device
US7301905B1 (en) Overload control system and method for a telecommunications system
US8949846B2 (en) Time-value curves to provide dynamic QoS for time sensitive file transfers
JP4174052B2 (en) Flow control in network devices
US8391224B2 (en) Proactive load distribution for 802.111-based wireless LANs
CN104978201A (en) Method and device for controlling automatic pop-up window display
US9237460B2 (en) Traffic control method and device
CN108712350B (en) Flow control method and device capable of automatically regulating and controlling in real time based on custom rule
US20090010155A1 (en) Network communication control methods and systems
CN106713168B (en) Flow control method and system
CN107347039B (en) Management method and device for shared cache space
WO2009079950A1 (en) Method and system for network resource control
CN109699089B (en) Channel access method and device
US20070245008A1 (en) Mobile terminal, method, and computer program for communicating data with servers
CN107402851B (en) Data recovery control method and device
CN115268616A (en) Frequency control method and device for memory, electronic device and storage medium
CN106603215B (en) ZigBee-based non-fair network channel resource sharing method
CN114095444B (en) Current limiting method and device and electronic equipment
EP2385726A1 (en) Apparatus and method for controlling amount of concurrent calls
JP5611171B2 (en) Packet processing method and packet processing apparatus
CN109783337B (en) Model service method, system, apparatus and computer readable storage medium
US20170019806A1 (en) Method and device for adjusting network quality of service strategies
CN111278039B (en) User perception suppression identification method, device, equipment and medium
CN109522113B (en) Memory management method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 516006 Guangdong province Huizhou Zhongkai hi tech Development Zone No. 19 district

Applicant after: Maojia Technology (Guangdong) Co.,Ltd.

Address before: 516006 Guangdong province Huizhou Zhongkai hi tech Development Zone No. 19 district

Applicant before: TCL OVERSEAS ELECTRONICS (HUIZHOU) Co.,Ltd.

GR01 Patent grant
GR01 Patent grant