CN102760136A - 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
CN102760136A
CN102760136A CN2011101091023A CN201110109102A CN102760136A CN 102760136 A CN102760136 A CN 102760136A CN 2011101091023 A CN2011101091023 A CN 2011101091023A CN 201110109102 A CN201110109102 A CN 201110109102A CN 102760136 A CN102760136 A CN 102760136A
Authority
CN
China
Prior art keywords
bulk
video
recording
control method
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.)
Granted
Application number
CN2011101091023A
Other languages
Chinese (zh)
Other versions
CN102760136B (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

Images

Landscapes

  • Television Signal Processing For Recording (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

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 fast video data storage
Technical field
The present invention relates to the video flowing control system, video file control system especially particularly, relates in the video flowing control system videotex system and to tackling the control method that said videotex system is controlled.
Background technology
The operation class video monitoring business is based on broadband network provides image, sound and various alerting signal remote collection, transmission, storage, processing for the user a kind of novel value-added telecom services.Its professional emphasis is through a widely used RMON center service platform, and to be that the user provides convenient, economical, effective remote monitoring total solution with centralized sectorised operation way.Professional through operation class video monitoring, the user can not receive time, site limitation that monitoring objective is monitored in real time, manages, watched, and realizes unified monitoring, storage and uniform, unified management and the resource sharing of cross-region.
At present, in video monitoring system, use EXT3 or XFS file system on its front monitoring front-end product usually.These systems have certain versatility, and interconnectivity is high, but variety of issue often occurs; For example: in case behind the power-off restarting; These file system need the long time to repair, thereby are difficult to satisfy the demand of restarting system, operate as normal fast, may cause potential safety hazard; Because original file system exists various complex operations, thus some program errors (BUG) can be caused, and with regard to these are wrong, be not to be directed against monitoring business, so in fact can delete the program that these are unnecessary; Because the cavity on the disk that causes of file system itself and because the geographically discontinuous magnetic head that causes frequently moves and then causes the disk life-span to shorten faster, has strengthened user's hardware cost.
Because above variety of problems in the process that realizes video monitoring service, exists a kind of file system of video monitoring service and demand that is directed against the control method of this document system of being suitable for that provide.
Therefore, how the present invention provides simple, suitable file system that is used for video monitoring service of a cover and the control method that is directed against this document system accordingly if will solving.
Summary of the invention
To defective of the prior art, the purpose of this invention is to provide a kind of file system based on the fast video data storage 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 fast video data storage is provided; It is characterized in that, comprise the steps: that b. confirms that according to recording channel a bulk is used to preserve video record from some bulks corresponding with it, wherein; A video recording subregion is divided into some bulks, and said bulk only can be preserved the plurality of sections video record from same recording channel.
According to another aspect of the present invention; A kind of control device of the file system based on the fast video data storage also is provided; It comprises: first confirms device, is used for confirming that from some bulks corresponding with it bulk is used to preserve video record according to recording channel, wherein; A video recording subregion is divided into some bulks, and said bulk only can be preserved the plurality of sections video record from same recording channel.
Preferably, the capacity of some bulks is identical in the said same video recording subregion.
Preferably, said first confirms that device comprises: second confirms device, and it is used for confirming the bulk corresponding with said recording channel; First judgment means, it is used for judging whether the bulk corresponding with said recording channel exists does not record full bulk; First treating apparatus, it is used for when full bulk is recorded in the bulk existence corresponding with said recording channel, said video record not being kept at said the record in the full bulk.
Preferably, said first confirms that device also comprises: second judgment means, it is used for not having the bulk that judges whether to exist sky when not recording full bulk in the bulk corresponding with said recording channel.
Preferably, said first confirms that device also comprises: second treating apparatus, it is used for when having the bulk of said sky said video record is kept at the bulk of said sky, and marks the recording channel number of the bulk of said sky according to said recording channel.
Preferably, said first confirms that device also comprises: the 3rd treating apparatus, it is used for when not having the bulk of said sky, confirming bulk to be covered, and said video record is saved in the bulk said to be covered.
Preferably, said the 3rd treating apparatus comprises: the manages device everywhere, and it is used for confirming as bulk said to be covered with generating the minimum bulk of ID.
Preferably, said the 3rd treating apparatus comprises: the 5th treating apparatus, it is used for that in use bulk is not generated the minimum bulk of ID and confirms as bulk said to be covered.
Preferably; Said control device also comprises: the 3rd judgment means; It is used to judge whether the frame that the next one is written into is key frame, and judges whether the remaining space of the current bulk that is written into is lower than the 3rd threshold value, wherein; If above-mentioned two conditions all are satisfied, then carry out said first judgment means.
Preferably, said control device also comprises: the 4th judgment means, and it is used to judge whether the remaining space of bulk said to be covered is lower than first threshold; And the 6th treating apparatus, it is used for when the remaining space of bulk said to be covered is lower than first threshold, carrying out said second judgment means.
Preferably, said control device also comprises: the 5th judgment means, and it is used to judge whether the said remaining space of not recording full bulk is lower than second threshold value; And the 7th treating apparatus, it is used for when the said remaining space of not recording full bulk is lower than second threshold value, carrying out said first and confirms device.
Preferably, said first confirms that device also comprises: the 8th treating apparatus, it is used for when not having the bulk of said sky, stopping video recording.
Preferably, said video recording subregion comprises main partition information, piece index and some bulks, and wherein, said bulk comprises frame index.Preferably, said video recording subregion also comprises secondary partition information and secondary piece index.Preferably, said index comprises the piece period of bulk.
Preferably, said control device also comprises: the 3rd confirms device, and it is used for confirming the search period; The 4th confirms device, and it is used for confirming recording channel to be searched; The 6th judgment means, it is used to judge whether to exist the bulk that overlaps mutually with said corresponding and said period of recording channel to be searched and said search period; The 7th judgment means, it is used for judging whether exist its video recording period to search for the video record that the period overlaps mutually with said in the said bulk when being sure in the judged result of said step C; And the 9th treating apparatus, its be used for the judged result of said step D when being sure said its video recording period of feedback search for the video record that the period overlaps mutually with said.
Preferably, said index comprises the piece period of bulk.Further preferably, said control device also comprises: the 3rd confirms device, and it is used for confirming the search period; The 4th confirms device, and it is used for confirming recording channel to be searched; The 6th judgment means, it is used to judge whether to exist the bulk that overlaps mutually with said corresponding and said period of recording channel to be searched and said search period; The 8th judgment means, it is used for judging the video record that whether exists its event information identical with said search events in the said bulk when being sure in the judged result of said step C; The tenth treating apparatus, it is used at the judged result of said step D' said its event information of time feedback video record identical with said search events that be sure.
Preferably, said control device also comprises: collator, it is used for according to time sequencing said each bulk being carried out index order.
According to a further aspect of the invention, a kind of videotex system based on the fast video data storage is provided, it is characterized in that, comprise following logical layer at least:
User api is used for to said videotex system outside the various video datas that call according to said videotex system storage being provided;
Recording playback is used for the management according to the various video datas of said videotex system storage as the storehouse, and accepts predetermined various interface function to realize outside management to said video data;
The video database reading layer is used to manage various video datas the depositing and reading on disk according to said videotex system storage, and it accepts to make said recording playback can operate said video data as the storehouse from the interface function of above-mentioned recording playback as the storehouse;
Virtual File System is used for to the outside reading and writing, mapping function to the various video datas of storing according to said videotex system being provided at least;
The reading and writing of files system;
Block I/O device access layer; Be used to accept handling function to physical disk to realize operation to physical disk; Wherein, said reading and writing of files system visit said block I/O device access layer with realize to Virtual File System with and go up each logical layer to the read-write that is stored in the said video data in the said physical disk with deposit.
The present invention passes through the improvement to the file system of video monitoring system; And correspondingly provide a cover to be used to control the technical scheme of this document system; Between recording playback is as storehouse and bottom writable layer, set up a management video record metadata with and the level of read-write media data, thereby the service efficiency that realizes the storage of video data fast and strengthen the recording playback picture with reduce failure rate.
Description of drawings
Through reading the detailed description of non-limiting example being done with reference to following accompanying drawing, 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, to the process flow diagram based on the control method of the file system of fast video data storage;
Fig. 2 illustrates according to a second embodiment of the present invention, to the process flow diagram based on the control method of the file system of fast video data storage;
Fig. 3 illustrates a third embodiment in accordance with the invention, to the process flow diagram based on the control method of the file system of fast video data storage;
Fig. 4 illustrates according to an embodiment of the present invention, the subregion synoptic diagram of the videotex system based on the fast video data storage provided by the invention;
Fig. 5 illustrates according to an embodiment of the present invention, the logical layer synoptic diagram of the videotex system based on the fast video data storage provided by the invention; And
Fig. 6 illustrates according to an embodiment of the present invention, front end video recording-reproducing system logical layer synoptic diagram provided by the invention.
Embodiment
Fig. 1 illustrates according to the first embodiment of the present invention, to the process flow diagram based on the control method of the file system of fast video data storage.Preferably, execution in step S101 at first: judge whether the next frame that is written into is key frame.It will be apparent to those skilled in the art that; In the present embodiment; Said video monitoring system just writes video data (perhaps being called video file) through videotex system provided by the invention to physical disk, preferably, said video data by a frame, a frame write.In such process, if the current frame that is written into is a key frame, next frame is a key frame in other words, then in ablation process, need write continuously, and can not change the blocks of files that is used to store this video data midway, i.e. the bulk that the present invention set forth.Therefore, judge at first in this step whether the next frame that is written into is key frame.Particularly, it will be appreciated by those skilled in the art that said key frame refers to the I frame in the video code flow.Further, the process through following step S102 judges whether before writing key frame, to switch said bulk does not repeat them here.
Next gets into step S102: whether the remaining space of judging the current bulk that is written into is lower than the 3rd threshold value.It will be apparent to those skilled in the art that; If the remaining space of the said current bulk that is written into is smaller; For example preferably can't satisfy the situation that said key frame is write continuously, then before writing said key frame, will accomplish the handoff procedure that is written into bulk to said, promptly confirm one again and (for example have enough spaces; Preferably can hold said 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, remaining space (capacity) for example through obtaining said bulk, and said remaining space and said the 3rd threshold value compared to confirm the judged result of this step.If the judged result of this step is sure, the remaining space of the promptly said current bulk that is written into is lower than said the 3rd threshold value, then gets into following step S103; Otherwise if the remaining space of the said current bulk that is written into is not less than said the 3rd threshold value, then this process finishes, and promptly need not seek next bulk, and can continue on the current bulk that is written into, to write video data.
According to foregoing description, it will be appreciated by those skilled in the art that if need seek a bulk that is fit to write current video data again, then execution in step S103 at first: confirm the bulk corresponding with said recording channel.Further, it will be appreciated by those skilled in the art that preferably, in the present invention that said each bulk can only corresponding recording channel, the corresponding video data of recording channel then can write a plurality of bulks, and promptly recording channel and bulk are the relations of one-to-many.It will be apparent to those skilled in the art that; Said recording channel pointer is to one road virtual logical path read and write of video recording code stream, and technical scheme provided by the present invention must be that the meaning of many-one relationship is that a virtual logical path need take a plurality of physical spaces of disk system with recording channel and bulk.
Next get into step S104: judge whether to exist in the bulk corresponding and do not record full bulk with said recording channel.It will be appreciated by those skilled in the art that a video data in the bulk possibly be continuous, also possibly be discontinuous.For example, preferably, when the corresponding video data of video file is not write full bulk fully, at this moment, then just there is the space of free time in this bulk; Further, in the time will writing next video file,, then just cause the data in this bulk discontinuous if this bulk is continued to write.Further, in this step, at first confirm all bulks corresponding with said recording channel, for example defining 50 bulks altogether can be corresponding with said recording channel; Whether be similar to above-mentioned steps S102 then, those skilled in the art can obtain the total volume and the remaining space (capacity) of each bulk, thereby can judge to exist in the bulk corresponding with said recording channel and 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.
Last execution in step S105: said video record is kept at said the record in the full bulk.Preferably, confirmed a bulk to be written through above-mentioned steps S104 after, then in this step, corresponding video record (video data) is write in the corresponding disk space of this bulk through writing instruction.Those skilled in the art combine prior art can realize this step, 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 the description: under the normal condition, according to partitioned organization, record by frame.A data block can only be given a passage video recording.When beginning video recording when (physical disk of promptly managing to videotex system writes video), judge channel number earlier, find same channels number, and do not record full piece, continue to record (promptly writing video data); If no, just newly look for one, be labeled as this passage, begin to record (promptly 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 47 video records at most, if surpass this video record number, even if in the piece real data less than, also switch a new piece.
If in certain video recording, real data has taken in the piece and has had living space, so just force to stop video recording, restart.Can newly look for one to continue record after restarting.For this situation, consider the wait key frame, just switch in the time of so just need in a data block, also remaining between above-mentioned the 3rd threshold value at the key frame place.As above-mentioned embodiment illustrated in fig. 1,, preferably, need carry out anticipation through above-mentioned deterministic process in order to accomplish switching at the key frame place.
Further, it will be appreciated by those skilled in the art that above-mentioned the 3rd threshold value can be no more than 5000 principle according to total disk block number and confirm.For example, preferably, when total disk space is under the 1T situation, said the 3rd threshold value (data block size) can be confirmed as 256M.The data block size can change, and from 64M to 2G, does not wait, and depends on the fdisk size.Generally for front monitoring front-end, fixedly 128M gets final product.Deposit frame index in one section space that data block begins most, find corresponding frame data in the data block according to frame index.Data block is big more, and the speed of user search video recording is fast more, but the hard drive space that possibly waste is many more; Otherwise data block is more little, can influence user's search speed, but can practice thrift hard drive space, so the size of data block should be distributed according to user's actual application environment here, does not repeat them here.
Fig. 2 illustrates according to a second embodiment of the present invention, to the process flow diagram based on the control method of the file system of fast video data storage.Particularly, present embodiment can be used as the variant of above-mentioned first embodiment.It will be appreciated by those skilled in the art that above-mentioned first embodiment is a process of in the process of recording a video file, switching bulk, wherein set forth at least switch the opportunity of bulk and how to confirm one new for the bulk that is written into.And in the present embodiment, then the video process from one whole begins, and promptly once begins in the source of video recording from beginning.
Further, execution in step S111 at first: beginning is video recording once.For example it will be appreciated by those skilled in the art that client sends instruction and " begin video recording ", after then server end receives this instruction, call videotex system provided by the invention and begin to record a video, promptly begin to write the first frame video data to physical disk.
Next gets into step S112: confirm the bulk corresponding with said recording channel.This step can realize with reference to step S103 shown in Figure 1, not repeat them here.
Execution in step S113 then: judge whether to exist in the bulk corresponding and do not record full bulk with said recording channel.This step can realize with reference to step S104 shown in Figure 1, not repeat them here.If the judged result of this step then gets into following step S114 for what negate; Otherwise if the judged result of this step is sure, then said among the step S113 do not recorded full bulk as bulk to be written (not shown among Fig. 2), promptly with reference to above-mentioned step S105 shown in Figure 1, this process finishes then.Those skilled in the art embodiment illustrated in fig. 1ly can realize present embodiment with reference to above-mentioned, do not repeat them here.
Further, if next the judged result of above-mentioned steps S113 then gets into step S114 for what negate: judge whether to exist empty bulk.It will be appreciated by those skilled in the art that in above-mentioned each step only relate to and do not record full bulk, promptly this bulk has write the part video data, but still there is the remaining space of some in this bulk.And preferably, in this step, the bulk of said sky (spare time) then refers to not write the bulk of any data, and promptly the remaining space of this bulk is the maximum space of this bulk; And suboptimum ground, in a variant, the bulk of said sky (spare time) then refers to exist the bulk greater than the 4th threshold value remaining space, and for example greater than the bulk of 250M remaining space, this depends on the practical implementation needs, does not repeat them here.Correspondingly, those skilled in the art combine prior art and above-mentioned step S102 shown in Figure 1 can realize said variant, do not repeat them here.Further, if the judged result of this step then gets into following step S115 for what negate; Otherwise if the judged result of this step is sure, then with the bulk of the said sky among the step S114 as bulk to be written (not shown among Fig. 2), promptly with reference to above-mentioned step S105 shown in Figure 1, this process finishes then.Those skilled in the art embodiment illustrated in fig. 1ly can realize present embodiment with reference to above-mentioned, do not repeat them here.
Further, if the judged result of above-mentioned steps S114 is for negating, execution in step S115 then then: judge to generate whether the minimum bulk of ID is the current bulk of being read and write.In this step, at first confirm to generate the minimum bulk of ID, judge further then whether the minimum bulk of this generation ID is is read and write.Preferably, those skilled in the art combine prior art can realize this step, 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 said generation ID is minimum, inquire about, just can confirm the bulk of said generation ID minimum, do not repeat them here through indexed mode.Correspondingly, it will be appreciated by those skilled in the art that, then get into following step S116 if the judged result of this step is sure; Otherwise if the judged result of this step is what negate, then that said generation ID is minimum bulk is as bulk to be written, and bulk promptly to be covered (not shown among Fig. 2) is carried out following step S117 then.
Further, if the judged result of above-mentioned steps S115 is sure, then next get into step S116: the minimum bulk of said generation ID outside the bulk that said generation ID is minimum is confirmed as bulk said to be covered.It will be appreciated by those skilled in the art that if generating the minimum bulk of ID described in the above-mentioned steps S115 is is read and write, then can not cover, otherwise can influence ongoing read-write process generating the minimum bulk of ID.Therefore, according to generating the principle of the minimum bulk of ID as bulk to be covered, then will generate the minimum smaller bulk of bulk of ID than this, little bulk promptly second from the bottom is as bulk said to be covered.
Further, it will be appreciated by those skilled in the art that in a variant; Said step S116 also can be changed to " bulk that can be capped and generate the ID minimum is as bulk to be covered "; S116 is similar with above-mentioned steps, in this variant, still seeks and generates the minimum bulk of ID as bulk to be covered; But the minimum bulk of this generation ID can be capped when prerequisite was submitted to; For example preferably, when said bulk was in the state of being read or being write, it cannot be as bulk said to be covered; Again for example, when said bulk is set to can not read-write state the time, then it also cannot be as bulk said to be covered.Those skilled in the art combine prior art and the foregoing description can realize said variant, do not repeat them here.
Last execution in step S117: said video record is kept in the bulk to be covered.Particularly; It will be apparent to those skilled in the art that; This step is that with the difference of above-mentioned step S105 shown in Figure 1 this step writes video record (video data) in the bulk said to be covered, and then writes said the record in the full bulk with video record (video data) among the above-mentioned steps S105.If all as " target " bulk, then these two steps are identical with the bulk of said " not recording full " bulk and said " waiting to cover ".Those skilled in the art combine prior art and above-mentioned steps S105 can realize this step, 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, when confirming, because a variety of causes has confirmed that finally a script exists the bulk of video data to cover with the bulk that is written into.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, during the piece that can't obtain to record a video, can select a bulk to cover according to the upper strata needs.Further, when covering, choose and generate the minimum piece of ID, this piece is used as an empty piece uses, simultaneously the tag value in the piece index is added 1, thereby guarantee that the piece index can not occur overlapping.Further, if generate the minimum piece of ID just in use (such as in video reproduction), select to generate ID little piece so and cover.Correspondingly, those skilled in the art can also confirm 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, to the process flow diagram based on the control method of the file system of fast video data storage.Above-mentioned Fig. 1, embodiment illustrated in fig. 2 in, describe in detail for the process of how in videotex system provided by the invention, video data to be stored.Wherein, Fig. 1, Fig. 2 embodiment emphasis are described for not existing together of the present invention and prior art; Other are for realizing that videotex system is necessary but can find the part of reference then further not launch in the prior art; Those skilled in the art combine these embodiment of existing techniques in realizing, do not repeat them here.Further; Be stored in the physical disk at video data,, be necessary very that also (video file or video recording) searched for (retrieval) to these video datas in order to call these video datas; Correspondingly, embodiment illustrated in fig. 3 such technological means is provided.
Particularly, in the present embodiment an incident is searched for.Execution in step S121 at first: confirm search period and search events.For example, confirm 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 the definite usually by the decision of search operation factor of search events, for example " deletion recording channel 1 " do not repeat them here.
Next gets into step S122: confirm recording channel to be searched.Recording channel to be searched mainly selects the back to confirm based on user's click.
Execution in step S123 then: judge whether to exist the bulk that overlaps mutually with said corresponding and said period of recording channel to be searched and said search period.Particularly, in this step, confirm two key elements: the recording channel of 1) confirming among recording channel and the above-mentioned steps S122 is consistent; 2) the search period of confirming among piece period and the said step S121 exists related, preferably two periods overlappings.For satisfying these two key elements, then further carry out following step S124, otherwise this search procedure finishes i.e. search failure.
Next get into step S124: judge the video record that whether exists its event information identical in the said bulk with said search events.Under the judged result of above-mentioned steps S123 is sure situation, carry out this step, confirmed that promptly the piece time period is identical, confirm further whether event content is identical.Further, it will be appreciated by those skilled in the art that, then show the video file that is not consistent with the determined search condition of step S121 if the judged result of this step negates, the information of feedback search failure, this process finishes; Otherwise, if the judged result of this step is sure, then get into following step S125, do not repeat them here.
Last execution in step S125: feed back said its event information video record identical with said search events.If the judged result of above-mentioned steps S124 is sure, confirm that then determined search condition is satisfied among the step S121, so to the said content that is searched of client feedback, i.e. a video record (video data or video file).
It will be appreciated by those skilled in the art that in a variant of present embodiment, said step S123 and step S124 conversion each other for example can be searched for incident, in step S124, the time period are searched for then in said step S123.But it will be appreciated by those skilled in the art that among the step S123 that at first the efficient 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 to 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 file ID and event id unique identification respectively, keeps consistent with traditional approach in logic.Preferably, file search generally is dedicated tunnel number on business, all video records (video file just) is searched according to start time and concluding time.Further,, at first compare the start and end time in the piece index when searching for,, then skip this piece if the period and the piece period of search do not have overlapping to file search; If overlapping is arranged, go to compare one by one the period in the video record in the piece so again, if with the search period overlapping is arranged, 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.The same detection piece index time earlier during search, and then go the interior event zone of piece to search the incident that meets the time period.Through event information, can correspond to certain video record.
Those skilled in the art understand further, and under condition of different, there are different situations in search efficiency provided by the invention.For example, if when search according to the strategy of comparing every video record one by one, for the hard disk of a hundreds of G, extreme case will compare the record number of 100,000 orders of magnitude down, efficient is lower.Consider under the situation of no time synchronized that the video record time of a certain passage all records according to time sequencing successively.In this case, can use binary search then simply earlier to the piece time-sequencing.If the data block number is N, and video record in the piece is also adopted binary search, the record number that compares so is:
log2(N)?+?2×log2(47)
Therefore, the record number that compares can be controlled at tens.If but consider time synchronization problem, so search mechanisms will complicacy how.At first professional going up guarantees, when the time is synchronous, stops video recording, start time again after update time.No matter, all can jump so be logging timestamp in piece index timestamp or the piece.For timestamp jump backward, also little for the influence of search strategy; But the adjustment of time forward then can bring certain technical difficulty to search strategy.Situation for the adjustment of time does not forward temporarily have any good especially search strategy.Sort according to the start time during ordering, meet the record of searching for the start time condition with binary search then.In the record that meets the start time condition that searches out, compare the concluding time condition one by one.Suppose that the record number that meets the start time condition has k, comparand so altogether is:
log2(N)?+?2×log2(47)?+?k
Under the extreme case, k equals all record numbers.But the search strategy to time adjustment forward provided by the invention remains reasonable search strategy, because only with comparing the concluding time.Those skilled in the art are appreciated that this and do not repeat them here.
Fig. 4 illustrates according to an embodiment of the present invention, the subregion synoptic diagram of the videotex system based on the fast video data storage provided by the invention.Preferably, in the present invention, the partitioning technique scheme of one cover for physical disk is provided, has been about to whole subregion and can be divided into following 3 parts to videotex system:
1, main partition information and piece index.In the 5M space that subregion begins most.Partition information has been deposited the information of some these subregions, like partition size, and blockette number, data block reference position or the like.
2, secondary partition information and piece index.In the 5M space at the end of subregion.When main partition information and piece index corruption, read information from the inside of pair.
3, data block.After leaving out the beginning and the end, remaining space is divided into the plurality of data piece by the 128M size.Deposit media frame in the data block.
It will be appreciated by those skilled in the art that above-mentioned data block size can change, for example preferably from 64M to 2G, do not wait that this depends primarily on the fdisk size, also depends on concrete enforcement demand.Preferably, for front monitoring front-end, be fixed as 128M and get final product.Usually, in one section space that data block begins most, deposit frame index, find corresponding frame data in the data block according to frame index.Those skilled in the art combine prior art and foregoing description can realize present embodiment, do not repeat them here.
 
Fig. 5 illustrates according to an embodiment of the present invention, the logical layer synoptic diagram of the videotex system based on the fast video data storage provided by the invention.The effect that it will be appreciated by those skilled in the art that videotex system provided by the invention be exactly between recording playback is as storehouse and bottom writable layer, set up a management video record metadata with and the level of read-write media data.Preferably, in this embodiment, said videotex system comprises:
User api is used for to said videotex system outside the various video datas that call according to said videotex system storage being provided;
Recording playback is used for the management according to the various video datas of said videotex system storage as the storehouse, and accepts predetermined various interface function to realize outside management to said video data;
The video database reading layer is used to manage various video datas the depositing and reading on disk according to said videotex system storage, and it accepts to make said recording playback can operate said video data as the storehouse from the interface function of above-mentioned recording playback as the storehouse;
Virtual File System is used for to the outside reading and writing, mapping function to the various video datas of storing according to said videotex system being provided at least;
The reading and writing of files system;
Block I/O device access layer; Be used to accept handling function to physical disk to realize operation to physical disk; Wherein, said reading and writing of files system visit said block I/O device access layer with realize to Virtual File System with and go up each logical layer to the read-write that is stored in the said video data in the said physical disk with deposit.
Further, it will be appreciated by those skilled in the art that said user api is that recording playback offers the various application programming interfaces that use on the upper strata as the storehouse.Preferably; In order to reduce the change of upper level applications; To realize docking of the existing video system of videotex system provided by the invention and other (for example supervisory system), for example, to advance consistent with former recording playback as far as possible in principle as the interface that the storehouse provides.
Further, it will be appreciated by those skilled in the art that said recording playback as the storehouse use by videotex system provided by the invention provide to video record interface operable function, realize that recording playback as data management, comprises video reproduction, video recording, functions such as download.
Further, it will be appreciated by those skilled in the art that said Virtual File System can mask the difference of using between RAWIO and the use traditional file systems, promptly which kind of file system the upper-layer user need not go to adopt between concern and the block I/O device access layer.Preferably, said Virtual File System uses RAWIO.
Further, it will be appreciated by those skilled in the art that the effect of said block I/O device access layer is by driving the handling function to physical disk to be provided, do not repeat them here.
Fig. 6 illustrates according to an embodiment of the present invention, front end video recording-reproducing system logical layer synoptic 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, Rawmedia module, Rpctrl_raw module, Rpdownload_raw are different with prior art at least.Preferably, said Rawmedia module is accomplished the realization and the encapsulation of videotex system provided by the invention.For example preferably, said Rawmedia module provides and adds a video recording, searches to specify and record a video, write frame data, read function such as frame data.Further, said Rawmedia module also will provide partition format to business simultaneously, disk interface operable such as subregion detection.
It will be appreciated by those skilled in the art that said Rpctrl_raw module preferably substitutes rpctrl_c module of the prior art and accomplishes the scheduling of recording playback picture on rawmedia.It is the 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, and the interface of directly dispatching rawmedia gets final product.
It will be appreciated by those skilled in the art that said Rpdownload_raw module preferably realizes the function of download service end.
Further, said operation layer module specifically can confirm that this does not influence flesh and blood of the present invention, does not repeat them here by layer interface under the professional basis and according to the enforcement needs.
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 the video recording data, the video recording subregion is divided into the bulk of identical size, 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 supports two kinds of overlay strategies: the space that stops, recording a video after the video recording space is full completely covers the back.After selecting overlay strategy for use, cover (in all passages the earliest concluding time) according to the time that finishes the earliest of recording a video in the bulk;
4. dynamically increase, delete the video recording subregion in the back-up system;
5. the video recording subregion is arbitrarily changed the position in the back-up system;
6. support a video recording hard disk is inserted other monitoring product continued video recording;
7. support to revise system time, the video recording behavior is normal behind the modification system time.
8. alarm is pre-recorded and is adopted internal memory to pre-record.
Preferably, said videotex system can be based upon on the file system, also can directly use raw partition.Preferably, said videotex system can be supported RAWIO and file system, preferably is to use RAWIO or file system through in partition information, distinguishing.
Preferably, videotex system provided by the invention has fully taken into account the front monitoring front-end product to the video recording of video data, all application strategies such as capture, pre-record.The relative characteristic of simple of recording playback picture that it is considered according to front monitoring front-end designs one and is more suitable for replacing the traditional document system in the videotex system of front monitoring front-end, thereby can satisfy more vast market demand.
More than specific embodiment of the present invention is described.It will be appreciated that the present invention is not limited to above-mentioned specific implementations, those skilled in the art can make various distortion or modification within the scope of the claims, and this does not influence flesh and blood of the present invention.

Claims (21)

1. the control method based on the file system of fast video data storage is characterized in that, comprises the steps:
B. confirm that according to recording channel a bulk is used to preserve video record from some bulks corresponding with it,
Wherein, a video recording subregion is divided into some bulks, and said bulk only can be preserved the plurality of sections video record from same recording channel.
2. control method according to claim 1 is characterized in that, the capacity of some bulks is identical in the same video recording subregion.
3. control method according to claim 1 and 2 is characterized in that said step b comprises the steps:
B1. confirm the bulk corresponding with said recording channel;
B2. judge whether to exist in the bulk corresponding and do not record full bulk with said recording channel;
B3'. if full bulk is not recorded in existence in the bulk corresponding with said recording channel, then said video record is kept at said the record in the full bulk.
4. control method according to claim 3 is characterized in that said step b also comprises the steps:
B3. do not record full bulk as if not existing in the bulk corresponding, then judge whether to exist empty bulk with said recording channel.
5. control method according to claim 4 is characterized in that, also comprises the steps:
B4'. if there is the bulk of said sky, then said video record is kept in the bulk of said sky, and marks the recording channel number of the bulk of said sky according to said recording channel.
6. according to claim 4 or 5 described control methods, it is characterized in that, also comprise the steps:
B4. if there is not the bulk of said sky, then confirms bulk to be covered, and said video record is saved in the bulk said to be covered.
7. control method according to claim 6 is characterized in that said step b4 comprises the steps:
-will generate the minimum bulk of ID to confirm as bulk said to be covered.
8. control method according to claim 6 is characterized in that said step b4 comprises the steps:
-will be not do not generate the minimum bulk of ID in use the bulk to confirm as bulk said to be covered.
9. according to each described control method in the claim 1 to 8, it is characterized in that, before said step b, also comprise the steps:
A. judge whether the next frame that is written into is key frame, and judge whether the remaining space of the current bulk that is written into is lower than the 3rd threshold value, wherein,, then carry out said step b if above-mentioned two conditions all are satisfied.
10. according to each described control method in the claim 1 to 9, it is characterized in that, also comprise the steps:
Whether the remaining space of i. judging bulk said to be covered is lower than first threshold;
Ii. if the remaining space of bulk said to be covered is lower than first threshold, then carry out said step b3.
11. according to each described control method in the claim 1 to 10, it is characterized in that, also comprise the steps:
I'. judge whether the said remaining space of not recording full bulk is lower than second threshold value;
Ii'. if the said remaining space of not recording full bulk is lower than second threshold value, then carry out said step b1.
12. according to each described control method in the claim 1 to 11, it is characterized in that, also comprise the steps:
B4''. if there is not the bulk of said sky, then stop video recording.
13., it is characterized in that said video recording subregion comprises main partition information, piece index and some bulks according to each described control method in the claim 1 to 12, wherein, said bulk comprises frame index.
14. control method according to claim 13 is characterized in that, said video recording subregion also comprises secondary partition information and secondary piece index.
15., it is characterized in that said index comprises the piece period of bulk according to claim 13 or 14 described control methods, wherein, said control method also comprises the steps:
A. confirm the search period;
B. confirm recording channel to be searched;
C. judge whether to exist the bulk that overlaps mutually with said corresponding and said period of recording channel to be searched and said search period;
D. if the judged result of said step C is sure, then judge the video record that whether exists its video recording period and said search period to overlap mutually in the said bulk;
E. if the judged result of said step D is sure, then feeds back said its video recording period and search for the video record that the period overlaps mutually with said.
16., it is characterized in that said index comprises the piece period of bulk according to claim 13 or 14 described control methods, wherein, said control method also comprises the steps:
A. confirm search period and search events;
B. confirm recording channel to be searched;
C. judge whether to exist the bulk that overlaps mutually with said corresponding and said period of recording channel to be searched and said search period;
D'. if the judged result of said step C is sure, then judge the video record that whether exists its event information identical in the said bulk with said search events;
E'. if the judged result of said step D' is sure, then feed back said its event information video record identical with said search events.
17. according to claim 15 or 16 described control methods, it is characterized in that, before said steps A, also comprise the steps:
-according to time sequencing said each bulk is carried out index order.
18. the videotex system based on the fast video data storage is characterized in that, comprises following logical layer at least:
User api is used for to said videotex system outside the various video datas that call according to said videotex system storage being provided;
Recording playback is used for the management according to the various video datas of said videotex system storage as the storehouse, and accepts predetermined various interface function to realize outside management to said video data;
The video database reading layer is used to manage various video datas the depositing and reading on disk according to said videotex system storage, and it accepts to make said recording playback can operate said video data as the storehouse from the interface function of above-mentioned recording playback as the storehouse;
Virtual File System is used for to the outside reading and writing, mapping function to the various video datas of storing according to said videotex system being provided at least;
The reading and writing of files system;
Block I/O device access layer; Be used to accept handling function to physical disk to realize operation to physical disk; Wherein, said reading and writing of files system visit said block I/O device access layer with realize to Virtual File System with and go up each logical layer to the read-write that is stored in the said video data in the said physical disk with deposit.
19. videotex system according to claim 18 is characterized in that, said reading and writing of files system comprise at least as in the lower part any or appoint a plurality of:
-RAWIO, it is used to not have the disk read-write of file system.
20., it is characterized in that according to claim 18 or 19 described videotex systems, also comprise the front end video recording-reproducing system, wherein, said front end video recording-reproducing system comprises:
The Rawmedia module, it is used to provide the various interface that adapts with said videotex system;
The Rpctrl_raw module, it is used to realize the various video datas to according to said videotex system storage, encapsulation Rawmedia module is for providing the upper strata unified interface;
The Rpdownload_raw module, it is used to download the various files corresponding with said videotex system, so that said front end video recording-reproducing system can be mutual with said videotex system;
Unified encoding and decoding interface module, it is used for the calling interface of unified various codecs;
Media control layer is used for controlling the various video datas according to said videotex system storage according to the instruction of outside; And
Operation layer, it is used for to the outside miscellaneous service definition being provided, and the outside can be according to these business realizing different functions separately.
21. according to each described videotex system in the claim 18 to 20, it is characterized in that, realize management to the various video datas of storing according to said videotex system according to each described control method in the claim 1 to 17.
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 true CN102760136A (en) 2012-10-31
CN102760136B 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)

Cited By (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
CN104461920A (en) * 2014-12-09 2015-03-25 杭州华为数字技术有限公司 Method and device for storing data
CN104461375A (en) * 2013-09-24 2015-03-25 浙江大华技术股份有限公司 Method and device for distributing magnetic disk tasks
CN104469310A (en) * 2014-12-12 2015-03-25 浙江省公众信息产业有限公司 Record data network storage method and system and video monitoring platform
CN106293518A (en) * 2016-07-29 2017-01-04 成都神州数码索贝科技有限公司 A kind of efficient security protection industry media data storage file system
CN109543065A (en) * 2018-11-14 2019-03-29 成都皓图智能科技有限责任公司 A kind of video active identification method of combination block chain
CN109656874A (en) * 2018-11-28 2019-04-19 烟台蓝洋电子科技有限责任公司 Binary file management system implementation method
WO2019079944A1 (en) * 2017-10-23 2019-05-02 深圳市锐明技术股份有限公司 Video data storage method and device, and terminal device
CN115955581A (en) * 2023-03-15 2023-04-11 浪潮电子信息产业股份有限公司 Real-time video processing method, device, equipment and storage medium

Citations (5)

* 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
CN101437131A (en) * 2008-12-31 2009-05-20 中兴通讯股份有限公司 Method and apparatus for customizing frontend picture recording of video monitoring 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

Patent Citations (5)

* 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
CN101437131A (en) * 2008-12-31 2009-05-20 中兴通讯股份有限公司 Method and apparatus for customizing frontend picture recording of video monitoring 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

Cited By (14)

* 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
CN104461375A (en) * 2013-09-24 2015-03-25 浙江大华技术股份有限公司 Method and device for distributing magnetic disk tasks
CN104461375B (en) * 2013-09-24 2018-05-01 浙江大华技术股份有限公司 A kind of distribution method and device of disk task
CN104461920A (en) * 2014-12-09 2015-03-25 杭州华为数字技术有限公司 Method and device for storing data
CN104469310A (en) * 2014-12-12 2015-03-25 浙江省公众信息产业有限公司 Record data network storage method and system and video monitoring platform
CN106293518A (en) * 2016-07-29 2017-01-04 成都神州数码索贝科技有限公司 A kind of efficient security protection industry media data storage file system
CN106293518B (en) * 2016-07-29 2019-09-10 成都神州数码索贝科技有限公司 A kind of efficient security industry media data storage file system
CN110100243A (en) * 2017-10-23 2019-08-06 深圳市锐明技术股份有限公司 A kind of storage method of video data, device and terminal device
WO2019079944A1 (en) * 2017-10-23 2019-05-02 深圳市锐明技术股份有限公司 Video data storage method and device, and terminal device
CN109543065A (en) * 2018-11-14 2019-03-29 成都皓图智能科技有限责任公司 A kind of video active identification method of combination block chain
CN109543065B (en) * 2018-11-14 2023-04-28 成都皓图智能科技有限责任公司 Video active identification method combined with block chain
CN109656874A (en) * 2018-11-28 2019-04-19 烟台蓝洋电子科技有限责任公司 Binary file management system implementation method
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

Also Published As

Publication number Publication date
CN102760136B (en) 2014-11-26

Similar Documents

Publication Publication Date Title
CN102760136B (en) File system control method based on rapid video data storage
CN101859579B (en) Drive device
CN102156738B (en) Method for processing data blocks, and data block storage equipment and system
CN1808613B (en) Reproducing apparatus, reproducing method, and program
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
CN101853685B (en) Drive device
CN104065906B (en) Video recording method and device of digital video recording equipment
CN105144142A (en) Object storage using multiple dimensions of object information
US7860896B2 (en) Method for automatically managing disk fragmentation
CN102779180A (en) Operation processing method of data storage system and data storage system
CN100524494C (en) Information-recording apparatus, information-recording method, program storage medium and program
CN103745007A (en) File managing method and device
US11158342B2 (en) Systems for optimized presentation capture
CN101315613A (en) Apparatus and method of processing data of non-volatile memory
US10423580B2 (en) Storage and compression of an aggregation file
CN106294387A (en) Data migration method and device
US20090030954A1 (en) Management of multiple virtual data copies
CN102623033A (en) Control method of file system based on rapid video data storage and apparatus
US8077567B2 (en) Recording and reproducing apparatus and recording and reproducing method
CN101707061B (en) Drive device
CN107480281B (en) Method for constructing unified view among heterogeneous file systems
US20070233757A1 (en) Garbage collection method and a hierarchy storage device
CN100573698C (en) Control device, control method, pen recorder and recording method
CN109189724A (en) Improve the method and device of video monitoring system audio, video data storage efficiency

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 of 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