CN114143574A - Method for cleaning storage space, storage medium and terminal equipment - Google Patents
Method for cleaning storage space, storage medium and terminal equipment Download PDFInfo
- Publication number
- CN114143574A CN114143574A CN202010922232.8A CN202010922232A CN114143574A CN 114143574 A CN114143574 A CN 114143574A CN 202010922232 A CN202010922232 A CN 202010922232A CN 114143574 A CN114143574 A CN 114143574A
- Authority
- CN
- China
- Prior art keywords
- file
- file list
- storage space
- list
- server
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 68
- 238000004140 cleaning Methods 0.000 title claims abstract description 65
- 238000004891 communication Methods 0.000 claims description 11
- 230000008569 process Effects 0.000 description 6
- 238000009434 installation Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/231—Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
-
- 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
-
- 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/17—Details of further file system functions
- G06F16/1737—Details of further file system functions for reducing power consumption or coping with limited storage space, e.g. in mobile devices
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/433—Content storage operation, e.g. storage operation in response to a pause request, caching operations
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
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. According to the method and the device, after the first file list formed by all the first file data stored in the storage space is obtained, the second file list corresponding to the first file list is obtained through the server, and the storage space configured by the server is automatically cleaned according to the second file list, so that the problem that the storage space is insufficient due to occupation of useless file data in the storage space is avoided, and the utilization rate of the storage space can be improved.
Description
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a method for clearing a storage space, a storage medium, and a terminal device.
Background
The current smart television is based on an android system, and various application programs can be installed on the smart television, and each application program can load configuration file data, an installation package and the like corresponding to the application program. After the intelligent television runs for a period of time, the problem of insufficient storage space can occur, so that inconvenience is brought to the use of a user. For example, there is no room to download profile data for an application or install a new application, and fluency of television use is affected, among other things.
Disclosure of Invention
The technical problem to be solved by the present application is to provide a method, a storage medium, and a terminal device for clearing a storage space, aiming at the defects of the prior art.
In order to solve the above 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 device determines a first file list, wherein the first file list comprises a plurality of first file identifications, and each first file data corresponding to each first file identification in the plurality of first file identifications is stored in a storage space of the terminal device;
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 clearing 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;
the terminal equipment selects first file data from all the file data based on the occupied space, and generates a first file list based on all the selected first file data.
The method for cleaning the storage space comprises the steps that the second file list comprises a plurality of second file identifications, and the second file identifications are file identifications of file data which can be cleaned; 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 comprises the steps that the second file list comprises application identifications and cleaning conditions, and for each second file identification, the second file identification corresponds to one application identification and one cleaning condition; the terminal equipment specifically comprises the step of cleaning the storage space based on the second file list;
the terminal equipment reads the application identifications corresponding to the second file identifications in the second file list and monitors the running states of the application programs corresponding to the application identifications;
and when the running state of the application program meets a target cleaning condition, deleting the file data corresponding to the second file identifier from the storage space in the terminal equipment, wherein the target cleaning condition is the cleaning condition corresponding to the second file identifier.
A second aspect of the embodiments of the present application provides a method for cleaning a storage space, where the method is applied to a server in a cleaning system, where the cleaning system includes 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 each first file data corresponding to each first file identification in the plurality of first file identifications is 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 cleans the storage space of the terminal equipment based on the second file list.
The method for clearing the storage space, wherein 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 identifier from the first file list based on a file list which can be cleaned, wherein the first candidate file identifier is contained in the file list which can be cleaned;
the server determines the 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 in 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 identifier based on the first candidate file identifier and the second candidate file identifier, and generates a second file list based on the second file identifier, wherein the second file list comprises all the second file identifiers.
The method for clearing the storage space, wherein the server sends the second file list to the terminal device, so that after the terminal device clears the storage space of the terminal device based on the second file list, the method further comprises:
the server detects whether a target file identifier which is not contained in the file list which can be cleaned exists in the second file list or not;
and if the second file list has the target file identification, the server adds the target file identification to the file list which can be cleaned so as to update the file list which can be cleaned.
A third aspect of the embodiments of the present application provides a system for clearing a storage space, where the system includes:
the terminal device 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 device;
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 embodiments of the present application provides a computer readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps in the method for clearing storage space as described in any of the above, and/or to implement the steps in the method for clearing storage space as described in any of the above.
A fourth aspect of the embodiments 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 for clearing memory space as described in any one of the above, and/or implements the steps of the method for clearing memory space as described in any one of the above.
Has the advantages that: compared with the prior art, the method for cleaning the storage space is applied to the terminal equipment in a cleaning system, and 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. According to the method and the device, after the first file list formed by all the first file data stored in the storage space is obtained, the second file list corresponding to the first file list is obtained through the server, and the storage space configured by the server is automatically cleaned according to the second file list, so that the problem that the storage space is insufficient due to 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 in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without any inventive work.
Fig. 1 is a flowchart of a method for clearing a storage space provided in the present application.
Fig. 2 is a schematic structural diagram of a system for clearing storage space according to the present application.
Fig. 3 is a schematic structural diagram of a terminal device provided in the present application.
Detailed Description
In order to make the purpose, technical scheme and effect of the present application clearer and clearer, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. 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. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those within the art that, unless otherwise defined, 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. 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 following further describes the content of the application by describing the embodiments with reference to the attached drawings.
The implementation provides a method for cleaning a storage space, which is applied to a cleaning system, as shown in fig. 2, 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 computer, a smart television and the like, and the server can be a cloud end, a background server end and the like. In a specific implementation manner of this embodiment, the terminal device is an intelligent television, and the server is a background server.
This embodiment provides a method for clearing a storage space, as shown in fig. 1, specifically including:
s10, the terminal device determines a first file list and sends the first file list to a server.
Specifically, the first file list is used to store a first file identifier of first file data in a storage configured by the terminal device itself, and the first file data is used as file data for releasing a 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 equipment. The unique identifier of the first file data corresponding to the first file identifier corresponds to the first file identifier, and the first file identifier corresponds to the first file data corresponding to the first file identifier one to one, so that one file data can be uniquely determined according to the first file identifier, and thus, when the file data corresponding to the file identifier is deleted subsequently, 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 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 device obtains the occupied space occupied by each file data in the configured storage space;
and S12, the terminal device selects first file data from all the file data based on the occupied space, and generates a first file list based on all 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, where the file data is a file data stored in the storage space. It can be understood that the terminal device obtains all file data in the configured storage space, and determines the file data size of the file data for each obtained 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 value is read, and the occupied space corresponding to each file data is compared with the read occupied space threshold value respectively, so that the first file data is selected. Based on this, the selecting, by the terminal device, the first file data from all the file data based on the occupied space, and generating the first file list based on all the selected first file data specifically includes:
for each file data, comparing the occupation space corresponding to the file data with an occupation space threshold value;
when the occupied space is larger than or equal to the occupied space threshold, the file data is used as first file data to obtain all first file data corresponding to the terminal equipment;
and generating the first file list according to all the acquired first file data.
Specifically, the occupied space threshold is preset, the file data stored in the storage space of the terminal device can be determined to be the first file data through the occupied space threshold, and when the first file data is cleared, the released storage space can enable the remaining storage space of the storage space to be within a preset range, so that the problem that the remaining space of the storage space is insufficient 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, the file data corresponding to the occupied space can be used as the first file data, and when the occupied space is smaller than the occupied space threshold, the file data corresponding to the occupied space cannot be used as the first file data, so that the first file data can be selected from all the file data in the storage space through the occupied space threshold, the first file data is determined through the occupied space threshold, each first file data can occupy a certain storage space, on one hand, the effect of releasing the storage space can be started, on the other hand, the times of determining and cleaning the file data can be reduced, and the reduction of system resources occupied by cleaning the storage space is avoided.
For example, file data a, file data B, and file data C are stored in the storage space, the occupied space corresponding to the file data a is 1MB, the occupied space corresponding to the file data B is 5MB, the occupied space corresponding to the file data C is 10MB, and the occupied space threshold is 8MB, then the file data C may be used as the first file data, and the file data a and the file data B may not be used as the first file data.
In addition, since the first file identifier of the first file data is stored in the first file list, after the first file data is acquired, the file identifier of each first file data can be acquired to obtain each first file identifier, and the first file identifier is stored in a table form 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 a, and the installation package is stored in C/application a/installation package.suffix a, then the first file identification of the first file data may be C/application a/installation package.suffix a.
S20, the server receives a first file list sent by the terminal device, determines a second file list corresponding to the terminal device based on the first file list, and sends the second file list to the terminal device.
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 is to be understood 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, the first file list includes a first file identifier 1 and a first file identifier 2, 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 and based on the first file list, the second file list corresponding to the terminal device specifically includes:
the server selects a first candidate file identifier in the first file list based on a file list which can be cleaned;
the server determines the 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 in 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 file list capable of being cleaned is used for storing file identifiers capable of being cleaned, the file list capable of being cleaned includes a plurality of preset file identifiers, and preset file data corresponding to each preset file identifier in the preset file identifiers can be cleaned, where the cleaning means that after the file data capable of being cleaned is cleaned, normal operation of an application program corresponding to the file data capable of being cleaned is not affected. For example, the storage space stores an update package of the application program a, and the update package can be cleared after the application program a is updated based on the update package.
The first candidate file identity is included in the first file list and the first candidate file identity is included in the list of files that can be cleaned. That is, the first candidate file identification is included in the intersection of the first file list and the list of files that can be cleaned. Therefore, the process of selecting the first candidate file identifier in the first file list based on the file list which can be cleaned may be: determining an intersection of the file list which can be cleaned and the first file list, acquiring file identifiers in the intersection, and taking the acquired file identifiers as first candidate file identifiers, wherein the number of the first candidate file identifiers may 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 reference file identifiers except the first candidate file identifier in the first file list are obtained. The method comprises the steps of obtaining each reference file identifier, obtaining a file data suffix carried by each reference file identifier, determining a file data type corresponding to the reference file identifier according to the file data suffix, when the file data type corresponding to the reference file identifier is cache file data, using the reference file identifier as a second candidate file identifier, after obtaining a first candidate file identifier and a second candidate file identifier, generating a second file list according to all the obtained first candidate file identifiers and all the obtained second candidate file identifiers, wherein the second file list comprises all the obtained first candidate file identifiers and all the obtained second candidate file identifiers, and only comprises all the obtained first candidate file identifiers and all the obtained second candidate file identifiers. For example, if all the first candidate file identifiers are obtained to include the first file identifier a and the first file data label B, and all the second candidate file identifiers are obtained to include the first file identifier C and the first file identifier D, the second file list includes the first file identifier a, the first file data label B, the first file identifier C, and the first file identifier D.
In an implementation manner of this embodiment, after the server sends the second file list to the terminal device, so that the terminal device cleans its own storage space based on the second file list, the method further includes:
the server detects whether a target file identifier which is not contained in the file list which can be cleaned exists in the second file list or not;
and if the second file list has the target file identification, the server adds the target file identification to the file list which can be cleaned so as to update the file list which can be cleaned.
Specifically, the target file identifier is included in the second file list and is not included in the file list which can be cleaned, and when the target file identifier exists, it is indicated that the cleanable file data which is not included in the file list which can be cleaned is detected to exist; when the target file identification exists, the situation that the cleanable file data which is not contained in the cleanable file list does not exist is detected. In order to quickly determine the second file list corresponding to the terminal device, when the existence of the cleanable file data which is not included 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 the 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 increased.
And S30, the terminal equipment cleans the storage space based on the second file list.
Specifically, the clearing of the storage space refers to deleting file data stored in the storage space, and correspondingly, the clearing of 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. Therefore, the terminal device determines second file data corresponding to each second file identifier in 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 an implementation manner of this embodiment, the second file data includes an application identifier and a cleaning condition, and for each second file identifier, the second file identifier corresponds to an application identifier and a cleaning condition; the terminal equipment specifically comprises the step of cleaning the storage space based on the second file list;
the terminal equipment reads the application identifications corresponding to the second file identifications in the second file list and monitors the running states of the application programs corresponding to the application identifications;
and when the running state of the application program meets a target cleaning condition, deleting the file data corresponding to the second file identifier from the storage space in the terminal equipment, 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 and determined based on the application identifier, the cleaning condition is used to reflect an operating 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, and the cleaning condition may include a target operating 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 that the server generates the application identifier according to the first file list and adds the application identifier 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 file data functions, influences of file data deletion 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. In practical application, of course, after the server obtains the cleaning condition corresponding to the first file data, the cleaning condition may be added to the file list that can be cleaned, so that for the first file identifier included in the file list that can be cleaned, the cleaning condition corresponding to the first file identifier may be directly determined, and the generation speed of the second file list may be increased.
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, where 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. According to the method and the device, after the first file list formed by all the first file data stored in the storage space is obtained, the second file list corresponding to the first file list is obtained through the server, and the storage space configured by the server is automatically cleaned according to the second file list, so that the problem that the storage space is insufficient due to 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 foregoing method for clearing a storage space, this embodiment provides a system for clearing a storage space, where the system includes:
the terminal device 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 device;
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 method, and the execution processes of the servers are the same as the execution processes of the servers in the method, which are not described herein again, and the description of the method may be referred to specifically.
Based on the method for clearing storage space, the embodiment provides a computer-readable storage medium, which stores one or more programs that can be executed by one or more processors to implement the steps in the method for clearing storage space according to the embodiment.
Based on the method for clearing the storage space, the present application further provides a terminal device, as shown in fig. 3, including at least one processor (processor) 20; a display screen 21; and a memory (memory)22, and may further include a communication Interface (Communications Interface)23 and a bus 24. The processor 20, the display 21, the memory 22 and the communication interface 23 can communicate with each other through the 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 call logic instructions in the memory 22 to perform the methods in the embodiments described above.
Furthermore, the logic instructions in the memory 22 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
The memory 22, which is 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 executes the functional application and data processing, i.e. implements the method in the above-described embodiments, by executing the software program, instructions or modules stored in the memory 22.
The memory 22 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 22 may include a high speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, may also be transient storage media.
In addition, the specific processes loaded and executed by the storage medium and the instruction processors in the terminal device are described in detail in the method, and are not stated herein.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.
Claims (10)
1. A method for cleaning storage space is characterized in that the method is applied to a terminal device in a cleaning system, and the cleaning system comprises the terminal device and a server; the method comprises the following steps:
the terminal device determines a first file list, wherein the first file list comprises a plurality of first file identifications, and each first file data corresponding to each first file identification in the plurality of first file identifications is stored in a storage space of the terminal device;
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.
2. The method for clearing 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;
the terminal equipment selects first file data from all the file data based on the occupied space, and generates a first file list based on all the selected first file data.
3. The method for clearing storage space according to claim 1, wherein the second file list comprises a plurality of second file identifications, and the second file identifications are file identifications of file data which can be cleared; 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.
4. The method for clearing storage space according to claim 3, wherein the second file list comprises application identifiers and clearing conditions, and for each second file identifier, the second file identifier corresponds to an application identifier and a clearing condition; the terminal equipment specifically comprises the step of cleaning the storage space based on the second file list;
the terminal equipment reads the application identifications corresponding to the second file identifications in the second file list and monitors the running states of the application programs corresponding to the application identifications;
and when the running state of the application program meets a target cleaning condition, deleting the file data corresponding to the second file identifier from the storage space in the terminal equipment, wherein the target cleaning condition is the cleaning condition corresponding to the second file identifier.
5. A method for cleaning storage space is characterized in that the method is applied to a server in a cleaning system, and 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 each first file data corresponding to each first file identification in the plurality of first file identifications is 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 cleans the storage space of the terminal equipment based on the second file list.
6. The method for clearing storage space according to claim 5, wherein 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 identifier from the first file list based on a file list which can be cleaned, wherein the first candidate file identifier is contained in the file list which can be cleaned;
the server determines the 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 in 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 identifier based on the first candidate file identifier and the second candidate file identifier, and generates a second file list based on the second file identifier, wherein the second file list comprises all the second file identifiers.
7. The method for clearing storage space according to claim 6, wherein after the server sends the second file list to the terminal device so that the terminal device clears its own storage space based on the second file list, the method further comprises:
the server detects whether a target file identifier which is not contained in the file list which can be cleaned exists in the second file list or not;
and if the second file list has the target file identification, the server adds the target file identification to the file list which can be cleaned so as to update the file list which can be cleaned.
8. A system for cleaning storage space, the system comprising:
the terminal device 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 device;
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.
9. A computer readable storage medium, storing one or more programs which are executable by one or more processors to perform the steps of the method of cleaning storage space of any one of claims 1 to 4 and/or to perform the steps of the method of cleaning storage space of any one of claims 5 to 7.
10. 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 in the method for clearing storage space of any one of claims 1 to 4 and/or implements the steps in the method for clearing storage space of any one of claims 5 to 7.
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 true CN114143574A (en) | 2022-03-04 |
CN114143574B 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 (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090171733A1 (en) * | 2007-12-28 | 2009-07-02 | International Business Machines Corporation | Dynamic selection of actions in an information technology environment |
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 |
-
2020
- 2020-09-04 CN CN202010922232.8A patent/CN114143574B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090171733A1 (en) * | 2007-12-28 | 2009-07-02 | International Business Machines Corporation | Dynamic selection of actions in an information technology environment |
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 |
---|---|
CN114143574B (en) | 2023-12-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2651219C2 (en) | Computer, control device and data processing method | |
US10817386B2 (en) | Virtual machine recovery method and virtual machine management device | |
US9223564B2 (en) | Update systems responsive to ongoing processing at a storage system | |
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 | |
EP2933723A1 (en) | Method, device and terminal equipment for cleaning up memory | |
US10417062B2 (en) | Method and apparatus of unloading out of memory processing flow to user space | |
CN103152390B (en) | The node configuration method of distributed memory system, device, node and system | |
WO2017193964A1 (en) | Component upgrade method, apparatus and system | |
CN111352647A (en) | Virtual machine upgrading method, device, equipment and storage medium | |
US20210132860A1 (en) | Management of multiple physical function non-volatile memory devices | |
CN111625264B (en) | Method, device, equipment and medium for upgrading multi-level management system | |
CN111045789B (en) | Virtual machine starting method and device, electronic equipment and storage medium | |
CN112631994A (en) | Data migration method and system | |
CN111126604A (en) | Model training method, device, server and storage medium | |
JP2016009225A (en) | Database management device, database management method, program, and recording medium | |
CN114143574B (en) | Method for cleaning storage space, storage medium and terminal equipment | |
CN110308914B (en) | Upgrade processing method, device, equipment, system and computer readable storage medium | |
CN115686746A (en) | Access method, task processing method, computing device, and computer storage medium | |
CN111356982A (en) | Program processing method, program processing apparatus, and storage medium | |
CN114385537A (en) | Page slot number dynamic allocation method, device, equipment and medium | |
CN107209882B (en) | Multi-stage de-registration for managed devices | |
CN107493316B (en) | Application operation management method, server and computer readable storage medium | |
CN112527276A (en) | Data updating method and device in visual programming tool and terminal equipment | |
CN108345431B (en) | Data reading method and device |
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 |