CN101872639B - Method and device for storing and retrieving image data on digital hard disk video recorder - Google Patents

Method and device for storing and retrieving image data on digital hard disk video recorder Download PDF

Info

Publication number
CN101872639B
CN101872639B CN 201010002355 CN201010002355A CN101872639B CN 101872639 B CN101872639 B CN 101872639B CN 201010002355 CN201010002355 CN 201010002355 CN 201010002355 A CN201010002355 A CN 201010002355A CN 101872639 B CN101872639 B CN 101872639B
Authority
CN
China
Prior art keywords
image data
archive file
information
subregion
file
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
CN 201010002355
Other languages
Chinese (zh)
Other versions
CN101872639A (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN 201010002355 priority Critical patent/CN101872639B/en
Publication of CN101872639A publication Critical patent/CN101872639A/en
Application granted granted Critical
Publication of CN101872639B publication Critical patent/CN101872639B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention discloses a method and a device for storing and retrieving image data on a digital hard disk video recorder. In the device, the hard disk is divided into at least one partition, wherein each partition comprises an index file and at least one archive file. The method for storing the image data comprises the following steps of: when acquiring the image data, determining the archive file for the image data through the index file; writing the image data which is added with archive header structural information and additional information of the image data into the archive file sequentially to store; and recording and updating the relevant information of the archive filed and the partition in the index file in real time. The method for storing the image data has the advantages of avoiding the generation of file fragmentation and providing convenience for the export of the images.

Description

Method and device at digital hard disc video recorder storage and retrieving image data
Technical field
The present invention relates to the hard-disk storage technology field, particularly relate to method and device at digital hard disc video recorder storage and retrieving image data.
Background technology
Digital hard disc video recorder (Digital Video Recorder, DVR) is that a cover carries out the computer system of image stores processor, have to image/voice record a video for a long time, the function of recording, telemonitoring and control.Because video quality is higher, can bring into play preferably video recording evidence obtaining effect, therefore, DVR begins to be deployed in a large number some important zones.But corresponding with high video quality is high video recording code check, and high video recording code check then needs to take more storage space, therefore, causes easily the deficiency of storage space.For solving the contradiction between video quality and the storage space, usually store the DVR data in the mode of high pixel picture.Because a high pixel picture is than one section low-quality video recording, effect is well a lot of in evidence obtaining, and the storage space that requires is less, and therefore, present this mode has obtained using widely.
But during with picture form storage DVR data, DVR needs real time record and stores a large amount of image datas not of uniform size.During these image datas, a kind of scheme is direct storage in storage, but will produce file fragmentation under this mode, thus the reduction read-write efficiency, and can shorten hard disk serviceable life.Another kind of scheme is the picture file of predistribution fixed size, supposes to create at disk the picture file of N M KB size, allows storage one pictures in each picture file.But because the space is fixed, if picture less than M KB, has then been wasted storage space, and picture will be in case greater than M KB, will face the embarrassment that disk has living space but can't preserve, as seen this scheme underaction.Also have a kind of scheme, a certain size file M MB of predistribution, and be far longer than picture size, and can preserve thousands of even tens thousand of pictures in the file, so both solved the disk fragments problem, solved again the problem that large picture can't be preserved.But this scheme saves as binary data with picture, and the picture of therefore preserving is sightless to the user, and the user must use special software picture could be derived one by one.As seen, all not ideal enough in the various schemes of DVR storage picture in the prior art.
Summary of the invention
The invention provides method and device at digital hard disc video recorder storage and retrieving image data, can avoiding producing on the basis of file fragmentation, conveniently carry out quick-searching and the derivation of picture.
For achieving the above object, the invention provides following scheme:
A kind of on digital hard disc video recorder the method for store picture data, be divided at least one subregion on the described hard disk, comprise an index file and at least one archive file in each subregion, described method comprises:
When getting access to image data, be that image data is determined archive file by described index file;
With adding the image data of filing header structure information and the additional information of image data, be written to successively in the described archive file respectively and store, real time record is also upgraded archive file and subregion relevant information in the index file.
Preferably, describedly will add the image data of filing header structure information and the additional information of image data, and be written to successively respectively to store in the described archive file and comprise:
Before described image data, add filing header structure information, and be kept at successively the picture buffer zone;
Obtain the additional information of each image data, and described additional information is kept at the additional information buffer zone successively;
When satisfying the Refresh Data condition, the data in described picture buffer zone and the described additional information buffer zone are written in the described archive file respectively successively store.
Preferably, describedly when satisfying the Refresh Data condition, comprise:
When the data in described picture buffer zone or the additional information buffer zone reach when presetting capacity, perhaps, when reaching when presetting duration with last refresh time interval.
Preferably, the relevant information of described archive file comprises: the earliest acquisition time of each image data in the described archive file, the latest channel information, form and/or the skew of described image data in described archive file of image data in acquisition time, the described archive file.
Preferably, describedly will add the image data of filing header structure information and the additional information of image data, and be written to successively respectively to store in the described archive file and comprise:
Described image data is write described archive file from front to back, the additional information of described image data is write described archive file before backward.
A kind of on digital hard disc video recorder the method for retrieving image data, be divided at least one subregion on the described hard disk, comprise an index file and at least one archive file in each subregion, described image data is in the following manner storage on described hard disk: when getting access to image data, be that image data is determined archive file by described index file; With adding the image data of filing header structure information and the additional information of image data, be written to successively in the described archive file respectively and store, real time record is also upgraded archive file and subregion relevant information in the index file; Described method comprises:
According to the search condition of user's input, utilize the relevant information of each subregion to search the subregion that meets described search condition;
According to the relevant information of each archive file, in the described subregion that meets search condition, search the archive file that meets described search condition, and utilize described index file to navigate to the described archive file that meets described search condition;
Utilize the additional information of described image data, in the described archive file that meets described search condition, search the image data that meets described search condition.
Preferably, be divided at least one subregion on the described hard disk, comprise an index file and at least one archive file in each subregion, described device comprises:
The archive file determining unit when being used for getting access to image data, is that image data is determined archive file by described index file;
Storage unit is used for adding the image data of filing header structure information and the additional information of image data, is written to successively in the described archive file respectively and stores, and real time record is also upgraded archive file and subregion relevant information in the index file.
Preferably, described storage unit comprises:
The image cache subelement is used for adding filing header structure information, and is kept at successively the picture buffer zone before described image data
Additional information buffer memory subelement is used for obtaining the additional information of each image data, and described additional information is kept at the additional information buffer zone successively;
Storing sub-units is used for when satisfying the Refresh Data condition, the data in described picture buffer zone and the described additional information buffer zone is written in the described archive file respectively successively stores.
Preferably, described storing sub-units specifically is used for: when the data of described picture buffer zone or additional information buffer zone reach when presetting capacity, perhaps, when reaching when presetting duration with last refresh time interval, the data in described picture buffer zone and the described additional information buffer zone are written in the described archive file respectively successively store.
Preferably, described relevant information comprises: the earliest acquisition time of each image data in the described archive file, the latest channel information, form and/or the skew of described image data in described archive file of image data in acquisition time, the described archive file.
Preferably, storage unit specifically is used for: described image data is write described archive file from front to back, the additional information of described image data is write described archive file before backward.
A kind of on digital hard disc video recorder the device of retrieving image data, be divided at least one subregion on the described hard disk, comprise an index file and at least one archive file in each subregion, described image data is in the following manner storage on described hard disk: when getting access to image data, be that image data is determined archive file by described index file; With adding the image data of filing header structure information and the additional information of image data, be written to successively in the described archive file respectively and store, real time record is also upgraded archive file and subregion relevant information in the index file.Described device comprises:
The first retrieval unit is used for the search condition according to user's input, utilizes the relevant information of each subregion to search the subregion that meets described search condition;
The second retrieval unit is used for the relevant information according to each archive file, searches the archive file that meets described search condition in the described subregion that meets search condition, and utilizes described index file to navigate to the described archive file that meets described search condition;
The 3rd retrieval unit is used for utilizing the additional information of described image data, in the described archive file that meets described search condition, searches the image data that meets described search condition.
According to specific embodiment provided by the invention, the invention discloses following technique effect:
The present invention is divided at least one subregion with hard disk, comprise an index file and at least one archive file in each subregion, and image data is filed storage, therefore, not only can not produce file fragmentation, also can not produce large picture can't preserve, and little picture causes the problem of space waste, and, the picture that the mode that adopts this filing to store is stored, the user only need to use the instrument that can resolve archive file just picture can be derived, therefore, and for the derivation of picture is provided convenience.
In addition, this picture-storage mode is convenient to carry out the retrieval of picture, by subregion-archive file-picture additional information three level list, has greatly improved the speed of retrieval.Simultaneously, the picture additional information is kept in the archive file but not in the index file, also avoids mass picture information to cause index file to increase, cause reading and writing the problem that index efficiency descends.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use among the embodiment, apparently, accompanying drawing in the following describes only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the fdisk synoptic diagram that the embodiment of the invention provides;
Fig. 2 is the storage means process flow diagram that the embodiment of the invention provides;
Fig. 3 is another storage means process flow diagram that the embodiment of the invention provides;
Fig. 4 is data flow synoptic diagram in the storage means that provides of the embodiment of the invention;
Fig. 5 is the search method process flow diagram that the embodiment of the invention provides;
Fig. 6 is the memory storage synoptic diagram that the embodiment of the invention provides;
Fig. 7 is the indexing unit synoptic diagram that the embodiment of the invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, the every other embodiment that those of ordinary skills obtain belongs to the scope of protection of the invention.
The variety of issue that exists during store picture data on digital hard disc video recorder in order to solve prior art, the embodiment of the invention provide the method that adopts the filing storage, in the method, at first need and will create the picture archive file at hard disk.When creating the picture archive file, can finish by following steps: subregion on hard disk at first, and set up file system at each subregion; When creating file system, need to create an index file index at each subregion, and M Q byte archive file, as shown in Figure 1.Wherein, M=(partition size-index file size)/Q can preserve plurality of pictures in each archive file, preserve the index information of each archive file in the index file, that is, by this index file, just can find the position of each archive file in this subregion.On this basis, the embodiment of the invention provides the method for store picture data on digital hard disc video recorder, and the below is described in detail.
Embodiment one
Referring to Fig. 2, the method for store picture data on digital hard disc video recorder that the embodiment of the invention provides may further comprise the steps:
S201: when getting access to image data, be that image data is determined archive file by described index file;
Wherein, described image data refers to that passing to digital hard disc video recorder (DVR) from video camera needs the image data preserved, some image datas that certainly also may obtain from other approach.The corresponding pictures of each image data.DVR gets access to after the image data, just can be that image data is determined an archive file by the index file of each subregion, wherein, because image data may obtain continuously, therefore, current archive file may be empty, also may be to have preserved a part of data, as long as archive file not yet is filled with, can be defined as this archive file.
S202: will add the image data of filing header structure information and the additional information of image data, and be written to successively in the described archive file respectively and store, real time record is also upgraded archive file and subregion relevant information in the index file.
Owing to be to file storage, therefore need to before each image data, add filing header structure information, as a kind of sign, so that as the boundary between each image data, distinguish each image data.For example, can comprise the leader knowledge in this filing header structure information, length, the figure title that can also comprise corresponding image data, like this, when resolving archive file, when finding this sign, then the length L that just can therefrom take out the image data of correspondence just can get access to complete image data from the data that the start bit of image data begins to get backward the L byte.
Usually, additional information refers to be used to the data of describing former data attribute, therefore, in embodiments of the present invention, the additional information of image data just refers to for the data of describing image data, for example, specifically can comprise channel information, the image data of image data form, (these information can be from concrete data source for the acquisition time of image data, perhaps obtain in the configuration information), the skew of image data in archive file etc., be convenient to retrieve the image data that meets certain feature by these additional informations.For example, when needs are searched image data from certain passage, just the image data that channel information is complementary can be searched in this additional information, then, according to the skew of image data in archive file of additional information record, just can directly take out this image data.
Wherein, because a DVR can connect a plurality of video cameras usually, each video camera transmits image data by an independent passage to DVR.Therefore, to have recorded this image data be which platform video camera by which bar passage transmits to the channel information of image data.
In addition, when the additional information of the image data of storing successively respectively described adding filing header structure information and image data, described image data can be write described archive file from front to back, the additional information of described image data is write described archive file before backward, wherein, from front to back or refer to the locus of archive file before backward, namely, begin to preserve from front to back the image data that each adds filing header structure information from the reference position of archive file, begin from the additional information of the described image data of backward front preservation from the end position of archive file.And when preserving, the position of image data and its additional information can have certain incidence relation, and for example, if certain image data is kept in the archive file first, then the additional information of this image data can be kept at last in the archive file.Certainly, also can be other preservation order, do not do restriction here.
In store picture data and additional information thereof in archive file, can also real time record and upgrade this archive file and the relevant information of this archive file place subregion, wherein, the relevant information here can comprise the earliest acquisition time (in the acquisition time of these all image datas of archive file the earliest) of each image data in this archive file, the latest channel information of image data and/or format information etc. in acquisition time (in the acquisition time of these all image datas of archive file the latest), this archive file.Namely, what the relevant information here recorded is all image datas information on the whole in this archive file, for example, if the image data in this archive file is from two passages, which two passage then just can record in the relevant information of this archive file is respectively, but, do not record respectively corresponding which image data of each passage; If the image data in this archive file has three kinds of forms, which three kinds of form then just can record in the relevant information of this archive file is respectively, equally, do not record respectively corresponding which image data of every kind of form, concrete information is by the additional information record of image data.
As seen, this mode that provides by the embodiment of the invention, can record by the relevant information of archive file all image datas feature on the whole in this archive file, can record the feature of each image data self by the additional information of each image data, these all are that sufficient preparation has been carried out in follow-up retrieval and derivation.Certainly, in the process of store picture data and additional information thereof in archive file, the relevant information of each archive file can also be gathered, be recorded as the relevant information of this subregion, namely, acquisition time, acquisition time the latest can be recorded in this subregion in all image datas the earliest, the channel information of image data, form etc. in each archive file can also be recorded in this subregion.
In addition, after an archive file is write completely, if also have other image datas of not yet preserving, then can also again determine by index file other archive file for other image datas, these image datas are kept in this archive file of newly determining after the same method, until preserved all image datas that need to preserve (being under the prerequisite that hard-disk capacity allows certainly).
The method of store picture data on digital hard disc video recorder of having introduced more than that the embodiment of the invention provides, owing to adopted the mode of filing storage, therefore, any instrument (such as WinRar, zip etc.) with parsing archive file can be derived the image data in the hard disk, and with corresponding picture presents out.As seen, pass through the embodiment of the invention, not only can not produce file fragmentation, also can not produce large picture can't preserve, and little picture causes the problem of space waste, and, the picture that the mode that adopts this filing to store is stored, the user only need to use the instrument that can resolve archive file just picture can be derived, therefore, and for the derivation of picture is provided convenience.
Embodiment two
Referring to Fig. 3, the method for store picture data on digital hard disc video recorder that this embodiment two provides may further comprise the steps:
S301: when getting access to image data, be that image data is determined archive file by described index file;
This step is identical with step S201, repeats no more here.
S302: before described image data, add filing header structure information, and be kept at successively the picture buffer zone; Obtain the additional information of each image data, and described additional information is kept at the additional information buffer zone successively;
Owing to image data itself and without filing header structure information, therefore need to before preserve, need adding to be respectively each image data and add filing header structure information.Wherein, owing to need to record the information such as length of each image data in the filing header structure information, therefore, before adding filing header structure information, also to obtain the length of image data, and write corresponding byte.As seen, the process need regular hour that adds filing header structure information before described image data is if for after each image data adding filing header structure information, all directly be saved in the archive file, then obviously can lose time, and can cause overstocking of a large amount of pending image datas.
Therefore, in this embodiment two, each image data of parallel processing can be added before described image data after the filing header structure information, be kept at successively first the picture buffer zone; Simultaneously, get access to the additional information of each image data after, also first described additional information is kept at the additional information buffer zone successively.
S303: when satisfying the Refresh Data condition, the data in described picture buffer zone and the described additional information buffer zone are written in the described archive file respectively successively store, real time record is also upgraded the relevant information of archive file and subregion in the index file.
The Refresh Data condition can have multiple, wherein a kind of mode can be to reach when presetting capacity when the data in described picture buffer zone or the additional information buffer zone, the data in described picture buffer zone and the described additional information buffer zone is written in the described archive file respectively successively stores.As, because buffer zone is big or small limited, therefore, can be when the data in the picture buffer zone reach 2/3rds (also can be other numerical value) of buffer pool size, the data in picture buffer zone and the described additional information buffer zone are written in the described archive file respectively successively store.Perhaps, another kind of mode can be to set the cycle of refreshing, like this, and when reaching when presetting duration with last refresh time interval, just the data in described picture buffer zone and the described additional information buffer zone can be written in the described archive file respectively successively and store, etc.During specific implementation, can set as required other Refresh Data condition, not need here to limit.
Referring to Fig. 4, in its method that provides for this embodiment two, data are written to the synoptic diagram of archive file process from buffer zone.Wherein, " H " representative filing header structure information, " PIC " representative picture data, the additional information of " E " representative picture data.As seen, the process from the picture buffer zone to archive file, from the reference position of archive file, be saved in from front to back the image data that has added filing header structure information in the archive file; Simultaneously, the process from the additional information buffer zone to archive file, from the end position of archive file, the additional information of image data is saved in the archive file before backward.
This embodiment crunode has been introduced the place different from embodiment one, and other something in common gets final product referring to the introduction among the embodiment one, repeats no more here.
The method of store picture data on digital hard disc video recorder that above part has introduced that the embodiment of the invention provides, on the basis that utilizes the method to store, the embodiment of the invention also provide a kind of on digital hard disc video recorder the method for retrieving image data, referring to Fig. 5, the method may further comprise the steps:
S501: according to the search condition of user's input, utilize the relevant information of each subregion to search the subregion that meets described search condition;
Utilizing after the described method of preamble is saved in image data in the archive file, the user just can retrieve image data wherein.The user often only needs a part of image data, and the search condition that therefore can input for example, can be retrieved according to the time, perhaps retrieves according to picture format, perhaps, can also retrieve etc. according to the passage of picture.For example, the user needs the image data in certain time period, then can with this section period as search condition; And for example, the user may need the picture of certain form, then can be with this picture format as search condition; For another example, the user may be from the image data of certain video camera, and passage that then can this video camera is corresponding is as search condition.
DVR receives after the search condition of user's input, just can begin to retrieve, and searches the image data of the search condition that meets user's input in each subregion of hard disk.When retrieval, can layering carry out, at first utilize the relevant information of each subregion to search the subregion that meets described search condition; For example, the search condition of user's input is certain time period, then can be according to the earliest acquisition time of each image data in each subregion, acquisition time the latest, judge the image data that whether comprises this time period in each subregion, if comprise, then this subregion meets user's search condition, and rear extended meeting continues to retrieve in this subregion, otherwise, with each archive file of no longer retrieving in this subregion.
Need to prove, when in judging each subregion, whether comprising the image data of this time period, this time period not necessarily is contained in the subregion entirely, for example, time period in the search condition is t1-t2, and comprises t1 in certain subregion to the data of t3, and wherein t3 is less than t2, then this moment, this subregion also is the subregion that satisfies search condition.
S502: according to the relevant information of each archive file, in the described subregion that meets search condition, search the archive file that meets described search condition, and utilize described index file to navigate to the described archive file that meets described search condition;
Meet search condition if find certain subregion, then can continue each archive file in this subregion is retrieved, when archive file is retrieved, can utilize the relevant information of each archive file.Suppose will time period t 1-t2 as search condition, the earliest acquisition time that then can judge each image data in each archive file reaches the latest acquisition time, if comprise the image data of this time period, then this archive file meets user's search condition, rear extended meeting continues to retrieve in this archive file, otherwise, will can in this archive file, not retrieve.For the archive file that meets search condition, can utilize rope and quoted passage spare to navigate to this archive file, in order to carry out follow-up retrieval.
Similar when judging whether subregion satisfies search condition, when whether comprising the image data of this time period in judging each archive file, this time period not necessarily is contained in the archive file entirely.
S503: utilize the additional information of described image data, in the described archive file that meets described search condition, search the image data that meets described search condition.
Meet search condition if find certain archive file, then can continue each archive file in this archive file is retrieved, when specifically in archive file, retrieving, can use the additional information of image data, suppose will time period t 1-t2 as search condition, can judge then whether the acquisition time of each image data belongs to the scope of this time period, if belong to, can determine that then this image data meets user's search condition.
Different when judging whether subregion and archive file satisfy search condition, because the acquisition time of each picture is a time point, therefore, as long as this time point belongs to the time period in the search condition, then this image data just meets search condition.
As seen, the indexing means that the embodiment of the invention provides has used three level list mechanism, all may filter out the data that a part does not meet search condition in every one-level index, and this part data can not retrieved again, thereby has improved the speed of retrieval.In addition, the additional information of image data is kept in the archive file but not in the index file, has avoided mass picture information to cause index file to increase, and causes reading and writing the problem that index efficiency descends.
Corresponding with the method for store picture data on digital hard disc video recorder that the embodiment of the invention provides, the embodiment of the invention also provide a kind of on digital hard disc video recorder the device of store picture data, wherein, be divided at least one subregion on the described hard disk, comprise an index file and at least one archive file in each subregion, referring to Fig. 6, this device comprises:
Archive file determining unit 601 when being used for getting access to image data, is that image data is determined archive file by described index file;
Storage unit 602 is used for adding the image data of filing header structure information and the additional information of image data, is written to successively in the described archive file respectively and stores, and real time record is also upgraded the relevant information of archive file and subregion in the index file.
Wherein, storage unit 602 can comprise:
The image cache subelement is used for adding filing header structure information, and is kept at successively the picture buffer zone before described image data
Additional information buffer memory subelement is used for obtaining the additional information of each image data, and described additional information is kept at the additional information buffer zone successively;
Storing sub-units is used for when satisfying the Refresh Data condition, the data in described picture buffer zone and the described additional information buffer zone is written in the described archive file respectively successively stores.
Wherein, described storing sub-units specifically is used for: when the data of described picture buffer zone or additional information buffer zone reach when presetting capacity, perhaps, when reaching when presetting duration with last refresh time interval, the data in described picture buffer zone and the described additional information buffer zone are written in the described archive file respectively successively store.
Concrete, described relevant information comprises: the earliest acquisition time of each image data in the described archive file, the latest channel information, form and/or the skew of described image data in described archive file of image data in acquisition time, the described archive file.
When specifically preserving, storage unit 602 specifically is used for: described image data is write described archive file from front to back, the additional information of described image data is write described archive file before backward.
Corresponding with the method for retrieving image data on digital hard disc video recorder that the embodiment of the invention provides, the embodiment of the invention also provide a kind of on digital hard disc video recorder the device of retrieving image data, wherein, be divided at least one subregion on the described hard disk, comprise an index file and at least one archive file in each subregion, described image data is in the following manner storage on described hard disk: when getting access to image data, be that image data is determined archive file by described index file; With adding the image data of filing header structure information and the additional information of image data, be written to successively in the described archive file respectively and store, real time record is also upgraded archive file and subregion relevant information in the index file.
Referring to Fig. 7, this device can comprise:
The first retrieval unit 701 is used for the search condition according to user's input, utilizes the relevant information of each subregion to search the subregion that meets described search condition;
The second retrieval unit 702 is used for the relevant information according to each archive file, searches the archive file that meets described search condition in the described subregion that meets search condition, and utilizes described index file to navigate to the described archive file that meets described search condition;
The 3rd retrieval unit 703 is used for utilizing the additional information of described image data, in the described archive file that meets described search condition, searches the image data that meets described search condition.
As seen, the indexing means that the embodiment of the invention provides has used three level list mechanism, all may filter out the data that a part does not meet search condition in every one-level index, and this part data can not retrieved again, thereby has improved the speed of retrieval.In addition, the additional information of image data is kept in the archive file but not in the index file, has avoided mass picture information to cause index file to increase, and causes reading and writing the problem that index efficiency descends.
More than to method and the device at digital hard disc video recorder storage and retrieving image data provided by the present invention, be described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications.In sum, this description should not be construed as limitation of the present invention.

Claims (12)

1. the method for a store picture data on digital hard disc video recorder is characterized in that, hard disk is divided at least one subregion, comprises an index file and at least one archive file in each subregion, and described method comprises:
When getting access to image data, be that image data is determined archive file by described index file;
With adding the image data of filing header structure information and the additional information of image data, be written to successively in the described archive file respectively and store, real time record is also upgraded archive file relevant information and subregion relevant information in the index file; Described filing header structure information comprises that leader is known, length information, the figure title of the image data of correspondence, when being used for resolving described archive file, when finding that described leader is known, obtain the length information L of corresponding image data, begin to get backward data with the length information L identical bytes of described image data to obtain corresponding image data from the start bit of image data; The additional information of described image data is for describing the data of image data, comprise channel information, the form of image data, the acquisition time of image data, the skew of image data in archive file of image data, be convenient to retrieve the image data that meets feature by described additional information.
2. method according to claim 1 is characterized in that, describedly will add the image data of filing header structure information and the additional information of image data, is written to successively respectively to store in the described archive file to comprise:
Before described image data, add filing header structure information, and be kept at successively the picture buffer zone;
Obtain the additional information of each image data, and described additional information is kept at the additional information buffer zone successively;
When satisfying the Refresh Data condition, the data in described picture buffer zone and the described additional information buffer zone are written in the described archive file respectively successively store.
3. method according to claim 2 is characterized in that, describedly comprises when satisfying the Refresh Data condition:
When the data in described picture buffer zone or the additional information buffer zone reach when presetting capacity, perhaps, when reaching when presetting duration with last refresh time interval.
4. according to claim 1 to 3 each described methods, it is characterized in that described archive file relevant information comprises: the earliest acquisition time of each image data in the described archive file, the latest channel information and/or the format information of image data in acquisition time, the described archive file.
5. method according to claim 1 is characterized in that, describedly will add the image data of filing header structure information and the additional information of image data, is written to successively respectively to store in the described archive file to comprise:
Described image data is write described archive file from front to back, the additional information of described image data is write described archive file before backward.
6. the method for a retrieving image data on digital hard disc video recorder, it is characterized in that, hard disk is divided at least one subregion, comprise an index file and at least one archive file in each subregion, described image data is in the following manner storage on described hard disk: when getting access to image data, be that image data is determined archive file by described index file; With adding the image data of filing header structure information and the additional information of image data, be written to successively in the described archive file respectively and store, real time record is also upgraded archive file relevant information and subregion relevant information in the index file; Described filing header structure information comprises that leader is known, length information, the figure title of the image data of correspondence, be used for when resolving described archive file, when finding that described leader is known, obtain the length information L of corresponding image data, begin to get backward data with the length information L identical bytes of described image data to obtain corresponding image data from the start bit of image data; The additional information of described image data is for describing the data of image data, comprise channel information, the form of image data, the acquisition time of image data, the skew of image data in archive file of image data, be convenient to retrieve the image data that meets feature by described additional information; Described method comprises:
According to the search condition of user's input, utilize the relevant information of each subregion to search the subregion that meets described search condition; The relevant information of described each subregion gathers by the relevant information with each archive file in each subregion and obtains, and comprises in the subregion in all image datas acquisition time the earliest, the latest channel information and/or the format information of image data in acquisition time, each archive file;
According to the relevant information of each archive file, in the described subregion that meets search condition, search the archive file that meets described search condition, and utilize described index file to navigate to the described archive file that meets described search condition; The relevant information of described archive file comprises the earliest acquisition time of each image data in the described archive file, the latest channel information and/or the format information of image data in acquisition time, the described archive file;
Utilize the additional information of described image data, in the described archive file that meets described search condition, search the image data that meets described search condition.
7. the device of a store picture data on digital hard disc video recorder is characterized in that, hard disk is divided at least one subregion, comprises an index file and at least one archive file in each subregion, and described device comprises:
The archive file determining unit when being used for getting access to image data, is that image data is determined archive file by described index file;
Storage unit is used for adding the image data of filing header structure information and the additional information of image data, is written to successively in the described archive file respectively and stores, and real time record is also upgraded archive file relevant information and subregion relevant information in the index file; Described filing header structure information comprises that leader is known, length information, the figure title of the image data of correspondence, to be used for when resolving described archive file, when finding that described leader is known, obtain the length information of corresponding image data, begin to get backward the data of the byte identical with the length of described image data to obtain corresponding image data from the start bit of image data; The additional information of described image data is for describing the data of image data, comprise channel information, the form of image data, the acquisition time of image data, the skew of image data in archive file of image data, be convenient to retrieve the image data that meets feature by described additional information.
8. device according to claim 7 is characterized in that, described storage unit comprises:
The image cache subelement is used for adding filing header structure information, and is kept at successively the picture buffer zone before described image data;
Additional information buffer memory subelement is used for obtaining the additional information of each image data, and described additional information is kept at the additional information buffer zone successively;
Storing sub-units is used for when satisfying the Refresh Data condition, the data in described picture buffer zone and the described additional information buffer zone is written in the described archive file respectively successively stores.
9. device according to claim 8, it is characterized in that, described storing sub-units specifically is used for: when the data of described picture buffer zone or additional information buffer zone reach when presetting capacity, perhaps, when reaching when presetting duration with last refresh time interval, the data in described picture buffer zone and the described additional information buffer zone are written in the described archive file respectively successively store.
10. according to claim 7 to 9 each described devices, it is characterized in that described archive file relevant information comprises: the earliest acquisition time of each image data in the described archive file, the latest channel information and/or the form of image data in acquisition time, the described archive file.
11. device according to claim 7 is characterized in that, storage unit specifically is used for: described image data is write described archive file from front to back, the additional information of described image data is write described archive file before backward.
12. the device of a retrieving image data on digital hard disc video recorder, it is characterized in that, hard disk is divided at least one subregion, comprise an index file and at least one archive file in each subregion, described image data is in the following manner storage on described hard disk: when getting access to image data, be that image data is determined archive file by described index file; With adding the image data of filing header structure information and the additional information of image data, be written to successively in the described archive file respectively and store, real time record is also upgraded archive file relevant information and subregion relevant information in the index file; Described filing header structure information comprises that leader is known, length information, the figure title of the image data of correspondence, be used for when resolving described archive file, when finding that described leader is known, obtain the length information L of corresponding image data, begin to get backward data with the length information L identical bytes of described image data to obtain corresponding image data from the start bit of image data; The additional information of described image data is for describing the data of image data, comprise channel information, the form of image data, the acquisition time of image data, the skew of image data in archive file of image data, be convenient to retrieve the image data that meets feature by described additional information; Described device comprises:
The first retrieval unit is used for the search condition according to user's input, utilizes the relevant information of each subregion to search the subregion that meets described search condition; The relevant information of described each subregion gathers by the relevant information with each archive file in each subregion and obtains, and comprises in the subregion in all image datas acquisition time the earliest, the latest channel information and/or the format information of image data in acquisition time, each archive file;
The second retrieval unit is used for the relevant information according to each archive file, searches the archive file that meets described search condition in the described subregion that meets search condition, and utilizes described index file to navigate to the described archive file that meets described search condition; The relevant information of described archive file comprises the earliest acquisition time of each image data in the described archive file, the latest channel information and/or the format information of image data in acquisition time, the described archive file;
The 3rd retrieval unit is used for utilizing the additional information of described image data, in the described archive file that meets described search condition, searches the image data that meets described search condition.
CN 201010002355 2010-01-11 2010-01-11 Method and device for storing and retrieving image data on digital hard disk video recorder Active CN101872639B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010002355 CN101872639B (en) 2010-01-11 2010-01-11 Method and device for storing and retrieving image data on digital hard disk video recorder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010002355 CN101872639B (en) 2010-01-11 2010-01-11 Method and device for storing and retrieving image data on digital hard disk video recorder

Publications (2)

Publication Number Publication Date
CN101872639A CN101872639A (en) 2010-10-27
CN101872639B true CN101872639B (en) 2013-02-13

Family

ID=42997438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010002355 Active CN101872639B (en) 2010-01-11 2010-01-11 Method and device for storing and retrieving image data on digital hard disk video recorder

Country Status (1)

Country Link
CN (1) CN101872639B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096698B (en) * 2010-12-14 2012-10-10 青岛海信网络科技股份有限公司 Video data storage format, storage method and search method
CN103514226B (en) * 2012-06-28 2017-11-10 浙江大华技术股份有限公司 A kind of fast indexing method and device of the storage of digital hard disc video recorder file
CN104504349B (en) * 2014-12-19 2017-06-20 武汉长江通信智联技术有限公司 A kind of Video data safe storage device and method
CN105306865B (en) * 2015-10-29 2019-05-17 四川奇迹云科技有限公司 A kind of video monitoring data system
CN108093016B (en) 2016-11-23 2020-05-15 杭州海康威视数字技术股份有限公司 Picture storage method and device and video monitoring system
CN106951183A (en) * 2017-02-27 2017-07-14 南京杰迈视讯科技有限公司 A kind of web camera date storage method of high efficient and reliable
CN106873920B (en) * 2017-03-22 2023-07-28 世纪恒通科技股份有限公司 Call center recording storage system and method capable of avoiding disk fragments
CN107193961B (en) * 2017-05-24 2021-01-08 上海星佑网络科技有限公司 Information recording method and apparatus
CN109101508A (en) * 2017-06-20 2018-12-28 杭州海康威视数字技术股份有限公司 Small documents filing, read method and device, electronic equipment
CN114036324A (en) * 2021-10-27 2022-02-11 青岛海纳云科技控股有限公司 Storage method and device of face picture file

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1702633A (en) * 2005-07-08 2005-11-30 北京北大方正电子有限公司 Method for establishing medium file system
CN101128880A (en) * 2005-02-22 2008-02-20 皇家飞利浦电子股份有限公司 Retrieving content items for a playlist based on universal content ID
CN101324898A (en) * 2008-08-05 2008-12-17 北京蓝色星际软件技术发展有限公司 Rapid search and recovery method based on file attribute
CN101419828A (en) * 2008-11-20 2009-04-29 杭州海康威视数字技术股份有限公司 Hard disc video recording and retrieval method for analog magnetic tape serial schema

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101128880A (en) * 2005-02-22 2008-02-20 皇家飞利浦电子股份有限公司 Retrieving content items for a playlist based on universal content ID
CN1702633A (en) * 2005-07-08 2005-11-30 北京北大方正电子有限公司 Method for establishing medium file system
CN101324898A (en) * 2008-08-05 2008-12-17 北京蓝色星际软件技术发展有限公司 Rapid search and recovery method based on file attribute
CN101419828A (en) * 2008-11-20 2009-04-29 杭州海康威视数字技术股份有限公司 Hard disc video recording and retrieval method for analog magnetic tape serial schema

Also Published As

Publication number Publication date
CN101872639A (en) 2010-10-27

Similar Documents

Publication Publication Date Title
CN101872639B (en) Method and device for storing and retrieving image data on digital hard disk video recorder
CN102508784B (en) Data storage method of flash memory card in video monitoring equipment, and system thereof
CN105511802A (en) Buffer memory writing method and apparatus and synchronizing method and apparatus for disk cache region
CN102393854B (en) Method and device obtaining audio/video data
US9576609B2 (en) Subtitle processing device and associated method and subtitle parsing method
CN103226965B (en) Based on the audio/video data access method of time bitmap
CN108763531B (en) MDVR file storage system and operation method thereof
CN107168651B (en) Small file aggregation storage processing method
US11250888B1 (en) Flash memory and method for storing and retrieving embedded audio video data
US8565051B2 (en) Storage system and method for generating file system in the storage system
US8271721B2 (en) Data writing method and data storage device
JP4158774B2 (en) Playback method
US9710504B2 (en) Data processing and writing method and related apparatus
US8077567B2 (en) Recording and reproducing apparatus and recording and reproducing method
US20060015681A1 (en) Apparatus and method for writing and reading data
KR20060120674A (en) Information recording medium data processing apparatus and data recording method
CN106547490B (en) Data read-write method and data read-write system
TWI463873B (en) Image storage device and image recording apparatus
CN104298469A (en) Storage device configuration device and storage device configuration method
JP4211563B2 (en) Playback / recording device
KR20190061549A (en) File system and method of storing files based on the file system
JP4930358B2 (en) Data processing apparatus and data processing method
EP2256648A1 (en) Method for storing data files, method for reading data content, and data store
US10353589B2 (en) Data storage device and data management method for data storage device
JP2009205591A (en) Access module, information recording module, and information recording 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
C14 Grant of patent or utility model
GR01 Patent grant