CN107193886A - File memory method and device - Google Patents
File memory method and device Download PDFInfo
- Publication number
- CN107193886A CN107193886A CN201710289697.2A CN201710289697A CN107193886A CN 107193886 A CN107193886 A CN 107193886A CN 201710289697 A CN201710289697 A CN 201710289697A CN 107193886 A CN107193886 A CN 107193886A
- Authority
- CN
- China
- Prior art keywords
- file
- memory
- storage
- stored
- memory space
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/13—File access structures, e.g. distributed indices
Abstract
The disclosure is directed to a kind of file memory method and device.This method includes:If the current vacant memory space of memory is less than the data volume of file to be stored, the attribute tags of multiple storage files in the memory are obtained;Delete at least one storage file that the attribute tags are non-default label;According to the current vacant memory space of the memory and delete at least one described memory space for discharging after storage file, the storage file to be stored.In the technical scheme, in storage file, can using in skip memory file of the attribute tags as default label, file to be stored is stored in the memory space and vacant memory space deleted and discharged after the file that attribute tags are non-default label, the reliability of file preservation is improved, and then improves Consumer's Experience.
Description
Technical field
This disclosure relates to file storage technology field, more particularly to a kind of file memory method and device.
Background technology
In order to leave fine memory to life, during some trips or party, user can use video camera
Fine moment in life all is recorded, in order to consult or watch later.
It is common, it is provided with after memory, video camera recorded video, be able to will be regarded according to the time of recording in video camera
In memory, video can also be deposited memory as needed and exported to other storage devices by user for frequency storage.
The content of the invention
To overcome problem present in correlation technique, the embodiment of the present disclosure provides a kind of file memory method and device.Institute
State technical scheme as follows:
According to the first aspect of the embodiment of the present disclosure there is provided a kind of file memory method, including:
If the current vacant memory space of memory is less than the data volume of file to be stored, obtain multiple in the memory
Attribute tags of storage file;
Delete at least one storage file that the attribute tags are non-default label;
At least one is discharged after storage file according to the current vacant memory space of the memory and described in deleting
Memory space, stores the file to be stored.
The technical scheme provided by this disclosed embodiment can include the following benefits:In storage file, it can jump
The file that attribute tags in memory are default label is crossed, it is non-default label that file to be stored is stored in into deletion attribute tags
File after in the memory space and vacant memory space that discharge, improve the reliability of file preservation, and then improve use
Experience at family.
In one embodiment, the attribute tags of storage file include in the acquisition memory:
Obtain the filename of each storage file in the multiple storage file;
Obtain the character at each filename end of storage file.
The technical scheme provided by this disclosed embodiment can include the following benefits:Pass through the file of storage file
Name confirms the attribute tags of storage file, improves the convenience and accuracy for determining the attribute tags of storage file.
In one embodiment, the attribute tags of storage file include in the acquisition memory:
Obtain the File header information of each storage file in the multiple storage file;
Obtain the character of preset field in each File header information of storage file.
The technical scheme provided by this disclosed embodiment can include the following benefits:Pass through the file of storage file
Header confirms the attribute tags of storage file, improves and determines the convenience of the attribute tags of storage file and accurate
Property.
In one embodiment, described at least one storage file bag for deleting the attribute tags for non-default label
Include:
According to the attribute tags of from morning to night deleting successively of storage time text has been stored for the multiple of non-default label
Part, until the memory space that is discharged after the multiple storage file of the current vacant memory space of the memory and deleting it
With the data volume more than or equal to the file to be stored.
The technical scheme provided by this disclosed embodiment can include the following benefits:When memory memory space
Man Shi, can from morning to night delete multiple storage files that attribute tags are non-default label successively according to storage time,
In order to discharge the memory space that can store file to be stored, improve storage file success rate and vital document preserve
Reliability, and then improve Consumer's Experience.
In one embodiment, methods described also includes:
Operational order is obtained, the operational order indicates to set the attribute tags of the file to be stored;
According to the operational order, the attribute tags of the file to be stored are set to default label.
The technical scheme provided by this disclosed embodiment can include the following benefits:User can be by be to be stored
File sets the mode of default label, it is to avoid being deleted by mistake during follow-up storage file needs the text to be stored of persistence
Part, improves the reliability of file preservation, and then improves Consumer's Experience.
In one embodiment, methods described also includes:
Before the file to be stored is stored, the memory space of the memory is traveled through;
The memory space for obtaining non-data storage in the memory space is empty as the current vacant storage of the memory
Between.
The technical scheme provided by this disclosed embodiment can include the following benefits:Store the file to be stored it
Before, vacant memory space can be obtained first, it is to avoid in the case where vacant memory space is sufficient, delete what is preserved in memory by mistake
File, improves the reliability of file preservation, and then improves Consumer's Experience.
According to the second aspect of the embodiment of the present disclosure there is provided a kind of file storage device, including:
First acquisition module, if the vacant memory space current for memory is less than the data volume of file to be stored, is obtained
Take the attribute tags of multiple storage files in the memory;
Removing module, for deleting at least one storage file that the attribute tags are non-default label;
Memory module, at least one have been stored according to the current vacant memory space of the memory and described in deleting
The memory space discharged after file, stores the file to be stored.
In one embodiment, first acquisition module includes:
First acquisition submodule, the filename for obtaining each storage file in the multiple storage file;
Second acquisition submodule, the character for obtaining each filename end of storage file.
In one embodiment, first acquisition module includes:
3rd acquisition submodule, the file header letter for obtaining each storage file in the multiple storage file
Breath;
4th acquisition submodule, the word for obtaining preset field in each File header information of storage file
Symbol.
In one embodiment, the removing module includes:
Submodule is deleted, for from morning to night deleting the attribute tags successively according to storage time for non-default label
Multiple storage files, until the current vacant memory space of the memory and releasing after deleting the multiple storage file
The memory space sum put is more than or equal to the data volume of the file to be stored.
In one embodiment, described device also includes:
Second acquisition module, for obtaining operational order, the operational order indicates to set the category of the file to be stored
Property label;
Setup module, for according to the operational order, the attribute tags of the file to be stored to be set into pre- bidding
Label.
In one embodiment, described device also includes:
Spider module, for before the file to be stored is stored, traveling through the memory space of the memory;
3rd acquisition module, for obtaining the memory space of non-data storage in the memory space as the memory
Current vacant memory space.
According to the third aspect of the embodiment of the present disclosure there is provided a kind of file storage device, including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
If the current vacant memory space of memory is less than the data volume of file to be stored, obtain multiple in the memory
Attribute tags of storage file;
Delete at least one storage file that the attribute tags are non-default label;
At least one is discharged after storage file according to the current vacant memory space of the memory and described in deleting
Memory space, stores the file to be stored.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary and explanatory, not
The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and constitutes the part of this specification, shows the implementation for meeting the disclosure
Example, and be used to together with specification to explain the principle of the disclosure.
Fig. 1 is the flow chart of the file memory method according to an exemplary embodiment.
Fig. 2 is the flow chart of the file memory method according to an exemplary embodiment.
Fig. 3 is the flow chart of the file memory method according to an exemplary embodiment.
Fig. 4 is the flow chart of the file memory method according to an exemplary embodiment.
Fig. 5 a are the structural representations of the file storage device according to an exemplary embodiment.
Fig. 5 b are the structural representations of the file storage device according to an exemplary embodiment.
Fig. 5 c are the structural representations of the file storage device according to an exemplary embodiment.
Fig. 5 d are the structural representations of the file storage device according to an exemplary embodiment.
Fig. 5 e are the structural representations of the file storage device according to an exemplary embodiment.
Fig. 5 f are the structural representations of the file storage device according to an exemplary embodiment.
Fig. 6 is the structured flowchart of the file storage device according to an exemplary embodiment.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to
During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with it is such as appended
The example of the consistent apparatus and method of some aspects be described in detail in claims, the disclosure.
The technical scheme that the embodiment of the present disclosure is provided is related to file-storage device, and the embodiment of the present disclosure is entered by taking video camera as an example
Row explanation.In correlation technique, memory is provided with video camera, video camera is in recorded video, if the storage of memory is empty
Between it is full, the earliest video file of storage time in memory can be obtained, the video file is deleted, then discharged
The current video recorded is stored in memory space.But, it is assumed that be stored with important video file in memory, for example, need
The video file of persistence.Failing to the important video file is exported in time, it is likely that record new video in video camera
When deleted by mistake, the situation for causing important video file not give for change, Consumer's Experience is not good.The technology that embodiment of the disclosure is provided
In scheme, in storage file, attribute tags as the file of default label, file to be stored can be stored using in skip memory
In the memory space and vacant memory space discharged after attribute tags are deleted for the file of non-default label, file is improved
The reliability of preservation, and then improve Consumer's Experience.
Fig. 1 is a kind of flow chart of file memory method according to an exemplary embodiment, and this method is used for file
Storage device, the embodiment of the present disclosure is illustrated by taking video camera storage video file as an example.As shown in figure 1, this document storage side
Method comprises the following steps 101 to step 103:
In a step 101, if the current vacant memory space of memory is less than the data volume of file to be stored, storage is obtained
The attribute tags of multiple storage files in device.
Example, the memory can be the memory being arranged in video camera.
User, in order to avoid the video file is deleted by mistake, can be regarded this after using video camera recorded video file
The attribute tags of frequency file are set to default label.The attribute tags of video file can be arranged on the filename of video file
In, it can also be arranged in the memory space of the video file, or the File header information of the video file can also be arranged on
In.
Illustrated exemplified by the filename that attribute tags are arranged on video file, text has been stored in memory is obtained
During the attribute tags of part, the filename of each storage file in multiple storage files can be obtained first, and obtains each
The character at the filename end of storage file, it is then determined that whether the character at each filename end of storage file is pre-
If character, the preset characters can be " " or " " etc..If the character at filename end is preset characters, illustrate storage file
Attribute tags be default label;If the character at filename end is not preset characters, illustrate the attribute mark of the storage file
Sign as non-default label.The attribute tags of storage file are confirmed by the filename of storage file, determination is improved and has deposited
Store up the convenience and accuracy of the attribute tags of file.
Illustrate, deposited in memory is obtained exemplified by the File header information that attribute tags are arranged on video file
When storing up the attribute tags of file, the File header information of each storage file in multiple storage files can be obtained first, and
The character of preset field in each File header information of storage file is obtained, it is then determined that the file header of each storage file
Whether the character of the preset field of information is preset characters.If the character of File header information preset field is preset characters, explanation
The attribute tags of storage file are default label;If the character of File header information preset field is not preset characters, illustrate this
The attribute tags of storage file are non-default label.The category of storage file is confirmed by the File header information of storage file
Property label, improve the convenience and accuracy for determining attribute tags of storage file.
Illustrate, stored in memory is obtained exemplified by the memory space that attribute tags are arranged on video file
During the attribute tags of file, the memory space of each storage file in multiple storage files can be obtained first, and is obtained
The data storage of storage address is each preset in the memory space of storage file, it is then determined that the storage of each storage file
Whether the data storage of the default storage address in space is preset data.If the data storage of default storage address is present count
According to the attribute tags for illustrating storage file are default label;If the data storage of default storage address is not preset data, say
It is bright this storage file attribute tags be non-default label.Deposited by presetting storage address in the memory space of storage file
The attribute tags of the data validation of storage storage file, improve the determination convenience of the attribute tags of storage file and accurate
Property.
In a step 102, at least one storage file of attribute tags for non-default label is deleted.
Example, illustrated exemplified by the filename that attribute tags are arranged on video file, video camera can be deleted
The character at filename end is not the storage file of preset characters;The File header information of video file is arranged on attribute tags
In exemplified by illustrate, the character that video camera can delete File header information preset field be not preset characters storage text
Part;Illustrated exemplified by the memory space that attribute tags are arranged on video file, video camera can delete default storage
The data storage of location is not the storage file of preset data.
Video camera can according to storage time from morning to night successively delete attribute tags for non-default label it is multiple
Storage file, during file is deleted, video camera can detect current vacant memory space in real time and delete and store
Whether the memory space sum discharged after file can store the file to be stored, i.e., current vacant memory space and deletion are
Whether the memory space sum discharged after storage file is more than or equal to the data volume of file to be stored.If current vacant storage
The memory space sum discharged behind space and the multiple storage files of deletion is less than the data volume of file to be stored, then according to storage
Time continues to delete the storage file that attribute tags are non-default label;If current vacant memory space and deletion is multiple
The memory space sum discharged after storage file is more than or equal to the data volume of file to be stored, then stops deletion attribute tags and be
The storage file of non-default label.
In step 103, according to the current vacant memory space of memory and delete at least one and release after storage file
The memory space put, stores file to be stored.
Example, video camera can obtain the storage address of the current vacant memory space of memory and delete multiple deposited
The storage address of the memory space discharged after storage file, then stores the file to be stored according to the storage address of acquisition.
, can be with attribute tags in skip memory in storage file in the technical scheme provided by this disclosed embodiment
To preset the file of label, it is depositing for being discharged after the file of non-default label that file to be stored, which is stored in, and deletes attribute tags
Store up in space and vacant memory space, improve the reliability of file preservation, and then improve Consumer's Experience.
Fig. 2 is a kind of flow chart of file memory method according to an exemplary embodiment, and this method is used for file
Storage device, the embodiment of the present disclosure is illustrated by taking video camera storage video file as an example.As shown in Fig. 2 this document storage side
Method comprises the following steps 101 to step 105:
In a step 101, if the current vacant memory space of memory is less than the data volume of file to be stored, obtain described
The attribute tags of multiple storage files in memory.
Example, the memory can be the memory being arranged in video camera.
User, in order to avoid the video file is deleted by mistake, can be regarded this after using video camera recorded video file
The attribute tags of frequency file are set to default label.The attribute tags of video file can be arranged on the filename of video file
In, for example, video file attributes label is set to preset label by writing preset characters at the end of filename;Or regard
The attribute tags of frequency file can also be arranged in the memory space of the video file, for example, passing through the storage in video file
Video file attributes label is set to default label by the default storage address write-in preset data in space;Or video file
Attribute tags can also be arranged in the File header information of video file, for example, passing through the File header information in video file
Preset field writes preset characters and video file attributes label is set into default label.
In a step 102, at least one storage file of the attribute tags for non-default label is deleted.
Example, illustrated exemplified by the filename that attribute tags are arranged on video file, video camera can be deleted
The character at filename end is not the storage file of preset characters;The File header information of video file is arranged on attribute tags
In exemplified by illustrate, the character that video camera can delete File header information preset field be not preset characters storage text
Part;Illustrated exemplified by the memory space that attribute tags are arranged on video file, video camera can delete default storage
The data storage of location is not the storage file of preset data.
Video camera can according to storage time from morning to night successively delete attribute tags for non-default label it is multiple
Storage file, until the memory space sum discharged after the current vacant memory space of memory and the multiple storage files of deletion
More than or equal to the data volume of file to be stored.
In step 103, at least one has been stored according to the current vacant memory space of the memory and deletion
The memory space discharged after file, stores the file to be stored.
At step 104, operational order is obtained, operational order indicates to set the attribute tags of file to be stored.
In step 105, according to operational order, the attribute tags of file to be stored are set to default label.
Example, video camera can be indicated the category of file to be stored after the file to be stored is stored according to user
Property label be set to default label.
Specifically, video camera is after the file to be stored is stored, can be at operation screen display storage interface, the storage
The option whether attribute tags of the file to be stored are set to default label is provided with interface, user can be as needed
Selected.If user determines to need that the attribute tags of file to be stored are set into default label, can be in operation circle
Corresponding option is clicked on face, video camera is when detecting this time click, and confirmation receives operational order.And can be according to the behaviour
Instruct, preset characters are write at the end of the filename of the file to be stored;Or believe in the file header of the file to be stored
The preset field write-in preset characters of breath;Or write preset data in the default storage address of the file to be stored.
The technical scheme provided by this disclosed embodiment can include the following benefits:User can be by be to be stored
File sets the mode of default label, it is to avoid being deleted by mistake during follow-up storage file needs the text to be stored of persistence
Part, improves the reliability of file preservation, and then improves Consumer's Experience.
Fig. 3 is a kind of flow chart of file memory method according to an exemplary embodiment, and this method is used for file
Storage device, the embodiment of the present disclosure is illustrated by taking video camera storage video file as an example.As shown in figure 3, this document storage side
Method comprises the following steps 106-107 and step 101-103:
In step 106, before storage file to be stored, the memory space of memory is traveled through.
In step 107, the memory space of non-data storage in memory space is obtained to deposit as current vacant of memory
Store up space.
Example, video camera can travel through each storage address of memory before the file to be stored is stored, it is determined that
Whether each storage address is stored with data, then regard the memory space of the storage address composition without data storage as sky
Remaining memory space.
In a step 101, if the current vacant memory space of memory is less than the data volume of file to be stored, obtain described
The attribute tags of multiple storage files in memory.
Example, the memory can be the memory being arranged in video camera.
User, in order to avoid the video file is deleted by mistake, can be regarded this after using video camera recorded video file
The attribute tags of frequency file are set to default label.The attribute tags of video file can be arranged on the filename of video file
In, for example, video file attributes label can be set to preset label by writing preset characters at the end of filename;Or
The attribute tags of person's video file can also be arranged in the memory space of the video file, for example, can be by video text
Video file attributes label is set to default label by the default storage address write-in preset data of the memory space of part;Or regard
The attribute tags of frequency file can also be arranged in the File header information of video file, for example, can be by video file
Video file attributes label is set to default label by the preset field write-in preset characters of File header information.
In a step 102, at least one storage file of the attribute tags for non-default label is deleted.
Example, illustrated exemplified by the filename that attribute tags are arranged on video file, video camera can be deleted
The character at filename end is not the storage file of preset characters;The File header information of video file is arranged on attribute tags
In exemplified by illustrate, the character that video camera can delete File header information preset field be not preset characters storage text
Part;Illustrated exemplified by the memory space that attribute tags are arranged on video file, video camera can delete default storage
The data storage of location is not the storage file of preset data.
Video camera can according to storage time from morning to night successively delete attribute tags for non-default label it is multiple
Storage file, until the memory space sum discharged after the current vacant memory space of memory and the multiple storage files of deletion
More than or equal to the data volume of file to be stored.
In step 103, at least one has been stored according to the current vacant memory space of the memory and deletion
The memory space discharged after file, stores the file to be stored.
Example, if the attribute tags of the All Files stored in memory are default label, video camera can be to end
End sends prompt message, and prompt message is used to indicate that the memory space of memory to be full, in order to terminal display prompt message.
Example, video camera can be by bluetooth, and the mode such as infrared or radio data network is attached with terminal,
Under connection status, video camera and terminal can carry out data transmission.
N number of file is contained assuming that being coexisted in the memory, video camera can detect that this is N number of in real time during operation
Whether the attribute tags of file are default label, if the attribute tags of N number of file are default label, in order to avoid next time
Can not be stored during recorded video, video camera can in time to terminal send prompt message, terminal receive the prompt message it
After can be shown on screen, for example, the display " camera memory full, memory is please changed as early as possible " on screen
Printed words, and remind user to check in time by way of vibrations or jingle bell, in order to which user changes memory or by memory
The file of middle storage is exported to other storage devices.
In the technical scheme provided by this disclosed embodiment, before the file to be stored is stored, sky can be obtained first
Remaining memory space, it is to avoid in the case where vacant memory space is sufficient, the file preserved in memory is deleted by mistake, improves file guarantor
The reliability deposited, and then improve Consumer's Experience.
Fig. 4 is a kind of flow chart of file memory method according to an exemplary embodiment, and executive agent is file
Storage device, as shown in figure 4, comprising the following steps 401 to step 409:
In step 401, the memory space of memory is traveled through, step 402 is performed.
In step 402, the memory space of non-data storage in memory space is obtained to deposit as current vacant of memory
Space is stored up, step 403 is performed.
In step 403, determine whether the current vacant memory space of memory is more than or equal to the number of file to be stored
According to amount;If the current vacant memory space of memory is more than or equal to the data volume of file to be stored, step 404 is performed;If depositing
The current vacant memory space of reservoir is less than the data volume of file to be stored, performs step 405.
In step 404, the file to be stored is stored in vacant memory space, this flow terminates.
In step 405, the attribute tags of multiple storage files in memory are obtained, step 406 is performed.
In a step 406, it is the multiple of non-default label according to the attribute tags of from morning to night deleting successively of storage time
Storage file, until depositing of being discharged after the multiple storage file of the current vacant memory space of the memory and deleting
The data volume that space sum is more than or equal to the file to be stored is stored up, step 407 is performed.
In step 407, according to the current vacant memory space of memory and delete what is discharged after multiple storage files
Memory space, stores the file to be stored, performs step 408.
In a step 408, operational order is obtained, the operational order is indicated to set the attribute tags of file to be stored, performed
Step 409.
In step 409, according to the operational order, the attribute tags of file to be stored are set to default label.
Embodiment of the disclosure provides a kind of file memory method, can be with attribute in skip memory in storage file
Label is the file of default label, and file to be stored is stored in and deletes attribute tags to discharge after the file of non-default label
Memory space and vacant memory space in, improve the reliability of file preservation, and then improve Consumer's Experience.
Following is disclosure device embodiment, can be used for performing method of disclosure embodiment.
Fig. 5 a are a kind of structural representation of file storage device 50 according to an exemplary embodiment, the device 50
Can by software, hardware or both be implemented in combination with it is some or all of as electronic equipment.As shown in Figure 5 a, this article
Part storage device 50 includes the first acquisition module 501, removing module 502 and memory module 503.
Wherein, the first acquisition module 501, if the vacant memory space current for memory is less than the number of file to be stored
According to amount, the attribute tags of multiple storage files in the memory are obtained.
Removing module 502, for deleting at least one storage file that the attribute tags are non-default label.
Memory module 503, at least one to be according to the current vacant memory space of the memory and described in deleting
The memory space discharged after storage file, stores the file to be stored.
In one embodiment, as shown in Figure 5 b, first acquisition module 501 includes the He of the first acquisition submodule 5011
Second acquisition submodule 5012.
Wherein, the first acquisition submodule 5011, for obtaining each storage file in the multiple storage file
Filename.
Second acquisition submodule 5012, the character for obtaining each filename end of storage file.
In one embodiment, as shown in Figure 5 c, first acquisition module 501 includes the He of the 3rd acquisition submodule 5013
4th acquisition submodule 5014.
Wherein, the 3rd acquisition submodule 5013, for obtaining each storage file in the multiple storage file
File header information.
4th acquisition submodule 5014, for obtaining preset field in each File header information of storage file
Character.
In one embodiment, as fig 5d, the removing module 502 includes deleting submodule 5021.
The deletion submodule 5021, for being non-according to the attribute tags of from morning to night deleting successively of storage time
Multiple storage files of default label, until the current vacant memory space of the memory and deleting the multiple stored
The memory space sum discharged after file is more than or equal to the data volume of the file to be stored.
Above-described embodiment is equally applicable to the file storage device 50 shown in Fig. 5 b and Fig. 5 c.
In one embodiment, as depicted in fig. 5e, described device 50 also includes the second acquisition module 504 and setup module
505。
Wherein, the second acquisition module 504, for obtaining operational order, the operational order indicates to set described to be stored
The attribute tags of file.
Setup module 505, for according to the operational order, the attribute tags of the file to be stored being set to preset
Label.
Above-described embodiment is equally applicable to Fig. 5 b, the file storage device 50 shown in Fig. 5 c and Fig. 5 d.
In one embodiment, as shown in figure 5f, described device 50 also includes the acquisition module of spider module 506 and the 3rd
507。
Wherein, spider module 506, the storage for before the file to be stored is stored, traveling through the memory is empty
Between.
3rd acquisition module 507, the memory space for obtaining non-data storage in the memory space is deposited as described
The current vacant memory space of reservoir.
Above-described embodiment is equally applicable to Fig. 5 b, the file storage device 50 shown in Fig. 5 c, Fig. 5 d and Fig. 5 e.
Embodiment of the disclosure provides a kind of file storage device, and in storage file, the device can be with skip memory
Middle attribute tags are the file of default label, file to be stored is stored in delete attribute tags for non-default label file it
In the memory space and vacant memory space discharged afterwards, the reliability of file preservation is improved, and then improves Consumer's Experience.
The embodiment of the present disclosure provides a kind of file storage device, and this document storage device includes:
Processor;
Memory for storing processor-executable instruction;
Wherein, processor is configured as:
If the current vacant memory space of memory is less than the data volume of file to be stored, obtain multiple in the memory
Attribute tags of storage file;
Delete at least one storage file that the attribute tags are non-default label;
At least one is discharged after storage file according to the current vacant memory space of the memory and described in deleting
Memory space, stores the file to be stored.
In one embodiment, above-mentioned processor is also configured to:In the multiple storage file of acquisition each
The filename of storage file;Obtain the character at each filename end of storage file.
In one embodiment, above-mentioned processor is also configured to:In the multiple storage file of acquisition each
The File header information of storage file;Obtain the character of preset field in each File header information of storage file.
In one embodiment, above-mentioned processor is also configured to:According to from morning to night deleting successively for storage time
The attribute tags are multiple storage files of non-default label, until the current vacant memory space of the memory and deleting
Except the memory space sum discharged after the multiple storage file is more than or equal to the data volume of the file to be stored.
In one embodiment, above-mentioned processor is also configured to:Operational order is obtained, the operational order indicates to set
Put the attribute tags of the file to be stored;According to the operational order, the attribute tags of the file to be stored are set to
Default label.
In one embodiment, above-mentioned processor is also configured to:Before the file to be stored is stored, institute is traveled through
State the memory space of memory;Obtain the memory space of non-data storage in the memory space as the memory current
Vacant memory space.
Embodiment of the disclosure provides a kind of file storage device, and in storage file, the device can be with skip memory
Middle attribute tags are the file of default label, file to be stored is stored in delete attribute tags for non-default label file it
In the memory space and vacant memory space discharged afterwards, the reliability of file preservation is improved, and then improves Consumer's Experience.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant this method
Embodiment in be described in detail, explanation will be not set forth in detail herein.
Fig. 6 is a kind of block diagram for file storage device 60 according to an exemplary embodiment.Device 60 includes
Processing assembly 602, it further comprises one or more processors, and as the memory resource representated by memory 603, uses
In storage can by the execution of processing assembly 602 instruction, such as application program.The application program stored in memory 603 can be with
Including it is one or more each correspond to the module of one group of instruction.Refer in addition, processing assembly 602 is configured as execution
Order, to perform the above method.
Device 60 can also include the power management that a power supply module 606 is configured as performs device 60, and one wired
Or radio network interface 605 is configured as device 60 being connected to network, and input and output (I/O) interface 608.Device 60
It can operate based on the operating system for being stored in memory 603, such as Windows ServerTM, Mac OS XTM, UnixTM,
LinuxTM, FreeBSDTM or similar.
The embodiment of the present disclosure provides a kind of non-transitorycomputer readable storage medium, the instruction in the storage medium
By the computing device of device 60 when so that device 60 is able to carry out above-mentioned file memory method, and methods described includes:
If the current vacant memory space of memory is less than the data volume of file to be stored, obtain multiple in the memory
Attribute tags of storage file;
Delete at least one storage file that the attribute tags are non-default label;
At least one is discharged after storage file according to the current vacant memory space of the memory and described in deleting
Memory space, stores the file to be stored.
In one embodiment, the attribute tags of storage file include in the acquisition memory:Obtain described
The filename of each storage file in multiple storage files;Obtain the word at each filename end of storage file
Symbol.
In one embodiment, the attribute tags of storage file include in the acquisition memory:Obtain described
The File header information of each storage file in multiple storage files;Obtain the File header information of each storage file
The character of middle preset field.
In one embodiment, described at least one storage file bag for deleting the attribute tags for non-default label
Include:Multiple storage files that the attribute tags are non-default label are from morning to night deleted successively according to storage time, directly
The memory space sum discharged after to the current vacant memory space of the memory and the multiple storage file of deletion is big
In or equal to the file to be stored data volume.
In one embodiment, methods described also includes:Operational order is obtained, the operational order indicates to treat described in setting
The attribute tags of storage file;According to the operational order, the attribute tags of the file to be stored are set to default label.
In one embodiment, methods described also includes:Before the file to be stored is stored, the memory is traveled through
Memory space;The memory space of non-data storage in the memory space is obtained as the current vacant storage of the memory
Space.
Those skilled in the art will readily occur to its of the disclosure after considering specification and putting into practice disclosure disclosed herein
Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modifications, purposes or
Person's adaptations follow the general principle of the disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the disclosure and spirit are by following
Claim is pointed out.
It should be appreciated that the precision architecture that the disclosure is not limited to be described above and is shown in the drawings, and
And various modifications and changes can be being carried out without departing from the scope.The scope of the present disclosure is only limited by appended claim.
Claims (14)
1. a kind of file memory method, it is characterised in that including:
If the current vacant memory space of memory is less than the data volume of file to be stored, multiple in the memory deposited is obtained
Store up the attribute tags of file;
Delete at least one storage file that the attribute tags are non-default label;
The storage that at least one is discharged after storage file according to the current vacant memory space of the memory and described in deleting
Space, stores the file to be stored.
2. according to the method described in claim 1, it is characterised in that described to obtain in the memory attribute of storage file
Label includes:
Obtain the filename of each storage file in the multiple storage file;
Obtain the character at each filename end of storage file.
3. according to the method described in claim 1, it is characterised in that described to obtain in the memory attribute of storage file
Label includes:
Obtain the File header information of each storage file in the multiple storage file;
Obtain the character of preset field in each File header information of storage file.
4. the method according to claims 1 to 3 any one claim, it is characterised in that the deletion attribute
Label for non-default label at least one storage file include:
Multiple storage files that the attribute tags are non-default label are from morning to night deleted successively according to storage time, directly
The memory space sum discharged after to the current vacant memory space of the memory and the multiple storage file of deletion is big
In or equal to the file to be stored data volume.
5. the method according to claims 1 to 3 any one claim, it is characterised in that methods described also includes:
Operational order is obtained, the operational order indicates to set the attribute tags of the file to be stored;
According to the operational order, the attribute tags of the file to be stored are set to default label.
6. according to the method described in claim 1, it is characterised in that methods described also includes:
Before the file to be stored is stored, the memory space of the memory is traveled through;
The memory space of non-data storage in the memory space is obtained as the current vacant memory space of the memory.
7. a kind of file storage device, it is characterised in that including:
First acquisition module, if the vacant memory space current for memory is less than the data volume of file to be stored, obtains institute
State the attribute tags of multiple storage files in memory;
Removing module, for deleting at least one storage file that the attribute tags are non-default label;
Memory module, at least one storage file according to the current vacant memory space of the memory and described in deleting
The memory space discharged afterwards, stores the file to be stored.
8. device according to claim 7, it is characterised in that first acquisition module includes:
First acquisition submodule, the filename for obtaining each storage file in the multiple storage file;
Second acquisition submodule, the character for obtaining each filename end of storage file.
9. device according to claim 7, it is characterised in that first acquisition module includes:
3rd acquisition submodule, the File header information for obtaining each storage file in the multiple storage file;
4th acquisition submodule, the character for obtaining preset field in each File header information of storage file.
10. the device according to claim 7 to 9 any one claim, it is characterised in that the removing module bag
Include:
Submodule is deleted, for being many of non-default label according to the attribute tags of from morning to night deleting successively of storage time
Individual storage file, until discharged after the current vacant memory space of the memory and the multiple storage file of deletion
Memory space sum is more than or equal to the data volume of the file to be stored.
11. the device according to claim 7 to 9 any one claim, it is characterised in that described device also includes:
Second acquisition module, for obtaining operational order, the operational order indicates to set the attribute mark of the file to be stored
Label;
Setup module, for according to the operational order, the attribute tags of the file to be stored to be set into default label.
12. device according to claim 7, it is characterised in that described device also includes:
Spider module, for before the file to be stored is stored, traveling through the memory space of the memory;
3rd acquisition module, the memory space for obtaining non-data storage in the memory space is current as the memory
Vacant memory space.
13. a kind of file storage device, it is characterised in that including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
If the current vacant memory space of memory is less than the data volume of file to be stored, multiple in the memory deposited is obtained
Store up the attribute tags of file;
Delete at least one storage file that the attribute tags are non-default label;
The storage that at least one is discharged after storage file according to the current vacant memory space of the memory and described in deleting
Space, stores the file to be stored.
14. a kind of computer-readable recording medium, is stored thereon with computer instruction, it is characterised in that the instruction is by processor
The step of claim 1 to 6 any one claim methods described is realized during execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710289697.2A CN107193886A (en) | 2017-04-27 | 2017-04-27 | File memory method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710289697.2A CN107193886A (en) | 2017-04-27 | 2017-04-27 | File memory method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107193886A true CN107193886A (en) | 2017-09-22 |
Family
ID=59873650
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710289697.2A Pending CN107193886A (en) | 2017-04-27 | 2017-04-27 | File memory method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107193886A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109977121A (en) * | 2019-03-27 | 2019-07-05 | 上海鸣鸾互联网科技有限公司 | A kind of big data quick storage system |
CN111372027A (en) * | 2020-03-18 | 2020-07-03 | 浙江大华技术股份有限公司 | Video file storage method and device, storage medium and electronic device |
CN112084168A (en) * | 2019-06-14 | 2020-12-15 | 北京百度网讯科技有限公司 | Label storage method and device and server |
CN112181630A (en) * | 2019-07-05 | 2021-01-05 | 银河水滴科技(北京)有限公司 | Data storage method, data storage equipment and computer readable storage medium |
CN112463746A (en) * | 2020-12-11 | 2021-03-09 | 杭州海康汽车软件有限公司 | File storage and generation method and device and electronic equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7020668B2 (en) * | 2000-10-16 | 2006-03-28 | Fujitsu Limited | Device for retaining important data on a preferential basis |
CN1816877A (en) * | 2003-09-24 | 2006-08-09 | 索尼株式会社 | Data recording control apparatus |
CN102685164A (en) * | 2011-03-16 | 2012-09-19 | 中国电信股份有限公司 | Method and system for downloading and updating files under condition of limited storage space of terminal |
CN104166621A (en) * | 2014-08-12 | 2014-11-26 | 联想(北京)有限公司 | Data processing method and device |
CN104639860A (en) * | 2014-12-31 | 2015-05-20 | 安科智慧城市技术(中国)有限公司 | Storage method and device of supervision video |
CN106406747A (en) * | 2015-08-03 | 2017-02-15 | 中兴通讯股份有限公司 | Hard disk storage management method and apparatus for mobile terminal |
-
2017
- 2017-04-27 CN CN201710289697.2A patent/CN107193886A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7020668B2 (en) * | 2000-10-16 | 2006-03-28 | Fujitsu Limited | Device for retaining important data on a preferential basis |
CN1816877A (en) * | 2003-09-24 | 2006-08-09 | 索尼株式会社 | Data recording control apparatus |
CN102685164A (en) * | 2011-03-16 | 2012-09-19 | 中国电信股份有限公司 | Method and system for downloading and updating files under condition of limited storage space of terminal |
CN104166621A (en) * | 2014-08-12 | 2014-11-26 | 联想(北京)有限公司 | Data processing method and device |
CN104639860A (en) * | 2014-12-31 | 2015-05-20 | 安科智慧城市技术(中国)有限公司 | Storage method and device of supervision video |
CN106406747A (en) * | 2015-08-03 | 2017-02-15 | 中兴通讯股份有限公司 | Hard disk storage management method and apparatus for mobile terminal |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109977121A (en) * | 2019-03-27 | 2019-07-05 | 上海鸣鸾互联网科技有限公司 | A kind of big data quick storage system |
CN112084168A (en) * | 2019-06-14 | 2020-12-15 | 北京百度网讯科技有限公司 | Label storage method and device and server |
CN112084168B (en) * | 2019-06-14 | 2023-07-18 | 北京百度网讯科技有限公司 | Label preservation method, device and server |
CN112181630A (en) * | 2019-07-05 | 2021-01-05 | 银河水滴科技(北京)有限公司 | Data storage method, data storage equipment and computer readable storage medium |
CN111372027A (en) * | 2020-03-18 | 2020-07-03 | 浙江大华技术股份有限公司 | Video file storage method and device, storage medium and electronic device |
CN111372027B (en) * | 2020-03-18 | 2023-07-14 | 浙江大华技术股份有限公司 | Video file storage method and device, storage medium and electronic device |
CN112463746A (en) * | 2020-12-11 | 2021-03-09 | 杭州海康汽车软件有限公司 | File storage and generation method and device and electronic equipment |
CN112463746B (en) * | 2020-12-11 | 2023-11-03 | 杭州海康汽车软件有限公司 | File storage and generation method and device and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107193886A (en) | File memory method and device | |
US6678706B1 (en) | Hypertext marker and method for dynamically displaying help information in an interactive data processing system | |
US8713471B1 (en) | Method and system for providing an intelligent visual scrollbar position indicator | |
CN103399865B (en) | A kind of method and apparatus for generating multimedia file | |
CN107025145B (en) | Error code analysis method and device | |
CN107678872A (en) | The processing method and processing device of electronic whiteboard | |
CN107845161B (en) | Method and device for acquiring flight record | |
CN109271255A (en) | Resource regulating method, system and electronic equipment and storage medium | |
CN115480987A (en) | Link data display method and device and computer equipment | |
CN114461691A (en) | Control method and device of state machine, electronic equipment and storage medium | |
US10929454B2 (en) | System and method for organizing notes | |
CN111400056B (en) | Message transmission method, device and equipment based on message queue | |
CN111552575B (en) | Message consumption method, device and equipment based on message queue | |
CN106156038B (en) | Date storage method and device | |
CN110008292A (en) | Data fusion method, device, electronic equipment and readable storage medium storing program for executing | |
CN112486966A (en) | Expired data cleaning method and device and electronic equipment | |
CN108241499A (en) | Update method, device and the computer readable storage medium of field value annotation | |
CN110113443B (en) | Social role management method, computer device and storage medium | |
US9424256B2 (en) | Method and apparatus for performing type-aware change tracking in a document | |
CN111553749A (en) | Activity push strategy configuration method and device | |
CN114780497B (en) | Batch file processing method, apparatus, computer device, medium, and program product | |
US20220150197A1 (en) | Integration of an email client with hosted applications | |
US8000681B2 (en) | System and method for managing communication records | |
CN107705070B (en) | Material information input method and device in ERP system and computer equipment | |
CN107743085A (en) | Invite code management method and invitation code managing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170922 |
|
RJ01 | Rejection of invention patent application after publication |