CN100578470C - Audio/video data access method and device based on raw device - Google Patents

Audio/video data access method and device based on raw device Download PDF

Info

Publication number
CN100578470C
CN100578470C CN200710067122A CN200710067122A CN100578470C CN 100578470 C CN100578470 C CN 100578470C CN 200710067122 A CN200710067122 A CN 200710067122A CN 200710067122 A CN200710067122 A CN 200710067122A CN 100578470 C CN100578470 C CN 100578470C
Authority
CN
China
Prior art keywords
block
data
audio
video data
disk
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.)
Expired - Fee Related
Application number
CN200710067122A
Other languages
Chinese (zh)
Other versions
CN101008919A (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN200710067122A priority Critical patent/CN100578470C/en
Publication of CN101008919A publication Critical patent/CN101008919A/en
Application granted granted Critical
Publication of CN100578470C publication Critical patent/CN100578470C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

This invention discloses one audio frequency data memory method based on bare device, which comprises the following steps: aligning magnetic disc space into several blocks and designing each with certain number and storing the blocks into each disc space block for operations in writing or reading data. This invention has property for lossless data to keep data in electricity break.

Description

Audio/video data access method and device based on raw device
Technical field
The present invention relates to digital audio/video and technical field of data storage, be meant on a kind of embedded system audio/video data access method and device specifically based on raw device.
Background technology
The embedded digital audio-visual system is the same with PC, all has the fixed disk file system.The fixed disk file system of embedded digital audio-visual system can be divided into two classes, and the one, the file system identical with PC, second kind is special the exploitation, is fit to the dedicated file system of specific store purpose.
At present, the file system that is adopted in the embedded digital audio-visual system has more kind, as the compatible file system of MS-DOS, the compatible file system of UNIX, the compatible file system of Windows etc.
The FAT file system that the PC system uses, can't manage for the big packet (several G are to the data of tens of G) that long-time audio, video data video recording produces, can only carry out subpackage, with one section complete video recording, be divided into several little literature kit, as file of automatic formation in 5,10,30 minutes, perhaps 150M, 200M are as a file.Therefore be easy to generate frame losing phenomenon between bag and the bag, hard disc magnetic head need read and write data and file index continually simultaneously, and magnetic head is frequently beated, the as easy as rolling off a log hard disk failure that causes.After hard disk record simultaneously is full, need the whole segment file of deletion, but new and old file size difference can produce a large amount of fragments space on hard disk, influence the use and the system effectiveness of hard disk.In addition, FAT file system files allocation table damages easily, easily causes Video Document to lose.
The dedicated file system of special research and development can be managed DISK to Image expeditiously, and the packet size of not recorded a video influences, and begins to ending up being a video recording section from video recording, and the video recording segment length can be from several seconds to tens hour, and data can be from several K to tens T.Adopt this hard disk management mode, overcome the defective that the FAT system exists long-time management of video.Owing to do not have the subpackage video recording, therefore do not have frame losing phenomenon between bag and the bag yet; Magnetic head does not need frequently to read and write data and file index, prolongs hard disk serviceable life; After the hard disk record is full, adopt certain take-back strategy to carry out space reclamation, do not have the hard disk fragment.The mistake of hard disk part can not influence other video recording.Under the situation of sudden power, also can preserve the outage image of preceding moment; Original Video Document dish data and PC are incompatible, can't directly revise on PC, guarantee the confidentiality and the reliability of source book.
The operation-interface that dedicated file system adopts independent written program or operating system to provide is usually directly visited disk.Cross the buffering of file system and operating system during visit, application program is directly finished the read-write to disk, and the interface of this direct visit disk is called raw device, raw partition or raw partition.
Summary of the invention
The invention provides a kind of audio/video data access method safe, stable, quick, easy and simple to handle.
A kind of audio/video data access method based on raw device is assigned as disk space several blocks in advance, and is each block assignment of allocation sequence number; Wherein,
The ablation process of data is:
A. the attribute according to data to be written generates index;
B. be that unit carries out subpackage with data to be written, and every bag data are increased identification marking and time mark with the block;
C. judge whether disk space current block to be written has remaining space,, then distribute an idle block or empty and reuse one and used block according to customer requirements if do not have;
D. with data write area block buffer to be written, treat that the block buffer zone completely carries out address translation to it in the back, writes the corresponding physical disk space;
The process that reads of data is:
E. calculate the position of data to be read according to data read request in disk space;
F. judge whether data to be read exist in current reading in the buffer memory,, change, read the corresponding physical disk space and write corresponding block buffer zone then according to the qualified block of indexed search, and with its address if do not have;
G. corresponding packet in the reading of data buffer memory;
H. packet is converted to the audio, video data form, checks its legitimacy, and data are returned to caller.
Described block comprises reserved block and the block that is used for the function expansion;
Block comprises reserved block, is used to write down the information block that block is set up information such as sequence number, Time Created and operating position, is used to store data and indexed data sub-block;
The data sub-block comprises reserved block, audio frequency and video index block, index backup block and audio, video data block, the block key frame index of audio frequency and video index block stores correspondence, index backup block is used to back up audio frequency and video index block, audio, video data block stores audio, video data frame, the audio, video data block is made up of key frame data piece and frame data piece.
The present invention also provides a kind of audio/video data access device based on raw device, comprising:
The audio, video data operation-interface is used to provide the interface of audio, video data read-write operation.
Index maker is used for generating index information according to data attribute;
The audio, video data converter is used for audio, video data is carried out format conversion, and every bag data are increased identification marking and time mark;
The block operations manager is used for the disk space of physical disk is carried out the block distribution, divides and reclaims, and block position and disk position conversion Calculation and block buffer zone are safeguarded;
Disk administrator is used for physical disk is carried out the nothing buffering direct read operation of assigned address;
Allocation manager when being used for improper audio/video data access logic, providing and forces the function that stops or enabling disk and block.
Audio, video data operation-interface, audio, video data converter, block operations manager, disk administrator are docile and obedient with physical disk that preface is two-way to be connected, index maker two ends unidirectional connection audio, video data operation-interface and block operations manager, allocation manager is connected with the audio, video data operation-interface is unidirectional, is connected with block operations manager and disk administrator are two-way.
The present invention is that unit carries out segmentation with the block with audio, video data when the storage audio, video data, and the size of block is fixed, and only is the address modification operation owing to switch block, can therefore not produce operating delay, also just can not cause loss of data.
There is very strong locality in the present invention when storage and playback audio, video data, data are write disk in proper order with the form of piece, can significantly reduce magnetic disc head moves, simultaneously, the data index is read buffer memory and delay is write in advance, significantly reduced visit, prolonged the serviceable life of disk effectively the disk index area.
The present invention uses simple two-stage index structure to disk space management, index is corresponding one by one with block, all operations to index and block all is an atomic operation, there is not inconsistent state in the operating process, interrupt in the middle of any operation, store status is consistent, therefore can still guarantee data security under the situation of system exception outage.
With respect to traditional FAT file system arrangement, the present invention has the advantages that space junk is lost and do not had to no packetized data, can not cause the loss of data of having preserved when abnormal power-down, and simultaneously data access locality is strong, helps prolonging hard disk serviceable life; With respect to other dedicated file systems, the present invention has better space reclamation strategy and partition strategy, helps effective utilization of hard drive space, provides support to T level mass-memory unit simultaneously.
Description of drawings
Fig. 1 is the structural representation block diagram of audio/video data access device of the present invention;
Fig. 2 is the structural representation block diagram of block data of the present invention;
Fig. 3 is the operation schematic block diagram of audio, video data ablation process of the present invention;
Fig. 4 reads the operation schematic block diagram of process for audio, video data of the present invention.
Embodiment
As shown in Figure 1, a kind of audio/video data access device based on raw device comprises:
Audio, video data operation-interface 110 is used for providing to the embedded digital audio-visual system interface of audio, video data read-write operation;
Index maker 120 is used for generating index information according to data attribute;
Audio, video data converter 160 is used for audio, video data is carried out format conversion, and every bag data are increased identification marking and time mark;
Block operations manager 130 is used for the disk space of physical disk 150 is carried out the block distribution, divides and reclaims, and block position and disk position conversion Calculation and block buffer zone are safeguarded;
Disk administrator 140 is used for physical disk 150 is carried out the nothing buffering direct read operation of assigned address;
The function that provides pressure to stop or enabling disk and block is provided outside normal audio/video data access logic allocation manager 170.
Audio, video data operation-interface 110, audio, video data converter 160, block operations manager 130, disk administrator 140 are docile and obedient with physical disk 150 that preface is two-way to be connected, index maker 120 two ends unidirectional connection audio, video data operation-interface 110 and block operations manager 130, allocation manager 170 and 110 unidirectional connections of audio, video data operation-interface are with block operations manager 130 and 140 two-way connections of disk administrator.
Block operations manager 130 is assigned as several blocks with the disk space of physical disk 150 in advance, and as shown in Figure 2, each block is formed by reserved block 210 and block 220, and reserved block 210 is used for the function expansion.
Block 220 is made up of reserved block, information block 230 and data sub-block 240, and information block 230 is used to write down block and sets up information such as sequence number, Time Created and operating position.
Data sub-block 240 is used to store data and index, form by reserved block, audio frequency and video index block 250, index backup block 260 and audio, video data block 270, the corresponding block 270 key frame index of audio frequency and video index block 250 storages, index backup block 260 is used to back up audio frequency and video index block 250, can reduce nearest audio frequency and video index block 250 data when audio frequency and video index block 250 lost efficacy.
Audio, video data block 270 storage audio, video datas are made up of key frame data piece 280 and frame data piece 290, and the starting block of audio, video data block 270 must be a key frame data piece 280.
As shown in Figure 3, when physical disk 150 is write audio, video data, data are through 110 inputs of audio, video data operation-interface, index maker 120 generates index information according to data attribute, if data are video and are the first packet data of key frame, then it is generated index, other data do not generate index.This index is used for the retrieval and the playback of audio, video data, can accelerate the speed of playback retrieval with this, because during data read, begins nonsensically from non-key frame, therefore only key frame is carried out index.
Audio, video data converter 160 is that unit carries out segmentation with the block with audio, video data, and every bag data are increased identification marking and time mark, can discern ruined data with this when reading.
Block operations manager 130 judges whether the current block of disk space has remaining space, if do not have, then distributes an idle block or has used block according to one of customer requirements recovery, is carried out according to the block take-back strategy by block operations manager 130 when block reclaims.
Disk administrator 140 is treated the full laggard row address conversion of buffer zone with data write area block buffer, writes corresponding physical disk 150 spaces.
As shown in Figure 4, when physical disk 150 read audio, video data, block operations manager 130 calculated the position of data to be read according to data read request.
Whether disk administrator 140 judgment data are present in current reading in the buffer memory, if do not exist, then according to the qualified block of indexed search, after the address of this block changed, read corresponding physical disk 150 spaces and write area block buffer by disk administrator 140, the data of correspondence in the block operations manager 130 reading of data buffer memorys, carry out format conversion by 160 pairs of data that read of audio, video data converter, and check its legitimacy, by audio, video data operation-interface 110 real data is returned to caller.

Claims (2)

1, a kind of audio/video data access method based on raw device comprises that data write and read two processes, is characterized in that: in advance disk space is assigned as first order reserved block and block by pre-sizing; Block is assigned as second level reserved block, information block and plurality of data sub-block by pre-sizing, and be each data sub-block assignment of allocation sequence number, wherein the information block is used to write down the information of setting up sequence number, Time Created and operating position of each data sub-block; Each data sub-block is assigned as third level reserved block, audio frequency and video index block, index backup block and several audio, video data blocks by pre-sizing again, and wherein audio frequency and video index block is used for that all comprise the frame data piece position of key frame in the audio, video data block of index correspondence; Wherein,
The ablation process of data is:
A. the attribute according to data to be written generates index;
B. be that unit carries out subpackage with data to be written with the frame data piece, and each packet is increased identification marking and time mark;
C. judge whether the current data sub-block of carrying out write operation of disk space to be written has remaining space,, then distribute the data sub-block of a free time or empty and reuse a data sub-block of usefulness according to customer requirements if do not have;
D. data to be written are write the current data sub-block buffer zone that carries out write operation, treat that the current data sub-block buffer zone that carries out write operation completely carries out address translation to the current data sub-block buffer zone that carries out write operation in the back, writes the current data sub-block buffer zone corresponding physical disk space that carries out write operation;
The process that reads of data is:
E. calculate the position of data to be read according to data read request in disk space;
F. judge whether data to be read are present in the current data sub-block buffer zone that carries out read operation, if do not have, then according to the qualified data sub-block of indexed search, and qualified data sub-block carried out address translation, read the physical disk space at qualified data sub-block place and write the current data sub-block buffer zone that carries out read operation;
G. corresponding packet in the reading of data buffer memory;
H. check the packet legitimacy that reads, the packet that reads is converted to the audio, video data form, and the audio, video data after will changing returns to caller.
2. audio/video data access device based on raw device is characterized in that comprising:
Audio, video data operation-interface (110) is used to provide the interface of audio, video data read-write operation;
Index maker (120) is used for generating index information according to data attribute;
Audio, video data converter (160) is that unit carries out subpackage with data to be written with the frame data piece, and each packet is increased identification marking and time mark;
Block operations manager (130) is used for the disk space of physical disk is carried out the block distribution, divides and reclaims, and block position and disk location address conversion Calculation and block buffer zone are safeguarded;
Disk administrator (140) is used for physical disk is carried out the nothing buffering direct read operation of assigned address;
Allocation manager (170) when being used for improper audio/video data access, providing and forces the function that stops or enabling disk and block;
Between audio, video data operation-interface (110) and audio, video data converter (160), between audio, video data converter (160) and block operations manager (130), between block operations manager (130) and disk administrator (140), between disk administrator (140) and physical disk (150), be two-way the connection between allocation manager (170) and block operations manager (130) and between allocation manager (170) and disk administrator (140), audio, video data operation-interface (110) is to index maker (120), index maker (120) to block operations manager (130) and audio, video data operation-interface (110) to allocation manager (170) is unidirectional connection.
CN200710067122A 2007-01-31 2007-01-31 Audio/video data access method and device based on raw device Expired - Fee Related CN100578470C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200710067122A CN100578470C (en) 2007-01-31 2007-01-31 Audio/video data access method and device based on raw device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200710067122A CN100578470C (en) 2007-01-31 2007-01-31 Audio/video data access method and device based on raw device

Publications (2)

Publication Number Publication Date
CN101008919A CN101008919A (en) 2007-08-01
CN100578470C true CN100578470C (en) 2010-01-06

Family

ID=38697360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200710067122A Expired - Fee Related CN100578470C (en) 2007-01-31 2007-01-31 Audio/video data access method and device based on raw device

Country Status (1)

Country Link
CN (1) CN100578470C (en)

Families Citing this family (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599167B (en) * 2008-06-03 2013-02-20 株式会社理光 Access method of memory
CN101510177B (en) * 2009-03-06 2012-04-18 成都市华为赛门铁克科技有限公司 Storage method and computer system
CN101556557B (en) * 2009-05-14 2011-03-23 浙江大学 Object file organization method based on object storage device
CN102023821A (en) * 2010-12-16 2011-04-20 成都市华为赛门铁克科技有限公司 Disc space management method and system
CN102722555A (en) * 2012-05-28 2012-10-10 北京网尚数字电影院线有限公司 Method and system for caching multimedia file
CN102819495B (en) * 2012-08-10 2015-01-07 东方网力科技股份有限公司 Data storage method and data storage device
CN103079087A (en) * 2012-12-27 2013-05-01 广东威创视讯科技股份有限公司 Video storage system and load balancing method thereof
CN103164528B (en) * 2013-03-29 2016-02-24 苏州皓泰视频技术有限公司 A kind of index establishing method of audio, video data
JP5837013B2 (en) * 2013-09-18 2015-12-24 キヤノン株式会社 Information processing system, information processing apparatus, information processing method, and program
CN103699613A (en) * 2013-12-17 2014-04-02 迈普通信技术股份有限公司 Method and system for buffering file system in embedded system
CN103761056A (en) * 2014-01-17 2014-04-30 浪潮电子信息产业股份有限公司 Stream data storage method in video monitoring application
CN104020964A (en) * 2014-06-18 2014-09-03 浪潮集团有限公司 Embedded video storage method
CN104063187B (en) * 2014-07-08 2015-06-17 珠海安联锐视科技股份有限公司 Hard disk file system suitable for security application and operation method thereof
CN105630401A (en) * 2014-11-04 2016-06-01 中兴通讯股份有限公司 Data storage method, data storage device, data reading method and data reading device
CN105518612A (en) * 2015-07-29 2016-04-20 深圳市锐明技术股份有限公司 Write-in method and apparatus for monitoring data
CN106407129B (en) * 2015-08-03 2019-12-06 四川效率源信息安全技术股份有限公司 data extraction method of embedded security equipment
CN105516548B (en) * 2015-11-27 2019-01-11 中央电视台 A kind of pre-reading method of files and device
CN106681657A (en) * 2016-11-24 2017-05-17 天津津航计算技术研究所 Dedicated file system application method based on solid state disk
CN106649722B (en) * 2016-12-23 2020-09-08 郑州天迈科技股份有限公司 Monitoring system high-frequency data storage and query method
TWI731063B (en) * 2017-04-13 2021-06-21 物聯智慧科技(深圳)有限公司 Processing and producing method for an av file
CN108228479B (en) * 2018-01-29 2021-04-30 深圳市泰比特科技有限公司 Embedded FLASH data storage method and system
CN108509213B (en) * 2018-03-15 2021-05-07 广州悦世界信息科技有限公司 Method for updating and protecting mobile game data access
CN109496292B (en) * 2018-10-16 2022-02-22 深圳市锐明技术股份有限公司 Disk management method, disk management device and electronic equipment
CN109830249B (en) * 2018-12-29 2021-07-06 百度在线网络技术(北京)有限公司 Data processing method, device and storage medium
CN109874049B (en) * 2019-01-23 2021-04-27 杭州雄迈集成电路技术股份有限公司 Method for optimizing and extracting video frame reading speed
CN110221782A (en) * 2019-06-06 2019-09-10 重庆紫光华山智安科技有限公司 Video file processing method and processing device
CN110727822B (en) * 2019-11-19 2022-02-08 北京网聘咨询有限公司 Online learning system based on personalized recommendation
CN113703667A (en) * 2021-07-14 2021-11-26 深圳市有为信息技术发展有限公司 File system processing method and device for storing data in real time, vehicle-mounted terminal and commercial vehicle

Also Published As

Publication number Publication date
CN101008919A (en) 2007-08-01

Similar Documents

Publication Publication Date Title
CN100578470C (en) Audio/video data access method and device based on raw device
CN102136290A (en) Method for storing embedded real-time video files
CN103577121B (en) A kind of highly reliable linear file access method based on Nand Flash
CN100362492C (en) Digital hard disc recorder file managing method for preventing file fragment production
CN103226965B (en) Based on the audio/video data access method of time bitmap
CN104063187B (en) Hard disk file system suitable for security application and operation method thereof
CN108763531A (en) A kind of MDVR document storage systems and its operation method
CN100383881C (en) Method for protecting hardware key information area in embedded device
WO2014067270A1 (en) Database storage system based on compact disk and method using the system
CN103514249A (en) Method and system for automatic data reduction and storage device
KR20100065786A (en) Cache synchronization method and system for fast power-off
KR950033872A (en) Semiconductor disk device
CN102053879A (en) Self-recovery real-time file system based on FLASH
CN103164528A (en) Index establishing method for audio/video data
CN100580669C (en) Method for realizing cache memory relates to file allocation table on Flash storage medium
CN103092849A (en) File system cluster management method
CN100543748C (en) A kind of method and system of utilizing file allocation table to carry out the file tracking
CN100440352C (en) Power failure recovery method
CN100578650C (en) Data processing method for novel intelligent tape unit
JPWO2007072843A1 (en) Recording apparatus for recording content on a plurality of recording media and control method therefor
CN102622315A (en) Method, device and system for controlling disc visiting
TW200605034A (en) Information storage medium, recording/reproducing apparatus and recording/reproducing method
CN105653385B (en) A kind of vehicle-mounted kinescope method
CN113535086B (en) Acceleration method for reconstruction in solid state disk
KR20190089796A (en) Video managing apparatus and method of surveillance systems

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100106

Termination date: 20190131

CF01 Termination of patent right due to non-payment of annual fee