CN107766005B - Electronic file processing method and device and electronic terminal - Google Patents

Electronic file processing method and device and electronic terminal Download PDF

Info

Publication number
CN107766005B
CN107766005B CN201711066057.1A CN201711066057A CN107766005B CN 107766005 B CN107766005 B CN 107766005B CN 201711066057 A CN201711066057 A CN 201711066057A CN 107766005 B CN107766005 B CN 107766005B
Authority
CN
China
Prior art keywords
file
deleted
grade
recovery area
threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711066057.1A
Other languages
Chinese (zh)
Other versions
CN107766005A (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.)
Pudao Shanghai Information Technology Co Ltd
Original Assignee
Pudao Shanghai Information 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 Pudao Shanghai Information Technology Co ltd filed Critical Pudao Shanghai Information Technology Co ltd
Priority to CN201711066057.1A priority Critical patent/CN107766005B/en
Publication of CN107766005A publication Critical patent/CN107766005A/en
Application granted granted Critical
Publication of CN107766005B publication Critical patent/CN107766005B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides an electronic file processing method, an electronic file processing device and an electronic terminal, and solves the problems that the existing electronic file is directly deleted or moved to other external equipment so as to cause unrecoverability or troublesome operation when the storage space is insufficient. The electronic file processing method provided by the invention comprises the following steps: moving the file to be deleted to a recovery area of the electronic terminal according to the file deletion instruction to form a deleted file; classifying the deleted files in the recovery area according to a preset grade condition; and processing the deleted file according to the grade.

Description

Electronic file processing method and device and electronic terminal
Technical Field
The invention relates to the technical field of electronic terminals, in particular to an electronic file processing method and device and an electronic terminal.
Background
With the development of electronic terminal technology, electronic terminals such as smart phones and tablet computers have more and more functions, and the functions have gradually become common tools for communication, entertainment, reading and even office work, which are essential in people's life. However, the storage space of these terminals is very limited, and when there are many files stored, the available space of the memory is insufficient, and some files are often required to be transferred to other external storage devices such as a computer and a usb disk or deleted directly, so as to increase the available storage space of the electronic terminal. This is not only cumbersome, but the deleted files cannot be recovered.
Disclosure of Invention
In view of this, embodiments of the present invention provide an electronic file processing method, an electronic file processing apparatus, and an electronic terminal, which aim to solve the problem that when the storage space is insufficient, the existing electronic file is directly deleted or moved to another external device, which causes unrecoverable or troublesome operation.
One aspect of the present invention provides an electronic document processing method, including: moving the file to be deleted to a recovery area of the electronic terminal according to the file deletion instruction to form a deleted file; classifying the deleted files in the recovery area according to a preset grade condition; and processing the deleted file according to the grade.
In one embodiment, the recovery area includes a first recovery area and a second recovery area, and moving the file to be deleted to the recovery area according to the file deletion instruction includes moving the file to be deleted to the first recovery area according to the file deletion instruction, where the first recovery area is located in an internal storage space of the electronic terminal, and the second recovery area is located in an external storage space of the electronic terminal.
In one embodiment, the levels are divided into five levels of level 1, level 2, level 3, level 4 and level 5 with gradually reduced levels according to preset level requirements, and the processing of the deleted file according to the levels comprises: deeply compressing the deleted file with the level 1 by using a first compression rate; shallow compressing the deleted file of level 2 with a second compression rate larger than the first compression rate; transferring the deleted file with the grade of 3 from the first recovery area to the second recovery area; no processing is done for the deleted files of levels 4 and 5.
In one embodiment, the ranking condition includes a value requirement of an attribute of the deleted file, and ranking the deleted file in the recovery area according to a preset ranking condition includes: acquiring an attribute value of a deleted file; and dividing the deleted files into corresponding levels according to the preset attribute value requirements of each level.
In one embodiment, the attribute of the deleted file includes a deletion duration and a file size of the deleted file, and the level condition of level 1 is that the deletion duration of the deleted file is greater than a third duration threshold; the grade 2 grade condition is that the deletion time length of the deleted file is between the second time length threshold value and the third time length threshold value, and the file threshold value is greater than the third file threshold value; the grade condition of grade 3 is that the deletion time length of the deleted file is between a first time length threshold value and a second time length threshold value, and the file threshold value is greater than a second file threshold value; the grade 4 is that the deletion duration of the deleted file is less than a first duration threshold and the file threshold is greater than a first file threshold; the deleted files which do not meet the grade conditions of grade 1, grade 2, grade 3 and grade 4 in the recovery area are grade 5 deleted files; wherein the third duration threshold > the second duration threshold > the first duration threshold, and the first file threshold > the second file threshold > the third file threshold.
In one embodiment, the electronic document processing method further comprises: detecting whether an available space value in the first recovery area is smaller than a preset first space threshold value or not and whether an available space value in the second recovery area is smaller than a preset second space threshold value or not; when detecting that the available space value in the first recovery area is smaller than a first space threshold, moving the corresponding deleted files in the first recovery area to a second recovery area according to the sequence from high level to low level until the available space value in the first recovery area is larger than the first space threshold, and when the available space value in the second recovery area is smaller than a second space threshold, deleting the corresponding deleted files in the second recovery area from the second recovery area according to the sequence from high level to low level until the available space value in the second recovery area is larger than the second space threshold.
Another aspect of the present invention provides an electronic document processing apparatus, including: the mobile module is used for moving the file to be deleted to a recovery area of the electronic terminal according to the file deletion instruction so that the file to be deleted becomes a deleted file; the grade dividing module is used for dividing the grade of the deleted files in the recovery area according to a preset grade condition; and the grade processing module is used for processing the deleted files according to the grade.
In one embodiment, the recovery area includes a first recovery area and a second recovery area, and the moving module moves the file to be deleted to the recovery area according to the file deletion instruction and moves the file to be deleted to the first recovery area according to the file deletion instruction, where the first recovery area is located in an internal storage space of the electronic terminal and the second recovery area is located in an external storage space of the electronic terminal.
In one embodiment, the levels are classified into five levels, i.e., level 1, level 2, level 3, level 4 and level 5, which are gradually reduced according to preset level requirements, and the processing of the deleted file by the level processing module according to the levels includes: deeply compressing the deleted file with the level 1 by using a first compression rate; shallow compressing the deleted file of level 2 with a second compression rate larger than the first compression rate; transferring the deleted file with the grade of 3 from the first recovery area to the second recovery area; no processing is done for the deleted files of levels 4 and 5.
In one embodiment, the ranking condition includes a value requirement of an attribute of the deleted file, and the ranking module includes: an acquisition unit configured to acquire an attribute value of a deleted file; and the dividing unit is used for dividing the deleted files into corresponding grades according to the preset attribute value-taking requirements of each grade.
In one embodiment, the electronic document processing apparatus further comprises: the detection module is used for detecting whether the available space value in the first recovery area is smaller than a preset first space threshold value or not and whether the available space value in the second recovery area is smaller than a preset second space threshold value or not; and the space processing module is used for moving the corresponding deleted files in the first recovery area to the second recovery area according to the sequence from high level to low level when the detection module detects that the available space value in the first recovery area is smaller than the first space threshold, until the available space value in the first recovery area is larger than the first space threshold, and deleting the corresponding deleted files in the second recovery area from the second recovery area according to the sequence from high level to low level when the available space value in the second recovery area is smaller than the second space threshold until the available space value in the second recovery area is larger than the second space threshold.
The embodiment of the present invention further provides an electronic terminal, which includes a processor, a memory, and a computer program stored in the memory and executed by the processor, and when the processor executes the computer program, the steps described in any one of the above methods are implemented.
Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps described in any of the above methods.
According to the electronic file processing method provided by the embodiment of the invention, a part of the area of the storage space of the electronic terminal is preset as the recovery area, and the file to be deleted pointed by the file deletion instruction is moved to the recovery area for storage in response to the file deletion instruction of the user, so that the file loss caused by mistaken deletion can be prevented, and the file retrieving operation by the user is facilitated. The method also grades the deleted files in the recovery area, applies different processing methods aiming at different grades, can realize the fine management of the deleted files, improves the utilization rate of the storage space, and avoids the trouble of transferring some files to external storage equipment due to insufficient use space.
Drawings
Fig. 1 is a flowchart illustrating an electronic document processing method according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating an electronic document processing method according to another embodiment of the present invention.
Fig. 3 is a flowchart illustrating an electronic document processing method according to another embodiment of the present invention.
Fig. 4 is a schematic structural diagram of an electronic document processing apparatus according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of an electronic document processing apparatus according to another embodiment of the present invention.
Fig. 6 is a schematic structural diagram of an electronic document processing apparatus according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart illustrating an electronic document processing method according to an embodiment of the present invention. The electronic file processing method can be suitable for mobile terminals such as smart phones, tablet computers and intelligent wearable devices, and can also be suitable for non-mobile terminals such as desktop computers and all-in-one machines. As shown in fig. 1, the method comprises the steps of:
step 101: and moving the file to be deleted to a recovery area according to the file deletion instruction to form a deleted file.
And presetting a part of area of the storage space of the electronic terminal as a recovery area for storing the files deleted under the instruction of the user, and moving the files to be deleted to the recovery area to form deleted files. It is understood that when the electronic terminal is a mobile terminal such as a smart phone, the storage space may include a storage space of the body and a storage space of the inserted memory card.
And in response to a file deletion instruction triggered by a user, when the file to be deleted is moved to the recovery area from the original storage position, the file attribute information such as the size and the type of the file and the time of moving the file to the recovery area can be recorded at the same time.
Step 102: and grading the deleted files in the recovery area according to a preset grade condition.
Step 103: and carrying out corresponding processing on the deleted file according to the grade.
When the deleted files in the recovery area are processed, different processing methods are applied to the files of different levels, for example, the files of higher level are deleted or compressed, and the files of lower level are kept unchanged.
The preset level condition may be an attribute requirement of the deleted file, and the attribute may specifically be information such as a size, a type, or a time interval (i.e., deletion duration) at which the distance from the deleted file to the recovery area is moved. For example, the deleted file is classified into a higher rank based on the deletion time length, and a file having a longer time interval from the file being moved to the collection area is classified into a higher rank. Certainly, the deleted files can be classified according to the file information in the aspects of deletion duration and file size, then different processing methods are performed on the files in different grades, and the method for considering the consideration can achieve more refined management on the deleted files in the recovery area.
In addition, since the files deleted by the user may be various types such as short messages, call records, Office documents, pictures, audio, video, or APPs (applications), and the importance of various types of files to the user may be different, the deleted files may be classified according to the importance, and then processed differently according to the different grades.
According to the electronic file processing method provided by the embodiment of the invention, a part of the area of the storage space of the electronic terminal is preset as the recovery area, and the file to be deleted pointed by the file deletion instruction is moved to the recovery area for storage in response to the file deletion instruction of the user, so that the file loss caused by mistaken deletion can be prevented, and the file retrieving operation by the user is facilitated. The method also grades the deleted files in the recovery area, applies different processing methods aiming at different grades, can realize the fine management of the deleted files, improves the utilization rate of the storage space, and avoids the trouble of transferring some files to external storage equipment due to insufficient use space.
Fig. 2 is a flowchart illustrating an electronic document processing method according to another embodiment of the present invention. As shown in fig. 2, the method comprises the steps of:
step 201: and moving the file to be deleted to the first recovery area according to the file deletion instruction to form a deleted file.
In this embodiment, the recycling area includes a first recycling area and a second recycling area, wherein the first recycling area is located in an internal memory of the electronic terminal, and the second recycling area is located in an external memory of the electronic terminal. When a file deletion instruction triggered by a user is received, the file to be deleted is moved to the first recovery area from the original storage position in the embodiment.
Step 202: the deleted files in the recovery area are graded according to the value requirements of the attributes of the deleted files, and the grades are graded into five grades of grade 1, grade 2, grade 3, grade 4 and grade 5, wherein the grades are gradually reduced according to the preset attribute value requirements.
Step 203: deeply compressing the deleted file with the level of 1, wherein the compression rate is W1; shallow compression is carried out on the deleted file with the level 2, and the compression rate is W2; transferring the deleted file with the grade of 3 from the first recovery area to the second recovery area; the deleted files with the grades of 4 and 5 are not processed; wherein W2> W1.
That is, in this embodiment, the level condition is a value requirement of an attribute of the deleted file, where the attribute includes information such as a deletion duration, a file size, or a file type of the deleted file. In one embodiment, step 202 specifically includes: acquiring an attribute value of a deleted file; and dividing the deleted files into corresponding levels according to the preset attribute value requirements of each level.
In a specific embodiment, the attribute of the deleted file includes a deletion duration and a file size of the deleted file. The rule for dividing the deleted file into 5 grades according to the deletion duration and the file size and the processing for each grade are respectively as follows:
the level 1 grade condition is that the deletion time length of the deleted file is greater than a third time length threshold value, the deleted file with the level 1 is subjected to deep compression, and the compression rate is W1;
the level 2 level condition is that the deletion time length of the deleted file is between the second time length threshold and the third time length threshold, the file threshold is larger than the third file threshold, shallow compression is carried out on the deleted file with the level 2, and the compression ratio is W2;
the grade condition of grade 3 is that the deletion time length of the deleted file is between a first time length threshold value and a second time length threshold value, and the file threshold value is larger than a second file threshold value, and the deleted file with the grade of 3 is transferred from the first recovery area to the second recovery area;
the level 4 level condition is that the deletion duration of the deleted file is less than the first duration threshold value, the file threshold value is greater than the first file threshold value, the deleted files which do not meet the level conditions of level 1, level 2, level 3 and level 4 in the recovery area are level 5 deleted files, and the deleted files of levels 4 and 5 are not processed.
The third duration threshold > the second duration threshold > the first duration threshold, the file threshold is a threshold of the file size, the first file threshold > the second file threshold > the third file threshold, and W2> W1.
For the first time length threshold, the second time length threshold, the third time length threshold, and the specific values of the first file threshold, the second file threshold, and the third file threshold, those skilled in the art may set the values according to specific needs or by referring to the preset storage capacity value of the recovery area, and other parameters, which is not limited in the present invention.
The following will specifically illustrate the ranking rule of the method provided in this embodiment and the different processing methods for different ranks executed according to this rule by numerical examples.
In this example, the first, second and third duration thresholds take 72HR, 720HR and 2160HR, respectively, and the first, second and third file thresholds take 500MB, 250MB and 50MB, respectively.
As described above, when a file deletion instruction is received, a file to be deleted is moved to the first reclamation area in the reclamation areas to become a deleted file. If the file size just moved to the reclamation area (the deletion duration is less than 72HR) is more than 500MB, it is classified as a level 4 deleted file, and if the file size is less than 500MB (including 500MB), it is classified into level 5 other than levels 1-4. So no matter what the size of the file just moved to the reclamation area is, it can be left unprocessed and remain in the first reclamation area.
When the deletion duration of the deleted files exceeds 72HR and is less than 720HR (namely when the time stored in the first recovery area is greater than 72HR), the deleted files larger than 250MB are divided into deleted files of class 3, namely the deleted files with larger file sizes, namely the deleted files of the original class 4 and the deleted files of the original class 5 larger than 250MB, and the deleted files can be upgraded into deleted files of class 3 when the time stored in the first recovery area is greater than 72 HR. The level 3 delete file is handled by being transferred from the first reclamation area to the second reclamation area. That is, the first recovery area is used for storing the deleted file for a short time, and the second recovery area is used for storing the deleted file (especially, the deleted file having a large file) for a long time. Therefore, the large-size deleted files are stored in the external memory, and the internal storage space is saved for other applications. Because the access speed of the terminal to the internal memory is higher than that to the external memory, the performance of the whole system is improved in some aspects.
When the deletion time of the deleted file exceeds 720HR and is less than 2160HR, the deleted files larger than 50MB are divided into level 2 deleted files, namely the original level 3 deleted file (the deleted file transferred to the second recovery area) and the original level 5 deleted file larger than 50MB (the deleted file still stored in the first recovery area) can be upgraded into the level 2 deleted file as long as the storage time in the recovery area is larger than 720HR, and the processing mode of the level 2 deleted file is shallow compression, and the compression rate is W2. That is, regardless of whether the deleted file is transferred into the second reclamation area, it is lightly compressed as long as its deletion duration exceeds 720HR and its size is greater than 50 MB. It is understood that the compression ratio refers to the ratio of the size of the file after compression to the size of the file before compression, and the compression ratio is generally smaller as better, but the smaller the compression ratio is, the longer the decompression time is. Therefore, shallow compression operation is performed on the deleted file with the level of 2, so that the storage space can be effectively saved, and the file recovery time can be shortened when the file needs to be recovered.
When the deletion time length of the deleted file exceeds 2160HR, the deleted file stored in any recovery area or large is classified into the level 1 deleted file, and the deleted file is deeply compressed, and the compression rate is W1. That is, in this hierarchical rule, two pieces of file attribute information, namely, the deletion time length and the file size, are taken into consideration at the same time, however, the highest level of deleting a file is finally determined by the deletion time length. As long as a certain time length threshold is exceeded, deep compression is performed on the deleted file, and the longer the deleted file is, the lower the requirement of the user to retrieve the deleted file is possibly, so that the compression ratio is selected to be W1 smaller than W2, the requirement of the user can be met, and meanwhile, the storage space is greatly saved. The specific values of W1 and W2 can be selected by those skilled in the art according to the actual situation, and the invention is not limited thereto.
The electronic file processing method provided by the embodiment of the invention is characterized in that a first recovery area and a second recovery area are respectively arranged in an internal memory and an external memory, wherein the first recovery area is used for storing deleted files in a short time, and the second recovery area is used for storing the deleted files (especially the deleted files with larger files) in a long time. Therefore, the large-size deleted files are stored in the external memory, the internal storage space is saved for other applications, and the performance of the whole system is improved. In addition, the method provided by the embodiment of the invention performs level division on the deleted files in the recovery area according to the file attributes, executes corresponding operations according to different levels, improves the utilization rate of the storage space, compresses the deleted files according to different compression ratios according to different levels, effectively saves the storage space, fully considers the retrieval requirement of a user, performs shallow compression on the deleted files with relatively short deletion time, and can improve the file decompression speed and shorten the file recovery time when the files need to be recovered.
Fig. 3 is a flowchart illustrating an electronic document processing method according to another embodiment of the present invention. In the present embodiment, the steps 301-303 are substantially the same as the steps 201-203 in the embodiment shown in fig. 2, and the description is not repeated. As shown in fig. 3, the present embodiment further includes the following steps 304 and 305 based on the embodiment shown in fig. 2.
Step 304: it is checked whether the value of the space available in the first recycling area B1 is less than a preset first space threshold T1 and whether the value of the space available in the second recycling area B2 is less than a preset second space threshold T2.
Step 305: when detecting that the available space value B1 in the first recovery area is smaller than the first space threshold T1, moving the corresponding deleted files in the first recovery area to the second recovery area in the order from high to low according to the level until the available space value B1 in the first recovery area is larger than the first space threshold T1, and when the available space value B2 in the second recovery area is smaller than the second space threshold T2, deleting the corresponding deleted files in the second recovery area from the second recovery area in the order from high to low according to the level until the available space value B2 in the second recovery area is larger than the second space threshold T2.
The first space threshold T1 and the second space threshold T2 are preset thresholds of the remaining space in the first recovery area and the second recovery area, and may be set differently according to specific requirements, and the values of T1 and T2 may be the same or different, for example, T1 and T2 may be 40% or 50% of the total capacity of the first recovery area and the second recovery area, respectively, which is not limited in this disclosure.
Since the storage space of the first recovery area and the second recovery area is limited, even if the storage space is managed in a refined manner, the storage space is effectively utilized, deleted files in the first recovery area and deleted files in the second recovery area are accumulated after a period of time, and after a certain degree is reached, the recovery areas cannot accommodate more files. Therefore, the deleted files in the first recovery area can be gradually transferred to the second recovery area through the above steps 304 and 305, so that the system keeps running at a high access speed, and the deleted files in the second recovery area reach a certain threshold value and then undergo a cleaning process to release more space. The above processes of transferring from the first recovery area to the second recovery area and deleting from the second recovery area are performed in the order from high to low, that is, the longer the time the file is deleted, the larger the original size of the file is, the higher the priority of transferring or clearing from the recovery area is. Moreover, as the longer the time that the file is placed in the recycling area, the smaller the probability that the user may need the file is, and the longer the deletion time is and/or the larger the original file is, the more easily the file is divided into higher levels, so that the embodiment comprehensively considers the probability that the deleted file is needed again by the user and the saving range of the storage space for processing, greatly embodies the humanized design, and improves the user experience.
An embodiment of the present invention further provides an electronic document processing apparatus, as shown in fig. 4, the apparatus includes: the moving module 10a is configured to move the file to be deleted to the recovery area according to the file deletion instruction, so that the file to be deleted becomes a deleted file; the grade dividing module 20a is configured to divide the deleted files in the recovery area into grades according to a preset grade condition; and the grade processing module 30a is used for performing corresponding processing on the deleted file according to the grade.
The electronic file processing device can be suitable for mobile terminals such as smart phones, tablet computers and intelligent wearable devices, and can also be suitable for non-mobile terminals such as desktop computers and all-in-one machines. A part of the area of the storage space of the electronic terminal is preset as a recycling area for storing the files deleted under the instruction of the user, and the files to be deleted are moved to the recycling area by the mobile module 10a to become deleted files.
The preset level condition may be an attribute requirement of the deleted file, and the attribute may specifically be information such as a size, a type, or a time interval (i.e., deletion duration) at which the distance from the deleted file to the recovery area is moved. For example, if the deleted file is classified into a higher rank based on the deletion time length, the ranking module 20a classifies a file having a longer time interval from the time when the file is moved to the recovery area into a higher rank. Of course, the ranking module 20a may also rank the deleted files according to the file information in the deletion duration and the file size, and then the ranking processing module 30a performs different processing methods for the files with different ranks, such as deleting or compressing the files with higher ranks, and keeping the files with lower ranks unchanged, so that the method for achieving this consideration may achieve more refined management for the files in the recovery area.
The electronic document processing device provided by the embodiment of the invention presets a part of the area of the storage space of the electronic terminal as the recovery area, and the mobile module 10a responds to the document deletion instruction of the user to move the document to be deleted pointed by the document deletion instruction to the recovery area for storage, so that the document loss caused by mistaken deletion can be prevented, and the user can conveniently retrieve the document. In addition, the device also grades the deleted files in the recovery area through the grading module 20a, and then the grading processing module 30a applies different processing methods to different grades, so that the deleted files can be finely managed, the utilization rate of the storage space is improved, and the trouble caused by transferring some files to external storage equipment due to insufficient use space is avoided.
In another embodiment of the present invention, the recycling region includes a first recycling region and a second recycling region, wherein the first recycling region is located in an internal memory of the electronic terminal, and the second recycling region is located in an external memory of the electronic terminal. When receiving a file deletion instruction triggered by a user, the moving module 10b moves the file to be deleted from the original storage location to the first recovery area.
In this embodiment, the level condition is a value requirement of an attribute of the deleted file, where the attribute includes information such as a deletion duration, a file size, or a file type of the deleted file. The grade division module 20b divides the deleted files in the recovery area into grades according to the value requirement of the attribute of the deleted files, as shown in fig. 5, the grade division module 20b specifically includes: an acquisition unit 21 configured to acquire an attribute value of a deleted file; and a dividing unit 22, configured to divide the deleted file into corresponding levels according to preset attribute value requirements of each level.
In a specific embodiment, the levels are divided into five levels of level 1, level 2, level 3, level 4 and level 5, the levels of which are gradually reduced according to preset attribute value requirements, and the attributes of the deleted file include deletion duration and file size of the deleted file.
The rule for dividing the deleted file into 5 grades according to the deletion duration and the file size and the corresponding processing of each grade are as follows:
if the deletion time duration of the deleted file is greater than the third time duration threshold value, the level 1 file is classified into the deleted file of level 1 by the classification unit 22, and the level processing module 30b performs depth compression, and the compression rate is W1.
If the level 2 level condition is that the deletion time length of the deleted file is between the second time length threshold and the third time length threshold and the file threshold is greater than the third file threshold, the deleted file is divided into the level 2 deleted file by the dividing unit 22, and the level processing module 30b performs shallow compression, where the compression rate is W2.
If the level 3 level condition is that the deletion time of the deleted file is between the first time threshold and the second time threshold and the file threshold is greater than the second file threshold, the deleted file is divided into the level 3 by the dividing unit 22, and the level processing module 30b transfers the deleted file from the first recovery area to the second recovery area.
If the class 4 class condition is that the deletion duration of the deleted file is less than the first time threshold and the file threshold is greater than the first file threshold, and none of the deleted files in the recycle area that do not satisfy the class conditions of class 1, class 2, class 3, and class 4 are class 5 deleted files, the deleted files are divided into class 4 and class 5 deleted files by the dividing unit 22, and the class processing module 30b does not process the deleted files.
The third duration threshold > the second duration threshold > the first duration threshold, the file threshold is a threshold of the file size, the first file threshold > the second file threshold > the third file threshold, and W2> W1. For the first time length threshold, the second time length threshold, the third time length threshold, and the specific values of the first file threshold, the second file threshold, and the third file threshold, those skilled in the art may set the values according to specific needs or by referring to the preset storage capacity value of the recovery area, and other parameters, which is not limited in the present invention.
The electronic file processing device provided by the embodiment of the invention is characterized in that a first recovery area and a second recovery area are respectively arranged in an internal memory and an external memory of the electronic terminal, wherein the first recovery area is used for storing deleted files in a short time, and the second recovery area is used for storing the deleted files (especially the deleted files with larger files) in a long time. Therefore, the large-size deleted files are stored in the external memory, the internal storage space is saved for other applications, and the performance of the whole system is improved. In addition, the device provided by the embodiment of the invention performs level division on the deleted files in the recovery area according to the file attributes, and the level processing module 30b executes corresponding operations according to different levels, so that the utilization rate of the storage space is improved, and the deleted files with relatively short deletion time are compressed according to different compression rates according to different levels, so that the retrieval requirement of a user is fully considered while the storage space is effectively saved, and the file decompression speed can be improved and the file recovery time can be shortened when the deleted files need to be recovered by performing shallow compression on the deleted files with relatively short deletion time.
Fig. 6 is a schematic structural diagram of an electronic document processing apparatus according to another embodiment of the present invention. The electronic document processing apparatus further includes, on the basis of the embodiment shown in fig. 5: a detecting module 40, configured to detect whether the available space value B1 in the first recycling area is smaller than a preset first space threshold T1, and whether the available space value B2 in the second recycling area is smaller than a preset second space threshold T2; and the space processing module 50 is configured to, when the detection module 40 detects that the available space value B1 in the first reclamation area is smaller than the first space threshold T1, move the corresponding deleted files in the first reclamation area to the second reclamation area in the order from high to low in the order of the levels until the available space value B1 in the first reclamation area is greater than the first space threshold T1, and when the available space value B2 in the second reclamation area is smaller than the second space threshold T2, delete the corresponding deleted files in the second reclamation area from the second reclamation area in the order from high to low in the order of the levels until the available space value B2 in the second reclamation area is greater than the second space threshold T2.
The first space threshold T1 and the second space threshold T2 are preset thresholds of the remaining space in the first recovery area and the second recovery area, and may be set differently according to specific requirements, and the values of T1 and T2 may be the same or different, for example, T1 and T2 may be 40% or 50% of the total capacity of the first recovery area and the second recovery area, respectively, which is not limited in this disclosure.
Since the storage space of the first recovery area and the second recovery area is limited, even if the storage space is managed in a refined manner, the storage space is effectively utilized, deleted files in the first recovery area and deleted files in the second recovery area are accumulated after a period of time, and after a certain degree is reached, the recovery areas cannot accommodate more files. Therefore, the deleted files in the first recovery area can be gradually transferred to the second recovery area through the detection module 40 and the space processing module 50, so that the system can keep running at a high access speed, and the deleted files in the second recovery area reach a certain threshold value and then are cleaned to release more space. And the operations of the space processing module 50 for transferring the deleted file from the first recovery area to the second recovery area and deleting the deleted file from the second recovery area are performed in the order from high to low, that is, the longer the time for deleting the file is, the larger the original size of the file is, the higher the priority for transferring or cleaning the file from the recovery area is. The electronic file processing device designed by the embodiment comprehensively considers the probability of the deleted file being needed again by the user and the saving range of the storage space for processing, greatly embodies the humanized design and improves the user experience.
An embodiment of the present invention further provides an electronic terminal, which includes a processor, a memory, and a computer program stored in the memory and executed by the processor, where the processor implements the steps described in any one of the above methods when executing the computer program.
Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps described in any of the above methods.
Those of ordinary skill in the art will appreciate that the various illustrative modules/elements and steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, modules and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a module/unit division is only one logical functional division, and in actual implementation, there may be other divisions, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program check codes, such as a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (1)

1. An electronic document processing method, comprising:
moving the file to be deleted to a recovery area of the electronic terminal according to the file deletion instruction to form a deleted file;
grading the deleted files in the recovery area according to a preset grade condition;
processing the deleted file according to the grade,
the recovery area comprises a first recovery area and a second recovery area, the first recovery area is located in an internal storage space of the electronic terminal, the second recovery area is located in an external storage space of the electronic terminal, the grades are divided into five grades of grade 1, grade 2, grade 3, grade 4 and grade 5, the grades are gradually reduced according to the preset grade requirements, and the moving of the file to be deleted to the recovery area according to the file deletion instruction comprises the following steps: moving the file to be deleted to the first recovery area according to the file deletion instruction;
the processing the deleted file according to the grade comprises:
deeply compressing the deleted file with the level 1 by using a first compression rate;
shallow compressing the deleted file of level 2 with a second compression rate larger than the first compression rate;
transferring the deleted file with the grade of 3 from the first recycling area to the second recycling area;
no processing is done for the deleted files of levels 4 and 5,
the grading of the deleted files in the recovery area according to a preset grade condition comprises the following steps: acquiring an attribute value of a deleted file; dividing the deleted files into corresponding levels according to preset attribute value requirements of all levels, wherein the attributes of the deleted files comprise deletion time length and file size of the deleted files, and the level condition of level 1 is that the deletion time length of the deleted files is larger than a third time length threshold; the grade 2 grade condition is that the deletion time length of the deleted file is between the second time length threshold value and the third time length threshold value, and the file threshold value is greater than the third file threshold value; the grade condition of grade 3 is that the deletion time length of the deleted file is between a first time length threshold value and a second time length threshold value, and the file threshold value is greater than a second file threshold value; the grade 4 is that the deletion duration of the deleted file is less than a first duration threshold and the file threshold is greater than a first file threshold; the deleted files which do not meet the grade conditions of grade 1, grade 2, grade 3 and grade 4 in the recovery area are grade 5 deleted files; wherein the third duration threshold > the second duration threshold > the first duration threshold, and the first file threshold > the second file threshold > the third file threshold.
CN201711066057.1A 2017-11-02 2017-11-02 Electronic file processing method and device and electronic terminal Active CN107766005B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711066057.1A CN107766005B (en) 2017-11-02 2017-11-02 Electronic file processing method and device and electronic terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711066057.1A CN107766005B (en) 2017-11-02 2017-11-02 Electronic file processing method and device and electronic terminal

Publications (2)

Publication Number Publication Date
CN107766005A CN107766005A (en) 2018-03-06
CN107766005B true CN107766005B (en) 2020-07-17

Family

ID=61272459

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711066057.1A Active CN107766005B (en) 2017-11-02 2017-11-02 Electronic file processing method and device and electronic terminal

Country Status (1)

Country Link
CN (1) CN107766005B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109918340B (en) * 2019-03-18 2021-07-02 维沃移动通信有限公司 File processing method and terminal equipment
CN110187893B (en) * 2019-05-21 2023-12-08 维沃移动通信有限公司 Method for deleting application, mobile terminal and computer readable storage medium
CN110569146B (en) * 2019-08-27 2023-12-01 深圳震有科技股份有限公司 Data backup and configuration method, device, storage medium and system
CN114281250A (en) * 2021-12-01 2022-04-05 上海闪马智能科技有限公司 Method and device for cleaning storage file, storage medium and electronic device
CN114489897B (en) * 2022-01-21 2023-08-08 北京字跳网络技术有限公司 Object processing method, device, terminal equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006252409A (en) * 2005-03-14 2006-09-21 Canon Inc Document managing device, document managing method, and storage medium
CN104991949A (en) * 2015-07-16 2015-10-21 北京京东尚科信息技术有限公司 Mobile terminal and file management system and method thereof
CN105653582A (en) * 2015-12-21 2016-06-08 联想(北京)有限公司 File management method of electronic equipment and electronic equipment
WO2016117740A1 (en) * 2015-01-23 2016-07-28 ㈜리얼타임테크 Circular queue-based in-memory database system and data processing method of same
CN105930436A (en) * 2016-04-19 2016-09-07 乐视控股(北京)有限公司 File recovery method and device for mobile terminal equipment
CN106802957A (en) * 2017-01-19 2017-06-06 广东欧珀移动通信有限公司 File management method, device and terminal device
CN107122135A (en) * 2017-04-25 2017-09-01 北京小米移动软件有限公司 Data processing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006252409A (en) * 2005-03-14 2006-09-21 Canon Inc Document managing device, document managing method, and storage medium
WO2016117740A1 (en) * 2015-01-23 2016-07-28 ㈜리얼타임테크 Circular queue-based in-memory database system and data processing method of same
CN104991949A (en) * 2015-07-16 2015-10-21 北京京东尚科信息技术有限公司 Mobile terminal and file management system and method thereof
CN105653582A (en) * 2015-12-21 2016-06-08 联想(北京)有限公司 File management method of electronic equipment and electronic equipment
CN105930436A (en) * 2016-04-19 2016-09-07 乐视控股(北京)有限公司 File recovery method and device for mobile terminal equipment
CN106802957A (en) * 2017-01-19 2017-06-06 广东欧珀移动通信有限公司 File management method, device and terminal device
CN107122135A (en) * 2017-04-25 2017-09-01 北京小米移动软件有限公司 Data processing method and device

Also Published As

Publication number Publication date
CN107766005A (en) 2018-03-06

Similar Documents

Publication Publication Date Title
CN107766005B (en) Electronic file processing method and device and electronic terminal
US10108626B2 (en) Proactively clearing digital storage
CN108063818B (en) Data downloading method, device, terminal and computer readable storage medium
EP2985694A1 (en) Application program management method and apparatus, server, and terminal device
US11061857B2 (en) Data processing method and device
CN110764906B (en) Memory recovery processing method and device, electronic equipment and storage medium
CN103747147B (en) Upgrade the method and apparatus of address list
CN110196836B (en) Data storage method and device
CN104199967A (en) Cellphone file recovery method and device
US20180239839A1 (en) Method and Apparatus for Identifying To-Be-Cleaned Data, and Electronic Device
US10664443B2 (en) Method and apparatus for presenting to-be-cleaned data, and electronic device
CN107016123B (en) File management method and terminal device
CN107179930B (en) Application uninstalling recommendation method and device
CN103064675A (en) Method and device for cleaning up redundant files in mobile terminal automatically
CN101686279A (en) Short message automatic clustering and collecting method
WO2016183918A1 (en) Method and device for processing storage space
CN105808583A (en) File type identification method and device
WO2016145804A1 (en) Data processing and device
CN104991949B (en) Mobile terminal and its file management system and method
CN109121157B (en) Network speed limit determining method, terminal and storage medium
CN105308589A (en) Compacting data based on data content
CN110543451A (en) Method and device for efficiently cleaning equipment files
CN108228340B (en) Terminal control method and device, terminal equipment and computer readable storage medium
CN108228342B (en) Terminal device control method and device, terminal device and computer readable storage medium
CN106933702A (en) A kind of method of intelligent terminal storage space management, device and intelligent terminal

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
TA01 Transfer of patent application right

Effective date of registration: 20190919

Address after: 355 200 No. 44 Jishi Road, Taimushan Town, Fuding City, Ningde City, Fujian Province

Applicant after: Lin Chen Yi

Address before: 518000 H3, 501B, Dong Cheng Industrial Park, overseas Chinese, Shenzhen, Guangdong, Nanshan District

Applicant before: Shenzhen Tinno Wireless Technology Co., Ltd.

Applicant before: Shenzhen tinno Mobile Technology Co Ltd

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200422

Address after: Room m-297, no.559 yueluo Road, Baoshan District, Shanghai

Applicant after: PuDao (Shanghai) Information Technology Co., Ltd

Address before: 355 200 No. 44 Jishi Road, Taimushan Town, Fuding City, Ningde City, Fujian Province

Applicant before: Lin Chenyi

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant