Storage security fault-tolerant method and system for vehicle-mounted monitoring video

文档序号:1190842 发布日期:2020-08-28 浏览:17次 中文

阅读说明:本技术 用于车载监控录像的存储安全容错方法及系统 (Storage security fault-tolerant method and system for vehicle-mounted monitoring video ) 是由 邢映彪 王东阳 黄梓斌 陶政文 于 2020-05-28 设计创作,主要内容包括:本发明涉及存储安全容错技术领域,为用于车载监控录像的存储安全容错方法及系统,其方法包括步骤:将硬盘作为主存储介质进行录像,同时设定辅存储介质;当硬盘录像出现异常时,判断为分区损坏,切换到其他分区继续录像,当其他分区均无法录像时,判断为当前硬盘异常,立即启动容错机制,对硬盘进行检查与修复,启用所设定的辅存储介质进行录像;当硬盘修复完成后,重新将硬盘作为主存储介质进行录像,并将辅存储介质上的录像数据拷贝到硬盘。本发明通过容错措施,使数据能够正确且完整地存储到硬盘存储设备中,提高安防设备的数据安全性。(The invention relates to the technical field of storage safety fault tolerance, in particular to a storage safety fault tolerance method and a system for vehicle-mounted monitoring videos, wherein the method comprises the following steps: recording a video by taking a hard disk as a main storage medium, and setting an auxiliary storage medium; when the hard disk video is abnormal, judging that the partition is damaged, switching to other partitions to continue video recording, when other partitions cannot record the video, judging that the current hard disk is abnormal, immediately starting a fault-tolerant mechanism, checking and repairing the hard disk, and starting a set auxiliary storage medium to record the video; and after the hard disk is repaired, recording the video by taking the hard disk as a main storage medium again, and copying the video data on the auxiliary storage medium to the hard disk. According to the invention, through fault tolerance measures, data can be correctly and completely stored in the hard disk storage equipment, and the data security of the security equipment is improved.)

1. The storage safety fault-tolerant method for the vehicle-mounted monitoring video is characterized by comprising the following steps of:

s1, recording the hard disk as a main storage medium and setting an auxiliary storage medium;

s2, when the video of the hard disk is abnormal, the hard disk is judged to be damaged, the hard disk is switched to other partitions to continue the video recording, when the video of other partitions can not be recorded, the current hard disk is judged to be abnormal, a fault-tolerant mechanism is immediately started, the hard disk is checked and repaired, and the set auxiliary storage medium is started to record the video;

and S3, when the hard disk is repaired, recording the video by taking the hard disk as the main storage medium again, and copying the video data on the auxiliary storage medium to the hard disk.

2. The storage security fault-tolerant method for the vehicle-mounted monitoring video according to claim 1, wherein the method for judging the partition damage in the step S2 comprises the following steps: when the hard disk is mounted, the file system is detected by using a blkid command mode of an e2fsprogs tool, and if the file system is not in a preset file system range, the partition is judged to be damaged.

3. The storage security fault-tolerant method for the vehicle-mounted monitoring video according to claim 2, wherein the file system is an ext4 file system or an xfs file system; when the file system is an ext4 file system, repairing the hard disk by using an fsck.ext4 repair tool after the hard disk is mounted; when the file system is an xfs file system, the hard disk is repaired by using an xfs _ repair tool after the hard disk is mounted.

4. The storage security fault-tolerant method for the vehicle-mounted monitoring video according to claim 1, wherein in step S2, during the hard disk abnormality, abnormality detection is performed on the existing hard disk device through the SCSI bus, if the hard disk device exists but there is no partition disk identifier, the bus is deleted, and the operations of adding and scanning the SCSI bus hard disk device are started again, so that the hard disk device works correctly on the SCSI bus.

5. The storage security fault-tolerant method for the vehicle-mounted monitoring video according to claim 1, wherein an SD card or a disaster recovery disk is set as an auxiliary storage medium in step S1.

6. The storage security fault-tolerant method for the vehicle-mounted monitoring video according to claim 5, wherein in step S1, when the hard disk is used as a main storage medium for video recording, a dual stream technology combining a main stream code and a secondary stream code is used for video recording;

when the SD card or the disaster recovery disk is used as the auxiliary storage medium to record in step S2, the recording mode is mirror image recording or secondary stream recording.

7. A storage safety fault-tolerant system for on-vehicle surveillance video, its characterized in that includes:

a hard disk for serving as a main storage medium;

a secondary storage medium;

the hard disk video recording module is used for recording the hard disk as a main storage medium;

the hard disk exception handling module is used for judging that the hard disk video is damaged when the hard disk video is abnormal, switching to other partitions to continue the video recording, judging that the current hard disk is abnormal when the other partitions cannot record the video, immediately starting a fault-tolerant mechanism, checking and repairing the hard disk, and starting an auxiliary storage medium to record the video;

and the repaired video switching module is used for recording the video by taking the hard disk as the main storage medium again after the hard disk is repaired, and copying the video data on the auxiliary storage medium to the hard disk.

8. The storage security fault-tolerant system for the vehicle-mounted monitoring video according to claim 7, wherein the auxiliary storage medium is an SD card or a disaster recovery disk.

9. The storage security fault-tolerant system for the vehicle-mounted monitoring video according to claim 7, wherein the method for judging the partition damage by the hard disk exception handling module comprises the following steps: when the hard disk is mounted, the file system is detected by using a blkid command mode of an e2fsprogs tool, and if the file system is not in a preset file system range, the partition is judged to be damaged.

10. The storage security fault-tolerant system for the vehicle-mounted monitoring video according to claim 7, wherein when the hard disk video recording module uses a hard disk as a main storage medium for video recording, a dual stream technology combining a main stream code and a secondary stream code is used for video recording;

the hard disk exception handling module starts an SD card or a disaster recovery disk as an auxiliary storage medium for video recording, and the video recording mode is mirror image video recording or secondary code stream video recording.

Technical Field

The invention relates to the technical field of storage security fault tolerance, in particular to a storage security fault tolerance method and system for a vehicle-mounted monitoring video.

Background

When the existing disk is used as a storage medium, the most common fault-tolerant measure is a disk array which is divided into a software RAID and a hardware-based hard RAID, and the hardware RAID mode at least needs 2 hard disks; the software RAID needs to consume larger system performance and disk space, the scheme is often applied to a server, and in the aspect of vehicle-mounted, the scheme is rarely seen in the industry due to the restriction of an embedded special system and low cost factors.

The existing vehicle-mounted product, especially the vehicle-mounted product with strong vibration, such as a mechanical hard disk, can not normally work in a short time because the function of the vehicle-mounted product is affected by factors such as high temperature and vibration when encountering severe environments such as high temperature, and at the moment, the monitoring equipment can not read and write a magnetic disk, video data can not be safely written in, and monitoring videos in the current time period can not be stored. If the solid state disk is used, the stability is higher than that of a mechanical hard disk, but the cost of the hard disk is higher, and customers cannot bear the cost.

Disclosure of Invention

In order to solve the technical problems in the prior art, the invention provides a storage safety fault-tolerant method and a storage safety fault-tolerant system for vehicle-mounted monitoring videos. The hard disk is used as a main video storage medium, the SD card or the disaster recovery backup disk is used as an optional storage medium, when the video of the hard disk is abnormal, data can be correctly and completely stored in the hard disk storage device through fault tolerance measures, and the data security of the security protection device is improved.

The method is realized by adopting the following technical scheme: the storage safety fault-tolerant method for the vehicle-mounted monitoring video comprises the following steps:

s1, recording the hard disk as a main storage medium and setting an auxiliary storage medium;

s2, when the video of the hard disk is abnormal, the hard disk is judged to be damaged, the hard disk is switched to other partitions to continue the video recording, when the video of other partitions can not be recorded, the current hard disk is judged to be abnormal, a fault-tolerant mechanism is immediately started, the hard disk is checked and repaired, and the set auxiliary storage medium is started to record the video;

and S3, when the hard disk is repaired, recording the video by taking the hard disk as the main storage medium again, and copying the video data on the auxiliary storage medium to the hard disk.

The system of the invention is realized by adopting the following technical scheme: a storage safety fault-tolerant system for on-vehicle surveillance video includes:

a hard disk for serving as a main storage medium;

a secondary storage medium;

the hard disk video recording module is used for recording the hard disk as a main storage medium;

the hard disk exception handling module is used for judging that the hard disk video is damaged when the hard disk video is abnormal, switching to other partitions to continue the video recording, judging that the current hard disk is abnormal when the other partitions cannot record the video, immediately starting a fault-tolerant mechanism, checking and repairing the hard disk, and starting an auxiliary storage medium to record the video;

and the repaired video switching module is used for recording the video by taking the hard disk as the main storage medium again after the hard disk is repaired, and copying the video data on the auxiliary storage medium to the hard disk.

Compared with the prior art, the invention has the following advantages and beneficial effects:

1. the invention can ensure that when the hard disk is unstable, the system video can be better ensured not to be lost through fault-tolerant measures, and the monitoring data is stored on an optional storage medium; when the hard disk returns to the normal working state, the monitoring data is written into the hard disk, the integrity of the hard disk data is ensured, and the storage safety of the system is improved.

2. The storage safety fault-tolerant method is low in cost and easy to implement.

Drawings

FIG. 1 is a flow chart of a storage security fault tolerance method of the present invention.

Detailed Description

The present invention will be described in further detail with reference to examples and drawings, but the present invention is not limited thereto.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:视频处理方法及电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类