CN107562539B - Application program processing method and device, computer equipment and storage medium - Google Patents

Application program processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN107562539B
CN107562539B CN201710744127.8A CN201710744127A CN107562539B CN 107562539 B CN107562539 B CN 107562539B CN 201710744127 A CN201710744127 A CN 201710744127A CN 107562539 B CN107562539 B CN 107562539B
Authority
CN
China
Prior art keywords
application program
foreground
application
loss rate
acquiring
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.)
Expired - Fee Related
Application number
CN201710744127.8A
Other languages
Chinese (zh)
Other versions
CN107562539A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710744127.8A priority Critical patent/CN107562539B/en
Publication of CN107562539A publication Critical patent/CN107562539A/en
Application granted granted Critical
Publication of CN107562539B publication Critical patent/CN107562539B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephone Function (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to an application program processing method and device, a computer device and a storage medium. The method comprises the following steps: acquiring the loss rate of signals output by a foreground application program in an output device within preset time; if the loss rate exceeds a loss rate threshold value, acquiring foreground running duration and resource running parameters of the background application program; and calculating the operation weight of the background application program according to the foreground operation duration and the resource operation parameters, and processing the background application program according to the operation weight. The application program processing method and device, the computer equipment and the storage medium can improve the running efficiency of the application program and reduce the running load of resources.

Description

Application program processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an application processing method and apparatus, a computer device, and a storage medium.
Background
Electronic equipment moves from non-intelligent to intelligent, and revolutionary changes are brought to life and work of people. Compared with non-intelligent electronic equipment, the intelligent terminal can better learn and remember the behaviors of people, process application events more quickly and intelligently, and enable people to eat and live more conveniently. When the intelligent terminal processes each application event, a unified Central Processing Unit (CPU) is required to run and manage the application event, so that resources are more effectively utilized.
In the actual operation process, a large amount of resources of the electronic device are often inefficiently occupied due to frequent operations of the user or malicious operations of a malicious program, so that the burden of the resources is increased, and the use of the user is affected. The burden of resources can be reduced to a certain extent by upgrading and improving hardware, but a large amount of cost is consumed, and the improvement effect is not good.
Disclosure of Invention
The embodiment of the application provides an application processing method and device, a computer device and a storage medium, and the running load of resources can be reduced.
An application processing method, the method comprising:
acquiring the loss rate of signals output by a foreground application program in an output device within preset time;
if the loss rate exceeds a loss rate threshold value, acquiring foreground running duration and resource running parameters of the background application program;
and calculating the operation weight of the background application program according to the foreground operation duration and the resource operation parameters, and processing the background application program according to the operation weight.
An application processing apparatus, the apparatus comprising:
the signal acquisition module is used for acquiring the loss rate of the signal output by the foreground application program in the output device within the preset time;
the parameter acquisition module is used for acquiring foreground running duration and resource running parameters of the background application program if the loss rate exceeds a loss rate threshold;
and the application processing module is used for calculating the operation weight of the background application program according to the foreground operation duration and the resource operation parameters and processing the background application program according to the operation weight.
A computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions that, when executed by the processor, cause the processor to perform the steps of:
acquiring the loss rate of signals output by a foreground application program in an output device within preset time;
if the loss rate exceeds a loss rate threshold value, acquiring foreground running duration and resource running parameters of the background application program;
and calculating the operation weight of the background application program according to the foreground operation duration and the resource operation parameters, and processing the background application program according to the operation weight.
One or more non-volatile storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of:
acquiring the loss rate of signals output by a foreground application program in an output device within preset time;
if the loss rate exceeds a loss rate threshold value, acquiring foreground running duration and resource running parameters of the background application program;
and calculating the operation weight of the background application program according to the foreground operation duration and the resource operation parameters, and processing the background application program according to the operation weight.
According to the application processing method and device, the computer device and the storage medium, the loss rate of the signal output by the foreground application is firstly obtained, if the loss rate is larger than the loss rate threshold value, the fact that the foreground application is blocked in operation is indicated, then the foreground operation duration and the resource operation parameters of the background application are obtained, and the application to be processed is obtained according to the foreground operation duration and the resource operation parameters. The application program to be processed is processed, so that the occupation of the background application program on resources is reduced, the foreground application program is ensured to have sufficient resources to run, the running efficiency of the application program is improved, and the running burden of the resources is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of an application environment for a method of processing an application program in one embodiment;
FIG. 2 is a schematic diagram showing an internal configuration of an electronic apparatus according to an embodiment;
FIG. 3 is a flow diagram of a method for application processing in one embodiment;
FIG. 4 is a flowchart of an application processing method in another embodiment;
FIG. 5 is a block diagram of an application processing device in one embodiment;
fig. 6 is a block diagram of a partial structure of a mobile phone related to a computer device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, a first client may be referred to as a second client, and similarly, a second client may be referred to as a first client, without departing from the scope of the present application. Both the first client and the second client are clients, but they are not the same client.
FIG. 1 is a diagram of an application environment for a method of processing an application in one embodiment. As shown in fig. 1, the application environment diagram includes a user terminal 102 and a server 104. The user terminal 102 may be configured to obtain a loss rate of a signal output by a foreground application in an output device within a preset time; if the loss rate exceeds a loss rate threshold value, acquiring foreground running duration and resource running parameters of the background application program; and calculating the operation weight of the background application program according to the foreground operation duration and the resource operation parameters, and processing the background application program according to the operation weight. The server 104 may push the loss rate threshold to the user terminal 102 according to the foreground application. The user terminal 102 is an electronic device located at the outermost periphery of the computer network and mainly used for inputting user information and outputting a processing result, and may be, for example, a personal computer, a mobile terminal, a personal digital assistant, a wearable electronic device, or the like. The server 104 is a device, such as one or more computers, for responding to service requests while providing computing services. It is understood that in other embodiments, the application environment of the application processing method may include only the user terminal 102, i.e., the user terminal 102 may store the loss rate threshold and obtain the loss rate threshold according to the foreground application.
Fig. 2 is a schematic diagram of an internal structure of an electronic device in one embodiment. As shown in fig. 2, the terminal includes a processor, a nonvolatile storage medium, an internal memory, a display screen, and an input device, which are connected through a system bus. Wherein the non-volatile storage medium of the terminal stores an operating system and computer readable instructions. The computer readable instructions, when executed by a processor, implement an application processing method. The processor is used for providing calculation and control capability and supporting the operation of the whole terminal. Internal memory in the electronic device provides an environment for the execution of computer-readable instructions in the non-volatile storage medium. The display screen of the electronic device may be a liquid crystal display screen or an electronic ink display screen, and the input device may be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the terminal housing, or an external keyboard, a touch pad or a mouse. The electronic device may be a computer, a mobile phone, a tablet computer, or a personal digital assistant or a wearable device, etc. Those skilled in the art will appreciate that the configuration shown in fig. 2 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation on the terminal to which the present application is applied, and that a particular terminal may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
FIG. 3 is a flow diagram that illustrates a method for processing an application in one embodiment. As shown in fig. 3, the application processing method includes steps 302 to 306. Wherein:
step 302, obtaining a loss rate of a signal output by a foreground application on an output device within a preset time.
In the embodiments provided in the present application, the application refers to software written for a certain application purpose in the electronic device, and the electronic device implements a service required by a user through the application. The foreground application program refers to an application program running in the foreground of the electronic equipment, and the file of the foreground application program can be displayed in the foreground and is interacted with the user. When running, the foreground application program can output signals on an output device of the electronic equipment, and a user can realize interaction with the electronic equipment through the input device and the output device. For example, the electronic device may display an image in an output device when playing a video or entering a game interface; when the electronic equipment is used for calling, the audio signal can be output by the output device.
In this embodiment, the output signal refers to a signal output by the electronic device and perceivable by a user, for example, the output signal may be an image signal, an audio signal, or the like. The output device refers to a device in the electronic equipment for outputting a signal that can be sensed by a user, such as a display screen for displaying images, a speaker and a receiver for playing music, and the like. Generally, either foreground or background applications may output signals through an output device. Normally, signals output by the electronic equipment through the output device have a certain number, however, in the process of signal transmission and output, the signals are lost due to problems such as network or resource occupation, and the output signals are incomplete. For example, a pause occurs in playing a game, resulting in a discontinuous loss of image.
The preset time is preset time, and in a normal running state, the foreground application program can output signals of a preset number at the output device within the preset time. Step 302 may specifically include: the total number of signals to be output by the foreground application program in the preset time and the number of the signals of the foreground application program output by the output device in the preset time are obtained, and then the loss rate of the signals can be obtained according to the number and the total number. For example, in the voice call process, the sender may send a data packet, the data packet is transmitted through the network, the receiver may receive a data packet and output the data packet, and then the size of the output data packet is compared with the size of the sent data packet, so as to obtain the data loss rate.
And 304, if the loss rate exceeds the loss rate threshold, acquiring foreground running time and resource running parameters of the background application program.
In one embodiment, the loss rate threshold refers to a preset loss rate value, and is used for judging an operation scene of a foreground application program. If the loss rate exceeds the loss rate threshold value, it indicates that the signal of the foreground application program is lost more in the output process, and the current running scene of the foreground application program is judged to be stuck; and conversely, the signal loss of the foreground application program is less in the output process, and the current running scene of the foreground application program is judged to be smooth.
And when the current operation scene of the foreground application program is Katon, acquiring the foreground operation duration and the resource operation parameters corresponding to the background application program. Background applications refer to applications running in the background of the electronic device, and background applications generally cannot be displayed in the foreground and implement an interactive process with a user. The foreground running duration refers to the duration of the background application running in the foreground from the start. Generally, the longer the foreground running time corresponding to a background application program is, the higher the priority of the background application program is, the higher the possibility that the background application program is started again by a user is; conversely, the lower the priority of the background application is considered, the lower the likelihood of being launched again by the user.
The resource operation parameter refers to a relevant parameter generated by the application program in the process of occupying the resource of the electronic device to operate, for example, the resource operation parameter may refer to parameters such as CPU occupancy, memory occupancy, and number of processes of the application program. It is understood that the CPU occupancy rate refers to a parameter indicating how much CPU resources are occupied, the memory occupancy rate refers to a parameter indicating how much memory is occupied for the electronic device, and the number of processes refers to the number of processes occupied by the application program in operation.
And step 306, calculating the operation weight of the background application program according to the foreground operation duration and the resource operation parameters, and processing the background application program according to the operation weight.
In one embodiment, the foreground running duration may reflect a time length of the background application running in the foreground, the resource running parameter may reflect a quantity of the electronic device resources occupied by the application in the running process, and the running weight of the background application is calculated according to the foreground running duration and the resource running parameter. The running weight may reflect the importance of the background application, and generally, it is considered that the larger the running weight is, the more important the background application is.
The processing of the application program to be processed means that the processing that can reduce resource occupation is performed on the application program to be processed. For example, the application program to be processed is closed or suspended, or a part of the process corresponding to the application program to be processed is closed. In this embodiment, the running weight of the background application is first calculated, and then the background application is processed according to the running weight.
It can be understood that, specifically, processing the background application according to the running weight may include: and processing the application program to be processed according to the processing mode corresponding to the operation weight. And acquiring a corresponding processing mode according to the operation weight, wherein the processing mode can be acquired locally by the electronic equipment or pushed by a server. The process of pushing through the server specifically includes: sending a processing mode acquisition request to a server, and receiving a processing mode returned by the server according to the processing mode acquisition request, wherein the processing mode acquisition request comprises an operation weight, and the server acquires a corresponding processing mode according to the operation weight.
The application processing method comprises the steps of firstly obtaining the loss rate of signals output by a foreground application, indicating that the foreground application is jammed in operation if the loss rate is larger than a loss rate threshold value, then obtaining the foreground operation duration and resource operation parameters of the background application, and obtaining the application to be processed according to the foreground operation duration and the resource operation parameters. The application program to be processed is processed, so that the occupation of the background application program on resources is reduced, the foreground application program is ensured to have sufficient resources to run, the running efficiency of the application program is improved, and the running burden of the resources is reduced.
Fig. 4 is a flowchart of an application processing method in another embodiment. As shown in fig. 4, the application processing method includes steps 402 to 408. Wherein:
step 402, if it is detected that the user terminal inputs a preset operation instruction, acquiring a loss rate of a signal output by the foreground application in the output device within a preset time.
The preset operation instruction refers to a preset instruction input by the user terminal, when the preset operation instruction is detected, the loss rate of the signal output by the foreground application program on the output device within the preset time is obtained, and the operation scene of the foreground application program is judged according to the loss rate. For example, an instruction to start a game is input by the user terminal, or an instruction to start playing a video is input by the user terminal.
In the process of live video, in order to show the continuity of playing, an image sequence is often played in an output device, and images in the image sequence form a continuous animation. Playing the image sequence at certain time intervals forms a continuous animation interface, wherein each image in the image sequence can be called a frame image. The foreground application plays each frame of image in the sequence of images at a timed time while displaying the sequence of successive images on the output device. Therefore, under normal conditions, a fixed number of images are played within a certain time, and if the number of played images within a certain time is less than a predetermined number, the playback is abnormal.
In the embodiment provided by the present application, step 402 may specifically include: and acquiring the number of lost frames of the image when the foreground application program outputs and displays the image in the preset time. Generally, for an application program with a high requirement on real-time performance, the image displayed on an output device has a requirement on real-time performance, and if the image cannot be loaded due to a system, a network or the like, the image which cannot be loaded is discarded so as to play a subsequent image in real time, thereby maintaining the real-time performance of a playing picture and preventing the delay of animation. The number of lost frames refers to the number of frames of the discarded images when the foreground application outputs and displays in the actual operation process.
In step 404, if the loss rate exceeds the loss rate threshold corresponding to the foreground application, the foreground running duration and the resource running parameters of the background application are obtained.
In one embodiment, the loss rate threshold may be expressed by a percentage, and the loss rate thresholds may be in one-to-one correspondence with foreground applications, and the corresponding loss rate thresholds are obtained according to the foreground applications. For example, the loss rate threshold for a game-like application is 10% and the loss rate threshold for a video-like application is 20%. And if the loss rate exceeds the loss rate threshold corresponding to the foreground application program, determining that the foreground application program is currently in a stuck operation scene. It is understood that the loss rate threshold may be stored locally in the electronic device, or may be pushed to the electronic device through the server.
In one embodiment, the resource operation parameter may be a CPU occupancy, and specifically, the CPU occupancy may refer to a ratio of occupied CPU resources to total CPU resources, and may also refer to a ratio of time for the CPU to execute a task to total operating time. In general, CPU occupancy may be, but is not limited to, being embodied in percentage form, and how much or how long a particular CPU resource is occupied is represented by a particular percentage value. For example, if the CPU occupancy rate is 50%, it may indicate that 50% of the CPU resources are occupied, or may indicate that 50% of the CPU resources are occupied in the total operating time. The CPU refers to a structure providing operation and control functions in the electronic device, and may be a large-scale integrated circuit, and is mainly used to interpret computer instructions and process data in computer software. When the electronic device runs computer software, the application event needs to be processed through the CPU, and the CPU resource is occupied by the application event.
In one embodiment, the monitoring log file may be obtained in a preset storage address at regular time, and the CPU occupancy rate may be obtained according to the monitoring log file. The preset storage address refers to a preset address for storing a monitoring log file, and the monitoring log file records the change of the specific running condition of the CPU from starting to the current moment. In the preset storage address, the monitoring log file can be searched according to the monitoring log file identifier. The monitoring log file identifier refers to a unique identifier for distinguishing the monitoring log file, such as the name and number of the monitoring log file.
Specifically, the preset storage address may include a plurality of subfolders, and each of the subfolders stores a process log file. The process log files record the change of the specific operation condition of the process from the starting to the current time, and the condition of the CPU resource occupied by the process can be obtained according to the process log files, namely the CPU occupancy rate of the process can be obtained. The process refers to a basic unit for scheduling resource allocation by the CPU, and is also a basic unit for the CPU to execute a task. Each application program comprises one or more processes, so that the CPU occupancy rate corresponding to each background application program can be acquired according to the CPU occupancy rate of the process and the corresponding relation between the process and the application program.
It can be understood that the total CPU occupancy can be obtained according to the monitoring log file, the CPU occupancy of each process can be obtained according to the process log file, and the total CPU occupancy is composed of the occupancy corresponding to each process. Since the task of executing the application program by the CPU is realized by one or more processes, acquiring the CPU occupancy of each background application program may include: and acquiring the CPU occupancy rate of the process corresponding to the background application program, and acquiring the CPU occupancy rate of each background application program according to the CPU occupancy rate of the process.
For example, in the Android system, a monitoring log file storing the CPU total occupancy information may be read in a/proc directory. The/proc directory includes a plurality of subfolders, and the subfolders store process log files of CPU occupation information corresponding to each process. The file name of the monitoring log file stored in the/proc directory is "stat", the subfolder in the/proc directory stores the process log file, and the file name of the process log file is "stat". The stat file under the/proc directory records the total CPU occupation information, and the stat file in the subfolder under the/proc directory records the CPU occupation information of each process. For example, a stat file under the/proc/pid directory records CPU occupation information of a pid process, where pid is a process identifier.
In the embodiment provided by the application, the accumulated working time of the CPU is recorded in the monitoring log file, and the accumulated working time is the time for the CPU to really execute the task from the starting to the current moment. And reading corresponding accumulated working time each time when the monitoring log file is acquired, wherein the difference value of the two read accumulated working times is the real working time of the CPU. Specifically, reading a monitoring log file once at preset time intervals; calculating the accumulated working time corresponding to the currently acquired monitoring log file and the time difference value of the accumulated working time corresponding to the last acquired monitoring log file; the ratio of the time difference to the preset time length is the CPU occupancy rate.
And 406, calculating the operation weight of the background application program according to the foreground operation duration and the resource operation parameters.
In an embodiment, calculating the operation weight of the background application according to the foreground operation duration and the resource operation parameter may specifically include: acquiring a corresponding time length grade according to the foreground operation time length, and acquiring a corresponding operation grade according to the resource operation parameter; and calculating the operation weight of the background application program according to the duration grade and the operation grade.
For example, it is assumed that the duration level corresponding to the foreground operation duration is 5 levels in total, and the operation level corresponding to the resource operation parameter is 5 levels in total. When the foreground operation time length is 1.5 hours, the corresponding time length grade is 2 grades, when the CPU occupancy rate is 45%, the corresponding operation grade is 3 grades, and then the operation weight calculated according to the time length grade and the operation grade is (2 + 3)/10 = 0.5.
Step 408, if the operation weight is within the first weight range, suspending the application program to be processed; and if the running weight is within the second weight range, the application program to be processed is killed.
In one embodiment, suspend refers to temporarily tuning away the process corresponding to the application from the memory to reduce resource usage, and the tuned away process may be re-tuned back to the memory. The killing refers to closing the running application program so that the running application program does not occupy system or network resources of the electronic equipment any more.
The first weight range is a preset value range of the operation weight and is used for screening the application program to be processed which needs to be suspended; the second weight range is a preset value range of the operation weight different from the first weight range and is used for screening the application program to be processed which needs to be checked and killed. It will be appreciated that the first range of loss rates and the second range of loss rates are different ranges of values. For example, when the operation weight is 0-0.5, suspending the application program to be processed; and when the operation weight is 0.5-1, searching and killing the application program to be processed.
The searching and killing of the application program to be processed specifically may include: and acquiring the application program to be checked and killed from the application program to be processed according to the output signal of the output device, and checking and killing the application program to be checked and killed. And acquiring the application program to be checked and killed from the application program to be processed according to the output signal of the output device if the application program to be checked and killed is the application program required to be checked and killed. Specifically, the application to be processed that outputs the signal in the output device is acquired as an application that remains running, the application to be processed other than the application that remains running is acquired as an application to be checked and killed, and the application to be checked and killed is subjected to checking and killing. For example, if a music playing application in the background is playing music, the music playing application may be regarded as a background application that remains running and is not processed.
The application processing method comprises the steps of firstly obtaining the loss rate of signals output by a foreground application, indicating that the foreground application is jammed in operation if the loss rate is larger than a loss rate threshold value, then obtaining the foreground operation duration and resource operation parameters of the background application, and obtaining the application to be processed according to the foreground operation duration and the resource operation parameters. The application program to be processed is selected to be suspended or killed according to the acquired running weight, so that the occupation of the background application program on resources is reduced, the foreground application program is ensured to have sufficient resources to run, the running efficiency of the application program is improved, and the running burden of the resources is reduced.
FIG. 5 is a block diagram of an application processing device according to an embodiment. As shown in fig. 5, the application processing device 500 includes a signal acquisition module 502, a parameter acquisition module 504, and an application processing module 506. Wherein:
the signal obtaining module 502 is configured to obtain a loss rate of a signal output by a foreground application on an output device within a preset time.
A parameter obtaining module 504, configured to obtain a foreground running duration and a resource running parameter of the background application program if the loss rate exceeds a loss rate threshold.
And the application processing module 506 is configured to calculate an operation weight of the background application according to the foreground operation duration and the resource operation parameter, and process the background application according to the operation weight.
The application program processing device firstly obtains the loss rate of the signal output by the foreground application program, if the loss rate is larger than the loss rate threshold value, the operation of the foreground application program is blocked, then the foreground operation time length and the resource operation parameter of the background application program are obtained, and the application program to be processed is obtained according to the foreground operation time length and the resource operation parameter. The application program to be processed is processed, so that the occupation of the background application program on resources is reduced, the foreground application program is ensured to have sufficient resources to run, the running efficiency of the application program is improved, and the running burden of the resources is reduced.
In an embodiment, the signal obtaining module 502 is further configured to obtain a loss rate of a signal output by the foreground application on the output device within a preset time if it is detected that the user terminal inputs a preset operation instruction.
In other embodiments provided in this application, the parameter obtaining module 504 is further configured to obtain a foreground running duration and a resource running parameter of the background application if the loss rate exceeds the loss rate threshold corresponding to the foreground application.
In one embodiment, the application processing module 506 is further configured to suspend the application to be processed if the running weight is within a first weight range; and if the operation weight is in a second weight range, checking and killing the application program to be processed.
In a further embodiment, the application processing module 506 is further configured to obtain the to-be-killed application from the to-be-killed application according to the output signal of the output device, and perform killing processing on the to-be-killed application.
The division of the modules in the application processing apparatus is only for illustration, and in other embodiments, the application processing apparatus may be divided into different modules as needed to complete all or part of the functions of the application processing apparatus.
The embodiment of the application also provides a storage medium. One or more non-volatile storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of:
acquiring the loss rate of signals output by a foreground application program in an output device within preset time;
if the loss rate exceeds a loss rate threshold value, acquiring foreground running duration and resource running parameters of the background application program;
and calculating the operation weight of the background application program according to the foreground operation duration and the resource operation parameters, and processing the background application program according to the operation weight.
In one embodiment, the obtaining, by the processor, a loss rate of the signal output by the foreground application on the output device within the preset time includes:
and if the user terminal is detected to input the preset operation instruction, acquiring the loss rate of the signal output by the foreground application program on the output device within the preset time.
In one embodiment, the obtaining, executed by the processor, the foreground running duration and the resource running parameter of the background application if the loss rate exceeds the loss rate threshold includes:
and if the loss rate exceeds the loss rate threshold corresponding to the foreground application program, acquiring the foreground running time and the resource running parameters of the background application program.
In another embodiment, the processing the background application according to the running weight performed by the processor includes:
if the operation weight is within a first weight range, suspending the application program to be processed;
and if the operation weight is in a second weight range, checking and killing the application program to be processed.
In an embodiment provided by the present application, the performing, by a processor, a killing process on the to-be-processed application includes:
and acquiring an application program to be checked and killed from the application program to be processed according to an output signal of an output device, and checking and killing the application program to be checked and killed.
The embodiment of the application also provides computer equipment. As shown in fig. 6, for convenience of explanation, only the parts related to the embodiments of the present application are shown, and details of the technology are not disclosed, please refer to the method part of the embodiments of the present application. The computer device may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, and the like, taking the computer device as the mobile phone as an example:
fig. 6 is a block diagram of a partial structure of a mobile phone related to a computer device provided in an embodiment of the present application. Referring to fig. 6, the handset includes: a Radio Frequency (RF) circuit 610, a memory 620, an input unit 630, a display unit 640, a sensor 650, an audio circuit 660, a WiFi (wireless fidelity) module 670, a processor 680, and a power supply 690. Those skilled in the art will appreciate that the handset configuration shown in fig. 6 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The rf circuit 610 may be used for receiving and transmitting signals during information transmission or communication, and may receive downlink information of a base station and then process the downlink information to the processor 680; the uplink data may also be transmitted to the base station. Typically, the radio frequency circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the radio frequency circuit 610 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to global system for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
The memory 620 may be used to store software programs and modules, and the processor 680 may execute various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 620. The memory 620 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function (such as an application program for a sound playing function, an application program for an image playing function, and the like), and the like; the data storage area may store data (such as audio data, an address book, etc.) created according to the use of the mobile phone, and the like. Further, the memory 620 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 630 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone 600. Specifically, the input unit 630 may include a touch panel 631 and other input devices 632. The touch panel 631, which may also be referred to as a touch screen, may collect touch operations performed by a user on or near the touch panel 631 (e.g., operations performed by the user on or near the touch panel 631 using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a preset program. In one embodiment, the touch panel 631 may include two parts of 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 the touch information into touch point coordinates, sends the touch point coordinates to the processor 680, and can receive and execute commands sent by the processor 680. In addition, the touch panel 631 may be implemented using various types, such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 630 may include other input devices 632 in addition to the touch panel 631. In particular, other input devices 632 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), and the like.
The display unit 640 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 640 may include a display panel 641. In one embodiment, the Display panel 641 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. In one embodiment, the touch panel 631 can cover the display panel 641, and when the touch panel 631 detects a touch operation thereon or nearby, the touch panel is transmitted to the processor 680 to determine the type of the touch event, and then the processor 680 provides a corresponding visual output on the display panel 641 according to the type of the touch event. Although in fig. 6, the touch panel 631 and the display panel 641 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 631 and the display panel 641 may be integrated to implement the input and output functions of the mobile phone.
The handset 600 may also include at least one sensor 650, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 641 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 641 and/or the backlight when the mobile phone is moved to the ear. The motion sensor can comprise an acceleration sensor, the acceleration sensor can detect the magnitude of acceleration in each direction, the magnitude and the direction of gravity can be detected when the mobile phone is static, the mobile phone can be used for identifying the gesture of the mobile phone (such as horizontal and vertical screen switching), relevant functions of vibration identification (such as pedometer and knocking) and the like, and in addition, other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer and an infrared sensor can be arranged on the mobile phone.
Audio circuit 660, speaker 661, and microphone 662 can provide an audio interface between a user and a cell phone. The audio circuit 660 may transmit the electrical signal converted from the received audio data to the speaker 661, and convert the electrical signal into an audio signal through the speaker 661 for output; on the other hand, the microphone 662 converts the collected sound signal into an electrical signal, which is received by the audio circuit 660 and converted into audio data, and the audio data is processed by the audio data output processor 680, and then the audio data is transmitted to another mobile phone through the radio frequency circuit 610, or the audio data is output to the memory 620 for subsequent processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 670, and provides wireless broadband Internet access for the user. Although fig. 6 shows WiFi module 670, it is understood that it is not an essential component of handset 600 and may be omitted as desired.
The processor 680 is a control center of the mobile phone, and connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 620 and calling data stored in the memory 620, thereby performing overall monitoring of the mobile phone. In one embodiment, processor 680 may include one or more processing units. In one embodiment, processor 680 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications, and the like; the modem processor handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 680.
The handset 600 also includes a power supply 690 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 680 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption.
In one embodiment, the handset 600 may also include a camera, a bluetooth module, and the like.
In the embodiment of the present application, the processor 680 included in the mobile terminal implements the following steps when executing the computer program stored in the memory:
acquiring the loss rate of signals output by a foreground application program in an output device within preset time;
if the loss rate exceeds a loss rate threshold value, acquiring foreground running duration and resource running parameters of the background application program;
and calculating the operation weight of the background application program according to the foreground operation duration and the resource operation parameters, and processing the background application program according to the operation weight.
In one embodiment, the obtaining, by the processor, a loss rate of the signal output by the foreground application on the output device within the preset time includes:
and if the user terminal is detected to input the preset operation instruction, acquiring the loss rate of the signal output by the foreground application program on the output device within the preset time.
In one embodiment, the obtaining, executed by the processor, the foreground running duration and the resource running parameter of the background application if the loss rate exceeds the loss rate threshold includes:
and if the loss rate exceeds the loss rate threshold corresponding to the foreground application program, acquiring the foreground running time and the resource running parameters of the background application program.
In another embodiment, the processing the background application according to the running weight performed by the processor includes:
if the operation weight is within a first weight range, suspending the application program to be processed;
and if the operation weight is in a second weight range, checking and killing the application program to be processed.
In an embodiment provided by the present application, the performing, by a processor, a killing process on the to-be-processed application includes:
and acquiring an application program to be checked and killed from the application program to be processed according to an output signal of an output device, and checking and killing the application program to be checked and killed.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or the like.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (6)

1. An application processing method, comprising:
if the user terminal is detected to input a preset operation instruction, acquiring the loss rate of a signal output by a foreground application program in an output device within preset time, wherein the output signal comprises at least one of an image signal and an audio signal;
acquiring a corresponding loss rate threshold according to the type of the foreground application program, and acquiring foreground running duration of a background application program and resource running parameters of the background application program if the loss rate exceeds the loss rate threshold, wherein the resource running parameters are related parameters generated in the process that the background application program occupies resources of the user terminal to run; the resource operation parameters comprise CPU occupancy rate;
the process for acquiring the CPU occupancy rate comprises the following steps: reading a monitoring log file once at intervals of preset duration; calculating the time difference value of the accumulated working time corresponding to the currently acquired monitoring log file and the accumulated working time corresponding to the last acquired monitoring log file; taking the ratio of the time difference to the preset time as the CPU occupancy rate;
acquiring a corresponding time length grade according to the foreground operation time length, and acquiring a corresponding operation grade according to the resource operation parameter; calculating the operation weight of the background application program according to the duration grade and the operation grade, and acquiring the application program to be processed;
if the running weight of the application program to be processed is within a first weight range, suspending the application program to be processed;
and if the operation weight of the application program to be processed is within a second weight range, acquiring the application program to be processed outputting signals in the output device as an application program reserved for operation, taking the application program to be processed except the application program reserved for operation as an application program to be checked and killed, and performing checking and killing processing on the application program to be checked and killed.
2. The method according to claim 1, wherein the obtaining the loss rate of the signal output by the foreground application on the output device within the preset time comprises:
acquiring the total number of signals to be output by the foreground application in the preset time and the number of the signals of the foreground application output by the output device in the preset time, and obtaining the loss rate of the signals according to the number of the signals of the foreground application output in the preset time and the total number of the signals to be output in the preset time.
3. An application processing apparatus, comprising:
the signal acquisition module is used for acquiring the loss rate of a signal output by a foreground application program on an output device within preset time if the user terminal is detected to input a preset operation instruction, wherein the output signal comprises at least one of an image signal and an audio signal;
a parameter obtaining module, configured to obtain a corresponding loss rate threshold according to a type of the foreground application, and if the loss rate exceeds the loss rate threshold, obtain a foreground running duration of a background application and a resource running parameter of the background application, where the resource running parameter is a related parameter generated by the background application in a process of occupying a resource of the user terminal to run; the resource operation parameters comprise CPU occupancy rate; the process for acquiring the CPU occupancy rate comprises the following steps: reading a monitoring log file once at intervals of preset duration; calculating the time difference value of the accumulated working time corresponding to the currently acquired monitoring log file and the accumulated working time corresponding to the last acquired monitoring log file; taking the ratio of the time difference to the preset time as the CPU occupancy rate;
the application processing module is used for acquiring a corresponding time length grade according to the foreground running time length and acquiring a corresponding running grade according to the resource running parameter; calculating the operation weight of the background application program according to the duration grade and the operation grade, and acquiring the application program to be processed; if the running weight of the application program to be processed is within a first weight range, suspending the application program to be processed; and if the operation weight of the application program to be processed is within a second weight range, acquiring the application program to be processed outputting signals in the output device as an application program reserved for operation, taking the application program to be processed except the application program reserved for operation as an application program to be checked and killed, and performing checking and killing processing on the application program to be checked and killed.
4. The device according to claim 3, wherein the signal obtaining module is further configured to obtain a total number of signals to be output by the foreground application in the preset time and a number of signals of the foreground application output by the output device in the preset time, and obtain a loss rate of the signals according to the number of signals of the foreground application output in the preset time and the total number of signals to be output in the preset time.
5. A computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions that, when executed by the processor, cause the processor to perform the application processing method of any of claims 1 to 2.
6. One or more non-volatile storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the application processing method of any of claims 1-2.
CN201710744127.8A 2017-08-25 2017-08-25 Application program processing method and device, computer equipment and storage medium Expired - Fee Related CN107562539B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710744127.8A CN107562539B (en) 2017-08-25 2017-08-25 Application program processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710744127.8A CN107562539B (en) 2017-08-25 2017-08-25 Application program processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN107562539A CN107562539A (en) 2018-01-09
CN107562539B true CN107562539B (en) 2020-08-18

Family

ID=60976989

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710744127.8A Expired - Fee Related CN107562539B (en) 2017-08-25 2017-08-25 Application program processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN107562539B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110032266B (en) * 2018-01-10 2022-09-09 Oppo广东移动通信有限公司 Information processing method, information processing device, computer equipment and computer readable storage medium
CN110045994B (en) * 2018-01-12 2022-09-16 Oppo广东移动通信有限公司 Application program processing method and device, electronic equipment and computer readable storage medium
CN110045809A (en) * 2018-01-12 2019-07-23 广东欧珀移动通信有限公司 Information processing method, device, computer equipment and computer readable storage medium
CN108762834A (en) * 2018-05-17 2018-11-06 努比亚技术有限公司 A kind of application acceleration method, terminal and computer readable storage medium
CN109542714A (en) * 2018-09-29 2019-03-29 中国平安人寿保险股份有限公司 Method for monitoring application program and device, computer installation and computer storage medium
CN109388947B (en) * 2018-10-30 2023-06-20 浙江解纷链数字科技有限公司 Background management method, device and computer readable storage medium
CN114780218A (en) * 2022-04-20 2022-07-22 Oppo广东移动通信有限公司 Application control method and device, storage medium and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106792165A (en) * 2016-12-02 2017-05-31 武汉斗鱼网络科技有限公司 A kind of resource dynamic regulation method and device
CN107045443A (en) * 2017-04-14 2017-08-15 北京安云世纪科技有限公司 background process control method, device and intelligent terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306095B (en) * 2011-07-21 2017-04-05 宇龙计算机通信科技(深圳)有限公司 Application management method and terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106792165A (en) * 2016-12-02 2017-05-31 武汉斗鱼网络科技有限公司 A kind of resource dynamic regulation method and device
CN107045443A (en) * 2017-04-14 2017-08-15 北京安云世纪科技有限公司 background process control method, device and intelligent terminal

Also Published As

Publication number Publication date
CN107562539A (en) 2018-01-09

Similar Documents

Publication Publication Date Title
CN107562539B (en) Application program processing method and device, computer equipment and storage medium
CN109213539B (en) Memory recovery method and device
US10635449B2 (en) Method and apparatus for running game client
CN106161628B (en) Shooting file uploading method and device
CN107544842B (en) Applied program processing method and device, computer equipment, storage medium
US10193834B2 (en) Method and apparatus for downloading and displaying pictures
CN107368400B (en) CPU monitoring method and device, computer readable storage medium and mobile terminal
CN108156508B (en) Barrage information processing method and device, mobile terminal, server and system
CN106302996B (en) Message display method and device
US10474507B2 (en) Terminal application process management method and apparatus
CN107577508B (en) Application processing method and device, readable storage medium and mobile terminal
CN109756767B (en) Preview data playing method, device and storage medium
CN108334345B (en) Application processing method and device, readable storage medium and mobile terminal
US20170064352A1 (en) Method and system for collecting statistics on streaming media data, and related apparatus
CN108984066B (en) Application icon display method and mobile terminal
CN113039516A (en) Method and device for processing application program and electronic equipment
KR102239616B1 (en) Message notification method and terminal
CN106682189B (en) File name display method and device
CN110555155A (en) article information recommendation method, device and storage medium
CN107491349B (en) Applied program processing method and device, computer equipment, storage medium
CN108540649B (en) Content display method and mobile terminal
CN108668016B (en) Information processing method, device, mobile terminal and computer readable storage medium
CN112612552B (en) Application resource loading method and device, electronic equipment and readable storage medium
CN106302101B (en) Message reminding method, terminal and server
CN107688498B (en) Application program processing method and device, computer equipment and storage medium

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: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200818