CN107590144A - A kind of file memory method and terminal - Google Patents

A kind of file memory method and terminal Download PDF

Info

Publication number
CN107590144A
CN107590144A CN201610529804.XA CN201610529804A CN107590144A CN 107590144 A CN107590144 A CN 107590144A CN 201610529804 A CN201610529804 A CN 201610529804A CN 107590144 A CN107590144 A CN 107590144A
Authority
CN
China
Prior art keywords
file
stored
space
backup
storage
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.)
Pending
Application number
CN201610529804.XA
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201610529804.XA priority Critical patent/CN107590144A/en
Priority to PCT/CN2017/071392 priority patent/WO2018006587A1/en
Publication of CN107590144A publication Critical patent/CN107590144A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures

Landscapes

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

Abstract

The embodiment of the invention discloses a kind of file memory method, including:Obtain the fileinfo of file to be stored and the memory space of storage file occupancy, the fileinfo include the first space that the file to be stored takes, the storage file includes having stored source file and stored backup file;According to first space and the memory space, the minimum Free up Memory stored shared by backup file of release severity level;Store the file to be stored.The embodiment of the present invention also discloses a kind of terminal simultaneously.

Description

A kind of file memory method and terminal
Technical field
The present invention relates to field of computer technology, more particularly to a kind of file memory method and terminal.
Background technology
In the storage device of some Large Copacities, often occur some file of storage due to some unknown originals Thus cause the data of this document can not read or corrupted data.When these files be system file either During the file of in store user's capsule information, the operation of terminal system will be caused greatly to threaten, simultaneously Can also irreparable damage be caused to user.
Therefore, the security of file attracts wide attention, and the backup to file seems more and more important. In the prior art, a piece of specific memory space can be opened up again in storage device, for storing backup text Part, in case of need.So, it is necessary to open up extra memory space, and extra memory space gesture The memory space of former storage device must be occupied, if the information of the backup file of storage is excessive, can cause to store Space greatly wastes.
The content of the invention
In order to solve the above technical problems, the embodiment of the present invention it is expected to provide a kind of file memory method and terminal, Can fully, effectively utilize memory space, so as to avoid the wasting phenomenon of memory space, and then store And/or the more vital documents of backup.
The technical proposal of the invention is realized in this way:
First aspect, there is provided a kind of file memory method, methods described include:
Obtain the fileinfo of file to be stored and the memory space of storage file occupancy, the file are believed Breath includes the first space that the file to be stored takes, the storage file include having stored source file with Backup file is stored;
According to first space and the memory space, the minimum backup text of storage of release severity level Free up Memory shared by part;
Store the file to be stored.
Optionally, it is described minimum according to first space and the memory space, release severity level Having stored the Free up Memory shared by backup file includes:
Judge whether first space is more than remaining space;The remaining space is the gross space of storage device In space in addition to the memory space;
When first space is more than the remaining space, the listed files information of storage file is obtained;
According to the listed files information, discharge shared by the minimum backup file of storage of the severity level Free up Memory.
Optionally, the listed files information is used to identify the severity level for having stored source file, described Listed files information includes the visitation frequency and creation time for having stored source file corresponding to backup file, It is described according to the listed files information, discharge shared by the minimum backup file of storage of the severity level Free up Memory include:
Obtain all visitation frequencies and creation time for having stored the source file corresponding to backup file;
According to it is described it is all stored backup file corresponding to source file access times and described all deposited The creation time of the source file corresponding to part file is laid in, determines the minimum backup of storage of the severity level File;
Discharge the minimum Free up Memory stored shared by backup file of the severity level.
Optionally, it is described according to it is described it is all stored backup file corresponding to source file access times and All creation times for having stored the source file corresponding to backup file, determine that the severity level is minimum The backup file of storage include:
As it is described it is all stored backup file corresponding to source file access times and described all stored The order arrangement incremented by successively of the creation time of source file corresponding to backup file is described all to have stored backup Source file corresponding to file, form source file sequence;
It is severity level that backup file mark will have been stored corresponding to preceding m source file in the source file sequence Minimum m have stored backup file, and the severity level minimum m has been stored shared by backup file Space is more than or equal to the difference of first space and the remaining space, and the m is to have been stored less than described The positive integer of backup file total number.
Optionally, it is described minimum according to first space and the memory space, release severity level Before having stored the Free up Memory shared by backup file, methods described also includes:
It is periodically detected the second space for having stored source file occupancy;
According to the second space and the gross space, the minimum storage of severity level described in forcible aborting is standby Part file.
Second aspect, there is provided a kind of terminal, the terminal include:
Acquisition module, the storage for obtaining the fileinfo of file to be stored and storage file has taken are empty Between, the fileinfo includes the first space that the file to be stored takes, and the storage file includes Store source file and store backup file;
Release module, for minimum according to first space and the memory space, release severity level The Free up Memory stored shared by backup file;
Memory module, for storing the file to be stored.
Optionally, the release module includes:
Judging unit, for judging whether first space is more than remaining space;The remaining space is to deposit Store up the space in addition to the memory space in the gross space of equipment;
Acquiring unit, when being more than the remaining space for first space, obtain the text of storage file Part list information;
Releasing unit, for according to the listed files information, discharging the minimum storage of the severity level Free up Memory shared by backup file.
Optionally, the listed files information is used to identify the severity level for having stored source file, described Listed files information includes the visitation frequency and creation time for having stored source file corresponding to backup file, The releasing unit includes:
Obtain subelement, for obtain all visitation frequencies for having stored the source file corresponding to backup file with Creation time;
Determination subelement, for according to it is described it is all stored backup file corresponding to source file access time Number and all creation times for having stored the source file corresponding to backup file, determine the severity level The minimum backup file of storage;
Discharge subelement, the release that has stored backup file shared by minimum for discharging the severity level Space.
Optionally, the determination subelement is specifically used for:
As it is described it is all stored backup file corresponding to source file access times and described all stored The order arrangement incremented by successively of the creation time of source file corresponding to backup file is described all to have stored backup Source file corresponding to file, form source file sequence;
It is severity level that backup file mark will have been stored corresponding to preceding m source file in the source file sequence Minimum m have stored backup file, and the severity level minimum m has been stored shared by backup file Space is more than or equal to the difference of first space and the remaining space, and the m is to have been stored less than described The positive integer of backup file total number.
Optionally, the terminal also includes:
Detection module, for being periodically detected the second space for having stored source file occupancy;
The release module is additionally operable to according to the second space and the gross space, important described in forcible aborting The minimum backup file of storage of rank.
The embodiments of the invention provide a kind of file memory method and terminal, first, obtains file to be stored The memory space that fileinfo and storage file take, fileinfo include that file to be stored takes One space, storage file is including having stored source file and having stored backup file;Afterwards, it is empty according to first Between and remaining space, the minimum Free up Memory stored shared by backup file of release severity level, residue Space is the space in the gross space of storage device in addition to memory space;Finally, in Free up Memory and In remaining space, file to be stored is stored.So, can according to the fileinfo of file to be stored and The memory space of storage file, the minimum backup file of storage of release severity level, and then store and treat Storage file, realize memory space and efficiently dynamically reclaim, can fully, effectively utilize memory space, So as to avoid the wasting phenomenon of memory space, more vital documents are finally stored and/or backed up.
Brief description of the drawings
Fig. 1 is a kind of file memory method flow chart provided in an embodiment of the present invention;
Fig. 2 is a kind of file access flow chart provided in an embodiment of the present invention;
Fig. 3 is a kind of flow chart in release busy space provided in an embodiment of the present invention;
Fig. 4 is the flow chart in another release busy space provided in an embodiment of the present invention;
Fig. 5 is another file memory method flow chart provided in an embodiment of the present invention;
Fig. 6 is a kind of terminal structure schematic diagram provided in an embodiment of the present invention;
Fig. 7 is another terminal structure schematic diagram provided in an embodiment of the present invention;
Fig. 8 is another terminal structure schematic diagram provided in an embodiment of the present invention;
Fig. 9 is other a kind of terminal structure schematic diagrames provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear Chu, it is fully described by.
Embodiment one
A kind of file backup method provided in an embodiment of the present invention, applied to terminal, the terminal include mobile phone, Notebook computer, tablet personal computer, LCD TV, game machine even include vehicle-mounted computer machine, as shown in figure 1, This method includes:
Step 101, obtain file to be stored fileinfo and storage file take memory space.
Here, fileinfo includes the first space that file to be stored takes, and storage file includes having stored Source file and backup file is stored.Wherein, stored source file refer to it is stored in storage device Source file;Backup file has been stored to refer to carry out secondary storage to the important source file that stored in storage device, Form the important backup file for having stored source file.Source file refers to that corresponding software and realization pair can be started Answer the file of function.Backup file is equivalent to the duplication to corresponding source file.
User can store source file by terminal access, when user has stored source file by terminal access, Terminal system finds that the source file of storage to be accessed can not read or be damaged, then terminal system can turn And access to have stored and backup file has been stored corresponding to the source file, so as to realize the access.Meanwhile terminal System can also store backup file to that can not read or the impaired source file that stored is repaiied using this It is multiple, so as to the access after user.
Example, as shown in Fig. 2 so that terminal access has stored source file as an example, the execution of terminal applies layer Process includes:
Step 1011, reading have stored source file.
Here, the application layer of terminal system is to have stored source file by the reading interface of system to read.
Step 1012, judgement have stored whether source file reads success, if so, then performing step 1015;It is no Then perform step 1013.
Step 1013, reading have stored backup file accordingly.
When terminal system finds that having stored source file can not successfully read, just go to read and this has stored source document Part has stored backup file accordingly.Specifically, it is to read to have stored from flash memory (Flash Memory) Source file and backup file is stored.
Step 1014, basis have stored backup file, and reparation has stored source file accordingly.
This has stored backup file and can not only read for terminal system, can also be to having stored source file accordingly Repaired, so as to reading afterwards.
What deserves to be explained is if when reading has stored source file exception, it is available to have stored backup file pair The reparation of source file has been stored, the reparation can also be placed under system idle condition and completed,
Step 1015, update the visitation frequency for having stored source file.
Storage source file-related information, such as visitation frequency are also deposited in storage device, whenever to having deposited Source of bank savings file read once, visitation frequency just add up 1.
What deserves to be explained is source file and backup file are stored in identical storage device, that is, it is stored in In memory space.Wherein, source file is visible to user;And it can be not for a user to back up file It is visible, it is only visible to the backstage of terminal system.
Here, file to be stored includes source file to be stored and backup file to be stored, here in two kinds of situation:
Situation one:File to be stored is source file to be stored.
When such case refers to create source file first, file to be stored is just source file to be stored.Show to deposit Storage equipment does not store the source file to be stored before, is ready for storing the source file to be stored now Into storage device.
Situation two:File to be stored is backup file to be stored.
On the one hand, illustrate that having stored source file has been stored in storage device, then and then or Source file is stored under predetermined condition to this to back up, i.e., file to be stored is backup file to be stored.
On the other hand, terminal system finds some important storage source file, and in memory space simultaneously Corresponding backup file is not found, then the storage source file that now terminal system will be important to this Backed up, file to be stored is just backup file.
Step 102, according to the first space and memory space, the minimum backup of storage of release severity level Free up Memory shared by file.
Specifically, as shown in figure 3, terminal according to the first space and memory space, release severity level is most The low Free up Memory stored shared by backup file includes:
Step 1021, judge whether the first space is more than remaining space;If so, then perform step 1022;It is no Then perform step 1024.
Here, remaining space is the space in the gross space of storage device in addition to memory space.
Step 1022, the listed files information for obtaining storage file.
Step 1023, according to listed files information, shared by the minimum backup file of storage of release severity level Free up Memory.
Step 1024, directly store file to be stored.
, it is necessary to judge whether the remaining space of storage device is enough before storage file to be stored, that is, need to compare Whether it is more than remaining space compared with the first space.
When the first space is less than or equal to remaining space, illustrate that the remaining space of storage device is enough to store The file to be stored, directly the file to be stored is stored in the storage device;
When the first space is more than remaining space, then shows that the remaining space of storage device is too small, do not store The file to be stored.Terminal system can perceive the situation in time, and can take a series of measure, So that the file to be stored is stored in storage device.Specifically, terminal system can delete weight in storage device Want the backup file of storage that rank is minimum, severity level is minimum has stored shared by backup file for release Free up Memory, so as to store the file to be stored.So, allow for depositing in storage device in a sense More more important and significant file is stored up, so as to be preferably user service.
Before the minimum Free up Memory stored shared by backup file of release severity level, it is necessary to from The minimum backup file of storage of severity level is identified in storage file, and has stored the important of backup file Rank is to depend on corresponding storage source file, when stored source file it is more important indicate that corresponding to The severity level for having stored backup file is higher.What deserves to be explained is can also be deposited in storage device and some The related listed files information such as file, this document list information be differentiate storage source file importance according to According to.
Judgement for storage source file importance is a process for carrying stronger subjective factor, also can be by User freely defines, and is to vary with each individual, may be with the close phase such as the personal profession of user, hobby, custom Close, the present embodiment does not limit.Preferably, in the present embodiment with to stored source file visitation frequency and The creation time for having stored source file is judgment basis.
Here, listed files information is used to identify the severity level for having stored source file, listed files packet Include the visitation frequency and creation time for having stored source file corresponding to backup file.Specifically, acquisition is all Store the visitation frequency and creation time of the source file corresponding to backup file;Backup text has been stored according to all The access times of source file corresponding to part and it is all stored the source file corresponding to backup file establishment when Between, determine the minimum backup file of storage of severity level;Discharge the minimum backup text of storage of severity level Free up Memory shared by part.
What deserves to be explained is in storage device, storage file includes having stored source file and having stored standby Part file, wherein, the total number for having stored source file is more than or equal to the total number for having stored backup file.
Specifically, as it is all stored backup file corresponding to source file access times and all stored The order arrangement incremented by successively of the creation time of source file corresponding to backup file is all to have stored backup file Corresponding source file, form source file sequence;It will be deposited corresponding to preceding m source file in source file sequence Deposit part file mark is that severity level minimum m has stored backup file, severity level minimum m The difference that the space shared by backup file is more than or equal to the first space and remaining space is stored, m is less than Store the positive integer of backup file total number.
After the minimum m of release severity level is individual has stored the space shared by backup file, the severity level is most The m low spaces stored shared by backup file and original remaining space collectively constitute new remaining space, Now, new remaining space is necessarily more than or equal to the first space.In other words, the minimum m of severity level The individual space stored shared by backup file is greater than or equal to the absolute value of the difference of the first space and remaining space, Memory space is enabled to store the file to be stored.It is what deserves to be explained is minimum when only discharging severity level M-1 stored the spaces shared by backup file after, new remaining space is still small as before release In the first space, i.e. the minimum m-1 of the severity level spaces stored shared by backup file are less than first The absolute value of the difference of space and remaining space, storage device can not store the file to be stored.
Step 103, storage file to be stored.
In Free up Memory and remaining space, the storage of file to be stored is completed, that is, stores file to be stored.
Before step 102, methods described also includes:It is periodically detected and has stored the second of source file occupancy Space;According to second space and gross space, the minimum backup file of storage of forcible aborting severity level.
Specifically, as shown in figure 4, terminal according to second space and gross space, forcible aborting severity level is most The low backup file of storage includes:
Step 1021 ', obtain second space and gross space.
Step 1022 ', calculate second space and account for the accounting of gross space.
Step 1023 ', judge whether accounting is more than predetermined threshold value;If so, then performing step 1024 ';Otherwise Perform step 1021 '.
Preferably, predetermined threshold value takes 50%.
Step 1024 ', obtain the minimum backup file of storage of severity level.
Here, the number for having stored backup file that acquired severity level is minimum is pre-set by user, Can be between 1 and to have stored the random natural number between backup file total number.
Step 1025 ', the minimum backup file of storage of release severity level.
Here, the minimum backup file of storage of severity level in release steps 1024 ' is refered in particular to.
After step 103, methods described also includes, the listed files information in the storage device that upgrades in time.
So, can according to the fileinfo of file to be stored and the memory space of storage file, The minimum backup file of storage of severity level is discharged, and then stores file to be stored, realizes memory space Efficiently dynamic reclaim, can fully, effectively utilize memory space, so as to avoid the wave of memory space Take phenomenon, finally store and/or back up more vital documents.
Embodiment two
The embodiment of the present invention provides a kind of file backup method, applied to terminal, it is assumed that with user U in terminal Exemplified by a certain important system file is created on T, the source file of the important system file is designated as in the present embodiment D, and the backup file of the important system file is designated as D '.As shown in figure 5, this method includes:
Step 201, T receive the request that U creates D.
First, U can send the request for creating D to T;Then, T is received by U and needs to create D's Request.These actions can be completed by U clicking operation and T inner working.
Step 202, T application layer calling system write interface.
In T inside, it is to write interface by system to store file, i.e., file is stored in depositing for T Store up in equipment.Specifically, T is to write interface by application layer calling system, write operation is realized.
Here, application layer be open system interconnection (Open Systems Interconnection reference, OSI layer 7), application layer are the applications communicated with other computers, are to apply journey The communication service of sequence.Wherein, osi model defines the standard of different computer interconnections, is design and description The basic framework of computer network communication.
Step 203, T calculate the space that D takes.
Calculate the space taken needed for D, that is, when calculating storage D, it is necessary to memory space be how many.
Step 204, T obtain the remaining space of storage device.
Meanwhile T can get the remaining space of own memory device automatically.Specifically, storage is obtained first The gross space of equipment;Then, the memory space shared by storage file is got;Finally, with total sky Between subtract memory space, the difference of gained is just the remaining space of storage device, what deserves to be explained is, Storage file not only includes having stored source file, in addition to has stored backup file, that is to say, that has stored Space includes having stored source file space-consuming and has stored backup file space-consuming.
Whether the space that step 205, T judge to take needed for D is more than the remaining space of storage device, if so, Then perform step 206;Otherwise step 207 is performed.
What severity level was minimum in step 206, T release storage devices has stored releasing shared by backup file Between emptying.
In this case, illustrate that the remaining space of T storage device not enough stores D.When T detects the shape During condition, can automatic start memory space reclaim mechanism, specifically, T can perform release storage device in it is important The minimum operation for having stored the Free up Memory shared by backup file of rank, that is, it is minimum to delete severity level Backup file has been stored, so as to obtain than more remaining spaces before release, has finally allowed to store D In T storage device.What deserves to be explained is delete the minimum side for having stored backup file of severity level Method can be each deletion 1, until new remaining space can store D.The number deleted every time also may be used Specified by user.
Step 207, T create D in storage device.
By in D storages and T storage device, that is to say, that create D in T storage device.Meanwhile D listed files information is formd in T storage device, on the one hand, this document list information includes using In the information of mark D significance level;On the other hand, this document list information also includes believing D index Breath, when needing to access D in order to U, T can quickly find D by index information.
Step 208, T store D ' in storage device.
Because D is important system file, so, it is necessary to its corresponding backup file after D is created D ' is stored.
What deserves to be explained is in practical operation, storage D ' can be carried out at once after D is created, It can will store D ' to be arranged in by T file system completion under system idle condition, the present embodiment is to the process It is not limited.
So, can according to the fileinfo of file to be stored and the memory space of storage file, The minimum backup file of storage of severity level is discharged, and then stores file to be stored, realizes memory space Efficiently dynamic reclaim, can fully, effectively utilize memory space, so as to avoid the wave of memory space Take phenomenon, finally store and/or back up more vital documents.
Embodiment three
A kind of terminal 30 provided in an embodiment of the present invention, as shown in fig. 6, the terminal 30 includes:
Acquisition module 301, for obtain file to be stored fileinfo and storage file take deposited Space is stored up, fileinfo includes the first space that file to be stored takes, and storage file includes storage source File and backup file is stored;
Release module 302, for minimum according to the first space and memory space, release severity level Store the Free up Memory shared by backup file;
Memory module 303, for storing file to be stored.
So, can according to the fileinfo of file to be stored and the memory space of storage file, The minimum backup file of storage of severity level is discharged, and then stores file to be stored, realizes memory space Efficiently dynamic reclaim, can fully, effectively utilize memory space, so as to avoid the wave of memory space Take phenomenon, finally store and/or back up more vital documents.
Specifically, as shown in fig. 7, release module 302 includes:
Judging unit 3021, for judging whether the first space is more than remaining space;Remaining space sets for storage Space in standby gross space in addition to memory space;
Acquiring unit 3022, when being more than remaining space for the first space, obtain the file row of storage file Table information;
Releasing unit 3023, for according to listed files information, the minimum backup of storage of release severity level Free up Memory shared by file.
Specifically, listed files information is used to identify the severity level for having stored source file, listed files Information includes having stored the visitation frequency and creation time of source file corresponding to backup file, as shown in figure 8, Releasing unit 3023 includes:
Subelement 30231 is obtained, for obtaining all access for having stored the source file corresponding to backup file The frequency and creation time;
Determination subelement 30232, for according to it is all stored backup file corresponding to source file access Number and all creation times for having stored the source file corresponding to backup file, determine that severity level is minimum Backup file is stored;
Discharge subelement 30233, for discharge severity level it is minimum stored releasing shared by backup file Between emptying.
Specifically, determination subelement 30232 is specifically used for:
As it is all stored backup file corresponding to source file access times and all stored backup file The order that the creation time of corresponding source file is incremented by successively arranges all stored corresponding to backup file Source file, form source file sequence;
It is minimum for severity level that backup file mark will have been stored corresponding to preceding m source file in source file sequence M stored backup file, minimum m spaces stored shared by backup file of severity level are more than Or equal to the first space and the difference of remaining space, m is less than the positive integer for having stored backup file total number.
Specifically, as shown in figure 9, the terminal 30 also includes:
Detection module 304, the second space of source file occupancy is stored for being periodically detected;
The release module 303 is additionally operable to minimum according to second space and gross space, forcible aborting severity level The backup file of storage.
In actual applications, the acquisition module 301, release module 302, memory module 303, detection mould Block 304, judging unit 3021, acquiring unit 3022, releasing unit 3023, obtain subelement 30231, Determination subelement 30232 and release subelement 30233 can be by the central processing units in terminal 30 (Central Processing Unit, CPU), microprocessor (Micro Processor Unit, MPU), number Word signal processor (Digital Signal Processor, DSP) or field programmable gate array (Field Programmable Gate Array, FPGA) etc. realize.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or meter Calculation machine program product.Therefore, the present invention can use hardware embodiment, software implementation or combine software and The form of the embodiment of hardware aspect.Moreover, the present invention can use wherein includes calculating in one or more The computer-usable storage medium of machine usable program code (includes but is not limited to magnetic disk storage and optical storage Device etc.) on the form of computer program product implemented.
The present invention is with reference to method according to embodiments of the present invention, equipment (system) and computer program product Flow chart and/or block diagram describe.It should be understood that can be by computer program instructions implementation process figure and/or side Each flow and/or square frame in block diagram and flow and/or the knot of square frame in flow chart and/or block diagram Close.Can provide these computer program instructions to all-purpose computer, special-purpose computer, Embedded Processor or The processor of other programmable data processing devices is to produce a machine so that by computer or other can The instruction of the computing device of programming data processing equipment is produced for realizing in one flow or multiple of flow chart The device for the function of being specified in one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices In the computer-readable memory to work in a specific way so that be stored in the computer-readable memory Instruction produces the manufacture for including command device, and the command device is realized in one flow of flow chart or multiple streams The function of being specified in one square frame of journey and/or block diagram or multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices, made Obtain and series of operation steps performed on computer or other programmable devices to produce computer implemented processing, So as to which the instruction performed on computer or other programmable devices is provided for realizing in one flow of flow chart Or specified in one square frame of multiple flows and/or block diagram or multiple square frames function the step of.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the protection model of the present invention Enclose.

Claims (10)

1. a kind of file memory method, it is characterised in that methods described includes:
Obtain the fileinfo of file to be stored and the memory space of storage file occupancy, the file are believed Breath includes the first space that the file to be stored takes, the storage file include having stored source file with Backup file is stored;
According to first space and the memory space, the minimum backup text of storage of release severity level Free up Memory shared by part;
Store the file to be stored.
2. according to the method for claim 1, it is characterised in that described according to first space and institute Memory space is stated, the minimum Free up Memory stored shared by backup file of release severity level includes:
Judge whether first space is more than remaining space;The remaining space is the gross space of storage device In space in addition to the memory space;
When first space is more than the remaining space, the listed files information of storage file is obtained;
According to the listed files information, discharge shared by the minimum backup file of storage of the severity level Free up Memory.
3. according to the method for claim 2, it is characterised in that the listed files information is used to identify The severity level for having stored source file, the listed files information have stored backup file pair including described The visitation frequency and creation time for the source file answered are described described heavy according to the listed files information, release The Free up Memory stored shared by backup file for wanting rank minimum includes:
Obtain all visitation frequencies and creation time for having stored the source file corresponding to backup file;
According to it is described it is all stored backup file corresponding to source file access times and described all deposited The creation time of the source file corresponding to part file is laid in, determines the minimum backup of storage of the severity level File;
Discharge the minimum Free up Memory stored shared by backup file of the severity level.
4. according to the method for claim 3, it is characterised in that it is described according to it is described it is all stored it is standby The access times of source file corresponding to part file and all source files stored corresponding to backup file Creation time, determine that the minimum backup file of storage of the severity level includes:
As it is described it is all stored backup file corresponding to source file access times and described all stored The order arrangement incremented by successively of the creation time of source file corresponding to backup file is described all to have stored backup Source file corresponding to file, form source file sequence;
It is severity level that backup file mark will have been stored corresponding to preceding m source file in the source file sequence Minimum m have stored backup file, and the severity level minimum m has been stored shared by backup file Space is more than or equal to the difference of first space and the remaining space, and the m is to have been stored less than described The positive integer of backup file total number.
5. according to the method described in any one of Claims 1-4, it is characterised in that described according to described One space and the memory space, the minimum release stored shared by backup file of release severity level Before space, methods described also includes:
It is periodically detected the second space for having stored source file occupancy;
According to the second space and the gross space, the minimum storage of severity level described in forcible aborting is standby Part file.
6. a kind of terminal, it is characterised in that the terminal includes:
Acquisition module, the storage for obtaining the fileinfo of file to be stored and storage file has taken are empty Between, the fileinfo includes the first space that the file to be stored takes, and the storage file includes Store source file and store backup file;
Release module, for minimum according to first space and the memory space, release severity level The Free up Memory stored shared by backup file;
Memory module, for storing the file to be stored.
7. terminal according to claim 6, it is characterised in that the release module includes:
Judging unit, for judging whether first space is more than remaining space;The remaining space is to deposit Store up the space in addition to the memory space in the gross space of equipment;
Acquiring unit, when being more than the remaining space for first space, obtain the text of storage file Part list information;
Releasing unit, for according to the listed files information, discharging the minimum storage of the severity level Free up Memory shared by backup file.
8. terminal according to claim 7, it is characterised in that the listed files information is used to identify The severity level for having stored source file, the listed files information have stored backup file pair including described The visitation frequency and creation time for the source file answered, the releasing unit include:
Obtain subelement, for obtain all visitation frequencies for having stored the source file corresponding to backup file with Creation time;
Determination subelement, for according to it is described it is all stored backup file corresponding to source file access time Number and all creation times for having stored the source file corresponding to backup file, determine the severity level The minimum backup file of storage;
Discharge subelement, the release that has stored backup file shared by minimum for discharging the severity level Space.
9. terminal according to claim 8, it is characterised in that the determination subelement is specifically used for:
As it is described it is all stored backup file corresponding to source file access times and described all stored The order arrangement incremented by successively of the creation time of source file corresponding to backup file is described all to have stored backup Source file corresponding to file, form source file sequence;
It is severity level that backup file mark will have been stored corresponding to preceding m source file in the source file sequence Minimum m have stored backup file, and the severity level minimum m has been stored shared by backup file Space is more than or equal to the difference of first space and the remaining space, and the m is to have been stored less than described The positive integer of backup file total number.
10. according to the terminal described in any one of claim 6 to 9, it is characterised in that the terminal is also wrapped Include:
Detection module, for being periodically detected the second space for having stored source file occupancy;
The release module is additionally operable to according to the second space and the gross space, important described in forcible aborting The minimum backup file of storage of rank.
CN201610529804.XA 2016-07-07 2016-07-07 A kind of file memory method and terminal Pending CN107590144A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610529804.XA CN107590144A (en) 2016-07-07 2016-07-07 A kind of file memory method and terminal
PCT/CN2017/071392 WO2018006587A1 (en) 2016-07-07 2017-01-17 File storage method, terminal, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610529804.XA CN107590144A (en) 2016-07-07 2016-07-07 A kind of file memory method and terminal

Publications (1)

Publication Number Publication Date
CN107590144A true CN107590144A (en) 2018-01-16

Family

ID=60901746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610529804.XA Pending CN107590144A (en) 2016-07-07 2016-07-07 A kind of file memory method and terminal

Country Status (2)

Country Link
CN (1) CN107590144A (en)
WO (1) WO2018006587A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108920344A (en) * 2018-05-11 2018-11-30 南京南瑞继保电气有限公司 A kind of storage method and equipment, computer readable storage medium
CN109274548A (en) * 2018-08-22 2019-01-25 平安普惠企业管理有限公司 A kind of method for monitoring application program, computer readable storage medium and terminal device
CN110209502A (en) * 2019-06-05 2019-09-06 北京奇艺世纪科技有限公司 A kind of information storage means, device, electronic equipment and storage medium
CN110275870A (en) * 2019-05-22 2019-09-24 深圳壹账通智能科技有限公司 Management method, device, computer equipment and the storage medium of cache file

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181630A (en) * 2019-07-05 2021-01-05 银河水滴科技(北京)有限公司 Data storage method, data storage equipment and computer readable storage medium
CN112765099A (en) * 2021-01-25 2021-05-07 中车大连机车研究所有限公司 Data file processing method and processing device
CN113010551B (en) * 2021-03-02 2022-05-10 北京三快在线科技有限公司 Resource caching method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101620570B (en) * 2008-10-31 2011-05-18 深圳市德名利电子有限公司 Memory module dynamic backup management system and method therefor
CN101909068A (en) * 2009-06-02 2010-12-08 华为技术有限公司 Method, device and system for managing file copies
CN101714063A (en) * 2009-12-02 2010-05-26 苏州互盟信息存储技术有限公司 Data storage device and method
JP2011145838A (en) * 2010-01-13 2011-07-28 Toshiba Corp Storage device management device and method for managing storage device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108920344A (en) * 2018-05-11 2018-11-30 南京南瑞继保电气有限公司 A kind of storage method and equipment, computer readable storage medium
CN108920344B (en) * 2018-05-11 2021-11-12 南京南瑞继保电气有限公司 Storage method and device and computer readable storage medium
CN109274548A (en) * 2018-08-22 2019-01-25 平安普惠企业管理有限公司 A kind of method for monitoring application program, computer readable storage medium and terminal device
CN110275870A (en) * 2019-05-22 2019-09-24 深圳壹账通智能科技有限公司 Management method, device, computer equipment and the storage medium of cache file
WO2020233046A1 (en) * 2019-05-22 2020-11-26 深圳壹账通智能科技有限公司 Cache file management method and apparatus, computer device, and storage medium
CN110209502A (en) * 2019-06-05 2019-09-06 北京奇艺世纪科技有限公司 A kind of information storage means, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2018006587A1 (en) 2018-01-11

Similar Documents

Publication Publication Date Title
CN107590144A (en) A kind of file memory method and terminal
CN103810020B (en) Virtual machine elastic telescopic method and device
CN107395665A (en) A kind of block chain service handling and business common recognition method and device
CN107832100B (en) APK plug-in loading method and terminal thereof
CN108063818B (en) Data downloading method, device, terminal and computer readable storage medium
CN109656627A (en) Starting method, activation system and the relevant apparatus of hard disk in a kind of BIOS
CN104461706B (en) A kind of method and multiprocessing device that shared global variable is shared
CN109040191A (en) Document down loading method, device, computer equipment and storage medium
US20240168921A1 (en) File processing method, apparatus and device, and readable storage medium
CN106649146A (en) Memory release method and apparatus
CN109150642A (en) Application memory error-detecting method, detection device and storage medium
CN105657049A (en) Incremental data synchronization method and device and mobile terminal
CN110262878A (en) Timed task processing method, device, equipment and computer readable storage medium
CN106557308A (en) A kind of software continuous integrated approach and device
CN104216792B (en) The method and memory database storage engines of data backup
CN108376110A (en) A kind of automatic testing method, system and terminal device
CN108196972A (en) A kind of restorative procedure of application software, device, terminal and storage medium
CN103123651A (en) Method of rapidly searching multiple same-kind paper, device and mobile equipment
CN109947712A (en) Automatically merge method, system, equipment and the medium of file in Computational frame
CN104375896A (en) Information processing method and electronic equipment
CN113419672A (en) Storage capacity management method, system and storage medium
CN108205559B (en) Data management method and equipment thereof
CN106527979B (en) Data migration method and device
CN106933702A (en) A kind of method of intelligent terminal storage space management, device and intelligent terminal
CN108287761A (en) Method for recovering internal storage and device, terminal device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180116