A kind of videotape storage means, system, chip, storage device and drive recorder
Technical field
The invention belongs to technical field of memory of recording a video, more particularly to a kind of videotape storage means, system, video record processing core
Piece, storage device and drive recorder.
Background technology
As the improvement of people's living standards, the use of vehicle is more and more, brings while facilitate, hand over
The probability of interpreter's event and traffic dispute is also more and more, and the appearance of drive recorder is carried to the duty goal of traffic accident and dispute
Important evidence has been supplied, has been favored by numerous car owners.Drive recorder needs continuous firing, but the capacity of its recording medium has
Limit, it is necessary to cycle index and covering by way of work, to important record video using latch by the way of prevent from being capped
Delete.Drive recorder typically is provided with parking collision latch function, when car owner is left, vehicle is illegally collided or be mobile, OK
Car recorder meeting automatic start record live video, preserves event evidence, and the video file will not be by circulation covering deletion.
As shown in figure 1, the handling process that the drive recorder video recording of prior art is locked is as follows:
Drive recorder starts video recording, first determines whether whether memory space is sufficient;
If memory space is sufficient, creates video file and the Video data recorded in real time is written to the video file
In, the video file is then preserved, finally judges whether to meet locking condition to decide whether to enter the video file
Row is locked;
If memory space inadequate, unlocked file is found, the earliest unlocked file of recording time is found and deletes and be somebody's turn to do
File, if not finding unlocked file, needs prompting user manually operated, the file in memory is deleted,
Or formatting processing, not enough intelligently.
In addition, if lock file in memory is a lot, more only free space when, the video file general recorded
Can repeat it is erasable be unfavorable for the average utilization of memory space with a piece of memory space because Flash have write number of times life-span limit
System, easily causes memory to damage.
The content of the invention
The embodiments of the invention provide a kind of videotape storage means, system, video record processing chip, storage device and driving note
Record instrument, it is intended to which solving memory space inadequate in the prior art needs artificial treatment and repetition are erasable to cause storage with a piece of memory space
The problem of device damage.
In embodiments of the present invention there is provided a kind of videotape storage means, methods described includes:
Judgment step:Preparation starts video recording, judges whether the residual memory space of storage device is sufficient, is then to enter video recording step
Suddenly, otherwise into delete step;
Recording step of recording:Create and preserve video file;
Delete step:Judge whether the capacity of the lock file in the storage device is more than the capacity of setting, be to delete most
Early lock file, otherwise deletes earliest unlocked file.
In embodiments of the present invention, in the judgment step, according to the capacity of the residual memory space of the storage device
Whether default capacity is more than whether sufficient come the residual memory space for judging the storage device.
In embodiments of the present invention, in the delete step, the capacity set is the capacity of the storage device
Half.
In embodiments of the present invention, the recording step of recording includes:
Video file is created in the storage device;
Video data is write into the video file;
Preserve the video file.
In embodiments of the present invention, after the recording step of recording, in addition to:
Lock step:Judge whether external condition triggers locking mechanisms, be, the video file is locked, and jumps to
The judgment step restarts video recording;Otherwise jump to the judgment step and restart video recording.
In embodiments of the present invention, a kind of video recording storage system is additionally provided, the system includes:
Storage device, the video file for storing recording journey instrument;
Judge module, for judging whether the residual memory space of the storage device is sufficient when preparing to start video recording;
Video file creation module, for being created in the storage device and preserving video file;
Removing module, for deleting the video file in the storage device;
When the judge module judges that the residual memory space of the storage device is not enough, the judge module is determined whether
Whether the capacity of the lock file in the storage device is more than the capacity of setting, is then by deleting earliest described in removing module
Lock file, otherwise pass through removing module and delete earliest unlocked file.
In embodiments of the present invention, the judge module according to the capacity of the residual memory space of the storage device whether
Judge whether the residual memory space of the storage device is sufficient more than default capacity.
In embodiments of the present invention, the judge module judges whether the capacity of the lock file in the storage device is big
When the capacity of setting, the half of capacity of the capacity set as the storage device.
In embodiments of the present invention, the video file creation module includes:
Creating unit, for creating video file in the storage device;
Writing unit, for writing Video data into the video file;
Storage unit, for preserving the video file.
In embodiments of the present invention, the video recording storage system also includes locking module, for adding in external condition triggering
During lock mechanism, the video file is locked.
In embodiments of the present invention, a kind of video record processing chip is additionally provided, the video record processing chip includes at least one
Processor, memory and interface, at least a processor, memory and the interface are connected by bus;
The memory storage computer executed instructions;
The computer executed instructions of memory storage described at least one described computing device so that the video record processing chip
Perform above-mentioned videotape storage means.
In embodiments of the present invention, the instruction that is stored with a kind of storage device, the storage device is additionally provided, it is described to refer to
The step of order realizes above-mentioned videotape storage means when being executed by processor.
In embodiments of the present invention, a kind of drive recorder is additionally provided, the driving recording instrument uses above-mentioned record
As storage system.
Compared with prior art, using above-mentioned videotape storage means, system, video record processing chip, storage device and row
Car recorder, when being recorded a video, when the residual memory space for judging the storage device is not enough, determines whether the storage
The capacity of lock file in equipment whether be more than setting capacity, if the capacity of lock file, more than setting capacity then
Earliest lock file is deleted, lock file is deleted without manpower intervention, can both ensure the holding time of lock file,
Also solve the problem that repetition is erasable causes the problem of storage device is damaged with a piece of memory space.
Brief description of the drawings
Fig. 1 is the implementation process figure of the videotape storage means of prior art;
Fig. 2 is the implementation process figure for the videotape storage means that the embodiment of the present invention one is provided;
Fig. 3 is the structural representation for the video recording storage system that the embodiment of the present invention two is provided;
Fig. 4 is the structural representation of the video file creation module in Fig. 3;
Fig. 5 is the structural representation for the video record processing chip that the embodiment of the present invention three is provided.
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.
It should be noted that the videotape storage means of the present invention, system, video record processing chip are mainly used in driving recording
In instrument, certainly, also it is not precluded within other video monitoring equipments and is applied.
The realization of the present invention is described in detail below in conjunction with specific embodiment:
Embodiment one
Fig. 2 shows the implementation process for the videotape storage means that the embodiment of the present invention one is provided, and methods described includes step S1 extremely
Step S4, is described in detail separately below.
Step S1, judgment step:Preparation starts video recording, judges whether the residual memory space of storage device is sufficient, is then
Into step S2, otherwise into step S3.
It should be noted that the lower bound of capacity of a predeterminable remaining space, when preparing to start video recording, system can basis
Whether the capacity of the residual memory space of the storage device is more than default capacity to judge that the residue of the storage device is deposited
Whether sufficient store up space.
Step S2, recording step of recording:Create and preserve video file.
It should be noted that specifically, step S2 includes:
Step S21:Video file is created in the storage device;
Step S22:Video data is write into the video file;
Step S33:Preserve the video file.
Step S3, delete step:Judge whether the capacity of the lock file in the storage device is more than the capacity of setting,
It is to delete earliest lock file, otherwise deletes earliest unlocked file.
It should be noted that in step s3, the half of capacity of the capacity set as the storage device.Work as institute
State storage device capacity it is larger when, the capacity of the setting can also be 1/3rd of the capacity of the storage device.
Step S4, locking step:Judge whether external condition triggers locking mechanisms, be that then the video file is added
Lock, and jump to step S1 and restart video recording;Otherwise jump to step S1 and restart video recording.
Step S4 is, immediately the next step after step S2, the preservation of the video file to be completed in step s 2
Judge afterwards, it is necessary to whether trigger locking mechanisms to external condition into step S4, if external condition triggers locking machine
System, then need to carry out locking processing to the video file.It should be noted that the locking mechanisms are in order in special circumstances
Under in order to prevent the capped deletion of important video file, such as, and in the video recording storing process of drive recorder, when car owner from
Open, when vehicle is illegally collided or be mobile, video file will be prevented by follow-up video file covering by automatic lockout, from
And perpetuation of testimony.
When being recorded a video using above-mentioned videotape storage means, when the residual memory space for judging the storage device is not enough
When, determine whether whether the capacity of the lock file in the storage device is more than the capacity of setting, if lock file
The capacity that capacity is more than setting then deletes earliest lock file, and lock file is deleted without manpower intervention, can both be protected
The holding time of lock file is demonstrate,proved, also solve the problem that repetition is erasable causes the problem of storage device is damaged with a piece of memory space.
Embodiment two
Fig. 3 shows the video recording storage system that the embodiment of the present invention two is provided, and the system includes storage device 21, judge module
22nd, video file creation module 23, removing module 24 and locking module 25.Illustrate in detail below.
The storage device 21, the video file for storing recording journey instrument.The storage device 21 can be hard disk,
Can also be SD card or TF cards.
The judge module 22, for judging that the residual memory space of the storage device 21 is when preparing to start video recording
No abundance, is additionally operable to judge whether the capacity of the lock file in the storage device is more than the capacity 22 of setting.
The video file creation module 23, for being created in the storage device and preserving video file.
As shown in figure 4, the video file creation module 23 includes creating unit 231, writing unit 232 and storage unit
233.The creating unit 231 is used to create video file in the storage device 21.Said write unit 232 is used for institute
State and Video data is write in video file.The storage unit 233 is used to preserve the video file.
The removing module 24, for deleting the video file in the storage device 21.When the judge module 22 is sentenced
When the residual memory space for the storage device 21 of breaking is not enough, the judge module 22 is determined whether in the storage device 21
The capacity of lock file whether be more than the capacity of setting, be, earliest by being deleted described in the removing module 24 locking text
Part, otherwise deletes earliest unlocked file by the removing module 24.
Whether the judge module 24 is more than default hold according to the capacity of the residual memory space of the storage device 21
Measure to judge whether the residual memory space of the storage device 21 is sufficient.The judge module 24 judges the storage device 21
In lock file capacity whether be more than setting capacity when, the capacity set is the capacity of the storage device 21
Half.
The locking module 25, for when external condition triggers locking mechanisms, locking the video file.
It should be noted that in above-mentioned video recording storage system, information exchange, implementation procedure between each module/unit etc.
Content, due to being based on same design with the videotape storage means of embodiment one, its technique effect brought is identical with embodiment one,
Particular content can be found in the related narration in embodiment one, and here is omitted.
Embodiment three
As shown in figure 5, there is provided a kind of video record processing chip in the embodiment of the present invention three, it includes an at least processor 310, deposited
Reservoir 320 and interface 330, at least a processor 310, memory 320 and the interface 330 are connected by bus;
The memory 320 stores computer executed instructions;
At least one described processor 310 performs the computer executed instructions that the memory 320 is stored so that at the video recording
Manage the videotape storage means described in chip execution embodiment one.
Further, the embodiment of the present invention additionally provides be stored with a kind of storage device, the storage device instruction, institute
State the step of realizing the videotape storage means described in embodiment one when instruction is executed by processor.
Further, the embodiment of the present invention additionally provides a kind of drive recorder, and the driving recording instrument is using real
Apply the video recording storage system described in example two.
In summary, using above-mentioned videotape storage means, system, video record processing chip, storage device and drive recorder,
When being recorded a video, when the residual memory space for judging the storage device is not enough, determine whether in the storage device
Whether the capacity of lock file is more than the capacity of setting, deletes earliest if the capacity of lock file is more than the capacity of setting
Lock file, lock file is deleted without manpower intervention, can both ensure the holding time of lock file, also solves the problem that weight
It is erasable again to cause the problem of storage device is damaged with a piece of memory space.
It is worth noting that, one of ordinary skill in the art will appreciate that:The step of realizing above method embodiment or portion
It can be completed step by step by the related hardware of programmed instruction, foregoing program can be stored in embodied on computer readable storage Jie
In matter, the program upon execution, performs the step of including above method embodiment, and foregoing storage medium includes:ROM、
RAM, magnetic disc or CD etc. are various can be with the medium of store program codes.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
Any modifications, equivalent substitutions and improvements made within refreshing and principle etc., should be included in the scope of the protection.