CN107402846A - Document handling method and device - Google Patents

Document handling method and device Download PDF

Info

Publication number
CN107402846A
CN107402846A CN201710607234.6A CN201710607234A CN107402846A CN 107402846 A CN107402846 A CN 107402846A CN 201710607234 A CN201710607234 A CN 201710607234A CN 107402846 A CN107402846 A CN 107402846A
Authority
CN
China
Prior art keywords
file
predetermined file
predetermined
done
processing
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.)
Granted
Application number
CN201710607234.6A
Other languages
Chinese (zh)
Other versions
CN107402846B (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.)
Samsung Guangzhou Mobile R&D Center
Samsung Electronics Co Ltd
Original Assignee
Samsung Guangzhou Mobile R&D Center
Samsung Electronics 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 Samsung Guangzhou Mobile R&D Center, Samsung Electronics Co Ltd filed Critical Samsung Guangzhou Mobile R&D Center
Priority to CN201710607234.6A priority Critical patent/CN107402846B/en
Publication of CN107402846A publication Critical patent/CN107402846A/en
Application granted granted Critical
Publication of CN107402846B publication Critical patent/CN107402846B/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/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • 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
    • 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)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

This application discloses document handling method and device.One embodiment of this method includes:Predetermined file is set to be in seizure condition;Backup processing to predetermined file;The backup information for the predetermined file for having done delete processing is obtained, the selection interface of the predetermined file to having done delete processing is presented;In response to by selecting interface to recover the predetermined file for having done delete processing into original path to having done the recovery request of the predetermined file of delete processing.The embodiment can need not change system interface, be not limited to application-specific, realize and the file of deletion is recovered.

Description

Document handling method and device
Technical field
The application is related to technical field of mobile terminals, and in particular to mobile terminal applied technical field, more particularly to file Treating method and apparatus.
Background technology
Mobile terminal provides the user various functions, meets daily life and work requirements.Many fileinfos are stored, Such as picture and video etc..It is very if desired for deleted file is given for change because mobile terminal does not provide " regretting " mechanism Difficult.
At present it has been proposed that increase recycle bin function.(1) by being modified to mobile terminal " deletion " function, " will delete Except " operation be replaced with " movement/duplication " operate, i.e.,:When deleting file, " movement/duplication " operation is really carried out, it would be desirable to The file of deletion is moved/copied in specific file, wait need recover data when, will be carried out from specific file extensive It is multiple.On the one hand the original function of mobile terminal is destroyed, is on the other hand only capable of being confined to such mobile terminal;(2) some app The file function that undeletes that (application, application program) provides, they are actually to operate " deletion " in app " movement " operation or " duplication+deletion " are replaced with, deletes mobile terminal file access pattern function so as to realize, but deletion file can Recover the deletion file access pattern function that scope is limited only to provide by this app operational scenario, concrete example, app A, app B (app B without delete file access pattern function) does not use app A " deletion " interface, when in app B independently of app A When carrying out file deletion action, app A can not be recovered.
Above-mentioned deletion file access pattern mode, or the original function of mobile terminal is destroyed, or it is confined to certain app.
The content of the invention
The purpose of the embodiment of the present application is to propose a kind of improved document handling method and device, to solve background above The technical problem that technology segment is mentioned.
In a first aspect, the embodiment of the present application provides a kind of document handling method, this method includes:Handle predetermined file Seizure condition;Backup processing to predetermined file;The backup information for the predetermined file for having done delete processing is obtained, is presented to having done The selection interface of the predetermined file of delete processing;In response to by selecting interface to having done the recovery of the predetermined file of delete processing Request, the predetermined file for having done delete processing is recovered into original path.
In certain embodiments, predetermined file includes:File under specified type or assigned catalogue, specified type include Following at least one:Picture, video, music, document, application program.
In certain embodiments, predetermined file is user by being specified for the interface of select file type or file directory 's.
In certain embodiments, predetermined file is made to be in seizure condition, including:Open predetermined file.
In certain embodiments, backup processing to predetermined file, including:Record the backup information of predetermined file, backup Information comprises at least original path and filename;Predetermined file is moved or copied into presumptive area to generate backup file.
In certain embodiments, the selection interface of the predetermined file to having done delete processing is presented, including:In selection interface Display has done the mark of the predetermined file of delete processing so that user recovers to have done the predetermined file of delete processing.
In certain embodiments, this method also includes:If user is not detected by within the predetermined time in selection interface Mark recovery operation, then delete backup file.
In certain embodiments, after the processing that backuped to predetermined file, this method also includes:Close predetermined file.
In certain embodiments, this method also includes:When meeting at least one of following, compress backup file:Fate Each file size sum in domain exceedes predetermined total size threshold value, and backup file size exceedes predetermined single-piece size threshold value, backup The existing time exceedes predetermined time threshold to file in predetermined areas.
In certain embodiments, this method also includes:In response to by selecting interface to having done the predetermined text of delete processing The recovery request of part, decompress backup file.
In certain embodiments, the predetermined file for having done delete processing is recovered into original path, including:On original road The predetermined file of delete processing file of the same name is created and done under footpath, and the content for the predetermined file for having done delete processing is answered Make in file of the same name;Or recovery text is generated under original path according to the content for the predetermined file for having done delete processing Part, and by recover file filename be revised as having done delete processing predetermined file filename;Or backup file is moved Move in original path.
In certain embodiments, predetermined file is made to be in seizure condition, including:To predetermined file carry out hard link operation with Backup directory item corresponding with predetermined file is established in predetermined areas.
In certain embodiments, backup processing to predetermined file, including:Record the backup information of predetermined file, backup Information comprises at least original path and filename.
In certain embodiments, the predetermined file for having done delete processing is recovered into original path, including:Create and original Beginning directory entry identical directory entry;Delete backup directory item.
Second aspect, the embodiment of the present application provide a kind of document handling apparatus, and the device includes:Unit is taken, is used for Predetermined file is set to be in seizure condition;Backup units, for the processing that backuped to predetermined file;Display unit, for obtaining The backup information of the predetermined file of delete processing is done, the selection interface of the predetermined file to having done delete processing is presented;Recover single Member, in response to by selecting interface to do delete processing to having done the recovery request of the predetermined file of delete processing Predetermined file is recovered into original path.
In certain embodiments, predetermined file includes:File under specified type or assigned catalogue, specified type include Following at least one:Picture, video, music, document, application program.
In certain embodiments, predetermined file is user by being specified for the interface of select file type or file directory 's.
In certain embodiments, unit is taken to be further used for:Open predetermined file.
In certain embodiments, backup units are further used for:The backup information of predetermined file is recorded, backup information is at least Including original path and filename;Predetermined file is moved or copied into presumptive area to generate backup file.
In certain embodiments, display unit is further used for:The predetermined text for having done delete processing is shown in selection interface The mark of part is recovered to have done the predetermined file of delete processing for user.
In certain embodiments, the device also includes:Backup file deletes unit, if for not examining within the predetermined time Recovery operation of the user to the mark in selection interface is measured, then deletes backup file.
In certain embodiments, the device also includes closing unit, for after the processing that backuped to predetermined file, closing Close predetermined file.
In certain embodiments, the device also includes compression unit, for when meeting at least one of following, compress backup File:Each file size sum in presumptive area exceedes predetermined total size threshold value, and it is big that backup file size exceedes predetermined single-piece Small threshold value, the existing time exceedes predetermined time threshold to backup file in predetermined areas.
In certain embodiments, the device also includes decompression units, in response to by selecting interface to having deleted The recovery request of the predetermined file of processing, decompress backup file.
In certain embodiments, recovery unit is further used for:Created under original path with having done the pre- of delete processing Determine file file of the same name, and the content for the predetermined file for having done delete processing is copied in file of the same name;Or according to The content for having done the predetermined file of delete processing generates recovery file under original path, and the filename that will recover file is changed To have done the filename of the predetermined file of delete processing;Or backup file is moved in original path.
In certain embodiments, unit is taken to be further used for:Hard link operation is carried out to predetermined file with fate Backup directory item corresponding with predetermined file is established in domain.
In certain embodiments, backup units are further used for:The backup information of predetermined file is recorded, backup information is at least Including original path and filename.
In certain embodiments, recovery unit is further used for:Create and original directory item identical directory entry;Delete standby Part directory entry.
The third aspect, the embodiment of the present application provide a kind of document handling method, and this method includes:Functional unit makes to make a reservation for File is in seizure condition;System unit is deleted file after the removal request of instruction deletion file to be deleted is received Processing, wherein, delete processing includes:If detecting that file to be deleted is in seizure condition, file to be deleted is reclaimed in pause Use space;Functional unit backups processing to predetermined file;The predetermined file of delete processing has been done in functional unit acquisition Backup information, the selection interface of the predetermined file to having done delete processing is presented;Functional unit is by selecting interface to The recovery request of the predetermined file of delete processing is done, and the predetermined file for having done delete processing is recovered into original path.
In certain embodiments, removal request comes from other application.
Fourth aspect, the embodiment of the present application provide a kind of document handling system, and the system includes:Functional unit, it is used for Predetermined file is set to be in seizure condition;System unit, it is right for after receiving instruction and deleting the removal request of file to be deleted File does delete processing, wherein, delete processing includes:If detect that file to be deleted is in seizure condition, pause recovery File to be deleted uses space;Functional unit is additionally operable to the processing that backuped to predetermined file;Functional unit is additionally operable to obtain The backup information of the predetermined file of delete processing is done, the selection interface of the predetermined file to having done delete processing is presented;Function list Member is additionally operable to by selecting interface to having done the recovery request of the predetermined file of delete processing, and will do delete processing Predetermined file is recovered into original path.
In certain embodiments, removal request comes from other application.
5th aspect, the embodiment of the present application provide a kind of mobile terminal, including:One or more processors;Storage dress Put, for storing one or more programs, when one or more programs are executed by one or more processors so that one or more Any method in individual computing device such as first aspect.
6th aspect, the embodiment of the present application provide a kind of computer-readable recording medium, are stored thereon with computer journey Sequence, performed when the program is executed by processor such as method any in first aspect.
The document handling method and device that the embodiment of the present application provides, by making predetermined file be in seizure condition so that File is deleted in system halt, and unoccupied status system is changed into after the processing that backuped to predetermined file could continue to delete text Part, and the file for having done delete processing can be recovered.
Brief description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that the application can apply to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the document handling method of the application;
Fig. 3 a, 3b, 3c are the schematic diagrames according to an application scenarios of the document handling method of the application;
Fig. 4 is the flow chart according to another embodiment of the document handling method of the application;
Fig. 5 is the structural representation according to one embodiment of the document handling apparatus of the application;
Fig. 6 is the flow chart according to another embodiment of the document handling method of the application;
Fig. 7 is adapted for the structural representation of the computer system of the mobile terminal for realizing the embodiment of the present application.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Be easy to describe, illustrate only in accompanying drawing to about the related part of invention.
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase Mutually combination.Describe the application in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the exemplary system of the embodiment of the document handling method that can apply the application or document handling apparatus System framework 100.
As shown in figure 1, system architecture 100 can include mobile terminal 101,102,103, network 104 and server 105. Network 104 between mobile terminal 101,102,103 and server 105 provide communication link medium.Network 104 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be interacted using mobile terminal 101,102,103 by network 104 with server 105, to receive or send out Send message etc..Various telecommunication customer end applications can be installed, such as web browser should on mobile terminal 101,102,103 With, shopping class application, searching class application, JICQ, mailbox client, social platform software etc..
Mobile terminal 101,102,103 can have a display screen and a various electronic equipments that supported web page browses, bag Include but be not limited to smart mobile phone, tablet personal computer, E-book reader, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio aspect 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio aspect 4) it is player, on knee portable Computer and desktop computer etc..
Server 105 can be to provide the server of various services, such as to being deleted on mobile terminal 101,102,103 File provides the background backup server that backup is supported.Background backup server can be to data such as the files to be backed up that receives Stored, and backup file is fed back into mobile terminal when mobile terminal request recovers deleted document.
It should be noted that the document handling method that is provided of the embodiment of the present application typically by mobile terminal 101,102, 103 are performed, and correspondingly, document handling apparatus is generally positioned in mobile terminal 101,102,103.
It should be understood that the number of the mobile terminal, network and server in Fig. 1 is only schematical.According to realizing need Will, can have any number of mobile terminal, network and server.Server can also not be needed, and backup file is deposited Storage is on mobile terminal 101,102,103.
With continued reference to Fig. 2, the flow 200 of one embodiment of document handling method according to the application is shown.This article Part processing method, comprises the following steps:
Step 201, predetermined file is made to be in seizure condition.
In the present embodiment, the electronic equipment (such as mobile terminal shown in Fig. 1) of document handling method operation thereon Predetermined file can be made to be in seizure condition in advance so that operating system can not perform deletion action to predetermined file.
In some optional implementations of the present embodiment, predetermined file includes:Under specified type or assigned catalogue File, specified type includes following at least one:Picture, video, music, document, application program.
In some optional implementations of the present embodiment, predetermined file be user by for select file type or What the interface of file directory was specified.As shown in Figure 3 a, predetermined file is selected by user interface.
In some optional implementations of the present embodiment, predetermined file is set to be in seizure condition, including:Open predetermined File.Operating system is during recovery fiel, and discovery has other programs to open file, and recovery fiel process is temporary Stop.
Step 202, backup processing to predetermined file.
In the present embodiment, in order to file can be recovered after file is deleted, it is necessary to the place that backuped in advance to predetermined file Reason.Back-up processing includes but is not limited to backup file, backup directory item.
In some optional implementations of the present embodiment, backup processing to predetermined file, including:The predetermined text of record The backup information of part, the backup information comprise at least original path and filename;Predetermined file is moved or copied into predetermined Region is to generate backup file.Backup information may also include the information such as the thumbnail of predetermined file.
In some optional implementations of the present embodiment, after the processing that backuped to predetermined file, close predetermined File.So that predetermined file is no longer on seizure condition, system can do delete processing.Before predetermined file is closed, at deletion The step of reason, includes:Directory entry (dentry) information of predetermined file is deleted, when such as now accessing store path, finds predetermined text Part has been not present.The index information (inode) of predetermined file is added to orphan's chained list (orphan list).Predetermined file is still Open mode is handled, will not now discharge the disk space of predetermined file.After predetermined file is closed, the step of delete processing Including:The disk space of predetermined file.The index information of predetermined file is removed in orphan's chained list.System carries out the behaviour that winds up Make, carry out resource reclaim etc..
In some optional implementations of the present embodiment, when meeting at least one of following, compress backup file:In advance To determine each file size sum in region and exceed predetermined total size threshold value, backup file size exceedes predetermined single-piece size threshold value, The existing time exceedes predetermined time threshold to backup file in predetermined areas.
Step 203, the backup information for the predetermined file for having done delete processing is obtained, presents and makes a reservation for having done delete processing The selection interface of file.
In the present embodiment, recycle bin as shown in Figure 3 b, if predetermined file has done delete processing, in recycle bin The icon for the predetermined file for having done delete processing is shown in file, and the file of file counts and has respective change, uses The interface that the predetermined file of delete processing has been done in selection is presented after clicking to enter file in family, i.e., makes a reservation for having done delete processing The selection interface of file.The backup information of predetermined file can include the thumbnail of predetermined file, can also include file name Etc. the information that can identify predetermined file.User can select to need the file recovered.
In some optional implementations of the present embodiment, the selection that the predetermined file to having done delete processing is presented connects Mouthful, including:Show the mark for the predetermined file for having done delete processing so that user recovers to have done delete processing in selection interface Predetermined file.If being not detected by recovery operation of the user to the mark in selection interface within the predetermined time, delete Backup file.The predetermined time is to keep for user's to be used to recover going back on one's word the time for deletion by mistake, if user is in the time of going back on one's word It is interior that file is recovered without selection, then it is that sincerity will delete this document then to think the user, now deletes and has backed up File to save memory space., will if user selects to recover file within the time of going back on one's word within the predetermined time Predetermined file is returned under original path, and the mark of predetermined file is deleted in interface is selected.
Step 204, in response to by selecting interface to be deleted to having done the recovery request of the predetermined file of delete processing Except the predetermined file of processing is recovered into original path.
In the present embodiment, user, which can enter in the file at the interface shown in Fig. 3 b, clicks on the text that selection needs to recover Part, then can be by the original path before selected file access pattern to deletion.Can also be to the backup of recovered file File is deleted to save space.
In some optional implementations of the present embodiment, if backup file is compressed, receiving to having done During the recovery request of the predetermined file of delete processing, backup file is decompressed.
In some optional implementations of the present embodiment, the predetermined file for having done delete processing is recovered to original road In footpath, including:The predetermined file of delete processing file of the same name is created and done under original path, and will do delete processing The content of predetermined file copy in file of the same name;Or according to the content of the predetermined file for having done delete processing original Under path generation recover file, and by recover file filename be revised as having done delete processing predetermined file filename; Or backup file is moved in original path.
With continued reference to Fig. 3 c, Fig. 3 c are a schematic diagrames according to the application scenarios of the document handling method of the present embodiment. In Fig. 3 c application scenarios, mobile terminal is based on Linux/Unix kernels, using Virtual File System (VFS, Virtual File System) for various disk file systems provide a general interface.Specifically, Virtual File System is one Kernel software layer, called using the Unix system of standard and be written and read the different file on different physical mediums, shielded The otherness of underlying file systems and physical medium is covered.File system based on disk uses EXT4 (Fourth more Extended filesystem, forth generation extension file system).One kind concrete implementation side in Android mobile phone is provided below Case, scheme are illustrated when discussing by taking EXT4 as an example.
In original solution, during T1, start a process A and carry out deleting file operation 301, such as deleted File be file A, be stored in/sdcard/Test/A.During T2, the step of directory entry (dentry) information for deleting file A is performed Rapid 302, store path/sdcard/Test is such as now accessed, it is found that file A has been not present.During T3, perform file A index Information (inode) is added to orphan's chained list (orphan list) step 303.During T4, because no other processes take file A, therefore perform the step 304 of releasing document A disk space.During T5, perform file A index information in orphan's chained list The step 305 of removal.During T6, system carries out operation of winding up, and performs step 306 of resource reclaim etc..
In the solution of the application, step 300 is performed during T0, on the one hand, start monitoring process B, monitoring is deleted (delete) operated with newly-built (create), it is generally the case that user need not simultaneously be monitored to whole memory space file And recovery, and only to some specific catalogues, such as photo is stored, the catalogue such as proprietary documents is handled;On the other hand, start File operation process C, (open) operation is opened to the file in monitored directory, when open files, file can be got Descriptor (fd, file descriptor), gets filec descriptor, it is possible to file is carried out to open/read/write/closing (open/read/write/close) operation such as, such as it is fd to open the filec descriptor that file A is obtained.When monitoring process is examined Measure when having new file operation in the catalogue of setting, it is notified that file operation process carries out opening behaviour to newly-built file Make.During T1, with original solution T1, start a process A and carry out deletion file operation, such as the file deleted is File A, it is stored in/sdcard/Test/A.During T2, with original solution T2, deletion file A directory entry (dentry) Information, store path/sdcard/Test is such as now accessed, it is found that file A has been not present.During T3, with original solution T3, file A index information (inode) is added to orphan's chained list (orphan list).During T4, because process C is still opened File A, now will not releasing document A disk space, and perform step 3004:Monitoring process B is by monitoring and scanning is found File A filec descriptor fd.During T5, step 3005 is performed:By fd by the default backup directory of file A copy content. During T6, after the completion of copy backup, step 3006 is performed:Close file A.During T7, with original solution T4, due to there is no it Its process takes file A, meeting releasing document A disk space.During T8, with original solution T5, file A index is believed Breath removes in orphan's chained list.During T9, with original solution T6, system carries out operation of winding up, and carries out resource reclaim etc.. In processing procedure, the Map information such as directory entry, fd and default backup directory can be established, for the operation such as scanning and recovering.
The method that above-described embodiment of the application provides handles seizure condition by making predetermined file in advance, therefore can be Backup processing before system-kill file, is deleted again by system after back-up processing, so as to not change system interface In the case of, the file deleted in any app is recovered.
With further reference to Fig. 4, it illustrates the flow 400 of another of document handling method embodiment.This document processing The flow 400 of method, comprises the following steps:
Step 401, it is corresponding with predetermined file standby to establish in predetermined areas that hard link operation is carried out to predetermined file Part directory entry.
In the present embodiment, after establishing backup directory item, for operating system during recovery fiel, discovery has it His hard link can access this document, and recovery fiel process is suspended.
Step 402, the backup information of predetermined file is recorded.
In the present embodiment, backup information comprises at least original path and filename.Backup information may also include to be deleted The information such as the thumbnail of file.Backup information can be used for recovering the file deleted.
Step 403, the backup information for the predetermined file for having done delete processing is obtained, presents and makes a reservation for having done delete processing The selection interface of file.
In the present embodiment, recycle bin as shown in Figure 3 b, if predetermined file has done delete processing, in recycle bin The icon for the predetermined file for having done delete processing is shown in file, and the file of file counts and has respective change, uses The interface that the predetermined file of delete processing has been done in selection is presented after clicking to enter file in family, i.e., makes a reservation for having done delete processing The selection interface of file.The backup information of predetermined file can include the thumbnail of predetermined file, can also include file name Etc. the information that can identify predetermined file.User can select to need the file recovered.
Step 404, in response to by selecting interface to having done the recovery request of the predetermined file of delete processing, create with it is former Beginning directory entry identical directory entry, delete backup directory item.
In the present embodiment, the original path in the backup information of record and file name creation and original directory item phase Same directory entry, and delete backup directory item.
Figure 4, it is seen that compared with embodiment corresponding to Fig. 2, the flow of the document handling method in the present embodiment 400 highlight by directory entry carry out file deletion after recover the step of.Thus, the scheme of the present embodiment description can introduce more Restoration methods after more files is deleted, so as to realize that carrying out different recoveries for different file types is handled.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides a kind of file process dress The one embodiment put, the device embodiment is corresponding with the embodiment of the method shown in Fig. 2, and the device specifically can apply to respectively In kind electronic equipment.
As shown in figure 5, the document handling apparatus 500 of the present embodiment includes:Take unit 501, backup units 502, present Unit 503 and recovery unit 504.Wherein, unit 501 is taken to be used to make predetermined file be in seizure condition;Backup units 502 are used In the processing that backuped to predetermined file;Display unit 503 is used for the backup information for obtaining the predetermined file for having done delete processing, is in Now to the selection interface for the predetermined file for having done delete processing;Recovery unit 504 is used in response to by selecting interface to having done The recovery request of the predetermined file of delete processing, the predetermined file for having done delete processing is recovered into original path.
In the present embodiment, the occupancy unit 501 of document handling apparatus 500, backup units 502, display unit 503 and extensive The specific processing of multiple unit 504 may be referred to Fig. 2 and correspond to step 201, step 202, step 203, step 204 in embodiment.
In some optional implementations of the present embodiment, predetermined file includes:Under specified type or assigned catalogue File, specified type includes following at least one:Picture, video, music, document, application program.
In some optional implementations of the present embodiment, predetermined file be user by for select file type or What the interface of file directory was specified.
In some optional implementations of the present embodiment, take unit 501 and be further used for:Open predetermined file.
In some optional implementations of the present embodiment, backup units 502 are further used for:Record predetermined file Backup information, backup information comprise at least original path and filename;Predetermined file is moved or copied into presumptive area with life Into backup file.
In some optional implementations of the present embodiment, display unit 503 is further used for:Shown in selection interface The mark of the predetermined file of delete processing has been done so that user recovers to have done the predetermined file of delete processing.
In some optional implementations of the present embodiment, the device 500 also includes:Backup file deletes unit (not Show), if for being not detected by recovery operation of the user to the mark in selection interface within the predetermined time, delete backup File.
In some optional implementations of the present embodiment, the device 500 also includes closing unit (not shown), is used for After the processing that backuped to predetermined file, predetermined file is closed.
In some optional implementations of the present embodiment, the device 500 also includes compression unit (not shown), is used for When meeting at least one of following, compress backup file:Each file size sum in presumptive area exceedes predetermined total size threshold Value, backup file size exceed predetermined single-piece size threshold value, backup file in predetermined areas the existing time more than predetermined Time threshold.
In some optional implementations of the present embodiment, the device 500 also includes decompression units (not shown), is used for In response to by selecting interface to decompress backup file to having done the recovery request of the predetermined file of delete processing.
In some optional implementations of the present embodiment, recovery unit 504 is further used for:Created under original path The predetermined file of delete processing file of the same name is built and done, and the content for the predetermined file for having done delete processing is copied to together In the file of name;Or generated according to the content for the predetermined file for having done delete processing under original path and recover file, and will The filename of recovery file is revised as having done the filename of the predetermined file of delete processing;Or backup file is moved to original In path.
In some optional implementations of the present embodiment, take unit 501 and be further used for:Predetermined file is carried out Hard link is operated to establish backup directory item corresponding with predetermined file in predetermined areas.
In some optional implementations of the present embodiment, backup units 502 are further used for:Record predetermined file Backup information, backup information comprise at least original path and filename.
In some optional implementations of the present embodiment, recovery unit 504 is further used for:Establishment and original directory Item identical directory entry;Delete backup directory item.
With further reference to Fig. 6, it illustrates the flow 600 of another of document handling method embodiment.Implement at file The document handling system of reason method includes system unit and functional unit, the flow 600 of this document processing method, including following step Suddenly:
Step 601, functional unit receives the request of selected predetermined file.
In the present embodiment, user specifies predetermined file by the interface for select file type or file directory.
Step 602, functional unit makes predetermined file be in seizure condition.
In the present embodiment, functional unit can be by opening predetermined file or the side of new directory entry being created for predetermined file Formula makes predetermined file be in seizure condition.
Step 603, functional unit backups processing to predetermined file.
In the present embodiment, the predetermined file taken by unfolding mode can be replicated or be moved to pre- by functional unit Determine region to be backed up.Backup information, backup are recorded for the predetermined file taken by creating new directory entry mode Information comprises at least original path and filename.
Step 604, functional unit and system unit receive removal request.
In the present embodiment, user sends the removal request for deleting file to be deleted.
Step 605, system unit carries out delete processing to file to be deleted.
In the present embodiment, delete processing includes:If detecting that the file to be deleted is in seizure condition, suspend That reclaims the file to be deleted uses space.
Step 606, functional unit is presented to the selection interface for the predetermined file for having done delete processing.
In this example it is shown that the file at interface as shown in Figure 3 b, deposited in file and done delete processing The icon of predetermined file.
Step 607, the recovery request of the predetermined file to having done delete processing is received.
In the present embodiment, user, which can enter in the file at the interface shown in Fig. 3 b, clicks on the text that selection needs to recover Part, then can be by the original path before selected file access pattern to deletion.
Step 608, the predetermined file for having done delete processing is recovered into original path.
In the present embodiment, it can be recovered by backing up file mode, can also be recovered by a mode that creaties directory.
Below with reference to Fig. 7, it illustrates suitable for for realizing the computer system 700 of the mobile terminal of the embodiment of the present application Structural representation.Mobile terminal shown in Fig. 7 is only an example, to the function of the embodiment of the present application and should not use model Shroud carrys out any restrictions.
As shown in fig. 7, computer system 700 includes CPU (CPU) 701, it can be read-only according to being stored in Program in memory (ROM) 702 or be loaded into program in random access storage device (RAM) 703 from storage part 708 and Perform various appropriate actions and processing.In RAM 703, also it is stored with system 700 and operates required various programs and data. CPU 701, ROM 702 and RAM 703 are connected with each other by bus 704.Input/output (I/O) interface 705 is also connected to always Line 704.
I/O interfaces 705 are connected to lower component:Importation 707 including keyboard, touch-screen etc.;Including such as touching The output par, c 707 of screen and loudspeaker etc.;Storage part 708 including hard disk etc.;And including such as LAN card, modulatedemodulate Adjust the communications portion 709 of the NIC of device etc..Communications portion 709 performs communication process via the network of such as internet. Driver 710 is also according to needing to be connected to I/O interfaces 705.Detachable media 711, such as disk, CD, magneto-optic disk, semiconductor Memory etc., it is arranged on as needed on driver 710, in order to which the computer program read from it is pacified as needed Load storage part 708.
Especially, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product, it includes being carried on computer-readable medium On computer program, the computer program include be used for execution flow chart shown in method program code.In such reality To apply in example, the computer program can be downloaded and installed by communications portion 709 from network, and/or from detachable media 711 are mounted.When the computer program is performed by CPU (CPU) 701, perform what is limited in the present processes Above-mentioned function.It should be noted that computer-readable medium described herein can be computer-readable signal media or Computer-readable recording medium either the two any combination.Computer-readable recording medium for example can be --- but Be not limited to --- electricity, magnetic, optical, electromagnetic, system, device or the device of infrared ray or semiconductor, or it is any more than combination. The more specifically example of computer-readable recording medium can include but is not limited to:Electrical connection with one or more wires, Portable computer diskette, hard disk, random access storage device (RAM), read-only storage (ROM), erasable type may be programmed read-only deposit Reservoir (EPROM or flash memory), optical fiber, portable compact disc read-only storage (CD-ROM), light storage device, magnetic memory Part or above-mentioned any appropriate combination.In this application, computer-readable recording medium can any be included or store The tangible medium of program, the program can be commanded the either device use or in connection of execution system, device.And In the application, computer-readable signal media can include believing in a base band or as the data that a carrier wave part is propagated Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer Any computer-readable medium beyond readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit use In by instruction execution system, device either device use or program in connection.Included on computer-readable medium Program code any appropriate medium can be used to transmit, include but is not limited to:Wirelessly, electric wire, optical cable, RF etc., Huo Zheshang Any appropriate combination stated.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of the various embodiments of the application, method and computer journey Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation The part of one module of table, program segment or code, the part of the module, program segment or code include one or more use In the executable instruction of logic function as defined in realization.It should also be noted that marked at some as in the realization replaced in square frame The function of note can also be with different from the order marked in accompanying drawing generation.For example, two square frames succeedingly represented are actually It can perform substantially in parallel, they can also be performed in the opposite order sometimes, and this is depending on involved function.Also to note Meaning, the combination of each square frame and block diagram in block diagram and/or flow chart and/or the square frame in flow chart can be with holding Function as defined in row or the special hardware based system of operation are realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit can also be set within a processor, for example, can be described as:A kind of processor bag Include and take unit, backup units, display unit and recovery unit.Wherein, the title of these units not structure under certain conditions The paired restriction of the unit in itself, for example, backup units are also described as the " list for the processing that backuped to the predetermined file Member ".
As on the other hand, present invention also provides a kind of computer-readable medium, the computer-readable medium can be Included in device described in above-described embodiment;Can also be individualism, and without be incorporated the device in.Above-mentioned calculating Machine computer-readable recording medium carries one or more program, when said one or multiple programs are performed by the device so that should Device:Predetermined file is set to be in seizure condition;Backup processing to predetermined file;The predetermined file of delete processing has been done in acquisition Backup information, the selection interface of the predetermined file to having done delete processing is presented;In response to by selecting interface to having deleted The recovery request of the predetermined file of processing, the predetermined file for having done delete processing is recovered into original path.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.People in the art Member should be appreciated that invention scope involved in the application, however it is not limited to the technology that the particular combination of above-mentioned technical characteristic forms Scheme, while should also cover in the case where not departing from the inventive concept, carried out by above-mentioned technical characteristic or its equivalent feature The other technical schemes for being combined and being formed.Such as features described above has similar work(with (but not limited to) disclosed herein The technical scheme that the technical characteristic of energy is replaced mutually and formed.

Claims (21)

1. a kind of document handling method, it is characterised in that methods described includes:
Backup processing to the predetermined file;
The backup information for the predetermined file for having done delete processing is obtained, is presented to the predetermined file for having done delete processing Selection interface;
In response to, to the recovery request of the predetermined file for having done delete processing, having been deleted by the selection interface by described Except the predetermined file of processing is recovered into original path.
2. according to the method for claim 1, it is characterised in that the predetermined file includes:
File under specified type or assigned catalogue, the specified type include following at least one:Picture, video, music, Document, application program.
3. according to the method for claim 1, it is characterised in that the predetermined file is that user passes through for select file class What the interface of type or file directory was specified.
4. according to the method for claim 1, it is characterised in that it is described predetermined file is in seizure condition, including:
Open the predetermined file.
5. according to the method for claim 4, it is characterised in that the processing that backuped to the predetermined file, including:
The backup information of the predetermined file is recorded, the backup information comprises at least original path and filename;
The predetermined file is moved or copied into presumptive area to generate backup file.
6. according to the method for claim 1, it is characterised in that the presentation is to the predetermined file for having done delete processing Selection interface, including:
Show the mark for the predetermined file for having done delete processing so that user recovers to have done delete processing in selection interface The predetermined file.
7. according to the method for claim 6, it is characterised in that methods described also includes:
If being not detected by recovery operation of the user to the mark in the selection interface within the predetermined time, institute is deleted State backup file.
8. the method according to claim 5 or 7, it is characterised in that after the processing that backuped to the predetermined file, institute Stating method also includes:
Close the predetermined file.
9. the method according to claim 5 or 7, it is characterised in that methods described also includes:
When meeting at least one of following, the backup file is compressed:
Each file size sum in the presumptive area exceedes predetermined total size threshold value, and the backup file size exceedes predetermined Single-piece size threshold value, backup file time present in the presumptive area exceed predetermined time threshold.
10. according to the method for claim 9, it is characterised in that methods described also includes:
In response to, to the recovery request of the predetermined file for having done delete processing, decompressing the backup by the selection interface File.
11. the method according to claim 5 or 7, it is characterised in that described by the predetermined file for having done delete processing Recover into original path, including:
The file of the same name with the predetermined file for having done delete processing is created under the original path, and has been deleted described Except the content of the predetermined file of processing is copied in the file of the same name;Or
Generated according to the content of the predetermined file for having done delete processing under the original path and recover file, and by described in The filename for recovering file is revised as the filename of the predetermined file for having done delete processing;Or
The backup file is moved in the original path.
12. according to the method for claim 1, it is characterised in that it is described predetermined file is in seizure condition, including:
Hard link operation is carried out to the predetermined file and corresponding with the predetermined file backs up mesh to establish in predetermined areas Record item.
13. according to the method for claim 12, it is characterised in that the processing that backuped to the predetermined file, including:
The backup information of the predetermined file is recorded, the backup information comprises at least original path and filename.
14. according to the method for claim 13, it is characterised in that described that the predetermined file for having done delete processing is extensive Again into original path, including:
Create and the original directory item identical directory entry;
Delete the backup directory item.
15. a kind of document handling apparatus, it is characterised in that described device includes:
Backup units, for the processing that backuped to the predetermined file;
Display unit, for obtaining the backup information for the predetermined file for having done delete processing, present and deleted described The selection interface of the predetermined file of processing;
Recovery unit, in response to being asked by recovery of the selection interface to the predetermined file for having done delete processing Ask, the predetermined file for having done delete processing is recovered into original path.
16. a kind of document handling method, it is characterised in that methods described includes:
System unit does delete processing after the removal request of instruction deletion file to be deleted is received to the file, wherein, The delete processing includes:If detecting that the file to be deleted is in seizure condition, the text to be deleted is reclaimed in pause Part uses space;
The functional unit backups processing to the predetermined file;
The functional unit obtains the backup information for the predetermined file for having done delete processing, presents and has been done to described at deletion The selection interface of the predetermined file of reason;
Recovery request of the functional unit by the selection interface to the predetermined file for having done delete processing, and The predetermined file for having done delete processing is recovered into original path.
17. according to the method for claim 16, it is characterised in that the removal request comes from other application.
18. a kind of document handling system, it is characterised in that the system includes:
System unit, for after the removal request of instruction deletion file to be deleted is received, delete processing to be done to the file, Wherein, the delete processing includes:If detecting that the file to be deleted is in seizure condition, wait to delete described in pause recovery Space is used except file;
The functional unit is additionally operable to the processing that backuped to the predetermined file;
The functional unit is additionally operable to obtain the backup information for the predetermined file for having done delete processing, presents and has been done to described The selection interface of the predetermined file of delete processing;
The functional unit is additionally operable to by recovery of the selection interface to the predetermined file for having done delete processing Request, and the predetermined file for having done delete processing is recovered into original path.
19. according to the method for claim 18, it is characterised in that the removal request comes from other application.
20. a kind of mobile terminal, including:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are by one or more of computing devices so that one or more of processors are held Method of the row as described in any in claim 1-14.
21. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is by processor The method as described in any in claim 1-14 is performed during execution.
CN201710607234.6A 2017-07-24 2017-07-24 File processing method and device Active CN107402846B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710607234.6A CN107402846B (en) 2017-07-24 2017-07-24 File processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710607234.6A CN107402846B (en) 2017-07-24 2017-07-24 File processing method and device

Publications (2)

Publication Number Publication Date
CN107402846A true CN107402846A (en) 2017-11-28
CN107402846B CN107402846B (en) 2021-02-26

Family

ID=60402466

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710607234.6A Active CN107402846B (en) 2017-07-24 2017-07-24 File processing method and device

Country Status (1)

Country Link
CN (1) CN107402846B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874591A (en) * 2018-06-19 2018-11-23 Oppo广东移动通信有限公司 Document handling method and Related product
CN110659254A (en) * 2019-09-27 2020-01-07 浪潮电子信息产业股份有限公司 Deleted file recovery method, device, equipment and readable storage medium
CN111045995A (en) * 2019-10-18 2020-04-21 苏州浪潮智能科技有限公司 File protection method, equipment and medium based on soft link
CN112995015A (en) * 2019-12-17 2021-06-18 腾讯科技(深圳)有限公司 Message sending method, device, terminal and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101273354A (en) * 2005-09-26 2008-09-24 皇家飞利浦电子股份有限公司 Recycle bin function
CN103218131A (en) * 2013-03-26 2013-07-24 广东欧珀移动通信有限公司 Method for preventing pictures from being deleted by mistake on mobile terminal
US20140168095A1 (en) * 2012-12-14 2014-06-19 Barnesandnoble.Com Llc Touch sensitive device with pinch-based archive and restore functionality
CN105930436A (en) * 2016-04-19 2016-09-07 乐视控股(北京)有限公司 File recovery method and device for mobile terminal equipment
CN106096447A (en) * 2016-06-15 2016-11-09 杭州华三通信技术有限公司 A kind of document protection method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101273354A (en) * 2005-09-26 2008-09-24 皇家飞利浦电子股份有限公司 Recycle bin function
US20140168095A1 (en) * 2012-12-14 2014-06-19 Barnesandnoble.Com Llc Touch sensitive device with pinch-based archive and restore functionality
CN103218131A (en) * 2013-03-26 2013-07-24 广东欧珀移动通信有限公司 Method for preventing pictures from being deleted by mistake on mobile terminal
CN105930436A (en) * 2016-04-19 2016-09-07 乐视控股(北京)有限公司 File recovery method and device for mobile terminal equipment
CN106096447A (en) * 2016-06-15 2016-11-09 杭州华三通信技术有限公司 A kind of document protection method and device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874591A (en) * 2018-06-19 2018-11-23 Oppo广东移动通信有限公司 Document handling method and Related product
CN110659254A (en) * 2019-09-27 2020-01-07 浪潮电子信息产业股份有限公司 Deleted file recovery method, device, equipment and readable storage medium
CN110659254B (en) * 2019-09-27 2022-04-22 浪潮电子信息产业股份有限公司 Deleted file recovery method, device, equipment and readable storage medium
CN111045995A (en) * 2019-10-18 2020-04-21 苏州浪潮智能科技有限公司 File protection method, equipment and medium based on soft link
CN112995015A (en) * 2019-12-17 2021-06-18 腾讯科技(深圳)有限公司 Message sending method, device, terminal and storage medium
CN112995015B (en) * 2019-12-17 2022-07-05 腾讯科技(深圳)有限公司 Message sending method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN107402846B (en) 2021-02-26

Similar Documents

Publication Publication Date Title
US7730035B2 (en) Method, system and program product for managing a file system that includes an archive
CN103946844B (en) For the method and system across cluster file system synchronized update
JP5449390B2 (en) Separation of received information on locked devices
CN107402846A (en) Document handling method and device
US20170024286A1 (en) Single index to query multiple backup formats
US9864736B2 (en) Information processing apparatus, control method, and recording medium
CN110162517A (en) Data migration method, device, equipment and computer readable storage medium
US20140304313A1 (en) Terminal and method for providing application-related data
CN106775924A (en) Virtual machine starts method and apparatus
JP6775510B2 (en) Terminals, terminal control methods, and programs
EP3309695A1 (en) Information processing apparatus, document display method, document display system, and program
Lohiya et al. Survey on mobile forensics
CN115185967A (en) Data processing method and device, electronic equipment and storage medium
CN109472540B (en) Service processing method and device
JP2021515299A (en) A system for chronological out-of-place updates, a method for chronological out-of-place updates, and a computer program for chronological out-of-place updates.
CN110119386A (en) Data processing method, data processing equipment, medium and calculating equipment
CN106484779B (en) File operation method and device
US20150163326A1 (en) Approaches for remotely unzipping content
CN106991020A (en) Effective processing of the file system object backed up to image level
CN110147184B (en) Navigation backspacing method and control
CN106201779A (en) Picture processing method and device and mobile terminal
CN110018761B (en) Method, device and terminal for managing recently used files
WO2023020328A1 (en) Object manipulating method and apparatus, and electronic device
CN112262378A (en) Hydration of a hierarchy of dehydrated documents
CN113821488B (en) Container mirror image migration compression method, device, equipment and medium

Legal Events

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