CN104965731B - A kind of data processing method and electric terminal - Google Patents

A kind of data processing method and electric terminal Download PDF

Info

Publication number
CN104965731B
CN104965731B CN201510296189.8A CN201510296189A CN104965731B CN 104965731 B CN104965731 B CN 104965731B CN 201510296189 A CN201510296189 A CN 201510296189A CN 104965731 B CN104965731 B CN 104965731B
Authority
CN
China
Prior art keywords
file
identity information
electric terminal
destination
folder
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.)
Expired - Fee Related
Application number
CN201510296189.8A
Other languages
Chinese (zh)
Other versions
CN104965731A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201510296189.8A priority Critical patent/CN104965731B/en
Publication of CN104965731A publication Critical patent/CN104965731A/en
Application granted granted Critical
Publication of CN104965731B publication Critical patent/CN104965731B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The embodiment of the invention discloses a kind of data processing method and electric terminal, this method includes:Electric terminal judges whether destination application in installation or operation has created file;If so, then electric terminal establishes identity information file in file, wherein, identity information file carries the corresponding identity information of destination application;After electric terminal detects that destination application is unloaded, the file in external storage is traveled through to find out destination folder, wherein, the identity information file of the identity information for carrying destination application is included in destination folder;Electric terminal delete target file.Using the present invention, Stub File that can quickly after the unloading of complete deletion software.

Description

A kind of data processing method and electric terminal
Technical field
The present invention relates to field of computer technology, more particularly to a kind of data processing method and electric terminal.
Background technology
Application of the electric terminal in we live is more and more extensive, greatly facilitates our life.User is pacifying Fill the application program and can all produce mass data during using the application program in the external storage of electric terminal, and User's later stage unloads and is over after application program in most cases, these data are otiose to user, are used in order to prevent The useful information at family is lost, and electric terminal will not actively delete these data.Time is grown, the residual data in electric terminal Will be cumulative, until taking whole external memory space.
When artificially being cleared up external memory space, often useful which is during which file of None- identified Useless, and cause Stub File can not be by complete deletion, or even some vital documents are deleted by mistake.
The content of the invention
The embodiment of the invention discloses a kind of data processing method and electric terminal, quickly can thoroughly delete software and unload Stub File during load.
In a first aspect, the embodiment of the present invention provides a kind of data processing method, this method includes:
Electric terminal judges whether destination application in installation or operation has created file;
If so, then the electric terminal establishes identity information file in the file, wherein, the identity information text Part carries the corresponding identity information of the destination application;
After the electric terminal detects that the destination application is unloaded, the file in the external storage is traveled through Press from both sides to find out destination folder, wherein, the identity for carrying the destination application is included in the destination folder The identity information file of information;
The electric terminal deletes the destination folder.
With reference to first aspect, in the first possible implementation of first aspect, the electric terminal is in the text Identity information file is established in part folder, including:
Whether the electric terminal, which judges to include in the parent folder belonging to the file, carries the intended application journey The identity information file of the identity information of sequence;
If it is not, then the electric terminal establishes identity information file in the file.
With reference to first aspect or first aspect the first possible implementation, second in first aspect be possible In implementation, after file in the traversal external storage is to find out destination folder, and the deletion Before the destination folder, further include:
Whether the electric terminal judges in the destination folder corresponding comprising at least two different application programs Identity information;
If it is not, the step of then performing the deletion destination folder.
With reference to first aspect or first aspect the first possible implementation, the third in first aspect be possible It is described to be established in the file after identity information file in implementation, and in the traversal external storage File before finding out destination folder, to further include:
Receive data detection command input by user;
The data detection command is responded, detects whether the destination application is unloaded.
With reference to first aspect or first aspect the first possible implementation, the 4th kind in first aspect be possible In implementation, the electric terminal deletes the destination folder, including:
Judge the video file more than preset data threshold value whether is included in the destination folder;
When judging result for when being, output prompt message is selected for user;
The data scrubbing that user inputs according to the prompt message is received to instruct;
The data scrubbing instruction is responded, deletes the destination folder.
Second aspect, an embodiment of the present invention provides a kind of electric terminal, which includes:
First judging unit, for judging whether destination application in installation or operation has created file;
Unit is established, for when the judging result of first judging unit is is, body to be established in the file Part message file, wherein, the identity information file carries the corresponding identity information of the destination application;
Searching unit, it is described outer for after the electric terminal detects that the destination application is unloaded, traveling through Portion storage in file to find out destination folder, wherein, include in the destination folder and carry the target The identity information file of the identity information of application program;
Unit is deleted, for deleting the destination folder.
With reference to second aspect, in the first possible implementation of second aspect, the unit of establishing includes:
First judgment sub-unit, for whether judging in the parent folder belonging to the file comprising the carrying target The identity information file of the identity information of application program;
Subelement is established, for when the judging result of first judgment sub-unit is no, being built in the file Vertical identity information file.
With reference to the possible implementation of the first of second aspect or second aspect, second in second aspect is possible In implementation, the electric terminal further includes:
Second judging unit, for judging whether include at least two different application programs pair in the destination folder The identity information answered, when judging result is no, triggers file destination described in the deletion element deletion.
With reference to the possible implementation of the first of second aspect or second aspect, the third in second aspect is possible In implementation, the electric terminal further includes:
Receiving unit, for receiving data detection command input by user;
Response unit, for responding the data detection command, detects whether the destination application is unloaded.
With reference to the possible implementation of the first of second aspect or second aspect, the 4th kind in second aspect is possible In implementation, the deletion unit includes:
Second judgment sub-unit, for judging the video more than preset data threshold value whether is included in the destination folder File;
Export subelement, for second judgment sub-unit judging result for be when, output prompt message for Family selects;
Receiving subelement, instructs for receiving the data scrubbing that user inputs according to the prompt message;
Subelement is responded, for responding the data scrubbing instruction, deletes the destination folder.
By implementing the embodiment of the present invention, electric terminal first judges whether newly-generated when installing or running application program File, if it is, establishing one and the corresponding file of the application program in this document folder, is subsequently detecting this After application program is unloaded, the file in external storage is traveled through to find out the file for including above-mentioned file, and deleted Remove, effectively clean up remaining rubbish after application program unloading.
Further, when also including above-mentioned file in the parent folder for judging newly-generated file, then no longer exist Above-mentioned file is established in newly-generated file, because electric terminal can clear up parent folder naturally when carrying out rubbish cleaning, The new folder being present in parent folder can be also deleted;Before Delete Folder, first judge whether also deposited in file In the identity information of other applications, if then reserved folder is used for other applications;To the file in file Analyzed, when including larger video file in file, ask the user whether also to need Delete Folder, to avoid deleting by mistake The file of user's storage.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is attached drawing needed in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of flow diagram of data processing method provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of another data processing method provided in an embodiment of the present invention;
Fig. 3 is a kind of structure diagram of electric terminal provided in an embodiment of the present invention;
Fig. 3 A are a kind of structure diagrams for establishing unit provided in an embodiment of the present invention;
Fig. 3 B are provided in an embodiment of the present invention by a kind of structure diagram of electric terminal;
Fig. 4 is the structure diagram of another electric terminal provided in an embodiment of the present invention;
Fig. 5 is the structure diagram of another electric terminal provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only the part of the embodiment of the present invention, instead of all the embodiments.Base Embodiment in the present invention, those of ordinary skill in the art obtained without making creative work it is all its His embodiment, belongs to the scope of protection of the invention.
It should be noted that the term used in embodiments of the present invention is only merely for the mesh of description specific embodiment , and it is not intended to be limiting the present invention." the one of the embodiment of the present invention and singulative used in the attached claims Kind ", " described " and "the" are also intended to including most forms, unless context clearly shows that other implications.It is also understood that this Term "and/or" used herein refers to and comprising any or all possible group associated of list items purpose of one or more Close.In addition, the term " first ", " second ", " the 3rd " in description and claims of this specification and above-mentioned attached drawing and " Four " etc. be to be used to distinguish different objects, rather than for describing particular order.In addition, term " comprising " and " having " and it Any deformation, it is intended that cover non-exclusive include.Such as contain the process of series of steps or unit, method, be The step of system, product or equipment are not limited to list or unit, but alternatively further include the step of not listing or list Member, or alternatively further include for the intrinsic other steps of these processes, method, product or equipment or unit.
Electric terminal described in the embodiment of the present invention can be mobile phone, tablet computer, laptop, palm PC, shifting Dynamic internet device (MID, mobile internet device), wearable device (such as intelligent watch (such as iWatch), Intelligent bracelet, pedometer etc.) or other can installation and deployment instant messaging applications client terminal device.
Refer to Fig. 1, Fig. 1 is a kind of flow diagram of data processing method provided in an embodiment of the present invention, this method Including but not limited to following steps.
Step S102:Electric terminal judges whether destination application in installation or operation has created file.
Specifically, the bag management service (PackageManagerService) in electric terminal is one of system service, energy Enough realize that the parsing to destination application, installation, renewal, movement, unloading, monitoring etc. service.In this step, electric terminal It can monitor whether destination application is performing installation operation by bag management service, when listening to installation targets application journey During sequence, further monitor in installation process whether created file;Electric terminal can also be monitored by bag management service After destination application installs, whether file has been created during operation.
Step S103:If so, then electric terminal establishes identity information file in file, wherein, identity information file Carry the corresponding identity information of destination application.
Specifically, after electric terminal is in the file monitoring in external storage, judge that destination application is being pacified When having created file during dress or operation, electric terminal generates an identity information file, then by the identity information File is added in above-mentioned file, or when the identity information file pre-set is added to above-mentioned text by electric terminal In part folder.Wherein, the identity information of destination application is contained in the identity information file, the identity information is equivalent to one Unique identity, for intended application and other application to be distinguished, for example, established in above-mentioned file PackageName.txt files, the application ID number 010101 (i.e. identity information) of destination application is included in this document, namely It is to say, all can is the text that the application program establish an entitled PackageName.txt during each application program new folder Part, for different application programs, the ID number in PackageName.txt files is different.
Further, form existing for above-mentioned identity information file includes but not limited to .txt .doc .html .xml etc. Form, identity information file can also exist in the form of hidden file, can specifically be set in advance according to being actually needed It is fixed.
In a kind of optional scheme, electric terminal establishes identity information file in file, including:Electric terminal is sentenced Whether the identity information file of the identity information that carries destination application is included in parent folder belonging to disconnected file;If No, then electric terminal establishes identity information file in file.
Specifically, after it is the file that destination application creates to judge file, further judge that this document presss from both sides Parent folder in whether have the identity information of destination application, if having there is destination application in parent folder Identity information then no longer in above-mentioned file add identity information file, if there is no destination application in parent folder Identity information then into above-mentioned file add identity information file.
For example, when detect created file b under path/sdcard/a/ when, first judge whether there is mesh under file a The identity information file of application program is marked, if (the file PackageName.txt under such as path/sdcard/a/, and ID number in PackageName.txt is corresponding with destination application), then intended application journey need not be established in file b The identity information file of sequence, if it is not, needing to establish the identity information file of destination application in file b.
Step S104:After electric terminal detects that destination application is unloaded, the file in external storage is traveled through To find out destination folder, wherein, the identity of the identity information for carrying destination application is included in destination folder Message file.
Specifically, electric terminal can detect whether intended application is unloaded, and the action of detection can be by external trigger, example Such as, user clicks on the virtual push button " rubbish cleaning " on electric terminal display interface;Can also be in electric terminal be judged Automatic trigger when parameter reaches preset standard, for example, when judging that external storage remaining space is less than preset value, or reach default Clearance time point when etc..It is each in electric terminal traversal external storage after detecting that destination application is unloaded File, first determine whether out this document folder in whether include identity information file, when find out include identity information file when, into Judge to one step whether the identity information in identity information file is the identity information of destination application, if so, will then include The folder identifier of destination application is destination folder.
Step S105:Electric terminal delete target file.
Specifically, electric terminal deletes the file for being identified as file destination.Before deletion, electric terminal can be with defeated Go out to delete prompting so that user is confirmed whether to be deleted, when receive it is input by user be used for the instruction for indicating to delete after, Electric terminal delete target file.
In the described data processing methods of Fig. 1, electric terminal first judges whether installing or running application program It is stylish to generate file, if it is, establishing one and the corresponding file of the application program in this document folder, subsequently exist After detecting that the application program is unloaded, the file in external storage is traveled through to find out the file for including above-mentioned file, And be deleted, effectively clean up remaining rubbish after application program unloading.
Refer to Fig. 2, Fig. 2 is the flow diagram of another data processing method provided in an embodiment of the present invention, the party Method includes but not limited to following steps.
Step S202:Electric terminal judges whether destination application in installation or operation has created file.
Specifically, the bag management service (PackageManagerService) in electric terminal is one of system service, energy Enough realize that the parsing to destination application, installation, renewal, movement, unloading, monitoring etc. service.In this step, electric terminal It can monitor whether destination application is performing installation operation by bag management service, when listening to installation targets application journey During sequence, further monitor in installation process whether created file;Electric terminal can also be monitored by bag management service After destination application installs, whether file has been created during operation.
Step S203:If so, then electric terminal establishes identity information file in file, wherein, identity information file Carry the corresponding identity information of destination application.
Specifically, after electric terminal is in the file monitoring in external storage, judge that destination application is being pacified When having created file during dress or operation, electric terminal generates an identity information file, then by the identity information File is added in above-mentioned file, or when the identity information file pre-set is added to above-mentioned text by electric terminal In part folder.Wherein, the identity information of destination application is contained in the identity information file, the identity information is equivalent to one Unique identity, for intended application and other application to be distinguished, for example, established in above-mentioned file PackageName.txt files, the application ID number 010101 (i.e. identity information) of destination application is included in this document, namely It is to say, all can is the text that the application program establish an entitled PackageName.txt during each application program new folder Part, for different application programs, the ID number in PackageName.txt files is different.
Further, form existing for above-mentioned identity information file includes but not limited to .txt .doc .html .xml etc. Form, identity information file can also exist in the form of hidden file, can specifically be set in advance according to being actually needed It is fixed.
In a kind of optional scheme, electric terminal establishes identity information file in file, including:Electric terminal is sentenced Whether the identity information file of the identity information that carries destination application is included in parent folder belonging to disconnected file;If No, then electric terminal establishes identity information file in file.
Specifically, after it is the file that destination application creates to judge file, further judge that this document presss from both sides Parent folder in whether have the identity information of destination application, if having there is destination application in parent folder Identity information then no longer in above-mentioned file add identity information file, if there is no destination application in parent folder Identity information then into above-mentioned file add identity information file.
For example, when detect created file b under path/sdcard/a/ when, first judge whether there is mesh under file a The identity information file of application program is marked, if (the file PackageName.txt under such as path/sdcard/a/, and ID number in PackageName.txt is corresponding with destination application), then intended application journey need not be established in file b The identity information file of sequence, if it is not, needing to establish the identity information file of destination application in file b.
Step S204:After electric terminal detects that destination application is unloaded, the file in external storage is traveled through To find out destination folder, wherein, the identity of the identity information for carrying destination application is included in destination folder Message file.
Specifically, electric terminal can detect whether intended application is unloaded, and the action of detection can be by external trigger, example Such as, user clicks on the virtual push button " rubbish cleaning " on electric terminal display interface;Can also be in electric terminal be judged Automatic trigger when parameter reaches preset standard, for example, when judging that external storage remaining space is less than preset value, or reach default Clearance time point when etc..It is each in electric terminal traversal external storage after detecting that destination application is unloaded File, first determine whether out this document folder in whether include identity information file, when find out include identity information file when, into Judge to one step whether the identity information in identity information file is the identity information of destination application, if so, will then include The folder identifier of destination application is destination folder.
Step S205:Whether electric terminal judges in destination folder corresponding comprising at least two different application programs Identity information.
Specifically, after electric terminal, which identifies file destination, to be added, determine whether in destination folder except comprising Whether the corresponding identity information of other applications is also included outside the corresponding identity information of destination application, when judging also to wrap It is during identity information containing other applications, then follow-up this document folder not to be handled, when judging not include other application During the identity information of program, then subsequent step is performed.
As an example it is assumed that two application programs of QQ and wechat are mounted with electric terminal, the corresponding application programs of QQ ID number is 000001, and the ID number of the corresponding application program of wechat is 000002, and the file c under path/sdcard/a/ is installation Established during QQ, in the identity information file PackageName.txt, PackageName.txt that are established at the same time under file c There is ID number 000001, file c is used for the chat record for storing QQ application programs, micro- subsequently when installing wechat application program The chat record of letter is also stored in file c, therefore ID number 000002 is also added to by electric terminal PackageName.txt.After application program QQ is unloaded from terminal, terminal can find out the file c comprising ID number 000001, And in the steps afterwards can Delete Folder c, still, file ability c be additionally operable to storage wechat chat content, work as file After c is deleted, therefore the function of wechat, needs imperfection to whether judging in file c comprising except intended application journey herein The corresponding identity information file of application program beyond sequence.
Step S206:When judging destination folder only identity information corresponding comprising destination application, mesh is judged Mark the video file whether included in file more than preset data threshold value.
Specifically, when judging destination folder only identity information corresponding comprising destination application, then can determine that Delete target file will not have an impact other applications in the steps afterwards.In practical applications, external storage In larger video file be typically user storage file, after delete target application program, user may be for guarantor Stay the consideration of the video file and be reluctant delete target file, therefore, judge whether to have in destination folder in this step compared with Big video file.
Step S207:When judging result for when being, output prompt message is selected for user.
Specifically, when judging to have in destination folder larger video file, prompt message is exported to user, to carry Show that user chooses whether cleaning destination folder.For example, exporting a prompt window, there are two virtual push buttons " to delete in the window Except " and " cancellation ", when user clicks " deletion ", then cleaning instruction is have input to electric terminal, " taken when user clicks Disappear " when, then it have input cancellation cleaning instruction to electric terminal.
Step S208:The data scrubbing that user inputs according to prompt message is received to instruct.
Step S209:Response data cleaning instruction, delete target file.
Specifically, it is input by user according to the cleaning instruction for delete target file for prompting input when receiving Afterwards, electric terminal responds the instruction, will be deleted in electric terminal in destination folder.
In the described data processing methods of Fig. 2, electric terminal first judges whether installing or running application program It is stylish to generate file, if it is, establishing one and the corresponding file of the application program in this document folder, subsequently exist After detecting that the application program is unloaded, the file in external storage is traveled through to find out the file for including above-mentioned file, And be deleted, effectively clean up remaining rubbish after application program unloading.
Further, when also including above-mentioned file in the parent folder for judging newly-generated file, then no longer exist Above-mentioned file is established in newly-generated file, because electric terminal can clear up parent folder naturally when carrying out rubbish cleaning, The new folder being present in parent folder can be also deleted;Before Delete Folder, first judge whether also deposited in file In the identity information of other applications, if then reserved folder is used for other applications;To the file in file Analyzed, when including larger video file in file, ask the user whether also to need Delete Folder, to avoid deleting by mistake The file of user's storage.
The above-mentioned method for illustrating the embodiment of the present invention, for the ease of preferably implementing the above-mentioned of the embodiment of the present invention Scheme, correspondingly, is provided below the electric terminal of the embodiment of the present invention.
Fig. 3 is referred to, Fig. 3 is a kind of structure diagram of electric terminal 30 provided in an embodiment of the present invention, and the electronics is whole End 30 can include the first judging unit 302, establishes unit 303, searching unit 304 and delete unit 305, wherein, Ge Gedan Member is described in detail as follows.
First judging unit 302 is used to judge whether destination application in installation or operation has created file.
Specifically, the bag management service (PackageManagerService) in electric terminal 30 is one of system service, It can realize that the parsing to destination application, installation, renewal, movement, unloading, monitoring etc. service.In this step, first sentences Disconnected unit 302 can monitor whether destination application is performing installation operation by bag management service, be installed when listening to During destination application, further monitor in installation process whether created file;First judging unit 302 can also lead to Cross bag management service to monitor after destination application installs, whether file has been created during operation.
Unit 303 is established to be used to, when the judging result of the first judging unit 302 is is, identity letter is established in file File is ceased, wherein, identity information file carries the corresponding identity information of destination application.
Specifically, after the first judging unit 302 is in the file monitoring in external storage, intended application journey is judged Sequence establishes unit 303 and generates an identity information file, then should when having created file during installation or operation Identity information file is added in above-mentioned file, or establishes unit 303 and add the identity information file pre-set It is added in above-mentioned file.Wherein, the identity information of destination application, the identity information are contained in the identity information file Equivalent to one unique identity, for intended application and other application to be distinguished, for example, in above-mentioned file In establish PackageName.txt files, (the i.e. identity letter of application ID number 010101 in this document comprising destination application Breath), in other words, during each application program new folder, all can be the application program establish one it is entitled The file of PackageName.txt, for different application programs, the ID number in PackageName.txt files is different.
Further, form existing for above-mentioned identity information file includes but not limited to .txt .doc .html .xml etc. Form, identity information file can also exist in the form of hidden file, can specifically be set in advance according to being actually needed It is fixed.
Searching unit 304 is used for after electric terminal 30 detects that destination application is unloaded, and travels through in external storage File to find out destination folder, wherein, include in destination folder carry destination application identity letter The identity information file of breath.
Specifically, whether searching unit 304 can first detection intended application be unloaded, and the action of detection can be touched by outside Hair, for example, user clicks on the virtual push button " rubbish cleaning " on 30 display interface of electric terminal;It can also judge electronics end Automatic trigger when parameter in end 30 reaches preset standard, for example, when judging that external storage remaining space is less than preset value, or When reaching default clearance time point etc..After detecting that destination application is unloaded, searching unit 304 travels through outside and deposits Each file in storage, first determines whether out whether include identity information file in this document folder, believes when finding out comprising identity Cease file when, further judge the identity information in identity information file whether be destination application identity information, if It is then destination folder by the folder identifier comprising destination application to be.
Delete unit 305 and be used for delete target file.
Specifically, delete unit 305 and delete the file for being identified as file destination.Before deletion, unit 305 is deleted also Deletion prompting can be exported, so that user is confirmed whether to be deleted, input by user is used to indicate what is deleted when receiving After instruction, 305 delete target file of unit is deleted.
In a kind of optional scheme, the structure for establishing unit 303 can also be established single as shown in Figure 3A, in figure 3 a Member 303 includes the first judgment sub-unit 3031 and establishes subelement 3032, wherein, the first judgment sub-unit 3031 and foundation are single Member 3032 is described as follows.
Whether the first judgment sub-unit 3031 is used to judge in the parent folder belonging to file comprising carrying intended application The identity information file of the identity information of program.
Subelement 3032 is established to be used to, when the judging result of the first judgment sub-unit 3031 is no, establish in file Identity information file.
Specifically, after the first judgment sub-unit 302 judges the file that file is created for destination application, by the One judgment sub-unit 3031 judges the identity information for whether having destination application in the parent folder of this document folder, if in father The identity information for having had destination application in file then adds identity information file no longer in above-mentioned file, such as Not having the identity information of destination application in fruit parent folder, then subelement 3032 is established in the triggering of the first judgment sub-unit 3031 Identity information file is established into above-mentioned file.
For example, when the first judging unit 302 judges to have created file b under outbound path/sdcard/a/, first sentences Disconnected subelement 3031 judges the identity information file for whether having destination application under file a, if (such as path/ File PackageName.txt under sdcard/a/, and the ID number in PackageName.txt and destination application pair Should), then the identity information file of destination application need not be established in file b, if it is not, establishing subelement 3032 establish the identity information file of destination application in file b.
In another optional scheme, structure that electric terminal 30 can also be as shown in Figure 3B, in figure 3b, electronics are whole End 30 except including the first judging unit 302, establish unit 303, searching unit 304 and delete unit 305 in addition to, further include reception Unit 307 and response unit 308, wherein, receiving unit 307 and response unit 308 are described in detail as follows.
Receiving unit 307 is used to receive data detection command input by user.
Response unit 308 is used for response data detection instruction, and whether detection destination application is unloaded.
It should be noted that in embodiments of the present invention, the specific implementation of unit can also be to should refer to shown in Fig. 1 Embodiment of the method corresponding description.
In the described electric terminals 30 of Fig. 3, electric terminal 30 first judges whether installing or running application program It is stylish to generate file, if it is, establishing one and the corresponding file of the application program in this document folder, subsequently exist After detecting that the application program is unloaded, the file in external storage is traveled through to find out the file for including above-mentioned file, And be deleted, effectively clean up remaining rubbish after application program unloading.
Refer to Fig. 4, Fig. 4 is the structure diagram of another electric terminal 30 provided in an embodiment of the present invention, the electronics Terminal 30 is except including the first judging unit 302 shown in Fig. 3, establishing unit 303, searching unit 304 and deletion unit 305 Outside, the second judging unit 306 can also be included, and delete unit 305 to include the second judgment sub-unit 3051, output Unit 3052, receiving subelement 3053 and response subelement 3054, wherein, the second judging unit 306, the second judgment sub-unit 3051st, being described in detail as follows for subelement 3052, receiving subelement 3053 and response subelement 3054 is exported.
Second judging unit 306 is used to judge in destination folder whether being corresponded to comprising at least two different application programs Identity information, when judging result for it is no when, whether the second judgment sub-unit 3051 of triggering judges in destination folder comprising greatly In the video file of preset data threshold value.
Specifically, after searching unit 304, which identifies file destination, to be added, target text is judged by the second judging unit 306 Whether also comprising the corresponding identity letter of other applications in addition to comprising the corresponding identity information of destination application in part folder Breath, it is when judging also to include the identity information of other applications, then follow-up this document folder not to be handled, when judging During identity information not comprising other applications, then trigger the second judgment sub-unit 3051 and judge whether wrapped in destination folder Video file containing more than preset data threshold value.
As an example it is assumed that two application programs of QQ and wechat, the corresponding application programs of QQ are mounted with electric terminal 30 ID number be 000001, the ID number of the corresponding application program of wechat is 000002, and the file c under path/sdcard/a/ is peace Fill what is established during QQ, identity information the file PackageName.txt, PackageName.txt established at the same time under file c In have an ID number 000001, file c is used for the chat record for storing QQ application programs, subsequently when installing wechat application program, The chat record of wechat is also stored in file c, therefore ID number 000002 is also added to by electric terminal 30 PackageName.txt.After application program QQ is unloaded from terminal, searching unit 304 finds out the text for including ID number 000001 Part c, then triggering export subelement 3052 and perform subsequent step (deleting), and still, file ability c is additionally operable to storage wechat Chat content, after file c is deleted, therefore imperfection, is needed the second judgment sub-unit 3051 right by the function of wechat herein Whether judge in file c comprising the corresponding identity information file of application program in addition to destination application.
Output subelement 3052 is used for when the judging result of the second judgment sub-unit 3051 is is, output prompt message supplies User selects.
Specifically, when the second judgment sub-unit 3051 judges to have in destination folder larger video file, triggering Export subelement 3052 and export prompt message to user, to prompt the user to choose whether cleaning destination folder.For example, output one A prompt window, has two virtual push buttons " deletion " and " cancellation " in the window, when user clicks " deletion ", then to output Subelement 3052 have input cleaning instruction, when user clicks " cancellation ", then it is clear have input cancellation to output subelement 3052 Reason instruction.
Receiving subelement 3053 is used to receive the data scrubbing instruction that user inputs according to prompt message.
Respond subelement 3054 and be used for response data cleaning instruction, delete target file.
Specifically, when response subelement 3054 receive it is input by user according to prompting input be used for delete target file After the cleaning instruction of folder, response subelement 3054 responds the instruction, and destination folder is deleted from electric terminal 30.
It should be noted that in embodiments of the present invention, the specific implementation of unit can also be to should refer to shown in Fig. 2 Embodiment of the method corresponding description.
In the described electric terminals 30 of Fig. 4, electric terminal 30 first judges whether installing or running application program It is stylish to generate file, if it is, establishing one and the corresponding file of the application program in this document folder, subsequently exist After detecting that the application program is unloaded, the file in external storage is traveled through to find out the file for including above-mentioned file, And be deleted, effectively clean up remaining rubbish after application program unloading.
Further, when also including above-mentioned file in the parent folder for judging newly-generated file, then no longer exist Above-mentioned file is established in newly-generated file, because electric terminal 30 can clear up father file naturally when carrying out rubbish cleaning Folder, the new folder being present in parent folder can be also deleted;Before Delete Folder, whether also first judge in file There are the identity information of other applications, if then reserved folder is used for other applications;To the text in file Part is analyzed, and when including larger video file in file, asks the user whether also to need Delete Folder, to avoid by mistake Delete the file of user's storage.
It refer to Fig. 5, the structure diagram of another electric terminal 50 provided in an embodiment of the present invention, the electronics during Fig. 5 Terminal 50 can include:At least one processor 501, such as CPU, at least one network interface 504, user interface 503, storage Device 505, at least one communication bus 502 and display screen 506.Wherein, communication bus 502 is used for realization between these components Connection communication.Wherein, user interface 503 can include display screen (Displ5y) 506, and optional user interface 503 can also include Standard wireline interface and wireless interface.Communication interface 504 optionally can include standard wireline interface (such as data line interface, Cable interface etc.), wave point (such as WI-FI interfaces, blue tooth interface, near-field communication interface).Memory 505 can be at a high speed R5M memories or non-labile memory (non-vol5tile memory), for example, at least a disk storage Device.Memory 505 optionally can also be at least one storage device for being located remotely from aforementioned processor 501.As shown in figure 5, As in a kind of memory 505 of computer-readable storage medium can include operating system, network communication module, Subscriber Interface Module SIM And data processor.
In the electric terminal 50 shown in Fig. 5, communication interface 504 be mainly used for connect second terminal, with second terminal into Row data communication;And processor 501 can be used for calling the data processor stored in memory 505, and perform following behaviour Make:
Electric terminal judges whether intended application in installation or operation has created file;
If so, then the electric terminal establishes identity information file in the file, wherein, the identity information text Part carries the corresponding identity information of the destination application;
After the electric terminal detects that the destination application is unloaded, the file in the external storage is traveled through Press from both sides to find out destination folder, wherein, the identity for carrying the destination application is included in the destination folder The identity information file of information;
The electric terminal deletes the destination folder.
Further, the electric terminal establishes identity information file in the file, including:
Whether the electric terminal, which judges to include in the parent folder belonging to the file, carries the intended application journey The identity information file of the identity information of sequence;
If it is not, then the electric terminal establishes identity information file in the file.
Further, after the file in the traversal external storage is to find out destination folder, Yi Jisuo State before deleting the destination folder, further include:
Whether the electric terminal judges in the destination folder corresponding comprising at least two different application programs Identity information;
If it is not, the step of then performing the deletion destination folder.
Further, it is described to be established in the file after identity information file, and the traversal outside File in storage is before finding out destination folder, to further include:
Receive data detection command input by user;
The data detection command is responded, detects whether the destination application is unloaded.
Further, the electric terminal deletes the destination folder, including:
Judge the video file more than preset data threshold value whether is included in the destination folder;
When judging result for when being, output prompt message is selected for user;
The data scrubbing that user inputs according to the prompt message is received to instruct;
The data scrubbing instruction is responded, deletes the destination folder.
In conclusion by implementing the embodiment of the present invention, electric terminal first judges whether to apply journey in installation or operation Sequence is stylish to generate file, if it is, establishing one and the corresponding file of the application program in this document folder, subsequently After detecting that the application program is unloaded, the file in external storage is traveled through to find out the file for including above-mentioned file Folder, and be deleted, effectively clean up remaining rubbish after application program unloading.
Further, when also including above-mentioned file in the parent folder for judging newly-generated file, then no longer exist Above-mentioned file is established in newly-generated file, because electric terminal can clear up parent folder naturally when carrying out rubbish cleaning, The new folder being present in parent folder can be also deleted;Before Delete Folder, first judge whether also deposited in file In the identity information of other applications, if then reserved folder is used for other applications;To the file in file Analyzed, when including larger video file in file, ask the user whether also to need Delete Folder, to avoid deleting by mistake The file of user's storage.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in computer read/write memory medium In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
The above disclosed power for being only a kind of preferred embodiment of the present invention, the present invention cannot being limited with this certainly Sharp scope, one of ordinary skill in the art will appreciate that realizing all or part of flow of above-described embodiment, and is weighed according to the present invention Profit requires made equivalent variations, still falls within and invents covered scope.

Claims (8)

  1. A kind of 1. data processing method, it is characterised in that including:
    Electric terminal judges whether destination application in installation or operation has created file;
    If so, then the electric terminal establishes identity information file in the file, wherein, the identity information file is taken With the corresponding identity information of the destination application, when judging the destination application in the process installed or run In when having created the file, generate the identity information file, the target is contained in the identity information file should With the identity information of program, equivalent to one unique identity of the identity information, for by destination application and other Application program distinguishes;
    After the electric terminal detects that the destination application is unloaded, the file in external storage is traveled through to search And destination folder is identified, wherein, the identity letter for carrying the destination application is included in the destination folder The identity information file of breath, after the electric terminal identifies the destination folder, determines whether the file destination In folder whether the corresponding identity of other applications is also included in addition to comprising the corresponding identity information of the destination application Information, when judging also to include the identity information of other applications, is not then handled the destination folder subsequently;
    When judging the identity information not comprising other applications, the electric terminal deletes the destination folder.
  2. 2. according to the method described in claim 1, it is characterized in that, the electric terminal establishes identity letter in the file File is ceased, including:
    Whether the electric terminal, which judges to include in the parent folder belonging to the file, carries the destination application The identity information file of identity information;
    If it is not, then the electric terminal establishes identity information file in the file.
  3. 3. method according to claim 1 or 2, it is characterised in that described that identity information text is established in the file After part, and file in the traversal external storage is before finding out destination folder, to further include:
    Electric terminal receives data detection command input by user;
    Electric terminal responds the data detection command, detects whether the destination application is unloaded.
  4. 4. method according to claim 1 or 2, it is characterised in that the electric terminal deletes the destination folder, bag Include:
    Judge the video file more than preset data threshold value whether is included in the destination folder;
    When judging result for when being, output prompt message is selected for user;
    The data scrubbing that user inputs according to the prompt message is received to instruct;
    The data scrubbing instruction is responded, deletes the destination folder.
  5. A kind of 5. electric terminal, it is characterised in that including:
    First judging unit, for judging whether destination application in installation or operation has created file;
    Unit is established, for when the judging result of first judging unit is is, identity letter to be established in the file File is ceased, wherein, the identity information file carries the corresponding identity information of the destination application, described when judging Destination application generates the identity information file when having created the file during installation or operation, described The identity information of the destination application, equivalent to one unique identities of the identity information are contained in identity information file Mark, for destination application and other applications to be distinguished;
    Searching unit, for after the electric terminal detects that the destination application is unloaded, traveling through in external storage File to search and identify destination folder, wherein, include in the destination folder carry the target should With the identity information file of the identity information of program;
    Second judging unit, for after the electric terminal identifies the destination folder, judging the destination folder In in addition to comprising the corresponding identity information of the destination application whether also comprising other applications corresponding identity letter Breath, when judging also to include the identity information of other applications, is not then handled the destination folder subsequently;
    Unit is deleted, for deleting the destination folder when judging the identity information not comprising other applications.
  6. 6. electric terminal according to claim 5, it is characterised in that the unit of establishing includes:
    First judgment sub-unit, for whether judging in the parent folder belonging to the file comprising the carrying intended application The identity information file of the identity information of program;
    Subelement is established, for when the judging result of first judgment sub-unit is no, body to be established in the file Part message file.
  7. 7. the electric terminal according to claim 5 or 6, it is characterised in that further include:
    Receiving unit, for receiving data detection command input by user;
    Response unit, for responding the data detection command, detects whether the destination application is unloaded.
  8. 8. the electric terminal according to claim 5 or 6, it is characterised in that the deletion unit includes:
    Second judgment sub-unit, for judging the video text more than preset data threshold value whether is included in the destination folder Part;
    Subelement is exported, for when the judging result of second judgment sub-unit is is, output prompt message to be selected for user Select;
    Receiving subelement, instructs for receiving the data scrubbing that user inputs according to the prompt message;
    Subelement is responded, for responding the data scrubbing instruction, deletes the destination folder.
CN201510296189.8A 2015-06-02 2015-06-02 A kind of data processing method and electric terminal Expired - Fee Related CN104965731B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510296189.8A CN104965731B (en) 2015-06-02 2015-06-02 A kind of data processing method and electric terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510296189.8A CN104965731B (en) 2015-06-02 2015-06-02 A kind of data processing method and electric terminal

Publications (2)

Publication Number Publication Date
CN104965731A CN104965731A (en) 2015-10-07
CN104965731B true CN104965731B (en) 2018-05-01

Family

ID=54219766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510296189.8A Expired - Fee Related CN104965731B (en) 2015-06-02 2015-06-02 A kind of data processing method and electric terminal

Country Status (1)

Country Link
CN (1) CN104965731B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105912671A (en) * 2016-04-12 2016-08-31 努比亚技术有限公司 Method and device for cleaning up useless files
CN107273401A (en) * 2017-04-21 2017-10-20 捷开通讯(深圳)有限公司 Management method, mobile device and the storage device of application data file
CN111263936A (en) * 2017-08-22 2020-06-09 深圳传音通讯有限公司 Electronic terminal and junk file processing method thereof
CN107943387A (en) * 2017-11-14 2018-04-20 维沃移动通信有限公司 A kind of document handling method and mobile terminal
CN109871361B (en) * 2018-11-26 2023-05-23 北京乐我无限科技有限责任公司 File uploading method and device, electronic equipment and readable storage medium
CN113626391B (en) * 2021-08-27 2023-04-14 四川虹美智能科技有限公司 Processing method for cache file of operating system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6968551B2 (en) * 2001-06-11 2005-11-22 John Hediger System and user interface for generation and processing of software application installation instructions
CN102937990A (en) * 2012-10-30 2013-02-20 北京小米科技有限责任公司 Method and device for cleaning files
CN103092664A (en) * 2013-02-07 2013-05-08 珠海市君天电子科技有限公司 Processing method and device of data file of android system
CN103092938A (en) * 2013-01-07 2013-05-08 浙江鸿程计算机系统有限公司 Method for intelligently cleaning garbage file of secure digital (SD) card of Android mobile phone
CN103176828A (en) * 2013-03-29 2013-06-26 北京奇虎科技有限公司 Method and device of deleting application program residual files
CN103577567A (en) * 2013-10-29 2014-02-12 广东欧珀移动通信有限公司 Method for uninstalling application and deleting garbage file in Android system
CN103631934A (en) * 2013-12-06 2014-03-12 贝壳网际(北京)安全技术有限公司 Garbage-file detecting method and device
CN104660825A (en) * 2015-03-09 2015-05-27 陈健强 Method and system for deleting application of smart mobile phone

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6968551B2 (en) * 2001-06-11 2005-11-22 John Hediger System and user interface for generation and processing of software application installation instructions
CN102937990A (en) * 2012-10-30 2013-02-20 北京小米科技有限责任公司 Method and device for cleaning files
CN103092938A (en) * 2013-01-07 2013-05-08 浙江鸿程计算机系统有限公司 Method for intelligently cleaning garbage file of secure digital (SD) card of Android mobile phone
CN103092664A (en) * 2013-02-07 2013-05-08 珠海市君天电子科技有限公司 Processing method and device of data file of android system
CN103176828A (en) * 2013-03-29 2013-06-26 北京奇虎科技有限公司 Method and device of deleting application program residual files
CN103577567A (en) * 2013-10-29 2014-02-12 广东欧珀移动通信有限公司 Method for uninstalling application and deleting garbage file in Android system
CN103631934A (en) * 2013-12-06 2014-03-12 贝壳网际(北京)安全技术有限公司 Garbage-file detecting method and device
CN104660825A (en) * 2015-03-09 2015-05-27 陈健强 Method and system for deleting application of smart mobile phone

Also Published As

Publication number Publication date
CN104965731A (en) 2015-10-07

Similar Documents

Publication Publication Date Title
CN104965731B (en) A kind of data processing method and electric terminal
CN105227626B (en) Content pushing method and device and terminal
CN102521284B (en) Page screenshot processing method and device based on mobile terminal browser
CN103761178B (en) A kind of method realized using unloading investigation
CN106469044B (en) Method and device for realizing page jump
CN103607385A (en) Method and apparatus for security detection based on browser
CN102378136B (en) Short message processing method and device
CN104462500B (en) Determination method, the control processing method and processing device of control liveness
JP2018530270A5 (en)
CN104820683A (en) Terminal
CN105893471B (en) Data processing method and electronic equipment
CN105430726B (en) The carrier aggregation function control method and communication terminal of a kind of communication terminal
CN104834687A (en) Picture display method
JP5880315B2 (en) System management apparatus, system management method, and system management program
CN114465741A (en) Anomaly detection method and device, computer equipment and storage medium
CN103067246A (en) Method and apparatus used for processing file received based on instant communication service
CN113282268B (en) Sound effect configuration method and device, storage medium and electronic equipment
CN112395029A (en) Application program interface display method and device, electronic equipment and storage medium
CN113691628A (en) Task switching method and device, system, electronic equipment and computer medium
CN103685669B (en) SMS processing method and terminal
CN106250002B (en) Information processing method and information processing apparatus
CN112306592B (en) Message processing method and device, storage medium and electronic device
CN106874782B (en) Traceless use method of mobile terminal and mobile terminal
CN106656735A (en) Expression image sending method and device
CN104571812B (en) Information processing method and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180501