CN105320615B - Data storage method and data storage device - Google Patents

Data storage method and data storage device Download PDF

Info

Publication number
CN105320615B
CN105320615B CN201410370924.0A CN201410370924A CN105320615B CN 105320615 B CN105320615 B CN 105320615B CN 201410370924 A CN201410370924 A CN 201410370924A CN 105320615 B CN105320615 B CN 105320615B
Authority
CN
China
Prior art keywords
application program
terminal
abnormal
running state
target application
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
CN201410370924.0A
Other languages
Chinese (zh)
Other versions
CN105320615A (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.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen 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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201410370924.0A priority Critical patent/CN105320615B/en
Publication of CN105320615A publication Critical patent/CN105320615A/en
Application granted granted Critical
Publication of CN105320615B publication Critical patent/CN105320615B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention provides a data storage method and a data storage device, wherein the data storage method comprises the following steps: when the terminal enters an operation state determining mode, determining the operation state of each application program in target application programs in the terminal, wherein the target application programs are programs which are acquiring data; and when the running state of at least one application program in the target application programs is abnormal, storing the data which is collected by the at least one application program. By the technical scheme of the invention, the application abnormity can be monitored in real time, the running state of the application program is early warned, and the data collected by the application program is emergently stored when the application program is determined to be abnormal.

Description

Data storage method and data storage device
Technical Field
The invention relates to the technical field of terminals, in particular to a data storage method and a data storage device.
Background
When an existing mobile terminal, such as a smart phone device, is taking a picture, recording a video, or inputting information, if an application abnormal state, such as a crash, an error report, or a restart, is suddenly encountered, it is impossible to perform emergency storage on a collected graphic, an image, input text or multimedia information, and after an application program resumes normal operation, data is usually lost, which brings great inconvenience to a user.
For example: when a user takes a picture, if the camera program is suddenly locked, the system cannot save the data received by the camera program in an emergency, so that the data is lost after the camera program is restarted, and if the camera program is swung again to take a picture, the effect of the camera program is not necessarily good for the first time, thereby bringing great inconvenience to the user.
Therefore, how to monitor the application abnormality in real time and perform early warning on the running state of the application program so as to perform emergency storage on the data being acquired by the application program when the application program is determined to be abnormal becomes a problem to be solved urgently.
Disclosure of Invention
The invention is based on the above problems, and provides a new technical scheme, which can monitor the application abnormity in real time, and perform early warning on the running state of the application program, so as to perform emergency storage on the data being acquired by the application program when the application program is determined to be abnormal.
In view of the above, an aspect of the present invention provides a data storage method, including: when the terminal enters an operation state determining mode, determining the operation state of each application program in target application programs in the terminal, wherein the target application programs are programs which are acquiring data; and when the running state of at least one application program in the target application programs is abnormal, storing the data collected by the at least one application program.
In the technical scheme, the running state of the target application program is detected in real time, so that the running state of the application program can be early warned, the application program with abnormal running state is detected in time, and the data collected by the application program with abnormal running state is stored emergently, so that the data input by a user is prevented from being lost due to the abnormal application program, and the use experience of the user is improved.
In the foregoing technical solution, preferably, before the terminal enters the operation state confirmation mode, the method further includes: judging whether the target application program exists in the terminal or not, prompting a user whether to start the running state determining mode or not when the judgment result is yes, and starting the running state determining mode when a confirmation command of the user is received; or after the terminal enters the operation state determination mode and before the operation state of each application program in the target application programs in the terminal is determined, the method further comprises the following steps: and judging whether the target application program exists in the terminal or not, closing the running state determining mode when the judging result is negative, and starting to determine the running state of each application program in the target application program in the terminal when the judging result is positive.
In the technical scheme, when a target application program which is acquiring data exists in the terminal, the user is prompted whether to start the operation state determination mode, so that the user can start or not start the operation state determination mode according to personal requirements, for example, if the user considers that the data which is currently acquired by the target application program is not important or the residual power of the terminal is insufficient, the operation state determination mode can not be started; the run state determination mode may be enabled if the data currently being collected by the target application is deemed important. Therefore, the requirements of different users can be met, and meanwhile, the purpose of saving electric energy can be achieved when the user chooses not to start the device; meanwhile, since the user may mistakenly turn on the operation state determination mode, after the terminal enters the operation state determination mode, it is necessary to determine whether the target application program exists in the terminal, and if it is determined that the target application program does not exist in the terminal, it is indicated that the user mistakenly turns on the operation state determination mode, and at this time, the operation state determination mode is turned off, so that excessive electric energy waste can be prevented.
In the foregoing technical solution, preferably, determining the running state of each application program in the target application programs in the terminal specifically includes:
monitoring the running state of each application program in the target application program, matching the monitoring result with an abnormal state which is prestored in the terminal and corresponds to each application program, and determining that the running state of each application program is abnormal when the monitoring result is the same as the abnormal state corresponding to each application program; and/or
Receiving the running state information fed back by each application program in the target application program, matching the running state information with the abnormal state corresponding to each application program prestored in the terminal, and determining that the running state of each application program is abnormal when the running state information is the same as the abnormal state corresponding to each application program.
In the technical scheme, for some application programs which cannot feed back the running state information to the terminal so that the terminal can judge the running state, the terminal needs to actively monitor the running states of the application programs; for some application programs which can feed back running state information to the terminal so that the terminal can judge the running state, the terminal can also actively monitor the running states of the application programs, the monitoring result and the running state feedback information are comprehensively matched with the abnormal state of each application program prestored in the terminal, and the running states of the application programs can be judged more accurately according to the matching result, namely when the monitoring result and the running state feedback information are different from the abnormal state of each application program prestored in the terminal, the application program is indicated to run normally; otherwise, the application program is abnormal.
In the above technical solution, preferably, the method further includes: determining the running state of the terminal; and when the running state of the terminal is abnormal, storing the data which is collected by the target application program.
In the technical scheme, when the terminal is abnormal, no matter whether the target application program is abnormal or not, in order to prevent the data which is collected by the target application program from being lost and bring inconvenience to a user, the terminal stores the data which is collected by the target application program in an emergency manner.
In the above technical solution, preferably, the method further includes: when the running state of each application program in the running state of the target application program is normal, acquiring data collected by the target application program from a memory of the terminal every preset time, and storing the data collected by the target application program; and when the running state of at least one application program in the target application programs is abnormal, storing the data collected by the at least one application program, wherein the data specifically comprises the following steps: and when the running state of at least one application program in the target application program is abnormal, acquiring the data acquired by the at least one application program from the memory of the terminal, and storing the data acquired by the at least one application program.
In the technical scheme, if emergency storage is performed on the data being acquired by the target application program only when the target application program is abnormal, when the information amount of the data being acquired is too large, the data being acquired may not be stored by 100%, and a part of the data is still lost, so that the data acquired by the target application program is intermittently acquired from the memory of the terminal and is stored in the local disk of the terminal, so that the protection strength on the data being acquired can be increased, and the acquired data can be stored by 100%. Meanwhile, when the application program which is acquiring data is abnormal, the data stored in the memory can be lost, so that when the application program which is acquiring data is abnormal, the data acquired by the application program is acquired from the memory and the acquired data is stored in the local disk, so that the data stored in the memory can be prevented from being lost due to the abnormal application program, and the use experience of a user can be improved.
Another aspect of the present invention provides a data storage apparatus comprising: the terminal comprises a determining unit and a judging unit, wherein the determining unit is used for determining the running state of each application program in target application programs in the terminal when the terminal enters a running state determining mode, and the target application programs are programs which are acquiring data; and the storage unit is connected to the determining unit and stores the data collected by at least one application program when the running state of at least one application program in the target application programs is abnormal.
In the technical scheme, the running state of the target application program is detected in real time, so that the running state of the application program can be early warned, the application program with abnormal running state is detected in time, and the data collected by the application program with abnormal running state is stored emergently, so that the data input by a user is prevented from being lost due to the abnormal application program, and the use experience of the user is improved.
In the foregoing technical solution, preferably, before the terminal enters the operation state confirmation mode, the determining unit further includes: the terminal comprises a judging unit, a prompting unit and an operating state determining mode unit, wherein the judging unit is used for judging whether the target application program exists in the terminal or not, the prompting unit is used for prompting a user whether to start the operating state determining mode or not when the judging result is yes, and the operating state determining mode unit is used for starting the operating state determining mode when receiving a confirmation command of the user; or the judging unit is further configured to: when the terminal enters the operation state determination mode, determining whether the target application program exists in the terminal, and when the determination result is negative, the operation state determination mode unit is further configured to close the operation state determination mode, and the determination unit further includes: and the control unit controls the determining unit to determine the running state of each application program in the target application programs when the judgment result is yes.
In the technical scheme, when a target application program which is acquiring data exists in the terminal, the user is prompted whether to start the operation state determination mode, so that the user can start or not start the operation state determination mode according to personal requirements, for example, if the user considers that the data which is currently acquired by the target application program is not important or the residual power of the terminal is insufficient, the operation state determination mode can not be started; the run state determination mode may be enabled if the data currently being collected by the target application is deemed important. Therefore, the requirements of different users can be met, and meanwhile, the purpose of saving electric energy can be achieved when the user chooses not to start the device; meanwhile, since the user may mistakenly turn on the operation state determination mode, after the terminal enters the operation state determination mode, it is necessary to determine whether the target application program exists in the terminal, and if it is determined that the target application program does not exist in the terminal, it is indicated that the user mistakenly turns on the operation state determination mode, and at this time, the operation state determination mode is turned off, so that excessive electric energy waste can be prevented.
In the above technical solution, preferably, the determining unit further includes: a monitoring unit for monitoring the running state of each application program in the target application program, a matching unit for matching the monitoring result with the abnormal state corresponding to each application program prestored in the terminal, and the determining unit is further configured to: when the monitoring result is the same as the abnormal state corresponding to each application program, determining that the running state of each application program is abnormal; and/or the determining unit further comprises: a receiving unit, configured to receive the running state information fed back by each application program in the target application program, where the matching unit is further configured to: matching the running state information with an abnormal state corresponding to each application program prestored in the terminal, where the determining unit is further configured to: and when the running state information is the same as the abnormal state corresponding to each application program, determining that the running state of each application program is abnormal.
In the technical scheme, for some application programs which cannot feed back the running state information to the terminal so that the terminal can judge the running state, the terminal needs to actively monitor the running states of the application programs; for some application programs which can feed back running state information to the terminal so that the terminal can judge the running state, the terminal can also actively monitor the running states of the application programs, the monitoring result and the running state feedback information are comprehensively matched with the abnormal state of each application program prestored in the terminal, and the running states of the application programs can be judged more accurately according to the matching result, namely when the monitoring result and the running state feedback information are different from the abnormal state of each application program prestored in the terminal, the application program is indicated to run normally; otherwise, the application program is abnormal.
In the foregoing technical solution, preferably, the determining unit is further configured to: determining the running state of the terminal; the storage unit is further configured to: and when the running state of the terminal is abnormal, storing the data acquired by the target application program.
In the technical scheme, when the terminal is abnormal, no matter whether the target application program is abnormal or not, in order to prevent the data which is collected by the target application program from being lost and bring inconvenience to a user, the terminal stores the data which is collected by the target application program in an emergency manner.
In the above technical solution, preferably, the storage unit further includes: an acquisition unit: when the running state of each application program in the target application program is normal, acquiring data acquired by the target application program from a memory of the terminal every predetermined time, wherein the storage unit is further configured to: storing the data collected by the target application program; and the acquisition unit is further configured to: when the running state of at least one application program in the target application programs is abnormal, acquiring data acquired by the at least one application program from a memory of the terminal, wherein the storage unit is further configured to: storing data collected by the at least one application.
In the technical scheme, if emergency storage is performed on the data being acquired by the target application program only when the target application program is abnormal, when the information amount of the data being acquired is too large, the data being acquired may not be stored by 100%, and a part of the data is still lost, so that the data acquired by the target application program is intermittently acquired from the memory of the terminal and is stored in the local disk of the terminal, so that the protection strength on the data being acquired can be increased, and the acquired data can be stored by 100%. Meanwhile, when the application program which is acquiring data is abnormal, the data stored in the memory can be lost, so that when the application program which is acquiring data is abnormal, the data acquired by the application program is acquired from the memory and the acquired data is stored in the local disk, so that the data stored in the memory can be prevented from being lost due to the abnormal application program, and the use experience of a user can be improved.
By the technical scheme, the application abnormity can be monitored in real time, the running state of the application program is early warned, and the data collected by the application program is emergently stored when the application program is determined to be abnormal.
Drawings
FIG. 1 shows a flow diagram of a data storage method according to an embodiment of the invention;
FIG. 2 shows a schematic flow diagram of a data storage method according to another embodiment of the invention;
FIG. 3 shows a flow diagram of a data storage method according to yet another embodiment of the invention;
FIG. 4 shows a flow diagram of a data storage method according to yet another embodiment of the invention;
FIG. 5 shows a schematic structural diagram of a data storage device according to an embodiment of the invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
FIG. 1 shows a flow diagram of a data storage method according to an embodiment of the invention.
As shown in fig. 1, a data storage method according to an embodiment of the present invention includes:
step 102, when the terminal enters an operation state determination mode, determining an operation state of each application program in target application programs in the terminal, wherein the target application programs are programs which are acquiring data; and 104, when the running state of at least one application program in the target application programs is abnormal, storing the data collected by the at least one application program.
In the technical scheme, the running state of the target application program is detected in real time, so that the running state of the application program can be early warned, the application program with abnormal running state is detected in time, and the data collected by the application program with abnormal running state is stored emergently, so that the data input by a user is prevented from being lost due to the abnormal application program, and the use experience of the user is improved.
In the foregoing technical solution, preferably, before the terminal enters the operation state confirmation mode, the method further includes: judging whether the target application program exists in the terminal or not, prompting a user whether to start the running state determining mode or not when the judgment result is yes, and starting the running state determining mode when a confirmation command of the user is received; or after the terminal enters the operation state determination mode and before the operation state of each application program in the target application programs in the terminal is determined, the method further comprises the following steps: and judging whether the target application program exists in the terminal or not, closing the running state determining mode when the judging result is negative, and starting to determine the running state of each application program in the target application program in the terminal when the judging result is positive.
In the technical scheme, when a target application program which is acquiring data exists in the terminal, the user is prompted whether to start the operation state determination mode, so that the user can start or not start the operation state determination mode according to personal requirements, for example, if the user considers that the data which is currently acquired by the target application program is not important or the residual power of the terminal is insufficient, the operation state determination mode can not be started; the run state determination mode may be enabled if the data currently being collected by the target application is deemed important. Therefore, the requirements of different users can be met, and meanwhile, the purpose of saving electric energy can be achieved when the user chooses not to start the device; meanwhile, since the user may mistakenly turn on the operation state determination mode, after the terminal enters the operation state determination mode, it is necessary to determine whether the target application program exists in the terminal, and if it is determined that the target application program does not exist in the terminal, it is indicated that the user mistakenly turns on the operation state determination mode, and at this time, the operation state determination mode is turned off, so that excessive electric energy waste can be prevented.
In the foregoing technical solution, preferably, determining the running state of each application program in the target application programs in the terminal specifically includes:
monitoring the running state of each application program in the target application program, matching the monitoring result with an abnormal state which is prestored in the terminal and corresponds to each application program, and determining that the running state of each application program is abnormal when the monitoring result is the same as the abnormal state corresponding to each application program; and/or
Receiving the running state information fed back by each application program in the target application program, matching the running state information with the abnormal state corresponding to each application program prestored in the terminal, and determining that the running state of each application program is abnormal when the running state information is the same as the abnormal state corresponding to each application program.
In the technical scheme, for some application programs which cannot feed back the running state information to the terminal so that the terminal can judge the running state, the terminal needs to actively monitor the running states of the application programs; for some application programs which can feed back running state information to the terminal so that the terminal can judge the running state, the terminal can also actively monitor the running states of the application programs, the monitoring result and the running state feedback information are comprehensively matched with the abnormal state of each application program prestored in the terminal, and the running states of the application programs can be judged more accurately according to the matching result, namely when the monitoring result and the running state feedback information are different from the abnormal state of each application program prestored in the terminal, the application program is indicated to run normally; otherwise, the application program is abnormal.
In the above technical solution, preferably, the method further includes: determining the running state of the terminal; and when the running state of the terminal is abnormal, storing the data which is collected by the target application program.
In the technical scheme, when the terminal is abnormal, no matter whether the target application program is abnormal or not, in order to prevent the data which is collected by the target application program from being lost and bring inconvenience to a user, the terminal stores the data which is collected by the target application program in an emergency manner.
In the above technical solution, preferably, the method further includes: when the running state of each application program in the running state of the target application program is normal, acquiring data collected by the target application program from a memory of the terminal every preset time, and storing the data collected by the target application program; and when the running state of at least one application program in the target application programs is abnormal, storing the data collected by the at least one application program, wherein the data specifically comprises the following steps: and when the running state of at least one application program in the target application program is abnormal, acquiring the data acquired by the at least one application program from the memory of the terminal, and storing the data acquired by the at least one application program.
In the technical scheme, if emergency storage is performed on the data being acquired by the target application program only when the target application program is abnormal, when the information amount of the data being acquired is too large, the data being acquired may not be stored by 100%, and a part of the data is still lost, so that the data acquired by the target application program is intermittently acquired from the memory of the terminal and is stored in the local disk of the terminal, so that the protection strength on the data being acquired can be increased, and the acquired data can be stored by 100%. Meanwhile, when the application program which is acquiring data is abnormal, the data stored in the memory can be lost, so that when the application program which is acquiring data is abnormal, the data acquired by the application program is acquired from the memory and the acquired data is stored in the local disk, so that the data stored in the memory can be prevented from being lost due to the abnormal application program, and the use experience of a user can be improved.
Fig. 2 shows a flow diagram of a data storage method according to another embodiment of the invention.
As shown in fig. 2, a data storage method according to another embodiment of the present invention includes:
step 202, judging whether the target application program in the information acquisition state exists currently, and if so, executing step 204.
Step 204, prompting the user whether to start the memory information protection mode, i.e. the operation state confirmation mode, and if so, executing step 206 and step 208; otherwise, step 202 is executed.
Step 206, actively monitoring the abnormal state of the application, and determining whether the application currently inputting information into the memory is abnormal, if so, determining whether deadlock, timeout, deadlock, or the like occurs.
And step 208, passively monitoring the abnormal state of the application, and judging whether the application currently inputting information into the memory throws abnormal information, such as Exception, fail, or major error.
Step 210, determining whether the application is abnormal, if the determination result is yes (for example, the application currently inputting information into the memory has an abnormality such as deadlock, timeout or deadlock, or the terminal receives abnormal information such as Exception, fail, and failure thrown by the application currently inputting information into the memory), executing step 212, otherwise, re-executing steps 206 and 208.
Step 212, store the information that the current application is inputting into the memory.
FIG. 3 shows a flow diagram of a data storage method according to yet another embodiment of the invention.
As shown in fig. 3, a data storage method according to still another embodiment of the present invention includes:
step 302, when the memory information protection mode is started, judging whether an application program in an information acquisition state exists at present, if so, executing step 304 and step 306; otherwise, step 308 is executed.
Step 308, closing the memory information protection mode.
Step 304, actively monitoring the abnormal state of the application, and determining whether the application currently inputting information into the memory is abnormal, such as whether deadlock, timeout or deadlock occurs.
And step 306, passively monitoring the abnormal state of the application, and judging whether the application which inputs information into the memory currently throws the abnormal information or not, wherein if the application throws the abnormal information such as Exception, fail or total, etc.
Step 310, determining whether the application which is inputting information is abnormal, if the determination result is yes (for example, the application which is currently inputting information into the memory has an abnormality such as deadlock, timeout or deadlock, or the terminal receives abnormal information such as Exception, fail or failure thrown by the application which is currently inputting information into the memory), executing step 312, otherwise, executing steps 304 and 306 again.
And step 312, storing the information which is being received by the application with abnormal running state in an emergency.
Fig. 4 shows a flow diagram of a data storage method according to a further embodiment of the invention.
As shown in fig. 4, a data storage method according to still another embodiment of the present invention includes:
step 402, judging whether the terminal is abnormal or not, and if so, executing step 408; otherwise, step 404 is performed.
Step 404, judging whether the application program which is collecting data is abnormal, and if so, executing step 406; otherwise, the data being collected by the application is stored intermittently and execution continues at step 404.
And step 406, storing the data which is being collected by the target application program with abnormal running state in an emergency.
At step 408, all data being collected by the target application is stored urgently.
FIG. 5 shows a schematic structural diagram of a data storage device according to an embodiment of the invention.
As shown in fig. 5, a data storage device 500 according to an embodiment of the present invention includes:
a determining unit 502, configured to determine an operating state of each application program in target application programs in the terminal when the terminal enters an operating state determining mode, where the target application programs are programs that are acquiring data; a storage unit 504, connected to the determining unit 502, for storing the data being collected by at least one application program when the running status of the at least one application program in the target application program is abnormal.
In the technical scheme, the running state of the target application program is detected in real time, so that the running state of the application program can be early warned, the application program with abnormal running state is detected in time, and the data collected by the application program with abnormal running state is stored emergently, so that the data input by a user is prevented from being lost due to the abnormal application program, and the use experience of the user is improved.
In the foregoing technical solution, preferably, before the terminal enters the operation state confirmation mode, the determining unit 502 further includes: a judging unit 5022 for judging whether the target application program exists in the terminal, a prompting unit 5024 for prompting the user whether to start the operation state determining mode if the judging result is yes, and a operation state determining mode unit 5026 for starting the operation state determining mode if the confirming command of the user is received; or the judging unit 5022 is further configured to: when the terminal enters the operation state determination mode, determining whether the target application program exists in the terminal, and when the determination result is negative, the operation state determination mode unit 5026 is further configured to close the operation state determination mode, and the determination unit 502 further includes: the control unit 5028, when the determination result is yes, controls the determining unit 502 to determine the running state of each application program in the target application program.
In the technical scheme, when a target application program which is acquiring data exists in the terminal, the user is prompted whether to start the operation state determination mode, so that the user can start or not start the operation state determination mode according to personal requirements, for example, if the user considers that the data which is currently acquired by the target application program is not important or the residual power of the terminal is insufficient, the operation state determination mode can not be started; the run state determination mode may be enabled if the data currently being collected by the target application is deemed important. Therefore, the requirements of different users can be met, and meanwhile, the purpose of saving electric energy can be achieved when the user chooses not to start the device; meanwhile, since the user may mistakenly turn on the operation state determination mode, after the terminal enters the operation state determination mode, it is necessary to determine whether the target application program exists in the terminal, and if it is determined that the target application program does not exist in the terminal, it is indicated that the user mistakenly turns on the operation state determination mode, and at this time, the operation state determination mode is turned off, so that excessive electric energy waste can be prevented.
In the above technical solution, preferably, the determining unit 502 further includes: a monitoring unit 50210, configured to monitor an operation state of each application program in the target application program, a matching unit 50212, configured to match a monitoring result with an abnormal state corresponding to each application program and pre-stored in the terminal, and the determining unit 502 is further configured to: when the monitoring result is the same as the abnormal state corresponding to each application program, determining that the running state of each application program is abnormal; and/or the determining unit 502 further comprises: a receiving unit 50214, configured to receive the running state information fed back by each application in the target application, where the matching unit 50212 is further configured to: matching the running state information with an abnormal state corresponding to each application program pre-stored in the terminal, where the determining unit 502 is further configured to: and when the running state information is the same as the abnormal state corresponding to each application program, determining that the running state of each application program is abnormal.
In the technical scheme, for some application programs which cannot feed back the running state information to the terminal so that the terminal can judge the running state, the terminal needs to actively monitor the running states of the application programs; for some application programs which can feed back running state information to the terminal so that the terminal can judge the running state, the terminal can also actively monitor the running states of the application programs, the monitoring result and the running state feedback information are comprehensively matched with the abnormal state of each application program prestored in the terminal, and the running states of the application programs can be judged more accurately according to the matching result, namely when the monitoring result and the running state feedback information are different from the abnormal state of each application program prestored in the terminal, the application program is indicated to run normally; otherwise, the application program is abnormal.
In the above technical solution, preferably, the determining unit 502 is further configured to: determining the running state of the terminal; the storage unit 504 is further configured to: and when the running state of the terminal is abnormal, storing the data acquired by the target application program.
In the technical scheme, when the terminal is abnormal, no matter whether the target application program is abnormal or not, in order to prevent the data which is collected by the target application program from being lost and bring inconvenience to a user, the terminal stores the data which is collected by the target application program in an emergency manner.
In the above technical solution, preferably, the storage unit 504 further includes: acquisition unit 5042: when the running state of each application program in the target application program is normal, acquiring data collected by the target application program from a memory of the terminal every predetermined time, where the storage unit 504 is further configured to: storing the data collected by the target application program; and the obtaining unit 5042 is further configured to: when the running state of at least one application program in the target application programs is abnormal, acquiring data collected by the at least one application program from a memory of the terminal, where the storage unit 504 is further configured to: storing data collected by the at least one application.
In the technical scheme, if emergency storage is performed on the data being acquired by the target application program only when the target application program is abnormal, when the information amount of the data being acquired is too large, the data being acquired may not be stored by 100%, and a part of the data is still lost, so that the data acquired by the target application program is intermittently acquired from the memory of the terminal and is stored in the local disk of the terminal, so that the protection strength on the data being acquired can be increased, and the acquired data can be stored by 100%. Meanwhile, when the application program which is acquiring data is abnormal, the data stored in the memory can be lost, so that when the application program which is acquiring data is abnormal, the data acquired by the application program is acquired from the memory and the acquired data is stored in the local disk, so that the data stored in the memory can be prevented from being lost due to the abnormal application program, and the use experience of a user can be improved.
The technical scheme of the invention is described in detail in the above with reference to the accompanying drawings, and by the technical scheme of the invention, the application abnormity can be monitored in real time, the running state of the application program can be early warned, and the data which is being acquired by the application program can be emergently stored when the application program is determined to be abnormal.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A data storage method is used for a terminal, and is characterized by comprising the following steps:
judging whether a target application program exists in the terminal, prompting a user whether to start an operation state determining mode if the judgment result is yes, and starting the operation state determining mode when receiving a confirmation command of the user;
when the terminal enters an operation state determining mode, determining the operation state of each application program in the target application programs in the terminal, wherein the target application programs are programs which are acquiring data;
and when the running state of at least one application program in the target application programs is abnormal, storing the data collected by the at least one application program.
2. The data storage method according to claim 1, wherein determining the running state of each application program in the target application programs in the terminal specifically comprises:
monitoring the running state of each application program in the target application program, matching the monitoring result with the abnormal state corresponding to each application program prestored in the terminal, and determining that the running state of the application program is abnormal when the monitoring result is the same as the abnormal state corresponding to each application program; or
Receiving the running state information fed back by each application program in the target application program, matching the running state information with the abnormal state corresponding to each application program prestored in the terminal, and determining that the running state of the application program is abnormal when the running state information is the same as the abnormal state corresponding to each application program.
3. The data storage method of claim 1, further comprising:
determining the running state of the terminal;
and when the running state of the terminal is abnormal, storing the data acquired by the target application program.
4. The data storage method of any of claims 1 to 3, further comprising:
when the running state of each application program in the running state of the target application program is normal, acquiring data collected by the target application program from a memory of the terminal every preset time, and storing the data collected by the target application program; and
when the running state of at least one application program in the target application programs is abnormal, storing data collected by the at least one application program, specifically comprising:
and when the running state of at least one application program in the target application program is abnormal, acquiring the data acquired by the at least one application program from the memory of the terminal, and storing the data acquired by the at least one application program.
5. A data storage device for a terminal, comprising:
a judging unit that judges whether a target application exists in the terminal,
a prompting unit for prompting the user whether to start the operation state determination mode when the judgment result is yes, an
The operation state determining mode unit is used for starting the operation state determining mode when receiving a confirmation command of the user;
the judging unit is further configured to: when the terminal enters an operation state determination mode, determining the operation state of each application program in the target application programs in the terminal;
wherein the target application program is a program which is acquiring data;
and the storage unit is connected to the determining unit and stores the data collected by at least one application program when the running state of at least one application program in the target application programs is abnormal.
6. The data storage device of claim 5, wherein the determining unit further comprises:
the monitoring unit is used for monitoring the running state of each application program in the target application program;
a matching unit for matching the monitoring result with the abnormal state corresponding to each application program pre-stored in the terminal, and
the determination unit is further configured to: when the monitoring result is the same as the abnormal state corresponding to each application program, determining that the running state of the application program is abnormal; or
The determination unit further includes:
a receiving unit for receiving the operation state information fed back by each application program in the target application program,
the matching unit is further configured to: matching the running state information with an abnormal state corresponding to each application program prestored in the terminal,
the determination unit is further configured to: and when the running state information is the same as the abnormal state corresponding to each application program, determining that the running state of the application program is abnormal.
7. The data storage device of claim 5,
the determination unit is further configured to: determining the running state of the terminal;
the storage unit is further configured to: and when the running state of the terminal is abnormal, storing the data acquired by the target application program.
8. The data storage device of any of claims 5 to 7, wherein the storage unit further comprises:
an acquisition unit: when the running state of each application program in the target application program is normal, acquiring data acquired by the target application program from a memory of the terminal every predetermined time, wherein the storage unit is further configured to: storing the data collected by the target application program; and
the acquisition unit is further configured to: when the running state of at least one application program in the target application programs is abnormal, acquiring data collected by the at least one application program from a memory of the terminal,
the storage unit is further configured to: storing data collected by the at least one application.
CN201410370924.0A 2014-07-30 2014-07-30 Data storage method and data storage device Active CN105320615B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410370924.0A CN105320615B (en) 2014-07-30 2014-07-30 Data storage method and data storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410370924.0A CN105320615B (en) 2014-07-30 2014-07-30 Data storage method and data storage device

Publications (2)

Publication Number Publication Date
CN105320615A CN105320615A (en) 2016-02-10
CN105320615B true CN105320615B (en) 2020-02-21

Family

ID=55248026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410370924.0A Active CN105320615B (en) 2014-07-30 2014-07-30 Data storage method and data storage device

Country Status (1)

Country Link
CN (1) CN105320615B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776199A (en) * 2016-11-11 2017-05-31 乐视控股(北京)有限公司 A kind of method and apparatus of data processing
CN108845916B (en) * 2018-07-03 2022-02-22 中国联合网络通信集团有限公司 Platform monitoring and alarming method, device, equipment and computer readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725187A (en) * 2005-04-30 2006-01-25 珠海金山软件股份有限公司 Method and device for storing user data on computer when software crashing
CN102946468A (en) * 2012-10-18 2013-02-27 广东欧珀移动通信有限公司 Automatic mobile phone operating program abnormality alarming method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050149809A1 (en) * 2003-12-10 2005-07-07 International Business Machines Corporation Real time determination of application problems, using a lightweight diagnostic tracer

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725187A (en) * 2005-04-30 2006-01-25 珠海金山软件股份有限公司 Method and device for storing user data on computer when software crashing
CN102946468A (en) * 2012-10-18 2013-02-27 广东欧珀移动通信有限公司 Automatic mobile phone operating program abnormality alarming method and system

Also Published As

Publication number Publication date
CN105320615A (en) 2016-02-10

Similar Documents

Publication Publication Date Title
US9507555B2 (en) System for the network monitoring of 3D printing and method thereof
CN104951377A (en) Exception handling method and device for smart home terminal
CN105320615B (en) Data storage method and data storage device
JP2017167997A (en) Machine tool
JP2017105455A (en) Automobile risk base control
CN105262610A (en) Network repairing method, device and terminal
WO2012000328A1 (en) Multimedia terminal device and maintenance method thereof
CN110739025B (en) Power failure test method, device and system for storage equipment
CN106293845A (en) A kind of terminal enters control method and the device of brush machine pattern
CN112134946B (en) Elevator Internet of things testing method, device, storage medium, terminal and system
KR20150129517A (en) Electronic Device with memory data backup function
CN103257867B (en) Control method, electronic equipment and electronic installation
CN106130815B (en) Board level testing method and device
US20160223574A1 (en) Automated fluid handling system
JP2010204916A (en) Test system and test method
CN111475339A (en) BIOS firmware updating method, device, equipment and storage medium
US9483105B2 (en) Communication system and electronic control unit
US20140351620A1 (en) Power supply detecting system and detecting method
CN105681064A (en) Information processing method and apparatus
CN106326021A (en) A method capable of processing exceptional work states of the Android system of electronic apparatuses and an electronic apparatus capable of processing exceptional work states of the Android system
CN110647419A (en) Fault detection method and device, computer storage medium and terminal
KR101545317B1 (en) Apparatus and Method of Controlling the Power of Tablet used for Transmitting Vehicle Driving Information
JP7220071B2 (en) Control device and control method
CN107168855A (en) The monitoring method and device of a kind of file copy
CN112616012B (en) Control method of monitoring equipment and monitoring equipment

Legal Events

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