CN109144811B - Application monitoring method and device and mobile terminal - Google Patents

Application monitoring method and device and mobile terminal Download PDF

Info

Publication number
CN109144811B
CN109144811B CN201810712431.9A CN201810712431A CN109144811B CN 109144811 B CN109144811 B CN 109144811B CN 201810712431 A CN201810712431 A CN 201810712431A CN 109144811 B CN109144811 B CN 109144811B
Authority
CN
China
Prior art keywords
target application
preset
nonvolatile memory
mobile terminal
data
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
CN201810712431.9A
Other languages
Chinese (zh)
Other versions
CN109144811A (en
Inventor
郭纯海
陈博文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201810712431.9A priority Critical patent/CN109144811B/en
Publication of CN109144811A publication Critical patent/CN109144811A/en
Application granted granted Critical
Publication of CN109144811B publication Critical patent/CN109144811B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Telephone Function (AREA)

Abstract

The invention provides an application monitoring method, an application monitoring device and a mobile terminal, and relates to the technical field of mobile terminals. Wherein, the method comprises the following steps: determining the data amount written into the nonvolatile memory by the target application each time; when the first data volume written by the target application in the preset time period is larger than the first preset data volume, determining each second data volume respectively written by the target application in each historical time period; determining the average data quantity of each second data quantity in each historical time period; when the first data volume is larger than the average data volume of the preset multiple, determining that the operation of the target application is abnormal; and displaying first prompt information indicating that the running of the target application is abnormal. In the invention, when the written data volume of the target application in a short period and a long period is determined to be overlarge, the mobile terminal can display the prompt information so as to early warn a user in advance, so that the user can conveniently process the target application in time, and the data loss when the service life of the nonvolatile memory is exhausted is avoided.

Description

Application monitoring method and device and mobile terminal
Technical Field
The invention relates to the technical field of mobile terminals, in particular to an application monitoring method and device and a mobile terminal.
Background
The nonvolatile memory is a memory capable of maintaining data after power is off, and can be used as a key storage device in the mobile terminal. The nonvolatile memory is generally soldered to a main board of the mobile terminal and is bound to the central processing unit, so that when the nonvolatile memory fails, the nonvolatile memory is not replaced alone, but the entire main board is replaced together. Therefore, the lifetime of the nonvolatile memory also determines the overall lifetime of the mobile terminal.
In practical applications, if a large amount of data is written into the nonvolatile memory, the lifetime of the nonvolatile memory may be exhausted too early, and the lifetime of the mobile terminal may be shortened. However, when the lifetime of the nonvolatile memory is abnormally consumed, the user cannot get early warning, and cannot know the reason why the lifetime of the nonvolatile memory is abnormally consumed, so that the mobile terminal has a great risk of data loss.
Disclosure of Invention
The invention provides an application monitoring method, an application monitoring device and a mobile terminal, and aims to solve the problem that a user cannot know a reason in advance when the service life of a nonvolatile memory is abnormally consumed, so that the risk of data loss is high.
In order to solve the technical problem, the invention is realized as follows: a method for application monitoring, applied to a mobile terminal including a non-volatile memory, includes:
determining the data amount written into the nonvolatile memory by the target application each time;
when a first data volume written into the nonvolatile memory by the target application in a preset time period is larger than a first preset data volume, determining each second data volume written into the nonvolatile memory by the target application in each historical time period; each historical time period is before the preset time period;
determining an average data amount of the respective second data amounts in the respective historical time periods;
when the first data volume is larger than the average data volume of a preset multiple, determining that the target application is abnormal in operation;
and displaying first prompt information indicating that the running of the target application is abnormal.
In a first aspect, an embodiment of the present invention further provides an application monitoring apparatus, including:
the first determining module is used for determining the data amount written into the nonvolatile memory by the target application each time;
a second determining module, configured to determine, when a first data amount written into the nonvolatile memory by the target application in a preset time period is greater than a first preset data amount, each second data amount written into the nonvolatile memory by the target application in each historical time period, respectively; each historical time period is before the preset time period;
a third determining module, configured to determine an average data amount of the respective second data amounts in the respective historical time periods;
the fourth determining module is used for determining that the target application runs abnormally when the first data volume is larger than the average data volume of preset multiples;
and the first display module is used for displaying first prompt information indicating that the target application is abnormal in operation.
In a second aspect, an embodiment of the present invention further provides a mobile terminal, where the mobile terminal includes a processor, a nonvolatile memory, and a computer program stored in the nonvolatile memory and executable on the processor, and when the computer program is executed by the processor, the steps of the application monitoring method according to the present invention are implemented.
In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the application monitoring method according to the present invention are implemented.
In the embodiment of the invention, the mobile terminal can determine the data volume written into the nonvolatile memory by the target application each time, when the first data volume written by the target application in the preset time period is larger than the first preset data volume, determine each second data volume respectively written by the target application in each historical time period, and then when the first data volume is larger than the average value of the second data volumes of the preset multiple, determine that the target application is abnormal in operation, and further display first prompt information indicating that the target application is abnormal in operation. The mobile terminal can determine the data volume written by the target application in a short period, further judge whether the data volume written by the target application in a long period is too large when the data volume written by the target application in the short period is too large, and determine that the target application is abnormal in service life consumption when the data volume written by the target application in the short period and the long period is too large, so that the mobile terminal can display first prompt information to early warn a user in advance, the user can timely process the target application, and data loss when the service life of the nonvolatile memory is exhausted can be avoided.
Drawings
Fig. 1 is a flowchart illustrating an application monitoring method according to a first embodiment of the present invention;
fig. 2 shows a flowchart of an application monitoring method in the second embodiment of the present invention;
fig. 3 is a block diagram illustrating an application monitoring apparatus according to a third embodiment of the present invention;
fig. 4 is a block diagram showing another application monitoring apparatus according to a third embodiment of the present invention;
fig. 5 is a diagram illustrating a hardware structure of a mobile terminal according to various embodiments of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 1, a flowchart of an application monitoring method according to a first embodiment of the present invention is shown, which may specifically include the following steps:
step 101, determining the data amount written into the nonvolatile memory by the target application each time.
In the embodiment of the invention, the target application can be any application installed in the mobile terminal, when the target application is started, the mobile terminal can establish an application process of the target application, and the application process can read and write the file data through a file system in the mobile terminal. The application process corresponding to the target application can write data into the nonvolatile memory of the mobile terminal, so that the mobile terminal can count the data amount written into the nonvolatile memory by the target application each time.
Step 102, when a first data volume written into the nonvolatile memory by the target application in a preset time period is larger than a first preset data volume, determining second data volumes written into the nonvolatile memory by the target application in historical time periods respectively; each historical time period precedes the preset time period.
In the embodiment of the present invention, the preset time period may be a time period before the current time and meeting a preset duration, for example, within 1 day before the current time, within 20 hours before the current time, and the like. Every time a preset time period passes, the mobile terminal can determine the data volume written into the nonvolatile memory by the target application in the time period, so that before the preset time period, the mobile terminal can count the second data volume written into the nonvolatile memory by the target application in each historical time period.
The mobile terminal may count the data amount of the target application written into the nonvolatile memory each time, and when the first data amount of the target application written into the nonvolatile memory cumulatively in a preset time period is greater than the first preset data amount, the mobile terminal may determine each second data amount of the target application written into the nonvolatile memory in each historical time period. The time length of each historical time period is the same as the time length of the preset time period before the preset time period, that is, the mobile terminal can accumulatively determine the data volume written into the nonvolatile memory by the target application in the time length of the time period every other preset time length.
Step 103, determining the average data amount of each second data amount in each historical time period.
In the embodiment of the present invention, the mobile terminal may determine an average data amount of each second data amount in each historical time period, that is, may determine an average distribution condition of the data amount written by the target application into the nonvolatile memory in the total time length added in each historical time period.
And 104, when the first data volume is larger than the average data volume of the preset multiple, determining that the target application is abnormal in operation.
In the embodiment of the present invention, when the first data amount is greater than the average data amount of the preset multiple, it may indicate that the data amount written into the nonvolatile memory by the target application in the preset time period far exceeds the previous average level, so that the mobile terminal may determine that there is an abnormality in writing the data amount of the nonvolatile memory when the target application is running, thereby determining that the target application has an adverse effect on the lifetime of the nonvolatile memory.
And 105, displaying first prompt information indicating that the running of the target application is abnormal.
In the embodiment of the present invention, after the mobile terminal determines that there is an abnormality in the operation of the target application, a first prompt message indicating that there is an abnormality in the operation of the target application may be displayed, for example, "the target application consumes a memory life abnormally |)! "etc., to pre-warn the user. Therefore, when the user checks the first prompt information, the user can know that the target application is abnormal in operation, so that measures such as unloading or replacing the target application version can be taken in time, the target application is prevented from continuously writing too much data into the nonvolatile memory, and data loss when the service life of the nonvolatile memory is exhausted can be avoided.
In the embodiment of the invention, the mobile terminal can determine the data volume written into the nonvolatile memory by the target application each time, when the first data volume written by the target application in the preset time period is larger than the first preset data volume, determine each second data volume respectively written by the target application in each historical time period, and then when the first data volume is larger than the average value of the second data volumes of the preset multiple, determine that the target application is abnormal in operation, and further display first prompt information indicating that the target application is abnormal in operation. The mobile terminal can determine the data volume written by the target application in a short period, further judge whether the data volume written by the target application in a long period is too large when the data volume written by the target application in the short period is too large, and determine that the target application is abnormal in service life consumption when the data volume written by the target application in the short period and the long period is too large, so that the mobile terminal can display first prompt information to early warn a user in advance, the user can timely process the target application, and data loss when the service life of the nonvolatile memory is exhausted can be avoided.
Example two
Referring to fig. 2, a flowchart of an application monitoring method according to a second embodiment of the present invention is shown, which may specifically include the following steps:
in step 201, the amount of data written into the nonvolatile memory by the target application at a time is determined.
In the embodiment of the invention, the mobile terminal can monitor the application in a two-layer cooperation mode of the background service program and the file system. The applications installed in the mobile terminal can write data into the nonvolatile memory through the file system, and the background service program can count and monitor the data amount written into the nonvolatile memory by each application through the file system.
The mobile terminal can set a data volume threshold for the file system layer through the background service program, that is, set a first preset data volume, where the data volume threshold can be an upper limit of a write-in data volume that cannot be reached normally when the application is in normal use, and certainly, in practical application, the data volume threshold should not be set too large so as to avoid that the application with the too large write-in data volume cannot be filtered out.
For example, for a mobile terminal with 32GB (gigabytes) of memory, the sustainable write data amount of the nonvolatile memory in the mobile terminal may be 32TB (terabytes), and each time the target application writes data into the nonvolatile memory, the mobile terminal may count the write data amount of the target application, that is, the mobile terminal may determine the data amount that the target application writes into the nonvolatile memory each time.
Step 202, when a first data volume written into the nonvolatile memory by the target application in a preset time period is larger than a first preset data volume, determining second data volumes written into the nonvolatile memory by the target application in historical time periods respectively; each historical time period precedes the preset time period.
When the first data amount accumulated by the target application and written into the nonvolatile memory within the preset time period is larger than the first preset data amount, it may be indicated that the written data amount of the target application within the preset time period is too large, that is, it may be indicated that the target application may have an abnormality in the written data amount within a short time period. Since the target application writes too much data in the preset time period, which may be caused by the fact that the target application is abnormal, or may be caused by the fact that the user actually uses the target application too frequently, when the first data amount is larger than the first preset data amount, the mobile terminal may determine that the target application writes each second data amount of the nonvolatile memory in each history time period, so as to determine that the target application writes the data amount in a longer time period before the preset time period.
In practical application, the mobile terminal may count and store the second data amount written by the target application in each historical time period, so as to make a subsequent call. When the step is executed, the mobile terminal may select N history time periods closest to the current time from among the history time periods stored in the mobile terminal, and call N second data volumes corresponding to the N history time periods, where N is a positive integer greater than 1, and N may be set in advance. Certainly, in practical application, the mobile terminal may also set a reasonable expiration time for the second data amount corresponding to each historical time period, and the expired second data amount may be deleted, where a duration of the expiration time may be set in advance. Because the storage of each second data volume is provided with the expiration time, the mobile terminal can directly call each unexpired second data volume when the step is executed, so that the timeliness of the data can be ensured. The embodiment of the present invention does not specifically limit whether the expiration time is set for each second data amount.
In addition, when the first data volume written by the target application in the preset time period is larger than the first preset data volume, the file system can generate alarm information and report the alarm information to the background service program, and then the mobile terminal can display third prompt information indicating that the written data volume of the target application is abnormal in the preset time period, so that when the user checks the third prompt information, the user can know that the written data volume of the target application in a short time period is abnormal.
For example, the preset time period may be within 1 day before the current time, and the duration of each history time period is 1 day, the mobile terminal may determine that the first data amount written into the nonvolatile memory in the day before the target application is 18GB, which is greater than the first preset data amount by 16GB, and at this time, the mobile terminal may determine that the second data amounts written into the nonvolatile memory in 5 consecutive history time periods by the target application are 800MB (megabytes), 500MB, 900MB, 1GB, and 800MB, respectively.
Step 203, determining the average data amount of each second data amount in each historical time period.
In the embodiment of the present invention, the mobile terminal may determine an average data size of each second data size in each historical time period, that is, may determine an average distribution condition of the data size written by the target application into the nonvolatile memory in a longer time period before the current time.
For example, the mobile terminal may determine that the average data amount of 5 second data amounts of 800MB, 500MB, 900MB, 1GB, and 800MB over 5 history periods is 800 MB.
And step 204, when the first data volume is larger than the average data volume of the preset multiple, determining that the target application is abnormal in operation.
In the embodiment of the present invention, when the first data amount is greater than the average data amount of the preset multiple, it may be indicated that the data amount written into the nonvolatile memory by the target application in the preset time period far exceeds the previous average level, so that the mobile terminal may determine that the target application has an exception with an excessively large data amount both in a short time and in a long time, and thus determine that the target application has an adverse effect on the service life of the nonvolatile memory when running.
Since the amount of write data of the target application in a short time is large, possibly because the frequency of using the target application by the user in a short time is high or the time is long, it is necessary to further determine whether an abnormality has occurred in the amount of write data of the target application in a long time. When the write data volume of the target application is too large in both short time and long time, the mobile terminal can determine that the target application has adverse effect on the service life of the nonvolatile memory, so that the accuracy of determining the target application abnormality by the mobile terminal can be improved.
In addition, if the target application is used less frequently in a short time and the target application is used more frequently in a short time, the amount of data written by the target application in the short time may be larger than the average amount of data before, and therefore, it is necessary to perform abnormality determination in combination with the amount of data written by the target application in the short time and the long time, so that the accuracy of determining the abnormality of the target application by the mobile terminal can be improved.
For example, the preset multiple may be 15, and the mobile terminal may determine that the first data size 18GB is greater than 15 times 800MB, that is, 11.72GB, and at this time, the mobile terminal may determine that the target application is abnormal.
Step 205, displaying a first prompt message indicating that the target application is abnormal in operation.
In the embodiment of the present invention, after the mobile terminal determines that there is an abnormality in the operation of the target application, a first prompt message indicating that there is an abnormality in the operation of the target application may be displayed, for example, "the target application consumes a memory life abnormally |)! "etc., to pre-warn the user. Therefore, when the user checks the first prompt information, the user can know that the target application is abnormal in operation, so that measures such as unloading or replacing the target application version can be taken in time, the target application is prevented from continuously writing too much data into the nonvolatile memory, and data loss when the service life of the nonvolatile memory is exhausted can be avoided. Of course, in practical applications, the mobile terminal may also display an operation suggestion in the first prompt message, such as "the target application consumes memory life abnormally! Please go back to normal version or unload! "
In addition, after determining that the target application runs abnormally, the mobile terminal may further perform the following steps, including: for each application in the mobile terminal, sequencing each application according to the size sequence of the data volume written into the nonvolatile memory in a preset time period; displaying each abnormal application in the mobile terminal in a first preset mode according to the sequencing result; and displaying each application which is not abnormal in operation in the mobile terminal in a second preset mode according to the sequencing result.
The mobile terminal can sequence the applications according to the size sequence of the data volume written into the nonvolatile memory in the preset time period, and display the sequenced applications for a user to view. For each application with abnormal operation in the mobile terminal, the mobile terminal may display in a first preset manner, for example, the first preset manner may be a highlight display manner, a color font display manner, and the like. For each application which runs abnormally in the mobile terminal, the mobile terminal may display in a second preset manner, so as to distinguish from each application which runs abnormally, for example, the second preset manner may be a black font display manner, and the like. Of course, in practical applications, the mobile terminal may display the written data amount of each application in a preset time period while displaying the sequenced applications, so that a user can intuitively know the written data amount of each application.
It should be noted that the mobile terminal may sort the applications according to the written data amount in the preset time period, and of course, may also sort the applications according to the written data amount in different time periods such as every day, every week, every month, and the like, which is not specifically limited in this embodiment of the present invention.
It should be further noted that, after the mobile terminal determines that the target application is abnormal in operation and before the user does not process the target application, the mobile terminal may continue to write the data of the target application into the nonvolatile memory through the file system, so as to avoid affecting the normal use of the target application by the user.
For example, after the mobile terminal determines that the target application runs abnormally, a first prompt message "the target application abnormally consumes the memory life!indicating that the target application runs abnormally may be displayed! Please go back to normal version or unload! ".
In step 206, the historical write data amount of the non-volatile memory is determined.
In the embodiment of the present invention, the nonvolatile memory in the mobile terminal may be a Storage device such as an eMMC (embedded Multi-Media Card) or a UFS (Universal Flash Storage element). In practical application, both the eMMC and the UFS may feed back the accumulated historical write data volume to a background service program of the mobile terminal, so that the background service program may obtain the historical write data volume of the nonvolatile memory, that is, may determine the life consumption condition of the nonvolatile memory.
The historical write data volume comprises the data volume written into the nonvolatile memory by each application and the data volume of control data written into the nonvolatile memory by the nonvolatile memory in the process of writing the application data.
For example, the mobile terminal may determine that the amount of historical write data of the non-volatile memory is 28.8 TB.
And step 207, when the accumulated historical write data amount reaches a second preset data amount, determining that the service life of the nonvolatile memory reaches the consumption proportion corresponding to the second preset data amount.
In the embodiment of the invention, when the accumulated historical write data amount reaches the second preset data amount, the background service program of the mobile terminal can determine the consumed service life of the nonvolatile memory, and the consumed proportion corresponding to the second preset data amount is reached.
For example, the mobile terminal may determine that the historical write data amount 28.8TB is accumulated to reach the second preset data amount 28.8TB, and at this time, the mobile terminal may determine that the lifetime consumed by the nonvolatile memory reaches 90% of the consumption proportion corresponding to the second preset data amount 28.8 TB.
And step 208, displaying a second prompt message indicating that the life consumption of the nonvolatile memory reaches the consumption proportion.
In the embodiment of the present invention, since the remaining storage space of the nonvolatile memory is small when the accumulated historical write data amount reaches the second preset data amount, in order to avoid the data loss due to the crash of the nonvolatile memory when the lifetime of the nonvolatile memory is exhausted, the mobile terminal may display a second prompt message indicating that the lifetime consumption of the nonvolatile memory reaches the consumption ratio, for example, "please notice |)! The service life consumption of the memory reaches 90% ", so that when the user checks the second prompt message, the user can know that the service life of the nonvolatile memory is not much remained, and measures such as data backup or memory device replacement are taken in time, so that the data loss in the mobile terminal is avoided.
Further, after determining that the target application is abnormal in operation and displaying the first prompt message, the mobile terminal may further perform the following steps, including: the first data amount is cleared.
The mobile terminal can periodically reset the first data volume counted in the preset duration through the background service program every preset duration, so that the mobile terminal can count the write-in data volume of each application from zero in each time period of the preset duration, abnormal conditions of the application in a short time can not be reflected after the data is accumulated for a long time, and the accuracy of judging whether the application is abnormal or not can be improved.
For example, the mobile terminal may display a second prompt message "Please Note!indicating that the life consumption of the nonvolatile memory reaches a consumption rate! The memory life consumption has reached 90% ".
In the embodiment of the invention, the mobile terminal can determine the data volume written into the nonvolatile memory by the target application each time, determine each second data volume respectively written into each historical time period by the target application when the first data volume written into the preset time period by the target application is overlarge, and then determine that the target application is abnormal in operation when the first data volume is overlarge, so as to display the first prompt information to prompt a user. When the mobile terminal determines that the data volume written by the target application in the short period is too large, whether the data volume written by the target application in the long period is too large can be further judged, and when the data volume written by the target application in the short period and the long period is too large, it can be determined that the target application is abnormal in the aspect of consuming the service life of the nonvolatile memory, and then the mobile terminal can display first prompt information to early warn a user in advance, so that the user can timely process the target application, and data loss when the service life of the nonvolatile memory is exhausted can be avoided. In addition, the mobile terminal can also display second prompt information indicating the service life consumption condition of the nonvolatile memory according to the historical write data volume of the nonvolatile memory so as to remind a user to take corresponding measures in time, and therefore data loss caused by sudden service life exhaustion of the nonvolatile memory is avoided.
EXAMPLE III
Referring to fig. 3, a block diagram of an application monitoring apparatus 300 according to a third embodiment of the present invention is shown, which may specifically include:
a first determining module 301, configured to determine an amount of data that the target application writes to the non-volatile memory each time;
a second determining module 302, configured to determine, when a first data amount written into the nonvolatile memory by the target application in a preset time period is greater than a first preset data amount, each of second data amounts written into the nonvolatile memory by the target application in each of historical time periods, respectively; each historical time period is before the preset time period;
a third determining module 303, configured to determine an average data amount of the respective second data amounts in the respective historical time periods;
a fourth determining module 304, configured to determine that an exception exists in the operation of the target application when the first data amount is greater than the average data amount of a preset multiple;
a first display module 305, configured to display a first prompt message indicating that there is an exception in the operation of the target application.
Optionally, referring to fig. 4, the apparatus further includes:
a fifth determining module 306, configured to determine a historical write data amount of the nonvolatile memory;
a sixth determining module 307, configured to determine that the lifetime consumed by the nonvolatile memory reaches a consumption proportion corresponding to a second preset data amount when the historical write data amount reaches the second preset data amount in an accumulated manner;
a second display module 308, configured to display a second prompt message indicating that the life consumption of the non-volatile memory reaches the consumption ratio.
Optionally, referring to fig. 4, the apparatus further includes:
the sorting module 309 is configured to, for each application in the mobile terminal, sort the applications according to a size order of the data size written in the nonvolatile memory within the preset time period;
a third display module 310, configured to display, in a first preset manner, each application running in the mobile terminal that is abnormal according to the sorting result;
and a fourth display module 311, configured to display, in a second preset manner, each application that is not operated abnormally in the mobile terminal according to the sorting result.
Optionally, referring to fig. 4, the apparatus further includes:
a fifth displaying module 312, configured to display a third prompting message indicating that the written data amount of the target application is abnormal in the preset time period when the first data amount written by the target application in the preset time period is greater than the first preset data amount.
The application monitoring device provided in the embodiment of the present invention can implement each process implemented by the mobile terminal in the method embodiments of fig. 1 and fig. 2, and is not described here again to avoid repetition.
In the embodiment of the invention, the mobile terminal can determine the data volume written into the nonvolatile memory by the target application each time through the first determining module, when the first data volume written into the target application in the preset time period is larger than the first preset data volume, the second determining module determines each second data volume written into the target application in each historical time period respectively, and then when the first data volume is larger than the average value of the second data volumes of the preset multiple, the fourth determining module can determine that the target application is abnormal in operation, and further the first display module can display first prompt information indicating that the target application is abnormal. The mobile terminal can determine the data volume written by the target application in a short period, further judge whether the data volume written by the target application in a long period is too large when the data volume written by the target application in the short period is too large, and determine that the target application is abnormal in the aspect of consuming the service life of the nonvolatile memory when the data volume written by the target application in the short period and the long period is too large, so that the mobile terminal can display first prompt information to early warn a user in advance, the user can conveniently process the target application in time, and data loss when the service life of the nonvolatile memory is exhausted can be avoided.
Example four
Figure 5 is a schematic diagram of a hardware configuration of a mobile terminal implementing various embodiments of the present invention,
the mobile terminal 500 includes, but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and a power supply 511. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 5 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
Wherein, the processor 510 is configured to determine an amount of data that the target application writes to the non-volatile memory at a time; when a first data volume written into the nonvolatile memory by the target application in a preset time period is larger than a first preset data volume, determining each second data volume written into the nonvolatile memory by the target application in each historical time period; each historical time period is before the preset time period; determining an average data amount of the respective second data amounts in the respective historical time periods; when the first data volume is larger than the average data volume of a preset multiple, determining that the target application is abnormal in operation; and displaying first prompt information indicating that the running of the target application is abnormal.
In the embodiment of the invention, the mobile terminal can determine the data volume written into the nonvolatile memory by the target application each time, when the first data volume written by the target application in the preset time period is larger than the first preset data volume, determine each second data volume respectively written by the target application in each historical time period, and then when the first data volume is larger than the average value of the second data volumes of the preset multiple, determine that the target application is abnormal in operation, and further display first prompt information indicating that the target application is abnormal in operation. The mobile terminal can determine the data volume written by the target application in a short period, further judge whether the data volume written by the target application in a long period is too large when the data volume written by the target application in the short period is too large, and determine that the target application is abnormal in service life consumption when the data volume written by the target application in the short period and the long period is too large.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 501 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 510; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 501 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 501 can also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through the network module 502, such as helping the user send and receive e-mails, browse webpages, access streaming media, and the like.
The audio output unit 503 may convert audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output as sound. Also, the audio output unit 503 may also provide audio output related to a specific function performed by the mobile terminal 500 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, and the like.
The input unit 504 is used to receive an audio or video signal. The input Unit 504 may include a Graphics Processing Unit (GPU) 5041 and a microphone 5042, and the Graphics processor 5041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 506. The image frames processed by the graphic processor 5041 may be stored in the memory 509 (or other storage medium) or transmitted via the radio frequency unit 501 or the network module 502. The microphone 5042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 501 in case of the phone call mode.
The mobile terminal 500 also includes at least one sensor 505, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 5061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 5061 and/or a backlight when the mobile terminal 500 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 505 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 506 is used to display information input by the user or information provided to the user. The Display unit 506 may include a Display panel 5061, and the Display panel 5061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 507 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. Touch panel 5071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 5071 using a finger, stylus, or any suitable object or attachment). The touch panel 5071 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 510, and receives and executes commands sent by the processor 510. In addition, the touch panel 5071 may be implemented in various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 5071, the user input unit 507 may include other input devices 5072. In particular, other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 5071 may be overlaid on the display panel 5061, and when the touch panel 5071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 510 to determine the type of the touch event, and then the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Although in fig. 5, the touch panel 5071 and the display panel 5061 are two independent components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 5071 and the display panel 5061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 508 is an interface through which an external device is connected to the mobile terminal 500. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 508 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 500 or may be used to transmit data between the mobile terminal 500 and external devices.
The memory 509 may be used to store software programs as well as various data. The memory 509 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 509 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 processor 510 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 509 and calling data stored in the memory 509, thereby performing overall monitoring of the mobile terminal. Processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 510.
The mobile terminal 500 may further include a power supply 511 (e.g., a battery) for supplying power to various components, and preferably, the power supply 511 may be logically connected to the processor 510 via a power management system, so that functions of managing charging, discharging, and power consumption are performed via the power management system.
In addition, the mobile terminal 500 includes some functional modules that are not shown, and thus, are not described in detail herein.
Preferably, an embodiment of the present invention further provides a mobile terminal, which includes a processor 510, a memory 509, and a computer program that is stored in the memory 509 and can be run on the processor 510, and when the computer program is executed by the processor 510, the processes of the foregoing embodiment of the application monitoring method are implemented, and the same technical effect can be achieved, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the foregoing embodiment of the application monitoring method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. An application monitoring method applied to a mobile terminal comprising a nonvolatile memory, the method comprising:
determining the data amount written into the nonvolatile memory by the target application each time;
when a first data volume written into the nonvolatile memory by the target application in a preset time period is larger than a first preset data volume, determining each second data volume written into the nonvolatile memory by the target application in each historical time period; each historical time period is before the preset time period;
determining an average data amount of the respective second data amounts in a total time length added for the respective historical time periods;
when the first data volume is larger than the average data volume of a preset multiple, determining that the target application is abnormal in operation;
and displaying first prompt information indicating that the running of the target application is abnormal.
2. The method of claim 1, wherein after the step of displaying the first prompt indicating that the target application is running abnormally, the method further comprises:
determining a historical write data amount of the non-volatile memory;
when the accumulated historical write data amount reaches a second preset data amount, determining that the service life of the nonvolatile memory reaches a consumption proportion corresponding to the second preset data amount;
displaying a second prompt indicating that the life consumption of the nonvolatile memory reaches the consumption ratio.
3. The method according to claim 1, wherein after the step of determining that the target application runs abnormally when the first data amount is larger than the average data amount of the preset multiple, the method further comprises:
for each application in the mobile terminal, sequencing the applications according to the size sequence of the data volume written into the nonvolatile memory in the preset time period;
displaying each abnormal application in the mobile terminal in a first preset mode according to the sequencing result;
and displaying each application which runs in the mobile terminal and has no abnormity in a second preset mode according to the sequencing result.
4. The method of claim 1, wherein the step of determining the amount of data that the target application writes to the non-volatile memory each time is followed by:
and when the first data volume written by the target application in a preset time period is larger than the first preset data volume, displaying third prompt information indicating that the data volume written by the target application in the preset time period is abnormal.
5. An application monitoring apparatus, the apparatus comprising:
the first determining module is used for determining the data amount written into the nonvolatile memory by the target application each time;
a second determining module, configured to determine, when a first data amount written into the nonvolatile memory by the target application in a preset time period is greater than a first preset data amount, each second data amount written into the nonvolatile memory by the target application in each historical time period, respectively; each historical time period is before the preset time period;
a third determining module, configured to determine an average data amount of the second data amounts in a total added duration of the historical time periods;
the fourth determining module is used for determining that the target application runs abnormally when the first data volume is larger than the average data volume of preset multiples;
and the first display module is used for displaying first prompt information indicating that the target application is abnormal in operation.
6. The apparatus of claim 5, further comprising:
a fifth determining module, configured to determine a historical write data amount of the nonvolatile memory;
a sixth determining module, configured to determine that the lifetime consumed by the nonvolatile memory reaches a consumption proportion corresponding to a second preset data amount when the historical write data amount reaches the second preset data amount in an accumulated manner;
and the second display module is used for displaying second prompt information which indicates that the service life consumption of the nonvolatile memory reaches the consumption proportion.
7. The apparatus of claim 5, further comprising:
the sequencing module is used for sequencing each application in the mobile terminal according to the size sequence of the data volume written into the nonvolatile memory in the preset time period;
the third display module is used for displaying each abnormal application in the mobile terminal in a first preset mode according to the sequencing result;
and the fourth display module is used for displaying each application which runs in the mobile terminal and has no abnormity in a second preset mode according to the sequencing result.
8. The apparatus of claim 5, further comprising:
and the fifth display module is used for displaying third prompt information indicating that the written data volume of the target application is abnormal in the preset time period when the first data volume written by the target application in the preset time period is larger than the first preset data volume.
9. A mobile terminal, characterized in that it comprises a processor, a non-volatile memory and a computer program stored on the non-volatile memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the application monitoring method according to any one of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the application monitoring method according to any one of claims 1 to 4.
CN201810712431.9A 2018-06-29 2018-06-29 Application monitoring method and device and mobile terminal Active CN109144811B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810712431.9A CN109144811B (en) 2018-06-29 2018-06-29 Application monitoring method and device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810712431.9A CN109144811B (en) 2018-06-29 2018-06-29 Application monitoring method and device and mobile terminal

Publications (2)

Publication Number Publication Date
CN109144811A CN109144811A (en) 2019-01-04
CN109144811B true CN109144811B (en) 2021-12-31

Family

ID=64799594

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810712431.9A Active CN109144811B (en) 2018-06-29 2018-06-29 Application monitoring method and device and mobile terminal

Country Status (1)

Country Link
CN (1) CN109144811B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114449094B (en) * 2020-10-30 2023-04-11 华为技术有限公司 Control method, electronic device, chip and storage medium
CN112907913A (en) * 2021-02-09 2021-06-04 北京小米移动软件有限公司 Detection method, device and equipment of electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101740132A (en) * 2008-11-27 2010-06-16 成都市华为赛门铁克科技有限公司 Early warning method for life service of solid state disc, solid state disc and early warning system
CN103399713A (en) * 2013-08-02 2013-11-20 浙江大学 Data buffering method for balancing multistage memory property and solid-state disk service life
CN105159604A (en) * 2015-08-20 2015-12-16 浪潮(北京)电子信息产业有限公司 Disk data read-write method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8099543B2 (en) * 2009-02-03 2012-01-17 Micron Technology, Inc. Methods of operarting memory devices within a communication protocol standard timeout requirement

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101740132A (en) * 2008-11-27 2010-06-16 成都市华为赛门铁克科技有限公司 Early warning method for life service of solid state disc, solid state disc and early warning system
CN103399713A (en) * 2013-08-02 2013-11-20 浙江大学 Data buffering method for balancing multistage memory property and solid-state disk service life
CN105159604A (en) * 2015-08-20 2015-12-16 浪潮(北京)电子信息产业有限公司 Disk data read-write method and system

Also Published As

Publication number Publication date
CN109144811A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
CN109343759B (en) Screen-turning display control method and terminal
CN107580147B (en) Management method of notification message and mobile terminal
CN109857559B (en) Terminal control method and terminal
CN110196667B (en) Notification message processing method and terminal
CN108174044B (en) Alarm clock setting method and mobile terminal
CN107832689B (en) Fingerprint identification method and mobile terminal
CN111580690B (en) Touch pen mode switching method and device, touch pen and readable storage medium
CN108322601B (en) Reminding method and terminal
CN108270853B (en) Message processing method and mobile terminal
CN109144811B (en) Application monitoring method and device and mobile terminal
CN107832189B (en) Monitoring method of I/O system and mobile terminal
CN111443847B (en) Push message processing method and electronic equipment
CN110225136B (en) Offline caching method and mobile terminal
CN109947367B (en) File processing method and terminal
CN111049701A (en) Data traffic monitoring method and electronic equipment
CN108810284B (en) Mode switching method of camera and electronic equipment
CN108595352B (en) Protection method and device for mobile terminal
CN108228357B (en) Memory cleaning method and mobile terminal
CN108170310B (en) Touch screen control method and mobile terminal
CN108632469A (en) The position indicating method and mobile terminal of mobile terminal
CN109902232B (en) Display control method and terminal
CN109508425B (en) Setting item recommendation method and terminal equipment
CN111181218A (en) Charging prompting method, electronic device and medium
CN111444145A (en) Data cleaning method and electronic equipment
CN109660657B (en) Application program control method and device

Legal Events

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