[go: up one dir, main page]

CN105653385B - A kind of vehicle-mounted kinescope method - Google Patents

A kind of vehicle-mounted kinescope method Download PDF

Info

Publication number
CN105653385B
CN105653385B CN201511028772.7A CN201511028772A CN105653385B CN 105653385 B CN105653385 B CN 105653385B CN 201511028772 A CN201511028772 A CN 201511028772A CN 105653385 B CN105653385 B CN 105653385B
Authority
CN
China
Prior art keywords
file
video
head
information
frame
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.)
Active
Application number
CN201511028772.7A
Other languages
Chinese (zh)
Other versions
CN105653385A (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.)
Shenzhen Emperor Technology Co Ltd
Original Assignee
SHENZHEN LANTAIYUAN INFORMATION TECHNOLOGY 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 SHENZHEN LANTAIYUAN INFORMATION TECHNOLOGY Co Ltd filed Critical SHENZHEN LANTAIYUAN INFORMATION TECHNOLOGY Co Ltd
Priority to CN201511028772.7A priority Critical patent/CN105653385B/en
Publication of CN105653385A publication Critical patent/CN105653385A/en
Application granted granted Critical
Publication of CN105653385B publication Critical patent/CN105653385B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/073Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a memory management context, e.g. virtual memory or cache management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1068Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices in sector programmable memories, e.g. flash disk

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Management Or Editing Of Information On Record Carriers (AREA)

Abstract

The invention belongs to on-vehicle information technical field of memory, disclose a kind of vehicle-mounted kinescope method, the following steps are included: checking system information area, operation is formatted to storage medium, if total number of files mark is destroyed, according to storage medium situation calculation document sum and system information area is write back again;It verification to file information head and checks, file information head is restored according to video information head if being destroyed, if video information head is destroyed, according to the frame originating point information and I frame index area Information recovering video information head in video file;It is rebuild and is indexed according to video file, search for the frame head in video file, according in frame head write-in index;According to the new and old mark of system information in front, each newest video recording section in channel in storage medium is found out, starts to record a video;If current video file record is full, since oldest video file cover.The present invention can be improved video recording efficiency, can repair to abnormal.

Description

A kind of vehicle-mounted kinescope method
Technical field
The invention belongs to on-vehicle information technical field of memory more particularly to a kind of vehicle-mounted kinescope methods.
Background technique
File system is operating system for clearly (commonly disk also to have based on NAND Flash's storage equipment Solid state hard disk) or the file on subregion method and data structure, i.e. the method for constituent act on a storage device.Operating system In be responsible for management and the software mechanism of storage file information is known as file management system, abbreviation file system.File system is by three Part forms: the interface of file system, to the software assembly of object manipulation and management, object and attribute.From the point of view of system perspective, File system is to carry out tissue and distribution to the space of file-storage device, is responsible for file and stores and protect to the file of deposit The system of shield and retrieval.Specifically, it, which is responsible for user, establishes file, deposit is read, modification, dump file, controls file Access, file etc. is cancelled when user does not use.
General file system is because it has the structure of its complexity, because he will meet a variety of different applications, such as Fat32, ntfs, ext4.Their versatility is good, but is being applied in vehicle-mounted video recording occasion, then is not necessarily applicable in.It is first First these file system, which suffer from complicated table structure, will use some special tool ability when these tables are impaired When the file that you lose is retrieved, and writes these file system, it is easy to produce fragment.Currently available technology has had A kind of predistribution technology distributes space directly to table, forever motionless, but is like that there is no problem in general video recording occasion, But when being applied to vehicle-mounted, generate fierce collision in automobile (in the case that certain disk itself is not by physical damage) Or it when strong electromagnetic interference, often goes wrong, only goes to read it even if not removing written document table, will also result in the damage of table It is bad.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of vehicle-mounted kinescope method, can be improved video recording efficiency, can be to exception It is repaired.
The embodiments of the present invention are implemented as follows:
A kind of vehicle-mounted kinescope method, comprising the following steps:
Step 1: checking system information area, operation is formatted to storage medium, and check other identifier, if literary Part sum mark is destroyed, then according to storage medium situation calculation document sum and writes back system information area again;
Step 2: check file information head, verification to file information head and check, according to record if being destroyed As information header recovery file information head, if video information head is destroyed, according to the frame originating point information and I frame rope in video file Draw area's Information recovering video information head;
It is indexed step 3: being rebuild according to video file, searches for the frame head in video file, be written in index according to frame head, The picture recorded in video file to be synchronized in video information head;
Step 4: the new and old mark according to system information in front, finds out each newest video recording section in channel in storage medium, Start to record a video;
Step 5: in video process, if current video file record is full, since oldest video file cover.
Wherein, it when occurring bad block in index file, is marked in bad block management area and finds out replacement block and be replaced.
Wherein, power on and off operation is carried out to storage medium, finds storage medium node again, reinitializes file system System.
Wherein, the storage medium is hard disk or flash card.
The embodiment of the present invention is by directly writing naked disk, the possibility for avoiding traditional file systems table from being destroyed, while no longer By complicated file system write magnetic disk, magnetic head can be efficiently utilized, it can be according to other regions when key area is destroyed It is repaired, while no longer each channel is saved as a file, but storage is gone down in sequence, avoids the inclined back and forth of magnetic head It moves.
Detailed description of the invention
Fig. 1 is the method flow diagram of vehicle-mounted video recording in the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
The embodiment of the present invention is by directly writing naked disk, the possibility for avoiding traditional file systems table from being destroyed, while no longer By complicated file system write magnetic disk, magnetic head can be efficiently utilized, it can be according to other regions when key area is destroyed It is repaired, while no longer each channel is saved as a file, but storage is gone down in sequence, avoids the inclined back and forth of magnetic head It moves.
Specific implementation of the invention is described in detail below in conjunction with specific embodiment:
The present invention is based on video recording is efficiently read and write using naked disk, directly operate naked disk, storage medium include hard disk and Flash memory introduces the contents of the present invention in order to detailed, some concepts is illustrated or is defined below by taking hard disk as an example:
Definition one: naked disk;There is no any universal document system (such as fat32, ntfs, ext4 etc.) on disk.
Definition two: system information area;For describing the subregion of entire hard disk information, flag bit therein includes 1. file systems System version;2. whether disk formats mark;3. hard disk size information;4. video file is total;5. verification and
Definition three: file information head;Information for describing all to record a video inside video file, including 1. video recording texts Part initial time terminates the time;2. total length of recording a video in file;3. the sum of all i frames in this document;4. being wrapped in this file Total attribute (booting, timing, alarm) of the video recording contained;5. section of recording a video sum;6. the new and old mark of video file;7. video recording text The use state (having used, be not used, bad block occur) of part;8. verification and.
Define four: video information head: the case where for describing each video recording section, including 1. sections are recorded a video initial time, end The only time;2. segment length of recording a video;3. section i frame number of recording a video;4. resolution ratio of recording a video;5. originating i frame in the offset in I frame index area.
Definition five: frame head: for describing the information of each frame.1. channel number belonging to the frame;2. the frame time is rubbed with the hands;3. the frame Length;4. Frame Properties (P frame I frame audio frame) 5. verification and.
Define the frame index area six: I: for storing I frame all in video file.Frame head goes out when playing back video recording in the future It now damages, bad frame can be skipped according to I frame index and continues to play.
It defines seven: bad block management area: for managing the bad block of index file, when bad block occurs in index, finding and replace Block is changed to be replaced.
Define eight: video file: there are two types of the files of hard disk, and one is index files, and one is video file, video recording texts There is video recording section in part again.Video file and video recording section are the relationships for including, i.e. have multiple video recording sections in a video file.And it records As then including I frame index area and bad block management area in file.Only one index file 128M in hard disk, other are video recording text entirely Part, each video file are 128M, and the number of video file is assigned to maximum according to the size adaptation of hard disk, each There is a lot of video recording section in video file, at most no more than 250.Each video file corresponds to a file information head, Each corresponding video information head of video recording section.
Define nine: index file: including system information head in 128M index file, file information head, video information head is bad Block directorial area, only one index file in hard disk.
As shown in Figure 1, a kind of vehicle-mounted kinescope method includes the following steps:
Step 1: checking system information area, judges whether to format, if unformatted, need that user is prompted to carry out It formats;If formatted, other identifier is checked, if it find that total number of files identifies (the 4th of system information area The content of definition) it is destroyed, then it is totalized again according to hard disk situation, is written back system information area;Wherein, it formats specific Are as follows: it is formatted into vehicle-mounted file system, this file system is system information area, system information head, video information head, bad block Disk is written in directorial area by way of naked write and common formatting is different, without so-called partitions of file table;According to Hard disk situation totalizes specifically: reading the size of hard disk, system information area, system information by the driving of hard disk first Head, video file head in bad block management area all indexed files, account for 128M.Other data files each account for 128M.According to hard The total amount of disk can calculate the sum of video file.
Step 2: check file information head, verification to file information head and check, if it find that being destroyed then root Restore file information head according to video information head.During recovery, if it find that video information head has the case where destruction, then root According in video file frame head (define five) and I frame index area restore video information head.
It is indexed step 3: being rebuild according to video file, this index includes file information head and video information head, last time record Picture there is also in video file, but be not synchronized to video information face gone in front, at this moment must synchronize, otherwise this Section video recording will be lost.Synchronous process is the frame head in search video file step by step, is then written to rope according to frame head Draw, exactly the information inside frame head is write to index the inside by way of cumulative and go.
Step 4: finding out the file that each channel needs to start video recording, there is a flag bit to indicate in file information head Whether record completely, there are one the new and old markers of file.When initialization, the file information of last time each channel video recording is found Head looks for the file of next free time to start to record if having recorded full 128M, if do not recorded completely, continues newly to open video recording letter Breath head continues to record.
Step 5: in video process, if when file record is full (formatting has been allocated in advance), from oldest File, which rises, to be started to cover.
Abnormality processing:
1. Bad Block Management: when occurring bad block in index file, bad block management area be marked and find out replacement block into Row replacement, it is total at most no more than the damage of 128 file information heads that bad block management provides hard disk index file, once it is more than just Think this hard disk corruptions.It is bad to describe that just in bad block management area a new file information head is opened up when being not above The corresponding video file of that file information head.
2. shake abnormality processing: when vehicle in the process of moving, hard disk is easy the interference being shaken, and file system also can There is exception, at this moment need to carry out abnormality processing, the abnormality processing mode taken at present is to carry out power-on and power-off, Zhi Houchong to hard disk New to find hard disk node, this is the hard disk node generated according to hard drive.Generally node/dev/ is mapped to udev tool On diskHDD, file system, the process of the repetition first step to the 5th step are reinitialized.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to restrict the invention, all in essence of the invention Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.

Claims (4)

1. a kind of vehicle-mounted kinescope method, which comprises the following steps:
Step 1: checking system information area, operation is formatted to storage medium, and check other identifier, if file is total Number mark is destroyed, then according to storage medium situation calculation document sum and writes back system information area again;It formats specifically: It is formatted into vehicle-mounted file system, this file system is system information area, system information head, video information head, bad block pipe Disk is written by way of naked write in reason area;
Step 2: check file information head, verification to file information head and check, is believed if being destroyed according to video recording Cease head restore file information head, if video information head is destroyed, according in video file frame originating point information and I frame index area Information recovering video information head;
It is indexed step 3: being rebuild according to video file, searches for the frame head in video file, be written in index according to frame head, it will The picture recorded in video file is synchronized in video information head;Synchronous process is the frame in search video file step by step Head is then written to index according to frame head, exactly the information inside frame head is write to index the inside by way of cumulative and goes;
Step 4: the new and old mark according to system information in front, finds out each newest video recording section in channel in storage medium, start Video recording;
Step 5: in video process, if current video file record is full, since oldest video file cover.
2. a kind of vehicle-mounted kinescope method according to claim 1, it is characterised in that: when occurring bad block in index file, It is marked in bad block management area and finds out replacement block and be replaced.
3. a kind of vehicle-mounted kinescope method according to claim 1, it is characterised in that: carry out power-on and power-off behaviour to storage medium Make, finds storage medium node again, reinitialize file system.
4. a kind of vehicle-mounted kinescope method according to claim 1, it is characterised in that: the storage medium is hard disk or flash memory Card.
CN201511028772.7A 2015-12-31 2015-12-31 A kind of vehicle-mounted kinescope method Active CN105653385B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511028772.7A CN105653385B (en) 2015-12-31 2015-12-31 A kind of vehicle-mounted kinescope method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511028772.7A CN105653385B (en) 2015-12-31 2015-12-31 A kind of vehicle-mounted kinescope method

Publications (2)

Publication Number Publication Date
CN105653385A CN105653385A (en) 2016-06-08
CN105653385B true CN105653385B (en) 2019-02-01

Family

ID=56491170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511028772.7A Active CN105653385B (en) 2015-12-31 2015-12-31 A kind of vehicle-mounted kinescope method

Country Status (1)

Country Link
CN (1) CN105653385B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107506253B (en) * 2017-08-11 2021-05-18 北京东土科技股份有限公司 Method and device for storing abnormal information of operating system
CN110737389B (en) * 2018-07-19 2023-05-16 杭州海康威视系统技术有限公司 Method and device for storing data
CN110333887B (en) * 2019-07-04 2023-04-14 郑州天迈科技股份有限公司 Vehicle-mounted machine video recording module optimization system
CN115002375A (en) * 2022-06-01 2022-09-02 南京甄视智能科技有限公司 Method and system for realizing video playback by positioning key frame through index file

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3704363A (en) * 1971-06-09 1972-11-28 Ibm Statistical and environmental data logging system for data processing storage subsystem
CN103404146A (en) * 2013-03-11 2013-11-20 华为技术有限公司 Video file repairing method and device
CN103474087A (en) * 2013-09-06 2013-12-25 南京南自信息技术有限公司 Video recording file management method and device for easily preventing disk fragments from being generated
CN103544124A (en) * 2012-07-16 2014-01-29 上海塞尚通信技术有限公司 Access method of Nand Flash memorizer
CN104301681A (en) * 2014-10-22 2015-01-21 厦门市美亚柏科信息股份有限公司 Monitoring video restoration method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3704363A (en) * 1971-06-09 1972-11-28 Ibm Statistical and environmental data logging system for data processing storage subsystem
CN103544124A (en) * 2012-07-16 2014-01-29 上海塞尚通信技术有限公司 Access method of Nand Flash memorizer
CN103404146A (en) * 2013-03-11 2013-11-20 华为技术有限公司 Video file repairing method and device
CN103474087A (en) * 2013-09-06 2013-12-25 南京南自信息技术有限公司 Video recording file management method and device for easily preventing disk fragments from being generated
CN104301681A (en) * 2014-10-22 2015-01-21 厦门市美亚柏科信息股份有限公司 Monitoring video restoration method and device

Also Published As

Publication number Publication date
CN105653385A (en) 2016-06-08

Similar Documents

Publication Publication Date Title
CN108319602B (en) Database management method and database system
CN105653385B (en) A kind of vehicle-mounted kinescope method
US20080059736A1 (en) Storage system and backup method
CN106600750B (en) A kind of method of circulation recording, system and automobile data recorder
CN104811645B (en) A kind of embedded Video data storage method
US9916323B2 (en) Support for worm cartridges realized by linear tape file system (LTFS)
CN102999399B (en) The method and apparatus that a kind of JBOD array is automatically renewed
JP2017079053A (en) Methods and systems for improving storage journaling
US11750784B2 (en) Automatic video file repair method and system
CN104462148B (en) A kind of data storage and management method and device
CN104572762A (en) Method and device for deleting and recovering video files
US7234078B2 (en) Data recovery method and data recording apparatus
US9323622B2 (en) Progress recording method and recovering method for encoding operation on storage device
CN100383881C (en) A method for protecting key information areas of hard disks in embedded devices
US9467734B2 (en) Storing method and processing device thereof
CN105260130B (en) A kind of reading/writing method of Seagate hard-disk system file
CN110399098A (en) A kind of data processing method and electronic equipment
EP1914751A2 (en) Data recording and recovery method for an optical storage medium and computer-readable storage medium using the method
CN104504349B (en) A kind of Video data safe storage device and method
US20090240905A1 (en) Real-time backup method for single storage medium
CN100525449C (en) A method of fault-tolerant for file playing
CN101573756B (en) Ways to Recover a Failed Hard Drive of a Personal Video Recorder
CN118689552A (en) A flight parameter collection and recording equipment configuration management method, system, equipment and medium
KR20090012987A (en) Method of managing identifier of storage device, restoration method and device therefor
KR100678926B1 (en) Log Information Management System and 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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220804

Address after: 518000 a2901-2902, building 10, Shenzhen Bay science and technology ecological park, No. 10, Gaoxin South ninth Road, high tech Zone community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Patentee after: SHENZHEN EMPEROR TECHNOLOGY Co.,Ltd.

Address before: 518000 north side 504, 5th floor, scientific research building, aerospace micromotor building, Langshan 2nd Road, gaoxinyuan North District, Nanshan District, Shenzhen City, Guangdong Province

Patentee before: SHENZHEN LANTAIYUAN INFORMATION TECHNOLOGY Co.,Ltd.