CN114143574B - Method for cleaning storage space, storage medium and terminal equipment - Google Patents

Method for cleaning storage space, storage medium and terminal equipment Download PDF

Info

Publication number
CN114143574B
CN114143574B CN202010922232.8A CN202010922232A CN114143574B CN 114143574 B CN114143574 B CN 114143574B CN 202010922232 A CN202010922232 A CN 202010922232A CN 114143574 B CN114143574 B CN 114143574B
Authority
CN
China
Prior art keywords
file
list
file list
storage space
terminal equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010922232.8A
Other languages
Chinese (zh)
Other versions
CN114143574A (en
Inventor
陈秋东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Leiniao Network Media Co ltd
Original Assignee
Shenzhen Leiniao Network Media Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Leiniao Network Media Co ltd filed Critical Shenzhen Leiniao Network Media Co ltd
Priority to CN202010922232.8A priority Critical patent/CN114143574B/en
Publication of CN114143574A publication Critical patent/CN114143574A/en
Application granted granted Critical
Publication of CN114143574B publication Critical patent/CN114143574B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1737Details of further file system functions for reducing power consumption or coping with limited storage space, e.g. in mobile devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations

Abstract

The application discloses a method for cleaning a storage space, which is applied to terminal equipment in a cleaning system, wherein the cleaning system comprises the terminal equipment and a server; the method comprises the following steps: the terminal equipment determines a first file list; the terminal equipment sends the first file list to a server so as to determine a second file list based on the first file list through the server; and the terminal equipment cleans the storage space based on the second file list. After the first file list formed by all the first file data stored in the storage space is obtained, the server is used for obtaining the second file list corresponding to the first file list, and the storage space configured by the server is automatically cleaned according to the second file list, so that the problem of insufficient storage space caused by occupation of useless file data in the storage space is avoided, and the utilization rate of the storage space can be improved.

Description

Method for cleaning storage space, storage medium and terminal equipment
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a method for cleaning a storage space, a storage medium, and a terminal device.
Background
The current intelligent television is based on an android system, various application programs can be installed on the intelligent television, and each application program can load corresponding configuration file data, installation packages and the like. The intelligent television has the problem of insufficient storage space after running for a period of time, so that inconvenience is brought to users. For example, there is no space to download profile data of an application or install a new application, and smoothness of television usage is affected, etc.
Disclosure of Invention
The application aims to solve the technical problem of providing a method for cleaning a storage space, a storage medium and terminal equipment aiming at the defects of the prior art.
In order to solve the technical problem, a first aspect of the embodiments of the present application provides a method for cleaning a storage space, where the method is applied to a terminal device in a cleaning system, and the cleaning system includes the terminal device and a server; the method comprises the following steps:
the terminal equipment determines a first file list, wherein the first file list comprises a plurality of first file identifications, and first file data corresponding to each first file identification in the plurality of first file identifications are stored in a storage space of the terminal equipment;
the terminal equipment sends the first file list to a server so as to determine a second file list based on the first file list through the server;
and the terminal equipment cleans the storage space based on the second file list.
The method for cleaning the storage space, wherein the determining, by the terminal device, the first file list specifically includes:
the terminal equipment acquires the occupied space occupied by each file data in the configured storage space;
and the terminal equipment selects first file data from all file data based on the occupied space, and generates a first file list based on the selected first file data.
The method for cleaning the storage space, wherein the second file list comprises a plurality of second file identifiers, and the second file identifiers are file identifiers capable of being cleaned with file data; for each second file identifier in the second file list, a first file identifier exists in the first file list, and the first file identifier is the same as the second file identifier.
The method for cleaning the storage space, wherein the second file list comprises application identifiers and cleaning conditions, and for each second file identifier, the second file identifier corresponds to an application identifier and a cleaning condition; the terminal equipment cleaning the storage space based on the second file list specifically comprises the following steps of;
the terminal equipment reads application identifiers corresponding to the second file identifiers in the second file list and monitors the running state of the application programs corresponding to the application identifiers;
and deleting file data corresponding to the second file identifier from the storage space in the terminal equipment when the running state of the application program meets the target cleaning condition, wherein the target cleaning condition is the cleaning condition corresponding to the second file identifier.
The second aspect of the embodiment of the application provides a method for cleaning a storage space, which is applied to a server in a cleaning system, wherein the cleaning system comprises terminal equipment and the server; the method comprises the following steps:
the server receives a first file list sent by terminal equipment, wherein the first file list comprises a plurality of first file identifications, and first file data corresponding to each first file identification in the plurality of first file identifications are stored in a storage space of the terminal equipment;
the server determines a second file list corresponding to the terminal equipment based on the first file list;
and the server sends the second file list to the terminal equipment so that the terminal equipment can clear the storage space of the terminal equipment based on the second file list.
The method for cleaning the storage space, wherein the server determines, based on the first file list, a second file list corresponding to the terminal device specifically includes:
the server selects a first candidate file identification from the first file list based on a cleanable file list, wherein the first candidate file identification is contained in the cleanable file list;
the server determines file data types of all reference file identifications except the first candidate file identification in the first file list, and selects a second candidate file identification from the reference file identifications based on the file data types of all the reference file identifications, wherein the file data types of the second candidate file identifications are cache file data;
the server determines a second file identification based on the first candidate file identification and the second candidate file identification, and generates a second file list based on the second file identification, wherein the second file list comprises all the second file identifications.
The method for cleaning the storage space, wherein the server sends the second file list to the terminal device, so that after the terminal device cleans the storage space of the terminal device based on the second file list, the method further comprises:
the server detects whether the target file identification which is not contained in the cleanable file list exists in the second file list;
and if the target file identifier exists in the second file list, the server adds the target file identifier into the cleanable file list so as to update the cleanable file list.
A third aspect of an embodiment of the present application provides a system for cleaning a storage space, the system including:
the terminal equipment is used for determining a first file list, sending the first file list to the server, receiving a second file list sent by the server, and cleaning the storage space based on the second file list, wherein each first file data in the first file list is stored in the storage space of the terminal equipment;
the server is used for receiving a first file list sent by the terminal equipment, determining a second file list corresponding to the terminal equipment based on the first file list, and sending the second file list to the terminal equipment.
A third aspect of the embodiments of the present application provides a computer readable storage medium storing one or more programs executable by one or more processors to implement steps in a method of cleaning a storage space as described in any of the above, and/or to implement steps in a method of cleaning a storage space as described in any of the above.
A fourth aspect of an embodiment of the present application provides a terminal device, including: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps of the method of cleaning storage space as described in any of the above, and/or implements the steps of the method of cleaning storage space as described in any of the above.
The beneficial effects are that: compared with the prior art, the application provides a method for cleaning a storage space, which is applied to terminal equipment in a cleaning system, wherein the cleaning system comprises the terminal equipment and a server; the method comprises the following steps: the terminal equipment determines a first file list; the terminal equipment sends the first file list to a server so as to determine a second file list based on the first file list through the server; and the terminal equipment cleans the storage space based on the second file list. After the first file list formed by all the first file data stored in the storage space is obtained, the server is used for obtaining the second file list corresponding to the first file list, and the storage space configured by the server is automatically cleaned according to the second file list, so that the problem of insufficient storage space caused by occupation of useless file data in the storage space is avoided, and the utilization rate of the storage space can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without creative effort for a person of ordinary skill in the art.
FIG. 1 is a flow chart of a method for cleaning a storage space according to the present application.
Fig. 2 is a schematic structural diagram of a system for cleaning storage space according to the present application.
Fig. 3 is a schematic structural diagram of a terminal device provided by the present application.
Detailed Description
The application provides a method for cleaning a storage space, a storage medium and a terminal device, and in order to make the purposes, technical schemes and effects of the application clearer and more definite, the application is further described in detail below by referring to the accompanying drawings and the embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude 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. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs unless defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The application will be further described by the description of embodiments with reference to the accompanying drawings.
The embodiment provides a method for cleaning a storage space, which is applied to a cleaning system, as shown in fig. 2, wherein the cleaning system comprises a terminal device and a server, the terminal device is in communication with the server, the terminal device can be a smart phone, a tablet personal computer, a smart television and the like, and the server can be a cloud terminal, a background server and the like. In a specific implementation manner of the implementation manner, the terminal device is an intelligent television, and the server is a background server.
The present embodiment provides a method for cleaning a storage space, as shown in fig. 1, specifically including:
s10, the terminal equipment determines a first file list and sends the first file list to a server.
Specifically, the first file list is used for storing a first file identifier of first file data in a storage configured by the terminal device itself, wherein the first file data is used as file data for releasing storage space. The first file list comprises a plurality of first file identifications, and first file data corresponding to each first file identification are stored in a storage space of the terminal device. The first file identifiers are corresponding to the unique identifiers of the first file data, and the first file identifiers are corresponding to the first file data one by one, so that one file data can be uniquely determined and obtained according to the first file identifiers, and therefore when the file data corresponding to the file identifiers are deleted later, the file data can be prevented from being deleted by mistake, and the accuracy of deleting the file data is improved. In a specific implementation manner of this embodiment, the first file identifier may be a file data storage path of the file data corresponding to the first file identifier.
In an implementation manner of this embodiment, the determining, by the terminal device, the first file list specifically includes:
s11, the terminal equipment acquires the occupied space occupied by each file data in the configured storage space;
s12, the terminal equipment selects first file data from all file data based on the occupied space, and generates a first file list based on the selected first file data.
Specifically, the occupied space is used for reflecting the file data size of the file data, and the occupied space can be determined according to the file data size of the file data, wherein the file data is one file data stored in the storage space. It is understood that the terminal device acquires all the file data in the configured storage space, and for each acquired file data, determines the file data size of the file data, and takes the file data size of the file data as the occupied space.
Further, after the occupied space corresponding to each file data is obtained, a preset occupied space threshold is read, and the occupied space corresponding to each file data is compared with the read occupied space threshold respectively, so that first file data is selected. Based on the above, the terminal device selects the first file data from all the file data based on the occupied space, and the generating the first file list based on the selected first file data specifically includes:
comparing the occupied space corresponding to each file data with the occupied space threshold value;
when the occupied space is larger than or equal to the occupied space threshold value, the file data are used as first file data, so that all first file data corresponding to the terminal equipment are obtained;
and generating the first file list according to all the acquired first file data.
Specifically, the occupation space threshold is preset, file data stored in the storage space of the terminal device can be determined to be used as first file data through the occupation space threshold, and when the first file data is cleaned, the released storage space can enable the residual storage space of the storage space to be in a preset range, so that the problem of insufficient residual storage space of the storage space is avoided. The preset range corresponds to the occupied space threshold, and the lower limit value of the preset range may be the occupied space threshold. Therefore, when the occupied space is larger than or equal to the occupied space threshold value, the file data corresponding to the occupied space can be used as the first file data, when the occupied space is smaller than the occupied space threshold value, the file data corresponding to the occupied space cannot be used as the first file data, and therefore the first file data can be selected from all the file data in the storage space through the occupied space threshold value, the first file data can be determined through the occupied space threshold value, each first file data can occupy a certain storage space, on one hand, the effect of releasing the storage space can be started, and on the other hand, the number of times of determining and cleaning the file data can be reduced, so that system resources occupied by cleaning the storage space can be prevented from being reduced.
For example, the storage space stores file data a, file data B and file data C, where the occupied space corresponding to file data a is 1MB, the occupied space corresponding to file data B is 5MB, the occupied space corresponding to file data C is 10MB, and the occupied space threshold is 8MB, so that file data C may be used as the first file data, and file data a and file data B may not be used as the first file data.
In addition, since the first file identifiers stored in the first file list are the first file identifiers of the first file data, after each first file data is acquired, the file identifiers of each first file data can be acquired to obtain each first file identifier, and the first file identifiers are stored in a form of a first file identifier table to obtain the first file list. Wherein the first file identifier may be a storage path of the first file data. For example, the first file data A is an installation package of the application program A, and the installation package is stored in the C/application program A/installation package.
S20, the server receives a first file list sent by the terminal equipment, determines a second file list corresponding to the terminal equipment based on the first file list, and sends the second file list to the terminal equipment.
Specifically, the second file list includes a plurality of second file identifiers, and for each second file identifier in the second file list, a first file identifier exists in the first file list, and the first file identifier is the same as the second file identifier. It may be appreciated that the second file list stores a plurality of second file identifiers, and each of the plurality of second file identifiers is included in the first file list, that is, the second file list is a sub-list of the first file list, and the second file list is included in the first file list. For example, the second file list includes a second file identifier a and a second file identifier B, and then the first file list includes a first file identifier 1 and a first file identifier 2, where the first file identifier 1 is the same as the second file identifier a, and the first file identifier 2 is the same as the second file identifier B.
Further, in an implementation manner of this embodiment, the determining, by the server, the second file list corresponding to the terminal device based on the first file list specifically includes:
the server selects a first candidate file identification from the first file list based on a cleanable file list;
the server determines file data types of all reference file identifications except the first candidate file identification in the first file list, and selects a second candidate file identification from the reference file identifications based on the file data types of all the reference file identifications, wherein the file data types of the second candidate file identifications are cache file data;
the server generates a second file list based on the first candidate file identification and the second candidate file identification.
Specifically, the cleanable file list is configured to store cleanable file identifiers, where the cleanable file list includes a plurality of preset file identifiers, and preset file data corresponding to each of the plurality of preset file identifiers is cleanable, where the cleanable refers to that when cleanable file data is cleaned, normal operation of an application program corresponding to the cleanable file data is not affected. For example, the storage space stores an update package of the application program a, and then the update package may be cleared after the application program a is updated based on the update package.
The first candidate file identification is included in the first file list and the first candidate file identification is included in the cleanable file list. That is, the first candidate file identification is included in an intersection of the first file list and the cleanable file list. Thus, the process of selecting the first candidate file identification in the first file list based on the cleanable file list may be: and determining an intersection of the cleanable file list and the first file list, acquiring each file identifier in the intersection, and taking the acquired file identifiers as first candidate file identifiers, wherein the number of the first candidate file identifiers can be 1 or more.
Further, after the first candidate file identifier is obtained, the obtained first candidate file identifier is used as a candidate file identifier list, and then an intersection of the candidate file identifier list and the first file identifier is determined, so that all the reference file identifiers except the first candidate file identifier in the first file list are obtained. And when each reference file identifier is acquired, acquiring a file data suffix carried by the reference file identifier, determining a file data type corresponding to the reference file identifier according to the file data suffix, taking the reference file identifier as a second candidate file identifier when the file data type corresponding to the reference file identifier is cache file data, and generating a second file list according to all the acquired first candidate file identifiers and all the acquired second candidate file identifiers after the first candidate file identifier and the second candidate file identifier are acquired, wherein the second file list comprises all the acquired first candidate file identifiers and all the acquired second candidate file identifiers, and only comprises all the acquired first candidate file identifiers and all the acquired second candidate file identifiers. For example, all the first candidate file identifications include the first file identification a and the first file data header B, and all the second candidate file identifications include the first file identification C and the first file identification D, then the second file list includes the first file identification a, the first file data header B, the first file identification C, and the first file identification D.
In one implementation manner of this embodiment, the server sends the second file list to the terminal device, so that after the terminal device cleans its own storage space based on the second file list, the method further includes:
the server detects whether the target file identification which is not contained in the cleanable file list exists in the second file list;
and if the target file identifier exists in the second file list, the server adds the target file identifier into the cleanable file list so as to update the cleanable file list.
Specifically, the target file identifier is contained in the second file list and is not contained in the cleanable file list, and when the target file identifier exists, the detection of the cleanable file data which is not contained in the cleanable file list exists is indicated; when the target file identification exists, it is indicated that no cleanable file data not included in the cleanable file list is detected. In order to quickly determine the second file list corresponding to the terminal device, when the cleanable file data which is not contained in the cleanable file list is detected, the target file identifier may be added to the cleanable file list to update the cleanable file list, so that cleanable file data corresponding to the terminal device is quickly determined based on the updated cleanable file list, and thus the cleaning speed of the storage space of the terminal device may be improved.
S30, the terminal equipment cleans the storage space based on the second file list.
Specifically, the cleaning the storage space refers to deleting file data stored in the storage space, and correspondingly, the cleaning the storage space based on the second file list refers to deleting second file data corresponding to each second file identifier in the second file list from the storage space. In this way, the terminal device determines second file data corresponding to each second file identifier in the second file list when acquiring the second file list, and deletes the determined second file data from the storage space to release the storage space occupied by the second file data.
In one implementation of this embodiment, the second file data includes application identifiers and cleaning conditions, and for each second file identifier, the second file identifier corresponds to an application identifier and a cleaning condition; the terminal equipment cleaning the storage space based on the second file list specifically comprises the following steps of;
the terminal equipment reads application identifiers corresponding to the second file identifiers in the second file list and monitors the running state of the application programs corresponding to the application identifiers;
and deleting file data corresponding to the second file identifier from the storage space in the terminal equipment when the running state of the application program meets the target cleaning condition, wherein the target cleaning condition is the cleaning condition corresponding to the second file identifier.
Specifically, the application identifier is a unique identifier of the application program, the application program to which the second file data corresponding to the second file identifier belongs is determined based on the application identifier, the cleaning condition is used for reflecting an operation state of the application program to which the second file data corresponding to the second file identifier belongs when the second file data corresponding to the second file identifier can be cleaned, and the cleaning condition can include a target operation state of the application program when the second file data can be cleaned. Therefore, when the second file data corresponding to each second file identifier is cleaned, the application program corresponding to each second file identifier can be determined based on the application identifier, the running state corresponding to the application program corresponding to each second file identifier is obtained, and when the running state of the application program meets the target cleaning condition, the file data corresponding to the second file identifier is cleaned, wherein the target cleaning condition is the cleaning condition corresponding to the second file identifier.
In an implementation manner of this embodiment, the application identifier may be included in the first file list, and the cleaning condition may be generated by the server according to the first file list and added to the second file list, so that the second file list carries the application identifier and the cleaning condition. The first file list may include file data information of first file data corresponding to the first file identifier, where the file data information may include an effect of the file data, an influence of deletion of the file data on an application program and a terminal device, and the like, so that the server may determine a cleaning condition corresponding to the first file data based on the file data information. Of course, in practical application, after the server obtains the cleaning condition corresponding to the first file data, the cleaning condition may be added to the cleanable file list, so that for the first file identifier included in the cleanable file list, the cleaning condition corresponding to the first file identifier may be directly determined, and the generating speed of the second file list may be improved.
In summary, the present embodiment provides a method for cleaning a storage space, where the method is applied to a terminal device in a cleaning system, and the cleaning system includes the terminal device and a server; the method comprises the following steps: the terminal equipment determines a first file list; the terminal equipment sends the first file list to a server so as to determine a second file list based on the first file list through the server; and the terminal equipment cleans the storage space based on the second file list. After the first file list formed by all the first file data stored in the storage space is obtained, the server is used for obtaining the second file list corresponding to the first file list, and the storage space configured by the server is automatically cleaned according to the second file list, so that the problem of insufficient storage space caused by occupation of useless file data in the storage space is avoided, and the utilization rate of the storage space can be improved.
Based on the above method for cleaning storage space, the present embodiment provides a system for cleaning storage space, where the system includes:
the terminal equipment is used for determining a first file list, sending the first file list to the server, receiving a second file list sent by the server, and cleaning the storage space based on the second file list, wherein each first file data in the first file list is stored in the storage space of the terminal equipment;
the server is used for receiving a first file list sent by the terminal equipment, determining a second file list corresponding to the terminal equipment based on the first file list, and sending the second file list to the terminal equipment.
Specifically, the execution process of the terminal device is the same as the execution process of the terminal device in the above method, and the execution process of the server is the same as the execution process of the server in the above method, which is not described in detail herein, and specific reference may be made to the description of the above method.
Based on the above method for cleaning up a storage space, the present embodiment provides a computer readable storage medium storing one or more programs executable by one or more processors to implement the steps in the method for cleaning up a storage space as described in the above embodiment.
Based on the above method for cleaning up the storage space, the present application also provides a terminal device, as shown in fig. 3, which includes at least one processor (processor) 20; a display screen 21; and a memory (memory) 22, which may also include a communication interface (Communications Interface) 23 and a bus 24. Wherein the processor 20, the display 21, the memory 22 and the communication interface 23 may communicate with each other via a bus 24. The display screen 21 is configured to display a user guidance interface preset in the initial setting mode. The communication interface 23 may transmit information. The processor 20 may invoke logic instructions in the memory 22 to perform the methods of the embodiments described above.
Further, the logic instructions in the memory 22 described above may be implemented in the form of software functional units and stored in a computer readable storage medium when sold or used as a stand alone product.
The memory 22, as a computer readable storage medium, may be configured to store a software program, a computer executable program, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 performs functional applications and data processing, i.e. implements the methods of the embodiments described above, by running software programs, instructions or modules stored in the memory 22.
The memory 22 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the terminal device, etc. In addition, the memory 22 may include high-speed random access memory, and may also include nonvolatile memory. For example, a plurality of media capable of storing program codes such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or a transitory storage medium may be used.
In addition, the specific processes that the storage medium and the plurality of instruction processors in the terminal device load and execute are described in detail in the above method, and are not stated here.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (7)

1. The method for cleaning the storage space is characterized by being applied to terminal equipment in a cleaning system, wherein the cleaning system comprises the terminal equipment and a server; the method comprises the following steps:
the terminal equipment determines a first file list, wherein the first file list comprises a plurality of first file identifications, and first file data corresponding to each first file identification in the plurality of first file identifications are stored in a storage space of the terminal equipment;
the terminal equipment sends the first file list to a server so as to determine a second file list based on the first file list through the server;
the terminal equipment cleans the storage space based on the second file list;
the second file list comprises a plurality of second file identifications, and the second file identifications are file identifications of cleanable file data; for each second file identifier in the second file list, a first file identifier exists in the first file list, and the first file identifier is the same as the second file identifier;
the second file list comprises application identifiers and cleaning conditions, and for each second file identifier, the second file identifier corresponds to an application identifier and a cleaning condition; the terminal equipment cleaning the storage space based on the second file list specifically comprises the following steps of;
the terminal equipment reads application identifications corresponding to second file identifications in a second file list, determines application programs to which second file data corresponding to the second file identifications belong based on the application identifications, and monitors the running states of the application programs corresponding to the application identifications;
and deleting the file data corresponding to the second file identifier from the storage space in the terminal equipment when the running state of the application program meets the target cleaning condition, wherein the target cleaning condition is the running state of the application program to which the second file data belongs when the second file data corresponding to the second file identifier can be cleaned.
2. The method for cleaning storage space according to claim 1, wherein the determining, by the terminal device, the first file list specifically includes:
the terminal equipment acquires the occupied space occupied by each file data in the configured storage space;
and the terminal equipment selects first file data from all file data based on the occupied space, and generates a first file list based on the selected first file data.
3. A method for cleaning a storage space, which is characterized in that the method is applied to a server in a cleaning system, wherein the cleaning system comprises a terminal device and the server; the method comprises the following steps:
the server receives a first file list sent by terminal equipment, wherein the first file list comprises a plurality of first file identifications, and first file data corresponding to each first file identification in the plurality of first file identifications are stored in a storage space of the terminal equipment;
the server determines a second file list corresponding to the terminal equipment based on the first file list;
the server sends the second file list to the terminal equipment so that the terminal equipment can clear the storage space of the terminal equipment based on the second file list;
the server determines, based on the first file list, a second file list corresponding to the terminal device specifically includes:
the server selects a first candidate file identification from the first file list based on a cleanable file list, wherein the first candidate file identification is contained in an intersection of the cleanable file list and the first file list, and the cleanable file list is used for storing the cleanable file identification;
the server determines file data types of all reference file identifications except the first candidate file identification in the first file list, and selects a second candidate file identification from the reference file identifications based on the file data types of all the reference file identifications, wherein the file data types of the second candidate file identifications are cache file data;
the server determines a second file identification based on the first candidate file identification and the second candidate file identification, and generates a second file list based on the second file identification, wherein the second file list comprises all the second file identifications.
4. A method of cleaning storage space according to claim 3, wherein the server sends the second file list to the terminal device such that after the terminal device cleans its own storage space based on the second file list, the method further comprises:
the server detects whether the target file identification which is not contained in the cleanable file list exists in the second file list;
and if the target file identifier exists in the second file list, the server adds the target file identifier into the cleanable file list so as to update the cleanable file list.
5. A system for cleaning storage space, the system comprising:
the terminal equipment is used for determining a first file list, sending the first file list to the server, receiving a second file list sent by the server, and cleaning the storage space based on the second file list, wherein each first file data in the first file list is stored in the storage space of the terminal equipment; the second file list comprises a plurality of second file identifications, and the second file identifications are file identifications of cleanable file data; for each second file identifier in the second file list, a first file identifier exists in the first file list, and the first file identifier is the same as the second file identifier;
the second file list comprises application identifiers and cleaning conditions, and for each second file identifier, the second file identifier corresponds to an application identifier and a cleaning condition; the cleaning the storage space based on the second file list specifically comprises;
the terminal equipment reads application identifications corresponding to second file identifications in a second file list, determines application programs to which second file data corresponding to the second file identifications belong based on the application identifications, and monitors the running states of the application programs corresponding to the application identifications;
when the running state of the application program meets the target cleaning condition, deleting file data corresponding to the second file identifier from a storage space in the terminal equipment, wherein the target cleaning condition is the running state of the application program to which the second file data belongs when the second file data corresponding to the second file identifier can be cleaned;
the server is used for receiving a first file list sent by the terminal equipment, determining a second file list corresponding to the terminal equipment based on the first file list, and sending the second file list to the terminal equipment;
the server determines, based on the first file list, a second file list corresponding to the terminal device specifically includes:
the server selects a first candidate file identification from the first file list based on a cleanable file list, wherein the first candidate file identification is contained in the cleanable file list and the intersection of the first file list, and the cleanable file list is used for storing the cleanable file identification;
the server determines file data types of all reference file identifications except the first candidate file identification in the first file list, and selects a second candidate file identification from the reference file identifications based on the file data types of all the reference file identifications, wherein the file data types of the second candidate file identifications are cache file data;
the server determines a second file identification based on the first candidate file identification and the second candidate file identification, and generates a second file list based on the second file identification, wherein the second file list comprises all the second file identifications.
6. A computer readable storage medium storing one or more programs executable by one or more processors to perform the steps of the method of cleaning storage space of any of claims 1-2 and/or to perform the steps of the method of cleaning storage space of any of claims 3-4.
7. A terminal device, comprising: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps of the method of cleaning a storage space according to any of claims 1-2 and/or the steps of the method of cleaning a storage space according to any of claims 3-4.
CN202010922232.8A 2020-09-04 2020-09-04 Method for cleaning storage space, storage medium and terminal equipment Active CN114143574B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010922232.8A CN114143574B (en) 2020-09-04 2020-09-04 Method for cleaning storage space, storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010922232.8A CN114143574B (en) 2020-09-04 2020-09-04 Method for cleaning storage space, storage medium and terminal equipment

Publications (2)

Publication Number Publication Date
CN114143574A CN114143574A (en) 2022-03-04
CN114143574B true CN114143574B (en) 2023-12-05

Family

ID=80438180

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010922232.8A Active CN114143574B (en) 2020-09-04 2020-09-04 Method for cleaning storage space, storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN114143574B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104754002A (en) * 2013-12-30 2015-07-01 北京金山网络科技有限公司 File cleaning method and device, mobile terminal and cloud-side server
WO2018018505A1 (en) * 2016-07-28 2018-02-01 华为技术有限公司 Method and terminal for identifying uncommon data
CN107957906A (en) * 2017-12-20 2018-04-24 珠海全志科技股份有限公司 Application management method, computer installation, the computer-readable recording medium of terminal device
CN110737604A (en) * 2019-08-30 2020-01-31 北京奇艺世纪科技有限公司 method, device, electronic equipment and storage medium for automatically cleaning memory
CN110990341A (en) * 2019-10-29 2020-04-10 宇龙计算机通信科技(深圳)有限公司 Method, device, electronic equipment and medium for clearing data
CN111221586A (en) * 2018-11-08 2020-06-02 奇酷互联网络科技(深圳)有限公司 Privacy cleaning method for application program, readable storage medium and terminal equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9558459B2 (en) * 2007-12-28 2017-01-31 International Business Machines Corporation Dynamic selection of actions in an information technology environment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104754002A (en) * 2013-12-30 2015-07-01 北京金山网络科技有限公司 File cleaning method and device, mobile terminal and cloud-side server
WO2018018505A1 (en) * 2016-07-28 2018-02-01 华为技术有限公司 Method and terminal for identifying uncommon data
CN107957906A (en) * 2017-12-20 2018-04-24 珠海全志科技股份有限公司 Application management method, computer installation, the computer-readable recording medium of terminal device
CN111221586A (en) * 2018-11-08 2020-06-02 奇酷互联网络科技(深圳)有限公司 Privacy cleaning method for application program, readable storage medium and terminal equipment
CN110737604A (en) * 2019-08-30 2020-01-31 北京奇艺世纪科技有限公司 method, device, electronic equipment and storage medium for automatically cleaning memory
CN110990341A (en) * 2019-10-29 2020-04-10 宇龙计算机通信科技(深圳)有限公司 Method, device, electronic equipment and medium for clearing data

Also Published As

Publication number Publication date
CN114143574A (en) 2022-03-04

Similar Documents

Publication Publication Date Title
US20150331612A1 (en) Memory Cleaning Method and Apparatus, and Terminal Device
CN111464355A (en) Method and device for controlling expansion capacity of Kubernetes container cluster and network equipment
CN108984266B (en) Virtual machine management method, device and system
CN107315825B (en) Index updating system, method and device
WO2017193964A1 (en) Component upgrade method, apparatus and system
CN110162396A (en) Method for recovering internal storage, device, system and storage medium
US11237761B2 (en) Management of multiple physical function nonvolatile memory devices
CN106933512B (en) Data reading and writing method and device
CN108667740B (en) Flow control method, device and system
CN109639827B (en) Client upgrading method and device
CN114143574B (en) Method for cleaning storage space, storage medium and terminal equipment
CN110780944B (en) Method and device for starting application permission and machine-readable storage medium
CN107045452B (en) Virtual machine scheduling method and device
CN115686746A (en) Access method, task processing method, computing device, and computer storage medium
CN113342270A (en) Volume unloading method and device and electronic equipment
CN107209882B (en) Multi-stage de-registration for managed devices
CN108345431B (en) Data reading method and device
KR102362699B1 (en) Method for providing a file management service using a plurality of storage devices and Apparatus thereof
CN112230936A (en) Container group deployment method and device and server
CN111858418A (en) Memory communication method and device based on remote direct memory access RDMA
JP6349786B2 (en) Virtual machine management apparatus, virtual machine management method, and virtual machine management program
CN112543213B (en) Data processing method and device
CN114301927B (en) Main node selection method, device and medium in distributed system
CN114281604B (en) Data recovery method and device, electronic equipment and storage medium
US9847919B2 (en) Data network device discovery optimization to reduce data transfer volume

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant