CN1702633A - Method for establishing medium file system - Google Patents

Method for establishing medium file system Download PDF

Info

Publication number
CN1702633A
CN1702633A CN 200510084124 CN200510084124A CN1702633A CN 1702633 A CN1702633 A CN 1702633A CN 200510084124 CN200510084124 CN 200510084124 CN 200510084124 A CN200510084124 A CN 200510084124A CN 1702633 A CN1702633 A CN 1702633A
Authority
CN
China
Prior art keywords
index
data
disk
data block
file system
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
Application number
CN 200510084124
Other languages
Chinese (zh)
Other versions
CN100418071C (en
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.)
Peking University
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University
Beijing Founder Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University, Beijing Founder Electronics Co Ltd filed Critical Peking University
Priority to CNB2005100841243A priority Critical patent/CN100418071C/en
Publication of CN1702633A publication Critical patent/CN1702633A/en
Application granted granted Critical
Publication of CN100418071C publication Critical patent/CN100418071C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

This invention relates to a method for building media file system, which belongs to the computer storing technique field of multimedia files. The existing file system can't satisfy the request for real time under the read-write operation, especially under the environment that has multi flows. The property of media file storing system is also affected strongly by using standard file format; such file format sometimes doesn't support the flow transmission, and it produces the hard disk shiver easily. Wherein the media file system which relates to this invention brings forward the picture group as the basic unit of disk read-write through integrating those correlative multi media files information into the media file system, which avoids the limitation in traditional file system.

Description

A kind of method for building up of medium file system
Technical field
The invention belongs to the computer memory technical field of multimedia file, be specifically related to a kind of method for building up of medium file system.
Background technology
Existing medium file system adopts multilevel index structure, media file information such as video are that unit carries out Computer Storage and transmission with the piece, so on messaging devices such as video server during media file such as accessing video, normally be that unit proposes the access requirement with the logical record, therefore, whether the length of physical block length on the storage medium and logical record mates the addressing that directly has influence on file.Generally can be divided into three kinds of situations:
(1) logical record length and physical block appearance etc.;
(2) logical record length is the integer factor of physics block length;
(3) logical record length is not the integer factor of physics block length;
Therefore, step is as follows when addressing:
A. according to logical record length, determine the relative block number rb of n bar record place physical block;
B. determine that by record length and physical length the shared physical block piece of this record counts n;
C. calculate the displacement d1 that is recorded in the shared first physical block;
D. calculate the displacement d2 in the shared last physical block of record, promptly be recorded in the length that occupies in the last piece;
E. according to physics block length bs and d1 that calculates and d2, judge whether record strides piece; Then revise n value and d2 value if stride piece.
Like this, will cause the very big time-delay of reading of file.For video file, it all is unfixed that every frame compresses back length, and the situation that every logical record is striden physical block exists in a large number.A plurality of read operations simultaneously will greatly influence file system performance, and current file system is not suitable for the operation of media file.
In the video technique field, use multimedia file and other system file that a great difference is arranged, multimedia file is generally all bigger, takies huge storage unit; The multimedia file read-write motion is sent by system and is real-time.It is real-time that professional domain is used the important requirement of multimedia file, and promptly the processing speed that reads the decoding output data of file data is constant, and the time strictness of each frame is limited in 40 milliseconds of scopes.In the prior art, traditional file system has very big uncertainty aspect read operation, and a plurality of read operations simultaneously will greatly influence performance; For the video server that has a plurality of passages, the order of Yin Ruing at any time will influence the real-time of output, even broadcast quality.Traditional file system is used standard file format, and is made up of a plurality of files, has increased the addressing number of times of hard disk, greatly influences the performance of storage system; These files are not often supported flow transmission; Have multiple formatted file and deposit and size situation about differing greatly, accelerate like this to produce the hard disk fragment, it is a lot of that performance of storage system is descended, and stays a lot of hidden danger for stable broadcast.
Summary of the invention
At the defective that exists in the prior art, the method for building up that the purpose of this invention is to provide a kind of medium file system, this medium file system can guarantee video equipment real-time workings such as video server, improve the reading performance of hard disk storage system, improve the number of channels that the separate unit video server has, be particularly suitable for the storage of video files such as multimedia.
For reaching above purpose, the technical solution used in the present invention is: a kind of method for building up of medium file system may further comprise the steps:
(1) at first establish the storage mode of media file on the disk, be about to disk and be divided into the district, comprise system region, index area and data field, the basic disk allocation unit is a piece;
(2) in the medium file system be that unit preserves media file then with the image sets on disk, the storage cell of media file is a data block, and each data block is preserved image sets data, and corresponding with the index entry of disk index area.
Further, in the step (1), the data in magnetic disk of this document system distributes in the following ways: comprise system block, index block and data block in the disk, system region comprises layout, quantity of documents, the quantity of piece and the reference position of vacant disk block chained list of system, the index of index area include file clauses and subclauses and file, the essential information of file entries include file and piece index, include file metadata information in the essential information, data block that all have distributed and assignable data block composition data district.
Further, obtain invention effect better for making the present invention, in the step (2), the data in the data block comprise video data and voice data.Each piece can independently be decoded.Data in the data block comprise data directory, video data, voice data successively, and a byte comprises frame index, audio index in the piece in the piece, and these index are made up of side-play amount and size of data.
Further, on disk, set up data block in the step (2) and adopt following method to carry out: at first determine the size of image sets, and then according to fixed bit rate specified data block size, the index record of data block is in the index block of disk.The size of data block is greater than the size of data of maximum image group.
Further, in the step (2), the index entry of disk index area and the corresponding relation of data block are data blocks of index entry index of each index area, i.e. complete image sets of index and audio content thereof, and described image sets is preferably the compressed image group.
Further, described image sets is the image sets after compressing, and image sets is big more, and the performance of native system is higher more than the performance of traditional file systems.
Effect of the present invention is: the medium file system that adopts the method for the invention to set up, video equipments such as video server are worked long-term and stably, improve the reading performance of hard disk storage system greatly, and improve the number of channels that the separate unit video server has.Therefore the present invention can be widely used in the storage of video files such as multimedia.
Why the present invention has above-mentioned effect, mainly be because: the storage feature of the reading of media file and disk is combined closely, and this system need not special audio file simultaneously, can read file quickly, reduce hard disk addressing number of times, significantly reduce the hard disk fragment.So both avoid the index of Audio Video Interleaved form (avi) to be distributed in the file, be difficult to retrieval, solved the shortcoming that does not have index in the form (mepg) that Motion Picture Experts Group formulates again, improved the availability of video file; Also avoided these files to stride the shortcoming of piece storage.
Description of drawings
Fig. 1 is the disk distribution schematic diagram;
Fig. 2 is the process flow diagram that adopts the medium file system store media files that the method for the invention sets up.
Embodiment
The present invention will be further described below in conjunction with the drawings and the specific embodiments:
A kind of method for building up of medium file system may further comprise the steps:
(1) at first establish the storage mode of media file on the disk, be about to disk and be divided into the district, comprise system region, index area and data field, the basic disk allocation unit is a piece;
(2) in the medium file system be that unit preserves media file then with the image sets on disk, the storage cell of media file is a data block, and each data block is preserved image sets data, and corresponding with the index entry of disk index area.
As shown in Figure 1, the upper strata rectangle is represented the distribution of whole magnetic disk, and initial as can be seen from Figure 1 disk is system region 1 and index area 2, and other parts are data field 3.Each data block comprises an image sets in the data field 3, represents with the rectangle of lower floor, and each data block all is made of frame and audio index 4, the data division 5 of head.Image sets in the present embodiment is the image sets after compressing.
In the present embodiment, the data in magnetic disk of medium file system distributes in the following ways: according to the function difference disk is divided into the district, concrete disk distributes and comprises system region, index area and data field.The basic disk allocation unit is a piece.System region comprises layout, quantity of documents, the quantity of piece and the reference position of vacant disk block chained list of system, the index of index area include file clauses and subclauses and file, the essential information of file entries include file and piece index, include file metadata information in the essential information, data block that all have distributed and assignable data block composition data district.
Medium file system is different from other storage systems on function, disk exists as a kind of independently storage organization.Medium file system is made up of index part and data division:
System region 1 comprises: the layout of videotex system, quantity of documents, the reference position of the quantity of piece and vacant disk block chained list.
Index node is divided into two kinds of file item node and address nodes, is 128 bytes of regular length.The file item node section, be docile and obedient preface and be respectively: index part comprises file size, the 8 byte creation-times of 8 byte file names, 64 bytes, the retaining space of 44 bytes, and last 4 bytes are the index of address block.
The address node is total to nybble with 0X00000001 to begin; Be by document order arranged blocks allocation index subsequently, four bytes of each block address index, totally 30, with last 4 bytes of the file item node index that is address block.The end of file when the address index is 0X00000000.
In the present embodiment, data comprise video data and voice data in the data block.Each piece can independently be decoded.Data comprise data directory, video data, voice data successively in the data block, and a byte comprises frame index, audio index in the piece in the piece, these index by side-play amount, size of data and timing code totally 16 form;
Be initiated with the index of frame piece and audio block in this piece at the data segment of data block, the timing code that comprises start address, frame sign and this frame of each frame, the voice data index is closelyed follow thereafter as the index of a frame, if like this system definition gop size be n, in each piece index, comprised n+1 index point so.Each piece has been stored the video data of an image sets and time period corresponding audio data therewith.
In addition, described in the present embodiment file system is applicable to the environment that the multimedia material is had unified compression method, especially better effects if is being arranged under the situation of interframe compression.When setting up the corresponding relation of piece and image sets on the disk, adopt following method to carry out, concrete steps are as follows: the size of at first determining image sets is the N frame, and then according to fixed bit rate B specified data block size, the index record of piece is in the index block of disk.
The size of data block equals ((N/25) * B+ (N/25) * 48K+N*16)/512+1) * 512.
In the above-mentioned formula, (N/25) * B is a video section length, and (N/25) * 48K is an audio-frequency unit length, and N*16 is the length of index and timing code part.The 512nd, the least unit of harddisk access, the block length of system divides are 512 integral multiples.
As shown in Figure 2, when adopting the medium file system store media files that the method for the invention sets up, at first before using disk,, determine the size of disk block according to above-mentioned formula, and format diskette according to user-selected compression parameters.
Secondly, in use: for non-read write command, create or deleted file, in index block, the disk block information that preservation or deleted file take, and revise the interior content relevant of system block with this document, finish the establishment and the disk allocation of file.
For read command, calculate the image sets at user's desire visit frame place earlier.From disk, read this image sets for the data that do not have in the disk buffering; For the existing data of disk buffering, find frame data according to the index information of this data block head, and return to the user.
For write order, the metadata cache that receives from the user at disk, is generated index information simultaneously, by the time after accepting complete image sets, the index of this image sets and data write-once disk, last use of in the index block of disk, registering this disk block.
Method of the present invention is not limited to the embodiment described in the embodiment, and those skilled in the art's technical scheme according to the present invention draws other embodiment, belongs to technological innovation scope of the present invention equally.

Claims (8)

1. the method for building up of a medium file system may further comprise the steps:
(1) at first establish the storage mode of media file on the disk, be about to disk and be divided into the district, comprise system region, index area and data field, the basic disk allocation unit is a piece;
(2) in the medium file system be that unit preserves media file then with the image sets on disk, the storage cell of media file is a data block, and each data block is preserved image sets data, and corresponding with the index entry of disk index area.
2. the method for building up of a kind of medium file system as claimed in claim 1, it is characterized in that: in the step (1), the data in magnetic disk of this document system distributes in the following ways: system region comprises layout, quantity of documents, the quantity of piece and the reference position of vacant disk block chained list of system, the index of index area include file clauses and subclauses and file, the essential information of file entries include file and piece index, include file metadata information in the essential information, data block that all have distributed and assignable data block composition data district.
3. the method for building up of a kind of medium file system as claimed in claim 1, it is characterized in that: comprise video data and voice data in the data block described in the step (2), each data block is independently decoding all, data in the data block comprise data directory, timing code, video data, voice data successively, a byte comprises frame index, audio index in the piece in the piece, and these index are made up of side-play amount and size of data.
4. the method for building up of a kind of medium file system as claimed in claim 3, it is characterized in that: on disk, set up data block in the step (2) and adopt following method to carry out: the size of at first determining image sets, and then according to fixed bit rate specified data block size, the index record of data block is in the index block of disk, and the size of data block is greater than the size of data of maximum image group.
5. the method for building up of a kind of medium file system as claimed in claim 1 or 2, it is characterized in that: in the step (2), the index entry of disk index area and the corresponding relation of data block are data block of index entry index of each index area, i.e. complete image sets of index and audio content thereof.
6. the method for building up of a kind of medium file system as claimed in claim 4, it is characterized in that: in the step (2), the index entry of disk index area and the corresponding relation of data block are data block of index entry index of each index area, i.e. complete image sets of index and audio content thereof.
7. the method for building up of a kind of medium file system as claimed in claim 1 or 2 is characterized in that: the image sets of described image sets after for compression.
8. the method for building up of a kind of medium file system as claimed in claim 5 is characterized in that: the image sets of described image sets after for compression.
CNB2005100841243A 2005-07-08 2005-07-08 Method for establishing medium file system Expired - Fee Related CN100418071C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100841243A CN100418071C (en) 2005-07-08 2005-07-08 Method for establishing medium file system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100841243A CN100418071C (en) 2005-07-08 2005-07-08 Method for establishing medium file system

Publications (2)

Publication Number Publication Date
CN1702633A true CN1702633A (en) 2005-11-30
CN100418071C CN100418071C (en) 2008-09-10

Family

ID=35632390

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100841243A Expired - Fee Related CN100418071C (en) 2005-07-08 2005-07-08 Method for establishing medium file system

Country Status (1)

Country Link
CN (1) CN100418071C (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096698A (en) * 2010-12-14 2011-06-15 青岛海信网络科技股份有限公司 Video data storage format, storage method and search method
CN102136290A (en) * 2011-04-21 2011-07-27 北京联合大学 Method for storing embedded real-time video files
CN102201005A (en) * 2011-05-20 2011-09-28 苏州安源汇信软件有限公司 Method for distributing streaming media enhanced file of file system
CN101872639B (en) * 2010-01-11 2013-02-13 杭州海康威视数字技术股份有限公司 Method and device for storing and retrieving image data on digital hard disk video recorder
CN103354097A (en) * 2013-07-03 2013-10-16 深圳市华威世纪科技股份有限公司 Video data storing method and system based on disk
CN105898350A (en) * 2015-01-16 2016-08-24 何湘 High-capacity film and television file caching method easy for P2P transmission and identification
CN109033231A (en) * 2018-07-03 2018-12-18 芜湖威灵数码科技有限公司 A method of extracting information from multimedia file
CN111866422A (en) * 2020-06-16 2020-10-30 普联技术有限公司 Video data uploading method, device, equipment and computer readable storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669640B (en) 2018-12-24 2023-05-23 浙江大华技术股份有限公司 Data storage method, device, electronic equipment and medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1231051C (en) * 1998-05-08 2005-12-07 皇家菲利浦电子有限公司 Method for storing compressed digital audio and video
US6438642B1 (en) * 1999-05-18 2002-08-20 Kom Networks Inc. File-based virtual storage file system, method and computer program product for automated file management on multiple file system storage devices

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101872639B (en) * 2010-01-11 2013-02-13 杭州海康威视数字技术股份有限公司 Method and device for storing and retrieving image data on digital hard disk video recorder
CN102096698A (en) * 2010-12-14 2011-06-15 青岛海信网络科技股份有限公司 Video data storage format, storage method and search method
CN102096698B (en) * 2010-12-14 2012-10-10 青岛海信网络科技股份有限公司 Video data storage format, storage method and search method
CN102136290A (en) * 2011-04-21 2011-07-27 北京联合大学 Method for storing embedded real-time video files
CN102201005A (en) * 2011-05-20 2011-09-28 苏州安源汇信软件有限公司 Method for distributing streaming media enhanced file of file system
CN103354097A (en) * 2013-07-03 2013-10-16 深圳市华威世纪科技股份有限公司 Video data storing method and system based on disk
CN105898350A (en) * 2015-01-16 2016-08-24 何湘 High-capacity film and television file caching method easy for P2P transmission and identification
CN109033231A (en) * 2018-07-03 2018-12-18 芜湖威灵数码科技有限公司 A method of extracting information from multimedia file
CN111866422A (en) * 2020-06-16 2020-10-30 普联技术有限公司 Video data uploading method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN100418071C (en) 2008-09-10

Similar Documents

Publication Publication Date Title
CN1702633A (en) Method for establishing medium file system
CN1279434C (en) Method for managing static imageson recording medium
US7337297B2 (en) Method and apparatus for recording data with pseudo-merge
JP4481889B2 (en) Data recording apparatus and method, program, and recording medium
US20050157599A1 (en) Data recording method, data recording device, data recording medium, data reproduction method, and data reproduction device
CN1649404A (en) Data processing apparatus, data processing method
US9015211B2 (en) Device for caching a scalable original file
CN1433003A (en) Method of recording sketch onto record medium
CN1303094A (en) Recording medium recorded with data structure and recording / reproducing method and equipment
US20110235995A1 (en) Methods for reserving index memory space in avi recording apparatus
CN1813303A (en) Storage device for storing different data formats
CN1269129C (en) Method for recording still image on recording medium
JP4241839B2 (en) Data and file system information recording apparatus and recording method
US20070166007A1 (en) Recording apparatus, recording method, program, encoding apparatus, and encoding method
CN1812550A (en) Video frequency source material synthesizing method
US20130198454A1 (en) Cache device for caching
CN101071617B (en) Reproducing apparatus and method
US7835614B2 (en) Data recording method, data recording apparatus, and data recording medium
US8565584B2 (en) Editing apparatus and editing method
JP2004363825A (en) Recording and reproducing device, recording and reproducing method, and recording medium and program therefor
CN101236767B (en) Editing apparatus and editing method
US20070019511A1 (en) Recording apparatus, recording methods, reading apparatus reading methods and programs
CN1832559A (en) Memory access method and device of digital video-audio data
CN102354517B (en) The data record method and device of virtual merging
CN1622201A (en) Hard disk data storing and reading method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20051130

Assignee: China Digital Video (Beijing) Limited

Assignor: Beijing Beida Founder Electronics Co., Ltd.|Peking University

Contract record no.: 2013990000782

Denomination of invention: Method for establishing medium file system

Granted publication date: 20080910

License type: Exclusive License

Record date: 20131122

LICC Enforcement, change and cancellation of record of contracts on the licence for exploitation of a patent or utility model
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080910

Termination date: 20190708