CN102760136B - File system control method based on rapid video data storage - Google Patents

File system control method based on rapid video data storage Download PDF

Info

Publication number
CN102760136B
CN102760136B CN201110109102.3A CN201110109102A CN102760136B CN 102760136 B CN102760136 B CN 102760136B CN 201110109102 A CN201110109102 A CN 201110109102A CN 102760136 B CN102760136 B CN 102760136B
Authority
CN
China
Prior art keywords
bulk
video
recording
recording channel
record
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
CN201110109102.3A
Other languages
Chinese (zh)
Other versions
CN102760136A (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.)
Suzhou Keda Technology Co Ltd
Original Assignee
Suzhou Keda 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 Suzhou Keda Technology Co Ltd filed Critical Suzhou Keda Technology Co Ltd
Priority to CN201110109102.3A priority Critical patent/CN102760136B/en
Publication of CN102760136A publication Critical patent/CN102760136A/en
Application granted granted Critical
Publication of CN102760136B publication Critical patent/CN102760136B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a file system control method based on rapid video data storage, which comprises the steps as follows: b, determining one bulk for storing video records from a plurality of bulks corresponding to a video channel according to the video channel, wherein a video subarea is divided into a plurality of bulks, and the bulks can be just used for storing a plurality of video records from the same video channel; and the invention further provides a file system control device based on rapid video data storage. According to the invention, the file system of a video monitoring system is improved, a set of technical scheme for controlling the file system is correspondingly provided, and a level for managing video record metadata and read-write media data is set up between a record and playback library and a bottom read-write level, so that the video data can be stored rapidly, the service efficiency of record and playback is enhanced and the failure rate is reduced.

Description

A kind of control method of the file system based on the storage of fast video data
Technical field
The present invention relates to video flowing control system, video file control system especially, particularly, the control method that relates in video flowing control system videotex system and control tackling described videotex system.
Background technology
Operation class video monitoring business is to provide a kind of novel value-added telecom services of image, sound and various alerting signal remote collection, transmission, storage, processing based on broadband network for user.Its business emphasis is by a widely used Remote Network Monitoring center service platform, and the centralized subregion operation way of take provides convenient, economic, effective remote monitoring total solution as user.By operation class video monitoring business, user can not be subject to time, site limitation that monitoring objective is monitored in real time, manages, watched, and realizes the unified monitoring of cross-region, unified storage, unified management and resource sharing.
At present, in video monitoring system, on its front monitoring front-end product, conventionally use EXT3 or XFS file system.These systems have certain versatility, and interconnectivity is high, but often occur variety of issue, for example: once after power-off restarting, these file system need the long time to repair, thereby are difficult to meet the demand of restarting fast system, normal work, may cause potential safety hazard; Because original file system exists various complex operations, so can cause some program errors (BUG), and with regard to these are wrong, be not for monitoring business, so in fact can delete the program that these are unnecessary; Cavity on the disk causing due to file system itself and because the geographically discontinuous magnetic head that causes frequently moves, and then cause the disk life-span to shorten faster, strengthened user's hardware cost.
Due to above variety of problems, in realizing the process of video monitoring service, existing provides a kind of file system that is suitable for video monitoring service and for the demand of the control method of this document system.
Therefore how, the present invention provides a set of simple, applicable file system for video monitoring service and the corresponding control method for this document system if will solving.
Summary of the invention
For defect of the prior art, the object of this invention is to provide a kind of file system based on fast video data storages control method and corresponding videotex system.
According to an aspect of the present invention, a kind of control method of the file system based on the storage of fast video data is provided, it is characterized in that, comprise the steps: that b. determines from some bulks corresponding with it that according to recording channel a bulk is for preserving video record, wherein, a video recording subregion is divided into some bulks, and described bulk only can be preserved the some sections of video records from same recording channel.
According to another aspect of the present invention, a kind of control device of the file system based on the storage of fast video data is also provided, it comprises: the first determining device, for determining that from some bulks corresponding with it bulk is used for preserving video record according to recording channel, wherein, a video recording subregion is divided into some bulks, and described bulk only can be preserved the some sections of video records from same recording channel.
Preferably, in described same video recording subregion, the capacity of some bulks is identical.
Preferably, described the first determining device comprises: the second determining device, and it is for determining the bulk corresponding with described recording channel; The first judgment means, it does not record full bulk for judging whether the bulk corresponding with described recording channel exists; The first treating apparatus, it exists described in described video record being kept at while not recording full bulk and does not record in full bulk for bulk corresponding with described recording channel.
Preferably, described the first determining device also comprises: the second judgment means, it does not exist and judge whether to exist empty bulk while not recording full bulk for the bulk corresponding with described recording channel.
Preferably, described the first determining device also comprises: the second treating apparatus, it is for described video record being kept to the bulk of described sky when there is the bulk of described sky, and according to described recording channel, marks the recording channel number of the bulk of described sky.
Preferably, described the first determining device also comprises: the 3rd treating apparatus, and it is for determine bulk to be covered when not there is not the bulk of described sky, and described in described video record is saved in bulk to be covered.
Preferably, described the 3rd treating apparatus comprises: the 4th treating apparatus, it is for bulk to be covered described in the bulk that generates ID minimum is defined as.
Preferably, described the 3rd treating apparatus comprises: the 5th treating apparatus, its for bulk in use is not generated the bulk of ID minimum be defined as described in bulk to be covered.
Preferably, described control device also comprises: the 3rd judgment means, whether it is key frame for the frame that judges the next one and be written into, and whether the remaining space that judges the current bulk being written into is lower than the 3rd threshold value, wherein, if above-mentioned two conditions are all satisfied, carry out described the first judgment means.
Preferably, described control device also comprises: the 4th judgment means, and whether its remaining space for bulk to be covered described in judging is lower than first threshold; And the 6th treating apparatus, it carries out described the second judgment means during lower than first threshold for the remaining space in the described bulk wait covering.
Preferably, described control device also comprises: the 5th judgment means, its for the remaining space of not recording full bulk described in judging whether lower than Second Threshold; And the 7th treating apparatus, it is for carrying out described the first determining device during lower than Second Threshold at the described remaining space of not recording full bulk.
Preferably, described the first determining device also comprises: the 8th treating apparatus, it for stopping video recording when not there is not the bulk of described sky.
Preferably, described video recording subregion comprises main partition information, piece index and some bulks, and wherein, described bulk comprises frame index.Preferably, described video recording subregion also comprises secondary partition information and secondary piece index.Preferably, described index comprises the piece period of bulk.
Preferably, described control device also comprises: the 3rd determining device, and it is for determining the search period; The 4th determining device, it is for determining recording channel to be searched; The 6th judgment means, it is for judging whether to exist the bulk overlapping mutually with a corresponding and described period of described recording channel to be searched and described search period; The 7th judgment means, it judges in described bulk, whether to exist its video recording period to search for described the video record that the period overlaps mutually while being sure for the judged result at described step C; And the 9th treating apparatus, when it is sure for the judged result at described step D, described its video recording period of feedback searches for described the video record that the period overlaps mutually.
Preferably, described index comprises the piece period of bulk.Further preferably, described control device also comprises: the 3rd determining device, and it is for determining the search period; The 4th determining device, it is for determining recording channel to be searched; The 6th judgment means, it is for judging whether to exist the bulk overlapping mutually with a corresponding and described period of described recording channel to be searched and described search period; The 8th judgment means, it judges in described bulk, whether there is the video record that its event information is identical with described search events while being sure for the judged result at described step C; The tenth treating apparatus, described its event information video record identical with described search events of feedback when it is sure for the judged result at described step D'.
Preferably, described control device also comprises: collator, it is for carrying out index order according to time sequencing to described each bulk.
According to a further aspect of the invention, provide a kind of videotex system based on the storage of fast video data, it is characterized in that, at least comprise following logical layer:
User api, for providing the various video datas that call according to described videotex system storage to described videotex system outside;
Recording playback is as storehouse, for according to the management of the various video datas of described videotex system storage, and accepts predetermined various interface function to realize the outside management to described video data;
Video database reading layer, for managing according to various video datas the depositing and reading on disk of described videotex system storage, it accepts from above-mentioned recording playback the interface function as storehouse, makes described recording playback can operate described video data as storehouse;
Virtual File System, at least for providing reading and writing, the mapping function for the various video datas of storing according to described videotex system to outside;
Reading and writing of files system;
Block I/O device access layer, for accepting the handling function of physical disk to realize the operation to physical disk, wherein, described in described reading and writing of files system access block I/O device access layer with realize to Virtual File System with and upper each logical layer to the read-write that is stored in the described video data in described physical disk with deposit.
The present invention is by the improvement to the file system of video monitoring system, and correspondingly provide a set of for controlling the technical scheme of this document system, between recording playback is as storehouse and bottom writable layer, set up a management video record metadata and and the level of read-write media data, thereby realize the storage of video data fast and strengthen the service efficiency of recording playback picture and reduce failure rate.
Accompanying drawing explanation
By reading the detailed description of non-limiting example being done with reference to the following drawings, it is more obvious that other features, objects and advantages of the present invention will become:
Fig. 1 illustrates according to the first embodiment of the present invention, for the process flow diagram of the control method of the file system based on the storage of fast video data;
Fig. 2 illustrates according to a second embodiment of the present invention, for the process flow diagram of the control method of the file system based on fast video data storages;
Fig. 3 illustrates a third embodiment in accordance with the invention, for the process flow diagram of the control method of the file system based on fast video data storages;
Fig. 4 illustrates according to a specific embodiment of the present invention, the subregion schematic diagram of the videotex system based on the storage of fast video data provided by the invention;
Fig. 5 illustrates according to a specific embodiment of the present invention, the logical layer schematic diagram of the videotex system based on the storage of fast video data provided by the invention; And
Fig. 6 illustrates according to a specific embodiment of the present invention, front end video recording-reproducing system logical layer schematic diagram provided by the invention.
Embodiment
Fig. 1 illustrates according to the first embodiment of the present invention, for the process flow diagram of the control method of the file system based on the storage of fast video data.Preferably, first perform step S101: whether the next frame being written into of judgement is key frame.Those skilled in the art understand, in the present embodiment, described video monitoring system just writes video data (or being called video file) by videotex system provided by the invention to physical disk, preferably, described video data by a frame, a frame write.In such process, the frame being written into if current is key frame, and next frame is key frame in other words, in ablation process, needs to write continuously, and can not change for storing the blocks of files of this video data midway, be i.e. bulk set forth in the present invention.Therefore, first whether the next frame being written into of judgement is key frame in this step.Particularly, it will be appreciated by those skilled in the art that described key frame refers to the I frame in video code flow.Further, the process that judges whether to switch described bulk by following step S102 before writing key frame, does not repeat them here.
Next enters step S102: judge that whether the remaining space of the current bulk being written into is lower than the 3rd threshold value.Those skilled in the art understand, if the remaining space of the described current bulk being written into is smaller, for example preferably cannot meet the situation that described key frame is write continuously, before writing described key frame, to complete the handoff procedure that is written into bulk to described, redefine one and (for example there is sufficient space, preferably can hold described key frame) bulk, do not repeat them here.Further, those skilled in the art can be with reference to this step of existing techniques in realizing, for example, by obtaining the remaining space (capacity) of described bulk, and described remaining space and described the 3rd threshold value is compared to determine the judged result of this step.If the judged result of this step is sure, the remaining space of the described current bulk being written into, lower than described the 3rd threshold value, enters following step S103; Otherwise if the remaining space of the described current bulk being written into is not less than described the 3rd threshold value, this process finishes, and does not need to find next bulk, and can continue to write video data in the current bulk being written into.
According to foregoing description, it will be appreciated by those skilled in the art that and if desired again find a bulk that is applicable to writing current video data, first perform step S103: determine the bulk corresponding with described recording channel.Further, it will be appreciated by those skilled in the art that preferably, in the present invention, described each bulk can only a corresponding recording channel, and a video data corresponding to recording channel can write a plurality of bulks, and recording channel and bulk are the relations of one-to-many.Those skilled in the art understand, the virtual logical path that video recording code stream in described recording channel pointer Dui Yi road is read and write, and the meaning that technical scheme provided by the present invention must be many-one relationship by recording channel and bulk is that a virtual logical path need to take a plurality of physical spaces of disk system.
Next enter step S104: judge in the bulk corresponding with described recording channel and whether exist and do not record full bulk.It will be appreciated by those skilled in the art that a video data in bulk may be continuous, may be also discontinuous.For example, preferably, when a video data corresponding to video file, do not write a full bulk completely, now, just there is idle space in this bulk; Further, in the time will writing next video file, if this bulk is continued to write, just cause the data in this bulk discontinuous.Further, in this step, first determine bulk all and that described recording channel is corresponding, for example defining altogether 50 bulks can be corresponding with described recording channel; Then be similar to above-mentioned steps S102, those skilled in the art can obtain total volume and the remaining space (capacity) of each bulk, thereby can judge in the bulk corresponding with described recording channel whether exist and do not record full bulk.Those skilled in the art can understand and implement this step with reference to the implementation of existing file system, do not repeat them here.
Finally perform step S105: described in described video record is kept at, do not record in full bulk.Preferably, by above-mentioned steps S104, determined after a bulk to be written, by writing instruction, corresponding video record (video data) has been write in disk space corresponding to this bulk in this step.Those skilled in the art can realize this step in conjunction with prior art, do not repeat them here.
Further, the video recording strategy that it will be appreciated by those skilled in the art that videotex system provided by the present invention can be achieved with reference to following description: under normal circumstances, according to partitioned organization, record frame by frame.A data block can only be given a passage video recording.When starting video recording (physical disk of managing to videotex system writes video), first judge channel number, find same channels number, and do not record full piece, continue to record (writing video data); If no, just newly look for one, be labeled as this passage, start to record (writing video data).
Restart video recording at every turn, all can in piece, newly add a video record.Preferably, a data block can be deposited at most 47 video records, if surpass this video record number, even if in piece real data less than, also switch a new piece.
If in certain video recording, real data has taken in piece and has had living space, so just force to stop video recording, restart.After restarting, can newly look for one to continue record.For this situation, consider wait key frame, in the time of so just need to also remaining between above-mentioned the 3rd threshold value in a data block, just at key frame place, switch.Embodiment, in order to complete the switching at key frame place, preferably, need to carry out anticipation by above-mentioned deterministic process as shown in Figure 1 above.
Further, it will be appreciated by those skilled in the art that above-mentioned the 3rd threshold value can be no more than the principle of 5000 according to total disk block number and determine.For example, preferably, when total disk space is in 1T situation, described the 3rd threshold value (data block size) can be defined as 256M.Data block size can change, and from 64M to 2G, not etc., does not depend on fdisk size.Generally for front monitoring front-end, fixing 128M.In one section of space that data block starts most, deposit frame index, according to frame index, find corresponding frame data in data block.Data block is larger, and the speed of user search video recording is faster, but the hard drive space that may waste is more; Otherwise data block is less, user's search speed can be affected, but hard drive space can be saved, so the size of data block should be distributed according to user's actual application environment here, do not repeat them here.
Fig. 2 illustrates according to a second embodiment of the present invention, for the process flow diagram of the control method of the file system based on fast video data storages.Particularly, the present embodiment can be used as a variation example of above-mentioned the first embodiment.It will be appreciated by those skilled in the art that above-mentioned the first embodiment is the process of bulk of switching in the process of recording a video file, wherein at least set forth switch one of opportunity of bulk and how to confirm new by the bulk being written into.And in the present embodiment,, from once complete video process, from starting the source of once video recording, start.
Further, first perform step S111: start once video recording.For example it will be appreciated by those skilled in the art that client sends instruction and " start video recording ", server end receives after this instruction, calls videotex system provided by the invention and starts video recording, to physical disk, starts to write one-frame video data.
Next enters step S112: determine the bulk corresponding with described recording channel.This step can realize with reference to step S103 shown in figure 1, does not repeat them here.
Then perform step S113: judge in the bulk corresponding with described recording channel and whether exist and do not record full bulk.This step can realize with reference to step S104 shown in figure 1, does not repeat them here.If judgment result is that of this step is negative, enter following step S114; Otherwise if judgment result is that of this step is sure, described in step S113 do not recorded to full bulk as bulk to be written (not shown in Fig. 2),, with reference to step S105 shown in above-mentioned Fig. 1, then this process finishes.Those skilled in the art embodiment illustrated in fig. 1ly can realize the present embodiment with reference to above-mentioned, do not repeat them here.
Further, if judgment result is that of above-mentioned steps S113 is negative, next enter step S114: judge whether to exist empty bulk.It will be appreciated by those skilled in the art that in above steps, only relate to and do not record full bulk, this bulk has write part video data, but this bulk still exists the remaining space of some.And preferably, in this step, the bulk of described sky (spare time) refers to not write the bulk of any data, the remaining space of this bulk is the maximum space of this bulk; And suboptimum ground changes in example at one, the bulk of described sky (spare time) refers to have the bulk that is greater than the 4th threshold value remaining space, for example, be greater than the bulk of 250M remaining space, and this depends on concrete enforcement needs, does not repeat them here.Correspondingly, those skilled in the art can realize described variation example in conjunction with step S102 shown in prior art and above-mentioned Fig. 1, do not repeat them here.Further, if judgment result is that of this step is negative, enter following step S115; Otherwise if judgment result is that of this step is sure, using the bulk of the described sky in step S114 as bulk to be written (not shown in Fig. 2),, with reference to step S105 shown in above-mentioned Fig. 1, then this process finishes.Those skilled in the art embodiment illustrated in fig. 1ly can realize the present embodiment with reference to above-mentioned, do not repeat them here.
Further, if judgment result is that of above-mentioned steps S114 is negative, then perform step S115: whether the bulk that judgement generates ID minimum is the current bulk of being read and write.In this step, first determine the bulk that generates ID minimum, then further judge whether the bulk of this generation ID minimum is is read and write.Preferably, those skilled in the art can realize this step in conjunction with prior art, do not repeat them here.Further, it will be appreciated by those skilled in the art that the little finger of toe piece index of described generation ID is minimum, by indexed mode, inquire about, just can determine the bulk of the described ID of generation minimum, do not repeat them here.Correspondingly, if it will be appreciated by those skilled in the art that, judgment result is that of this step is sure, enters following step S116; Otherwise if judgment result is that of this step is negative,, using the bulk of described generation ID minimum as bulk to be written, bulk to be covered (not shown in Fig. 2), then carries out following step S117.
Further, if judgment result is that of above-mentioned steps S115 is sure, next enter step S116: bulk to be covered described in the bulk of the described generation ID minimum outside the bulk of described generation ID minimum is defined as.The bulk that generates ID minimum if it will be appreciated by those skilled in the art that described in above-mentioned steps S115 is is read and write, and the bulk that this can not be generated to ID minimum covers, otherwise can affect ongoing read-write process.Therefore,, according to generating the principle of the bulk of ID minimum as bulk to be covered,, by a smaller bulk of bulk that generates ID minimum than this, little bulk second from the bottom is as bulk described to be covered.
Further, those skilled in the art understand, at one, change in example, described step S116 also can be changed to " bulk that can be capped and generate ID minimum is as bulk to be covered ", S116 is similar with above-mentioned steps, in this variation example, still find the bulk of generation ID minimum as bulk to be covered, but when prerequisite is submitted to, the bulk of this generation ID minimum can be capped, for example preferably, when the state of described bulk in being read or being write, it cannot be as bulk described to be covered; Again for example, when described bulk is set to can not read-write state time, it also cannot be as bulk described to be covered.Those skilled in the art can realize described variation example in conjunction with prior art and above-described embodiment, do not repeat them here.
Finally perform step S117: described video record is kept in bulk to be covered.Particularly, those skilled in the art understand, the difference of step S105 shown in this step and above-mentioned Fig. 1 is that this step described in video record (video data) is write in bulk to be covered, do not record in full bulk described in video record (video data) being write in above-mentioned steps S105.If all as " target " bulk, these two steps are identical using the bulk of described " not recording full " bulk and described " waiting to cover ".Those skilled in the art can realize this step in conjunction with prior art and above-mentioned steps S105, do not repeat them here.
Further, it will be appreciated by those skilled in the art that and above-mentioned embodiment illustrated in fig. 1 comparing, in the present embodiment, determine by be written into bulk time, because a variety of causes has finally been determined a script and is existed the bulk of video data to be covered.It will be appreciated by those skilled in the art that such situation has a lot, for example preferably, all occupied when all data blocks, in the time of cannot obtaining the piece that can record a video, according to upper strata, need to select a bulk to be covered.Further, when covering, choose the piece that generates ID minimum, this piece is used as to an empty piece and uses, the tag value in piece index is added to 1 simultaneously, thereby guarantee that piece index there will not be overlapping.Further, if the piece that generates ID minimum just in use (such as in video reproduction) selects to generate ID little piece covering so.Correspondingly, those skilled in the art can also determine that other various technical schemes realize the covering to bulk, do not repeat them here.
Fig. 3 illustrates a third embodiment in accordance with the invention, for the process flow diagram of the control method of the file system based on fast video data storages.Above-mentioned Fig. 1, embodiment illustrated in fig. 2 in, for the process of how in videotex system provided by the invention, video data to be stored, be described in detail.Wherein, Fig. 1, Fig. 2 embodiment emphasis not existing together and being described for the present invention and prior art, other further do not launch for realizing videotex system part necessary but that can find in the prior art reference, those skilled in the art, in conjunction with these embodiment of existing techniques in realizing, do not repeat them here.Further, at video data, be stored in physical disk, in order to call these video datas, be also necessary very much that (video file or video recording) searches for (retrieval) to these video datas, correspondingly, embodiment illustrated in fig. 3ly provide such technological means.
Particularly, in the present embodiment an event is searched for.First perform step S121: determine search period and search events.For example, determine that search time, section was: 2010-09-22 12:00 ~ 13:00, search events is " crowd massing ".It will be appreciated by those skilled in the art that determining of search events determined by search operation factor conventionally, for example, " delete recording channel 1 ", do not repeat them here.
Next enters step S122: determine recording channel to be searched.The recording channel to be searched mainly mouse based on user is determined after clicking selection.
Then perform step S123: judge whether to exist the bulk overlapping mutually with a corresponding and described period of described recording channel to be searched and described search period.Particularly, in this step, determine two key elements: 1) recording channel is consistent with recording channel definite in above-mentioned steps S122; 2) piece period and search period definite in described step S121 exist associatedly, and preferably two periods are overlapping.For meeting these two key elements, further carry out following step S124, otherwise this search procedure finishes, search for unsuccessfully.
Next enter step S124: judge in described bulk, whether there is the video record that its event information is identical with described search events.In the situation that judgment result is that of above-mentioned steps S123 is sure, carry out this step, determined that the piece time period is identical, determine that further whether event content is identical.Further, if it will be appreciated by those skilled in the art that, the judged result of this step negates, and shows the video file that is consistent with the determined search condition of step S121, the information of feedback search failure, and this process finishes; Otherwise, if the judged result of this step is sure, enter following step S125, do not repeat them here.
Finally perform step S125: described its event information video record identical with described search events of feedback.If the judged result of above-mentioned steps S124 is sure, in determining step S121, determined search condition is satisfied, so to the searched content arriving described in client feedback, i.e. a video record (video data or video file).
It will be appreciated by those skilled in the art that described step S123 and step S124 can convert mutually, for example, can in described step S123, to event, search for, and then in step S124, the time period are searched in a variation example of the present embodiment.But it will be appreciated by those skilled in the art that in step S123 that first the efficiency to searching for the piece time period is higher, do not repeat them here.
Further, it will be appreciated by those skilled in the art that the search strategy of searching for for videotex system provided by the invention of in fact having described embodiment illustrated in fig. 3.Preferably, in the present invention, search is divided into file search and event searching, uses respectively file ID and event id unique identification, keeps in logic consistent with traditional approach.Preferably, file search is generally dedicated tunnel number in business, all video records (namely video file) is searched according to start time and end time.Further, for file search, while searching for, first compare the start and end time in piece index, if the period of search and piece period, without overlapping, are skipped this piece; If have overlappingly, go so again to compare one by one the period in the video record in piece, and if the search period have overlappingly, this video record is exactly the record of searching requirement so.
Further, event searching is on the basis of file search, has specified event type.During search, equally first detect the piece index time, and then go to event zone in piece to search the event that meets the time period.By event information, can correspond to certain video record.
Those skilled in the art understand further, and different in the situation that, search efficiency provided by the invention exists different situations.For example, if when search, according to the strategy of comparing one by one every video record, for the hard disk of a hundreds of G, will be compared the number that records of 100,000 orders of magnitude under extreme case, efficiency is lower.Consider in the situation without time synchronized, the video record time of a certain passage all records successively according to time sequencing.In this case, can, first to piece time-sequencing, then use simply binary search.If data block number is N, and video record in piece is also adopted to binary search, the number that records comparing is so:
log2(N)?+?2×log2(47)
Therefore, recording number and can be controlled at tens relatively.If but consider time synchronization problem, so search mechanisms will complexity how.First in business, guarantee, when time synchronized, stop video recording, start time again after update time.No matter so be logging timestamp in piece index timestamp or piece, all can jump.For timestamp jump backward, also little for the impact of search strategy; But the time is forward adjusted and can bring certain technical difficulty to search strategy.For the situation that time is forward adjusted, the search strategy that temporarily has nothing particularly preferred.During sequence, according to the start time, sort, then with binary search, meet the record of searching for start time condition.In the record that meets start time condition searching out, compare one by one end time condition.Suppose that the number that records that meets start time condition has k, comparand so is altogether:
log2(N)?+?2×log2(47)?+?k
Under extreme case, k equals all numbers that record.But the search strategy for time adjustment forward provided by the invention remains reasonable search strategy, because only with comparing the end time.Those skilled in the art are appreciated that and do not repeat them here this.
Fig. 4 illustrates according to a specific embodiment of the present invention, the subregion schematic diagram of the videotex system based on the storage of fast video data provided by the invention.Preferably, in the present invention, for videotex system, provide a set of partitioning technique scheme for physical disk, be about to whole subregion and can be divided into following 3 parts:
1, main partition information and piece index.In the 5M space starting most at subregion.Partition information has been deposited the information of some these subregions, as partition size, and blockette number, data block reference position etc.
2, secondary partition information and piece index.In the 5M space at the end of subregion.When main partition information and piece index corruption, from secondary the inside reading information.
3, data block.After leaving out the beginning and the end, remaining space is divided into some data blocks by 128M size.In data block, deposit media frame.
It will be appreciated by those skilled in the art that above-mentioned data block size can change, such as preferably from 64M to 2G not etc., this depends primarily on fdisk size, also depends on concrete enforcement demand.Preferably, for front monitoring front-end, be fixed as 128M.Conventionally, in the one section of space starting most in data block, deposit frame index, according to frame index, find corresponding frame data in data block.Those skilled in the art can realize the present embodiment in conjunction with prior art and foregoing description, do not repeat them here.
Fig. 5 illustrates according to a specific embodiment of the present invention, the logical layer schematic diagram of the videotex system based on the storage of fast video data provided by the invention.The effect that it will be appreciated by those skilled in the art that videotex system provided by the invention is exactly between recording playback is as storehouse and bottom writable layer, to set up a management video record metadata and and the level of read-write media data.Preferably, in this embodiment, described videotex system comprises:
User api, for providing the various video datas that call according to described videotex system storage to described videotex system outside;
Recording playback is as storehouse, for according to the management of the various video datas of described videotex system storage, and accepts predetermined various interface function to realize the outside management to described video data;
Video database reading layer, for managing according to various video datas the depositing and reading on disk of described videotex system storage, it accepts from above-mentioned recording playback the interface function as storehouse, makes described recording playback can operate described video data as storehouse;
Virtual File System, at least for providing reading and writing, the mapping function for the various video datas of storing according to described videotex system to outside;
Reading and writing of files system;
Block I/O device access layer, for accepting the handling function of physical disk to realize the operation to physical disk, wherein, described in described reading and writing of files system access block I/O device access layer with realize to Virtual File System with and upper each logical layer to the read-write that is stored in the described video data in described physical disk with deposit.
Further, it will be appreciated by those skilled in the art that described user api is that recording playback offers as storehouse the various application programming interfaces that upper strata is used.Preferably, in order to reduce the change of upper level applications, for example, to realize docking of the existing video system of videotex system provided by the invention and other (supervisory system), for example, to enter in principle as far as possible the interface providing as storehouse with former recording playback consistent.
Further, it will be appreciated by those skilled in the art that the interface function to video record operation that described recording playback is provided by videotex system provided by the invention as storehouse use, realize recording playback as data management, comprise video reproduction, video recording, the functions such as download.
Further, it will be appreciated by those skilled in the art that described Virtual File System can mask the difference of using between RAWIO and use traditional file systems, upper-layer user does not need to adopt which kind of file system between concern and block I/O device access layer.Preferably, described Virtual File System is used RAWIO.
Further, it will be appreciated by those skilled in the art that the effect of described block I/O device access layer is to provide the handling function to physical disk by driving, do not repeat them here.
Fig. 6 illustrates according to a specific embodiment of the present invention, front end video recording-reproducing system logical layer schematic diagram provided by the invention.It will be appreciated by those skilled in the art that front end video recording-reproducing system provided by the invention compared with prior art, at least Rawmedia module, Rpctrl_raw module, Rpdownload_raw are unlike the prior art.Preferably, described Rawmedia module completes realization and the encapsulation of videotex system provided by the invention.For example preferably, described Rawmedia module provides video recording of interpolation, searches appointment video recording, writes frame data, reads the functions such as frame data.Further, described Rawmedia module also will provide partition format to business, the interface of the disk operating such as Subarea detecting simultaneously.
It will be appreciated by those skilled in the art that described Rpctrl_raw module preferably substitutes rpctrl_c module of the prior art and completes the scheduling on rawmedia to recording playback picture.It is unblock mode that the IO buffer memory of the file system of Rawmedia module guarantees, so rpctrl_raw do not need oneself to open recording playback as buffer memory, directly dispatches the interface of rawmedia.
It will be appreciated by those skilled in the art that described Rpdownload_raw module preferably realizes the function of download service end.
Further, described operation layer module specifically can be determined according to lower layer interface and according to implement needing by business, and this does not affect flesh and blood of the present invention, does not repeat them here.
According to foregoing invention content and specific embodiment, it will be appreciated by those skilled in the art that video data video database reading layer has following technical characterstic:
1. adopt bulk to organize video recording data, video recording subregion is divided into the bulk of formed objects, for example 128M;
2. same bulk can only be preserved the video recording data of a passage, but can support the multistage video record of same passage.The video recording data of a passage can be kept in a plurality of bulks;
3. system is supported two kinds of overlay strategies: the space that stops, recording a video after video recording space is full covers completely afterwards.Select after overlay strategy, cover (in all passages end time) the earliest according to the time finishing the earliest of recording a video in bulk;
4. in back-up system, dynamically increase, delete video recording subregion;
5. the subregion of recording a video in back-up system is arbitrarily changed position;
6. after supporting that a video recording hard disk is accessed to other monitoring product, continue video recording;
7. support to revise system time, after modification system time, video recording behavior is normal.
8. alarm is pre-recorded and is adopted internal memory to pre-record.
Preferably, described videotex system can be based upon in file system, also can directly use raw partition.Preferably, described videotex system can be supported RAWIO and file system, preferably by distinguishing, uses RAWIO or file system in partition information.
Preferably, videotex system provided by the invention has fully taken into account front monitoring front-end product for the video recording of video data, all application strategies such as capture, pre-record.It considers, according to the relatively simple feature of the recording playback picture of front monitoring front-end, to design one and be more suitable for replacing traditional file system in the videotex system of front monitoring front-end, thereby can meet the more wide market demand.
Above specific embodiments of the invention are described.It will be appreciated that, the present invention is not limited to above-mentioned specific implementations, and those skilled in the art can make various distortion or modification within the scope of the claims, and this does not affect flesh and blood of the present invention.

Claims (6)

1. the control method based on the storage of fast video data, is characterized in that, a video recording subregion comprises main partition information, piece index and some bulks, and described index comprises the piece period of described bulk; Described in each, bulk comprises frame index, and only can preserve the some sections of video records from same recording channel,
Wherein, described control method comprises the steps to store described video record:
A. judge whether the frame that the next one from a video record of a recording channel is written into is key frame, and whether the remaining space that judges the current bulk being written into is lower than the 3rd threshold value;
If the frame that b. the described next one is written into is that the remaining space of key frame and the described current bulk being written into is lower than described the 3rd threshold value, according to recording channel, from the some bulks corresponding with it, determine that a bulk is used for preserving video record, wherein said step b comprises:
B1. determine a plurality of bulks corresponding with described recording channel;
B2. judge in a plurality of bulks corresponding with described recording channel and whether exist and do not record full bulk;
If b3'. exist and do not record full bulk in a plurality of bulks corresponding with described recording channel, described in described video record being kept at, do not record in full bulk, comprising:
Whether the remaining space of i'. not recording full bulk described in judgement is lower than Second Threshold;
If ii'. the described remaining space of not recording full bulk is lower than described Second Threshold, carry out the step of determining a plurality of bulks corresponding with described recording channel;
If b3. do not exist in a plurality of bulks corresponding with described recording channel and do not record full bulk, judge whether to exist empty bulk;
If b4'. there is the bulk of described sky, described video record is kept in the bulk of described sky, and according to described recording channel, marks the recording channel number of the bulk of described sky;
If b4. there is not the bulk of described sky, determine bulk to be covered, and described in described video record is saved in bulk to be covered,
Wherein, described control method comprises the steps to search for video record:
A '. according to time sequencing, described each bulk is carried out to index order;
A. determine search period and search events;
B. determine recording channel to be searched;
C. judge whether to exist the bulk overlapping mutually with a corresponding and described period of described recording channel to be searched and described search period;
If D'. the judged result of described step C is sure, judge in described bulk, whether there is the video record that its event information is identical with described search events;
If E'. the judged result of described step D' is sure, feed back described its event information video record identical with described search events.
2. control method according to claim 1, is characterized in that, in same video recording subregion, the capacity of some bulks is identical.
3. control method according to claim 1, is characterized in that, described step b4 comprises the steps:
-bulk to be covered described in the bulk that generates ID minimum is defined as.
4. control method according to claim 1, is characterized in that, described step b4 comprises the steps:
-bulk to be covered described in the bulk that generates ID minimum in bulk in use is not defined as.
5. control method according to claim 1, is characterized in that, described video recording subregion also comprises secondary partition information and secondary piece index.
6. the control system based on the storage of fast video data, is characterized in that, a video recording subregion comprises main partition information, piece index and some bulks, and described index comprises the piece period of described bulk; Described in each, bulk comprises frame index, and only can preserve the some sections of video records from same recording channel,
Wherein, described control system comprises if lower device is with video record as described in storing:
The 3rd judgment means, whether the frame being written into for the next one judging from a video record of a recording channel is key frame, and whether the remaining space that judges the current bulk being written into is lower than the 3rd threshold value;
The first determining device, for the frame being written into when the described next one, be that the remaining space of key frame and the described current bulk being written into is lower than described the 3rd threshold value, according to recording channel, from the some bulks corresponding with it, determine that a bulk is used for preserving video record, described the first determining device comprises:
The second determining device, for determining a plurality of bulks corresponding with described recording channel;
The first judgment means, does not record full bulk for judging whether a plurality of bulks corresponding with described recording channel exist;
The first treating apparatus, for when full bulk is not recorded in a plurality of bulks existence corresponding with described recording channel, does not record in full bulk described in described video record being kept at, and described the first treating apparatus comprises:
The 5th judgment means, for the remaining space of not recording full bulk described in judging whether lower than Second Threshold;
The 7th treating apparatus, for when the described remaining space of not recording full bulk is lower than described Second Threshold, determines a plurality of bulks corresponding with described recording channel,
The second judgment means, does not exist while not recording full bulk for a plurality of bulks when corresponding with described recording channel, judges whether to exist empty bulk;
The second treating apparatus, for when there is the bulk of described sky, is kept at described video record in the bulk of described sky, and according to described recording channel, marks the recording channel number of the bulk of described sky;
The 3rd treating apparatus, for when not there is not the bulk of described sky, determines bulk to be covered, and described in described video record is saved in bulk to be covered,
Wherein, described control system comprises if lower device is to search for video record:
Collator, for carrying out index order according to time sequencing to described each bulk;
The 3rd determining device, for determining search period and search events;
The 4th determining device, for determining recording channel to be searched;
The 6th judgment means, for judging whether to exist the bulk overlapping mutually with a corresponding and described period of described recording channel to be searched and described search period;
The 7th judgment means, for when judgment result is that of described the 6th judgment means is sure, judges in described bulk, whether there is the video record that its event information is identical with described search events;
The tenth treating apparatus, for when judgment result is that of described the 7th judgment means is sure, described its event information video record identical with described search events of feedback.
CN201110109102.3A 2011-04-29 2011-04-29 File system control method based on rapid video data storage Active CN102760136B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110109102.3A CN102760136B (en) 2011-04-29 2011-04-29 File system control method based on rapid video data storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110109102.3A CN102760136B (en) 2011-04-29 2011-04-29 File system control method based on rapid video data storage

Publications (2)

Publication Number Publication Date
CN102760136A CN102760136A (en) 2012-10-31
CN102760136B true CN102760136B (en) 2014-11-26

Family

ID=47054594

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110109102.3A Active CN102760136B (en) 2011-04-29 2011-04-29 File system control method based on rapid video data storage

Country Status (1)

Country Link
CN (1) CN102760136B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345477A (en) * 2013-06-18 2013-10-09 任沙浦 Data storage method for monitoring device
CN104461375B (en) * 2013-09-24 2018-05-01 浙江大华技术股份有限公司 A kind of distribution method and device of disk task
CN104461920B (en) * 2014-12-09 2019-04-12 杭州华为数字技术有限公司 A kind of method and device of storing data
CN104469310A (en) * 2014-12-12 2015-03-25 浙江省公众信息产业有限公司 Record data network storage method and system and video monitoring platform
CN106293518B (en) * 2016-07-29 2019-09-10 成都神州数码索贝科技有限公司 A kind of efficient security industry media data storage file system
WO2019079944A1 (en) * 2017-10-23 2019-05-02 深圳市锐明技术股份有限公司 Video data storage method and device, and terminal device
CN109543065B (en) * 2018-11-14 2023-04-28 成都皓图智能科技有限责任公司 Video active identification method combined with block chain
CN109656874B (en) * 2018-11-28 2024-03-08 山东蓝洋智能科技有限公司 Method for implementing file management system in dual system
CN115955581A (en) * 2023-03-15 2023-04-11 浪潮电子信息产业股份有限公司 Real-time video processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101069176A (en) * 2004-11-30 2007-11-07 三星电子株式会社 Apparatus and method for reproducing multimedia data using virtual file system
CN101533416A (en) * 2009-04-23 2009-09-16 杭州华三通信技术有限公司 Method and system for managing video and audio file
CN101714391A (en) * 2009-11-12 2010-05-26 北京东方网力科技有限公司 Data storage method and device
CN101794306A (en) * 2010-03-02 2010-08-04 上海华平信息技术股份有限公司 Multi-type video file block storage system and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101437131B (en) * 2008-12-31 2010-12-08 中兴通讯股份有限公司 Method and apparatus for customizing frontend picture recording of video monitoring system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101069176A (en) * 2004-11-30 2007-11-07 三星电子株式会社 Apparatus and method for reproducing multimedia data using virtual file system
CN101533416A (en) * 2009-04-23 2009-09-16 杭州华三通信技术有限公司 Method and system for managing video and audio file
CN101714391A (en) * 2009-11-12 2010-05-26 北京东方网力科技有限公司 Data storage method and device
CN101794306A (en) * 2010-03-02 2010-08-04 上海华平信息技术股份有限公司 Multi-type video file block storage system and method

Also Published As

Publication number Publication date
CN102760136A (en) 2012-10-31

Similar Documents

Publication Publication Date Title
CN102760136B (en) File system control method based on rapid video data storage
CN102156738B (en) Method for processing data blocks, and data block storage equipment and system
US9021175B2 (en) Method for reordering access to reduce total seek time on tape media
CN100377112C (en) Disk drive, control method thereof and disk-falsification detection method
CN100421074C (en) Method for automatically selecting a software application
US8131671B2 (en) Uninterrupted data access during the migration of data between physical file systems
US20060218366A1 (en) Data relocation method
JP4402103B2 (en) Data storage device, data relocation method thereof, and program
CN105144142A (en) Object storage using multiple dimensions of object information
US6952757B2 (en) Method, system, and program for managing storage units in storage pools
US20220028424A1 (en) Systems for optimized presentation capture
CN101315613A (en) Apparatus and method of processing data of non-volatile memory
CN107665219A (en) A kind of blog management method and device
CN106294387A (en) Data migration method and device
US10891266B2 (en) File handling in a hierarchical storage system
JP5697195B2 (en) Management system, program and method for controlling table mirroring based on access prediction
US20090030954A1 (en) Management of multiple virtual data copies
JP2015079409A (en) Creation and management of logical volume snapshots under hierarchical management
JP6531574B2 (en) Storage device, storage device control program and storage device control method
CN107480281B (en) Method for constructing unified view among heterogeneous file systems
CN114153394A (en) Data storage management method, device and equipment
CN109189724A (en) Improve the method and device of video monitoring system audio, video data storage efficiency
CN100573698C (en) Control device, control method, pen recorder and recording method
CN106484312A (en) A kind of magnetic disk of virtual machine data migration method and device
US8760781B2 (en) System utility for controling data synchronization in a tape data storage system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 215011 No. 131 Jin Shan Road, Suzhou hi tech Industrial Development Zone, Jiangsu, Suzhou

Applicant after: Suzhou Keda Technology Co., Ltd.

Address before: 215011 No. 131 Jin Shan Road, Suzhou hi tech Industrial Development Zone, Jiangsu, Suzhou

Applicant before: Suzhou Keda Technology Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant