CN108345427A - A kind of hard disc data storage method and device - Google Patents
A kind of hard disc data storage method and device Download PDFInfo
- Publication number
- CN108345427A CN108345427A CN201710055969.2A CN201710055969A CN108345427A CN 108345427 A CN108345427 A CN 108345427A CN 201710055969 A CN201710055969 A CN 201710055969A CN 108345427 A CN108345427 A CN 108345427A
- Authority
- CN
- China
- Prior art keywords
- stored
- data
- memory paragraph
- target
- target memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0608—Saving storage space on storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0643—Management of files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/0652—Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
- H04N5/91—Television signal processing therefor
Abstract
An embodiment of the present invention provides a kind of hard disc data storage method and device, the hard disk includes multiple memory paragraphs, and the length of each memory paragraph is identical;The method includes:Receive data to be stored;Determine the corresponding file destination mark of the data to be stored;According to the correspondence of the base address of pre-stored file identification and memory paragraph, the file destination mark corresponding target base address is determined;The data to be stored is stored into target memory paragraph corresponding to the target base address;The length of the target memory paragraph identifies the length of the data of corresponding complete file no more than the file destination.Using technical solution provided in an embodiment of the present invention, the storage performance of hard disk is improved.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of hard disc data storage method and device.
Background technology
With the development of computer technology, people store more and more data in a computer.
Currently, computer is generally the data of the sequential storage file of the logical address according to solid state disk.However, calculating
The data that machine receives file are random, such as:After computer has received a part of data of a file A, and receive
Then a part of data of another file B have received another part data of file A again, this causes same file to exist
The storage region occupied in the hard disk of computer is likely to discontinuous.
Based under the above situation, when needing to delete a storage file, this storage that storage file occupies is recycled
When region, Trim orders are carried out to the hard disk of computer, and this storage region that storage file has occupied is likely to not connect
Continuous, Trim orders can not delete discontinuous storage region labeled as pre-, also just can not delete this immediately and store text
Part, it is, this storage region that storage file occupies can not be recycled immediately, so that computer can not utilize immediately
The data for the file that this storage region storage that storage file has occupied newly receives, reduce the storage performance of hard disk.
Invention content
The embodiment of the present invention is designed to provide a kind of hard disc data storage method and device, to improve the storage of hard disk
Performance.Specific technical solution is as follows:
On the one hand, the embodiment of the invention discloses a kind of hard disc data storage method, the hard disk includes multiple memory paragraphs,
The length of each memory paragraph is identical;The method includes:
Receive data to be stored;
Determine the corresponding file destination mark of the data to be stored;
According to the correspondence of the base address of pre-stored file identification and memory paragraph, the file destination mark is determined
Corresponding target base address;
The data to be stored is stored into target memory paragraph corresponding to the target base address;The target memory paragraph
Length identifies the length of the data of corresponding complete file no more than the file destination.
Optionally, the step of corresponding file destination of the determination data to be stored identifies, including:
Record receives the time point of the data to be stored;
Determine the target time section belonging to the time point;
According to the correspondence of the pre-stored data to be stored corresponding period and file identification, determine described in
The corresponding file destination mark of target time section.
Optionally, described to store the data to be stored to the step of the corresponding target memory paragraph in the target base address
Suddenly, including:
If being stored with the file destination in the corresponding target memory paragraph in the target base address identifies corresponding complete text
The data of part delete the target memory paragraph labeled as pre-;
Garbage reclamation program is run, stored data in the target memory paragraph are deleted;
The data to be stored is stored to the target memory paragraph.
Optionally, described that the target memory paragraph is labeled as pre- the step of deleting, including:
According to the length of the target base address and the target memory paragraph, pre- delete command is generated;
According to the pre- delete command, the target memory paragraph is deleted labeled as pre-.
Optionally, the method further includes:
Receive the deletion instruction for carrying the file destination mark;
According to the correspondence of pre-stored file identification and base address, determine carried in the deletion instruction it is described
File destination identifies corresponding target base address;
The corresponding target memory paragraph in the target base address is deleted labeled as pre-.
Optionally, described to store the data to be stored to the step of the corresponding target memory paragraph in the target base address
Suddenly, including:
Garbage reclamation program is run, stored data in the target memory paragraph are deleted;
The data to be stored is stored to the target memory paragraph.
On the other hand, the embodiment of the invention discloses a kind of hard disc data storage device, the hard disk includes multiple storages
Section, the length of each memory paragraph are identical;Described device includes:
Data receipt unit, for receiving data to be stored;
Determination unit is identified, for determining the corresponding file destination mark of the data to be stored;
First address determination unit, for being closed according to the corresponding of base address of pre-stored file identification and memory paragraph
System determines the file destination mark corresponding target base address;
Data storage cell is stored for storing the data to be stored to the corresponding target in the target base address
Section;The length of the target memory paragraph identifies the length of the data of corresponding complete file no more than the file destination.
Optionally, the mark determination unit, is specifically used for:
Record receives the time point of the data to be stored;
Determine the target time section belonging to the time point;
According to the correspondence of the pre-stored data to be stored corresponding period and file identification, determine described in
The corresponding file destination mark of target time section.
Optionally, the data storage cell, is specifically used for:
If being stored with the file destination in the corresponding target memory paragraph in the target base address identifies corresponding complete text
The data of part delete the target memory paragraph labeled as pre-;
Garbage reclamation program is run, stored data in the target memory paragraph are deleted;
The data to be stored is stored to the target memory paragraph.
Optionally, the data storage cell, is additionally operable to:
According to the length of the target base address and the target memory paragraph, pre- delete command is generated;
According to the pre- delete command, the target memory paragraph is deleted labeled as pre-.
Optionally, described device further includes:
Instruction reception unit, for receiving the deletion instruction for carrying the file destination mark;
Second address determination unit determines institute for the correspondence according to pre-stored file identification and base address
It states the file destination deleted and carried in instruction and identifies corresponding target base address;
It is pre- to delete marking unit, for the corresponding target memory paragraph in the target base address to be deleted labeled as pre-.
Optionally, the data storage cell, is specifically used for:
Garbage reclamation program is run, stored data in the target memory paragraph are deleted;
The data to be stored is stored to the target memory paragraph.
A kind of hard disc data storage method provided in an embodiment of the present invention and device, hard disk include multiple memory paragraphs, each
The length of memory paragraph is identical;When receiving data to be stored, the corresponding file destination mark of data to be stored is determined;According to advance
The file identification of storage and the correspondence of base address determine file destination mark corresponding target base address;By data to be stored
Store target memory paragraph corresponding to target base address;Wherein, the length of target memory paragraph is corresponded to no more than file destination mark
Complete file data length, it is, file destination, which identifies corresponding complete file, has been stored in target memory paragraph
In.As it can be seen that in the embodiment of the present invention, the storage region that same file occupies in a hard disk is continuous, and is a memory paragraph,
The storage region that file occupancy can be recycled immediately, improves the storage performance of hard disk.Certainly, implement any of the present invention
Product or method must be not necessarily required to reach all the above advantage simultaneously.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
Obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of flow diagram of hard disc data storage method provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram for hard disk that the embodiment of the present invention uses;
Fig. 3 is a kind of structural schematic diagram of hard disc data storage device provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
For ease of illustration of the invention, explanation is defined to the word occurred in the embodiment of the present invention below:
Trim orders:It is introduced in ATA (Advanced Technology Attachment, Advanced Technology Attachment) -7 agreements
Instruction, which is the pre- deletion data method that is designed based on solid state disk speciality.
Below by specific embodiment, the present invention is described in detail.
With reference to figure 1, Fig. 1 is a kind of flow diagram of hard disc data storage method provided in an embodiment of the present invention, wherein
Fig. 2 is can refer to, Fig. 2 is that a kind of structural schematic diagram for hard disk that the embodiment of the present invention uses can when being formatted to hard disk
To be divided into multiple memory paragraphs, the length of each memory paragraph is identical, is preset length;Specifically, this method includes:
S101:Receive data to be stored;
Here, data to be stored can be Video data, text data etc..
S102:Determine the corresponding file destination mark of data to be stored;
Here, file destination mark can be file destination name.
In other embodiments of the invention, data can be stored according to certain rule, it is, at regular intervals
Receive and store a data, the length of the data stored in a period of time at this time is certain, is based on the reason, can be with
Prestore the correspondence of each data corresponding period and file identification, wherein in the file identification corresponding period
The total length of the data to be stored of reception is equal to the length of a memory paragraph, to ensure to receive in the file identification corresponding period
All data to be stored be stored in a memory paragraph, constitute a complete file, ensure same file in hard disk
The storage region of middle occupancy is continuous.
In this case, when receiving data to be stored, the time point for receiving data to be stored can be recorded, determining should
Target time section belonging to time point, and then according to pair of pre-stored data to be stored corresponding period and file identification
It should be related to, determine the corresponding file destination mark of target time section.
For example, data to be stored is Video data, currently there are 2 road Video datas, respectively:The roads A Video data and the record of the roads B
As data, the correspondence of the pre-stored roads A Video data corresponding period and file identification is:[1:00-2:00, text
Part identifies:“1”]、[2:00-3:00, file identification:“3”]、[3:00-4:00, file identification:" 5 "] etc.;Pre-stored B
The correspondence of road Video data corresponding period and file identification is:[1:00-2:00, file identification:“2”]、[2:00-
3:00, file identification:“4”]、[3:00-4:00, file identification:" 6 "] etc.;
If 1:30 receive the data to be stored A of the roads A Video data1, 1:30 belong to 1:00-2:00 this period, because
This is by 1:00-2:00 is determined as target time section, according to the pre-stored roads A Video data corresponding [1:00-2:00, file
Mark:" 1 "], determine data to be stored A1Corresponding file destination is identified as " 1 ";
If 1:30 receive the data to be stored B of the roads B Video data1, 1:30 belong to 1:00-2:00 this period, because
This is by 1:00-2:00 is determined as target time section, according to the pre-stored roads B Video data corresponding [1:00-2:00, file
Mark:" 2 "], determine data to be stored B1Corresponding file destination is identified as " 2 ".
S103:According to the correspondence of the base address of pre-stored file identification and memory paragraph, file destination mark is determined
Know corresponding target base address;
Here, base address is the initial logical address of a memory paragraph, and each file identification and base address are to correspond
Relationship.Target base address is being determined, the preset length of memory paragraph is being divided when combining formatting hard disk, it is easy to determine
Target memory paragraph.
S104:Data to be stored is stored into target memory paragraph corresponding to target base address.
Here, the length of target memory paragraph identifies the length of the data of corresponding complete file no more than file destination, with
Ensure that in a memory paragraph complete file can be stored.Here, complete file includes file header and end-of-file.
In other embodiments of the invention, after target memory paragraph writes full data, data have been stored in target memory paragraph
Tail portion addition file destination identify corresponding end-of-file, target memory paragraph writes end of data at this time, is stored in target memory paragraph
Complete file, it is, the length of target memory paragraph is equal to the length that file destination identifies the data of corresponding complete file.
In this way, ensureing only to store a file in a memory paragraph, the storage region that same file occupies in a hard disk is continuous,
Improve the storage performance of hard disk.
In other embodiments of the invention, data can be stored according to certain rule, it is, at regular intervals
A data are received and stored, the length of the data stored in a period of time at this time is certain, it is also possible to because of some
Factor, such as environment, equipment state factor, as soon as cause the length of the data stored in a period to increase or reduce, at this time
The correspondence for needing to update pre-stored data to be stored corresponding period and file identification, in order to next data
Storage.
For example, the correspondence of the pre-stored roads A Video data corresponding period and file identification is:[1:00-2:
00, file identification:“1”]、[2:00-3:00, file identification:“3”]、[3:00-4:00, file identification:" 5 "] etc.;When 1:50
When, the corresponding target memory paragraph of file identification " 1 " is write completely, then the tail portion file identification of data has been stored in target memory paragraph
" 1 " corresponding end-of-file;It updates the roads the A Video data corresponding period simultaneously and the correspondence of file identification is:[1:50-
2:50, file identification:“3”]、[2:50-3:50, file identification:" 5 "] etc..
In other embodiments of the invention, when storing data to be stored into target memory paragraph, target memory paragraph
In may without storage data, it is also possible to stored data;If in target memory paragraph without storage data, can directly by
Data to be stored is stored into target memory paragraph;
If being stored with data in target memory paragraph, which is not the data of complete file, it is, mesh
It does not include end-of-file to mark in memory paragraph, if having stored the number that data are same data segment in data to be stored and target memory paragraph
According to, such as be the 1 of the roads A Video data:00-2:Data to be stored then can be stored directly to target and be stored by 00 data
Duan Zhong;If it is the data of same data segment, such as data to be stored to have stored data in data to be stored and target memory paragraph not
It is the 1 of the roads A Video data:00-2:00 data have stored 1 that data are the roads B Video data in target memory paragraph:00-2:00
Data need that data deletion will have been stored in target memory paragraph, to store number to be stored then in order to ensure the storage of data
According to.For example, pre- delete command, such as Trim orders can be generated according to the length of target base address and target memory paragraph, it should
Trim orders include the length of target base address and target memory paragraph, and the length of target memory paragraph is above-mentioned preset length here,
It can be appreciated that the length of the data stored in target memory paragraph;Data have been stored in target memory paragraph occupies continuous storage
Region can delete target memory paragraph labeled as pre- according to the Trim orders, here, according to Trim orders by target memory paragraph
It is the prior art labeled as the method deleted in advance, the embodiment of the present invention repeats no more this;
If being stored with data in target memory paragraph, such as when hard disk writes full, stored data are in target memory paragraph
The data of complete file can will then store complete text it is, target memory paragraph includes end-of-file in target memory paragraph
Part can be understood as old file, and data to be stored is the data of new file, in order to ensure the storage of data, need this is old
File data delete, store the data of new file.For example, can be according to the length of target base address and target memory paragraph
Degree, generates pre- delete command, such as Trim orders, and the data in target memory paragraph are the data of complete file, complete file pair
The target memory paragraph answered is continuous, can be deleted target memory paragraph labeled as pre- according to the Trim orders.
After by target memory paragraph labeled as pre- delete, garbage reclamation program is run, by the storage in target memory paragraph
Data all delete, that is, recycling target memory paragraph and then stores data to be stored to target memory paragraph.At this point it is possible to
Target memory paragraph is recycled immediately, improves the storage efficiency of data to be stored.
In other embodiments of the invention, user can also actively delete the file stored in hard disk, when receiving use
When the deletion instruction of family input, deletion instruction includes file destination mark, in conjunction with pre-stored file identification and base
The correspondence of location is directly determined to delete the file destination mark corresponding target base address carried in instruction, by target base
The corresponding target memory paragraph in location is deleted labeled as pre-.
In this case, in order to save the memory space of hard disk, garbage reclamation program can be directly run, recycling target is deposited
Storage section directly stores data to be stored into target memory paragraph after receiving data to be stored;In addition, in order to avoid because
User misoperation, the problem of causing accidentally to delete data, while in view of need not currently store new number into target memory paragraph
According to can not recycle target memory paragraph temporarily, after receiving the data to be stored for needing to store into target memory paragraph, then transport
Row garbage reclamation program recycles target memory paragraph, data to be stored is stored into target memory paragraph, the embodiment of the present invention is to this
Without limiting.
In other embodiments of the invention, in order to ensure the storage of data, when re-writing number into target memory paragraph
According to when, first target memory paragraph can be deleted labeled as pre-, garbage reclamation program is run, recycle target memory paragraph, then will wait for
Storage data are stored into target memory paragraph.
Using above-described embodiment, hard disk includes multiple memory paragraphs, and the length of each memory paragraph is identical;It is to be stored when receiving
Data determine the corresponding file destination mark of data to be stored;It is closed according to pre-stored file identification and the corresponding of base address
System determines file destination mark corresponding target base address;Data to be stored is stored into target storage corresponding to target base address
Section;Wherein, the length of target memory paragraph identifies the length of the data of corresponding complete file no more than file destination, it is,
File destination identifies corresponding complete file and has been stored in target memory paragraph.As it can be seen that in the embodiment of the present invention, the same text
The storage region that part occupies in a hard disk is continuous, and is a memory paragraph, can recycle the storage of file occupancy immediately
Region improves the storage performance of hard disk.
With reference to figure 3, Fig. 3 is a kind of structural schematic diagram of hard disc data storage device provided in an embodiment of the present invention, described
Hard disk includes multiple memory paragraphs, and the length of each memory paragraph is identical;Described device includes:
Data receipt unit 301, for receiving data to be stored;
Determination unit 302 is identified, for determining the corresponding file destination mark of the data to be stored;
First address determination unit 303 is used for the correspondence of the base address according to pre-stored file identification and memory paragraph
Relationship determines the file destination mark corresponding target base address;
Data storage cell 304 is deposited for storing the data to be stored to the corresponding target in the target base address
Store up section;The length of the target memory paragraph identifies the length of the data of corresponding complete file no more than the file destination.
In other embodiments of the invention, the mark determination unit 302, specifically can be used for:
Record receives the time point of the data to be stored;
Determine the target time section belonging to the time point;
According to the correspondence of the pre-stored data to be stored corresponding period and file identification, determine described in
The corresponding file destination mark of target time section.
In other embodiments of the invention, the data storage cell 304, specifically can be used for:
If being stored with the file destination in the corresponding target memory paragraph in the target base address identifies corresponding complete text
The data of part delete the target memory paragraph labeled as pre-;
Garbage reclamation program is run, stored data in the target memory paragraph are deleted;
The data to be stored is stored to the target memory paragraph.
In other embodiments of the invention, the data storage cell 304, can be also used for:
According to the length of the target base address and the target memory paragraph, pre- delete command is generated;
According to the pre- delete command, the target memory paragraph is deleted labeled as pre-.
In other embodiments of the invention, the hard disc data storage device can also include:
Instruction reception unit (is not shown) in Fig. 3, for receiving the deletion instruction for carrying the file destination mark;
Second address determination unit (is not shown) in Fig. 3, for the base according to pre-stored file identification and memory paragraph
The correspondence of address determines that the file destination carried in instruction of deleting identifies corresponding target base address;
It is pre- to delete marking unit (being not shown in Fig. 3), for the corresponding target in the target base address to be stored segment mark
To delete in advance.
In other embodiments of the invention, the data storage cell 304, specifically can be used for:
Garbage reclamation program is run, stored data in the target memory paragraph are deleted;
The data to be stored is stored to the target memory paragraph.
Using above-described embodiment, hard disk includes multiple memory paragraphs, and the length of each memory paragraph is identical;It is to be stored when receiving
Data determine the corresponding file destination mark of data to be stored;It is closed according to pre-stored file identification and the corresponding of base address
System determines file destination mark corresponding target base address;Data to be stored is stored into target storage corresponding to target base address
Section;Wherein, the length of target memory paragraph identifies the length of the data of corresponding complete file no more than file destination, it is,
File destination identifies corresponding complete file and has been stored in target memory paragraph.As it can be seen that in the embodiment of the present invention, the same text
The storage region that part occupies in a hard disk is continuous, and is a memory paragraph, can recycle the storage of file occupancy immediately
Region improves the storage performance of hard disk.
For device embodiments, since it is substantially similar to the method embodiment, so fairly simple, the correlation of description
Place illustrates referring to the part of embodiment of the method.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, identical similar portion between each embodiment
Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality
For applying example, since it is substantially similar to the method embodiment, so description is fairly simple, related place is referring to embodiment of the method
Part explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (12)
1. a kind of hard disc data storage method, which is characterized in that the hard disk includes multiple memory paragraphs, the length of each memory paragraph
It is identical;The method includes:
Receive data to be stored;
Determine the corresponding file destination mark of the data to be stored;
According to the correspondence of the base address of pre-stored file identification and memory paragraph, determine that the file destination mark corresponds to
Target base address;
The data to be stored is stored into target memory paragraph corresponding to the target base address;The length of the target memory paragraph
No more than the length for the data that the file destination identifies corresponding complete file.
2. according to the method described in claim 1, it is characterized in that, the corresponding file destination of the determination data to be stored
The step of mark, including:
Record receives the time point of the data to be stored;
Determine the target time section belonging to the time point;
According to the correspondence of the pre-stored data to be stored corresponding period and file identification, the target is determined
Period corresponding file destination mark.
3. according to the method described in claim 1, it is characterized in that, described store the data to be stored to the target base
The step of corresponding target memory paragraph in address, including:
If being stored with the file destination in the corresponding target memory paragraph in the target base address identifies corresponding complete file
Data delete the target memory paragraph labeled as pre-;
Garbage reclamation program is run, stored data in the target memory paragraph are deleted;
The data to be stored is stored to the target memory paragraph.
4. according to the method described in claim 3, it is characterized in that, the step that the target memory paragraph is labeled as deleting in advance
Suddenly, including:
According to the length of the target base address and the target memory paragraph, pre- delete command is generated;
According to the pre- delete command, the target memory paragraph is deleted labeled as pre-.
5. according to the method described in claim 1, it is characterized in that, the method further includes:
Receive the deletion instruction for carrying the file destination mark;
According to the correspondence of pre-stored file identification and base address, the target deleted and carried in instruction is determined
The corresponding target base address of file identification;
The corresponding target memory paragraph in the target base address is deleted labeled as pre-.
6. according to the method described in claim 5, it is characterized in that, described store the data to be stored to the target base
The step of corresponding target memory paragraph in address, including:
Garbage reclamation program is run, stored data in the target memory paragraph are deleted;
The data to be stored is stored to the target memory paragraph.
7. a kind of hard disc data storage device, which is characterized in that the hard disk includes multiple memory paragraphs, the length of each memory paragraph
It is identical;Described device includes:
Data receipt unit, for receiving data to be stored;
Determination unit is identified, for determining the corresponding file destination mark of the data to be stored;
First address determination unit is used for the correspondence of the base address according to pre-stored file identification and memory paragraph, really
The fixed file destination mark corresponding target base address;
Data storage cell, for the data to be stored to be stored target memory paragraph corresponding to the target base address;Institute
The length for stating target memory paragraph is not more than the length that the file destination identifies the data of corresponding complete file.
8. device according to claim 7, which is characterized in that the mark determination unit is specifically used for:
Record receives the time point of the data to be stored;
Determine the target time section belonging to the time point;
According to the correspondence of the pre-stored data to be stored corresponding period and file identification, the target is determined
Period corresponding file destination mark.
9. device according to claim 7, which is characterized in that the data storage cell is specifically used for:
If being stored with the file destination in the corresponding target memory paragraph in the target base address identifies corresponding complete file
Data delete the target memory paragraph labeled as pre-;
Garbage reclamation program is run, stored data in the target memory paragraph are deleted;
The data to be stored is stored to the target memory paragraph.
10. device according to claim 9, which is characterized in that the data storage cell is additionally operable to:
According to the length of the target base address and the target memory paragraph, pre- delete command is generated;
According to the pre- delete command, the target memory paragraph is deleted labeled as pre-.
11. device according to claim 7, which is characterized in that described device further includes:
Instruction reception unit, for receiving the deletion instruction for carrying the file destination mark;
Second address determination unit is deleted for the correspondence according to pre-stored file identification and base address described in determination
Except the file destination carried in instruction identifies corresponding target base address;
It is pre- to delete marking unit, for the corresponding target memory paragraph in the target base address to be deleted labeled as pre-.
12. according to the devices described in claim 11, which is characterized in that the data storage cell is specifically used for:
Garbage reclamation program is run, stored data in the target memory paragraph are deleted;
The data to be stored is stored to the target memory paragraph.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710055969.2A CN108345427B (en) | 2017-01-25 | 2017-01-25 | Hard disk data storage method and device |
PCT/CN2017/106787 WO2018137366A1 (en) | 2017-01-25 | 2017-10-19 | Method and device for storing data of hard disk |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710055969.2A CN108345427B (en) | 2017-01-25 | 2017-01-25 | Hard disk data storage method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108345427A true CN108345427A (en) | 2018-07-31 |
CN108345427B CN108345427B (en) | 2020-09-04 |
Family
ID=62962239
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710055969.2A Active CN108345427B (en) | 2017-01-25 | 2017-01-25 | Hard disk data storage method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108345427B (en) |
WO (1) | WO2018137366A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
---|---|---|---|---|
US20050210191A1 (en) * | 2004-03-17 | 2005-09-22 | Naotaka Kobayashi | Storage control system and control method for storage control system |
CN102084332A (en) * | 2008-04-06 | 2011-06-01 | 弗森-艾奥公司 | Apparatus, system, and method for converting a storage request into an append data storage command |
CN103905789A (en) * | 2012-12-27 | 2014-07-02 | 杭州海康威视数字技术股份有限公司 | Dynamic analysis data preservation, searching and after-analyzing method and device thereof |
US8943295B1 (en) * | 2003-04-24 | 2015-01-27 | Netapp, Inc. | System and method for mapping file block numbers to logical block addresses |
CN106033324A (en) * | 2015-03-09 | 2016-10-19 | 杭州海康威视数字技术股份有限公司 | Data storage method and device |
CN106254805A (en) * | 2016-07-28 | 2016-12-21 | 浙江大华技术股份有限公司 | Storage method, device and the videocorder of a kind of Video data |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080031590A1 (en) * | 2006-08-04 | 2008-02-07 | Kulas Charles J | Digital video recording of multiple associated channels |
CN102325244B (en) * | 2011-08-26 | 2014-02-19 | 杭州海康威视数字技术股份有限公司 | Method for rapidly positioning videos by time, video storage control device and positioning device |
CN105243027A (en) * | 2015-09-24 | 2016-01-13 | 华为技术有限公司 | Method for storing data in storage device and memory controller |
-
2017
- 2017-01-25 CN CN201710055969.2A patent/CN108345427B/en active Active
- 2017-10-19 WO PCT/CN2017/106787 patent/WO2018137366A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8943295B1 (en) * | 2003-04-24 | 2015-01-27 | Netapp, Inc. | System and method for mapping file block numbers to logical block addresses |
US20050210191A1 (en) * | 2004-03-17 | 2005-09-22 | Naotaka Kobayashi | Storage control system and control method for storage control system |
CN102084332A (en) * | 2008-04-06 | 2011-06-01 | 弗森-艾奥公司 | Apparatus, system, and method for converting a storage request into an append data storage command |
CN103905789A (en) * | 2012-12-27 | 2014-07-02 | 杭州海康威视数字技术股份有限公司 | Dynamic analysis data preservation, searching and after-analyzing method and device thereof |
CN106033324A (en) * | 2015-03-09 | 2016-10-19 | 杭州海康威视数字技术股份有限公司 | Data storage method and device |
CN106254805A (en) * | 2016-07-28 | 2016-12-21 | 浙江大华技术股份有限公司 | Storage method, device and the videocorder of a kind of Video data |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Also Published As
Publication number | Publication date |
---|---|
WO2018137366A1 (en) | 2018-08-02 |
CN108345427B (en) | 2020-09-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109542358A (en) | A kind of cold and hot data separation method of solid state hard disk, device and equipment | |
JP5224706B2 (en) | Storage device and storage device control method | |
US7454445B2 (en) | Write allocation based on storage system map and snapshot | |
EP1782176B1 (en) | Systems, methods, computer readable medium and apparatus for memory management using nvram | |
CN102236605B (en) | Method for storing data into a memory | |
CN103927261B (en) | For the efficiently distribution simplifying supply storage and the method and system reclaimed | |
CN102511044A (en) | Method for deleting the data and device thereof | |
CN104461390A (en) | Method and device for writing data into imbricate magnetic recording SMR hard disk | |
CN106383666B (en) | Data storage method and device | |
EP1576593B1 (en) | Dual journaling store method and storage medium thereof | |
CN102929884A (en) | Method and device for compressing virtual hard disk image file | |
CN103186622B (en) | The update method of index information and device in a kind of text retrieval system | |
CN108021513A (en) | A kind of date storage method and device | |
CN105787037B (en) | A kind of delet method and device of repeated data | |
CN111198856B (en) | File management method, device, computer equipment and storage medium | |
CN107239412A (en) | Memory space collocation method, method for writing data and storage device based on Thin LUN | |
CN104933051B (en) | File storage recovery method and device | |
CN103646063A (en) | Satellite-borne high-speed file management system | |
CN108932271B (en) | File management method and device | |
US20170160940A1 (en) | Data processing method and apparatus of solid state disk | |
CN103049393B (en) | Memory headroom management method and device | |
CN107632791A (en) | The distribution method and system of a kind of memory space | |
CN103019956B (en) | A kind of to data cached method of operating and device | |
CN105512325A (en) | Multi-version data index renewing, deleting and establishing method and device | |
CN108345427A (en) | A kind of hard disc data storage method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |