WO2015117426A1 - 文件管理方法及装置 - Google Patents

文件管理方法及装置 Download PDF

Info

Publication number
WO2015117426A1
WO2015117426A1 PCT/CN2014/090068 CN2014090068W WO2015117426A1 WO 2015117426 A1 WO2015117426 A1 WO 2015117426A1 CN 2014090068 W CN2014090068 W CN 2014090068W WO 2015117426 A1 WO2015117426 A1 WO 2015117426A1
Authority
WO
WIPO (PCT)
Prior art keywords
file information
index
application
file
specified
Prior art date
Application number
PCT/CN2014/090068
Other languages
English (en)
French (fr)
Inventor
黄勤波
钟声
王巍
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015117426A1 publication Critical patent/WO2015117426A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Definitions

  • the present invention relates to the field of communications, and in particular, to a file management method and apparatus.
  • smart terminals mobile phones, etc.
  • the invention takes a mobile phone of a smart terminal as an example.
  • Mobile phones have not only greatly improved people's work efficiency, but also changed people's lifestyles.
  • an Android installation package (AndroidPackage, abbreviated as apk) is tens of hundreds of MB, and many files generated by the application after not being used. More and more, and these files (especially those placed on sd cards) cannot be deleted automatically.
  • AndroidPackage abbreviated as apk
  • the terminal system space and sd card space will be quickly consumed, and users do not know which files are useful. Which files are useless and I dare not delete files at will.
  • the management of the file related to the application has technical problems such as a large manual maintenance workload, and the present invention provides a file management method and device to solve at least the above technical problem.
  • a file management method including: obtaining an index of an application identifier corresponding to a specified application on a terminal from a preset index database, wherein the index and the specified application are installed or running
  • the generated file information has an association relationship, and the index is in one-to-one correspondence with the application identifier; the file information is managed according to the index and the association relationship.
  • the method includes: allocating the index to the application identifier; and establishing file information and the index generated by the application during installation or operation. Association relationship; storing the association relationship into the preset index database.
  • the method further includes: uploading the preset index database to the network side.
  • the method further includes: storing, in the terminal, the file information in the preset index library of the network side that the frequency of use is greater than a specified threshold.
  • the file information is managed according to the index and the association relationship: a query operation, a deletion operation, and a backup transfer.
  • deleting the file information according to the index and the association relationship including one of: prompting a user in a list form for specifying file information in all the file information triggered by a specified event Select whether to delete, and delete all the information in the file information except the specified file information; delete all the file information under the trigger of the specified event.
  • the list includes description information of at least one of the following file information: a name of the specified file information, a frequency of use of the specified file information, an access time of the specified file information, the specified file The effect of the information and the result of the deletion of the specified file information.
  • the specified event includes one of: detecting that the application is uninstalled, detecting that a system space of the terminal is less than a preset threshold.
  • the application identifier comprises: an application package name.
  • the file information includes at least one of: an application package name of the application, a read/write frequency of the file information, a read/write time of the file information, a file directory path of the file information, and the The role of data message information.
  • a file management apparatus including: an obtaining module, configured to acquire an index of an application identifier corresponding to a specified application on a terminal from a preset index database, wherein the index and the designation There is an association relationship between the file information generated by the application during installation or operation, and the index is in one-to-one correspondence with the application identifier; the management module is configured to manage the file information according to the index and the association relationship.
  • the technical means for establishing an index of the related file information of the specified application and managing the related file information of the specified application according to the index solves the related art, and the manual management of the file related to the application is manually maintained.
  • Technical problems such as a large workload, which saves the manual workload of file management, improves disk usage, and improves user experience.
  • FIG. 1 is a flow chart of a file management method according to an embodiment of the present invention.
  • FIG. 2 is a block diagram showing the structure of a file management apparatus according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram showing the principle of file management implementation according to a preferred embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a file index establishment process according to a preferred embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a file cleaning process according to a preferred embodiment of the present invention.
  • FIG. 1 is a flow chart of a file management method according to an embodiment of the present invention. As shown in Figure 1, the method includes the following processing steps:
  • Step S102 Obtain an index of the application identifier corresponding to the specified application on the terminal from the preset index database, where the index is associated with the file information generated by the specified application during installation or operation, and the index and the application identifier are corresponding;
  • Step S104 managing the file information according to the index and the association relationship.
  • the related file can be managed according to the index of the unique identifier corresponding to the application, the related file of the application can be automatically managed, and since the application file can be managed according to the index, the saving is achieved.
  • the amount of manual maintenance work since the related file can be managed according to the index of the unique identifier corresponding to the application, the related file of the application can be automatically managed, and since the application file can be managed according to the index, the saving is achieved. The amount of manual maintenance work.
  • the following processing may be performed:
  • the index associated with the above file information is stored in the preset index database, but is not limited thereto.
  • the preset index database may also be uploaded to the network side, so that the sharing of the index database may be implemented.
  • the file information in the preset index library on the network side that is greater than the specified threshold may be stored in the terminal.
  • the foregoing file information may be managed according to the foregoing index and the foregoing association relationship: a query operation, a deletion operation, and a backup transfer.
  • the deleting operation of the file information according to the foregoing index and the foregoing association relationship may be expressed as one of the following processing procedures, but is not limited thereto:
  • the description information of at least one of the following file information includes: a name of the specified file information, a frequency of use of the specified file information, an access time of the specified file information, a role of the specified file information, and a deletion of the specified file information. The result. (2) Delete all the above file information under the trigger of the specified event.
  • the specified event may include, but is not limited to, one of the following: detecting that the application is uninstalled, and detecting that the system space of the terminal is less than a preset threshold.
  • the foregoing application identifier includes but is not limited to: an application package name.
  • the file information includes at least one of the following: an application package name of the application, a read/write frequency of the file information, a read/write time of the file information, a file directory path of the file information, and the foregoing data file.
  • an application package name of the application a read/write frequency of the file information
  • a read/write time of the file information a read/write time of the file information
  • a file directory path of the file information a file directory path of the file information
  • the embodiment of the present invention further provides a file management apparatus, which is used to implement the foregoing method. As shown in FIG. 2, the method includes:
  • the obtaining module 20 is configured to obtain, from the preset index database, an index of the application identifier corresponding to the specified application on the terminal, where the index is associated with the file information generated by the specified application during installation or operation, and the index is as described above.
  • Application identifiers are one-to-one correspondence;
  • the management module 22 is connected to the obtaining module 20 and configured to manage the file information according to the index and the association relationship.
  • each of the foregoing modules may be implemented by using software or hardware.
  • the latter may be implemented by the following methods, but is not limited thereto: the obtaining module 20 is located in the first processor, and the management module 22 is located in the first In the second processor, the acquisition module 20 and the management module 22 are located in the same processor.
  • the embodiment provides a method for automatically establishing a corresponding file index when creating a file in a mobile phone application, and updating corresponding index data when reading and writing these files.
  • the following takes the file deletion as an example.
  • the mobile phone application is a function module that is preset by the mobile phone or installed by the user through various channels and can be operated by the user, and generates various user or application data in the mobile phone system space or the sd card space through various forms.
  • the file reading and writing module is a platform interface used by the mobile phone platform to read/write files/directories in the disk space of the mobile phone.
  • the file index database is used to record the file index of the system space or the sd card disk space, including but not limited to the following information, the created application package name, the file detailed path, the specific data item name, the data usage frequency, and the latest access time. , the role of the data item, and the possible consequences of the data item being cleaned up.
  • the Cloud File Index Database is a larger and more complete database that integrates more end file data indexes for further document management.
  • Application files apply application data and user data generated during runtime
  • System data is a data file generated in the system space, which may cause the application or system to run abnormally after being cleaned up;
  • User data refers to non-essential data or temporary data stored in an sd card, etc., and will only cause the application to reload or re-update the input after cleaning;
  • the embodiment provides a method for automatically establishing a file index for user data management.
  • the index database is preset to the terminal, that is, the index database that has been established before is preset in the mobile phone version.
  • the index database is built to establish a unique index for each application package name.
  • the file name, the read/write frequency, the last write time, the file directory path, the application information, and the purpose of the file are updated to the index database when the file is read or written;
  • the database can be synchronized to the cloud, and after more users share the data, the residual data of the sd card can be better cleaned up.
  • the disk file monitoring mode can be adopted.
  • the disk file is passively received and read and written information, and the file index database is updated to reduce the amount of CPU calculation or time cost caused by the scanning.
  • the more commonly used application data in the cloud database can be preset in the terminal, thereby improving the disk management efficiency, and not greatly increasing the size of the database and occupying too much disk space.
  • the cloud query can be performed to obtain the most valuable information with less traffic.
  • the user is notified in time to clean up the corresponding file; or all the recommended cleanup items may be listed according to the database information when the user performs the cleanup scan.
  • the scanned recommended cleaning item can list the detailed path of the item to be cleaned, the specific data item name of the application, the frequency of data usage, the last access time, the role of the data item, and the data item is cleaned up. Possible results. This information can effectively give users suggestions for managing files. Of course, it is also possible to extend some other field information that may be obtained.
  • the user-set strategy is automatically adopted for data cleaning or backup transfer.
  • the mobile phone platform needs to be cleaned mainly with system space, mainly the built-in storage space of the mobile phone, and the storage space of the sd card (including built-in and external), and the built-in storage space is mainly stored by the system component.
  • Application data which needs to be subdivided, is generally related to the application function; sd card storage space is generally the data downloaded or saved by the user through the application, and the amount of data may be relatively large.
  • Step S402 the mobile phone version preset index database: pre-scans the system space and the sd card, and imports all /data partitions, that is, system space and sd card (inside and outside) directories, into the database, if it is a new version and an empty sd Card, this index database will not have a new directory.
  • the index database has a preset index
  • the source of the preset index is the following steps, which are implemented in the cloud and then preset to the mobile phone version.
  • Step S404 installing a third-party application: entering a mobile phone application, such as WeChat, and performing certain operations through the WeChat application;
  • WeChat will have image cache, monitor log, local log, web cache, game download cache, game center icon, address cache, star user icon, other cache and so on.
  • step S406 the package name is obtained by parsing the configuration item of the application: the package name of the application is obtained through the platform interface, and the package name of the WeChat in this embodiment is: com.tencent.mm;
  • Step S408 creating a unique database index for the package name: querying the index of the package name in the index database, and if not, creating the application information, including a directory, etc.;
  • MD5 encryption is required to prevent the indexed database from being maliciously used.
  • Step S410 generating an apk file /data/app: when the application is installed, the platform generates an application directory such as /data/app;
  • the system caches the directory file generated by the Android platform, it needs to pass the application package name, so that it can clearly know which application created the file, but it still needs to pass the function of the file and the cleaning result through the translation interface of the platform transformation.
  • Step S412 generating a user data directory /data/data/com.zte.xxx: synchronously generating an application system data directory such as /data/data/com.tencent.mm and an sd card file such as /storage/tencent/micromsg;
  • the platform needs to be modified to write the file interface, and the file name and file function are added when the file is created, and the consequences after the cleaning are obtained.
  • Step S414 the user uses: the user inputs some personal data by using WeChat, and the WeChat application synchronizes the corresponding WeChat server data, such as a chat record or a WeChat address book, through the personal information;
  • Step S416 The file generated by the user in the setting item of the application: the application data is generated by the file reading and writing module of the terminal platform, and the data generated by the WeChat in this embodiment has a photo taken by WeChat, a crash log generated by WeChat, and a WeChat Monitoring logs, WeChat game download cache, local logs, chat files, subscription cache, address book backup, etc.
  • Step S418 Update the index database after writing the file/directory: synchronously update the index database when these files are generated, and update the following fields but are not limited to these fields: the created application package name, the file detailed path, the specific data item name, and the data usage frequency. The last access time, the role of the data item, and the possible consequences of the data item being cleaned up;
  • Step S420 Synchronize to the cloud database when appropriate: synchronously update with the cloud index database if necessary;
  • the index database is updated and ends.
  • Figure 3 is file management/cleanup according to the application name created by the file. As shown in FIG. 5, the file cleaning process provided in this embodiment includes the following steps:
  • Step S502 the background task scans all system space and sd card files when the index database is used for the first time;
  • Step S504 obtaining an application package name created by the file/directory in the index database
  • Step S506 scanning all pre-installed software and third-party software of the mobile phone
  • Step S508 obtaining a package name of all software
  • Step S510 judging whether the created application of the file exists by comparing the two lists;
  • step S512 a file management suggestion is given, and the file/directory that the creator does not already exist is cleared by default. Users can view the details and decide whether to clean up;
  • Step S514 according to the file size, read and write frequency sorting, the user can clearly see which files/directories are not used for a long time or which ones occupy too much space;
  • Step S5166 the user determines to clear
  • Step S518, the user independently selects a list of file directories to be cleaned
  • step S520 all the files that confirm the cleaning are deleted.
  • the above technical solution provided by the embodiment can enable the mobile phone user to fully index the database for various operations and improve the user experience.
  • data operations can also be performed in other similar manners, and the present invention will not be described one by one.
  • the index database of the embodiment of the present invention generates application information, file purpose, cleanup effect, and directory information at the beginning of creation. These index data can be shared by multiple terminals. It is convenient to clean up files by the frequency of use of the files. Mobile phone users can use the index database to clean application files, making disk usage more efficient and greatly improving the user experience.
  • a storage medium is further provided, wherein the software includes the above-mentioned software, including but not limited to: an optical disk, a floppy disk, a hard disk, an erasable memory, and the like.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. Perform the steps shown or described, or separate them into individual integrated circuit modules, or Multiple of these modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
  • a technical means for establishing an index of related file information of a specified application and managing related file information of the specified application according to the index is used to solve the related technology and related to the application.
  • the management of the file has technical problems such as large manual maintenance workload, thereby saving the manual workload of file management, improving the disk usage rate and improving the user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

本发明提供了一种文件管理方法及装置,其中,上述方法包括:从预设索引数据库中获取终端上指定应用所对应应用标识的索引,其中,该索引与所述指定应用在安装或运行时所产生的文件信息存在关联关系,所述索引与所述应用标识是一一对应的;根据所述索引和所述关联关系对所述文件信息进行管理。采用本发明提供的上述技术方案,解决了相关技术中,对与应用相关的文件进行管理存在人工维护工作量较大等技术问题,从而节省了文件管理的人工工作量,提高了磁盘使用率,提升了用户体验。

Description

文件管理方法及装置 技术领域
本发明涉及通信领域,尤其是涉及一种文件管理方法及装置。
背景技术
随着智能手机及相关智能终端的日益普及,智能终端(手机等)已成为人们日常生活中必不可少的一个通信、娱乐甚至工作工具。本发明以智能终端的手机为例。手机不仅大大提高了人们的工作效率,也改变了人们的生活方式。
智能手机的日益迅猛发展,目前手机业务或通信业务也越来越丰富。电子购物应用(例如淘宝、京东商城)、社交应用(例如微信、微博)、各种音乐视频软件、各种***等这些手机应用的使用给广大智能手机用户带来了非常大的方便,也给用户带来了很多乐趣的同时也带来了不少烦恼。
目前智能手机的应用有一个非常大的缺点,即应用安装包越来越大,一个安卓安装包(AndroidPackage,简称为apk)动辄几十上百MB,而且该应用在不使用后生成的很多文件越来越多,而且这些文件(尤其是放在sd卡的)无法自动删除。现在应用丰富多样,新增应用越来越多,替换应用的频率越来越快,随着时间的累积,终端***空间和sd卡空间会很快被消耗一空,用户也不知道哪些文件有用,哪些文件没有用,不敢随意删除文件,经验表明,sd卡上80%的数据是应用的数据,尤其是音、视频或相片、用户文档等,有可能这些数据的所属应用早已被卸载不用而且用户也用不上这些文件,但是仍然长期的占用着用户宝贵的磁盘空间。由于这些文件缺少有用的信息和统一的入口管理,用户对这些占据了自己智能终端的这些文件毫无办法。这些是困扰智能手机用户的一个问题。
目前市面上虽然有一些清理加速第三方软件,但是这些软件大多是通过人为的收集大量应用数据文件目录信息后加以分析形成相应的索引用于文件管理。这里的缺点很明显就是人工维护工作量很大,在如此信息量如此***性增长的时代背景下显然不可持续。
针对相关技术中的上述问题,尚无有效地解决方案。
发明内容
针对相关技术中,对与应用相关的文件进行管理存在人工维护工作量较大等技术问题,本发明提供了一种文件管理方法及装置,以至少解决上述技术问题。
根据本发明的一个实施例,提供了一种文件管理方法,包括:从预设索引数据库中获取终端上指定应用所对应应用标识的索引,其中,该索引与所述指定应用在安装或运行时所产生的文件信息存在关联关系,所述索引与所述应用标识是一一对应的;根据所述索引和所述关联关系对所述文件信息进行管理。
优选地,从预设索引数据库中获取当前应用所对应应用标识的索引之前,包括:为所述应用标识分配所述索引;建立所述应用在安装或运行时所产生的文件信息与所述索引的关联关系;将所述关联关系存储至所述预设索引数据库中。
优选地,将所述关联关系存储至所述预设索引数据库中之后,还包括:将所述预设索引数据库上传至网络侧。
优选地,所述方法还包括:将所述网络侧的预设索引库中使用频率大于指定阈值的所述文件信息存储至所述终端中。
优选地,根据所述索引和所述关联关系对所述文件信息进行以下之一管理:查询操作、删除操作、备份转移。
优选地,根据所述索引和所述关联关系对所述文件信息进行删除操作,包括以下之一:在指定事件的触发下,对所有所述文件信息中的指定文件信息以列表的形式提示用户选择是否删除,并删除所有所述文件信息中除所述指定文件信息之外的其它信息;在指定事件的触发下,删除所有所述文件信息。
优选地,所述列表中包括以下至少之一所述文件信息的描述信息:所述指定文件信息的名称、所述指定文件信息的使用频率、所述指定文件信息的访问时间、所述指定文件信息的作用、所述指定文件信息被删除后所导致的结果。
优选地,所述指定事件包括以下之一:检测到所述应用被卸载、检测到所述终端的***空间小于预设阈值。
优选地,所述应用标识包括:应用包名。
优选地,所述文件信息包括以下至少之一:所述应用的应用包名、所述文件信息的读写频率、所述文件信息的读写时间、所述文件信息的文件目录路径、所述数据文信息的作用。
根据本发明的另一个实施例,提供了一种文件管理装置,包括:获取模块,设置为从预设索引数据库中获取终端上指定应用所对应应用标识的索引,其中,该索引与所述指定应用在安装或运行时所产生的文件信息存在关联关系,所述索引与所述应用标识是一一对应的;管理模块,设置为根据所述索引和所述关联关系对所述文件信息进行管理。
通过本发明,采用建立与指定应用的相关文件信息的索引,并根据该索引对指定应用的相关文件信息进行管理的技术手段,解决了相关技术中,对与应用相关的文件进行管理存在人工维护工作量较大等技术问题,从而节省了文件管理的人工工作量,提高了磁盘使用率,提升了用户体验。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1为根据本发明实施例的文件管理方法的流程图;
图2为根据本发明实施例的文件管理装置的结构框图;
图3为根据本发明优选实施例的文件管理实现原理示意图;
图4为根据本发明优选实施例的文件索引建立流程示意图;
图5为根据本发明优选实施例的文件清理流程示意图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
图1为根据本发明实施例的文件管理方法的流程图。如图1所示,该方法包括以下处理步骤:
步骤S102,从预设索引数据库中获取终端上指定应用所对应应用标识的索引,其中,该索引与上述指定应用在安装或运行时所产生的文件信息存在关联关系,上述索引与上述应用标识是一一对应的;
步骤S104,根据上述索引和上述关联关系对上述文件信息进行管理。
通过上述各个处理步骤,由于可以根据应用所对应唯一标识的索引对相关文件进行管理,因此,可以自动实现对应用的相关文件进行管理,并且,由于可以根据索引对应用文件进行管理,因此,节省了人工维护的工作量。
在一个优选实施例中,为了实现基于索引的管理,在从预设索引数据库中获取当前应用所对应应用标识的索引之前,可以执行以下处理过程:
为上述应用标识分配上述索引;建立上述应用在安装或运行时所产生的文件信息与上述索引的关联关系;将上述关联关系存储至上述预设索引数据库中。此处可以理解为将与上述文件信息相关联的索引存储至预设索引数据库中,但不限于此。
为了更好地对应用的相关文件进行管理,在将上述关联关系存储至上述预设索引数据库中之后,还可以将上述预设索引数据库上传至网络侧,这样可以实现索引数据库的共享。
在本实施例的一个优选实施方式中,为了提高磁盘管理效率,可以讲上述网络侧的预设索引库中使用频率大于指定阈值的文件信息存储至上述终端中。
在一个优选实施方式中,可以根据上述索引和上述关联关系对上述文件信息进行以下之一管理:查询操作、删除操作、备份转移。
根据上述索引和上述关联关系对上述文件信息进行删除操作,可以表现为以下之一处理过程,但不限于此:
(1)在指定事件的触发下,对所有上述文件信息中的指定文件信息以列表的形式提示用户选择是否删除,并删除所有上述文件信息中除指定文件信息之外的其它信息;上述列表中包括以下至少之一上述文件信息的描述信息:上述指定文件信息的名称、上述指定文件信息的使用频率、上述指定文件信息的访问时间、上述指定文件信息的作用、上述指定文件信息被删除后所导致的结果。(2)在指定事件的触发下,删除所有上述文件信息。
上述指定事件可以包括但不限于以下之一:检测到上述应用被卸载、检测到上述终端的***空间小于预设阈值。
优选地,上述应用标识包括但不限于:应用包名。
在一个优选实施过程中,上述文件信息包括以下至少之一:上述应用的应用包名、上述文件信息的读写频率、上述文件信息的读写时间、上述文件信息的文件目录路径、上述数据文信息的作用。
本发明实施例还提供了一种文件管理装置,用于实现上述方法,如图2所示,包括:
获取模块20,设置为从预设索引数据库中获取终端上指定应用所对应应用标识的索引,其中,该索引与上述指定应用在安装或运行时所产生的文件信息存在关联关系,上述索引与上述应用标识是一一对应的;
管理模块22,连接至获取模块20,设置为根据上述索引和上述关联关系对上述文件信息进行管理。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:获取模块20,位于第一处理器中,管理模块22,位于第二处理器中;获取模块20和管理模块22位于同一处理器中。
为了更好地理解上述实施例,以下结合优选实施例详细说明。
针对上述缺陷,本实施例提供一种通过在手机应用创建文件的时候自动建立对应文件索引,并且在读写这些文件时更新相应的索引数据。以下以文件删除为例进行说明。
如图3所示:
手机应用即手机上预置或用户通过各种途径安装的直接可以被用户操作的功能模块,它们会通过各种形式在手机***空间或sd卡空间产生各种用户或应用数据。
文件读写模块即该手机平台用来在手机磁盘空间读/写文件/目录的平台性接口。
上述文件索引数据库即用来记录***空间或sd卡磁盘空间的文件索引,包括但不限于如下信息,所创建的应用包名,文件详细路径,具体数据项名称,数据使用频率,最近一次访问时间,数据项的作用,以及该数据项被清理后可能带来的结果等。
云端文件索引数据库是集成更多终端文件数据索引的更大更全数据库,用于更深一步的文件管理。
应用文件应用在运行期间生成的应用数据和用户数据;
***数据是在应用在***空间中生成的数据文件,这些数据被清理后可能引起应用或***运行异常;
用户数据,是指在sd卡等存储的非必要数据或临时性数据,清理后只是会引起应用重新加载或重新更新输入获取;
基于上述原理,本实施例提供一种自动建立文件索引用于用户数据管理的方法。包括:
对该终端预置索引数据库,即在手机版本中预置之前已经建立的索引数据库。
建立索引数据库,为当前每个应用包名建立唯一的索引。
通过扩展平台的文件读写接口,读写文件时将应用包名,读写频率,最后最写时间,文件目录路径、应用信息,文件作用目的等更新到索引数据库中;
进一步地,可以将该数据库同步到云端,更多的用户共享数据后,可以更好的清理sd卡的残留数据。
进一步地,可以通过磁盘文件监控方式,磁盘文件有读写操作时被动接收磁盘文件的相关读写信息,用来更新文件索引数据库,减少扫描所带来的大量cpu计算或时间成本。
进一步地,在终端***版本升级时,可以将云数据库中较常用的应用数据预置在终端中,提高磁盘管理效率,又不至于大幅提高数据库的大小而占用太多磁盘空间。
进一步地,如果用户要求更深度清理时,可以进行云端查询,用较少的流量获取最有价值的信息。
进一步地,在应用卸载掉后及时通知用户去清理相应的文件;也可以在用户进行清理扫描时根据数据库的信息列出所有建议清理项。
进一步地,扫描出的建议清理项能列出待清理项详细路径,所属应用的具体数据项名称,数据使用频率,最近一次访问时间,数据项的作用,以及该数据项被清理后 可能带来的结果。这些信息能有效的给用户管理文件的建议。当然也可以扩展一些其它可能获取到的字段信息。
进一步地,利用这些数据,在***空间剩余量不足时,自动采取用户设定的策略进行数据清理或备份转移。
本实施例中,手机平台需要清理的主要有***空间,主要是手机内置的存储空间,还有sd卡(包括内置和外置的)的存储空间,内置的存储空间主要是通过***组件存储的应用数据,需要细分,一般是和应用功能密切相关的数据;sd卡存储空间一般是用户通过应用下载或保存的数据,数据量会相对可能较大。
如图4所示,展示一种建立文件索引(索引数据库)的方法:
步骤S402,手机版本预置索引数据库:对***空间和sd卡进行预扫描,将所有/data分区即***空间和sd卡(内外置)目录即文件导入数据库,如果是一个新版本和一个空sd卡,则这个索引数据库不会有新增目录。
但是这个索引数据库有预置索引,预置索引的来源是下列步骤实现后同步到云端后预置到手机版本中的。
步骤S404,安装某个第三方应用:进入某一手机应用如微信,通过微信应用进行某些操作;
一般应用在操作过程中会生成一些文件,如微信会有图片缓存、监控日志、本地日志、网页缓存、游戏下载缓存、游戏中心图标、地址缓存、星标用户图标、其它缓存等等。
步骤S406,通过解析应用的配置项获取包名:通过平台接口获取应用的包名,本实施例的微信的包名是:com.tencent.mm;
如:
Figure PCTCN2014090068-appb-000001
步骤S408,为该包名创建唯一的数据库索引:在索引数据库中查询该包名的索引,如果不存在,则创建该应用信息,包括目录等;
当然具体的包名,目录名这些存储到索引数据库时都是需要MD5加密的,防止被索引数据库被恶意使用。
Figure PCTCN2014090068-appb-000002
步骤S410,生成apk文件/data/app:在安装该应用时,平台会生成应用目录如/data/app;
Android平台生成的***缓存目录文件时,都需要传递应用包名,这样就能明确知道是哪个应用创建的文件,但是还是需要通过平台改造后的写接口传入该文件的作用及清理结果等。
步骤S412,生成用户数据目录/data/data/com.zte.xxx:同步生成应用***数据目录如/data/data/com.tencent.mm以及sd卡文件如/storage/tencent/micromsg;
Sd卡上的文件由于没有上级包名的路径,则需要改造平台写文件接口,创建文件时传入应用名及文件作用,清理后的后果等信息。
步骤S414,用户使用:用户使用微信输入一些个人数据,微信应用通过个人信息同步相应的微信服务器数据,如聊天记录或微信通讯录;
这些用户数据则一般在三级目录,所以通过平台写文件接口不需要再传入更多的信息,只需要通过目录监控工具如JNotify方法监控微信的三级目录,更新其它索引字段即可,如最后访问时间,访问频率等。不用再更新应用信息这些。一方面避免过深的目录导致索引数据库过大、也避免了频繁访问索引数据库导致***性能下降。
步骤S416,用户在该应用的设置项生成的文件:通过终端平台的文件读写模块生成应用数据,本实施例的微信可能生成的数据有通过微信拍摄的照片,微信产生的崩溃日志,微信的监控日志,微信的游戏下载缓存,本地日志,聊天文件,订阅缓存,通讯录备份等等;
Figure PCTCN2014090068-appb-000003
步骤S418,写文件/目录后更新索引数据库:这些文件生成时同步更新索引数据库,更新下列字段但不限于这些字段:所创建的应用包名,文件详细路径,具体数据项名称,数据使用频率,最近一次访问时间,数据项的作用,以及该数据项被清理后可能带来的结果;
步骤S420,适当的时候同步到云数据库:必要时与云端索引数据库进行同步更新;
索引数据库更新,结束。
在某些时候,如***空间或用户需要清理sd卡时或用户想通过索引数据库查找某些文件时,可以充分利用该索引数据库,图三是按文件所创建的应用名进行文件管理/清理,如图5所示,本实施例提供的文件清理流程包括以下步骤:
步骤S502,第一次在使用索引数据库时后台任务扫描所有***空间和sd卡的文件;
步骤S504,在索引数据库中获取到该文件/目录所创建的应用包名;
步骤S506,扫描手机所有预装软件和第三方软件;
步骤S508,获取到所有软件的包名;
步骤S510,通过对比两个列表,判断该文件的所创建的应用是否存在;
步骤S512,给出文件管理建议,对于创建者已经不存在的文件/目录,缺省清理。用户可以查看详情,决定是否清理;
步骤S514,给出按文件大小,读写频率排序,用户可以清楚的看到哪些文件/目录很久不用或者哪些文个把占用了太多空间;
步骤S516,用户确定清理;
步骤S518,用户自主选择清理的文件目录列表;
步骤S520,删除所有确认清理的文件。
采用实施例提供的上述技术方案,能够使手机用户能充分索引数据库进行各种操作,提高用户体验。当然,也可以通过其它类似方式进行数据操作,本发明不再一一说明。
综上所述,本发明实施例实现了以下有益效果:
可以有效防止历史数据占用过多的磁盘空间,影响用户体验;可以很方便的按包名来清理文件。尤其是该包名对应的应用通过网络或用户操作生成了大量的文件,后来用户不用这个应用将其卸载掉后,可以很快定位到这些残留文件进行清理;与现有技术不同的地方是,本发明实施例的索引数据库是在创建之初就生成了应用信息、文件目的,清理后的影响,目录信息。这些索引数据可以多终端共享。可以方便在按文件的使用频率来清理文件。手机用户可以利用索引数据库进行应用文件清理,使磁盘使用效率更高,大大提高用户体验。
在另外一个实施例中,还提供了一种软件,该软件用于执行上述实施例及优选实施方式中描述的技术方案。
在另外一个实施例中,还提供了一种存储介质,该存储介质中存储有上述软件,该存储介质包括但不限于:光盘、软盘、硬盘、可擦写存储器等。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将 它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
工业实用性
基于本发明实施例提供的上述技术方案,采用建立与指定应用的相关文件信息的索引,并根据该索引对指定应用的相关文件信息进行管理的技术手段,解决了相关技术中,对与应用相关的文件进行管理存在人工维护工作量较大等技术问题,从而节省了文件管理的人工工作量,提高了磁盘使用率,提升了用户体验。

Claims (11)

  1. 一种文件管理方法,包括:
    从预设索引数据库中获取终端上指定应用所对应应用标识的索引,其中,该索引与所述指定应用在安装或运行时所产生的文件信息存在关联关系,所述索引与所述应用标识是一一对应的;
    根据所述索引和所述关联关系对所述文件信息进行管理。
  2. 根据权利要求1所述的方法,其中,从预设索引数据库中获取当前应用所对应应用标识的索引之前,包括:
    为所述应用标识分配所述索引;
    建立所述应用在安装或运行时所产生的文件信息与所述索引的关联关系;
    将所述关联关系存储至所述预设索引数据库中。
  3. 根据权利要求2所述的方法,其中,将所述关联关系存储至所述预设索引数据库中之后,还包括:
    将所述预设索引数据库上传至网络侧。
  4. 根据权利要求3所述的方法,其中,所述方法还包括:
    将所述网络侧的预设索引库中使用频率大于指定阈值的所述文件信息存储至所述终端中。
  5. 根据权利要求1所述的方法,其中,根据所述索引和所述关联关系对所述文件信息进行以下之一管理:
    查询操作、删除操作、备份转移。
  6. 根据权利要求5所述的方法,其中,根据所述索引和所述关联关系对所述文件信息进行删除操作,包括以下之一:
    在指定事件的触发下,对所有所述文件信息中的指定文件信息以列表的形式提示用户选择是否删除,并删除所有所述文件信息中除所述指定文件信息之外的其它信息;
    在指定事件的触发下,删除所有所述文件信息。
  7. 根据权利要求6所述的方法,其中,所述列表中包括以下至少之一所述文件信息的描述信息:所述指定文件信息的名称、所述指定文件信息的使用频率、所述指定文件信息的访问时间、所述指定文件信息的作用、所述指定文件信息被删除后所导致的结果。
  8. 根据权利要求6所述的方法,其中,所述指定事件包括以下之一:
    检测到所述应用被卸载、检测到所述终端的***空间小于预设阈值。
  9. 根据权利要求1至8中任一项所述的方法,其中,所述应用标识包括:应用包名。
  10. 根据权利要求1至8中任一项所述的方法,其中,所述文件信息包括以下至少之一:
    所述应用的应用包名、所述文件信息的读写频率、所述文件信息的读写时间、所述文件信息的文件目录路径、所述数据文信息的作用。
  11. 一种文件管理装置,包括:
    获取模块,设置为从预设索引数据库中获取终端上指定应用所对应应用标识的索引,其中,该索引与所述指定应用在安装或运行时所产生的文件信息存在关联关系,所述索引与所述应用标识是一一对应的;
    管理模块,设置为根据所述索引和所述关联关系对所述文件信息进行管理。
PCT/CN2014/090068 2014-07-24 2014-10-31 文件管理方法及装置 WO2015117426A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410356025.5A CN105302832A (zh) 2014-07-24 2014-07-24 文件管理方法及装置
CN201410356025.5 2014-07-24

Publications (1)

Publication Number Publication Date
WO2015117426A1 true WO2015117426A1 (zh) 2015-08-13

Family

ID=53777241

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/090068 WO2015117426A1 (zh) 2014-07-24 2014-10-31 文件管理方法及装置

Country Status (2)

Country Link
CN (1) CN105302832A (zh)
WO (1) WO2015117426A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069446A (zh) * 2019-04-28 2019-07-30 努比亚技术有限公司 移动终端文件管理方法、移动终端、装置及存储介质
CN111125047A (zh) * 2019-12-06 2020-05-08 中盈优创资讯科技有限公司 冷热数据目录识别方法及装置
CN111712806A (zh) * 2017-09-21 2020-09-25 深圳传音通讯有限公司 残留文件的清除方法、设备及可读存储介质
CN112579526A (zh) * 2019-09-30 2021-03-30 陕西西部资信股份有限公司 数据处理方法、***及装置
CN115658626A (zh) * 2022-12-26 2023-01-31 成都数默科技有限公司 一种分布式网络小文件存储管理方法
CN116610577A (zh) * 2023-05-25 2023-08-18 成都融见软件科技有限公司 一种覆盖率获取方法

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760518A (zh) * 2016-02-29 2016-07-13 四川秘无痕信息安全技术有限责任公司 一种准确提取安卓微信朋友圈数据的方法
CN106528658B (zh) * 2016-10-19 2019-06-25 Oppo广东移动通信有限公司 应用文件的查找方法及装置
CN106991130A (zh) * 2017-03-07 2017-07-28 广东欧珀移动通信有限公司 一种文件处理方法、装置及智能终端
CN107493386A (zh) * 2017-08-22 2017-12-19 广东小天才科技有限公司 一种应用程序管理方法、应用程序管理装置及智能终端
CN108519897A (zh) * 2018-03-01 2018-09-11 惠州Tcl移动通信有限公司 智能终端及其文件管理方法、具有存储功能的装置
CN109299039A (zh) * 2018-08-30 2019-02-01 努比亚技术有限公司 一种文件管理方法、设备及计算机可读存储介质
CN110471764A (zh) * 2019-08-01 2019-11-19 郑州阿帕斯科技有限公司 一种内存清理的处理方法及装置
CN112988457B (zh) * 2019-12-17 2023-04-25 ***通信集团河南有限公司 一种数据备份方法、装置、***及计算机设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1979428A (zh) * 2005-12-08 2007-06-13 中兴通讯股份有限公司 自动释放嵌入式***中应用程序模块泄漏内存的***
CN103020253A (zh) * 2012-12-20 2013-04-03 北京奇虎科技有限公司 应用搜索方法和设备
CN103092687A (zh) * 2012-12-26 2013-05-08 上海斐讯数据通信技术有限公司 一种应用程序管理装置和方法
CN103888833A (zh) * 2014-03-11 2014-06-25 惠州Tcl移动通信有限公司 一种智能电视访问电视节目和应用程序的方法及***

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103500116A (zh) * 2013-10-29 2014-01-08 中科创达软件股份有限公司 一种清除应用程序生成的数据的方法及***
CN109284253B (zh) * 2013-11-19 2022-07-22 荣耀终端有限公司 一种移动终端的文件管理方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1979428A (zh) * 2005-12-08 2007-06-13 中兴通讯股份有限公司 自动释放嵌入式***中应用程序模块泄漏内存的***
CN103020253A (zh) * 2012-12-20 2013-04-03 北京奇虎科技有限公司 应用搜索方法和设备
CN103092687A (zh) * 2012-12-26 2013-05-08 上海斐讯数据通信技术有限公司 一种应用程序管理装置和方法
CN103888833A (zh) * 2014-03-11 2014-06-25 惠州Tcl移动通信有限公司 一种智能电视访问电视节目和应用程序的方法及***

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111712806A (zh) * 2017-09-21 2020-09-25 深圳传音通讯有限公司 残留文件的清除方法、设备及可读存储介质
CN110069446A (zh) * 2019-04-28 2019-07-30 努比亚技术有限公司 移动终端文件管理方法、移动终端、装置及存储介质
CN112579526A (zh) * 2019-09-30 2021-03-30 陕西西部资信股份有限公司 数据处理方法、***及装置
CN111125047A (zh) * 2019-12-06 2020-05-08 中盈优创资讯科技有限公司 冷热数据目录识别方法及装置
CN111125047B (zh) * 2019-12-06 2024-03-12 中盈优创资讯科技有限公司 冷热数据目录识别方法及装置
CN115658626A (zh) * 2022-12-26 2023-01-31 成都数默科技有限公司 一种分布式网络小文件存储管理方法
CN116610577A (zh) * 2023-05-25 2023-08-18 成都融见软件科技有限公司 一种覆盖率获取方法

Also Published As

Publication number Publication date
CN105302832A (zh) 2016-02-03

Similar Documents

Publication Publication Date Title
WO2015117426A1 (zh) 文件管理方法及装置
JP6621543B2 (ja) ハイブリッドアプリケーションの自動更新
CN104158886B (zh) 一种应用程序的流式执行方法
CN102404338B (zh) 一种文件同步方法和装置
JP6381776B2 (ja) コンテンツアイテムの共有のための未登録ユーザアカウントの生成
US20140310241A1 (en) Virtual file system for automated data replication and review
US9864736B2 (en) Information processing apparatus, control method, and recording medium
US20170031948A1 (en) File synchronization method, server, and terminal
JP2017084334A (ja) 仮想マシンイメージファイルを抽出する方法および装置
US20150227605A1 (en) Information processing terminal, synchronization control method, and computer-readable recording medium
CN109033360B (zh) 一种数据查询方法、装置、服务器及存储介质
WO2014138747A1 (en) Sharing a content item
US20140229457A1 (en) Automatic content item upload
TW201433930A (zh) 檔案追蹤方法及其所適用之網路通訊裝置
CN103379476A (zh) 终端和联系人信息更新方法
CN103716346A (zh) 一种安卓手机客户端上应用的管理方法和装置
WO2017174013A1 (zh) 数据存储管理方法、装置及数据存储***
CN111770153A (zh) 一种对象下载方法、装置及电子设备和存储介质
CN107409086B (zh) 通过多个邮箱在通信应用中进行海量数据管理
CN112243017A (zh) 一种文件上传的方法和装置
CN112559913B (zh) 一种数据处理方法、装置、计算设备及可读存储介质
US9244668B1 (en) Systems and methods for synchronizing mobile computing platforms
TWI571754B (zh) 用來進行檔案同步控制之方法與裝置
CN111309674A (zh) 由移动计算设备进行文件管理的***和方法
WO2015176409A1 (zh) 一种终端以及管理终端应用的方法、存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14881766

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14881766

Country of ref document: EP

Kind code of ref document: A1