CN104484484B - Clear up the method and device of cache file - Google Patents
Clear up the method and device of cache file Download PDFInfo
- Publication number
- CN104484484B CN104484484B CN201510010236.8A CN201510010236A CN104484484B CN 104484484 B CN104484484 B CN 104484484B CN 201510010236 A CN201510010236 A CN 201510010236A CN 104484484 B CN104484484 B CN 104484484B
- Authority
- CN
- China
- Prior art keywords
- information
- cache
- file
- file information
- original
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/162—Delete operations
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明提供一种清理缓存文件的方法,包括以下步骤:获取缓存信息及与缓存信息对应的原文件信息;将缓存信息与原文件信息进行匹配;当缓存信息中的文件信息在原文件信息中匹配不到与其相对应的文件信息时,清理文件信息对应的缓存文件。本发明还提供一种清理缓存文件的装置。通过上述方式,本发明能够识别清理缓存中的无效缓存文件,提高用户体验。
The present invention provides a method for cleaning cached files, comprising the following steps: obtaining cached information and original file information corresponding to the cached information; matching the cached information with the original file information; when the file information in the cached information matches the original file information When the corresponding file information is not available, clean up the cache file corresponding to the file information. The invention also provides a device for clearing cache files. Through the above method, the present invention can identify and clear invalid cache files in the cache and improve user experience.
Description
技术领域technical field
本发明涉及计算机领域,具体而言,本发明涉及一种清理缓存文件的方法及装置。The present invention relates to the field of computers, in particular, the present invention relates to a method and device for clearing cache files.
背景技术Background technique
在计算机技术的中,应用程序、视频及图片等文件运行效率和流畅性的提高,缓存技术不可或缺。CPU可对缓存中的文件直接读取,以解决CPU运算速率与内存读写速率不匹配的矛盾,提高文件的运行效率。In the development of computer technology, caching technology is indispensable to improve the running efficiency and fluency of files such as applications, videos and pictures. The CPU can directly read the files in the cache, so as to solve the contradiction between the CPU operation speed and the memory read and write speed, and improve the file operation efficiency.
目前,缓存文件的清理通常是将所有的缓存文件扫描出来,进行清理。此清理方式的不足表现为:若用户直接进行清理,某些应用程序或图片等文件再次运行时,速度变慢,同时还会再次产生相应的缓存文件,导致操作冗余;若用户逐个选择进行清理,由于扫描出的缓存文件通常较多,逐个选择比较费时,尤其是随着智能终端功能的多样化,大量的缓存文件会使选择时间进一步增加。At present, the cleaning of cache files is usually to scan out all cache files for cleaning. The disadvantages of this cleaning method are as follows: if the user directly cleans up some files such as applications or pictures, the speed will slow down and the corresponding cache files will be generated again, resulting in redundant operations; if the user selects one by one Cleaning, because there are usually many cache files scanned, it is time-consuming to select one by one, especially with the diversification of smart terminal functions, a large number of cache files will further increase the selection time.
另外,现有的缓存技术,其自身没有更新机制,对于一些无效的缓存文件,无法识别。In addition, the existing cache technology does not have an update mechanism itself, and cannot identify some invalid cache files.
如何识别清理缓存中的无效缓存文件,保留智能终端所需的缓存文件,是目前文件清理亟待解决的问题之一。How to identify and clear the invalid cache files in the cache and keep the cache files required by the smart terminal is one of the problems to be solved urgently in file cleaning.
发明内容Contents of the invention
本发明的目的旨在至少解决上述技术缺陷之一,特别是能够识别清理缓存中的无效缓存文件,提高用户体验。The purpose of the present invention is to at least solve one of the above-mentioned technical defects, especially to be able to identify and clear invalid cache files in the cache, so as to improve user experience.
本发明提供一种清理缓存文件的方法,包括以下步骤:获取缓存信息及与缓存信息对应的原文件信息;将缓存信息与原文件信息进行匹配;当缓存信息中的文件信息在原文件信息中匹配不到与其相对应的文件信息时,清理文件信息对应的缓存文件。The present invention provides a method for cleaning cached files, comprising the following steps: obtaining cached information and original file information corresponding to the cached information; matching the cached information with the original file information; when the file information in the cached information matches the original file information When the corresponding file information is not available, clean up the cache file corresponding to the file information.
其中,当缓存信息中的文件信息在原文件信息中匹配不到与其相对应的文件信息时,清理文件信息对应的缓存文件,包括:当缓存信息中的文件信息在原文件信息中匹配不到与其相对应的文件信息时,将文件信息对应的缓存文件标识为无效;在缓存信息与原文件信息匹配完成后,清理标识为无效的缓存文件。Wherein, when the file information in the cache information does not match the corresponding file information in the original file information, cleaning the cache file corresponding to the file information includes: when the file information in the cache information does not match the corresponding file information in the original file information When the corresponding file information is found, the cache file corresponding to the file information is marked as invalid; after the cache information matches the original file information, the cache file marked as invalid is cleaned up.
其中,缓存信息为虚拟机缓存包名,原文件信息为已安装文件包名。Wherein, the cache information is the virtual machine cache package name, and the original file information is the installed file package name.
其中,缓存信息为缩略图信息,原文件信息为与缩略图信息呈映射关系的原图信息。Wherein, the cache information is thumbnail image information, and the original file information is original image information in a mapping relationship with the thumbnail image information.
其中,当缓存信息中的文件信息在原文件信息中匹配不到与其相对应的文件信息时,将文件信息对应的缓存文件标识为无效,包括:当虚拟机缓存包名中的文件包名在已安装文件包名中匹配不到与其相对应的文件包名时,将文件包名对应的缓存文件标识为无效。Wherein, when the file information in the cache information does not match the corresponding file information in the original file information, the cache file corresponding to the file information is marked as invalid, including: when the file package name in the virtual machine cache package name is already When the corresponding file package name cannot be matched in the installation file package name, the cache file corresponding to the file package name is marked as invalid.
其中,当缓存信息中的文件信息在原文件信息中匹配不到与其相对应的文件信息时,将文件信息对应的缓存文件标识为无效,包括:当缩略图信息中的文件信息在原图信息中匹配不到与其相对应的文件信息时,将文件信息对应的缓存文件标识为无效。Wherein, when the file information in the cache information does not match the corresponding file information in the original file information, mark the cache file corresponding to the file information as invalid, including: when the file information in the thumbnail information matches the original image information When the corresponding file information is not found, mark the cache file corresponding to the file information as invalid.
本发明提供一种清理缓存文件的装置,包括:获取模块,用于获取缓存信息及与缓存信息对应的原文件信息;匹配模块,用于将缓存信息与原文件信息进行匹配;清理模块,用于当缓存信息中的文件信息在原文件信息中匹配不到与其相对应的文件信息时,清理文件信息对应的缓存文件。The present invention provides a device for cleaning cached files, comprising: an acquisition module for acquiring cached information and original file information corresponding to the cached information; a matching module for matching the cached information with original file information; a cleaning module for When the file information in the cache information does not match the corresponding file information in the original file information, the cache file corresponding to the file information is cleared.
其中,清理模块包括:标识单元,用于当缓存信息中的文件信息在原文件信息中匹配不到与其相对应的文件信息时,将文件信息对应的缓存文件标识为无效;清理单元,用于在缓存信息与原文件信息匹配完成后,清理标识为无效的缓存文件。Wherein, the cleaning module includes: an identification unit, used to identify the cached file corresponding to the file information as invalid when the file information in the cache information does not match the corresponding file information in the original file information; After the cache information is matched with the original file information, the cache files marked as invalid are cleaned up.
其中,缓存信息为虚拟机缓存包名,原文件信息为已安装文件包名。Wherein, the cache information is the virtual machine cache package name, and the original file information is the installed file package name.
其中,缓存信息为缩略图信息,原文件信息为与缩略图信息呈映射关系的原图信息。Wherein, the cache information is thumbnail image information, and the original file information is original image information in a mapping relationship with the thumbnail image information.
其中,标识单元具体用于:当虚拟机缓存包名中的文件包名在已安装文件包名中匹配不到与其相对应的文件包名时,将文件包名对应的缓存文件标识为无效。Wherein, the identification unit is specifically used for: when the file package name in the virtual machine cache package name does not match the corresponding file package name in the installed file package name, mark the cache file corresponding to the file package name as invalid.
其中,标识单元具体用于:当缩略图信息中的文件信息在原图信息中匹配不到与其相对应的文件信息时,将文件信息对应的缓存文件标识为无效。Wherein, the identification unit is specifically configured to: when the file information in the thumbnail information does not match the corresponding file information in the original image information, mark the cache file corresponding to the file information as invalid.
本发明中,智能终端清理缓存文件的方法具体为:首先获取缓存信息及与缓存信息对应的原文件信息;将缓存信息与原文件信息进行匹配,当缓存信息中的文件信息在原文件信息中匹配不到与其相对应的文件信息时,此文件信息对应的缓存文件为无效缓存文件;匹配完成后,将无效缓存文件进行清理。In the present invention, the method for clearing the cached files by the smart terminal is as follows: first obtain the cached information and the original file information corresponding to the cached information; match the cached information with the original file information, when the file information in the cached information matches the original file information When the corresponding file information is not found, the cache file corresponding to this file information is an invalid cache file; after the matching is completed, the invalid cache file will be cleaned up.
本发明提出的上述方案,能够识别清理缓存中的无效缓存文件,有针对性地释放缓存空间,提高用户体验。The above solution proposed by the present invention can identify and clear invalid cache files in the cache, release cache space in a targeted manner, and improve user experience.
本发明附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in part in the description which follows, and will become apparent from the description, or may be learned by practice of the invention.
附图说明Description of drawings
本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and easy to understand from the following description of the embodiments in conjunction with the accompanying drawings, wherein:
图1为本发明清理缓存文件的方法一实施例的流程示意图;FIG. 1 is a schematic flow diagram of an embodiment of a method for clearing cached files in the present invention;
图2为本发明清理缓存文件的方法另一实施例的流程示意图;FIG. 2 is a schematic flow diagram of another embodiment of the method for clearing cache files in the present invention;
图3为本发明清理缓存文件的装置一实施例的结构示意图。FIG. 3 is a schematic structural diagram of an embodiment of an apparatus for clearing cached files according to the present invention.
具体实施方式Detailed ways
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。Those skilled in the art will understand that unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the word "comprising" used in the description of the present invention refers to the presence of said features, integers, steps, operations, elements and/or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Additionally, "connected" or "coupled" as used herein may include wireless connection or wireless coupling. The expression "and/or" used herein includes all or any elements and all combinations of one or more associated listed items.
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which this invention belongs. It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have meanings consistent with their meaning in the context of the prior art, and unless specifically defined as herein, are not intended to be idealized or overly Formal meaning to explain.
本技术领域技术人员可以理解,这里所使用的“终端”、“终端设备”既包括无线信号接收器的设备,其仅具备无发射能力的无线信号接收器的设备,又包括接收和发射硬件的设备,其具有能够在双向通信链路上,执行双向通信的接收和发射硬件的设备。这种设备可以包括:蜂窝或其他通信设备,其具有单线路显示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备;PCS(Personal Communications Service,个人通信系统),其可以组合语音、数据处理、传真和/或数据通信能力;PDA(Personal Digital Assistant,个人数字助理),其可以包括射频接收器、寻呼机、互联网/内联网访问、网络浏览器、记事本、日历和/或GPS(Global Positioning System,全球定位系统)接收器;常规膝上型和/或掌上型计算机或其他设备,其具有和/或包括射频接收器的常规膝上型和/或掌上型计算机或其他设备。这里所使用的“终端”、“终端设备”可以是便携式、可运输、安装在交通工具(航空、海运和/或陆地)中的,或者适合于和/或配置为在本地运行,和/或以分布形式,运行在地球和/或空间的任何其他位置运行。这里所使用的“终端”、“终端设备”还可以是通信终端、上网终端、音乐/视频播放终端,例如可以是PDA、MID(Mobile Internet Device,移动互联网设备)和/或具有音乐/视频播放功能的移动电话,也可以是智能电视、机顶盒等设备。Those skilled in the art can understand that the "terminal" and "terminal equipment" used here not only include wireless signal receiver equipment, which only has wireless signal receiver equipment without transmission capabilities, but also include receiving and transmitting hardware. A device having receiving and transmitting hardware capable of performing bi-directional communication over a bi-directional communication link. Such equipment may include: cellular or other communication equipment, which has a single-line display or a multi-line display or a cellular or other communication equipment without a multi-line display; PCS (Personal Communications Service, personal communication system), which can combine voice, data Processing, facsimile and/or data communication capabilities; PDA (Personal Digital Assistant , Personal Digital Assistant), which may include radio frequency receiver, pager, Internet/Intranet access, web browser, notepad, calendar and/or GPS (Global Positioning System (Global Positioning System) receiver; a conventional laptop and/or palmtop computer or other device having and/or including a radio frequency receiver. As used herein, a "terminal", "terminal device" may be portable, transportable, installed in a vehicle (air, sea, and/or land), or adapted and/or configured to operate locally, and/or In distributed form, the operation operates at any other location on Earth and/or in space. The "terminal" and "terminal equipment" used here can also be communication terminals, Internet terminals, music/video playback terminals, such as PDAs, MIDs (Mobile Internet Devices, mobile Internet devices) and/or with music/video playback terminals. Functional mobile phones, smart TVs, set-top boxes and other devices.
本技术领域技术人员可以理解,这里所使用的远端网络设备,其包括但不限于计算机、网络主机、单个网络服务器、多个网络服务器集或多个服务器构成的云。在此,云由基于云计算(Cloud Computing)的大量计算机或网络服务器构成,其中,云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个超级虚拟计算机。本发明的实施例中,远端网络设备、终端设备与WNS服务器之间可通过任何通信方式实现通信,包括但不限于,基于3GPP、LTE、WIMAX的移动通信、基于TCP/IP、UDP协议的计算机网络通信以及基于蓝牙、红外传输标准的近距无线传输方式。Those skilled in the art can understand that the remote network device used here includes, but is not limited to, a computer, a network host, a single network server, a set of multiple network servers, or a cloud formed by multiple servers. Here, the cloud is composed of a large number of computers or network servers based on cloud computing (Cloud Computing), wherein cloud computing is a kind of distributed computing, a super virtual computer composed of a group of loosely coupled computer sets. In the embodiment of the present invention, the communication between the remote network equipment, the terminal equipment and the WNS server can be realized through any communication method, including but not limited to, mobile communication based on 3GPP, LTE, WIMAX, based on TCP/IP, UDP protocol Computer network communication and short-distance wireless transmission methods based on Bluetooth and infrared transmission standards.
本领域技术人员应当理解,本发明所称的“应用”、“应用程序”、“应用软件”以及类似表述的概念,是业内技术人员所公知的相同概念,是指由一系列计算机指令及相关数据资源有机构造的适于电子运行的计算机软件。除非特别指定,这种命名本身不受编程语言种类、级别,也不受其赖以运行的操作系统或平台所限制。理所当然地,此类概念也不受任何形式的终端所限制。Those skilled in the art should understand that the concepts of "application", "application program", "application software" and similar expressions referred to in the present invention are the same concepts well known to those skilled in the art, and refer to a series of computer instructions and related Computer software that is organically constructed from data resources and suitable for electronic operation. Unless otherwise specified, this naming itself is not limited by the type of programming language, level, or the operating system or platform on which it runs. Naturally, such concepts are also not limited by any form of terminal.
本发明的方法和装置,可以在不同的操作系统中实现,为说明的简化,以下即将进行的描述,将主要以Android系统为例。本领域技术人员不应将其理解为对本发明的限制。The method and device of the present invention can be implemented in different operating systems. To simplify the description, the following description will mainly take the Android system as an example. Those skilled in the art should not construe it as a limitation of the present invention.
请参阅图1,图1为本发明清理缓存文件的方法一实施例的流程示意图,如图1所述,包括以下步骤:Please refer to FIG. 1. FIG. 1 is a schematic flow diagram of an embodiment of a method for clearing cache files according to the present invention. As shown in FIG. 1, it includes the following steps:
S11,获取缓存信息及与缓存信息对应的原文件信息。S11. Acquire cached information and original file information corresponding to the cached information.
本实施例的方法适用于智能终端缓存文件的清理,尤其是移动终端中缓存文件的清理,如:手机、平板电脑等。智能终端首先获取缓存信息及原文件信息,下面以具体类型的文件为例,对缓存文件信息和原文件信息进行说明。The method of this embodiment is suitable for clearing cached files in smart terminals, especially in mobile terminals, such as mobile phones and tablet computers. The smart terminal first obtains the cache information and the original file information. The cache file information and the original file information are described below by taking a specific type of file as an example.
A.应用程序A. Apps
在Android系统中,应用程序在运行或安装过程中,会产生相应的缓存文件,使得应用程序在后续运行时,不需再进行解析,从而提高应用程序的运行速度。应用程序的安装涉及如下目录:system/app,用于安装系统应用程序;data/app,用于安装用户应用程序;data/data,用于存放应用程序的数据;Data/dalvik-cache,用于安装应用程序的.dex文件。应用程序的具体安装过程为:复制应用程序安装包至data/app目录下,解压并扫描安装包,将.dex文件保存至dalvik-cache目录,并在data/data目录下创建对应的应用数据,至此完成应用程序的安装。应用程序的卸载过程具体为,删除安装时各目录下的数据。In the Android system, during the running or installation process of the application program, a corresponding cache file will be generated, so that the application program does not need to be parsed during subsequent operation, thereby improving the running speed of the application program. The installation of applications involves the following directories: system/app, used to install system applications; data/app, used to install user applications; data/data, used to store application data; Data/dalvik-cache, used to Install the .dex file of the application. The specific installation process of the application is: copy the application installation package to the data/app directory, decompress and scan the installation package, save the .dex file to the dalvik-cache directory, and create the corresponding application data in the data/data directory, This completes the installation of the application. Specifically, the uninstallation process of the application program is to delete the data in each directory during installation.
本实施例方法的应用场景为,当应用程序非正常卸载时,其相应的某些缓存文件仍然存在,由于无法识别清理,使得这些缓存文件一直占用缓存空间,若此类缓存文件过多,会影响智能终端的性能,降低用户体验。The application scenario of the method in this embodiment is that when the application program is uninstalled abnormally, some of its corresponding cache files still exist, and these cache files always occupy the cache space because they cannot be recognized and cleaned up. If there are too many such cache files, the Affects the performance of smart terminals and reduces user experience.
因此,对于应用程序无效缓存文件的识别清理,缓存信息为虚拟机缓存包名,即虚拟机缓存文件的包名,原文件信息为已安装文件包名,通常为已安装文件列表中各文件的包名。Therefore, for the identification and cleaning of invalid application cache files, the cache information is the cache package name of the virtual machine, that is, the package name of the virtual machine cache file, and the original file information is the package name of the installed file, usually the name of each file in the installed file list. Package names.
以手机为例,手机数据区目录“data/system/packages.xml”中包含手机上所有已安装应用程序的基本信息。Taking a mobile phone as an example, the directory "data/system/packages.xml" in the data area of the mobile phone contains the basic information of all installed applications on the mobile phone.
B.图片B. Pictures
图片的缓存为缩略图,通过缩略图可实现对图片的快速浏览。The cache of the picture is a thumbnail, and the quick browsing of the picture can be realized through the thumbnail.
本实施例方法的应用场景为,当原图片不存在时,若其相应的缩略图没有及时清理,会占用缓存空间,影响智能终端的性能。The application scenario of the method in this embodiment is that when the original picture does not exist, if the corresponding thumbnail is not cleaned up in time, it will occupy cache space and affect the performance of the smart terminal.
因此,对于图片无效缓存文件的识别清理,缓存信息为缩略图信息,具体为数据库中thumbnails表中的信息,原文件信息为与缩略图信息呈映射关系的原图信息,即数据库中图片表(image表)中的信息。Therefore, for the identification and cleaning of invalid image cache files, the cache information is the thumbnail image information, specifically the information in the thumbnails table in the database, and the original file information is the original image information in a mapping relationship with the thumbnail image information, that is, the image table in the database ( image table) information.
在缓存信息的获取过程中,为加快扫描速度,对于文件夹缓存,如果文件夹的时间戳没有发生改变,说明此文件夹没有修改过,即其中的文件数量和大小均未改变,可跳过扫描直接获取上次扫描时记录的该文件夹缓存信息。In the process of obtaining cache information, in order to speed up the scan, for folder cache, if the timestamp of the folder has not changed, it means that the folder has not been modified, that is, the number and size of files in it have not changed, and can be skipped The scan directly obtains the folder cache information recorded during the previous scan.
S12,将缓存信息与原文件信息进行匹配。S12. Match the cached information with the original file information.
结合上述A、B两种场景的分析,可以将缓存信息与原文件信息理解为存在对应关系的两个对象,理论上,缓存信息与原文件信息相互之间应保持对应关系,如果一条缓存信息无法与所有原文件信息对应,这种情况下便可将该条缓存信息视为待清理对象。Combined with the analysis of the above two scenarios A and B, the cache information and the original file information can be understood as two objects that have a corresponding relationship. In theory, the cache information and the original file information should maintain a corresponding relationship with each other. If a piece of cache information It cannot correspond to all the original file information. In this case, the cached information can be regarded as the object to be cleaned up.
对于应用程序无效缓存文件的识别清理,将虚拟机缓存包名与已安装文件包名进行匹配,当虚拟机缓存包名中的文件包名在已安装文件包名中匹配不到与其相对应的文件包名时,此文件包名所对应的缓存文件为无效缓存文件。For the identification and cleaning of invalid application cache files, the virtual machine cache package name is matched with the installed file package name. When the file package name in the virtual machine cache package name does not match the corresponding file package name in the installed file package name When the file package name is specified, the cache file corresponding to the file package name is an invalid cache file.
具体为,将.dex文件中的包名与已安装文件列表中的包名进行匹配,当.dex文件中的文件包名在已安装文件列表中找不到与其相对应的文件包名时,说明此文件包名所对应的文件没有处于安装状态,因此,此文件包名对应的缓存文件为无效缓存文件。Specifically, match the package name in the .dex file with the package name in the installed file list. When the file package name in the .dex file cannot find its corresponding file package name in the installed file list, It means that the file corresponding to this file package name is not installed, therefore, the cache file corresponding to this file package name is an invalid cache file.
对于图片无效缓存文件的识别清理,将缩略图信息与原图信息进行匹配,当缩略图信息中的文件信息在原图信息中匹配不到与其相对应的文件信息时,此文件信息对应的缓存文件为无效缓存文件。For the identification and cleaning of invalid image cache files, the thumbnail information is matched with the original image information. When the file information in the thumbnail information does not match the corresponding file information in the original image information, the cache file corresponding to this file information Invalid cache file.
具体为,将thumbnails表中的信息与image表中的信息进行匹配,当thumbnails表中的ID在image表中找不到与其相对应的ID时,说明此ID所对应的图片文件已删除,因此,此ID对应的缩略图为无效缩略图。Specifically, match the information in the thumbnails table with the information in the image table. When the ID in the thumbnails table cannot find its corresponding ID in the image table, it means that the image file corresponding to this ID has been deleted. Therefore , the thumbnail corresponding to this ID is an invalid thumbnail.
S13,当缓存信息中的文件信息在原文件信息中匹配不到与其相对应的文件信息时,清理文件信息对应的缓存文件。S13, when the file information in the cache information does not match the corresponding file information in the original file information, clear the cache file corresponding to the file information.
识别出无效缓存文件后,对无效缓存文件进行清理。After the invalid cache file is identified, the invalid cache file is cleaned.
清理的具体过程就是删除,可通过单线程或多线程进行删除。以应用程序为例,若无效缓存文件为系统应用程序的缓存,则需获取Root权限进行删除;若无效缓存文件为用户应用程序的缓存,则直接删除即可。The specific process of cleaning is deletion, which can be deleted by single thread or multi-thread. Taking an application program as an example, if the invalid cache file is the cache of a system application, root permission is required to delete it; if the invalid cache file is a user application cache, it can be deleted directly.
对于系统应用程序无效缓存文件的清理,需获取Root权限,Root权限包括永久Root或临时Root。永久Root权限情况下,一经Root授权,以后可不必再进行Root提权;而临时Root权限情况下,权限作用的生命周期只是操作系统的一次从开机到关机的过程,下次开机依然需要进行Root。For the cleaning of invalid cache files of system applications, Root permission is required, and Root permission includes permanent Root or temporary Root. In the case of permanent root authority, once root authorization is granted, there is no need to upgrade the root authority in the future; in the case of temporary root authority, the life cycle of the authority is only a process from booting to shutting down the operating system, and rooting is still required for the next boot. .
无论采用何种Root方式,提权的基本原理均是通过向系统植入用于接收权限请求的su,再结合SuperUser.apk应用程序实现人机交互。Root提权操作的过程具体为:把su文件放到/system/bin/中,把Superuser.apk放到system/app下面,前者用于监听用户的权限请求并与后者通信,后者主要是在与前者通信的基础上实现人机交互,从而允许用户做出相关指示。理论上,如果su可以实现默认通过所有权限请求,则SuperUser.apk可以舍弃。此外还需要设置/system/bin/su可以让任意用户可运行,使其具有set uid和set gid的权限,具体可通过在android机器上运行命令:adb shell chmod 4755/system/bin/su实现。对于Root方案,应理解为包括:与破解相关的代码文件及其配置参数,以“su”、“SuperUser.apk”命名或实现的文件。No matter which Root method is adopted, the basic principle of privilege escalation is to implant su to the system to receive permission requests, and then combine with the SuperUser.apk application to realize human-computer interaction. The process of root privilege escalation operation is as follows: put the su file in /system/bin/, put Superuser.apk under system/app, the former is used to monitor the user’s permission request and communicate with the latter, and the latter is mainly Human-computer interaction is realized on the basis of communicating with the former, thus allowing users to make relevant instructions. In theory, if su can pass all permission requests by default, then SuperUser.apk can be discarded. In addition, it is necessary to set /system/bin/su to allow any user to run, so that it has the permission of set uid and set gid. Specifically, it can be realized by running the command on the android machine: adb shell chmod 4755 /system/bin/su. For the root scheme, it should be understood as including: code files related to cracking and their configuration parameters, files named or implemented with "su" and "SuperUser.apk".
在删除过程中,还需判断无效缓存文件是否与其他缓存文件捆绑,若有捆绑,则不能删除,以免影响其他应用程序的运行。此时,可询问用户,由用户选择是否删除,询问内容如“无效缓存文件与某应用程序的缓存捆绑,是否卸载该应用程序,进而删除该无效缓存文件”,当用户卸载该应用程序后,该无效缓存文件被删除,当用户不进行卸载操作时,不对该无效缓存文件进行删除操作。During the deletion process, it is also necessary to determine whether the invalid cache file is bundled with other cache files. If so, it cannot be deleted, so as not to affect the operation of other applications. At this time, the user can be asked, and the user can choose whether to delete, such as "the invalid cache file is bundled with the cache of a certain application, whether to uninstall the application, and then delete the invalid cache file", when the user uninstalls the application, The invalid cache file is deleted, and when the user does not perform an uninstall operation, the invalid cache file is not deleted.
以上所述,本实施例清理缓存文件的方法,能够对缓存中的无效缓存文件进行识别清理,避免用户清理无效缓存时需对所有缓存一键清理或选择清理,改善用户体验效果。As mentioned above, the method for clearing cache files in this embodiment can identify and clear invalid cache files in the cache, avoiding the need to clear all caches with one click or selection when clearing invalid caches, and improve user experience.
请参阅图2,图2为本发明清理缓存文件的方法另一实施例的流程示意图,如图2所示,包括以下步骤:Please refer to FIG. 2. FIG. 2 is a schematic flow diagram of another embodiment of the method for clearing cache files according to the present invention. As shown in FIG. 2, it includes the following steps:
S21,获取缓存信息及与缓存信息对应的原文件信息。S21. Acquire cached information and original file information corresponding to the cached information.
S22,将缓存信息与原文件信息进行匹配。S22. Match the cached information with the original file information.
S23,当缓存信息中的文件信息在原文件信息中匹配不到与其相对应的文件信息时,将文件信息对应的缓存文件标识为无效。S23. When the file information in the cache information does not match the corresponding file information in the original file information, mark the cache file corresponding to the file information as invalid.
S24,在缓存信息与原文件信息匹配完成后,清理标识为无效的缓存文件。S24, after the matching between the cache information and the original file information is completed, clear the cache files marked as invalid.
其中,步骤S21、S22与图1所示实施例中的步骤S11、S12相同,在此不再赘述。Wherein, steps S21 and S22 are the same as steps S11 and S12 in the embodiment shown in FIG. 1 , and will not be repeated here.
在本实施例中,将识别出的无效缓存文件进行标识,当匹配完成后,将所有标识为无效的缓存文件进行清理。In this embodiment, the identified invalid cache files are identified, and after the matching is completed, all cache files identified as invalid are cleaned up.
需要指出的是,智能终端可根据用户指令或定时触发启动步骤S21,当匹配完成后,智能终端可根据用户指令或自动对标识为无效的缓存文件进行清理。It should be pointed out that the smart terminal can trigger the start step S21 according to the user instruction or timing, and after the matching is completed, the smart terminal can clear the cache files marked as invalid according to the user instruction or automatically.
在匹配完成后,将所有标识的无效缓存文件进行展示,使用户可以查看。当用户触发清理时,所有无效缓存文件在触发前展示;当智能终端自动清理时,所有无效缓存文件可在清理后展示,以告诉用户所清理的内容。After the matching is completed, display all identified invalid cache files so that users can view them. When the user triggers cleaning, all invalid cache files are displayed before the trigger; when the smart terminal automatically cleans, all invalid cache files can be displayed after cleaning to tell the user what has been cleaned.
当应用程序的无效缓存文件包括多个路径时,可根据包名进行合并,即一个总的包名,包名下包括无效缓存文件的各个路径。此种方式可简洁展示标识的无效缓存文件,提高用户体验。When the invalid cache file of the application includes multiple paths, they can be merged according to the package name, that is, a total package name, including each path of the invalid cache file under the package name. This method can succinctly display the invalid cache file of the logo and improve user experience.
在实际应用中,可基于悬浮窗对缓存文件进行清理。其清理过程具体为:通过用户触发调用悬浮窗,利用悬浮窗界面进行扫描,获取缓存信息及与缓存信息对应的原文件信息;根据本实施例的方法,扫描出标识无效的缓存文件;对无效缓存文件进行清理。此方式适用于手机中缓存文件的清理,该缓存文件主要是指非内存缓存。下面详细阐述利用悬浮窗对无效缓存文件的清理。In practical applications, cache files can be cleaned up based on the floating window. The cleaning process is specifically as follows: the floating window is triggered by the user, and the floating window interface is used to scan to obtain the cache information and the original file information corresponding to the cache information; according to the method of this embodiment, scan out the cache files with invalid identifiers; Cache files are cleaned up. This method is suitable for clearing cache files in mobile phones, and the cache files mainly refer to non-memory cache. The following describes in detail the cleaning of invalid cache files by using the floating window.
A.根据对第一悬浮窗操作所产生的调用指令,调用第二悬浮窗。A. Call the second floating window according to the calling instruction generated by the operation on the first floating window.
第一悬浮窗较小,可始终显示,主要为用户展示智能终端的当前内存占用率,当检测到智能终端有文件需清理时,还展示清理提示。第一悬浮窗包括表征内存占用率的圆球和表征清理提示的气球对话框;对于内存占用率,每10s刷新一次;当内存占用率在80%以下,显示蓝色;当内存占用率在80%及以上,显示红色;触发气球对话框时,气球对话框可展开,显示相应的提示文案。The first floating window is small and can be displayed all the time. It mainly displays the current memory usage rate of the smart terminal for the user. When it detects that the smart terminal has files that need to be cleaned up, it also displays a cleaning prompt. The first floating window includes a ball representing the memory usage rate and a balloon dialog box representing the cleaning prompt; for the memory usage rate, it is refreshed every 10s; when the memory usage rate is below 80%, it will display blue; when the memory usage rate is 80% % and above, it will display red; when the balloon dialog box is triggered, the balloon dialog box can be expanded to display the corresponding prompt text.
第二悬浮窗较大,包括内存加速界面、清理界面及常用界面。各界面的功能如下:The second floating window is larger, including memory acceleration interface, cleaning interface and common interface. The functions of each interface are as follows:
内存加速界面包括初始子界面和完成子界面,初始子界面用于显示当前内存占用率,其上设有点击加速功能控件,该控件用于调用完成子界面。内存加速的具体过程为:加速前,初始子界面展示当前内存占用率,当内存占用率小于80%时,初始子界面显示蓝色,当内存占用率为80%及以上时,初始子界面显示红色;点击加速功能控件后,内存占用率从初始值下降至0%再回升至加速后的内存占用率,界面颜色也发生相应的变化,最终生成完成子界面。其中,完成子界面还显示提速了多少,提速多少的计算方法为:加速前的当前内存占用率减去加速后的当前内存占用率,若二者的差值小于1%,完成子界面则显示“已达最佳”。The memory acceleration interface includes an initial sub-interface and a completion sub-interface. The initial sub-interface is used to display the current memory usage rate, and there is a click acceleration function control on it, which is used to call the completion sub-interface. The specific process of memory acceleration is: before acceleration, the initial sub-interface displays the current memory usage rate. When the memory usage rate is less than 80%, the initial sub-interface displays blue. When the memory usage rate is 80% or above, the initial sub-interface displays Red; after clicking the acceleration function control, the memory usage rate drops from the initial value to 0% and then rises to the accelerated memory usage rate, the interface color also changes accordingly, and finally the sub-interface is generated. Among them, the completed sub-interface also displays how much the speed has been increased. The calculation method of the speed-up is: the current memory usage before acceleration minus the current memory usage after acceleration. If the difference between the two is less than 1%, the completed sub-interface will display "Achieved the best".
清理界面包括扫描子界面、停止扫描子界面、清理子界面及已清理子界面。扫描子界面、停止扫描子界面、清理子界面上分别设有扫描功能控件、停止扫描功能控件、一键清理功能控件,扫描功能控件用于调用停止扫描子界面,停止扫描功能控件用于调用清理子界面,一键清理功能控件用于调用已清理子界面。清理的具体过程为:清理前,扫描子界面展示当前存储值;点击扫描功能控件后,停止扫描子界面显示扫描出的垃圾值;点击停止扫描功能控件后,若已扫描出垃圾,转至清理子界面,若未扫描出垃圾,则转至扫描子界面;清理子界面显示已扫描出的垃圾,此界面上还设有详情控件,用于查询垃圾详情;点击一键清理功能控件后,已清理子界面显示已清理的垃圾。其中,若扫描出的垃圾小于等于50M,则停止扫描子界面、清理子界面为蓝色;若扫描出的垃圾大于50M,则停止扫描子界面、清理子界面为红色。其中,点击详情控件后,显示如下至少一种类别的数据:缓存数据、安装包数据、卸载残留数据等,缓存数据又包括无效缓存数据,即无效缓存文件。The cleaning interface includes a scanning sub-interface, a stop-scanning sub-interface, a cleaning sub-interface and a cleaned sub-interface. The scanning sub-interface, the stop scanning sub-interface and the cleaning sub-interface are respectively provided with a scanning function control, a stop scanning function control, and a one-key cleaning function control. The scanning function control is used to call the stop scanning sub interface, and the stop scanning function control is used to call the cleaning function. Sub-interface, one-click cleaning function control is used to call the cleaned sub-interface. The specific process of cleaning is: before cleaning, the scan sub-interface displays the current storage value; after clicking the scan function control, the stop scanning sub-interface displays the scanned garbage value; after clicking the stop scan function control, if the garbage has been scanned, go to the cleaning In the sub-interface, if the garbage is not scanned, it will go to the scanning sub-interface; the cleaning sub-interface displays the scanned garbage, and there is also a detail control on this interface to query the details of the garbage; after clicking the one-key cleaning function control, the The cleaning sub-interface displays the cleaned garbage. Among them, if the scanned garbage is less than or equal to 50M, the stop scanning sub-interface and the cleaning sub-interface are blue; if the scanned garbage is larger than 50M, the stop scanning sub-interface and the cleaning sub-interface are red. Wherein, after clicking the detail control, at least one of the following types of data is displayed: cache data, installation package data, uninstall residual data, etc., and the cache data also includes invalid cache data, that is, invalid cache files.
常用界面包括自启管理功能控件、卸载预装功能控件、隐私清理功能控件、游戏/视频加速功能控件、软件卸载功能控件及定时清理功能控件。上述功能控件均为相应功能的入口。Commonly used interfaces include controls for self-starting management functions, controls for uninstalling pre-installed functions, controls for privacy cleaning functions, controls for game/video acceleration functions, controls for software uninstallation functions, and controls for timing cleaning functions. The above function controls are the entrances of corresponding functions.
根据第一悬浮窗展示的内容,调用的第二悬浮窗的显示状态包括以下两种情况:According to the content displayed in the first floating window, the display status of the second floating window called includes the following two situations:
a.当第一悬浮窗为内存占用率展示时,第二悬浮窗显示常规界面,该常规界面具体为内存加速界面。a. When the first floating window displays memory usage, the second floating window displays a conventional interface, and the conventional interface is specifically a memory acceleration interface.
b.当第一悬浮窗为内存占用率和清理提示展示时,第二悬浮窗显示常规界面、且常规界面上增加清理提示区域。其中,清理提示区域为控件区域。其中,清理提示区域设有与第一悬浮窗的清理提示相对应的提示文案。b. When the first floating window displays memory usage and cleaning prompts, the second floating window displays a regular interface, and a cleaning prompt area is added to the regular interface. Wherein, the cleaning prompt area is a control area. Wherein, in the cleaning reminder area, there is a reminder text corresponding to the cleaning reminder of the first floating window.
B.接收对第二悬浮窗操作所产生的清理指令。B. Receive the cleaning instruction generated by the operation of the second floating window.
由于清理是基于第二悬浮窗进行的,因此需要对第二悬浮窗进行操作,具体为对第二悬浮窗的功能控件或清理提示区域进行操作。Since the cleaning is performed based on the second floating window, it is necessary to operate the second floating window, specifically, to operate the function control or the cleaning prompt area of the second floating window.
C.根据清理指令,对文件进行清理。C. Clean up the files according to the cleanup instructions.
a.根据对功能控件操作所产生的清理指令,对文件进行清理。a. Clean up the files according to the cleanup instructions generated by the operation of the functional controls.
以清理无效缓存文件为例,通过清理界面,扫描出无效缓存文件,利用一键清理功能控件将无效缓存文件进行清理。Take cleaning invalid cache files as an example, through the cleaning interface, scan out invalid cache files, and use the one-key cleaning function control to clean invalid cache files.
此清理方式,各类别的无效缓存集中展示,一键清理,降低用户操作难度,提升用户体验。In this cleaning method, all types of invalid caches are displayed in a centralized manner, and one-click cleaning reduces the difficulty of user operations and improves user experience.
b.根据对清理提示区域操作所产生的清理指令,调用第二悬浮窗的界面或系统界面,对文件进行清理。b. Call the interface of the second floating window or the system interface according to the cleaning instruction generated by the operation of cleaning the prompt area to clean up the files.
以清理无效缓存文件为例,当系统检测出智能终端存在无效缓存文件时,通过第一悬浮窗的气球对话框进行提示,调用第二悬浮窗后,对第二悬浮窗的清理提示区域进行操作,进而获取标识的无效缓存文件,对无效缓存文件进行清理。Taking cleaning invalid cache files as an example, when the system detects that there are invalid cache files on the smart terminal, it will prompt through the balloon dialog box of the first floating window, and after calling the second floating window, perform operations on the cleaning prompt area of the second floating window , and then obtain the identified invalid cache file, and clean up the invalid cache file.
清理完成后,预定时间内第二悬浮窗自动关闭,也可由用户进行关闭。After the cleaning is completed, the second floating window will be automatically closed within a predetermined time, or may be closed by the user.
下面再通过一些具体实施例对b种清理方式进行详细阐述。The cleaning method b will be described in detail below through some specific examples.
手机解锁屏后,检测内存空间,若内存空间不足20%,第一悬浮窗进行提示,此检测可间隔预定时间进行检测。点击第一悬浮窗,调用第二悬浮窗,第二悬浮窗清理提示区域显示文案“内存空间不足20%,点此释放空间”,点击清理提示区域后,进入系统盘符分析界面,进而进行进一步的清理。After unlocking the screen of the mobile phone, the memory space is detected. If the memory space is less than 20%, the first floating window will prompt. This detection can be performed at predetermined intervals. Click the first floating window to call the second floating window. The cleaning prompt area of the second floating window displays the text "The memory space is less than 20%, click here to free up space". After clicking the cleaning prompt area, you will enter the system drive letter analysis interface, and then proceed further clean up.
手机解锁屏后,检测存储空间,若存储空间不足20%,第一悬浮窗进行提示,此检测可间隔预定时间进行检测。点击第一悬浮窗,调用第二悬浮窗,第二悬浮窗清理提示区域显示文案“存储空间不足20%,点此释放空间”,点击清理提示区域后,进入系统盘符分析界面,进而进行进一步的清理。After unlocking the screen of the mobile phone, the storage space is detected. If the storage space is less than 20%, the first floating window will prompt. This detection can be performed at predetermined intervals. Click on the first floating window to call the second floating window, and the cleaning prompt area of the second floating window displays the text "storage space is less than 20%, click here to free up space", after clicking the cleaning prompt area, enter the system drive letter analysis interface, and then proceed further clean up.
手机解锁屏后,检测不常用软件是否超过5款,若超过,第一悬浮窗进行提示,此检测可间隔预定时间进行检测。其中,当本次检测的不常用软件个数与上次检测的不常用软件个数相同,则本次不进行提示。点击第一悬浮窗,调用第二悬浮窗,第二悬浮窗清理提示区域显示文案“5款不常用软件可卸载,点此释放空间”,点击清理提示区域后,跳转至第二悬浮窗的常用界面,由常用界面的软件卸载功能控件进入软件卸载系统界面,进行卸载。After unlocking the screen of the mobile phone, check whether there are more than 5 infrequently used software. If so, the first floating window will prompt. This check can be performed at predetermined intervals. Wherein, when the number of infrequently used software detected this time is the same as the number of infrequently used software detected last time, no prompt is given this time. Click the first floating window to call the second floating window. The cleaning prompt area of the second floating window displays the text "5 uncommonly used software can be uninstalled. Click here to free up space". After clicking the cleaning prompt area, it will jump to the second floating window. Commonly used interface, the software uninstall function control of the commonly used interface enters the software uninstall system interface for uninstallation.
手机解锁屏后,检测同类软件是否超过3款,若超过,第一悬浮窗进行提示,此检测可间隔预定时间进行检测。点击第一悬浮窗,调用第二悬浮窗,第二悬浮窗清理提示区域显示文案“同类软件过多,点击释放空间”,点击清理提示区域,跳转至相应的系统界面或弹框,进行卸载。After unlocking the screen of the mobile phone, check whether there are more than 3 types of software of the same type. If so, the first floating window will prompt. This test can be performed at predetermined intervals. Click on the first floating window to call the second floating window. The cleaning prompt area of the second floating window displays the text "too many similar software, click to free up space", click on the cleaning prompt area, jump to the corresponding system interface or pop-up box, and uninstall .
请参阅图3,图3为本发明清理缓存文件的装置一实施例的结构示意图,如图3所示,包括:获取模块31、匹配模块32及清理模块33。其中,清理模块33包括标识单元331和清理单元332。Please refer to FIG. 3 . FIG. 3 is a schematic structural diagram of an embodiment of an apparatus for clearing cached files according to the present invention. As shown in FIG. 3 , it includes: an acquisition module 31 , a matching module 32 and a cleaning module 33 . Wherein, the cleaning module 33 includes an identification unit 331 and a cleaning unit 332 .
上述各模块的功能如下:The functions of the above modules are as follows:
获取模块31用于获取缓存信息及与缓存信息对应的原文件信息;匹配模块32用于将缓存信息与原文件信息进行匹配;清理模块33用于当缓存信息中的文件信息在原文件信息中匹配不到与其相对应的文件信息时,清理文件信息对应的缓存文件。Acquisition module 31 is used for obtaining cache information and original file information corresponding to cache information; Matching module 32 is used for matching cache information with original file information; Cleaning module 33 is used for when the file information in the cache information matches in original file information When the corresponding file information is not available, clean up the cache file corresponding to the file information.
其中,标识单元331用于当缓存信息中的文件信息在原文件信息中匹配不到与其相对应的文件信息时,将文件信息对应的缓存文件标识为无效;清理单元332用于在缓存信息与原文件信息匹配完成后,清理标识为无效的缓存文件。Wherein, the identifying unit 331 is used to mark the cached file corresponding to the file information as invalid when the file information in the cached information does not match the corresponding file information in the original file information; the cleaning unit 332 is used to compare the cached information with the original file information After the file information matching is completed, the cached files identified as invalid are cleaned up.
在本实施例中,获取模块31获取的缓存信息为虚拟机缓存包名和/或缩略图信息,获取的原文件信息为已安装文件包名和/或与缩略图信息呈映射关系的原图信息。In this embodiment, the cache information acquired by the acquisition module 31 is the virtual machine cache package name and/or thumbnail information, and the acquired original file information is the installed file package name and/or original image information in a mapping relationship with the thumbnail information.
匹配模块32用于将虚拟机缓存包名和已安装文件包名进行匹配和/或将缩略图信息与原图信息进行匹配。The matching module 32 is used for matching the virtual machine cache package name with the installed file package name and/or matching the thumbnail image information with the original image information.
当匹配模块32匹配出无效缓存文件时,标识单元331对无效缓存文件进行标识,清理单元332对所有标识为无效的缓存文件进行清理。When the matching module 32 matches an invalid cache file, the identification unit 331 identifies the invalid cache file, and the cleaning unit 332 cleans up all the cache files marked as invalid.
在实际应用中,当基于悬浮窗对文件进行清理时,首先通过用户触发调用悬浮窗,利用悬浮窗启动获取模块31进行工作,当标识出无效缓存文件后,同样利用悬浮窗启动清理单元332进行工作。In practical application, when the file is cleaned based on the floating window, the floating window is first triggered by the user, and the acquisition module 31 is started to work by using the floating window. Work.
需要强调的是,本发明无效缓存信息的清理方式同理也能在诸如windows phone、IOS之类的移动设备操作系统上应用,因此本发明的方法具有普遍适应性。It should be emphasized that the cleaning method of the invalid cache information of the present invention can also be applied to mobile device operating systems such as windows phone and IOS, so the method of the present invention has universal adaptability.
综上所述,本发明对缓存中的无效缓存文件进行清理,有利于缓存的针对性清理,提高用户体验。To sum up, the present invention cleans up invalid cache files in the cache, which is beneficial to targeted cleaning of the cache and improves user experience.
以上所述仅是本发明的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above descriptions are only part of the embodiments of the present invention. It should be pointed out that those skilled in the art can make some improvements and modifications without departing from the principles of the present invention. It should be regarded as the protection scope of the present invention.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510010236.8A CN104484484B (en) | 2015-01-08 | 2015-01-08 | Clear up the method and device of cache file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510010236.8A CN104484484B (en) | 2015-01-08 | 2015-01-08 | Clear up the method and device of cache file |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104484484A CN104484484A (en) | 2015-04-01 |
CN104484484B true CN104484484B (en) | 2018-05-01 |
Family
ID=52759025
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510010236.8A Active CN104484484B (en) | 2015-01-08 | 2015-01-08 | Clear up the method and device of cache file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104484484B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106599151A (en) * | 2016-12-07 | 2017-04-26 | Tcl集团股份有限公司 | Method and system for parallel cleaning of Android engineering useless resources |
CN107609066A (en) * | 2017-08-30 | 2018-01-19 | 努比亚技术有限公司 | Method, equipment and the computer for clearing up file can storage mediums |
CN109408414A (en) * | 2018-09-30 | 2019-03-01 | 湖北华联博远科技有限公司 | A kind of software cache cleaner method and system |
CN111026717A (en) * | 2019-11-22 | 2020-04-17 | 陈奕博 | Cache file cleaning method |
CN111459887B (en) * | 2020-03-30 | 2023-08-11 | 北京百度网讯科技有限公司 | Resource screening method and device, electronic equipment and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1920828A (en) * | 2006-08-28 | 2007-02-28 | 华为技术有限公司 | Method and system for cleaning garbage files |
CN102750629A (en) * | 2012-06-26 | 2012-10-24 | 宇龙计算机通信科技(深圳)有限公司 | Schedule association method and device |
CN103136208A (en) * | 2011-11-23 | 2013-06-05 | 腾讯科技(深圳)有限公司 | Method for displaying images and device for displaying images |
US8548277B2 (en) * | 2007-10-16 | 2013-10-01 | Samsung Electronics Co., Ltd. | Image display apparatus and method |
CN103632096A (en) * | 2013-11-29 | 2014-03-12 | 北京奇虎科技有限公司 | Method and device for carrying out safety detection on equipment |
CN103731483A (en) * | 2013-12-25 | 2014-04-16 | 侯金涛 | Virtual file system based on cloud computing |
CN103995706A (en) * | 2014-06-06 | 2014-08-20 | 广州金山网络科技有限公司 | Method and device for displaying picture thumbnail |
CN104199704A (en) * | 2014-09-10 | 2014-12-10 | 北京金山安全软件有限公司 | Application program installation package clearing method and device |
-
2015
- 2015-01-08 CN CN201510010236.8A patent/CN104484484B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1920828A (en) * | 2006-08-28 | 2007-02-28 | 华为技术有限公司 | Method and system for cleaning garbage files |
US8548277B2 (en) * | 2007-10-16 | 2013-10-01 | Samsung Electronics Co., Ltd. | Image display apparatus and method |
CN103136208A (en) * | 2011-11-23 | 2013-06-05 | 腾讯科技(深圳)有限公司 | Method for displaying images and device for displaying images |
CN102750629A (en) * | 2012-06-26 | 2012-10-24 | 宇龙计算机通信科技(深圳)有限公司 | Schedule association method and device |
CN103632096A (en) * | 2013-11-29 | 2014-03-12 | 北京奇虎科技有限公司 | Method and device for carrying out safety detection on equipment |
CN103731483A (en) * | 2013-12-25 | 2014-04-16 | 侯金涛 | Virtual file system based on cloud computing |
CN103995706A (en) * | 2014-06-06 | 2014-08-20 | 广州金山网络科技有限公司 | Method and device for displaying picture thumbnail |
CN104199704A (en) * | 2014-09-10 | 2014-12-10 | 北京金山安全软件有限公司 | Application program installation package clearing method and device |
Non-Patent Citations (1)
Title |
---|
"手机管理应用研究(3)-垃圾清理篇";古騳;《http://blog.csdn.net/zhgxhuaa/article/details/33743293》;20140623;第1-9页 * |
Also Published As
Publication number | Publication date |
---|---|
CN104484484A (en) | 2015-04-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107786794B (en) | Electronic device and method for providing an image acquired by an image sensor to an application | |
CN104331488B (en) | File clean-up method, apparatus and equipment based on suspended window | |
CN104484484B (en) | Clear up the method and device of cache file | |
JP6435628B2 (en) | Information processing system, information processing apparatus, and program | |
KR102073678B1 (en) | Method and apparatus for firmware virtualization | |
CN103246595A (en) | Method, device, server and terminal units for managing application programs | |
US20150227605A1 (en) | Information processing terminal, synchronization control method, and computer-readable recording medium | |
US9229943B2 (en) | Addressing cross-allocated blocks in a file system | |
US9747449B2 (en) | Method and device for preventing application in an operating system from being uninstalled | |
CN112181467B (en) | Method and device for upgrading memory firmware of terminal, terminal and storage medium | |
CN104317952A (en) | Scanning method and device for storage space in mobile terminal | |
CN104391729B (en) | Programme upgrade method and device based on Root authority | |
US20150178502A1 (en) | Method of controlling message of electronic device and electronic device thereof | |
WO2017020458A1 (en) | Plugin calling method and device | |
US20170199733A1 (en) | Method for terminal to update operating system, terminal and system | |
US20100017863A1 (en) | Portable storage apparatus for providing working environment migration service and method thereof | |
CN110008698B (en) | Virus detection method and device | |
WO2014010847A1 (en) | Apparatus and method for diagnosing malicious applications | |
CN115828262A (en) | Open source component vulnerability scanning method, device, equipment and storage medium | |
CN116028122A (en) | Device processing method and device based on processor | |
CN110377328A (en) | A kind of data capture method, device, equipment and storage medium | |
US11403093B1 (en) | Application modification with proxy service process | |
CN104503760B (en) | The method and device of acquisition system highest authority | |
CN109522174B (en) | Method, device, terminal and storage medium for controlling adb enabling | |
CN104217021B (en) | Reading server, terminal device and its method for showing reading content |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220801 Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015 Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee before: Qizhi software (Beijing) Co.,Ltd. |
|
TR01 | Transfer of patent right |