CN108334345B - Application processing method and device, readable storage medium and mobile terminal - Google Patents

Application processing method and device, readable storage medium and mobile terminal Download PDF

Info

Publication number
CN108334345B
CN108334345B CN201710693556.7A CN201710693556A CN108334345B CN 108334345 B CN108334345 B CN 108334345B CN 201710693556 A CN201710693556 A CN 201710693556A CN 108334345 B CN108334345 B CN 108334345B
Authority
CN
China
Prior art keywords
application program
foreground
mobile terminal
preset
occupancy rate
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
CN201710693556.7A
Other languages
Chinese (zh)
Other versions
CN108334345A (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 CN201710693556.7A priority Critical patent/CN108334345B/en
Publication of CN108334345A publication Critical patent/CN108334345A/en
Application granted granted Critical
Publication of CN108334345B publication Critical patent/CN108334345B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions

Abstract

The invention relates to an application program processing method, an application program processing device, a readable storage medium and a mobile terminal. The method comprises the following steps: if the preset application program is monitored to enter the foreground, intercepting a foreground notification message of the mobile terminal; and if the preset application program is monitored to exit from the foreground, displaying the foreground notification message of the intercepted mobile terminal on a mobile terminal interface. According to the method, the mobile terminal intercepts the foreground notification message of the mobile terminal after detecting that the preset application program enters the foreground, and the phenomenon that the user is mistakenly operated due to the fact that a notification interface pops up when the user operates is avoided. And after the preset application program exits from the foreground, the intercepted notification message is displayed on the foreground, so that the user is prevented from missing the notification message.

Description

Application processing method and device, readable storage medium and mobile terminal
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an application processing method, an application processing device, a readable storage medium, and a mobile terminal.
Background
With the rapid development of the intelligent mobile terminal, the performance requirements of the user on the intelligent mobile terminal are higher and higher. The notification function in the intelligent mobile terminal can enable the application program to still push message notification to the foreground when the application program runs in the background, so that a user can receive messages in time conveniently. When the game application program runs in the foreground, the message notification pushed to the foreground by the application program can cover the game interface, so that misoperation of the user is caused.
Disclosure of Invention
The embodiment of the application provides an application processing method and device, a readable storage medium and a mobile terminal, which can intercept a foreground notification message of the mobile terminal after a preset application enters a foreground.
An application processing method, comprising:
if the preset application program is monitored to enter the foreground, intercepting a foreground notification message of the mobile terminal;
and if the preset application program is monitored to exit from the foreground, displaying the foreground notification message of the intercepted mobile terminal on a mobile terminal interface.
An application processing apparatus comprising:
the intercepting module intercepts a foreground notification message of the mobile terminal if the preset application program is monitored to enter the foreground;
and the display module displays the intercepted mobile terminal foreground notification message on a mobile terminal interface if the preset application program is monitored to exit from the foreground.
One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the application processing method as described above.
A mobile terminal comprising a memory and a processor, the memory having stored therein computer readable instructions, which, when executed by the processor, cause the processor to perform an application processing method as described above.
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 invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram illustrating an internal architecture of a mobile terminal 10 in one embodiment;
FIG. 2 is a flow diagram of a method for application processing in one embodiment;
FIG. 3 is a flowchart of an application processing method in another embodiment;
FIG. 4 is a block diagram of an application processing device in one embodiment;
FIG. 5 is a block diagram showing the construction of an application processing apparatus according to another embodiment;
fig. 6 is a block diagram of a partial structure of a mobile phone related to a mobile terminal according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention 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 invention and are not intended to limit the invention.
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 monitoring unit may be referred to as a second monitoring unit, and similarly, a second monitoring unit may be referred to as a first monitoring unit, without departing from the scope of the present invention. The first monitoring unit and the second monitoring unit are both monitoring units, but they are not the same monitoring unit.
Fig. 1 is a schematic diagram of the internal structure of a mobile terminal 10 according to an embodiment. As shown in fig. 1, the mobile terminal 10 includes a processor, a non-volatile storage medium, an internal memory, a network interface, a display screen, and an input device, which are connected via a system bus. The non-volatile storage medium of the mobile terminal 10 stores an operating system and computer readable instructions, among other things. The computer readable instructions, when executed by a processor, implement an application processing method. The processor is operative to provide computing and control capabilities that support the overall operation of the mobile terminal 10. Internal memory within the mobile terminal 10 provides an environment for the execution of computer-readable instructions in a non-volatile storage medium. The network interface is used for network communication with the server. The display screen of the mobile terminal 10 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 a housing of the mobile terminal 10, or an external keyboard, a touch pad or a mouse. The mobile terminal 10 may be 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. 1 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation of the mobile terminal 10 to which the present application applies, as a particular mobile terminal 10 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
FIG. 2 is a flow diagram that illustrates a method for processing an application in one embodiment. As shown in fig. 2, an application processing method includes:
step 202, if it is monitored that the designated application program enters the foreground, intercepting a foreground notification message of the mobile terminal.
The mobile terminal can monitor each running application program through the activity manager and monitor the state change of each running application program. When a change in the state of the application is detected, the type of the state change may be determined, such as switching the application from foreground to background, switching the application from background to foreground, and so on. When the application program enters the foreground from the background or the application program is directly opened and operated on the foreground, the mobile terminal detects whether the application program operated on the foreground is a preset application program, and if the application program operated on the foreground is the preset application program, the foreground notification message of the mobile terminal is intercepted. The foreground notification message is a message notification sent by the background running application program to the foreground of the mobile terminal. The foreground notification message may include: notification bar messages and pop-up window messages. The foreground is the interface which is displayed currently by the mobile terminal, and the background is the interface which is not displayed by the mobile terminal.
In one embodiment, the mobile terminal may obtain all running application lists at intervals, for example, every 5 seconds, through the RunningAppProcessInfo class of the activity manager, and determine one by one whether the state of each running application in the application list is foreground running or background running. The current state of the application program can be compared with the previous state, and if the previous state of the application program is foreground operation and the current state is background operation, the application program can be determined to be switched from the foreground to the background.
In one embodiment, the mobile terminal may monitor the lifecycle of each activity, establish a global counter, count calls of each activity to the onStart and onStop methods, increment the global counter by 1 when the application calls the onStart once, decrement the global counter by 1 when the application calls the onStop once, indicate that the application is running in the foreground when the global counter of the application is greater than 0, indicate that the application is running in the background when the global counter of the application is equal to 0, and indicate that the application is switching from the background to the foreground when the global counter is changed from 0 to 1. In other embodiments, other ways may also be used to monitor the foreground and background switching of the application, and the method is not limited to the above-mentioned ways.
The mobile terminal can pre-store a preset application program list, wherein the preset application program list records an application identifier of a preset application program, and the application identifier refers to information for uniquely identifying the application program and comprises a package name of the application program, a number of the application program and the like. The mobile terminal acquires the application identification of the application program running in the foreground, identifies whether the application identification of the application program running in the foreground is in a preset application program list, and judges that the preset application program enters the foreground if the application identification of the application program running in the foreground is in the preset application program list. The preset application program can be a game application program, a video application program, an office application program, a drawing application program and the like. When the preset application program enters the foreground, the mobile terminal can intercept the foreground notification message.
In one embodiment, the mobile terminal may manage the foreground notification message through the NotificationManager. The mobile terminal can update the notification message displayed in the notification bar through the SetLatestEventInfo; the mobile terminal can also set a contentView and a contentIntent through the Remote View, and display the notification message by adopting a customized UI (User Interface), namely, the message is displayed in a popup window of the Interface of the mobile terminal. When the mobile terminal detects that the preset application program enters the foreground, the foreground notification message update can be closed through the notifiationmanager, namely, the foreground notification message of the mobile terminal is intercepted.
And 204, if the situation that the preset application program exits from the foreground is monitored, displaying the foreground notification message of the intercepted mobile terminal on a mobile terminal interface.
After monitoring that the preset application program enters the foreground and the foreground notification message of the mobile terminal is intercepted, if the mobile terminal monitors that the preset application program exits the foreground, the intercepted foreground notification message of the preset application program in the foreground operation period is displayed on a mobile terminal interface. The exiting foreground of the preset application program comprises the following steps: and switching the preset application program from the foreground to the background, or closing the preset application program. Displaying the intercepted foreground notification message on a mobile terminal interface comprises the following steps: and displaying the intercepted foreground notification message on a notification bar of the mobile terminal, or displaying the intercepted foreground notification message on a popup window of a mobile terminal interface.
According to the application program processing method in the embodiment of the application program processing method, the foreground notification message of the mobile terminal is intercepted after the mobile terminal detects that the preset application program enters the foreground, and misoperation of a user caused by popping up a notification interface during operation of the user is avoided. And after the preset application program exits from the foreground, the intercepted notification message is displayed on the foreground, so that the user is prevented from missing the notification message. The convenience of user operation is improved.
In an embodiment, the step 202, if it is detected that the preset application program enters the foreground, includes any one of the following conditions:
(1) acquiring an application identifier of an application program entering a foreground, wherein the application identifier is a designated application identifier;
the mobile terminal can obtain the application identifier of the application program entering the foreground, and detect whether the application identifier of the application program is the application identifier corresponding to the preset application program, namely, the specified application identifier. And if the application identifier of the application program entering the foreground is the specified application identifier, judging that the preset application program enters the foreground. If the preset application program comprises the 'running cool', the name of the application program package corresponding to the 'running cool' is paoku _ com, and if the mobile terminal detects that the name of the application program package entering the foreground is paoku _ com, the mobile terminal judges that the preset application program 'running cool' enters the foreground. Wherein, the application program entering into the foreground comprises: and switching the application program from the background to the foreground, and directly opening the application program in the foreground.
(2) The frequency of monitoring touch screen events acting on a display screen of the mobile terminal is greater than the first frequency, and the duration of the system CPU occupancy rate meeting the preset condition exceeds the preset duration.
When the mobile terminal runs, both a system program and a third-party program in the mobile terminal consume CPU resources in the mobile terminal. The mobile terminal system CPU occupancy rate is the CPU resource occupied by all programs running in the mobile terminal, i.e., the running system program and the third-party program. Generally, the higher the CPU occupancy of the system, the more programs are run in the mobile terminal; the lower the system CPU occupancy, the fewer programs running within the mobile terminal. The CPU resource consumption condition of the mobile terminal can be known by monitoring the CPU occupancy rate of the system, and when the CPU occupancy rate of the system is detected to meet a preset condition, namely the CPU resource occupancy of the system is abnormal, a touch screen event of a display screen of the mobile terminal is monitored.
The step of the mobile terminal acquiring the system CPU occupancy may include: the mobile terminal acquires the system CPU accumulated working time length according to a preset first time interval, acquires the difference value between the next CPU accumulated working time length and the previous CPU accumulated working time length in the CPU accumulated working time lengths acquired twice continuously, the difference value is the real working time of the system CPU in the preset first time interval, and the ratio of the difference value to the preset first time interval is the system CPU occupancy rate in the preset first time interval. The accumulated working time of the CPU is the total working time of the CPU from the self-starting of the mobile terminal to the current moment. The preset first time interval may be any time length from 5 seconds to 20 seconds, and preferably may be 5 seconds. For example, the mobile terminal collects the system CPU cumulative operating time every 5 seconds, and if the CPU cumulative operating times collected twice consecutively are 60 minutes 03 seconds and 60 minutes 04 seconds, respectively, the system CPU operating time is 1 second in the 5 seconds, and the system CPU occupancy rate is 20%.
In the Android system, the relevant information of the system CPU can be read under a/proc directory. The stat file under the/proc directory contains all information of system CPU activities, and all the information of the system CPU activities are the time length accumulated by the CPU activities from the self-starting of the mobile terminal to the current moment. The CPU monitoring module in the mobile terminal can read the activity information of the system CPU in the proc directory at regular time and then acquire the system CPU occupancy rate of the mobile terminal in the acquisition time. The above method is only an example, and other systems, such as an apple system, a saiban system, and the like, may also obtain the CPU related information, thereby obtaining the system CPU occupancy.
After the mobile terminal obtains the system CPU occupancy rate, if the system CPU occupancy rate is detected to meet a preset condition, if the system CPU occupancy rate is larger than a preset value, a touch screen event of a display screen of the mobile terminal is monitored. The touch screen event of the designated area of the display screen of the mobile terminal can be monitored, the designated area of the display screen of the mobile terminal can be a square area, a circular area or a polygonal area, and the designated area can comprise one or more areas. The mobile terminal can monitor the frequency of the touch screen events in the designated area in unit time, namely the frequency of the touch screen events in the designated area of the display screen of the mobile terminal. When the designated area comprises an area, the mobile terminal monitors the number of touch screen events in unit time of the designated area; when the designated area comprises a plurality of areas, the mobile terminal can acquire the frequency of the touch screen events of each designated area and monitor whether the average value of the frequency of the touch screen events of the designated areas is greater than a first frequency; or the mobile terminal acquires the frequency of the touch screen events of each designated area and monitors whether the maximum frequency of the touch screen events of the designated areas is greater than the first frequency.
The mobile terminal acquires the system CPU occupancy rate according to a preset first time interval, and if the system CPU occupancy rates acquired by the mobile terminal for N times continuously meet a preset condition, the duration of the system CPU occupancy rate meeting the preset condition exceeds a preset duration. Wherein, N is a value set according to a preset time length. For example, the preset time duration is 20 seconds, the first time interval is 5 seconds, and the preset condition is that the system CPU occupancy is greater than 50%, the mobile terminal detects that the system CPU occupancy is greater than 50% for 5 consecutive times, and the duration of the system CPU occupancy greater than 50% exceeds the preset time duration by 20 seconds.
In one embodiment, if it is monitored that the system CPU occupancy satisfies the preset condition, the monitoring includes any one of the following conditions:
(1) if the occupancy rate of the system CPU is greater than a first threshold value;
(2) if the difference value between the current system CPU occupancy rate and the last adjacent system CPU occupancy rate is larger than a second threshold value.
The system CPU occupancy satisfying the preset condition may include: and after the mobile terminal acquires the system CPU occupancy rate, comparing the system CPU occupancy rate with a preset first threshold, if the system CPU occupancy rate is greater than the first threshold, or after acquiring the current system CPU occupancy rate, the mobile terminal makes a difference between the current system CPU occupancy rate and the last system CPU occupancy rate adjacent to the current system CPU occupancy rate, and acquires a system CPU occupancy rate difference value. If the system CPU occupancy rate difference exceeds a specified value, the system CPU occupancy rate meets a preset condition, the mobile terminal system CPU occupancy rate changes greatly, and the system CPU occupancy rate in the mobile terminal is abnormal. In general, the above-specified value is a positive number, and may be any of 15% to 20%, preferably 20%. The system CPU occupancy rate difference is larger than the specified value, namely the mobile terminal system CPU occupancy rate is suddenly increased, and the mobile terminal system CPU occupancy rate is abnormal. And taking the acquired current system CPU occupancy rate as a first CPU occupancy rate, namely an abnormal CPU occupancy rate.
In one embodiment, if it is detected that the preset application program exits from the foreground, any one of the following conditions is included:
(1) monitoring that a preset application program is closed;
(2) and monitoring that the preset application program is switched from a foreground to a background.
The mobile terminal can monitor each running application program through the activity manager and monitor the state change of each running application program. The mobile terminal can monitor each running application program at regular time to obtain a running application program list. By comparing the application program lists obtained twice before and after, the mobile terminal can determine whether the application program is closed. If the running application program list acquired by the preset application program A at the previous time is not the running application program list acquired at the next time, the preset application program A is closed. The mobile terminal can also directly monitor whether each running application program has a preset application program. The method for the mobile terminal to monitor the switching of the preset application program from the foreground to the background is the same as the corresponding method in step 202, and is not described herein again.
In one embodiment, after it is detected that the preset application program enters the foreground, the method further includes: and stopping running the background application program according to a preset rule.
The mobile terminal can stop running the background application program according to a preset rule. The preset rule includes any one of the following conditions:
(1) and stopping running the application programs according to the priority sequence. The priority order may be the priority order of the application program preset by the system, or the priority order set by the user. The mobile terminal stops the running of the background application program with low priority first and stops the running of the background application program with high priority later.
(2) And stopping the application programs according to the high and low sequence of the CPU occupancy rate of the application programs. The mobile terminal acquires the CPU occupancy rate of the application program of the background application program in real time, the application program with high CPU occupancy rate of the application program stops running firstly, the application program with low CPU occupancy rate of the application program stops running later, or the application program with high CPU occupancy rate of the application program stops running later, and the application program with low CPU occupancy rate of the application program stops running firstly.
(3) And stopping the operation of the application program according to the times of initiating the networking requests in unit time, namely the high and low sequence of the frequency of initiating the networking requests. The frequency of the application program initiating the networking request is high, which indicates that the application program has higher real-time requirement on the message, and the application program stops running after the application program is started; the frequency of the application program initiating the networking request is low, which shows that the application program has low real-time requirement on the message, and the application program stops running firstly.
The step of the mobile terminal acquiring the CPU occupancy rate of each application program may include: acquiring the accumulated time length occupied by the CPU of each running application program in the mobile terminal according to a preset second time interval, and acquiring the difference value between the accumulated time length occupied by the CPU of the next time and the accumulated time length occupied by the CPU of the previous time in the accumulated time lengths occupied by the CPU of the application programs acquired continuously twice, wherein the difference value is the time that the application program occupies the CPU in the second time interval, and the ratio of the difference value to the second time interval is the CPU occupancy rate of the application program in the second time interval. The first time interval and the second time interval may be the same value or different values.
In the Android system, sats files under a/proc/pid directory contain information that a process corresponding to an application program occupies a CPU. And the information that the process corresponding to the application program occupies the CPU is the accumulated time length that the application program occupies the CPU after being automatically started. The CPU monitoring module in the mobile terminal can read the accumulated time length of the CPU occupied by each application program under the proc/pid directory at regular time and then acquire the CPU occupancy rate of the application program in the acquisition time. The above method is only an example, and other systems, such as an apple system and a saiban system, may also obtain the relevant information of the application CPU, so as to obtain the application CPU occupancy rate.
According to the application program processing method in the embodiment of the application program, the background application program can be stopped to run according to the priority of the application program, the CPU occupancy rate of the application program and the frequency of networking requests initiated by the application program, the CPU resource is released, and the phenomenon that the game application program is operated in the foreground to cause blocking is avoided. And respectively processing the background application programs, so that a user can conveniently receive the message of the preset application program.
Fig. 3 is a flowchart of an application processing method in another embodiment. As shown in fig. 3, an application processing method includes:
step 302, if it is monitored that the preset application program enters the foreground, intercepting a foreground notification message of the mobile terminal.
If the preset application program is monitored to enter the foreground, any one of the following conditions is included:
(1) and acquiring an application identifier of the application program entering the foreground, wherein the application identifier is a specified application identifier.
(2) The frequency of monitoring touch screen events acting on a display screen of the mobile terminal is greater than the first frequency, and the duration of the system CPU occupancy rate meeting the preset condition exceeds the preset duration.
If the monitored occupancy rate of the system CPU meets the preset condition, the method comprises any one of the following conditions:
(1) and if the occupancy rate of the system CPU is greater than the first threshold value.
(2) If the difference value between the current system CPU occupancy rate and the last adjacent system CPU occupancy rate is larger than a second threshold value.
And step 304, stopping running the background application program according to a preset rule.
And step 306, if the situation that the preset application program exits from the foreground is monitored, displaying the foreground notification message of the intercepted mobile terminal on the interface of the mobile terminal.
If the preset application program is monitored to exit the foreground, the method comprises the following steps:
(1) and monitoring that the preset application program is closed.
(2) And monitoring that the preset application program is switched from a foreground to a background.
According to the application program processing method in the embodiment of the application program processing method, the foreground notification message of the mobile terminal is intercepted after the mobile terminal detects that the preset application program enters the foreground, and misoperation of a user caused by popping up a notification interface during operation of the user is avoided. And after the preset application program exits from the foreground, the intercepted notification message is displayed on the foreground, so that the user is prevented from missing the notification message.
Fig. 4 is a block diagram showing an application processing apparatus according to an embodiment, which includes an intercepting module 402 and a presentation module 404. Wherein:
and if the preset application program is monitored to enter the foreground, the interception module 402 intercepts the foreground notification message of the mobile terminal.
And the display module 404 is configured to display the intercepted mobile terminal foreground notification message on the mobile terminal interface if it is monitored that the preset application program exits from the foreground.
In one embodiment, if it is monitored that the system CPU occupancy satisfies the preset condition, the monitoring includes any one of the following conditions:
(1) and if the occupancy rate of the system CPU is greater than the first threshold value.
(2) If the difference value between the current system CPU occupancy rate and the last adjacent system CPU occupancy rate is larger than a second threshold value.
In one embodiment, the interception module 402 is further configured to obtain an application identifier of an application program entering the foreground, where the application identifier is a specific application identifier; or the frequency of the touch screen events acting on the display screen of the mobile terminal is monitored to be greater than the first frequency, and the duration of the system CPU occupancy rate meeting the preset condition exceeds the preset duration.
In one embodiment, the presentation module 404 is further configured to monitor that the predetermined application is closed; or, monitoring that the preset application program is switched from a foreground to a background.
Fig. 5 is a block diagram showing the configuration of an application processing apparatus according to another embodiment, and the application processing apparatus includes an interception module 502, a presentation module 504, and a stop module 506. The intercepting module 502 and the displaying module 504 have the same functions as the corresponding modules in fig. 4.
And a stopping module 506, configured to stop running the background application according to a preset rule if it is monitored that the preset application enters the foreground.
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 computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the application processing method as described above.
The embodiment of the application also provides the mobile terminal. 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 mobile terminal 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 mobile terminal as the mobile phone as an example:
fig. 6 is a block diagram of a partial structure of a mobile phone related to a mobile terminal according to an embodiment of the present application. Referring to fig. 6, the handset includes: radio Frequency (RF) circuit 610, memory 620, input unit 630, display unit 640, sensor 650, audio circuit 660, wireless fidelity (WiFi) module 670, processor 680, and 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 the 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 RF 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 RF circuitry 610 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), e-mail, Short Messaging Service (SMS), and the like.
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, and the motion sensor can be used for identifying the application of the gesture of the mobile phone (such as horizontal and vertical screen switching), the vibration identification related functions (such as pedometer and knocking) and the like; the mobile phone may be provided with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor.
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, which is then processed by the audio data output processor 680 and then transmitted to another mobile phone via the RF 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 application processing method as described above when executing the computer program stored on the memory.
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 invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An application processing method, comprising:
if the preset application program is monitored to enter the foreground, intercepting a foreground notification message of the mobile terminal;
if the preset application program is monitored to exit from the foreground, displaying the foreground notification message of the intercepted mobile terminal on a mobile terminal interface;
wherein, if the preset application program is monitored to enter the foreground, the method comprises the following steps:
monitoring that the frequency of touch screen events acting on a display screen of the mobile terminal is greater than the first frequency, and the duration of the system CPU occupancy rate meeting a preset condition exceeds a preset duration;
the acquisition process of the system CPU occupancy rate comprises the following steps:
collecting the accumulated working time of a system CPU according to a preset first time interval;
acquiring the difference value between the next CPU accumulated working time length and the previous CPU accumulated working time length in the CPU accumulated working time lengths acquired twice continuously;
and taking the ratio of the difference value to the first time interval as the system CPU occupancy rate in the first time interval.
2. The application processing method according to claim 1, wherein if it is monitored that the system CPU occupancy rate satisfies a preset condition, the method comprises:
if the CPU occupancy rate of the system is monitored to be larger than a first threshold value;
or if the difference value between the current system CPU occupancy rate and the adjacent last system CPU occupancy rate is larger than the second threshold value.
3. The method according to claim 1 or 2, wherein the step of, if it is detected that the preset application program exits from the foreground, comprising:
monitoring that the preset application program is closed;
or, monitoring that the preset application program is switched from a foreground to a background.
4. The method for processing the application program according to claim 1, wherein after the preset application program is monitored to enter the foreground, the method further comprises:
and stopping running the background application program according to a preset rule.
5. An application processing apparatus, comprising:
the intercepting module intercepts a foreground notification message of the mobile terminal if the preset application program is monitored to enter the foreground;
the display module displays the intercepted mobile terminal foreground notification message on a mobile terminal interface if the preset application program is monitored to exit from the foreground;
the intercepting module is further used for monitoring that the frequency of touch screen events acting on a display screen of the mobile terminal is greater than the first frequency, and the duration of the system CPU occupancy rate meeting a preset condition exceeds a preset duration;
the intercepting module is also used for collecting the accumulated working time of the system CPU according to a preset first time interval; acquiring the difference value between the next CPU accumulated working time length and the previous CPU accumulated working time length in the CPU accumulated working time lengths acquired twice continuously; and taking the ratio of the difference value to the first time interval as the system CPU occupancy rate in the first time interval.
6. The apparatus according to claim 5, wherein the step of monitoring that the system CPU occupancy rate satisfies a preset condition comprises:
if the CPU occupancy rate of the system is monitored to be larger than a first threshold value;
or if the difference value between the current system CPU occupancy rate and the adjacent last system CPU occupancy rate is larger than the second threshold value.
7. The application processing apparatus according to claim 5 or 6, characterized in that: the display module is further used for monitoring that the preset application program is closed; or, monitoring that the preset application program is switched from a foreground to a background.
8. The application processing apparatus according to claim 5, wherein said apparatus further comprises:
and the stopping module is used for stopping running the background application program according to a preset rule after monitoring that the preset application program enters the foreground.
9. One or more non-transitory computer-readable 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 to 4.
10. A mobile terminal 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 an application processing method according to any one of claims 1 to 4.
CN201710693556.7A 2017-08-14 2017-08-14 Application processing method and device, readable storage medium and mobile terminal Active CN108334345B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710693556.7A CN108334345B (en) 2017-08-14 2017-08-14 Application processing method and device, readable storage medium and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710693556.7A CN108334345B (en) 2017-08-14 2017-08-14 Application processing method and device, readable storage medium and mobile terminal

Publications (2)

Publication Number Publication Date
CN108334345A CN108334345A (en) 2018-07-27
CN108334345B true CN108334345B (en) 2021-07-09

Family

ID=62922384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710693556.7A Active CN108334345B (en) 2017-08-14 2017-08-14 Application processing method and device, readable storage medium and mobile terminal

Country Status (1)

Country Link
CN (1) CN108334345B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111736931A (en) * 2019-03-25 2020-10-02 青岛海信移动通信技术股份有限公司 Application display interface interception method and terminal
CN110045888B (en) * 2019-03-28 2021-09-14 努比亚技术有限公司 Screen interface screenshot processing method and mobile terminal
CN112035249B (en) * 2020-08-24 2023-06-13 茂佳科技(广东)有限公司 Application program network duty ratio adjusting method, device and storage medium
CN115314593A (en) * 2021-05-08 2022-11-08 深圳市万普拉斯科技有限公司 Mobile terminal control method, device, terminal and storage medium
CN114629989A (en) * 2022-03-23 2022-06-14 深圳麦风科技有限公司 Android application control method and device, intelligent terminal and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7685597B1 (en) * 2004-02-20 2010-03-23 Sun Microsystems, Inc. System and method for management of characterized resources
US8522247B2 (en) * 2007-07-30 2013-08-27 Novell Intellectual Property Holdings, Inc. System and method for indicating usage of system resources using taskbar graphics
CN104506729A (en) * 2014-12-25 2015-04-08 广东欧珀移动通信有限公司 Application program disturbance avoiding method and device
CN105338177A (en) * 2015-09-30 2016-02-17 小米科技有限责任公司 Information delayed broadcasting method and device
CN106293834A (en) * 2016-08-09 2017-01-04 广东小天才科技有限公司 The application program progress control method of a kind of mobile terminal and device
CN106445783A (en) * 2016-09-27 2017-02-22 北京金山安全软件有限公司 Method and device for detecting jamming of electronic equipment and electronic equipment
CN106469054A (en) * 2015-08-21 2017-03-01 小米科技有限责任公司 notification message control method, device and terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040030882A1 (en) * 2002-08-08 2004-02-12 Forman George Henry Managed application pre-launching
CN102075337A (en) * 2009-11-20 2011-05-25 腾讯科技(深圳)有限公司 Instant communication message display method and related device
EP2390757A1 (en) * 2010-05-25 2011-11-30 Samsung Electronics Co., Ltd. Method and apparatus for managing an application being executed in a portable terminal
JP5915406B2 (en) * 2012-06-22 2016-05-11 富士通株式会社 Control method of portable terminal device, control program, and portable terminal device
CN105224439A (en) * 2014-07-02 2016-01-06 北京金山安全软件有限公司 Method and device for detecting CPU occupancy rate of terminal APP and terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7685597B1 (en) * 2004-02-20 2010-03-23 Sun Microsystems, Inc. System and method for management of characterized resources
US8522247B2 (en) * 2007-07-30 2013-08-27 Novell Intellectual Property Holdings, Inc. System and method for indicating usage of system resources using taskbar graphics
CN104506729A (en) * 2014-12-25 2015-04-08 广东欧珀移动通信有限公司 Application program disturbance avoiding method and device
CN106469054A (en) * 2015-08-21 2017-03-01 小米科技有限责任公司 notification message control method, device and terminal
CN105338177A (en) * 2015-09-30 2016-02-17 小米科技有限责任公司 Information delayed broadcasting method and device
CN106293834A (en) * 2016-08-09 2017-01-04 广东小天才科技有限公司 The application program progress control method of a kind of mobile terminal and device
CN106445783A (en) * 2016-09-27 2017-02-22 北京金山安全软件有限公司 Method and device for detecting jamming of electronic equipment and electronic equipment

Also Published As

Publication number Publication date
CN108334345A (en) 2018-07-27

Similar Documents

Publication Publication Date Title
US11099900B2 (en) Memory reclamation method and apparatus
US10635449B2 (en) Method and apparatus for running game client
CN108334345B (en) Application processing method and device, readable storage medium and mobile terminal
CN107368400B (en) CPU monitoring method and device, computer readable storage medium and mobile terminal
US10516640B2 (en) Group message updating and displaying method, apparatus, and terminal
CN107391259B (en) Resource processing method and device, computer readable storage medium and mobile terminal
CN106250223B (en) Background process management method and terminal equipment
CN107577508B (en) Application processing method and device, readable storage medium and mobile terminal
US10474507B2 (en) Terminal application process management method and apparatus
CN107562539B (en) Application program processing method and device, computer equipment and storage medium
WO2020093208A1 (en) Application processing method and apparatus, computer device, and computer readable storage medium
CN109992380B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN111405112B (en) Message prompting method and electronic equipment
CN107526638B (en) Application processing method and device, mobile terminal and storage medium
CN115668123A (en) Audio resource allocation method and device and electronic equipment
WO2017206901A1 (en) Process control method and related device
WO2017206857A1 (en) Response control method and mobile terminal
WO2018018704A1 (en) Application program freezing method and terminal device
CN110032397B (en) Application processing method and device, electronic equipment and computer readable storage medium
CN109992309B (en) Application program processing method and device, electronic equipment and computer readable storage medium
US11150913B2 (en) Method, device, and terminal for accelerating startup of application
CN109189538A (en) A kind of method and apparatus sending orientation red packet
CN106454953B (en) Flow control method, device and terminal
CN109375995B (en) Application freezing method and device, storage medium and electronic equipment
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

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.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant