CN101515253A - Device and method for writing file into storage medium and reading file from storage medium - Google Patents

Device and method for writing file into storage medium and reading file from storage medium Download PDF

Info

Publication number
CN101515253A
CN101515253A CNA200810007922XA CN200810007922A CN101515253A CN 101515253 A CN101515253 A CN 101515253A CN A200810007922X A CNA200810007922X A CN A200810007922XA CN 200810007922 A CN200810007922 A CN 200810007922A CN 101515253 A CN101515253 A CN 101515253A
Authority
CN
China
Prior art keywords
file
continuum
storage medium
capacity
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA200810007922XA
Other languages
Chinese (zh)
Inventor
邓道文
严超
俞宙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
MediaTek Heifei Inc
Original Assignee
MediaTek Heifei Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by MediaTek Heifei Inc filed Critical MediaTek Heifei Inc
Priority to CNA200810007922XA priority Critical patent/CN101515253A/en
Publication of CN101515253A publication Critical patent/CN101515253A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a device for writing a file into a storage medium, wherein the file comprises a first part which has first capacity, and the storage medium comprises a plurality of data blocks which have substantially equal unit capacity and are divided into a plurality of continuous areas. The device comprises a decision module for determining to write the first part of the file into a first continuous area into the plurality of the continuous areas according to characteristics presented by the file, a searching module for searching the first continuous area to make the first summation of the unit capacities of a plurality of data blocks contained in the first continuous area not less than the first capacity, and a writing module for writing the first part of the file into the first continuous area. The device can make effective use of a medium space in a storage device according to the characteristics of the file so as to increase the access speed of the file in the storage device and make user recording and data acquisition more convenient and quicker.

Description

File is write storage medium and the device and method that reads file from storage medium
Technical field
The invention relates to a kind of device, method and multimedia system thereof and a kind of device, method and multimedia system thereof that reads file from storage medium that file is write storage medium; Particularly about more effectively utilizing the storage medium space, to accelerate to write or read device, method and the multimedia system thereof of file speed.
Background technology
Along with science and technology is maked rapid progress, various information contents increase sharply, in order to write down and preserve these data of management, various storage mediums just arise at the historic moment, from store egative film, audiotape, the video-tape of data in early days with analog form, to such an extent as to present floppy disk, hard disk, disk, CD and RAM (random access memory) card etc. all make data storage more convenient.Yet according to statistics, global digitalized data summation has surpassed the obtainable storage space of people, and only the employed amount of rams of file such as file, photo, video file, Email and webpage have surpassed 200,000,000,000 GB (gigabytes).The file storage that is provided in order more effectively to utilize storage medium, industry just develop the device and method that multiple more effective planning storage medium usage space.
Generally speaking, storage medium is divided into many blocks (cluster), is used for storage file.When wanting storage file, then need search storage medium to obtain spendable block to storage medium.Dissimilar files, its amount of capacity is widely different, and required number of blocks is also therefore different.For instance, video data belongs to bigger file type, is about several megabyte; Literal, picture or music then belong to less file type, are about thousands of bytes.If the capacity of each block of storage medium is less, when then storing literal, picture or music file, more can wasting space.Yet under this assumed condition, video file need be cut into a plurality of parts, to store in the middle of the different blocks.Thus, want the digital video recording crossfire to storage medium or want just to need bigger bandwidth when storage medium is play digital video file; In addition, because a plurality of parts of going out of file division can be stored in the different blocks, these blocks are not necessarily continuous, in case will write or when reading file, just need to search again or the address of location block.If the capacity of each block is bigger, required big bandwidth in the time of can reducing aforementioned read/write video file.Yet when wanting storage than small documents (as the file of jpeg format or MP3 format) during to storage medium, the space that is wasted in each block but can increase.Therefore, how between the amount of capacity of block and file type, average out, still problem to be solved is arranged on the practice.
The solutions that are used for the different big small documents of valid memory access in the prior art are, have defined two kinds and have separated and the cutting apart of fixed measure: had cutting apart of big block, be used to store bigger file, as digital video file; Another kind has cutting apart of block of cells, then is used for the storage than small documents.Yet this solution has obvious defects: even do not store, be used to store than still can't being used to store bigger file cutting apart of small documents than small documents, otherwise, be used to store and also can't be used to store less file big cutting apart of file.So just limit the use of hard drive space, thereby wasted more multimedium storage space.
In sum, one type of prior art syringe and method can't effectively be planned the access of various files, more because dielectric space is cut apart improperly, cause influencing other file storage, thereby have reduced the medium memory space.Therefore how effectively to utilize the storage medium space, and accelerate to write or read the speed of file, just become the industry urgent problem.
Summary of the invention
In order to solve the above-mentioned storage medium space that how effectively to utilize, and accelerate to write or read the technical matters of file speed, an embodiment of technical solution of the present invention provides a kind of device that file is write storage medium.File comprises first, and first has first capacity, and storage medium comprises a plurality of block, and a plurality of block have the unit capacity that equates in fact, and a plurality of block marks off a plurality of continuums.Device includes decision-making module, search module and writing module.Decision-making module is used for the feature that presents according to file, determines that first with file writes first continuum in a plurality of continuums.Search module is used to search first continuum, makes first summation of the unit capacity of a plurality of block that first continuum comprised be not less than first capacity.Writing module is used for the first of file is write first continuum.
The present invention also provides a kind of embodiment that reads the device of file from storage medium.File comprises first, first has first capacity, and first is that the feature that is presented by file is determined, storage medium comprises a plurality of block, a plurality of block have the unit capacity that equates in fact, and a plurality of block marks off a plurality of continuums.Device comprises locating module and read module.Locating module is used for being positioned to first continuum of a plurality of continuums, and first summation of the unit capacity of a plurality of block that first continuum is comprised is not less than first capacity.Read module is used for reading from first continuum first of file.
The present invention also provides a kind of embodiment that file is write the method for storage medium.File comprises first, and first has first capacity, and storage medium comprises a plurality of block, and a plurality of block have the unit capacity that equates in fact, and a plurality of block marks off a plurality of continuums.Method comprises the following step: according to the feature that file presented, definite first with file writes first continuum in a plurality of continuums; Search first continuum, make first summation of the unit capacity of a plurality of block that first continuum comprised be not less than first capacity; And the first of file write in first continuum.
Device and method of the present invention compared with prior art, its beneficial effect is: can be according to the feature of file, effectively utilize the dielectric space in the memory storage, thereby can accelerate the access speed of file in the memory storage, make user record and obtain data more convenient quick.
Description of drawings
Figure 1A is the block diagram of first embodiment of the invention;
Figure 1B is a synoptic diagram of using first embodiment of the invention;
Fig. 2 is the block diagram of second embodiment of the invention;
Fig. 3 is the block diagram of third embodiment of the invention;
Fig. 4 A is the process flow diagram of fourth embodiment of the invention;
Fig. 4 B is the process flow diagram of another implementation method of fourth embodiment of the invention;
Fig. 5 A is the process flow diagram of fifth embodiment of the invention;
Fig. 5 B is the process flow diagram of another implementation method of fifth embodiment of the invention.
Embodiment
With reference to the accompanying drawings and after having read embodiment described below, the those skilled in the art just can understand purpose of the present invention, technological means and implementation method.
Shown in Figure 1A, the first embodiment of the present invention is a multimedia system 1.This multimedia system 1 comprises reception interface 11 and treating apparatus 13.Reception interface 11 is used to receive file, can be advanced technology attachment (ATA, Advanced Technology Attachment) interface of specification, minicomputer system interface (SCSI, Small Computer System Interface) or output/inputting interface of formulating of Personal Computer Memory Card Internatio (PCMCIA, Personal Computer Memory Card International Association) etc.The file that treating apparatus 13 is used for receiving from reception interface 11 writes storage medium 10, and in the present embodiment, this storage medium 10 is a hard disk.
The file of wanting to write storage medium 10 comprises first, and first has first capacity.In the present embodiment, first capacity equals all told of file in fact, that is to say, the capacity of file equals first capacity just.Storage medium 10 comprises a plurality of block, and a plurality of block have the unit capacity that equates in fact, and a plurality of block marks off a plurality of continuums.Wherein each block can be cluster (cluster), bunch unit capacity can be 512 bytes (B, byte) (KB kilobyte), but be not limited to this to 32 kilobyte.Each continuum is that the block number that each continuum comprised can be different, and this is not particularly limited by the continuous section that a plurality of block constituted.
Treating apparatus 13 comprises decision-making module 131, search module 133 and writing module 135.Decision-making module 131 is according to the feature that file presented, and definite first with file writes first continuum in a plurality of continuums, and first continuum does not write data as yet before this file of storage.In addition, the first of file can determine before file is set up or after the file foundation.Specifically, the feature of 131 bases of decision-making module can be the amount of capacity or the file type of file.If is the amount of capacity of file with feature-set, then decision-making module 131 is just according to first amount of capacity (for example, judging that first capacity is more than or equal to certain threshold) of first, determines to want the capacity of the continuum that writes; If is file type with feature-set, just then decision-making module 131 is according to the file type of file, video file or the capacity less text bigger as capacity determine to want the capacity of the continuum that writes.But be not limited to this in the present embodiment, file be characterized as file type, further, file type is a kind of secondary file type.The secondary file type of supposing file is a video file, because the amount of capacity of video file is generally several megabyte, then present embodiment can determine that first is first megabyte of this video file.The secondary file type of supposing file is a text, because the amount of capacity of text only has thousands of bytes usually, can determine that then first is all told of this text.Above-mentioned only explanation as an example is not to be used for limiting protection scope of the present invention.
Search module 133 is searched first continuum, and first summation of the unit capacity of a plurality of block that first continuum is comprised is not less than first capacity, and therefore, the capacity of first continuum must be enough to the first of storage file.Then, writing module 135 writes the first of file in first continuum.Writing module 135 also writes storage medium 10 with the address of first continuum.The address of first continuum can be start address, end address or the intermediate address of first continuum.In addition, writing module 135 also can write the number of the block of first continuum in the storage medium 10 in the lump.
Present embodiment also has another kind of implementation method, and above-mentioned file also comprises second portion except that comprising first, second portion has second capacity, that is to say that file comprises first and second portion altogether, the capacity of file equals first capacity just and adds second capacity.Therefore, the decision-making module 131 for the treatment of apparatus 13 also is used for the feature that presents according to file, determines that second portion with file writes second continuum in a plurality of continuums, and second continuum does not write data as yet before this file of storage.In addition, the second portion of file can be determined before file is set up or after the file foundation.In other implementation method, if be the amount of capacity of file with aforesaid feature-set, feature can be that first capacity or second capacity are more than or equal to certain threshold.
Then search module 133 also is used to search second continuum, and second summation of the unit capacity of a plurality of block that second continuum is comprised is not less than second capacity, and therefore the capacity of second continuum must be enough to the second portion of storage file.Then, writing module 135 writes the second portion of file in second continuum.Writing module 135 also writes storage medium 10 with the address of second continuum.The address of second continuum can be start address, end address or the intermediate address of second continuum.In addition, writing module 135 also can write the number of the block of first continuum in the storage medium 10 in the lump.
For instance, suppose that hard disk has 50 data blocks, each grid among Figure 1B is represented a data block, be decorated with the block of oblique line and represent to have data, do not have the block of oblique line and then represent not deposit data, can be used for storage file, wherein, the block of deposit data does not mark off a plurality of continuums.From Figure 1B as can be known, first continuum comprises seven data blocks, second continuum and comprises six data blocks, the 3rd continuum and comprise five data blocks, the 4th continuum and comprise that four data blocks, the 5th continuum comprise three data blocks, the 6th continuum comprises two data blocks, and the 7th continuum comprises a data block.
The file of supposing to want now to store into hard disk is a digital video file, and decision-making module 131 is determined the various piece of file, i.e. first, second portion and third part according to the secondary file type of this file.Decision-making module 131 is determined the continuum that is fit to write according to the amount of capacity of three parts.Specifically, search module 133 searches first continuum, the unit capacity summation of seven data blocks that it comprises, just more than or equal to first capacity of the first of file, therefore writing module 135 just writes first in first continuum, and block number and start address, end address or the intermediate address of first continuum write storage medium.Similarly, second portion and third part write second continuum and the 3rd continuum respectively.So just finish the storage of file.
According to above-mentioned configuration, first embodiment can write file at least one continuum of storage medium according to the type or the amount of capacity of file.Because the block that each continuum comprised all is continuous, therefore can overcome the technical matters that prior art must constantly be sought available block.
As shown in Figure 2, of the present invention second be embodied as multimedia system 2.This multimedia system 2 comprises treating apparatus 23 and sends interface 25.Treating apparatus 23 is used for reading file from storage medium 20, and in the present embodiment, storage medium 20 is a hard disk.Sending interface 25 and be used to send file, can be output/inputting interface of formulating of interface, minicomputer system interface or the Personal Computer Memory Card Internatio of advanced technology attachment specification etc.
Want to comprise first from the file that storage medium 20 reads, first has first capacity, and first is determined by the feature that file presented.In the present embodiment, first capacity equals all told of file in fact, that is to say, the capacity of file equals first capacity just.Storage medium 20 comprises a plurality of block, and a plurality of block have the unit capacity that equates in fact, and a plurality of block marks off a plurality of continuums.Wherein each block can be cluster, bunch unit capacity can be 512 byte to 32 kilobyte, but be not limited to this.Each continuum is that the block number that each continuum comprised can be different, and this is not particularly limited by the continuous section that a plurality of block constituted.
The feature that file presented can be the amount of capacity or the file type of file.If with feature-set is the amount of capacity of file, then first is just determined by the amount of capacity of file; If with feature-set is file type, then first is just determined by the type of file.Be not limited thereto in the present embodiment, file be characterized as file type, further, file type is a kind of secondary file type, this secondary file type can be a video file.In other implementation method, as if being the amount of capacity of file with feature-set, then feature can be that first capacity is more than or equal to certain threshold.In addition, first can determine before file is set up or after the file foundation.
Treating apparatus 23 comprises locating module 237 and read module 239.Read module 239 reads the address of first continuum from storage medium 20, wherein, the address can be start address, end address or the intermediate address of first continuum.In addition, read module 239 also reads the block number of first continuum in the lump from storage medium 20.
Then, locating module 237 is positioned to first continuum in a plurality of continuums again according to the address of first continuum.The documentary first of storage in first continuum, first summation of the unit capacity of a plurality of block that first continuum is comprised is not less than first capacity of first.Behind locating module 237 location, read module 239 can be according to the block number of first continuum of before having read, the first that reads file from first continuum.Send the file that read module 239 that interface 25 sends treating apparatus 23 reads from storage medium 20 at last.
Present embodiment also has another implementation method, and above-mentioned file also comprises second portion except that comprising first, and second portion also is that the feature that is presented by file is determined.In addition, the definite of second portion can be before file be set up or after the file foundation.Second portion has second capacity, that is to say, file comprises first and second portion altogether, and the capacity of file equals first capacity just and adds second capacity.
In order to read the second portion of file, read module 239 reads earlier the address of second continuum from storage medium 20.The address of second continuum can be start address, end address or the intermediate address of second continuum.In addition, read module 239 also reads the block number of second continuum in the lump from storage medium 20.The locating module 237 for the treatment of apparatus 23 is again according to the address of second continuum, be positioned to second continuum in a plurality of continuums, the documentary second portion of storage in second continuum, wherein, second summation of the unit capacity of a plurality of block of being comprised of second continuum is not less than second capacity.Behind the location, 239 second portions that read file from second continuum of read module.In this implementation method, if be file size with feature-set, feature can be that first capacity or second capacity are more than or equal to certain threshold.
According to above-mentioned configuration, second embodiment can read file from storage medium according to the type or the amount of capacity of file.Because file storage is at least one continuum of storage medium, therefore only need know that less address (being the address of aforesaid first continuum and the address of second continuum) promptly can read whole file, therefore overcome and constantly to have located the next technical matters of address that reads in the prior art.
As shown in Figure 3, the third embodiment of the present invention is a multimedia system 3.This multimedia system 3 comprises reception interface 31, treating apparatus 33 and sends interface 35, is used for file is write storage medium 30, or reads file from storage medium 30.Reception interface 31 is respectively applied for and receives and send file with sending interface 35, can be output/inputting interface of formulating of interface, minicomputer system interface or the Personal Computer Memory Card Internatio of advanced technology attachment specification etc.The file that treating apparatus 33 is used for receiving from reception interface 31 writes storage medium 30, or is used for sending by sending interface 35 after storage medium 30 reads file.In the present embodiment, storage medium 30 is a hard disk.Treating apparatus 33 comprises decision-making module 331, search module 333, writing module 335, locating module 337 and read module 339.
When wanting that file write storage medium 30, the reception interface 31 for the treatment of apparatus 33 receives a file.33 for the treatment of apparatus are responsible for file is write storage medium 30.File comprises first, and first has first capacity.In the present embodiment, first capacity equals all told of file in fact, that is to say, the capacity of file equals first capacity just.Storage medium 30 comprises a plurality of block, and a plurality of block have in fact the unit capacity that equates, wherein each block can be cluster, bunch unit capacity can be 512 byte to 32 kilobyte, but be not limited to this.A plurality of block mark off a plurality of continuums, and wherein each continuum is by the continuous section that a plurality of block constituted, and the block number that each continuum comprised can be different, and this is not particularly limited.
Decision-making module 331 is according to the feature that file presented, and definite first with file writes first continuum in a plurality of continuums, and first continuum does not write data as yet before this file of storage.In addition, the first of file can determine before file is set up or after the file foundation.Specifically, the feature of 331 bases of decision-making module can be the amount of capacity or the file type of file.If is the amount of capacity of file with feature-set, then decision-making module 331 is just according to first amount of capacity (for example, judging that whether first capacity is more than or equal to certain threshold) of first, determines to want the capacity of the continuum that writes; If is file type with feature-set, just then decision-making module 331 is according to file type, video file or the capacity less text bigger as capacity are with the capacity of the continuum determining to want to write.In the present embodiment, file be characterized as file type, further, file type is a kind of secondary file type.
Search module 333 is searched first continuum, and first summation of the unit capacity of a plurality of block that first continuum is comprised is not less than first capacity, and therefore, the capacity of first continuum must be enough to the first of storage file.Then, writing module 335 just writes the first of file in first continuum.Writing module 335 also writes storage medium 30 with the address of first continuum.The address of first continuum can be start address, end address or the intermediate address of first continuum.In addition, writing module 335 also writes the block number of first continuum in the storage medium 30 in the lump.In the time of in the future will reading file, multimedia system 3 just can be come accurate reading of data according to the address of first continuum of being stored and the block number that is comprised thereof.
Want when storage medium 30 reads file, the read module 339 for the treatment of apparatus 33 reads the address of first continuum from storage medium 30, and the block number of first continuum, wherein, the address of first continuum can be start address, end address or the intermediate address of first continuum.The locating module 337 for the treatment of apparatus 33 is positioned to first continuum in a plurality of continuums again according to the address of first continuum.As previously mentioned, first continuum has contained the first of file, the first that read module 339 reads file from first continuum, because the block number of known first continuum, so read module 339 can know when stop.Send the file that read module 339 that interface 35 sends treating apparatus 33 reads from storage medium 30 at last.
Present embodiment also has another implementation method, and the file of promptly wanting to handle also comprises second portion except that comprising first, and wherein, second portion is determined (for example, judging that second capacity is more than or equal to certain threshold) by the feature that file presented.Second portion has second capacity, that is to say, file comprises first and second portion altogether, and the capacity of file equals first capacity just and adds second capacity.
Therefore, when wanting that file write storage medium 30, the decision-making module 331 for the treatment of apparatus 33 also is used for the feature that presents according to file, determines that second portion with file writes second continuum in a plurality of continuums, and second continuum does not write data as yet before this file of storage.Determining of second portion can be before file be set up or after the file foundation.
Then search module 333 is searched second continuum, and second summation of the unit capacity of a plurality of block that second continuum is comprised is not less than second capacity, and therefore the capacity of second continuum must be enough to the second portion of storage file.Then, writing module 335 just writes the second portion of file in second continuum.Writing module 335 also writes storage medium 30 with the address of second continuum.The address of second continuum can be start address, end address or the intermediate address of second continuum.In addition, writing module 335 also can write the block number of second continuum in the storage medium 30 in the lump.
Want when storage medium 30 reads file, read module 339 reads the address of second continuum from storage medium 30, and wherein, the address of second continuum can be start address, end address or the intermediate address of second continuum.In addition, read module 339 also reads the block number of second continuum in the lump from storage medium 30.337 addresses according to second continuum of the locating module for the treatment of apparatus 33 are positioned to second continuum in a plurality of continuums, the documentary second portion of storage in second continuum.The second portion of file is read in 339 second continuums from a plurality of continuums of read module, because the block number of known second continuum, so when read module 339 stops to read action as can be known.
The 3rd embodiment is the system that combines first embodiment and second embodiment, thereby device and the storage medium collocation that possesses read-write capability is provided, and forms the more complete system of function.
The fourth embodiment of the present invention is a kind of method that file is write storage medium, wherein, file comprises first, first has first capacity, storage medium comprises a plurality of block, a plurality of block have the unit capacity that equates in fact, and a plurality of block marks off a plurality of continuums.Fig. 4 A is the process flow diagram of the method.In the step 401, according to the feature that file presented, definite first with file writes first continuum in a plurality of continuums.In the present embodiment, file be characterized as file type, further, file type is a kind of secondary file type, this secondary file type can be a video file; First capacity equals all told of file in fact, that is to say, the capacity of file equals first capacity just.Step 403 is searched first continuum, makes first summation of the unit capacity of a plurality of block that first continuum comprised be not less than first capacity.Step 405 writes the first of file in first continuum.
Present embodiment has another implementation method, and its process flow diagram after the step 405, also carries out step 407 to step 415 shown in Fig. 4 B.In this implementation method, above-mentioned file also comprises second portion except that comprising first, and second portion has second capacity, that is to say, file comprises first and second portion altogether, and the capacity of file equals first capacity just and adds second capacity.Therefore, in the step 407, just according to the feature that file presented, definite second portion with file writes second continuum in a plurality of continuums.Then execution in step 409 is searched second continuum, makes second summation of the unit capacity of a plurality of block that second continuum comprised be not less than second capacity.Then in step 411, the second portion of file is write in second continuum.Step 413 writes storage medium with the address of first continuum.Step 415 writes storage medium with the address of second continuum.Wherein, the address of first continuum can be start address, end address or the intermediate address of first continuum, and the address of second continuum also can be start address, end address or the intermediate address of second continuum.
Except the step shown in Fig. 4 A and Fig. 4 B, the 4th embodiment also can carry out everything or the function of being mentioned among first embodiment, and the person of ordinary skill in the field should understand the 4th embodiment and how to carry out these actions and function based on above-mentioned first embodiment.Therefore, these actions and function repeat no more here.
The fifth embodiment of the present invention is a kind of method that reads file from storage medium, file comprises first, first has first capacity, first is determined by the feature that file presented, in the present embodiment, file be characterized as file type, further, file type is a kind of secondary file type, and this secondary file type can be a video file.Storage medium comprises a plurality of block, and a plurality of block have the unit capacity that equates in fact, and a plurality of block marks off a plurality of continuums.
Fig. 5 A is the process flow diagram of the method, and at first execution in step 500, reads the address of first continuum from storage medium, and wherein, the address of first continuum can be start address, end address or the intermediate address of first continuum.In the step 501, according to the address of first continuum, be positioned to first continuum in a plurality of continuums, first summation of the unit capacity of a plurality of block that first continuum is comprised is not less than first capacity.First capacity equals all told of file in fact, that is to say, the capacity of file equals first capacity just.Step 503 reads the first of file from first continuum.
Present embodiment has another implementation method, and its process flow diagram after the step 503, also carries out step 504 to step 507 shown in Fig. 5 B.In this implementation method, above-mentioned file also comprises second portion except that comprising first, and second portion has second capacity, that is to say, file comprises first and second portion altogether, and the capacity of file equals first capacity just and adds second capacity.
In the step 504, read the address of second continuum from storage medium, wherein, the address of second continuum can be start address, end address or the intermediate address of second continuum.Then, step 505 is positioned to second continuum in a plurality of continuums according to the address of second continuum, and second summation of the unit capacity of a plurality of block that second continuum is comprised is not less than second capacity.The second portion of file is read in second continuum of step 507 from a plurality of continuums.
Except the step shown in Fig. 5 A and Fig. 5 B, the 5th embodiment also can carry out everything or the function of being mentioned among first embodiment, and the person of ordinary skill in the field should understand the 5th embodiment and how to carry out these actions and function based on the second above-mentioned embodiment.Therefore, these actions and function repeat no more here.
The above embodiments only are used to illustrate embodiments of the present invention and explain technical characterictic of the present invention, and are not to be used for limiting protection scope of the present invention.The person of ordinary skill in the field is can be unlabored impartial to be changed or scope that retouching all belongs to the present invention and advocated, and interest field of the present invention should be as the criterion with claims institute restricted portion.

Claims (24)

1. device that file is write storage medium, this document comprises first, this first has first capacity, this storage medium comprises a plurality of block, these a plurality of block have the unit capacity that equates in fact, and these a plurality of block mark off a plurality of continuums, and this device comprises:
Decision-making module, a feature that is used for presenting according to this document, definite this first with this document writes first continuum in these a plurality of continuums;
Search module is used to search this first continuum, makes first summation of the unit capacity of a plurality of block that this first continuum comprised, and is not less than this first capacity; And
Writing module is used for this first with this document, writes in this first continuum.
2. as claimed in claim 1 file is write the device of storage medium, it is characterized in that, this first capacity wherein equals all told of this document in fact.
3. as claimed in claim 1 file is write the device of storage medium, it is characterized in that wherein this document also comprises second portion, this second portion has second capacity; This decision-making module also is used for this feature of presenting according to this document, determines that this second portion with this document writes second continuum in these a plurality of continuums; This search module also is used to search this second continuum, makes second summation of the unit capacity of a plurality of block that this second continuum comprised, and is not less than this second capacity; This writing module also is used for this second portion with this document, writes in this second continuum.
4. as claimed in claim 3 file is write the device of storage medium, it is characterized in that wherein this writing module also is used for the address of this first continuum is write this storage medium, and the address of this second continuum is write this storage medium.
5. the device that file is write storage medium as claimed in claim 4, it is characterized in that, wherein this address of this first continuum be this first continuum start address, end address and intermediate address one of them, and this address of this second continuum be this second continuum start address, end address and intermediate address one of them.
6. as claimed in claim 1 file is write the device of storage medium, it is characterized in that wherein this feature of this document is secondary file type.
7. as claimed in claim 6 file being write the device of storage medium, it is characterized in that, should the pair file type be video file wherein.
8. as claimed in claim 3 file is write the device of storage medium, it is characterized in that, this feature of this document be this first capacity and this second capacity wherein at least one more than or equal to certain threshold.
9. device that reads file from storage medium, this document comprises first, this first has first capacity, this first is that a feature that is presented by this document is determined, this storage medium comprises a plurality of block, these a plurality of block have in fact the unit capacity that equates, and these a plurality of block mark off a plurality of continuums, and this device comprises:
Locating module is used for being positioned to first continuum of these a plurality of continuums, and first summation of the unit capacity of a plurality of block that this first continuum is comprised is not less than this first capacity; And
Read module is used for reading from this first continuum this first of this document.
10. as claimed in claim 9ly read the device of file from storage medium, it is characterized in that, this first capacity wherein equals all told of this document in fact.
11. as claimed in claim 9ly read the device of file from storage medium, it is characterized in that wherein this document also has second portion, this second portion has second capacity; This locating module also is used for being positioned to second continuum of these a plurality of continuums, and second summation of the unit capacity of a plurality of block that this second continuum is comprised is not less than this second capacity; This read module also is used for reading from second continuum of these a plurality of continuums this second portion of this document.
12. as claimed in claim 11ly read the device of file from storage medium, it is characterized in that wherein this read module also is used for reading from this storage medium the address of this first continuum, and the address of reading this second continuum from this storage medium; Wherein, this locating module is this first continuum of this address location according to this first continuum, and according to this second continuum of this address location of this second continuum.
13. the device that reads file from storage medium as claimed in claim 12, it is characterized in that, wherein this address of this first continuum be this first continuum start address, end address and intermediate address one of them, and this address of this second continuum be this second continuum start address, end address and intermediate address one of them.
14. as claimed in claim 9ly read the device of file, it is characterized in that wherein this feature of this document is secondary file type from storage medium.
15. as claimed in claim 14ly read the device of file from storage medium, it is characterized in that, should the pair file type be video file wherein.
16. as claimed in claim 11ly read the device of file, it is characterized in that this feature of this document is that in this first capacity and this second capacity at least one is more than or equal to certain threshold from storage medium.
17. method that file is write storage medium, this document comprises first, this first has first capacity, this storage medium comprises a plurality of block, these a plurality of block have the unit capacity that equates in fact, and these a plurality of block mark off a plurality of continuums, and this method comprises the following step:
According to the feature that this document presented, definite this first with this document writes first continuum in these a plurality of continuums;
Search this first continuum, make first summation of the unit capacity of a plurality of block that this first continuum comprised, be not less than this first capacity; And
With this first of this document, write in this first continuum.
18. as claimed in claim 17 file is write the method for storage medium, it is characterized in that this first capacity wherein equals all told of this document in fact.
19. as claimed in claim 17 file is write the method for storage medium, it is characterized in that this document also has second portion, this second portion has second capacity, and this method also comprises the following step:
According to this feature that this document presented, definite this second portion with this document writes second continuum in these a plurality of continuums;
Search this second continuum, make second summation of the unit capacity of a plurality of block that this second continuum comprised, be not less than this second capacity; And
With this second portion of this document, write in this second continuum.
20. as claimed in claim 19 file is write the method for storage medium, it is characterized in that, also comprise the following step:
The address of this first continuum is write this storage medium; And
The address of this second continuum is write this storage medium.
21. the method that file is write storage medium as claimed in claim 20, it is characterized in that, wherein this address of this first continuum be this first continuum start address, end address and intermediate address one of them, and this address of this second continuum be this second continuum start address, end address and intermediate address one of them.
22. as claimed in claim 17 file is write the method for storage medium, it is characterized in that wherein this feature of this document is secondary file type.
23. as claimed in claim 22 file is write the method for storage medium, it is characterized in that, should the pair file type be video file wherein.
24. as claimed in claim 19 file is write the method for storage medium, it is characterized in that this feature of this document is that in this first capacity and this second capacity at least one is more than or equal to certain threshold.
CNA200810007922XA 2008-02-19 2008-02-19 Device and method for writing file into storage medium and reading file from storage medium Pending CN101515253A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA200810007922XA CN101515253A (en) 2008-02-19 2008-02-19 Device and method for writing file into storage medium and reading file from storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA200810007922XA CN101515253A (en) 2008-02-19 2008-02-19 Device and method for writing file into storage medium and reading file from storage medium

Publications (1)

Publication Number Publication Date
CN101515253A true CN101515253A (en) 2009-08-26

Family

ID=41039716

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA200810007922XA Pending CN101515253A (en) 2008-02-19 2008-02-19 Device and method for writing file into storage medium and reading file from storage medium

Country Status (1)

Country Link
CN (1) CN101515253A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012126317A1 (en) * 2011-03-21 2012-09-27 成都市华为赛门铁克科技有限公司 File storage method and device thereof
CN103778149A (en) * 2012-10-23 2014-05-07 腾讯科技(深圳)有限公司 Document system and document storage managing method thereof
CN107250992A (en) * 2015-11-13 2017-10-13 华为技术有限公司 A kind of file wiring method and file server
CN112015672A (en) * 2020-08-28 2020-12-01 北京浪潮数据技术有限公司 Data processing method, device, equipment and storage medium in storage system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012126317A1 (en) * 2011-03-21 2012-09-27 成都市华为赛门铁克科技有限公司 File storage method and device thereof
US10133666B2 (en) 2011-03-21 2018-11-20 Huawei Technologies Co., Ltd. File storage method and apparatus
CN103778149A (en) * 2012-10-23 2014-05-07 腾讯科技(深圳)有限公司 Document system and document storage managing method thereof
CN107250992A (en) * 2015-11-13 2017-10-13 华为技术有限公司 A kind of file wiring method and file server
CN112015672A (en) * 2020-08-28 2020-12-01 北京浪潮数据技术有限公司 Data processing method, device, equipment and storage medium in storage system

Similar Documents

Publication Publication Date Title
CN100498740C (en) Data cache processing method, system and data cache device
US8271462B2 (en) Method for creating a index of the data blocks
CN102053923B (en) Storage method and storage device for logbook data
CN102541968B (en) Indexing method
CN102467572B (en) Data block inquiring method for supporting data de-duplication program
CN102682108B (en) Row and line mixed database storage method
CN102622434B (en) Data storage method, data searching method and device
CN101777017B (en) Rapid recovery method of continuous data protection system
CN105980992B (en) A kind of storage system, the method for identification data block stability and device
CN102147711A (en) Storage method and device based on data content identification
CN101464901B (en) Object search method in object storage device
CN105468642A (en) Data storage method and apparatus
CN102024034B (en) Fragment processing method for high-definition media-oriented embedded file system
CN104461390A (en) Method and device for writing data into imbricate magnetic recording SMR hard disk
CN113626431A (en) LSM tree-based key value separation storage method and system for delaying garbage recovery
CN101872639A (en) Method and device for storing and retrieving image data on digital hard disk video recorder
CN101645043A (en) Methods for reading and writing data and memory device
CN105653647A (en) Information acquisition method and system of SQL (Structured Query Language) statement
CN103229164A (en) Data access method and device
CN103914483A (en) File storage method and device and file reading method and device
CN101515253A (en) Device and method for writing file into storage medium and reading file from storage medium
CN102542041A (en) Method and system for processing raster data
CN104050057A (en) Historical sensed data duplicate removal fragment eliminating method and system
CN102959548A (en) Data storage method, search method and device
KR101226600B1 (en) Memory System And Memory Mapping Method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20090826