CN109408469A - Stale data document handling method, device, electronic device and storage medium - Google Patents

Stale data document handling method, device, electronic device and storage medium Download PDF

Info

Publication number
CN109408469A
CN109408469A CN201811032581.1A CN201811032581A CN109408469A CN 109408469 A CN109408469 A CN 109408469A CN 201811032581 A CN201811032581 A CN 201811032581A CN 109408469 A CN109408469 A CN 109408469A
Authority
CN
China
Prior art keywords
file
data
data file
folder
default
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.)
Pending
Application number
CN201811032581.1A
Other languages
Chinese (zh)
Inventor
范亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201811032581.1A priority Critical patent/CN109408469A/en
Publication of CN109408469A publication Critical patent/CN109408469A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A kind of stale data document handling method, comprising: read the timestamp of each data file in one first preset time point;Judge whether the data file is scratch file according to the timestamp of each data file;When judging the data file for scratch file, judge whether the data file is insignificant file;And when judging the data file for insignificant file, the data file is deleted.The present invention also provides a kind of stale data document handling apparatus, electronic device and computer readable storage mediums.The present invention can reduce the artificial workload for deleting stale data, improve the performance of data updating efficiency and database, and be conducive to accidentally delete caused by avoiding manual operations fault.

Description

Stale data document handling method, device, electronic device and storage medium
Technical field
The present invention relates to data processing methods, and in particular to a kind of stale data document handling method, electronic device and meter Calculation machine readable storage medium storing program for executing.
Background technique
Database is component part important in the application system of mass data, and over time, database is deposited When storage data volume reaches a certain level, disk space can be made using increasing, database performance declines rapidly.Delete data not manually It only will increase the workload of user, it is slower to delete speed, and be easy to produce and accidentally delete.Therefore, it is necessary to provide a kind of quickly peace Full data-erasure method can delete stale data, the memory space of release busy in time.
Summary of the invention
In view of the foregoing, it is necessary to propose a kind of stale data document handling method, electronic device and computer-readable Storage medium.
A better embodiment of the invention provides a kind of stale data document handling method, comprising: when one first is default Between point read the timestamp of each data file;According to the timestamp of each data file judge the data file whether be Phase file;When judging the data file for scratch file, judge whether the data file is insignificant file;And When judging the data file for insignificant file, the data file is deleted.
In one possible implementation, judge that the data file whether be scratch file includes: to calculate the number According to the difference between the timestamp and current time of file;When the difference is greater than or equal to a preset difference value, described in judgement Data file is scratch file;And when the difference is less than the preset difference value, judge that the data file is not expired File.
In one possible implementation, after judging that the data file is not scratch file, the method is also wrapped It includes: judging whether the data file is currently called, wherein currently the quantity of called data file can be one or more It is a;And when judging that the data file is currently called, the former timestamp of the data file is revised as current time.
In one possible implementation, judge that the data file whether be scratch file includes: to judge the number According to the timestamp of file whether earlier than one second preset time point;And when the timestamp of the data file is earlier than described second When preset time point, judge the data file for scratch file.
In one possible implementation, judge whether the data file is that insignificant file comprises determining that storage The file of the data file;Judge whether the file is default file folder;And when the file is described pre- If when file, judging the data file for insignificant file.
In one possible implementation, the default file folder is divided into first kind default file folder and the second class is pre- If file, the first kind default file folder is the file of the junk data of storage operator confirmation, and the first kind is pre- If file, which is classified as multiple first kind according to the classification of the data file stored, presets sub-folder, second class is pre- If file is the file for storing personal data, the second class default file presss from both sides the classification according to the data file stored It is classified as multiple second classes and presets sub-folder.
In one possible implementation, deleting the data file includes: will be deemed as insignificant file described Data file summarizes for a lists of documents to be deleted, wherein each data file in the lists of documents to be deleted is right respectively Answer a recovery option;An operation interface is generated on the lists of documents to be deleted, the operation interface includes at least one first Option is deleted in confirmation and option is deleted in one second confirmation;When detect first confirmation delete option it is chosen when, batch Delete all data files in the lists of documents to be deleted;And option and extremely is deleted when detect second confirmation When few recovery option is selected, deleted in the lists of documents to be deleted in batches except the corresponding chosen data for restoring option Other data files except file;Wherein, in the lists of documents to be deleted, the also corresponding display of each data file is useful In the first kind default file folder or the second class default file folder that store the data file, same first kind default file is come from The data file of folder or same second class default file folder is enumerated together.
A better embodiment of the invention also provides a kind of stale data document handling apparatus, comprising: read module is used for The timestamp of each data file is read in one first preset time point;The first judgment module, for according to each data The timestamp of file judges whether the data file is scratch file;Second judgment module, for judging mould described first When block judges the data file for scratch file, judge whether the data file is insignificant file;And removing module, For deleting the file when second judgment module judges the data file for insignificant file.
A better embodiment of the invention also provides a kind of electronic device, including processor and memory, the memory In be stored with stale data documentor, the processor is for executing the stale data documentor to realize Foregoing stale data document handling method.
A better embodiment of the invention also provides a kind of computer readable storage medium, the computer-readable storage medium It is stored with stale data documentor in matter, is realized as before when the stale data documentor is executed by processor The stale data document handling method.
The embodiment of the present invention by complexity and needs the work of manual cleaning automatic by the data clearing method of automation Change, simplify, reduces the artificial workload for deleting stale data, improve execution efficiency, and be conducive to avoid mistake hand-manipulated It is accidentally deleted caused by accidentally.
Detailed description of the invention
Fig. 1 is the flow chart for the stale data document handling method that a preferred embodiment of the present invention provides.
Fig. 2 is the structural schematic diagram for the stale data document handling apparatus that a preferred embodiment of the present invention provides.
Fig. 3 is the structural schematic diagram for the electronic device that a preferred embodiment of the present invention provides.
Symbol description
The present invention that the following detailed description will be further explained with reference to the above drawings.
Specific embodiment
To better understand the objects, features and advantages of the present invention, with reference to the accompanying drawing and specific real Applying example, the present invention will be described in detail.It should be noted that in the absence of conflict, embodiments herein and embodiment In feature can be combined with each other.
In the following description, numerous specific details are set forth in order to facilitate a full understanding of the present invention, described embodiment is only It is only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill Personnel's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Unless otherwise defined, all technical and scientific terms used herein and belong to technical field of the invention The normally understood meaning of technical staff is identical.Term as used herein in the specification of the present invention is intended merely to description tool The purpose of the embodiment of body, it is not intended that in the limitation present invention.
Fig. 1 is the flow chart for the stale data document handling method that a preferred embodiment of the present invention provides.It is described to cross issue It is applied in an electronic device 1 according to document handling method.According to different demands, the step of the stale data document handling method Sequence can change, and certain steps can be omitted or merge.The stale data document handling method the following steps are included:
Step 11, the timestamp of each data file is read in one first preset time point.
In one embodiment, the first preset time point can be configured according to actual needs, and e.g., described first is default Time point can be 10 points of every night.
Wherein, timestamp is a kind of representation of time, can uniquely identify the time at a certain moment.The electronics The quantity of data file in device 1 is multiple, the corresponding timestamp of each data file.The time of the data file It stabs usually different.
Step 12, judge whether the data file is scratch file according to the timestamp of each data file, if so, Carry out step 13;Otherwise, then repeatedly step 11.
In one embodiment, judge whether the data file is that scratch file includes:
Step 121 calculates difference between the timestamp and current time of the data file;
Step 122, when the difference be greater than or equal to a preset difference value when, judge the data file for scratch file; When the difference is less than the preset difference value, judge that the data file is not scratch file.
Specifically, a timestamp is all corresponded at the time of user calls the data file each time, described in calculating Difference between the timestamp and current time of data file, and determine whether the data file is expired according to the difference. If in the case that the difference is greater than the preset difference value, showing that user has not visited always the data text in the near future Part shows that the data file is out of date.
Further, after judging that the data file is not scratch file in step 122, the method is also wrapped It includes:
Step 123 judges whether the data file is currently called, wherein the currently number of called data file Amount can be one or more;
Step 124, judge the data file currently be called when, update the timestamp of the data file, that is, will The former timestamp of the data file is revised as current time.
Wherein it should be noted that the value of the preset difference value can be set according to actual needs, the default difference The value of value is simultaneously not exclusive constant.Therefore, user arbitrarily can modify or adjust the value of the preset difference value.When system receives After user is in order to modify the modification instruction that the preset difference value is inputted, former preset difference value can be replaced with to user's modification Another preset difference value afterwards.
Further, it before judging whether the data file is scratch file, may further comprise:
Step 125 receives the modification instruction, and the modification instruction is to modify the instruction of former preset difference value;
Step 126 instructs according to the modification former preset difference value being revised as another preset difference value.
In another embodiment, judge whether the data file is that scratch file can also include:
Step 121 ', judge the timestamp of the data file whether earlier than one second preset time point;
Step 122 ', when the timestamp of the data file is earlier than the second preset time point, judge the data File is scratch file.
Specifically, the second preset time point can also be set according to actual needs.The second preset time point It can be expired time.The expired time includes clock time, and e.g., the format of the expired time can are as follows: X X month X day X Divide X seconds.
Step 13, judge whether the data file is insignificant file (i.e., if for that can delete file), if so, Carry out step 14;Otherwise, then step is returned to.
In one embodiment, judge whether the data file is insignificant file specifically:
S131, the file for storing the data file is determined;
S132, judge whether the file is default file folder;
S133, when the file be the default file press from both sides when, judge the data file for insignificant file.
Specifically, the default file folder is used to store at least file that can delete file, institute for what user specified First kind default file folder and the second class default file folder can be divided into according to data class by stating default file folder.
The file for the junk data that the first kind default file folder confirms for storage operator.Operator's confirmation Junk data be by largely test with after data collection analysis, determine delete after will not be to the number that user has an impact According to, such as: unload residual data, data cached, the advertisement rubbish, system rubbish, installation kit of application program.Due to data bulk It is huge, to be screened convenient for user in subsequent step S14 to data file, to first kind default file folder according to being deposited The classification work of the data file of storage is classified to obtain multiple first kind and preset sub-folder.Such as, the first kind default file folder Multiple sub-folders such as storage unloading residual, caching rubbish, advertisement rubbish, system rubbish, installation kit can be divided into.
The file of personal data of the second class default file folder for storage user, such as: passing through social application program Chat record data, data of map application (" Tencent's map application " etc.) generation that (wechat, QQ etc.) is generated etc.. Since the quantity of the personal data of user is very big, and by the file for deleting data stored in the personal data Phenomena such as being sorted out, data corruption will not be generated.Such as, it is all photo files, is connect for storing the social applications program such as wechat The file of the photo received is marked as the default file folder, and is used to store the local folders of the photo of camera shooting It can't be marked as the default file folder.It is literary to data convenient for user in subsequent step S14 since data bulk is huge Part is screened, and is classified to the second class default file folder according to the classification work of the data file stored to obtain multiple the Two classes preset sub-folder.Such as, it is pressed from both sides for the second class default file of the data file of storage wechat application program, can be divided into and deposit Storage " chat picture ", " head portrait and circle of friends picture ", " save or the picture of shooting ", " video messaging ", " the expression packet of downloading ", The second class sub-folders such as " pictures of downloading ", " chat Background ", " speech message " and " public platform icon ".
In addition to this, the specific data that the included operation data of terminal system or operator specify is then vital document (that is, unsuppressible-suppression file).Therefore, for storing the operation data that terminal system carries or the specific data that operator specifies File can't also be marked as default file folder.
Step 14, the data file is deleted.
In one embodiment, the data file is deleted to specifically include:
Step 141, the data file that will be deemed as insignificant file summarize for a lists of documents to be deleted, wherein Each data file in the lists of documents to be deleted respectively corresponds a recovery option;
Step 142 generates an operation interface on the lists of documents to be deleted, and the operation interface includes at least one the Option is deleted in one confirmation and option is deleted in one second confirmation;
Step 143, when detect first confirmation delete option it is chosen when, it is clear to delete the file to be deleted in batches All data files in list, when detecting the second confirmation deletion option and at least one recovery option is chosen, batch Amount deletes other data files in the lists of documents to be deleted in addition to the data file of corresponding chosen recovery option.
Specifically, user can select the data file that the second confirmation option is checked on the lists of documents to be deleted, When at least a data file needs to retain for confirmation, then can be screened by corresponding recovery option to prevent from being deleted It removes.Wherein, in the lists of documents to be deleted, each data file also correspondence is shown for storing the data file First kind default file folder or the second class default file folder, from same first kind default file folder or the default text of same second class The data file of part folder is enumerated together, consequently facilitating the data file retained required for user's screening.
Such as, it is that operator confirms deletable data file that the first kind default file, which presss from both sides stored data file, But user needs to retain sometimes, and e.g., a certain installation kit is not always by user installation, if deleting the installation that will affect user, Therefore user can screen it when clearing up data file from the lists of documents to be deleted.To which institute can be prevented It states electronic device 1 and accidentally deletes the data file that user wants reservation, guarantee that data file deletes the safety of process.
Fig. 2 is the structural schematic diagram for the stale data document handling apparatus 200 that a better embodiment of the invention provides.? In some embodiments, the stale data document handling apparatus 200 is run in electronic device.The stale data file process Device 200 may include multiple functional modules as composed by program code segments.The stale data document handling apparatus 200 The program code of each program segment can store in the memory of electronic device, and be held by least one described processor Row, to realize stale data file process function.
In the present embodiment, function of the stale data document handling apparatus 200 according to performed by it can be divided into Multiple functional modules.As shown in Fig. 2, the stale data document handling apparatus 200 includes: read module 201, first judges mould Block 202, the second judgment module 203 and removing module 204.The so-called module of the present invention refers to that one kind can be by least one Reason device is performed and can complete the series of computation machine program segment of fixed function, and storage is in memory.In this implementation In example, the function about each module will be described in detail in subsequent embodiment.
The read module 201 is used to read the timestamp of each data file in one first preset time point.
In one embodiment, the first preset time point can be configured according to actual needs, and e.g., described first is default Time point can be 10 points of every night.
Wherein, timestamp is a kind of representation of time, can uniquely identify the time at a certain moment.The electronics The quantity of data file in device 1 is multiple, the corresponding timestamp of each data file.The time of the data file It stabs usually different.
The first judgment module 202 be used for according to the timestamp of each data file judge the data file whether be Scratch file.
In one embodiment, the first judgment module 202 calculates the timestamp and current time of the data file Between difference.When the difference is greater than or equal to a preset difference value, the first judgment module 202 judges the data text Part is scratch file.When the difference is less than the preset difference value, the first judgment module 202 judges the data file Not scratch file.
Specifically, a timestamp is all corresponded at the time of user calls the data file each time, described in calculating Difference between the timestamp and current time of data file, and determine whether the data file is expired according to the difference. If in the case that the difference is greater than the preset difference value, showing that user has not visited always the data text in the near future Part shows that the data file is out of date.
Further, the stale data document handling apparatus 200 further includes update module 205.First judgement Module 202 also judges whether the data file is currently called after judging that the data file is not scratch file, In, currently the quantity of called data file can be one or more.When judging that the data file is currently called, institute Update module 205 is stated for updating the timestamp of the data file, that is, be revised as working as by the former timestamp of the data file The preceding time.
Wherein it should be noted that the value of the preset difference value can be set according to actual needs, the default difference The value of value is simultaneously not exclusive constant.Therefore, user arbitrarily can modify or adjust the value of the preset difference value.When system receives After user is in order to modify the modification instruction that the preset difference value is inputted, former preset difference value can be replaced with to user's modification Another preset difference value afterwards.
Further, the stale data document handling apparatus 200 further includes modified module 206.Described first judges mould Block 202 is also used to receive the modification instruction before judging whether the data file be scratch file, and the modification instructs For the instruction for modifying former preset difference value.The modified module 206 is used to be instructed according to the modification and is revised as former preset difference value Another preset difference value.
In another embodiment, whether the first judgment module 202 judges the timestamp of the data file earlier than one Second preset time point.When the timestamp of the data file is earlier than the second preset time point, described first judges mould Block 202 judges the data file for scratch file.
Specifically, the second preset time point can also be set according to actual needs.The second preset time point It can be expired time.The expired time includes clock time, and e.g., the format of the expired time can are as follows: X X month X day X Divide X seconds.
Second judgment module 203 is used to judge the data file for expired text in the first judgment module 202 When part, judge whether the data file is insignificant file (i.e., if for that can delete file).
In one embodiment, second judgment module 203 determines the file for storing the data file, and judges Whether the file is default file folder.When the file is that the default file presss from both sides, second judgment module 203 Judge the data file for insignificant file.
Specifically, the default file folder is used to store at least file that can delete file, institute for what user specified First kind default file folder and the second class default file folder can be divided into according to data class by stating default file folder.
The file for the junk data that the first kind default file folder confirms for storage operator.Operator's confirmation Junk data be by largely test with after data collection analysis, determine delete after will not be to the number that user has an impact According to, such as: unload residual data, data cached, the advertisement rubbish, system rubbish, installation kit of application program.Due to data bulk It is huge, to be screened convenient for user in subsequent step 14 to data file, to first kind default file folder according to being deposited The classification work of the data file of storage is classified to obtain multiple first kind and preset sub-folder.Such as, the first kind default file folder Multiple sub-folders such as storage unloading residual, caching rubbish, advertisement rubbish, system rubbish, installation kit can be divided into.
The file of personal data of the second class default file folder for storage user, such as: passing through social application program Chat record data, data of map application (" Tencent's map application " etc.) generation that (wechat, QQ etc.) is generated etc.. Since the quantity of the personal data of user is very big, and by the file for deleting data stored in the personal data Phenomena such as being sorted out, data corruption will not be generated.Such as, it is all photo files, is connect for storing the social applications program such as wechat The file of the photo received is marked as the default file folder, and is used to store the local folders of the photo of camera shooting It can't be marked as the default file folder.It is literary to data convenient for user in subsequent step 14 since data bulk is huge Part is screened, and is classified to the second class default file folder according to the classification work of the data file stored to obtain multiple the Two classes preset sub-folder.Such as, it is pressed from both sides for the second class default file of the data file of storage wechat application program, can be divided into and deposit Storage " chat picture ", " head portrait and circle of friends picture ", " save or the picture of shooting ", " video messaging ", " the expression packet of downloading ", The second class sub-folders such as " pictures of downloading ", " chat Background ", " speech message " and " public platform icon ".
In addition to this, the specific data that the included operation data of terminal system or operator specify is then vital document (that is, unsuppressible-suppression file).Therefore, for storing the operation data that terminal system carries or the specific data that operator specifies File can't also be marked as default file folder.
The removing module 204 is used to judge the data file for insignificant file in second judgment module 203 When, delete the data file.
In one embodiment, second judgment module 203 is judged as insignificant file by the removing module 204 The data file summarizes for a lists of documents to be deleted, wherein each data file point in the lists of documents to be deleted It Dui Ying not a recovery option.The removing module 204 also generates an operation interface, the behaviour on the lists of documents to be deleted Make interface and deletes option and one second confirmation deletion option including at least one first confirmation.It is deleted when detecting first confirmation When being selected except option, the removing module 204 deletes all data files in the lists of documents to be deleted in batches.When detecing When measuring the second confirmation deletion option and chosen at least one recovery option, the removing module 204 deletes institute in batches State other data files in lists of documents to be deleted in addition to the data file of corresponding chosen recovery option.
Specifically, user can select the data file that the second confirmation option is checked on the lists of documents to be deleted, When at least a data file needs to retain for confirmation, then can be screened by corresponding recovery option to prevent from being deleted It removes.Wherein, in the lists of documents to be deleted, each data file also correspondence is shown for storing the data file First kind default file folder or the second class default file folder, from same first kind default file folder or the default text of same second class The data file of part folder is enumerated together, consequently facilitating the data file retained required for user's screening.
Such as, it is that operator confirms deletable data file that the first kind default file, which presss from both sides stored data file, But user needs to retain sometimes, and e.g., a certain installation kit is not always by user installation, if deleting the installation that will affect user, Therefore user can screen it when clearing up data file from the lists of documents to be deleted.To which institute can be prevented It states electronic device 1 and accidentally deletes the data file that user wants reservation, guarantee that data file deletes the safety of process.
As shown in figure 3, Fig. 3 is the electricity for realizing the stale data document handling method in a better embodiment of the invention The structural schematic diagram of sub-device 1.The electronic device 1 is including memory 101, processor 102 and is stored in the memory In 101 and the computer program 103 that can be run on the processor 102, such as stale data documentor.
The processor 102 realizes stale data file process in above-described embodiment when executing the computer program 103 The step of method:
Wherein, the memory 101 optionally includes one or more computer readable storage mediums, described for storing The program of stale data document handling method and various data, and in the process of running realize high speed, be automatically completed program or The access of data.The computer-readable medium may include: can carry the computer program code any entity or Device, recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software Distribution medium etc..It should be noted that the content that the computer-readable medium includes can be according to making laws in jurisdiction Requirement with patent practice carries out increase and decrease appropriate, such as in certain jurisdictions, according to legislation and patent practice, computer Readable medium does not include electric carrier signal and telecommunication signal.The memory 101 optionally includes high-speed random access memory, And also optionally include nonvolatile memory, such as one or more disk storage equipments, flash memory device or its Its non-volatile solid state memory equipment.
The processor 102 is also known as central processing unit (CPU, Central Processing Unit), is one piece of super large rule The integrated circuit of mould is the arithmetic core (Core) and control core (Control Unit) of the electronic device 1.The processing The operating system of the electronic device 1 and the types of applications program of installation, program code etc. can be performed in device 102, such as described Stale data document handling apparatus 200.
In conjunction with Fig. 1, the memory 101 in the electronic device 1 stores multiple instruction to realize the stale data The multiple instruction can be performed to realize following steps in document handling method, the processor 102:
Step 11, the timestamp of each data file in the electronic device 1 is read in one first preset time point.
In one embodiment, the first preset time point can be configured according to actual needs, and e.g., described first is default Time point can be 10 points of every night.
Wherein, timestamp is a kind of representation of time, can uniquely identify the time at a certain moment.The electronics The quantity of data file in device 1 is multiple, the corresponding timestamp of each data file.The time of the data file It stabs usually different.
Step 12, judge whether the data file is scratch file according to the timestamp of each data file, if so, Carry out step 13;Otherwise, then repeatedly step 11.
In one embodiment, judge whether the data file is that scratch file includes:
Step 121 calculates difference between the timestamp and current time of the data file;
Step 122, when the difference be greater than or equal to a preset difference value when, judge the data file for scratch file; When the difference is less than the preset difference value, judge that the data file is not scratch file.
Specifically, a timestamp is all corresponded at the time of user calls the data file each time, described in calculating Difference between the timestamp and current time of data file, and determine whether the data file is expired according to the difference. If in the case that the difference is greater than the preset difference value, showing that user has not visited always the data text in the near future Part shows that the data file is out of date.
Further, after judging that the data file is not scratch file in step 122, the step is also wrapped It includes:
Step 123 judges whether the data file is currently called, wherein the currently number of called data file Amount can be one or more;
Step 124, judge the data file currently be called when, update the timestamp of the data file, that is, will The former timestamp of the data file is revised as current time.
Wherein it should be noted that the value of the preset difference value can be set according to actual needs, the default difference The value of value is simultaneously not exclusive constant.Therefore, user arbitrarily can modify or adjust the value of the preset difference value.When system receives After user is in order to modify the modification instruction that the preset difference value is inputted, former preset difference value can be replaced with to user's modification Another preset difference value afterwards.
Further, it before judging whether the data file is scratch file, may further comprise:
Step 125 receives the modification instruction, and the modification instruction is to modify the instruction of former preset difference value;
Step 126 instructs according to the modification former preset difference value being revised as another preset difference value.
In another embodiment, judge whether the data file is that scratch file can also include:
Step 121 ', judge the timestamp of the data file whether earlier than one second preset time point;
Step 122 ', when the timestamp of the data file is earlier than the second preset time point, judge the data File is scratch file.
Specifically, the second preset time point can also be set according to actual needs.The second preset time point It can be expired time.The expired time includes clock time, and e.g., the format of the expired time can are as follows: X X month X day X Divide X seconds.
Step 13, judge whether the data file is insignificant file (i.e., if for that can delete file), if so, Carry out step 14;Otherwise, then step is returned to.
In one embodiment, judge whether the data file is insignificant file specifically:
S131, the file for storing the data file is determined;
S132, judge whether the file is default file folder;
S133, when the file be the default file press from both sides when, judge the data file for insignificant file.
Specifically, the default file folder is used to store at least file that can delete file, institute for what user specified First kind default file folder and the second class default file folder can be divided into according to data class by stating default file folder.
The file for the junk data that the first kind default file folder confirms for storage operator.Operator's confirmation Junk data be by largely test with after data collection analysis, determine delete after will not be to the number that user has an impact According to, such as: unload residual data, data cached, the advertisement rubbish, system rubbish, installation kit of application program.Due to data bulk It is huge, to be screened convenient for user in subsequent step S14 to data file, to first kind default file folder according to being deposited The classification work of the data file of storage is classified to obtain multiple first kind and preset sub-folder.Such as, the first kind default file folder Multiple sub-folders such as storage unloading residual, caching rubbish, advertisement rubbish, system rubbish, installation kit can be divided into.
The file of personal data of the second class default file folder for storage user, such as: passing through social application program Chat record data, data of map application (" Tencent's map application " etc.) generation that (wechat, QQ etc.) is generated etc.. Since the quantity of the personal data of user is very big, and by the file for deleting data stored in the personal data Phenomena such as being sorted out, data corruption will not be generated.Such as, it is all photo files, is connect for storing the social applications program such as wechat The file of the photo received is marked as the default file folder, and is used to store the local folders of the photo of camera shooting It can't be marked as the default file folder.It is literary to data convenient for user in subsequent step S14 since data bulk is huge Part is screened, and is classified to the second class default file folder according to the classification work of the data file stored to obtain multiple the Two classes preset sub-folder.Such as, it is pressed from both sides for the second class default file of the data file of storage wechat application program, can be divided into and deposit Storage " chat picture ", " head portrait and circle of friends picture ", " save or the picture of shooting ", " video messaging ", " the expression packet of downloading ", The second class sub-folders such as " pictures of downloading ", " chat Background ", " speech message " and " public platform icon ".
In addition to this, the specific data that the included operation data of terminal system or operator specify is then vital document (that is, unsuppressible-suppression file).Therefore, for storing the operation data that terminal system carries or the specific data that operator specifies File can't also be marked as default file folder.
Step 14, the data file is deleted.
In one embodiment, the data file is deleted to specifically include:
Step 141, the data file that will be deemed as insignificant file summarize for a lists of documents to be deleted, wherein Each data file in the lists of documents to be deleted respectively corresponds a recovery option;
Step 142 generates an operation interface on the lists of documents to be deleted, and the operation interface includes at least one the Option is deleted in one confirmation and option is deleted in one second confirmation;
Step 143, when detect first confirmation delete option it is chosen when, it is clear to delete the file to be deleted in batches All data files in list, when detecting the second confirmation deletion option and at least one recovery option is chosen, batch Amount deletes other data files in the lists of documents to be deleted in addition to the data file of corresponding chosen recovery option.
Specifically, user can select the data file that the second confirmation option is checked on the lists of documents to be deleted, When at least a data file needs to retain for confirmation, then can be screened by corresponding recovery option to prevent from being deleted It removes.Wherein, in the lists of documents to be deleted, each data file also correspondence is shown for storing the data file First kind default file folder or the second class default file folder, from same first kind default file folder or the default text of same second class The data file of part folder is enumerated together, consequently facilitating the data file retained required for user's screening.
Such as, it is that operator confirms deletable data file that the first kind default file, which presss from both sides stored data file, But user needs to retain sometimes, and e.g., a certain installation kit is not always by user installation, if deleting the installation that will affect user, Therefore user can screen it when clearing up data file from the lists of documents to be deleted.To which institute can be prevented It states electronic device 1 and accidentally deletes the data file that user wants reservation, guarantee that data file deletes the safety of process.
Alternatively, the processor 102 realizes above-mentioned stale data document handling apparatus when executing the computer program 103 The function of each module/unit in embodiment, such as the unit 201-206 in Fig. 2.
The embodiment of the present invention by complexity and needs the work of manual cleaning automatic by the data clearing method of automation Change, simplify, reduces the artificial workload for deleting stale data, improve execution efficiency, and be conducive to avoid mistake hand-manipulated It is accidentally deleted caused by accidentally.
Illustratively, the computer program 103 can be divided into one or more module/units, it is one or Multiple module/the units of person are stored in the memory 101, and are executed by the processor 102, to complete the present invention.Institute Stating one or more module/units can be the series of computation machine program instruction section that can complete specific function, the instruction segment For describing implementation procedure of the computer program 103 in the electronic device 1.For example, the computer program 103 can With read module 201, first judgment module 202, the second judgment module 203, the removing module 204, update being divided into Fig. 2 Module 205 and modified module 206.
The electronic device 1 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set It is standby.It will be understood by those skilled in the art that the schematic diagram is only the example of electronic device 1, do not constitute to electronic device 1 Restriction, may include perhaps combining certain components or different components, such as institute than illustrating more or fewer components Stating electronic device 1 can also include input-output equipment, network access equipment, bus etc..
Alleged processor 102 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor 30 is also possible to any conventional processor Deng the processor 102 is the control centre of the electronic device 1, utilizes various interfaces and the entire electronic device 1 of connection Various pieces.
The memory 101 can be used for storing the computer program 103 and/or module/unit, the processor 102 By running or execute the computer program and/or module/unit that are stored in the memory 101, and calls and be stored in Data in memory 101 realize the various functions of the electronic device 1.The memory 101 can mainly include storage program Area and storage data area, wherein storing program area can application program needed for storage program area, at least one function (such as Sound-playing function, image player function etc.) etc.;Storage data area, which can be stored, uses created number according to electronic device 1 According to (such as audio data, phone directory etc.) etc..In addition, memory 101 may include high-speed random access memory, can also wrap Include nonvolatile memory, such as hard disk, memory, plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), peace Digital (Secure Digital, SD) card, flash card (Flash Card), at least one disk memory, flush memory device, Or other volatile solid-state parts.
If the integrated module/unit of the electronic device 1 is realized in the form of SFU software functional unit and as independent Product when selling or using, can store in a computer readable storage medium.Based on this understanding, the present invention is real All or part of the process in existing above-described embodiment method, can also instruct relevant hardware come complete by computer program At the computer program can be stored in a computer readable storage medium, which is being executed by processor When, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, the computer program includes computer program code, described Computer program code can be source code form, object identification code form, executable file or certain intermediate forms etc..The meter Calculation machine readable medium may include: can carry the computer program code any entity or device, recording medium, USB flash disk, Mobile hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory Device (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It needs to illustrate It is that the content that the computer-readable medium includes can be fitted according to the requirement made laws in jurisdiction with patent practice When increase and decrease, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium does not include electric carrier wave letter Number and telecommunication signal.
In several embodiments provided by the present invention, it should be understood that disclosed electronic device and method, Ke Yitong Other modes are crossed to realize.For example, electronics embodiment described above is only schematical, for example, the unit Division, only a kind of logical function partition, there may be another division manner in actual implementation.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in same treatment unit It is that each unit physically exists alone, can also be integrated in same unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of hardware adds software function module.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims Variation is included in the present invention.Any reference signs in the claims should not be construed as limiting the involved claims.This Outside, it is clear that one word of " comprising " does not exclude other units or steps, and odd number is not excluded for plural number.It is stated in electrical device claims Multiple units or electronic device can also be implemented through software or hardware by the same unit or electronic device.The first, the Second-class word is used to indicate names, and is not indicated any particular order.
Finally it should be noted that the above examples are only used to illustrate the technical scheme of the present invention and are not limiting, although reference Preferred embodiment describes the invention in detail, those skilled in the art should understand that, it can be to of the invention Technical solution is modified or equivalent replacement, without departing from the spirit and scope of the technical solution of the present invention.

Claims (10)

1. a kind of stale data document handling method characterized by comprising
The timestamp of each data file is read in one first preset time point;
Judge whether the data file is scratch file according to the timestamp of each data file;
When judging the data file for scratch file, judge whether the data file is insignificant file;And
When judging the data file for insignificant file, the data file is deleted.
2. processing method as described in claim 1, which is characterized in that judge whether the data file is scratch file packet It includes:
Calculate the difference between the timestamp and current time of the data file;
When the difference is greater than or equal to a preset difference value, judge the data file for scratch file;And
When the difference is less than the preset difference value, judge that the data file is not scratch file.
3. processing method as claimed in claim 2, which is characterized in that after judging that the data file is not scratch file, The method also includes:
Judge whether the data file is currently called, wherein the quantity of currently called data file can for one or It is multiple;And
When judging that the data file is currently called, the former timestamp of the data file is revised as current time.
4. processing method as described in claim 1, which is characterized in that judge whether the data file is scratch file packet It includes:
Judge the timestamp of the data file whether earlier than one second preset time point;And
When the timestamp of the data file is earlier than the second preset time point, judge the data file for expired text Part.
5. processing method as described in claim 1, which is characterized in that judge whether the data file is insignificant file packet It includes:
Determine the file for storing the data file;
Judge whether the file is default file folder;And
When the file is that the default file presss from both sides, judge the data file for insignificant file.
6. processing method as claimed in claim 5, which is characterized in that the default file folder is divided into first kind default file folder And the second class default file folder, first kind default file folder for the junk data of storage operator confirmation file, The first kind default file folder is classified as multiple first kind according to the classification of the data file stored and presets sub-folder, The second class default file folder is the file of storage personal data, and the second class default file folder is according to the number stored It is classified as multiple second classes according to the classification of file and presets sub-folder.
7. processing method as claimed in claim 6, which is characterized in that deleting the data file includes:
The data file that will be deemed as insignificant file summarizes for a lists of documents to be deleted, wherein the text to be deleted Each data file in part inventory respectively corresponds a recovery option;
An operation interface is generated on the lists of documents to be deleted, the operation interface includes at least one first confirmation and deletes choosing Option is deleted in item and one second confirmation;
When detect first confirmation delete option it is chosen when, delete all numbers in the lists of documents to be deleted in batches According to file;And
When detecting the second confirmation deletion option and at least one recovery option is chosen, delete in batches described to be deleted Other data files in lists of documents in addition to the data file of corresponding chosen recovery option;
Wherein, in the lists of documents to be deleted, each data file also correspondence is shown for storing the data file First kind default file folder or the second class default file folder, it is default from same first kind default file folder or same second class The data file of file is enumerated together.
8. a kind of stale data document handling apparatus characterized by comprising
Read module, for reading the timestamp of each data file in one first preset time point;
First judgment module, for judging whether the data file is scratch file according to the timestamp of each data file;
Second judgment module is used for when the first judgment module judges the data file for scratch file, described in judgement Whether data file is insignificant file;And
Removing module, for deleting the text when second judgment module judges the data file for insignificant file Part.
9. a kind of electronic device, including processor and memory, which is characterized in that be stored with stale data text in the memory Part processing routine, the processor are realized for executing the stale data documentor as appointed in claim 1 to 7 Stale data document handling method described in meaning one.
10. a kind of computer readable storage medium, which is characterized in that be stored with issue on the computer readable storage medium It is realized according to documentor, when the stale data documentor is executed by processor as any in claim 1-7 The stale data document handling method of item.
CN201811032581.1A 2018-09-05 2018-09-05 Stale data document handling method, device, electronic device and storage medium Pending CN109408469A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811032581.1A CN109408469A (en) 2018-09-05 2018-09-05 Stale data document handling method, device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811032581.1A CN109408469A (en) 2018-09-05 2018-09-05 Stale data document handling method, device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN109408469A true CN109408469A (en) 2019-03-01

Family

ID=65463859

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811032581.1A Pending CN109408469A (en) 2018-09-05 2018-09-05 Stale data document handling method, device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN109408469A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110187836A (en) * 2019-05-29 2019-08-30 北京奇艺世纪科技有限公司 A kind of data-erasure method, device, computer and storage medium
CN110737604A (en) * 2019-08-30 2020-01-31 北京奇艺世纪科技有限公司 method, device, electronic equipment and storage medium for automatically cleaning memory
CN111400298A (en) * 2020-04-17 2020-07-10 Oppo广东移动通信有限公司 Data processing method and device and computer readable storage medium
CN113672610A (en) * 2021-10-21 2021-11-19 支付宝(杭州)信息技术有限公司 Graph database processing method and device
CN113691631A (en) * 2021-08-27 2021-11-23 绿盟科技集团股份有限公司 Data cleaning method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080034003A1 (en) * 2006-08-01 2008-02-07 International Business Machines Corporation Efficient non-database file-expiration management for document retention
CN104021160A (en) * 2014-05-26 2014-09-03 北京金山安全软件有限公司 Client data cleaning method and device
CN104317628A (en) * 2014-11-13 2015-01-28 北京奇虎科技有限公司 Mobile terminal and storage space cleaning method thereof
CN106569733A (en) * 2015-10-12 2017-04-19 北京国双科技有限公司 Processing method and processing device for buffered data
CN107609066A (en) * 2017-08-30 2018-01-19 努比亚技术有限公司 Method, equipment and the computer for clearing up file can storage mediums

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080034003A1 (en) * 2006-08-01 2008-02-07 International Business Machines Corporation Efficient non-database file-expiration management for document retention
CN104021160A (en) * 2014-05-26 2014-09-03 北京金山安全软件有限公司 Client data cleaning method and device
CN104317628A (en) * 2014-11-13 2015-01-28 北京奇虎科技有限公司 Mobile terminal and storage space cleaning method thereof
CN106569733A (en) * 2015-10-12 2017-04-19 北京国双科技有限公司 Processing method and processing device for buffered data
CN107609066A (en) * 2017-08-30 2018-01-19 努比亚技术有限公司 Method, equipment and the computer for clearing up file can storage mediums

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110187836A (en) * 2019-05-29 2019-08-30 北京奇艺世纪科技有限公司 A kind of data-erasure method, device, computer and storage medium
CN110187836B (en) * 2019-05-29 2022-09-02 北京奇艺世纪科技有限公司 Data deleting method and device, computer and storage medium
CN110737604A (en) * 2019-08-30 2020-01-31 北京奇艺世纪科技有限公司 method, device, electronic equipment and storage medium for automatically cleaning memory
CN111400298A (en) * 2020-04-17 2020-07-10 Oppo广东移动通信有限公司 Data processing method and device and computer readable storage medium
CN113691631A (en) * 2021-08-27 2021-11-23 绿盟科技集团股份有限公司 Data cleaning method and device and electronic equipment
CN113691631B (en) * 2021-08-27 2024-02-20 绿盟科技集团股份有限公司 Data cleaning method and device and electronic equipment
CN113672610A (en) * 2021-10-21 2021-11-19 支付宝(杭州)信息技术有限公司 Graph database processing method and device
CN113672610B (en) * 2021-10-21 2022-02-15 支付宝(杭州)信息技术有限公司 Graph database processing method and device

Similar Documents

Publication Publication Date Title
CN109408469A (en) Stale data document handling method, device, electronic device and storage medium
US11210610B2 (en) Enhanced multimedia content preview rendering in a cloud content management system
CN109359091B (en) File management method, device, terminal and computer readable storage medium
CN108063818B (en) Data downloading method, device, terminal and computer readable storage medium
CN109739815A (en) Document handling method, system, device, equipment and storage medium
CN106708912B (en) Junk file identification and management method, identification device, management device and terminal
US20240004917A1 (en) Data processing method and device, terminal, and storage medium
US10938773B2 (en) Method and apparatus for synchronizing contact information and medium
CN109522282B (en) Picture management method, device, computer device and storage medium
CN109472540B (en) Service processing method and device
CN111428117A (en) Data acquisition method and device for application program
CN111753141A (en) Data management method and related equipment
CN115134353A (en) Automatic file uploading method, file previewing method, device, medium and equipment
CN113836181A (en) Data query method and device combining RPA and AI, electronic equipment and storage medium
CN112988663A (en) File storage method and electronic equipment
CN115079873A (en) Information display method and device, electronic equipment and storage medium
CN111400260A (en) File display method, display device, terminal device and readable storage medium
CN112184027A (en) Task progress updating method and device and storage medium
CN112417259A (en) Media resource processing method, device, equipment and storage medium
CN110035121A (en) A kind of information processing method and electronic equipment
CN114390345B (en) Video generation method, device, electronic equipment and computer readable storage medium
CN113419992B (en) File clearing configuration page display method and device, electronic equipment and medium
US11868319B2 (en) File storage system based on attributes of file components
CN118152338A (en) Accessory management method, system, equipment and medium
US9251153B1 (en) Systems and methods for populating and maintaining a local cache with archived data items

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190301

RJ01 Rejection of invention patent application after publication