[go: nahoru, domu]

CN109101363B - Exception recovery method and device based on Android system, intelligent equipment and storage medium - Google Patents

Exception recovery method and device based on Android system, intelligent equipment and storage medium Download PDF

Info

Publication number
CN109101363B
CN109101363B CN201710475936.3A CN201710475936A CN109101363B CN 109101363 B CN109101363 B CN 109101363B CN 201710475936 A CN201710475936 A CN 201710475936A CN 109101363 B CN109101363 B CN 109101363B
Authority
CN
China
Prior art keywords
cleaning
data
available space
application program
data partition
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
CN201710475936.3A
Other languages
Chinese (zh)
Other versions
CN109101363A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201710475936.3A priority Critical patent/CN109101363B/en
Priority to PCT/CN2018/092188 priority patent/WO2018233668A1/en
Publication of CN109101363A publication Critical patent/CN109101363A/en
Application granted granted Critical
Publication of CN109101363B publication Critical patent/CN109101363B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1417Boot up procedures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1433Saving, restoring, recovering or retrying at system level during software upgrading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1441Resetting or repowering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Stored Programmes (AREA)
  • Retry When Errors Occur (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses an anomaly recovery method and device based on an Android system, intelligent equipment and a storage medium, and belongs to the technical field of intelligent equipment. The method comprises the following steps: after the failure of writing the key data by the system or the application program is monitored, judging whether the available space of the data partition is smaller than a preset proportion value, if so, cleaning the file according to a preset strategy to enable the available space on the data partition to reach the preset proportion value; restarting the intelligent device. According to the embodiment of the invention, when failure caused by insufficient available space of writing of the key data in the system or the application program is detected, the file release space is cleaned according to the influence degree sequence of the deleted files on the user, so that the problem that the system is blocked or can not be started due to insufficient available space of the data partition of the Android system terminal is solved.

Description

Exception recovery method and device based on Android system, intelligent equipment and storage medium
Technical Field
The invention relates to the technical field of Android (Android system) terminals, in particular to an Android-based exception recovery method, device and equipment and a storage medium.
Background
In recent years, intelligent devices (such as set top boxes, mobile phones, tablet computers and the like) of an Android system gradually become the main stream of the intelligent device market. With the increase of third party application software and photos, more and more Data files are stored in the intelligent device, which can lead to filling of the Data partition. Since key Data is written into the Data partition when the system is started or upgraded, if the Data partition is insufficient in space, the system or an application program needs to write information or Data into the Data partition, the system is blocked or even becomes brick (the system cannot be started when entering a paralysis state). The problem cannot be solved by using a Recovery service to upgrade the system, and the problem often occurs under the condition that the Android system is not normally started, and the network cannot be connected at the moment, so that once the problem cannot be solved remotely, the user experience is seriously affected.
Disclosure of Invention
In view of the above, the invention aims to provide an abnormality recovery method, an abnormality recovery device, an intelligent device and a storage medium based on an Android system, so as to solve the technical problems of system blocking and brick change caused by insufficient available space of data partition of the intelligent device of the Android system.
The technical scheme adopted by the invention for solving the technical problems is as follows:
according to one aspect of the invention, the abnormality recovery method based on the Android system is applied to intelligent equipment, and the method comprises the following steps:
after the failure of writing the key data by the system or the application program is monitored, judging whether the available space of the data partition is smaller than a preset proportion value, if so, cleaning the file according to a preset strategy to enable the available space of the data partition to reach the preset proportion value;
the smart device is restarted.
Preferably, cleaning the file according to a preset policy until the available space on the data partition is greater than a preset proportion value further includes:
cleaning files according to the sequence of the built-in SD card, the application program redundant data, the application program data catalog, the application program installation catalog and the fault Recovery service depth cleaning, judging whether the available space of the data partition reaches a preset proportion value while cleaning, and ending cleaning files if the available space of the data partition reaches the preset proportion value.
Preferably, cleaning files according to the sequence of cleaning the built-in SD card, the application redundancy data, the application data directory, the application installation directory, and the Recovery service depth, and judging whether the available space of the data partition reaches a preset ratio value while cleaning, if yes, ending cleaning the files, further including:
deleting files under a preset path in the built-in SD card; judging whether the available space of the data partition reaches a preset proportion value, and if so, ending cleaning the file;
deleting the redundant data of the application program; judging whether the available space of the data partition reaches a preset proportion value, and if so, ending cleaning the file;
traversing the application program data catalog, and deleting files with the sizes larger than a first preset threshold value in the application program data catalog; judging whether the available space of the data partition reaches a preset proportion value or not every time a file is deleted, and if so, ending the file cleaning;
traversing the application program installation catalog, and deleting files with the sizes larger than a second preset threshold value in the application program installation catalog; judging whether the available space of the data partition reaches a preset proportion value or not every time a file is deleted, and if so, ending the file cleaning;
and calling a Recovery service to carry out deep cleaning.
Preferably, the first preset threshold comprises 50 megabits; the second preset threshold comprises 50 megabytes.
Preferably, the preset ratio value includes 5%.
According to another aspect of the present invention, an abnormality recovery device based on an Android system is provided, and is applied to an intelligent device, and the device includes:
the monitoring module is used for monitoring whether the system or the application program fails to write the key data;
the judging module is used for judging whether the available space of the data partition is smaller than a preset proportion value or not;
the cleaning module is used for cleaning the file according to a preset strategy so that the available space on the data partition reaches a preset proportion value;
and the restarting module is used for restarting the intelligent device.
Preferably, the cleaning module is specifically configured to:
cleaning files according to the sequence of cleaning the built-in SD card, the application program redundant data, the application program data catalog, the application program installation catalog and the Recovery service depth, judging whether the available space of the data partition reaches a preset proportion value while cleaning, and ending cleaning the files if the available space of the data partition reaches the preset proportion value.
According to still another aspect of the present invention, there is provided an intelligent device comprising: the method comprises the steps of a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein the computer program realizes the abnormal recovery method based on the Android system when being executed by the processor.
Preferably, the intelligent device comprises a mobile terminal or a fixed terminal based on an Android system.
According to still another aspect of the present invention, there is provided a storage medium having an abnormality recovery program stored thereon, the abnormality recovery program implementing the steps of the abnormality recovery method based on the Android system as described above when executed by a processor.
According to the Android-based exception recovery method, device, intelligent equipment and storage medium provided by the embodiment of the invention, when the failure caused by insufficient available space of the system or application program writing key data into the data partition is detected, the file release space is cleaned according to the influence degree sequence of the deleted files on the user, so that the problem that the system is blocked or can not be started due to insufficient available space of the data partition of the Android system terminal is solved.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention.
Fig. 2 is a flowchart of an anomaly recovery method in embodiment 1 of the present invention.
Fig. 3 is a flowchart of a file cleaning method according to embodiment 1 of the present invention.
Fig. 4 is a flowchart of an abnormal recovery method for system startup in embodiment 2 of the present invention.
Fig. 5 is a block diagram of an abnormality recovery device according to embodiment 3 of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects to be solved more clear and obvious, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In order to make the technical problems, technical schemes and beneficial effects to be solved more clear and obvious, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The smart device may be implemented in various forms. For example, the smart device described in the present invention may include a mobile terminal such as an Android system-based set-top box, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a navigation device, and the like; fixed terminals such as digital TV based on Android system, desktop computers, etc. may also be included. In the following, it is assumed that the smart device is a mobile terminal. However, it will be understood by those skilled in the art that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for a moving purpose.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention, the mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will appreciate that the mobile terminal structure shown in fig. 1 is not limiting and that a mobile terminal may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes the components of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be used for receiving and transmitting signals during the information receiving or communication process, specifically, after receiving downlink information of the base station, processing the downlink information by the processor 110; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 101 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 101 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, global System for Mobile communications), GPRS (General Packet Radio Service ), CDMA2000 (Code Division Multiple Access, CDMA 2000), WCDMA (Wideband Code Division Multiple Access ), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency Division Duplex Long term evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution, time Division Duplex Long term evolution), etc.
WiFi belongs to a short-distance wireless transmission technology, and a mobile terminal can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 102, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows a WiFi module 102, it is understood that it does not belong to the necessary constitution of a mobile terminal, and can be omitted entirely as required within a range that does not change the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the mobile terminal 100. The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive an audio or video signal. The a/V input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, the graphics processor 1041 processing image data of still pictures 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 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting the audio signal.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the mobile terminal 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; as for other sensors such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured in the mobile phone, the detailed description thereof will be omitted.
The display unit 106 is used to display information input by a user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the mobile terminal. In particular, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth 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 detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 110, and can receive and execute commands sent from the processor 110. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc., as specifically not limited herein.
Further, the touch panel 1071 may overlay the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, the touch panel 1071 is transferred to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 108 serves as an interface through which at least one external device can be connected with the mobile terminal 100. For example, the external devices may include a wired or wireless headset port, an external power (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 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 109 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 110 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 running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The processor 110 also performs the following steps:
after the failure of writing the key data by the system or the application program is monitored, judging whether the available space of the data partition is smaller than a preset proportion value, if so, cleaning the file according to a preset strategy to enable the available space of the data partition to reach the preset proportion value;
the smart device is restarted.
Preferably, cleaning the file according to a preset policy until the available space on the data partition is greater than a preset proportion value further includes:
cleaning files according to the sequence of the built-in SD card, the application program redundant data, the application program data catalog, the application program installation catalog and the fault Recovery service depth cleaning, judging whether the available space of the data partition reaches a preset proportion value while cleaning, and ending cleaning files if the available space of the data partition reaches the preset proportion value.
Preferably, cleaning files according to the sequence of cleaning the built-in SD card, the application redundancy data, the application data directory, the application installation directory, and the Recovery service depth, and judging whether the available space of the data partition reaches a preset ratio value while cleaning, if yes, ending cleaning the files, further including:
deleting files under a preset path in the built-in SD card; judging whether the available space of the data partition reaches a preset proportion value, and if so, ending cleaning the file;
deleting the redundant data of the application program; judging whether the available space of the data partition reaches a preset proportion value, and if so, ending cleaning the file;
traversing the application program data catalog, and deleting files with the sizes larger than a first preset threshold value in the application program data catalog; judging whether the available space of the data partition reaches a preset proportion value or not every time a file is deleted, and if so, ending the file cleaning;
traversing the application program installation catalog, and deleting files with the sizes larger than a second preset threshold value in the application program installation catalog; judging whether the available space of the data partition reaches a preset proportion value or not every time a file is deleted, and if so, ending the file cleaning;
and calling a Recovery service to carry out deep cleaning.
Preferably, the first preset threshold comprises 50 megabits; the second preset threshold comprises 50 megabytes.
Preferably, the preset ratio value includes 5%.
The mobile terminal 100 may further include a power source 111 (e.g., a battery) for supplying power to the respective components, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described herein.
Example 1
As shown in fig. 2, an embodiment of the present invention provides an anomaly recovery method based on an Android system, which is applied to an intelligent device, and the method includes:
s201, failure of writing of key data by a system or an application program is monitored.
S1202, judging whether the available space of the data partition is smaller than a preset proportion value, if yes, executing step S103, otherwise, executing step S104.
S203, cleaning the file according to a preset strategy until the available space on the data partition reaches a preset proportion value.
Preferably, cleaning the file according to a preset policy until the available space on the data partition is greater than a preset proportion value further includes:
cleaning files according to the sequence of cleaning the built-in SD card, the application program redundant data, the application program data catalog, the application program installation catalog and the Recovery service depth, judging whether the available space of the data partition reaches a preset proportion value while cleaning, and ending cleaning the files if the available space of the data partition reaches the preset proportion value.
As shown in fig. 3, step S103 further includes:
s2031, deleting a file under a preset path in the built-in SD card; and judging whether the available space of the data partition reaches a preset proportion value, and if so, ending cleaning the file.
S2032, deleting the redundant data of the application program; and judging whether the available space of the data partition reaches a preset proportion value, and if so, ending cleaning the file.
S2033, traversing the application program data catalog, and deleting files with the sizes larger than a first preset threshold value in the application program data catalog; and judging whether the available space of the data partition reaches a preset proportion value or not every time a file is deleted, and if so, ending the file cleaning.
S2034, traversing the application program installation catalog, and deleting files with the sizes larger than a second preset threshold value in the application program installation catalog; and judging whether the available space of the data partition reaches a preset proportion value or not every time a file is deleted, and if so, ending the file cleaning.
S2035, calling a Recovery service to carry out deep cleaning.
S204, restarting the intelligent device.
According to the Android-based exception recovery method provided by the embodiment of the invention, when failure caused by insufficient available space of a system or an application program writing key data into a data partition is detected, the file release space is cleaned according to the influence degree sequence of the deleted file on a user, so that the problem that the system is blocked or can not be started due to insufficient available space of the data partition of an Android system terminal is solved.
Example two
As shown in fig. 4, taking the start-up of the intelligent device as an example for explanation, in this embodiment, assuming that the preset ratio value is 5%, the method includes:
s401, starting the intelligent device.
S402, judging whether the writing of the key data of the system fails, if so, ending the flow, otherwise, executing step S403.
Specifically, it is first determined whether the key data can be written normally, if the key data fails to be written, S403 is performed, otherwise, it is indicated that the system is not abnormal due to the full writing of the data partition, and the flow is ended.
S403, judging whether the available space of the data partition is larger than 5%, if so, turning to step S414, otherwise, executing step S404.
S404, deleting the files under the preset path in the built-in SD card.
Specifically, when deleting the built-in SD card, the contents in the following paths are deleted in sequence:
/data/media/0
/mnt/media_rw/sdcard0
/mnt/shell/emulated
this is the case where all the content under these several paths is deleted.
S405, judging whether the available space of the data partition is larger than 5%, if so, turning to a step S414, otherwise, executing a step S406.
S406, eliminating the redundant data of the application program.
Specifically, deleting/data/data directory data corresponding to private directory of each application program.
S407, judging whether the available space of the data partition is larger than 5%, if so, turning to step S414, otherwise, executing step S408.
S408, traversing the application program data directory, and deleting files with the sizes larger than a first threshold.
Specifically, the large file (e.g., greater than 50M) is deleted by looping through/data directory. In order to make minimum modification to user data, the intelligent device is maintained to have complete functions, whether the available space of the data partition is larger than 5% or not is judged once each large file is deleted, and the intelligent device can be restarted once the available space is larger than 5%.
S409, judging whether the available space of the data partition is larger than 5%, if so, turning to step S414, otherwise, executing step S410.
S410, judging whether the application program data catalog is traversed, if yes, executing step S411, otherwise returning to step S408.
S411, traversing the application program installation directory, and deleting files with the sizes larger than a second preset threshold.
Specifically, if all large files (greater than 50M) are deleted, the available space size of the/data partition is still less than 5%, and the data/app directory is cleaned, which affects the application installed by the user, so that the user can delete the data.
S412, judging whether the available space of the data partition is larger than 5%, if so, turning to a step S414, otherwise, executing a step S413.
S413, calling the recovery service to carry out deep cleaning.
Specifically, if the/data/app directory is cleaned, the available space size of the/data partition is still less than 5%, only deep cleaning can be performed, the process will clean key files created in the key directory, such as key processes of the system, and restore factory settings of the intelligent device, and this operation will result in complete cleaning of user information, so the process is used as a final means.
S414, restarting the intelligent device.
The embodiment is only described by taking the starting-up of the intelligent device as an example, and the practical application scenarios include but are not limited to the following cases:
1) When the intelligent device performs system upgrade, if the/data partition is already occupied, related key data needs to be written into the/data partition when the system optimization is performed after the upgrade is finished, and system abnormality caused by insufficient space of the/data partition can be caused. At the moment, the system abnormality recovery method is triggered, and the system abnormality is repaired, so that the intelligent equipment can be started normally.
2) Because the application program in the intelligent device has the authority of writing data into the/data partition, if a certain application program continuously writes data into the/data partition, the/data partition is fully occupied. At this time, if the system is started or restarted, the key data needs to be written into the/data partition, which will cause system abnormality due to insufficient space of the/data partition. At the moment, the system abnormality recovery method is triggered, and the system abnormality is repaired, so that the intelligent equipment can be started normally.
3) If the application program in the intelligent device continuously writes data into the/data partition, the/data partition is occupied, and at the moment, if the system needs to dynamically write key data into the/data partition in the running process, system abnormality caused by insufficient space of the/data partition can be caused. At the moment, the system abnormality recovery method is triggered, and the system abnormality is repaired, so that the intelligent equipment can be started normally.
4) If an application program in the intelligent device writes data into an important position in the/data partition, so that the/data partition is full, at the moment, if dynamic writing of key data into the/data partition is required in the system operation, system abnormality caused by insufficient space of the/data partition can be caused, under the condition, not only the common space under the/data partition needs to be cleaned, but also the system space needs to be cleaned, a root authority file which cannot be operated by a system authority is deleted, at the moment, the system abnormality recovery method is triggered, and the system abnormality is repaired, so that the intelligent device can be started normally.
5) If the key process of the system in the intelligent device writes data into the/data partition and generates a large key file to cause the/data partition to be full, if the system is started or runs, the key data also needs to be written into the/data partition, system abnormality caused by insufficient space of the/data partition can be caused, and under the condition, common cleaning application does not have permission to clean the key file to cause the/data partition to be full.
Example III
According to another aspect of the present invention, an abnormality recovery device based on an Android system is provided, and is applied to an intelligent device, and the device includes:
a monitoring module 501, configured to monitor whether writing of the key data by the system or the application program fails;
a judging module 502, configured to judge whether an available space of the data partition is smaller than a preset ratio value;
a cleaning module 503, configured to clean the file according to a preset policy, so that an available space on the data partition reaches a preset proportion value;
a restart module 504, configured to restart the smart device.
Preferably, the cleaning module 503 is specifically configured to: cleaning files according to the sequence of cleaning the built-in SD card, the application program redundant data, the application program data catalog, the application program installation catalog and the Recovery service depth, judging whether the available space of the data partition reaches a preset proportion value while cleaning, and ending cleaning the files if the available space of the data partition reaches the preset proportion value.
It should be noted that the above device embodiments and method embodiments belong to the same concept, the specific implementation process of the device embodiments is detailed in the method embodiments, and technical features in the method embodiments are applicable correspondingly in the device embodiments, which are not repeated herein.
In addition, the invention also provides a storage medium, and an abnormality recovery program is stored on the storage medium, and when the abnormality recovery program is executed by a processor, the abnormality recovery method based on the Android system comprises the steps.
According to the Android-based exception recovery method, device, intelligent equipment and storage medium provided by the embodiment of the invention, when the failure caused by insufficient available space of the system or application program writing key data into the data partition is detected, the file release space is cleaned according to the influence degree sequence of the deleted files on the user, so that the problem that the system is blocked or can not be started due to insufficient available space of the data partition of the Android system terminal is solved.
The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, and thus do not limit the scope of the claims of the present invention. Any modifications, equivalent substitutions and improvements made by those skilled in the art without departing from the scope and spirit of the present invention shall fall within the scope of the appended claims.

Claims (8)

1. An anomaly recovery method based on an Android system is applied to intelligent equipment and is characterized by comprising the following steps:
after the failure of writing the key data by the system or the application program is monitored, judging whether the available space of the data partition is smaller than a preset proportion value, if so, cleaning the file according to a preset strategy to enable the available space of the data partition to reach the preset proportion value;
restarting the intelligent device;
the step of cleaning the file according to a preset strategy until the available space on the data partition is greater than a preset proportion value further comprises:
cleaning files according to the sequence of the built-in SD card, the application program redundant data, the application program data catalog, the application program installation catalog and the fault Recovery service depth cleaning, judging whether the available space of the data partition reaches a preset proportion value while cleaning, and ending cleaning files if the available space of the data partition reaches the preset proportion value.
2. The method for recovering from an abnormality according to claim 1, wherein the cleaning of the files is performed in the order of built-in SD card, application redundancy data, application data directory, application installation directory, recovery service depth cleaning, and the cleaning is performed while judging whether the available space of the data partition reaches a preset ratio value, and if so, the cleaning of the files is ended, further comprising:
deleting files under a preset path in the built-in SD card; judging whether the available space of the data partition reaches a preset proportion value, and if so, ending cleaning the file;
deleting the redundant data of the application program; judging whether the available space of the data partition reaches a preset proportion value, and if so, ending cleaning the file;
traversing an application program data directory, and deleting files with the sizes larger than a first preset threshold value in the application program data directory; judging whether the available space of the data partition reaches a preset proportion value or not every time a file is deleted, and if so, ending the file cleaning;
traversing an application program installation catalog, and deleting files with the sizes larger than a second preset threshold value in the application program installation catalog; judging whether the available space of the data partition reaches a preset proportion value or not every time a file is deleted, and if so, ending the file cleaning;
and calling a Recovery service to carry out deep cleaning.
3. The anomaly recovery method of claim 2, wherein the first preset threshold comprises 50 megabits; the second preset threshold comprises 50 megabits.
4. An anomaly recovery method according to any one of claims 1 to 3 wherein the predetermined ratio value comprises 5%.
5. An abnormal recovery device based on Android system is applied to intelligent device, and its characterized in that, the device includes:
the monitoring module is used for monitoring whether the system or the application program fails to write the key data;
the judging module is used for judging whether the available space of the data partition is smaller than a preset proportion value or not;
the cleaning module is used for cleaning the file according to a preset strategy so that the available space on the data partition reaches a preset proportion value;
a restarting module, configured to restart the intelligent device;
the cleaning module is specifically used for:
cleaning files according to the sequence of cleaning the built-in SD card, the application program redundant data, the application program data catalog, the application program installation catalog and the Recovery service depth, judging whether the available space of the data partition reaches a preset proportion value while cleaning, and ending cleaning the files if the available space of the data partition reaches the preset proportion value.
6. An intelligent device, the intelligent device comprising: memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the anomaly recovery method of any one of claims 1 to 4.
7. The smart device of claim 6, wherein the smart device comprises a mobile terminal or a fixed terminal based on an Android system.
8. A storage medium, wherein an abnormality recovery program is stored on the storage medium, and the abnormality recovery program, when executed by a processor, implements the steps of the Android system-based abnormality recovery method according to any one of claims 1 to 4.
CN201710475936.3A 2017-06-21 2017-06-21 Exception recovery method and device based on Android system, intelligent equipment and storage medium Active CN109101363B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710475936.3A CN109101363B (en) 2017-06-21 2017-06-21 Exception recovery method and device based on Android system, intelligent equipment and storage medium
PCT/CN2018/092188 WO2018233668A1 (en) 2017-06-21 2018-06-21 Android system-based abnormality recovery method and apparatus, smart device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710475936.3A CN109101363B (en) 2017-06-21 2017-06-21 Exception recovery method and device based on Android system, intelligent equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109101363A CN109101363A (en) 2018-12-28
CN109101363B true CN109101363B (en) 2023-09-22

Family

ID=64735502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710475936.3A Active CN109101363B (en) 2017-06-21 2017-06-21 Exception recovery method and device based on Android system, intelligent equipment and storage medium

Country Status (2)

Country Link
CN (1) CN109101363B (en)
WO (1) WO2018233668A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109857706A (en) * 2019-01-16 2019-06-07 深圳壹账通智能科技有限公司 Picture method for cleaning, device and the terminal device updated based on data
CN110049375A (en) * 2019-03-25 2019-07-23 深圳市天威视讯股份有限公司 For the application program installation method of Intelligent set top box, system and set-top box
CN110083476A (en) * 2019-04-23 2019-08-02 努比亚技术有限公司 Application control method, terminal and computer readable storage medium
CN110457136A (en) * 2019-08-09 2019-11-15 四川虹美智能科技有限公司 A kind of Android system clears up the method, apparatus and terminal device of file automatically
CN113741980B (en) * 2020-05-29 2024-07-12 青岛海信移动通信技术有限公司 Android system-based electronic equipment starting method, electronic equipment and storage medium
CN112182652B (en) * 2020-09-27 2021-10-08 广州朗国电子科技有限公司 Method and device for protecting data partition from being fully written, storage medium and terminal equipment
CN112333544A (en) * 2020-11-09 2021-02-05 四川长虹电器股份有限公司 Method for partitioned protection of Android smart television data
CN118132344B (en) * 2024-05-06 2024-07-02 四川天邑康和通信股份有限公司 IPTV set top box operation control method and device, set top box and medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101078999A (en) * 2006-05-26 2007-11-28 任永坚 Method and system for accomplishing data backup and recovery
CN101395602A (en) * 2005-12-29 2009-03-25 亚马逊科技公司 Method and apparatus for a distributed file storage and indexing service
CN102656565A (en) * 2009-10-26 2012-09-05 亚马逊技术股份有限公司 Failover and recovery for replicated data instances
CN103064675A (en) * 2012-12-24 2013-04-24 广东欧珀移动通信有限公司 Method and device for cleaning up redundant files in mobile terminal automatically
CN103761306A (en) * 2014-01-22 2014-04-30 深圳市欧珀通信软件有限公司 Smart terminal file cleaning method and device
CN105068844A (en) * 2015-08-26 2015-11-18 广东欧珀移动通信有限公司 Method and apparatus for solving problem of no startup of Android terminal
CN105589663A (en) * 2015-12-23 2016-05-18 努比亚技术有限公司 Mobile terminal and data processing method thereof
CN106383748A (en) * 2016-09-05 2017-02-08 Tcl集团股份有限公司 Cloud service-based storage space clearing method and system
CN106598563A (en) * 2016-10-19 2017-04-26 广东欧珀移动通信有限公司 Method and device for restarting intelligent terminal, and intelligent terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140236902A1 (en) * 2011-09-29 2014-08-21 Beijing Qihoo Technology Company Limited User Data Backup Method and Apparatus
CN103077122B (en) * 2013-01-14 2016-03-30 华为终端有限公司 The management method of mobile terminal internal storage space and mobile terminal
CN104657182B (en) * 2015-03-05 2018-08-07 北京畅游天下网络技术有限公司 System rubbish method for cleaning and device for mobile device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101395602A (en) * 2005-12-29 2009-03-25 亚马逊科技公司 Method and apparatus for a distributed file storage and indexing service
CN101078999A (en) * 2006-05-26 2007-11-28 任永坚 Method and system for accomplishing data backup and recovery
CN102656565A (en) * 2009-10-26 2012-09-05 亚马逊技术股份有限公司 Failover and recovery for replicated data instances
CN103064675A (en) * 2012-12-24 2013-04-24 广东欧珀移动通信有限公司 Method and device for cleaning up redundant files in mobile terminal automatically
CN103761306A (en) * 2014-01-22 2014-04-30 深圳市欧珀通信软件有限公司 Smart terminal file cleaning method and device
CN105068844A (en) * 2015-08-26 2015-11-18 广东欧珀移动通信有限公司 Method and apparatus for solving problem of no startup of Android terminal
CN105589663A (en) * 2015-12-23 2016-05-18 努比亚技术有限公司 Mobile terminal and data processing method thereof
CN106383748A (en) * 2016-09-05 2017-02-08 Tcl集团股份有限公司 Cloud service-based storage space clearing method and system
CN106598563A (en) * 2016-10-19 2017-04-26 广东欧珀移动通信有限公司 Method and device for restarting intelligent terminal, and intelligent terminal

Also Published As

Publication number Publication date
CN109101363A (en) 2018-12-28
WO2018233668A1 (en) 2018-12-27

Similar Documents

Publication Publication Date Title
CN109101363B (en) Exception recovery method and device based on Android system, intelligent equipment and storage medium
EP4047940A1 (en) Screencast control method and electronic device
CN109885257B (en) Disk file reading and writing method and device
CN107678876B (en) Screen freezing monitoring and solving method, mobile terminal and computer readable storage medium
CN108228222A (en) A kind of upgrade method of firmware data, mobile terminal and computer storage media
US20200150860A1 (en) Mobile terminal and control method therefor, and readable storage medium
CN108282834B (en) Method for accessing terminal to LTE network and terminal
CN111078523B (en) Log acquisition method and device, storage medium and electronic equipment
CN109766119B (en) Recovery partition upgrade method, terminal and computer readable storage medium
CN109144723B (en) Method and terminal for allocating storage space
CN111522575B (en) Application program upgrading method and electronic equipment
CN107766222B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN106302603A (en) The method and apparatus remotely deleting information
CN111158815B (en) Dynamic wallpaper blurring method, terminal and computer readable storage medium
CN111026674A (en) Data storage method and electronic equipment
US11418945B2 (en) Information processing method for RF device and mobile terminal
CN108089935B (en) Application program management method and mobile terminal
CN107341032B (en) Data loading method, mobile terminal and computer readable storage medium
CN107832191B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN107872367B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN107404569B (en) System control method, terminal and computer readable storage medium
KR102606110B1 (en) Interference handling method, terminal and network-side devices
CN111159738B (en) Authority configuration method, application login method and device
CN109992430B (en) Data transmission method, first terminal and second terminal
CN109947617B (en) Method, terminal and readable storage medium for monitoring display content of application interface

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