CN104463796B - A kind of Vehicular video restorative procedure and device - Google Patents

A kind of Vehicular video restorative procedure and device Download PDF

Info

Publication number
CN104463796B
CN104463796B CN201410676092.5A CN201410676092A CN104463796B CN 104463796 B CN104463796 B CN 104463796B CN 201410676092 A CN201410676092 A CN 201410676092A CN 104463796 B CN104463796 B CN 104463796B
Authority
CN
China
Prior art keywords
data
type
vehicular video
block
inode
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
CN201410676092.5A
Other languages
Chinese (zh)
Other versions
CN104463796A (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 HUABAO ELECTRONIC TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN HUABAO ELECTRONIC 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 HUABAO ELECTRONIC TECHNOLOGY Co Ltd filed Critical SHENZHEN HUABAO ELECTRONIC TECHNOLOGY Co Ltd
Priority to CN201410676092.5A priority Critical patent/CN104463796B/en
Publication of CN104463796A publication Critical patent/CN104463796A/en
Application granted granted Critical
Publication of CN104463796B publication Critical patent/CN104463796B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The present invention is applied to Vehicular video recovery technique field, there is provided a kind of Vehicular video restorative procedure and device, the Vehicular video restorative procedure include:Obtain the read-write requests of key message in Vehicular video;Detect the type of data in the read-write requests;When the type of the data is persistent data type, by the data Cun Chudao persistent data storage regions;When the type of the data is variable data type, by the data Cun Chudao variable data storage regions.Present invention, avoiding situation about reading and writing repeatedly when reading and writing key message, occur so that when Vehicular video damages, the key message of storage can be passed through, associated video frame up and down is repaired, so as to both reduce the difficulty of Vehicular video reparation, also improves the success rate of Vehicular video reparation.

Description

A kind of Vehicular video restorative procedure and device
Technical field
The invention belongs to Vehicular video technical field, more particularly to a kind of Vehicular video restorative procedure and device.
Background technology
With the popularization of monitoring device, monitoring device is fitted with many vehicles, passes through monitoring device, registration of vehicle row Information during sailing, generate Vehicular video.When traffic accident occurring or during traffic dispute, can by check Vehicular video come Judge responsible party, therefore Vehicular video is that solve traffic accident or the vaild evidence of traffic dispute.
However, in existing Vehicular video monitoring system, Vehicular video is easily damaged, and the Vehicular video after damage is repaiied Multiple difficulty is big and success rate is low.The reason is that existing Vehicular video uses FAT32 file system to data in magnetic disk pipe Reason.The re-reading key message write in Vehicular video of FAT32 file reverses, the data block of storage key message is easily damaged, works as storage After the data block damage of key message, it is impossible to associated video frame above and below Vehicular video is repaired by key message, therefore repair Difficulty is big, and the success rate of reparation is low.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of Vehicular video restorative procedure, it is intended to solves vehicle-mounted to regard existing In frequency monitoring system, key message is read and write repeatedly, causes the difficulty of follow-up Vehicular video reparation big and low success rate of problem.
The embodiment of the present invention is achieved in that a kind of Vehicular video restorative procedure, including:
Obtain the read-write requests of key message in Vehicular video;
Detect the type of data in the read-write requests;
When the type of the data is persistent data type, by the data Cun Chudao persistent data storage regions;
When the type of the data is variable data type, by the data Cun Chudao variable data storage regions.
The another object of the embodiment of the present invention is to provide a kind of Vehicular video prosthetic device, including:
Read-write requests acquisition module, for obtaining the read-write requests of key message in Vehicular video;
Detection module, for detecting the type of data in the read-write requests;
First memory module, for identification module, described in when the type of the data is persistent data type, inciting somebody to action In data Cun Chudao persistent data storage regions;
Second memory module, can by the data Cun Chudao for when the type of the data is variable data type Become in data storage areas.
In embodiments of the present invention, when the type of data is persistent data type, store data into persistent data and deposit In storage area domain, when the type of data is variable data type, stores data into variable data storage region, data are entered Row classification storage, avoid when reading and writing key message, situation about reading and writing repeatedly, after Vehicular video damages, Ke Yitong occur The key message of storage is crossed, associated video frame up and down is repaired, so as to both reduce the difficulty of Vehicular video reparation, also improves car Carry the success rate of video reparation.
Brief description of the drawings
Fig. 1 is the implementation process figure of Vehicular video restorative procedure provided in an embodiment of the present invention;
Fig. 2 is the implementing procedure figure for the reparation Vehicular video that the present embodiment provides;
Fig. 3 is the first structure block diagram of Vehicular video prosthetic device provided in an embodiment of the present invention;
Fig. 4 is the structured flowchart of Vehicular video prosthetic device second provided in an embodiment of the present invention;
Fig. 5 is the structured flowchart of Vehicular video prosthetic device the 3rd provided in an embodiment of the present invention.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples 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.
Embodiment one
Fig. 1 is the implementation process figure of Vehicular video restorative procedure provided in an embodiment of the present invention, and details are as follows:
In step S101, the read-write requests of key message in Vehicular video are obtained;
In step s 102, the type of data in the read-write requests is detected;
Wherein, type includes persistent data type and variable data type.
The data type of key message is divided into two parts:Persistent data type and variable data type.So, it is constant The read-write number of data type can greatly reduce, so as to which the probability of data block damage also just lowers significantly.
In step s 103, when the type of the data is persistent data type, by the data Cun Chudao numerical invariants According in storage region;
Wherein, when the type of the data is persistent data type, persistent data memory block is arrived into invariant parameter storage In domain, the invariant parameter includes total block data, block size, information node (information node.Inode node) is total Block number, inode sizes, each block group that block number, inode take in inode nodes, each block group in several, each block group Bitmap block, inode bitmaps, at least one of the positional information of inode table.
Wherein, superblock refers to the module of storage file system metadata, can be by total block data, block size, information node The storage of inode nodes is into the persistent data storage region of superblock in inode node total number, each block group.
Wherein, block group refers to the module for storing the data in addition to file system metadata, can be by block in each block group Block number, inode sizes, each block chunk bitmap, inode bitmaps, the positional information of inode table that number, inode take are stored in In the persistent data storage region of block group.
, can parameter by the data Cun Chudao when the type of the data is variable data type in step S104 According in storage region.
Wherein, when the type of the data is variable data type, variable data memory block is arrived into variable element storage In domain, the variable element, which includes next available block, residue, can use block number, next available inode nodes, read-write In time, review time, current state information, the available block number of current block group, current block group in available inode numbers at least It is a kind of.
Wherein, superblock refers to the module of storage file system metadata, can be available by next available block, residue Block number, next available inode nodes, access time, the review time, current state information storage to superblock can parameter According in storage region.
Wherein, block group refers to the module for storing the data in addition to file system metadata, can be available by current block group Available inode numbers storage is into the variable data storage region of block group in block number, current block group.
Above-mentioned data make a backup store according to sparse.Each key message is signed mark, and CRC check accordingly Code ensures the accuracy of data.By distinguishing different signature marks, the type of these data is can determine, is follow-up number Laid a good foundation according to reparation.
In embodiments of the present invention, when the type of data is persistent data type, store data into persistent data and deposit In storage area domain, when the type of data is variable data type, stores data into variable data storage region, data are entered Row classification storage, avoid when reading and writing key message, situation about reading and writing repeatedly occur, gone wrong in Vehicular video read-write When, can repair data well, reduce corrupted data to greatest extent and caused by influence.
Embodiment two
Present embodiment describes before Vehicular video restorative procedure step S103, be divided into persistent data storage region and The implementation process of variable data storage region, details are as follows:
In storage device, all data blocks are divided into persistent data storage region and variable data storage region.
Storage device can be any one existing storage device, such as disk, random access memory, flash memory, read-only storage Device, programmable read only memory, electrically erasable programmable memory, register etc..
For ease of illustration by taking disk as an example, this disk is divided by block, block size is carried out according to the size of disk Adjustment.The block size of disk can be calculated by getting disk size.Then a block is synthesized by the block of fixed number Group is managed.Simultaneously by super block message and block group description information, and the information such as root inode nodes, magnetic is written to In disk.
In embodiments of the present invention, data block is divided into two parts:Persistent data storage region and variable data storage Region.So, the read-write number of persistent data storage region can greatly reduce, so as to which the probability of data block damage also just subtracts significantly It is low.
Embodiment three
Fig. 2 is the implementing procedure figure for the reparation Vehicular video that the present embodiment provides, and details are as follows:
S201, when the Vehicular video damages, call the data in the persistent data storage region;
S202, according to the data, repair the Vehicular video.
Wherein, the data in persistent data storage region are called, reconstruct key message, by key message, are repaired vehicle-mounted Data block in video.
Exemplified by repairing Vehicular video, details are as follows:
It is exactly temporal information that Vehicular video, which has a critically important information,.Therefore, the data organizational structure of Vehicular video here It is divided into three ranks.
1. root, for depositing the dated information of institute in this disk;
2. time index information, for depositing the information of this day all Video data, including:The channel number of video recording, Inode nodes, data type, record a video the beginning and ending time, some private attribute informations of recording a video;
3. Video data.
When some data blocks are damaged in Vehicular video, by Video data can build time index information, when passing through Between index information construction root, so as to reduce the data organizational structure of Vehicular video, repair some data blocks in Vehicular video.
Below according to the type of the data block of storage Vehicular video, illustrate the implementation process for repairing the data block of damage, in detail State as follows:
1. repair the superblock of damage
Because superblock has multiple backups, and superblock in the way of sparse storage in the power that block group number is 3,5,7 Exist in the block group of side.The superblock for reading backup can be first passed through, checks signature mark and CRC check value.If have no problem Just directly use Backup Data block.All problematic if all of backup block, then the constant part of superblock is by obtaining disk Size, the additional calculation formula pre-defined obtain.A part of information of constant part in superblock is by reading inode Bitmap and block bitmap are obtained.Other information can be handled by setting default value.
2. repair the block group description information of damage
The constant part of block group description information is repaired using the processing strategy same with superblock.
Variable part, can by simple calculate then by reading inode bitmap and block bitmap content To obtain respective value, complete to repair.
3. repair the root of damage
The inode node numbers of root can be learnt by superblock, read the inode nodes of root, and obtain root Catalogue data.Determine whether root damages by checking corresponding signature mark.If root damages, then need Repaired offline, i.e., disk is removed and repaired with special fix tool.
By traveling through all data blocks of whole disk, preceding 4 bytes of each disk block are read.Check this four bytes Whether the signature mark of time index information is equal to.It is if equal, then it represents that the data block stores time index information data, Read the time index information data, it is possible to build a root item.Believed by traveling through and getting all time indexs Breath data block just can build complete root data.
4. repair the inode data blocks of damage
Whole disk check signature mark is traveled through, the data type that each data block is stored can be learnt.According to data Type, the effect of all data blocks in each block group can be obtained.It can just be constructed according to the block number of these data blocks and respective value Inode nodes, those values that can not be obtained are corresponded to, are just directly replaced with default value.
In the present embodiment, the data in persistent data storage region are called, Vehicular video is repaired, can handle well The Vehicular video damaged in vehicle-mounted video monitoring device disk, realize the reparation of Vehicular video.
Example IV
Fig. 3 is the first structure block diagram of Vehicular video prosthetic device provided in an embodiment of the present invention, the Vehicular video reparation Device can be run in vehicle-mounted video monitoring device.For convenience of description, it illustrate only part related to the present embodiment.
Reference picture 3, the Vehicular video prosthetic device, including:
Read-write requests acquisition module 31, for obtaining the read-write requests of key message in Vehicular video;
Detection module 32, for detecting the type of data in the read-write requests;
First memory module 33, for identification module, for when the type of the data is persistent data type, by institute State in data Cun Chudao persistent data storage regions;
Second memory module 34, for when the type of the data is variable data type, by the data Cun Chudao In variable data storage region.
In a kind of implementation of the present embodiment, with reference to figure 4, Fig. 4 is that Vehicular video provided in an embodiment of the present invention is repaiied The structured flowchart of apparatus for coating second, the Vehicular video prosthetic device, in addition to:
Division module 35, in storage device, all data blocks are divided into persistent data storage region and can Become data storage areas.
In a kind of implementation of the present embodiment, in the Vehicular video prosthetic device, first memory module, tool Body is used for when the type of the data is variable data type, by variable element storage into variable data storage region, institute Block number, next available inode nodes, access time, inspection can be used including next available block, residue by stating variable element Look at least one of available inode numbers in time, current state information, the available block number of current block group, current block group.
In a kind of implementation of the present embodiment, in the Vehicular video prosthetic device, the second memory module tool Body is used for when the type of the data is variable data type, by variable element storage into variable data storage region, institute Block number, next available inode nodes, access time, inspection can be used including next available block, residue by stating variable element Look at least one of available inode numbers in time, current state information, the available block number of current block group, current block group.
In a kind of embodiment provided in an embodiment of the present invention, with reference to figure 5, Fig. 5 is car provided in an embodiment of the present invention The structured flowchart of load video prosthetic device the 3rd, the Vehicular video prosthetic device, in addition to:
Calling module 36, for when the Vehicular video damages, calling the data in the persistent data storage region;
Repair module 37, for according to the data, repairing the Vehicular video.
Device provided in an embodiment of the present invention can be applied in foregoing corresponding embodiment of the method, and details are referring to above-mentioned reality The description of example is applied, will not be repeated here.
Through the above description of the embodiments, it is apparent to those skilled in the art that the present invention can borrow Software is helped to add the mode of required common hardware to realize.Described program can be stored in read/write memory medium, described Storage medium, as random access memory, flash memory, read-only storage, programmable read only memory, electrically erasable programmable storage Device, register etc..The storage medium is located at memory, and processor reads the information in memory, this hair is performed with reference to its hardware Method described in bright each embodiment.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any Those familiar with the art the invention discloses technical scope in, the change or replacement that can readily occur in, all should It is included within the scope of the present invention.Therefore, protection scope of the present invention should be defined by scope of the claims.

Claims (10)

  1. A kind of 1. Vehicular video restorative procedure, it is characterised in that including:
    Obtain the read-write requests of key message in Vehicular video;
    Detect the type of data in the read-write requests;
    When the type of the data is persistent data type, by the data Cun Chudao persistent data storage regions;
    When the type of the data is variable data type, by the data Cun Chudao variable data storage regions;
    During the Vehicular video damage, the data in persistent data storage region are called, reconstruct key message, are believed by key Breath, repair the data block in Vehicular video.
  2. 2. Vehicular video restorative procedure as claimed in claim 1, it is characterised in that described when the type of the data is not When becoming type, before in data block constant the data Cun Chudao, including:
    In storage device, all data blocks are divided into persistent data storage region and variable data storage region.
  3. 3. Vehicular video restorative procedure as claimed in claim 1, it is characterised in that described when the type of the data is constant During data type, by the data Cun Chudao persistent data storage regions, it is specially:
    It is described by invariant parameter storage into persistent data storage region when the type of the data is persistent data type Invariant parameter includes total block data, block size, information node inode node total number, inode nodes in each block group, each Block number, the block number of inode occupancy, inode sizes, each block chunk bitmap, inode bitmaps, the position of inode table in block group At least one of information.
  4. 4. Vehicular video restorative procedure as claimed in claim 1, it is characterised in that described when the type of the data is variable During data type, by the data Cun Chudao variable data storage regions, it is specially:
    It is described by variable element storage into variable data storage region when the type of the data is variable data type Variable element, which includes next available block, residue, can use block number, next available inode nodes, access time, inspection At least one of available inode numbers in time, current state information, the available block number of current block group, current block group.
  5. 5. Vehicular video restorative procedure as claimed in claim 1, it is characterised in that be numerical invariant when the type of the data During according to type, after in the data Cun Chudao persistent data storage regions, in addition to:
    When the Vehicular video damages, the data in the persistent data storage region are called;
    According to the data, the Vehicular video is repaired.
  6. A kind of 6. Vehicular video prosthetic device, it is characterised in that including:
    Read-write requests acquisition module, for obtaining the read-write requests of key message in Vehicular video;
    Detection module, for detecting the type of data in the read-write requests;
    First memory module, for identification module, for when the type of the data is persistent data type, by the data Store in persistent data storage region;
    Second memory module, can parameter by the data Cun Chudao for when the type of the data is variable data type According in storage region;
    Wherein, the Vehicular video prosthetic device calls the data in persistent data storage region, weight when Vehicular video damages Structure key message, by key message, repair the data block in Vehicular video.
  7. 7. Vehicular video prosthetic device as claimed in claim 6, it is characterised in that the Vehicular video prosthetic device, also wrap Include:
    Division module, in storage device, all data blocks to be divided into persistent data storage region and variable data Storage region.
  8. 8. Vehicular video prosthetic device as claimed in claim 6, it is characterised in that first memory module is specifically used for working as When the type of the data is persistent data type, by invariant parameter storage into persistent data storage region, the constant ginseng Number is included in total block data, block size, information node inode node total number, each block group in inode nodes, each block group Block number, inode take block number, inode sizes, each block chunk bitmap, inode bitmaps, inode table positional information in At least one.
  9. 9. Vehicular video prosthetic device as claimed in claim 6, it is characterised in that second memory module is specifically used for working as When the type of the data is variable data type, by variable element storage into variable data storage region, the variable ginseng Number include next available block, residue can with block number, next available inode nodes, access time, the review time, At least one of available inode numbers in current state information, the available block number of current block group, current block group.
  10. 10. Vehicular video prosthetic device as claimed in claim 6, it is characterised in that the Vehicular video prosthetic device, also wrap Include
    Calling module, for when the Vehicular video damages, calling the data in the persistent data storage region;
    Repair module, for according to the data, repairing the Vehicular video.
CN201410676092.5A 2014-11-21 2014-11-21 A kind of Vehicular video restorative procedure and device Active CN104463796B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410676092.5A CN104463796B (en) 2014-11-21 2014-11-21 A kind of Vehicular video restorative procedure and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410676092.5A CN104463796B (en) 2014-11-21 2014-11-21 A kind of Vehicular video restorative procedure and device

Publications (2)

Publication Number Publication Date
CN104463796A CN104463796A (en) 2015-03-25
CN104463796B true CN104463796B (en) 2018-04-10

Family

ID=52909784

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410676092.5A Active CN104463796B (en) 2014-11-21 2014-11-21 A kind of Vehicular video restorative procedure and device

Country Status (1)

Country Link
CN (1) CN104463796B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1498371A (en) * 2002-01-31 2004-05-19 松下电器产业株式会社 Memory device, terminal apparatus and data repair system
CN103678026A (en) * 2012-09-18 2014-03-26 杭州海康威视系统技术有限公司 Storing and repairing method and storing and repairing device for repairable video monitoring data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1498371A (en) * 2002-01-31 2004-05-19 松下电器产业株式会社 Memory device, terminal apparatus and data repair system
CN103678026A (en) * 2012-09-18 2014-03-26 杭州海康威视系统技术有限公司 Storing and repairing method and storing and repairing device for repairable video monitoring data

Also Published As

Publication number Publication date
CN104463796A (en) 2015-03-25

Similar Documents

Publication Publication Date Title
US10705932B2 (en) Method, device and computer program product for managing a storage system
CN105607960A (en) Repairing method and device of file system directory tree
CN104484131B (en) The data processing equipment of multiple disks server and corresponding processing method
CN107608826A (en) A kind of fault recovery method, device and the medium of the node of storage cluster
CN104731816A (en) Method and device for processing abnormal business data
CN104811645A (en) Embedded video-recording data storage method
US10649672B1 (en) Offloading device maintenance to an external processor in low-latency, non-volatile memory
US10191670B2 (en) Method and device of data protection, storage equipment
CN106648948B (en) Method for repairing damage of Western digital hard disk No. 11 module
CN106611024B (en) File merging method and device
CN104571961B (en) Data check backup, write-in and the read method of a kind of trigonometric expression storage device
CN105868127A (en) Data storage method and device and data reading method and device
CN116166849A (en) Data management method, device, equipment and storage medium
CN103279402B (en) Data reconstruction method based on multilevel-cell solid state hard disc and solid state hard disc
CN110222035A (en) A kind of efficient fault-tolerance approach of database page based on exclusive or check and journal recovery
CN103176867A (en) Fast file differential backup method
CN104598328A (en) File system repair method, device and system
DE102015105414B4 (en) Editing a destination storage
CN104463796B (en) A kind of Vehicular video restorative procedure and device
CN105653385A (en) Vehicle-loaded videorecording method
WO2021027271A1 (en) Bad block information protection method and apparatus, computer device and storage medium
CN103440179B (en) The continuous store method of storage device configurations information
CN103412802B (en) Disaster tolerant data file accesses the method and device controlling list backup
CN115827691A (en) Batch processing result verification method and device, computer equipment and storage medium
CN104504349B (en) A kind of Video data safe storage device 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