CN105740425A - File storage method and apparatus - Google Patents

File storage method and apparatus Download PDF

Info

Publication number
CN105740425A
CN105740425A CN201610066500.4A CN201610066500A CN105740425A CN 105740425 A CN105740425 A CN 105740425A CN 201610066500 A CN201610066500 A CN 201610066500A CN 105740425 A CN105740425 A CN 105740425A
Authority
CN
China
Prior art keywords
file
store path
storage
write operation
relative
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
CN201610066500.4A
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.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201610066500.4A priority Critical patent/CN105740425A/en
Publication of CN105740425A publication Critical patent/CN105740425A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1737Details of further file system functions for reducing power consumption or coping with limited storage space, e.g. in mobile devices

Landscapes

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

Abstract

Embodiments of the present invention disclose a file storage method. The method comprises: detecting a file write operation, and acquiring a file size and a file type that correspond to the file write operation; when the file size is greater than or equal to a threshold, setting a root storage path of a file corresponding the file write operation as a preset peripheral storage device; acquiring a preset relative storage path corresponding to the file type; and writing the file according to the root storage path and the relative storage path. Furthermore, the embodiments of the present invention correspondingly disclose a file storage apparatus. With adoption of the method and apparatus disclosed by the present invention, files that occupy a relatively large storage space can be stored into the peripheral storage device of a terminal, so as to save the memory space of terminal, and improve effective utilization of the storage space of the terminal.

Description

The method of a kind of file storage and device
Technical field
The present invention relates to field of computer technology, particularly relate to method and the device of the storage of a kind of file.
Background technology
Along with the development of terminal technology, function integrated on smart mobile phone and other mobile terminals gets more and more, and downloads application program and the file downloaded in the process using application program, is required for storage in the terminal.
In general, the file storage location of the mobile terminal such as mobile phone is divided into internal storage space (such as mobile phone EMS memory) and external memory space (such as SD card).For mobile phone EMS memory, its memory space is very limited, and it is generally much smaller than external memory space, and perfect along with cell phone system, internal memory shared by preloaded system is also increasing, it is more not enough that this has resulted in original very limited mobile phone EMS memory space size, and result in user needs regularly to go to delete partial information or file, this be accomplished by user's timing go carry out cleaning operation;Or user can be manual file is dumped in SD card, but the process of unloading is loaded down with trivial details and download file store path user is also likely to be the unknown, which results in the inconvenience of file unloading.
Therefore, in conventional art, the mobile terminal such as mobile phone is downloaded the storage method of file to result in the effective rate of utilization of phone memory not enough.
Summary of the invention
Based on this, for mobile terminals such as the mobile phones in solution conventional art because the technical problem of the effective rate of utilization deficiency of the phone memory that mobile phone EMS memory is limited and the storage method of download file causes, spy proposes the method for a kind of file storage.
A kind of method of file storage, including:
Detection file write operation, obtains file size corresponding to described file write operation and file type;
When described file size is more than or equal to threshold value, the root store path of file corresponding for described file write operation is set to the peripheral hardware storage device preset;
Obtain the relative store path preset that described file type is corresponding;
File is write with described relative store path according to described store path.
Wherein in an embodiment, also include after file size that the described file write operation of described acquisition is corresponding and the step of file type: when described file size is less than described threshold value, the root store path of file corresponding for described file write operation is set to the terminal inner memory area preset, performs the step of the relative store path preset corresponding to the described file type of described acquisition.
Wherein in an embodiment, also include after file size that the described file write operation of described acquisition is corresponding and the step of file type: obtain the residual memory space size of described terminal inner memory area, judge that described file size is whether more than the residual memory space size of described terminal inner memory area, if, then the root store path of file corresponding for described file write operation is set to described default terminal inner memory area, performs the step of the relative store path preset corresponding to the described file type of described acquisition.
Wherein in an embodiment, described method also includes:
Obtaining file unloading instruction, the root store path of the file that described file unloading instruction is corresponding is terminal inner memory area;
Obtain the relative store path of target that the relative store path of file corresponding to described file unloading instruction is corresponding;
With described peripheral hardware storage device for root store path, for the purpose of store path, store position in conjunction with described target and move the file that described file unloading instruction is corresponding.
Wherein in an embodiment, described file type includes at least one in video, audio frequency and picture.
Wherein in an embodiment, described file write operation includes receiving file by network, storage device write operation when being generated file by the incoming file of I/O equipment and/or application.
Wherein in an embodiment, also include before the described step writing file according to described store path with described relative store path: generating file write prompting message according to described file and described store path, described relative store path and show, described file write message is for pointing out the storage address of file described in user;Detection user writes the confirmation instruction of prompting message input for described file, performs described to write file according to described store path and described relative store path.
Additionally, for mobile terminals such as the mobile phones in solution conventional art because the technical problem of the effective rate of utilization deficiency of the phone memory that mobile phone EMS memory is limited and the storage method of download file causes, spy proposes the device of a kind of file storage.
A kind of device of file storage, including:
Write operation detection module, is used for detecting file write operation, obtains file size corresponding to described file write operation and file type;
First store path arranges module, for when described file size is more than or equal to threshold value, the root store path of file corresponding for described file write operation being set to the peripheral hardware storage device preset;
Relative store path acquisition module, the relative store path preset corresponding for obtaining described file type;
File writing module, for writing file according to described store path with described relative store path.
Wherein in an embodiment, described device also includes second store path and arranges module, for when described file size is less than described threshold value, the root store path of file corresponding for described file write operation is set to the terminal inner memory area preset, calls described relative store path acquisition module.
Wherein in an embodiment, described device also includes residual memory space size judge module, for: obtain the residual memory space size of described terminal inner memory area, judge that described file size is whether more than the residual memory space size of described terminal inner memory area, when described file size is more than the residual memory space size of described terminal inner memory area, then the root store path of file corresponding for described file write operation is set to described default terminal inner memory area, calls described relative store path acquisition module.
Wherein in an embodiment, described device also includes file unloading module, is used for:
Obtaining file unloading instruction, the root store path of the file that described file unloading instruction is corresponding is terminal inner memory area;
Obtain the relative store path of target that the relative store path of file corresponding to described file unloading instruction is corresponding;
With described peripheral hardware storage device for root store path, for the purpose of store path, store position in conjunction with described target and move the file that described file unloading instruction is corresponding.
Wherein in an embodiment, described file type includes at least one in video, audio frequency and picture.
Wherein in an embodiment, described file write operation includes receiving file by network, storage device write operation when being generated file by the incoming file of I/O equipment and/or application.
Wherein in an embodiment, described device also includes file write reminding module, for: generating file write prompting message according to described file and described store path, described relative store path and show, described file write message is for pointing out the storage address of file described in user;Detection user writes the confirmation instruction of prompting message input for described file, calls described file writing module.
Implement the embodiment of the present invention, will have the advantages that
After have employed the method and apparatus of above-mentioned file storage, terminal is when downloading file or generation file etc. and needing storage file, terminal peripheral hardware storage device is stored by taking the bigger file of memory space according to file size, in the internal memory of terminal, only storage takies the file that memory space is less, than the storage method directly All Files being stored directly in conventional art in tag memory, adopt the present invention, download file taking tag memory can be reduced, thus saving the memory space of tag memory, and the file bigger owing to employing the peripheral hardware storage device storages such as terminal SD card, improve the effective rate of utilization of terminal storage space.
Further, in concrete storing process, the file type of the file stored as required determines corresponding store path, that is, same type of file is stored in same file folder, thus facilitating user, file and file being managed, adding the convenience of follow-up file management (lookup of such as file, deletion and unloading), improving Consumer's Experience.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, the accompanying drawing used required in embodiment or description of the prior art will be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Wherein:
Fig. 1 is the schematic flow sheet of the method for a kind of file storage in an embodiment;
Fig. 2 is the schematic flow sheet of a kind of method of file unloading in an embodiment;
Fig. 3 is the structural representation of the device of a kind of file storage in an embodiment;
Fig. 4 is the structural representation of the computer equipment of the method running aforementioned document storage in an embodiment.
Detailed description of the invention
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 clearly and completely described, it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under not making creative work premise, broadly fall into the scope of protection of the invention.
For mobile terminals such as the mobile phones in solution conventional art because the technical problem of the effective rate of utilization deficiency of the phone memory that mobile phone EMS memory is limited and the storage method of download file causes, spy proposes the method for a kind of file storage.The realization of the method can be dependent on computer program, and this computer program can run on the computer system based on von Neumann system.This computer program can be the application program of the application program of file download application or file management application.This computer system can be run the such as intelligent terminal such as smart mobile phone, panel computer of above computer program.
Concrete, as it is shown in figure 1, the method for above-mentioned file storage comprises the steps:
Step S102: detection file write operation, obtains file size corresponding to described file write operation and file type.
File write operation is that file or data are write hard disk or the operation being saved in internal memory by terminal CPU, detect when other devices in the incoming file of external equipment or terminal send or generate file at terminal CPU, terminal CPU can receive file write instruction, namely being equivalent to trigger file write operation, now terminal can detect the write operation of above-mentioned file.
Further, in the present embodiment, file write operation include receiving file by network, storage device write operation when being generated file by the incoming file of I/O equipment and/or application.
Concrete, terminal downloads file by the application foradownloaded video on network or terminal, song etc., and namely the download of this download file is equivalent to trigger file write operation;Again such as, terminal CPU detects by other equipment by input/output end port (I/O) incoming file, then this incoming file is written in the equipment specified by I/O equipment, in this process, the incoming file of I/O equipment detected namely be equivalent to detect the file write operation of this incoming file;Again such as, in terminal, mounted application program can generate history file or other cache files etc. in the process used, these files are also required to store in terminal, as, install and the WeChat software on mobile phone, the historical data of chat record can be generated with good friend when user chats, this historical data can be saved in mobile phone, therefore, when user uses above-mentioned WeChat application to produce historical data, the CPU of terminal needs this history data store in the storage device of terminal, namely CPU is when the file generated of above-mentioned historical data being detected, also correspond to detect the file write operation of the file corresponding to above-mentioned historical data.
When file write operation being detected, obtain the relevant information carried in this operational order, for instance the information such as the filename of file to be written, file size, file type, namely obtain filename corresponding to above-mentioned file write operation, file size, file type etc..
Such as, file type includes at least one in video, audio frequency and picture.Concrete, for mobile phone, main storage file, except the program file of system and application program, is mainly the photograph/picture etc. of video, audio frequency and the shooting/reception downloaded.In the present embodiment, file type can obtain according to file extension, for instance, the file of file extent " .mp4 " by name is video file, and the file of file extent " .jpg " by name is picture file.
In the present embodiment, for needing the file size of file of storage to carry out anticipation, for the memory space shared by file bigger time, this document is written in the SD card of terminal, rather than is stored in that terminal is limited and in valuable internal storage space.Concrete operation is referring to step S104 and step S106.
Step S104: when described file size is more than or equal to threshold value, is set to the peripheral hardware storage device preset by the root store path of file corresponding for described file write operation.
Step S106: when described file size is less than described threshold value, is set to the terminal inner memory area preset by the root store path of file corresponding for described file write operation.
Above-mentioned threshold value is the value arranged previously according to mobile phone EMS memory, and the storage position being used for defining file to be written is terminal inner memory area or peripheral hardware storage device.For example, it is possible to above-mentioned threshold value is set to 5MB, say, that when the file size of file to be written is more than or equal to 5MB, this document is stored in the peripheral hardware storage device of terminal, namely in SD card;When file size is less than 5MB, directly this document is stored in the internal storage areas of terminal, namely in internal memory.
Root store path refers to path or the catalogue of the most upper level in file storage path.Such as, when file is stored in the memory area that C dish is corresponding, the root store path of its correspondence be " C: ".In the present embodiment, the root store path of the mobile terminals such as smart mobile phone is broadly divided into terminal inner memory area (i.e. internal memory) and the peripheral hardware storage device (i.e. SD card) preset, if being called C dish and D dish, then corresponding root store path is " C: " and " D: ".
As it was previously stated, when the file size of file to be written is more than or equal to 5MB, be SD card by root store path equipment, namely " D: ";When the file size of file to be written is less than 5MB, root store path is set to internal memory, namely C: ".
It should be noted that in the present embodiment, arranging of threshold value can also be arranged according to file type, for instance, 5MB is a bigger value for picture file, but for video file, 5MB is sized to a less value.Concrete, after step s 102, this method also includes: obtain the storage threshold value corresponding with described file type, and step S104 particularly as follows: when the storage threshold value that described file size is corresponding more than or equal to described and described file type, be set to the peripheral hardware storage device preset by the root store path of file corresponding for described file write operation;Step S106 particularly as follows: when the storage threshold value that described file size is corresponding less than described and described file type, be set to the terminal inner memory area preset by the root store path of file corresponding for described file write operation.
In being embodied as, it is possible to arranging the file type storage threshold value corresponding with picture is 0.5MB, the file type storage threshold value corresponding with video file is 10MB, and the file type storage threshold value corresponding with audio file is 3MB, and the storage threshold value of alternative document type is 5MB.It should be noted that the setting of above-mentioned threshold value or the storage threshold value corresponding with file type, it is possible to being the default setting of system, user can also be configured according to the memory headroom size of terminal and user's request or revise.
Also, it should be noted be written in the process of disk being written into file, it is also possible to the phenomenon that the remaining space of disk is not enough occurs, therefore, in the present embodiment, when arranging the root store path of file to be written, in addition it is also necessary to the residual memory space of consideration disk corresponding to root store path.
Concrete, in one embodiment, in step s 102, after obtaining the step of file size corresponding to described file write operation and file type, before step S104 and step S106 arranges the step of root store path of file to be written, this method also includes: obtain the residual memory space size of described terminal inner memory area, it is judged that whether described file size is more than the residual memory space size of described terminal inner memory area;If so, then the root store path of file corresponding for described file write operation is set to described default terminal inner memory area, performs the step of the relative store path preset corresponding to the described file type of described acquisition.
That is, when the file size that needs store is more than the residual memory space size of terminal inner memory area, do not consider further that the file size to file to be written in step S104 and S106, directly the root store path of this document is set to the peripheral hardware storage device preset.It addition, when above-mentioned file size is less than or equal to the residual memory space size of terminal inner memory area, in addition it is also necessary to whether file size is exceeded threshold value and accounts for, namely perform step S104 or S106.
It should be noted that, in the consideration of the residual memory space of the disk corresponding to root store path, that be much larger than the memory space of tag memory in general due to the memory space of terminal peripheral hardware storage device and can carry out upgrading or dilatation, if file to be written is because the reason of file size cannot complete the write operation in terminal peripheral hardware storage device, it generally also can be failed in the write operation of tag memory, now unsuccessfully also imply that the memory space taken required for this document is also bigger in the write of terminal peripheral hardware storage device, therefore, in the present embodiment, only consider that whether the file size of file to be written is more than terminal inner memory area.
Step S108: obtain the relative store path preset that described file type is corresponding.
Relative store path refers to that file clips to the path of this document process from the file at root store path place, such as, be stored in the file " 123.jpg " under the WeChatfile in the programfiles file in C dish, its storage address be: C: programfiles WeChatfile;To file " 123.jpg ", its root store path be " C: ", relative store path is " programfiles WeChatfile ".
In the present embodiment, in order to facilitate user to carry out file management, the file that user downloads is classified according to file type, and is stored in the file corresponding with file type, such as, file type is that the All Files of video file is stored in the file corresponding with video file type.In the internal storage areas and peripheral hardware storage device of terminal, create corresponding file according to file type, such as video file folder, Photo folder etc..
In this step, according to the file type that file write operation is corresponding, default file type with in the corresponding relation of relative store path, search the relative store path corresponding with this document type, this relative store path be this file to be written target storage address in relative store path.
Step S110: write file with described relative store path according to described store path.
Concrete, the storage address of file is made up of with relative store path root store path, when root store path all obtains with relative store path, it is possible to what obtain this document specifically stores address.Such as, the root store path obtained in step S104 or step S106 be " D: " and what obtain in step S108 is " musicfile " with store path, then the storage address of this document or writing address are: D: musicfile.According to this storage address or writing address, file corresponding for the file write operations detected in step S102 write this address, or the file detected in step S102 is saved in this address.
In one embodiment of the invention, optional step also includes: in step S110: also include before writing file according to described store path and described relative store path: generating file write prompting message according to described file and described store path, described relative store path and show, described file write message is for pointing out the storage address of file described in user;Detection user writes the confirmation instruction of prompting message input for described file, performs step S110: write file according to described store path with described relative store path.
Concrete, preserve or before file write at file, the address that this document is about to write is showed user, finally store address with what point out user's this document.It is to say, obtain the storage address of this document according to described store path of file, described relative store path, and generate file write prompting message.Such as, this document write prompting message can be: file 123.jpg is saved in C: picturefile.
Further, before step S110, namely before file write, it is necessary to user confirms, only just performs the write operation of file after user confirms, namely just performs above-mentioned steps S110 after the confirmation instruction that user inputs being detected.
Concrete, write the displaying interface of prompting message at above-mentioned file, user writes prompting message for above-mentioned file, clicks " confirmation " button shown on interface, or input the operation corresponding with confirming instruction, be namely equivalent to input such as corresponding with file write information confirmation instruction.
Above-mentioned steps S102 to step S110, make terminal in the process downloading file or file write, as far as possible few occupy the memory headroom that terminal is limited, bigger file is stored in the peripheral hardware storage device of terminal, because the memory space of peripheral hardware storage device is generally larger than the memory space of tag memory, and can carry out upgrading (such as, change the SD card of bigger memory space, or increase a SD card to increase memory space), but the memory space of tag memory or it is possible that the phenomenon of deficiency, at this moment, it is accomplished by user deleted by the file in internal memory or be transferred to peripheral hardware storage device.
Concrete, as in figure 2 it is shown, a kind of method that Fig. 2 illustrates file unloading, specifically include following steps:
Step S202: obtaining file unloading instruction, the root store path of the file that described file unloading instruction is corresponding is terminal inner memory area.
File unloading instruction is the unloading instruction that user is inputted for certain file by terminal, it is intended to be changed storage address or the storage position of this document, in the present embodiment, refer in particular in the peripheral hardware storage device that the file that will be stored in terminal inner memory area (i.e. tag memory) dumps to terminal, namely treat unloading file be terminal inner memory area with store path, namely treat that the file of unloading is the file being stored in tag memory.
It should be noted that in the present embodiment, the file corresponding with above-mentioned file unloading instruction can be the file of any file type of video file or picture file or other, it is also possible to is file, for instance is stored in the video file folder in tag memory.
Step S204: obtain the relative store path of target that the relative store path of file corresponding to described file unloading instruction is corresponding.
Step S206: with described peripheral hardware storage device for root store path, stores position for the purpose of store path in conjunction with described target and moves the file that described file unloading instruction is corresponding.
Namely the file corresponding with file unloading instruction treat unloading file, and the relative store path of this document is the relative store path corresponding with root store path in the storage address of this document.Such as, treat that the storage address of unloading file is: C: videofiles, then the relatively storage address of this document is: videofiles.
In the present embodiment, in the internal storage areas and peripheral hardware storage device of terminal, it is respectively created identical or corresponding file, in the internal memory of mobile phone and SD card, is namely respectively created identical or corresponding file.Such as, be respectively created in internal memory and SD card storage video file video file folder, and arrange its relative store path be videofiles.Again such as, create in internal memory the video file folder of storage video file for videofiles, video file in SD card folder be TVshowfiles.
In being embodied as, terminal is carrying out when the unloading of unloading file, directly will treat that unloading file is transferred to treat the corresponding folder in the SD card that unloading file file at place in internal memory is corresponding with this in internal memory.As it was previously stated, the corresponding file file in the videofiles file in internal memory being transferred in SD card: videofiles file.
Therefore after getting the relative store path treating unloading file, obtaining the relative store path in the SD card that store path relative to this is corresponding is the relative store path of target, and this target is this relative store path treating that unloading file stores in SD card relative to store path.Namely treat that the purpose storage position of unloading file unloading is root store path by with peripheral hardware storage device, forms for root store path with the relative store path of target.Store position according to above-mentioned purpose and file unloading instruction will treat that unloading file carries out unloading.
It should be noted that, above-mentioned steps S202 is the method for the peripheral hardware storage device that the file in terminal inner memory area or file dump to terminal to the method for the file unloading described in step S206, otherwise, the file dump method that the file of storage in terminal peripheral hardware storage device dumps in terminal inner memory area can also similar be processed, but in general, the internal storage areas of terminal is limited, for a user, it is typically all and the file in terminal inner memory area is deleted or unloading is to save terminal inner memory area, and the file that seldom will be stored in the peripheral hardware storage devices such as SD card dumps to terminal inner memory area.
In addition, for solving the mobile terminals such as mobile phone in conventional art because mobile phone EMS memory is limited and downloads the technical problem that the effective rate of utilization of the phone memory that the storage method of file causes is not enough, in one embodiment, as shown in Figure 3, spy proposes the device of a kind of file storage, including 102, first store path of write operation detection module, module 104, relative store path acquisition module 106 and file writing module 108 are set, wherein:
Write operation detection module 102, is used for detecting file write operation, obtains file size corresponding to described file write operation and file type;
First store path arranges module 104, for when described file size is more than or equal to threshold value, the root store path of file corresponding for described file write operation being set to the peripheral hardware storage device preset;
Relative store path acquisition module 106, the relative store path preset corresponding for obtaining described file type;
File writing module 108, for writing file according to described store path with described relative store path.
Wherein in an embodiment, as shown in Figure 3, said apparatus also includes second store path and arranges module 110, for when described file size is less than described threshold value, the root store path of file corresponding for described file write operation is set to the terminal inner memory area preset, calls described relative store path acquisition module 106.
Wherein in an embodiment, as it is shown on figure 3, said apparatus also includes residual memory space size judge module 112, it is used for:
Obtain the residual memory space size of described terminal inner memory area, judge that described file size is whether more than the residual memory space size of described terminal inner memory area, when described file size is more than the residual memory space size of described terminal inner memory area, then the root store path of file corresponding for described file write operation is set to described default terminal inner memory area, calls described relative store path acquisition module 106.
Wherein in an embodiment, as it is shown on figure 3, said apparatus also includes file unloading module 114, it is used for: obtaining file unloading instruction, the root store path of the file that described file unloading instruction is corresponding is terminal inner memory area;Obtain the relative store path of target that the relative store path of file corresponding to described file unloading instruction is corresponding;With described peripheral hardware storage device for root store path, for the purpose of store path, store position in conjunction with described literary composition target and move the file that described file unloading instruction is corresponding.
Wherein in an embodiment, described file type includes at least one in video, audio frequency and picture.
Wherein in an embodiment, described file write operation includes receiving file by network, storage device write operation when being generated file by the incoming file of I/O equipment and/or application.
Wherein in an embodiment, as shown in Figure 3, said apparatus also includes file write reminding module 116, for: generating file write prompting message according to described file and described store path, described relative store path and show, described file write message is for pointing out the storage address of file described in user;Detection user writes the confirmation instruction of prompting message input for described file, calls described file writing module.
Implement the embodiment of the present invention, will have the advantages that
After have employed the method and apparatus of above-mentioned file storage, terminal is when downloading file or generation file etc. and needing storage file, terminal peripheral hardware storage device is stored by taking the bigger file of memory space according to file size, in the internal memory of terminal, only storage takies the file that memory space is less, than the storage method directly All Files being stored directly in conventional art in tag memory, adopt the present invention, download file taking tag memory can be reduced, thus saving the memory space of tag memory, and the file bigger owing to employing the peripheral hardware storage device storages such as terminal SD card, improve the effective rate of utilization of terminal storage space.
Further, in concrete storing process, the file type of the file stored as required determines corresponding store path, that is, same type of file is stored in same file folder, thus facilitating user, file and file being managed, adding the convenience of follow-up file management (lookup of such as file, deletion and unloading), improving Consumer's Experience.
In one embodiment, as shown in Figure 4, Fig. 4 illustrates the terminal of the computer system based on von Neumann system of a kind of method running the storage of above-mentioned file.This computer system can be the mobile terminal device such as smart mobile phone, panel computer.Concrete, it may include by outer input interface 1001, processor 1002, memorizer 1003 and output interface 1004 that system bus connects.Wherein, outer input interface 1001 optionally can at least include network interface 10012.Memorizer 1003 can include external memory 10032 (such as hard disk, CD or floppy disk etc.) and built-in storage 10034.Output interface 1004 can at least include display screen 10042 equipment such as grade.
In the present embodiment, the operation of this method is based on computer program, the program file of this computer program is stored in the external memory 10032 of the aforementioned computer system based on von Neumann system, operationally it is loaded in built-in storage 10034, then it is transferred in processor 1002 after being compiled as machine code and performs, so that computer system based on von Neumann system forms write operation detection module 102 in logic, first store path arranges module 104, relative store path acquisition module 106, file writing module 108, second store path arranges module 110, file unloading module 112 and file write reminding module 114.And in the method execution process that above-mentioned file stores, the parameter of input receives each through outer input interface 1001, and it is transferred to buffer memory in memorizer 1003, it is then input in processor 1002 process, the result data or be cached in memorizer 1003 processed subsequently processes, or is passed to output interface 1004 and exports.
Above disclosed it is only present pre-ferred embodiments, certainly can not limit the interest field of the present invention, the equivalent variations therefore made according to the claims in the present invention with this, still belong to the scope that the present invention contains.

Claims (14)

1. the method for a file storage, it is characterised in that including:
Detection file write operation, obtains file size corresponding to described file write operation and file type;
When described file size is more than or equal to threshold value, the root store path of file corresponding for described file write operation is set to the peripheral hardware storage device preset;
Obtain the relative store path preset that described file type is corresponding;
File is write with described relative store path according to described store path.
2. the method for file according to claim 1 storage, it is characterised in that also include after file size that the described file write operation of described acquisition is corresponding and the step of file type:
When described file size is less than described threshold value, the root store path of file corresponding for described file write operation is set to the terminal inner memory area preset, performs the step of the relative store path preset corresponding to the described file type of described acquisition.
3. the method for file according to claim 2 storage, it is characterised in that also include after file size that the described file write operation of described acquisition is corresponding and the step of file type:
Obtain the residual memory space size of described terminal inner memory area, judge that described file size is whether more than the residual memory space size of described terminal inner memory area, if, then the root store path of file corresponding for described file write operation is set to described default terminal inner memory area, performs the step of the relative store path preset corresponding to the described file type of described acquisition.
4. the method for file according to claim 1 storage, it is characterised in that described method also includes:
Obtaining file unloading instruction, the root store path of the file that described file unloading instruction is corresponding is terminal inner memory area;
Obtain the relative store path of target that the relative store path of file corresponding to described file unloading instruction is corresponding;
With described peripheral hardware storage device for root store path, for the purpose of store path, store position in conjunction with described target and move the file that described file unloading instruction is corresponding.
5. the method according to described file storage arbitrary in Claims 1-4, it is characterised in that described file type includes at least one in video, audio frequency and picture.
6. the method according to described file storage arbitrary in Claims 1-4, it is characterised in that described file write operation includes receiving file by network, storage device write operation when being generated file by the incoming file of I/O equipment and/or application.
7. the method for file according to claim 1 storage, it is characterised in that also include before the described step writing file according to described store path with described relative store path:
Generating file write prompting message according to described file and described store path, described relative store path and show, described file write message is for pointing out the storage address of file described in user;
Detection user writes the confirmation instruction of prompting message input for described file, performs described to write file according to described store path and described relative store path.
8. the device of a file storage, it is characterised in that including:
Write operation detection module, is used for detecting file write operation, obtains file size corresponding to described file write operation and file type;
First store path arranges module, for when described file size is more than or equal to threshold value, the root store path of file corresponding for described file write operation being set to the peripheral hardware storage device preset;
Relative store path acquisition module, the relative store path preset corresponding for obtaining described file type;
File writing module, for writing file according to described store path with described relative store path.
9. the device of file according to claim 8 storage, it is characterized in that, described device also includes second store path and arranges module, for when described file size is less than described threshold value, the root store path of file corresponding for described file write operation is set to the terminal inner memory area preset, calls described relative store path acquisition module.
10. the device of file according to claim 9 storage, it is characterised in that described device also includes residual memory space size judge module, is used for:
Obtain the residual memory space size of described terminal inner memory area, judge that described file size is whether more than the residual memory space size of described terminal inner memory area, when described file size is more than the residual memory space size of described terminal inner memory area, then the root store path of file corresponding for described file write operation is set to described default terminal inner memory area, calls described relative store path acquisition module.
11. the device of file according to claim 8 storage, it is characterised in that described device also includes file unloading module, is used for:
Obtaining file unloading instruction, the root store path of the file that described file unloading instruction is corresponding is terminal inner memory area;
Obtain the relative store path of target that the relative store path of file corresponding to described file unloading instruction is corresponding;
With described peripheral hardware storage device for root store path, for the purpose of store path, store position in conjunction with described target and move the file that described file unloading instruction is corresponding.
12. according to Claim 8 to the device of described file storage arbitrary in 11, it is characterised in that described file type includes at least one in video, audio frequency and picture.
13. according to Claim 8 to the device of described file storage arbitrary in 11, it is characterised in that described file write operation includes receiving file by network, storage device write operation when being generated file by the incoming file of I/O equipment and/or application.
14. the device of file according to claim 8 storage, it is characterised in that described device also includes file write reminding module, is used for:
Generating file write prompting message according to described file and described store path, described relative store path and show, described file write message is for pointing out the storage address of file described in user;
Detection user writes the confirmation instruction of prompting message input for described file, calls described file writing module.
CN201610066500.4A 2016-01-29 2016-01-29 File storage method and apparatus Pending CN105740425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610066500.4A CN105740425A (en) 2016-01-29 2016-01-29 File storage method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610066500.4A CN105740425A (en) 2016-01-29 2016-01-29 File storage method and apparatus

Publications (1)

Publication Number Publication Date
CN105740425A true CN105740425A (en) 2016-07-06

Family

ID=56247205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610066500.4A Pending CN105740425A (en) 2016-01-29 2016-01-29 File storage method and apparatus

Country Status (1)

Country Link
CN (1) CN105740425A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106227468A (en) * 2016-07-26 2016-12-14 惠州市斯坦利科技有限公司 Document handling method and device
CN106354773A (en) * 2016-08-22 2017-01-25 北京奇虎科技有限公司 Method and device for data storage of application programs
CN106778295A (en) * 2016-11-30 2017-05-31 广东欧珀移动通信有限公司 File storage, display methods, device and terminal
CN107526814A (en) * 2017-08-25 2017-12-29 青岛海信移动通信技术股份有限公司 Mobile terminal document storage method and device
WO2018133580A1 (en) * 2017-01-23 2018-07-26 北京奇虎科技有限公司 Method and device for protecting local file of smart terminal
CN108829349A (en) * 2018-05-30 2018-11-16 郑州易通众联电子科技有限公司 Date storage method, data storage device and electronic equipment based on electronic equipment
CN109101154A (en) * 2018-08-10 2018-12-28 珠海格力电器股份有限公司 A kind of mobile terminal document storage method, storage system and mobile terminal
CN109213444A (en) * 2018-08-17 2019-01-15 上海小蚁科技有限公司 File memory method and device, storage medium, terminal
CN109768926A (en) * 2019-01-10 2019-05-17 维沃移动通信有限公司 A kind of data processing method, terminal device and computer readable storage medium
CN110263006A (en) * 2019-06-25 2019-09-20 上海连尚网络科技有限公司 A kind of method and apparatus for downloading file on a user device
CN110442310A (en) * 2019-08-06 2019-11-12 惠州Tcl移动通信有限公司 Application data processing method, device, storage medium and terminal device
CN111181905A (en) * 2019-06-28 2020-05-19 腾讯科技(深圳)有限公司 File encryption method and device
CN111984201A (en) * 2020-09-01 2020-11-24 云南财经大学 Astronomical observation data high-reliability acquisition method and system based on persistent memory
CN112184510A (en) * 2020-10-15 2021-01-05 崔丽廷 Interactive teaching platform based on high in clouds
CN112379838A (en) * 2020-11-13 2021-02-19 Oppo广东移动通信有限公司 Data downloading method and device, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110656A (en) * 2006-07-18 2008-01-23 宇龙计算机通信科技(深圳)有限公司 File transferring method for wireless network hard disk system
CN101655818A (en) * 2009-09-10 2010-02-24 深圳华为通信技术有限公司 Storage method and equipment
CN103500077A (en) * 2013-10-16 2014-01-08 北京国双科技有限公司 File storage method and device
CN103678143A (en) * 2012-09-25 2014-03-26 联想(北京)有限公司 File storage method and device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110656A (en) * 2006-07-18 2008-01-23 宇龙计算机通信科技(深圳)有限公司 File transferring method for wireless network hard disk system
CN101655818A (en) * 2009-09-10 2010-02-24 深圳华为通信技术有限公司 Storage method and equipment
CN103678143A (en) * 2012-09-25 2014-03-26 联想(北京)有限公司 File storage method and device and electronic equipment
CN103500077A (en) * 2013-10-16 2014-01-08 北京国双科技有限公司 File storage method and device

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106227468A (en) * 2016-07-26 2016-12-14 惠州市斯坦利科技有限公司 Document handling method and device
CN106354773A (en) * 2016-08-22 2017-01-25 北京奇虎科技有限公司 Method and device for data storage of application programs
CN106354773B (en) * 2016-08-22 2020-05-01 北京奇虎科技有限公司 Method and device for storing data by application program
CN106778295A (en) * 2016-11-30 2017-05-31 广东欧珀移动通信有限公司 File storage, display methods, device and terminal
CN106778295B (en) * 2016-11-30 2020-04-10 Oppo广东移动通信有限公司 File storage method, file display method, file storage device, file display device and terminal
WO2018133580A1 (en) * 2017-01-23 2018-07-26 北京奇虎科技有限公司 Method and device for protecting local file of smart terminal
CN107526814A (en) * 2017-08-25 2017-12-29 青岛海信移动通信技术股份有限公司 Mobile terminal document storage method and device
CN107526814B (en) * 2017-08-25 2020-11-03 青岛海信移动通信技术股份有限公司 Mobile terminal file storage method and device
CN108829349A (en) * 2018-05-30 2018-11-16 郑州易通众联电子科技有限公司 Date storage method, data storage device and electronic equipment based on electronic equipment
CN109101154A (en) * 2018-08-10 2018-12-28 珠海格力电器股份有限公司 A kind of mobile terminal document storage method, storage system and mobile terminal
CN109213444A (en) * 2018-08-17 2019-01-15 上海小蚁科技有限公司 File memory method and device, storage medium, terminal
CN109768926A (en) * 2019-01-10 2019-05-17 维沃移动通信有限公司 A kind of data processing method, terminal device and computer readable storage medium
CN109768926B (en) * 2019-01-10 2021-07-20 维沃移动通信有限公司 Data processing method, terminal equipment and computer readable storage medium
CN110263006A (en) * 2019-06-25 2019-09-20 上海连尚网络科技有限公司 A kind of method and apparatus for downloading file on a user device
CN111181905A (en) * 2019-06-28 2020-05-19 腾讯科技(深圳)有限公司 File encryption method and device
CN111181905B (en) * 2019-06-28 2021-11-19 腾讯科技(深圳)有限公司 File encryption method and device
CN110442310A (en) * 2019-08-06 2019-11-12 惠州Tcl移动通信有限公司 Application data processing method, device, storage medium and terminal device
CN111984201A (en) * 2020-09-01 2020-11-24 云南财经大学 Astronomical observation data high-reliability acquisition method and system based on persistent memory
CN111984201B (en) * 2020-09-01 2023-01-31 云南财经大学 Astronomical observation data high-reliability acquisition method and system based on persistent memory
CN112184510A (en) * 2020-10-15 2021-01-05 崔丽廷 Interactive teaching platform based on high in clouds
CN112184510B (en) * 2020-10-15 2021-10-29 深圳市逸马科技有限公司 Interactive teaching platform based on high in clouds
CN112379838A (en) * 2020-11-13 2021-02-19 Oppo广东移动通信有限公司 Data downloading method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN105740425A (en) File storage method and apparatus
US9098370B2 (en) Apparatus and methods for improving uninstall process
US11337042B2 (en) Short message processing method and apparatus, and electronic device
CN104461504A (en) Managing method of terminal application program
CN104866342A (en) Method and device for simultaneously starting multiple same applications on intelligent terminal
CN104881299A (en) Application program freezing method and apparatus
EP3036659A1 (en) Redirecting local storage to cloud storage
CN102831035A (en) Information backup method and device
CN104166561A (en) Electronic device system start method and electronic device
CN108063818B (en) Data downloading method, device, terminal and computer readable storage medium
CN104536792A (en) Method and device for eliminating application program residual files
CN105955770A (en) Application program uninstalling method and terminal
CN104572819A (en) Clearing method and system for junk data
CN104252284A (en) File display method and device
CN107247722B (en) File scanning method and device and intelligent terminal
CN105138376A (en) Mixed model application, webpage resource upgrading method thereof, mobile terminal and system
CN104035842A (en) Method for deleting and recovering built-in application program
CN105119991A (en) Application sharing method and terminal
CN102968321A (en) Application program installation device and application program installation method
CN104461505A (en) Terminal
CN103136027A (en) Immediate updating device and immediate updating method
CN104899049A (en) File deletion method and device
CN107943501A (en) Embedded device upgrade method, device, computer equipment and storage medium
CN109117153B (en) Application processing method, device, terminal and storage medium
CN109032617B (en) Control method and control device for automatically deleting installation package

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160706