CN106503100A - The apparatus and method for deleting data - Google Patents

The apparatus and method for deleting data Download PDF

Info

Publication number
CN106503100A
CN106503100A CN201610899999.7A CN201610899999A CN106503100A CN 106503100 A CN106503100 A CN 106503100A CN 201610899999 A CN201610899999 A CN 201610899999A CN 106503100 A CN106503100 A CN 106503100A
Authority
CN
China
Prior art keywords
file
deletion
size
storage space
idle storage
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.)
Withdrawn
Application number
CN201610899999.7A
Other languages
Chinese (zh)
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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201610899999.7A priority Critical patent/CN106503100A/en
Publication of CN106503100A publication Critical patent/CN106503100A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/122File system administration, e.g. details of archiving or snapshots using management policies
    • G06F16/125File system administration, e.g. details of archiving or snapshots using management policies characterised by the use of retention policies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A kind of apparatus and method for deleting data, methods described include:Detect deletion action;Attribute modification by the file of corresponding for deletion action deletion is hiding, and the size of the file of the deletion is added to the idle storage space of display.By the scheme of the embodiment of the present invention, when deletion action is detected, the attribute of the file that deletes and the idle storage space for showing only is changed, without complete deletion file, it is achieved thereby that preventing maloperation from deleting the effect of data.

Description

The apparatus and method for deleting data
Technical field
Present document relates to but be not limited to terminal technology, espespecially a kind of apparatus and method for deleting data.
Background technology
The memory space of mobile terminal is increasing, is requisite a kind of life instrument in people's daily life.With In the life of family, various data are all a certain degree of preserves in the terminal, but when user misoperation is by data deletion, or During by going back on one's word after data deletion, currently having no effective means and recovering to have deleted data.
Content of the invention
The embodiment of the present invention proposes a kind of apparatus and method for deleting data, is prevented from maloperation and deletes data Remove.
The embodiment of the present invention proposes a kind of device for deleting data, including:
First detection module, for detecting deletion action;
First modified module, for by the attribute modification of the file of corresponding for deletion action deletion be hiding, and will The size of the file of the deletion is added to the idle storage space of display;
Memory module, for preserving the corresponding relation between the file and original directory of the deletion;
First mobile module, for moving to the file of the deletion under predetermined directory.
Optionally, described device also includes:
Compression module, for the size of the idle storage space after the file of deletion described in pre- measured compressed;
Judge to compress the size of the idle storage space after the file of the deletion less than preset value, and the deletion File is text;Or, judge that the size for compressing the idle storage space after the file of the deletion is more than or equal to Preset value, the file of the deletion is compressed;
First mobile module specifically for:The file of the deletion after by compression is moved under predetermined directory.
Optionally, the compression module is additionally operable to:
The size of the idle storage space after file for judging to compress the deletion is less than preset value, and the deletion File when being not text, notify first mobile module to move to the file of the deletion under predetermined directory;
First mobile module is additionally operable to:
After the file of the deletion is moved under predetermined directory, the text of deletion described in complete deletion after Preset Time Part.
Optionally, the compression module is additionally operable to:
Described the file of deletion is compressed before, judge that CPU is currently at idle condition, and current electric quantity be more than Or it is equal to default electricity;Or judge that CPU is currently at idle condition, and current electric quantity is less than default electricity, and be currently at Charged state.
Optionally, first mobile module is additionally operable to:
The size for detecting the idle storage space after user copies into new file is less than preset value, according to the deletion The time sequencing of operation, the file that complete deletion is deleted at first.
The embodiment of the present invention also proposed a kind of method for deleting data, including:
Detect deletion action;
Attribute modification by the file of corresponding for deletion action deletion is hiding, and by the big of the file of the deletion The little idle storage space for being added to display;
The corresponding relation between the file and original directory of the deletion is preserved, and the file of the deletion is moved to pre- If under catalogue.
Optionally, methods described also includes:
Described the file of deletion is moved under predetermined directory before, described in pre- measured compressed delete file after free time deposit The size in storage space;
Judge to compress the size of the idle storage space after the file of the deletion less than preset value, and the deletion File is text;Or, judge that the size for compressing the idle storage space after the file of the deletion is more than or equal to Preset value, the file of the deletion is compressed;
Described move to the file of deletion includes under predetermined directory:The file of the deletion after by compression moves to default mesh Under record.
Optionally, methods described also includes:
The size of the idle storage space after file for judging to compress the deletion is less than preset value, and the deletion File when being not text, described the file of deletion is moved under predetermined directory after, thoroughly delete after Preset Time File except the deletion.
Optionally, methods described, also includes:
Described the file of deletion is compressed before, judge that CPU is currently at idle condition, and current electric quantity be more than Or it is equal to default electricity;Or judge that CPU is currently at idle condition, and current electric quantity is less than default electricity, and be currently at Charged state.
Optionally, methods described, also includes:
The size for detecting the idle storage space after user copies into new file is less than preset value, according to the deletion The time sequencing of operation, the file that complete deletion is deleted at first.
Compared with correlation technique, the inventive method embodiment includes:Detect deletion action;The deletion action is corresponding The attribute modification of file of deletion be hiding, and the idle storage that the size of the file of the deletion is added to display is empty Between.The corresponding relation between the file and original directory of the deletion is preserved, and the file of the deletion is moved to default mesh Under record.By the scheme of the embodiment of the present invention, when deletion action is detected, the only attribute of the file that modification is deleted and display Idle storage space, without complete deletion file, it is achieved thereby that prevent maloperation from deleting the effect of data.
Description of the drawings
Below to the embodiment of the present invention in accompanying drawing illustrate, the accompanying drawing in embodiment be for the present invention enter one Step is understood, is used for explaining the present invention, does not constitute limiting the scope of the invention together with description.
Fig. 1 is the hardware architecture diagram of an optional mobile terminal for realizing each embodiment of the invention;
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the flow chart of the method that first embodiment of the invention deletes data;
Fig. 4 is the flow chart of the method that second embodiment of the invention deletes data;
Fig. 5 is the flow chart of the method that third embodiment of the invention recovers data;
Fig. 6 is the structure composition schematic diagram of the device that fourth embodiment of the invention deletes data;
Fig. 7 is the structure composition schematic diagram of the device that fifth embodiment of the invention recovers data.
The realization of the object of the invention, functional characteristics and advantage will be described further in conjunction with the embodiments referring to the drawings.
Specific embodiment
For the ease of the understanding of those skilled in the art, the invention will be further described below in conjunction with the accompanying drawings, not Can be used for limiting the scope of the invention.It should be noted that the embodiment and reality in the case where not conflicting, in the application The various modes that applies in example can be mutually combined.
It should be appreciated that specific embodiment described herein is not intended to limit the present invention only in order to explain the present invention.
Referring now to the mobile terminal that Description of Drawings realizes each embodiment of the invention.In follow-up description, use For representing the suffix of such as " module ", " part " or " unit " of element only for being conducive to the explanation of the present invention, itself Not specific meaning.Therefore, " module " mixedly can be used with " part ".
Mobile terminal can be implemented in a variety of manners.For example, the terminal described in the present invention can include such as moving Phone, smart phone, notebook computer, digit broadcasting receiver, PDA (personal digital assistant), PAD (panel computer), PMP The mobile terminal of (portable media player), guider etc. and such as numeral TV, desk computer etc. are consolidated Determine terminal.Hereinafter it is assumed that terminal is mobile terminal.However, it will be understood by those skilled in the art that, except being used in particular for moving Outside the element of purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Fig. 1 is that the hardware configuration of an optional mobile terminal for realizing each embodiment of the invention is illustrated.
Mobile terminal 1 00 can include wireless communication unit 110, user input unit 130, output unit 150, memorizer 160th, interface unit 170, controller 180 and power subsystem 190 etc..Fig. 1 shows the mobile terminal with various assemblies, but Be it should be understood that, it is not required that implement all components for illustrating.More or less of component can alternatively be implemented.Will be under Face describes the element of mobile terminal in detail.
Wireless communication unit 110 generally includes one or more assemblies, and which allows mobile terminal 1 00 and wireless communication system Or the radio communication between network.For example, wireless communication unit can include mobile communication module 112.
Mobile communication module 112 sends radio signals to base station (for example, access point, node B etc.), exterior terminal And at least one of server and/or receive from it radio signal.Such radio signal can be logical including voice Words signal, video calling signal or the various types of data for sending and/or receiving according to text and/or Multimedia Message.
User input unit 130 can generate key input data to control each of mobile terminal according to the order of user input Plant operation.User input unit 130 allows the various types of information of user input, and can include keyboard, metal dome, touch Plate (for example, detection is due to the sensitive component of the change of touched and caused resistance, pressure, electric capacity etc.), roller, rocking bar etc. Deng.Especially, when touch pad is superimposed upon on display unit 151 as a layer, touch screen can be formed.
Interface unit 170 is connected the interface that can pass through as at least one external device (ED) with mobile terminal 1 00.For example, External device (ED) can include wired or wireless head-band earphone port, external power source (or battery charger) port, wired or nothing Line FPDP, memory card port, the port for being used for device of the connection with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Identification module can be that storage uses each of mobile terminal 1 00 for verifying user Kind of information and subscriber identification module (UIM), client identification module (SIM), Universal Subscriber identification module (USIM) can be included Etc..In addition, the device (hereinafter referred to as " identifying device ") with identification module can take the form of smart card, therefore, know Other device can be connected with mobile terminal 1 00 via port or other attachment means.Interface unit 170 can be used for receive from The input (for example, data message, electric power etc.) of external device (ED) and the input for receiving is transferred in mobile terminal 1 00 One or more elements can be used for transmission data between mobile terminal and external device (ED).
In addition, when mobile terminal 1 00 is connected with external base, interface unit 170 can serve as allowing to pass through which by electricity Power provides the path of mobile terminal 1 00 from base or can serve as allowing the various command signals from base input to pass through which It is transferred to the path of mobile terminal.The various command signals or electric power being input into from base may serve as recognizing that mobile terminal is The no signal being accurately fitted within base.Output unit 150 is configured to defeated with the offer of vision, audio frequency and/or tactile manner Go out signal (for example, audio signal, video signal, alarm signal, vibration signal etc.).Output unit 150 can include showing Unit 151 etc..
Display unit 151 may be displayed on the information processed in mobile terminal 1 00.For example, when mobile terminal 1 00 is in electricity During words call mode, display unit 151 can show and converse or other communicate (for example, text messaging, multimedia files Download etc.) related user interface (UI) or graphic user interface (GUI).When mobile terminal 1 00 is in video calling pattern Or during image capture mode, display unit 151 can show the image of capture and/or the image of reception, illustrate video or figure UI or GUI of picture and correlation function etc..
Meanwhile, when the display unit 151 and touch pad touch screen with formation superposed on one another as a layer, display unit 151 can serve as input equipment and output device.Display unit 151 can include liquid crystal display (LCD), thin film transistor (TFT) In LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexible display, three-dimensional (3D) display etc. at least A kind of.Some in these display may be constructed such that transparence to allow user from outside viewing, and this is properly termed as transparent Display, typical transparent display can be, for example, TOLED (transparent organic light emitting diode) display etc..According to specific The embodiment that wants, mobile terminal 1 00 can include two or more display units (or other display devices), for example, move Dynamic terminal can include outernal display unit (not shown) and inner display unit (not shown).Touch screen can be used for detection and touch Input pressure and touch input position and touch input area.
Memorizer 160 can store software program for the process and control operation executed by controller 180 etc., Huo Zheke Temporarily to store oneself data (for example, telephone directory, message, still image, video etc.) through exporting or will export.And And, memorizer 160 can be storing the vibration of various modes with regard to exporting and audio signal when touching and being applied to touch screen Data.
Memorizer 160 can include the storage medium of at least one type, and the storage medium includes flash memory, hard disk, many Media card, card-type memorizer (for example, SD or DX memorizeies etc.), random access storage device (RAM), static random-access storage Device (SRAM), read only memory (ROM), Electrically Erasable Read Only Memory (EEPROM), programmable read only memory (PROM), magnetic storage, disk, CD etc..And, mobile terminal 1 00 can execute memorizer with by network connection The network storage device cooperation of 160 store function.
The overall operation of 180 usual control mobile terminal of controller.For example, controller 180 is executed and voice call, data The related control of communication, video calling etc. and process.In addition, controller 180 can include (or playback) many matchmakers for reproducing The multi-media module 181 of volume data, multi-media module 181 can be constructed in controller 180, or it is so structured that and control Device 18 is separated.The handwriting input for executing on the touchscreen or picture can be painted by controller 180 with execution pattern identifying processing Input processed is identified as character or image.
Power subsystem 190 receives external power or internal power under the control of controller 180 and provides operation each unit Appropriate electric power needed for part and component.
Various embodiments described herein can be with use such as computer software, hardware or its any combination of calculating Machine computer-readable recording medium is implementing.For hardware is implemented, embodiment described herein can be by using application-specific IC (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), scene can Programming gate array (FPGA), processor, controller, microcontroller, microprocessor, it is designed to execute function described herein At least one in electronic unit implementing, in some cases, can be implemented in controller 180 by such embodiment. For software is implemented, the embodiment of such as process or function can with allow to execute the single of at least one function or operation Software module is implementing.Software code can be come by the software application (or program) that is write with any appropriate programming language Implement, software code can be stored in memorizer 160 and be executed by controller 180.
So far, oneself is through describing mobile terminal according to its function.Below, for the sake of brevity, will description such as folded form, Slide type mobile terminal in various types of mobile terminals of board-type, oscillating-type, slide type mobile terminal etc. is used as showing Example.Therefore, the present invention can be applied to any kind of mobile terminal, and be not limited to slide type mobile terminal.
As shown in Figure 1 mobile terminal 1 00 may be constructed such that using via frame or packet transmission data all if any Line and wireless communication system and satellite-based communication system are operating.
Referring now to the communication system that Fig. 2 descriptions are wherein operable to according to the mobile terminal of the present invention.
Such communication system can use different air interfaces and/or physical layer.For example, used by communication system Air interface includes such as frequency division multiple access (FDMA), time division multiple acess (TDMA), CDMA (CDMA) and universal mobile communications system System (UMTS) (especially, Long Term Evolution (LTE)), global system for mobile communications (GSM) etc..As non-limiting example, under The description in face is related to cdma communication system, but such teaching is equally applicable to other types of system.
With reference to Fig. 2, cdma wireless communication system can include multiple mobile terminal 1s 00, multiple base stations (BS) 270, base station Controller (BSC) 275 and mobile switching centre (MSC) 280.MSC280 is configured to and Public Switched Telephony Network (PSTN) 290 form interface.MSC280 is also structured to form interface with the BSC275 that can be couple to base station 270 via back haul link. If back haul link can be constructed according to any one in the interface that Ganji knows, the interface includes such as E1/T1, ATM, IP, PPP, frame relay, HDSL, ADSL or xDSL.It will be appreciated that system can include multiple BSC2750 as shown in Figure 2.
Each BS270 can service one or more subregions (or region), by multidirectional antenna or the day of sensing specific direction Each subregion that line is covered is radially away from BS270.Or, each subregion can by for diversity reception two or more Antenna is covered.Each BS270 may be constructed such that the multiple frequency distribution of support, and each frequency distribution has specific frequency spectrum (for example, 1.25MHz, 5MHz etc.).
Intersecting that subregion and frequency are distributed can be referred to as CDMA Channel.BS270 can also be referred to as base station transceiver System (BTS) or other equivalent terms.In this case, term " base station " can be used for broadly representing single BSC275 and at least one BS270.Base station can also be referred to as " cellular station ".Or, each subregion of specific BS270 can be claimed For multiple cellular stations.
As shown in Figure 2, broadcast singal is sent to broadcsting transmitter (BT) 295 mobile terminal operated in system 100.Broadcasting reception module 111 is arranged at mobile terminal 1 00 to receive the broadcast sent by BT295 as shown in Figure 1 Signal.In fig. 2 it is shown that several global positioning system (GPS) satellite 300.Satellite 300 helps position multiple mobile terminals At least one of 100.
In fig. 2, multiple satellites 300 are depicted, it is understood that be, it is possible to use any number of satellite obtains useful Location information.GPS module 115 is generally configured to coordinate to obtain the positioning that wants letter with satellite 300 as shown in Figure 1 Breath.Substitute GPS tracking techniques or outside GPS tracking techniques, it is possible to use can track the position of mobile terminal other Technology.In addition, at least one gps satellite 300 can optionally or additionally process satellite dmb transmission.
Used as a typical operation of wireless communication system, BS270 receives the reverse link from various mobile terminal 1s 00 Signal.00 usual participation call of mobile terminal 1, information receiving and transmitting and other types of communication.Each of the reception of certain base station 270 is anti- Processed in specific BS270 to link signal.The data of acquisition are forwarded to the BSC275 of correlation.BSC provides call Resource allocation and the mobile management function of the coordination including the soft switching process between BS270.BSC275 is also by the number for receiving According to MSC280 is routed to, which is provided for the extra route service with PSTN290 formation interfaces.Similarly, PSTN290 with MSC280 forms interface, and MSC and BSC275 form interface, and BSC275 correspondingly controls BS270 with by forward link signals It is sent to mobile terminal 1 00.
Based on above-mentioned mobile terminal hardware configuration and communication system, each embodiment of the invention is proposed.
As shown in figure 3, first embodiment of the invention proposes a kind of method for deleting data, including:
Step 300, detect deletion action.
Step 301, it is hiding by the attribute modification of the file of corresponding for deletion action deletion, and by the big of the file that deletes The little idle storage space for being added to display.
In this step, idle storage space that the file size of deletion is added to display, the file that actually deletes is simultaneously Without complete deletion, or certain memory space is taken, and allow user to think this when the display of idle storage space is carried out File has been deleted.
Corresponding relation between step 302, the file of preservation deletion and original directory, and the file of deletion is moved to pre- If under catalogue.
In this step, the file of deletion is moved under predetermined directory, be will delete file copy to predetermined directory Under, and by the file complete deletion that deletes under original directory, that is to say, that predetermined directory is arrived in the file consolidation storage that deletes Under, when being easy to subsequently recover file, user browses and recovers deleted file.
In this step, predetermined directory can be newly-built catalogue in memory headroom or external memory card.
In said method, step 301 and do not do, can first change the file of deletion Attribute and the idle storage space for showing, then corresponding relation is preserved, and the file of deletion is moved under predetermined directory, it is also possible to Corresponding relation is first preserved, and the file of deletion is moved under predetermined directory, then change attribute and the display of the file of deletion Idle storage space.
As shown in figure 4, second embodiment of the invention proposes a kind of method for deleting data, including:
Step 300, detect deletion action.
Step 301, it is hiding by the attribute modification of the file of corresponding for deletion action deletion, and by the big of the file that deletes The little idle storage space for being added to display.
In this step, idle storage space that the file size of deletion is added to display, the file that actually deletes is simultaneously Without complete deletion, or certain memory space is taken, and allow user to think this when the display of idle storage space is carried out File has been deleted.
Corresponding relation between step 400, the file of preservation deletion and original directory.
The size of the idle storage space after the file that step 401, pre- measured compressed are deleted.
In this step, first can estimate compression after deletion file size, further according to compression after deletion file Size calculate compression delete file after idle storage space.Can also calculate what compression was deleted according to the ratio for reducing Idle storage space after file.
Wherein it is possible to the size of the file of the deletion after compression is estimated according to file type, different file types pair Different compression factors are answered, the compression factor is rule of thumb set.For example, for text, the size after compression is 5% of size before compression, that is, the ratio for reducing are 95%;For audio or video file, the size after compression is compression The 80% of front size, that is, the ratio for reducing are 20%;For picture file, the size after compression is the size before compression 30%, that is, the ratio for reducing is 70%.
Idle storage space after the file that compression is deleted is equal to the idle storage space before compressing the file that deletes and deducts The size of the file that deletes before compression, along with the size of the file that deletes after compression.Or, compress the sky after the file that deletes Not busy memory space is equal to the idle storage space before compressing the file that deletes plus the size of the file of deletion and compression before compression The product of the ratio that falls.
Step 402, judge to compress the size of the idle storage space after the file of the deletion less than preset value, and institute The file for stating deletion is text;Or, judge that the size for compressing the idle storage space after the file of the deletion is big In or be equal to preset value, the file of the deletion is compressed.
In this step, preset value can be the preset ratio (such as 30% etc.) of the size of memory space.
Step 403, by compression after the file of deletion move under predetermined directory.
In this step, by compression after the file of deletion move under predetermined directory, be by compression after deletion text Part is copied under predetermined directory, and by under original directory compress after deletion file complete deletion, that is to say, that by delete File consolidation is stored under predetermined directory, and when being easy to subsequently recover file, user browses and recovers deleted file.
Optionally, also include:
When the size of the idle storage space that judges after compressing the file that deletes is less than preset value, and the file that deletes is not When being text, after the file of deletion is moved under predetermined directory, delete described in complete deletion after Preset Time File.
Optionally, also include:
Before the file of deletion is compressed, judges that CPU is currently at idle condition, and current electric quantity is more than or waits In default electricity;Or judge that CPU is currently at idle condition, and current electric quantity is less than default electricity, and it is currently at charging State.
Optionally, busy condition is currently at when judging CPU;Or, current electric quantity is less than default electricity, and current place When non-charged state, continue to judge the state of CPU, the size of current electric quantity and currently whether in charged state, until sentencing Break and CPU and be currently at idle condition, and current electric quantity is more than or equal to default electricity;Or judge that CPU is currently at the free time State, and current electric quantity is less than default electricity, and when being currently at charged state, just the file to deleting is compressed.
In this step, predetermined directory can be newly-built catalogue in memory headroom or external memory card.
Optionally, also include:
Detect user and copy into the size of idle storage space after new file less than preset value, according to deletion action when Between order, the file that complete deletion is deleted at first.
In said method, execution sequence is not differentiated between step 301, step 400~403, can first carry out step 301, Execution step 400~403 again;Step 400~403, then execution step 301 can also be first carried out.
As shown in figure 5, third embodiment of the invention proposes a kind of method for recovering data, including:
Step 500, detect restoring operation.
Optionally, the All Files under predetermined directory can be shown, when detecting after the restoring operation for detecting user When user selects other one or more files to be recovered, continue follow-up process.
Step 501, by the attribute modification of the file of corresponding for restoring operation recovery for not hiding, and by the file for recovering What size was added to display uses memory space.
In step 502, the corresponding relation between the file and original directory of the recovery for pre-saving, the recovery is searched The corresponding original directory of file, the file of the recovery is moved under the original directory for finding.
Optionally, also include:
Before the file of recovery is moved under the original directory for finding, judge that the file for recovering is compressed file, The file for recovering is decompressed.
As shown in fig. 6, fourth embodiment of the invention also proposed a kind of device for deleting data, including:
First detection module, for detecting deletion action;
First modified module, for by the attribute modification of the file of corresponding for deletion action deletion be hiding, and will delete The size of file be added to the idle storage space of display;
Memory module, for preserving the corresponding relation between the file and original directory deleted;
First mobile module, for moving to the file of deletion under predetermined directory.
Wherein, first detection module can be realized by the user input unit 130 of Fig. 1 and controller 180, the first modification Module and the first mobile module can be arranged in the controller 180 of Fig. 1, and memory module can pass through 160 He of memorizer of Fig. 1 Controller 180 is realized.
Wherein, the file size of deletion is added to the first modified module the idle storage space of display, is actually deleted File do not have a complete deletion, or take certain memory space, and allow use when the display of idle storage space is carried out Think that this document has been deleted in family.
First mobile module moves to the file of deletion under predetermined directory, be will delete file copy to default mesh Under record, and by the file complete deletion that deletes under original directory, that is to say, that the file consolidation storage that deletes is arrived predetermined directory Under, when being easy to subsequently recover file, user browses and recovers deleted file.
Predetermined directory can be newly-built catalogue in memory headroom or external memory card.
Optionally, also include:
Compression module, the size of the idle storage space after the file that deletes for pre- measured compressed;
The size of the idle storage space after judging to compress the file that deletes is less than preset value, and the file that deletes is text Presents;Or, the size of the idle storage space after judging to compress the file that deletes will be deleted more than or equal to preset value File be compressed;
First mobile module specifically for:The file of the deletion after by compression is moved under predetermined directory.
Wherein, compression module can be arranged in the controller 180 of Fig. 1.
Wherein it is possible to first estimation compression after deletion file size, further according to compression after deletion file big Idle storage space after the little file for calculating compression deletion.The file that compression is deleted can also be calculated according to the ratio for reducing Idle storage space afterwards.
Wherein, compression module can estimate the size of the file of the deletion after compression, different texts according to file type The corresponding different compression factor of part type, the compression factor are rule of thumb set.For example, for text, after compression Size be compression before size 5%, that is, the ratio for reducing be 95%;For audio or video file, big after compression Little for compression before size 80%, that is, the ratio for reducing be 20%;For picture file, before the size after compression is for compression Size 30%, that is, the ratio for reducing be 70%.
Idle storage space after the file that compression is deleted is equal to the idle storage space before compressing the file that deletes and deducts The size of the file that deletes before compression, along with the size of the file that deletes after compression.Or, compress the sky after the file that deletes Not busy memory space is equal to the idle storage space before compressing the file that deletes plus the size of the file of deletion and compression before compression The product of the ratio that falls.
Compression module by compression after the file of deletion move under predetermined directory, be by compression after deletion file Copy under predetermined directory, and by under original directory compress after deletion file complete deletion, that is to say, that will delete text Part is unifiedly stored under predetermined directory, and when being easy to subsequently recover file, user browses and recovers deleted file.
Optionally, compression module is additionally operable to:
When the size of the idle storage space that judges after compressing the file that deletes is less than preset value, and the file that deletes is not When being text, the first mobile module is notified to move to the file of deletion under predetermined directory;
First mobile module is additionally operable to:
After the file of deletion is moved under predetermined directory, the file that complete deletion is deleted after Preset Time.
Optionally, compression module is additionally operable to:
Before the file of deletion is compressed, judges that CPU is currently at idle condition, and current electric quantity is more than or waits In default electricity;Or judge that CPU is currently at idle condition, and current electric quantity is less than default electricity, and it is currently at charging State.
Optionally, when compression module judges that CPU is currently at busy condition;Or, current electric quantity is less than default electricity, And when being currently at non-charged state, continue to judge the state of CPU, the size of current electric quantity and currently whether in charging shape State, until judging that CPU is currently at idle condition, and current electric quantity is more than or equal to default electricity;Or judge that CPU is current Idle condition is in, and current electric quantity is less than default electricity, and when being currently at charged state, just the file to deleting is pressed Contracting.
Optionally, the first mobile module is additionally operable to:
Detect user and copy into the size of idle storage space after new file less than preset value, according to deletion action when Between order, the file that complete deletion is deleted at first.
As shown in fig. 7, fifth embodiment of the invention also proposed a kind of device for recovering data, including:
Second detection module, for detecting restoring operation;
Second modified module, for being not hide by the attribute modification of the file of corresponding for restoring operation recovery, and will be extensive What the size of multiple file was added to display uses memory space;
Second mobile module, for the corresponding relation between the file and original directory of the recovery for pre-saving in, look into The corresponding original directory of file of recovery is looked for, the file of recovery is moved under the original directory for finding.
Wherein, the second detection module can be realized by the user input unit 130 of Fig. 1 and controller 180, the second modification Module and the second mobile module can be arranged in the controller 180 of Fig. 1.
Optionally, also include:
Decompression module, for before the file of recovery is moved under the original directory for finding, judging recovery File is compressed file, and the file of right+recovery is decompressed.
Wherein, decompression module can be arranged in the controller 180 of Fig. 1.
Sixth embodiment of the invention also proposes a kind of mobile terminal, including:The device of any of the above-described deletion data All modules of the device of all modules and any of the above-described recovery data.
It should be noted that herein, term " including ", "comprising" or its any other variant are intended to non-row His property includes, so that a series of process, method, article or device including key elements not only includes those key elements, and And also include other key elements being not expressly set out, or also include for this process, method, article or device institute inherently Key element.In the absence of more restrictions, the key element for being limited by sentence "including a ...", it is not excluded that including being somebody's turn to do Also there is other identical element in the process of key element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform by software to realize, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Such understanding is based on, technical scheme is substantially done to prior art in other words The part for going out contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), use so that a station terminal equipment including some instructions (can be mobile phone, computer, clothes Business device, air-conditioner, or network equipment etc.) execute method described in each embodiment of the invention.
The preferred embodiments of the present invention are these are only, the scope of the claims of the present invention is not thereby limited, every using this Equivalent structure or equivalent flow conversion that bright description and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of delete data device, it is characterised in that include:
First detection module, for detecting deletion action;
First modified module, for by the attribute modification of the file of corresponding for deletion action deletion be hiding, and will be described The size of the file of deletion is added to the idle storage space of display;
Memory module, for preserving the corresponding relation between the file and original directory of the deletion;
First mobile module, for moving to the file of the deletion under predetermined directory.
2. device according to claim 1, it is characterised in that also include:
Compression module, for the size of the idle storage space after the file of deletion described in pre- measured compressed;
Judge to compress the size of the idle storage space after the file of the deletion less than preset value, and the file of the deletion For text;Or, judge to compress the size of the idle storage space after the file of the deletion more than or equal to default Value, the file of the deletion is compressed;
First mobile module specifically for:The file of the deletion after by compression is moved under predetermined directory.
3. device according to claim 2, it is characterised in that the compression module is additionally operable to:
The size of the idle storage space after file for judging to compress the deletion is less than preset value, and the text of the deletion When part is not text, first mobile module is notified to move to the file of the deletion under predetermined directory;
First mobile module is additionally operable to:
After the file of the deletion is moved under predetermined directory, the file of deletion described in complete deletion after Preset Time.
4. device according to claim 2, it is characterised in that the compression module is additionally operable to:
Described the file of deletion is compressed before, judge that CPU is currently at idle condition, and current electric quantity more than or wait In default electricity;Or judge that CPU is currently at idle condition, and current electric quantity is less than default electricity, and it is currently at charging State.
5. device according to claim 1, first mobile module are additionally operable to:
The size for detecting the idle storage space after user copies into new file is less than preset value, according to the deletion action Time sequencing, the file that complete deletion is deleted at first.
6. a kind of delete data method, it is characterised in that include:
Detect deletion action;
Attribute modification by the file of corresponding for deletion action deletion is hiding, and the size of the file of the deletion is added It is added to the idle storage space of display;
The corresponding relation between the file and original directory of the deletion is preserved, and the file of the deletion is moved to default mesh Under record.
7. method according to claim 6, it is characterised in that also include:
Described the file of deletion is moved under predetermined directory before, the idle storage after the file that deletes described in pre- measured compressed is empty Between size;
Judge to compress the size of the idle storage space after the file of the deletion less than preset value, and the file of the deletion For text;Or, judge to compress the size of the idle storage space after the file of the deletion more than or equal to default Value, the file of the deletion is compressed;
Described move to the file of deletion includes under predetermined directory:The file of the deletion after by compression moves to predetermined directory Under.
8. method according to claim 7, it is characterised in that also include:
The size of the idle storage space after file for judging to compress the deletion is less than preset value, and the text of the deletion When part is not text, described the file of deletion is moved under predetermined directory after, complete deletion institute after Preset Time State the file of deletion.
9. method according to claim 7, it is characterised in that also include:
Described the file of deletion is compressed before, judge that CPU is currently at idle condition, and current electric quantity more than or wait In default electricity;Or judge that CPU is currently at idle condition, and current electric quantity is less than default electricity, and it is currently at charging State.
10. method according to claim 6, it is characterised in that also include:
The size for detecting the idle storage space after user copies into new file is less than preset value, according to the deletion action Time sequencing, the file that complete deletion is deleted at first.
CN201610899999.7A 2016-10-14 2016-10-14 The apparatus and method for deleting data Withdrawn CN106503100A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610899999.7A CN106503100A (en) 2016-10-14 2016-10-14 The apparatus and method for deleting data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610899999.7A CN106503100A (en) 2016-10-14 2016-10-14 The apparatus and method for deleting data

Publications (1)

Publication Number Publication Date
CN106503100A true CN106503100A (en) 2017-03-15

Family

ID=58295401

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610899999.7A Withdrawn CN106503100A (en) 2016-10-14 2016-10-14 The apparatus and method for deleting data

Country Status (1)

Country Link
CN (1) CN106503100A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080256139A1 (en) * 2007-04-13 2008-10-16 Crucial Security, Inc. Methods and systems for data recovery
CN101937377A (en) * 2009-06-29 2011-01-05 百度在线网络技术(北京)有限公司 Data recovery method and device
CN103186598A (en) * 2011-12-30 2013-07-03 深圳富泰宏精密工业有限公司 File processing method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080256139A1 (en) * 2007-04-13 2008-10-16 Crucial Security, Inc. Methods and systems for data recovery
CN101937377A (en) * 2009-06-29 2011-01-05 百度在线网络技术(北京)有限公司 Data recovery method and device
CN103186598A (en) * 2011-12-30 2013-07-03 深圳富泰宏精密工业有限公司 File processing method and system

Similar Documents

Publication Publication Date Title
CN105915623A (en) Device and method of processing application installation package
CN106648369A (en) Switching device and method for application program
CN106844032A (en) The storage processing method and device of a kind of terminal applies
CN106485689A (en) A kind of image processing method and device
CN105760057A (en) Screenshot device and method
CN106250268B (en) Content of text recovery device and method
CN105739820A (en) Message prompt display method and device
CN106412339A (en) Notification message processing method and apparatus
CN106570155A (en) Image management device and method
CN106850941A (en) Method, photo taking and device
CN105677517A (en) Data backup device, terminal and data backup method
CN106547439A (en) A kind of method and apparatus for processing message
CN107066604A (en) A kind of cleaning garbage files method and terminal
CN106598538A (en) Method and system for updating instruction set
CN106506364A (en) A kind of cut-in method, client and routing server
CN105183830A (en) Picture browsing method and apparatus
EP2442241A1 (en) Mobile terminal and displaying method thereof
CN104731484B (en) The method and device that picture is checked
CN106897135A (en) Restoration methods and device after a kind of application interruption
CN106230804A (en) Picture sharing method, terminal and server
CN109542317A (en) A kind of display control method, equipment and the storage medium of double-sided screen mobile terminal
CN106559577A (en) Mobile terminal and its control method
CN107194243A (en) A kind of mobile terminal and the method for installing application program
CN106502744A (en) Application program sharing method and system
CN106210230B (en) A kind of contact person increases method and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20170315

WW01 Invention patent application withdrawn after publication