Summary of the invention
The object of the embodiment of the present invention is to provide a kind of storage means of video data, storage device and the video monitoring system of video data, be intended to solve the storage number of days of video data under prior art short and in the time extending the storage number of days of video data, the problem of video data loss.
The embodiment of the present invention is to provide a kind of storage means of video data, and described method comprises:
Obtain the shortest storage number of days N of storage size G, video data
1storage number of days N lives forever most
n;
Gather video data;
The video data that coding collects; And
At the shortest storage number of days N
1interior with first resolution storage G
1video data after size coding, and at storage number of days N
n-N
1interior with the n resolution storage G-G lower than first resolution
1video data after size coding, wherein, n=2; And
At the shortest storage number of days N
1interior with first resolution storage G
1video data after size coding, at storage number of days N
n-1interior with the n-1 resolution storage G lower than first resolution
n-1video data after size coding, and at storage number of days N
n-N
1-N
n-1interior with the n resolution storage G-G lower than n-1 resolution
1-G
n-1video data after size coding, wherein, n>=3.
Wherein, described at the shortest storage number of days N
1interior with first resolution storage G
1video data after size coding, at storage number of days N
n-1interior with the n-1 resolution storage G lower than first resolution
n-1video data after size coding, and at storage number of days N
n-N
1-N
n-1interior with the n resolution storage G-G lower than n-1 resolution
1-G
n-1the step of the video data after size coding is specially:
With the video data after first resolution memory encoding;
Detect and whether reach the shortest storage number of days N with the storage number of days of first resolution stored video data
1;
Reach the shortest storage number of days N at the storage number of days of coding video frequency data
1after, continuation gathers the video data of L number of days, wherein L<=N
1;
The video data collecting in coding L number of days;
With the video data of encoding in first resolution storage L number of days, the first resolution that reduces the video data in initial storage number of days L is n-1 resolution;
Whether detection reaches storage number of days N with the storage number of days of the video data of n-1 resolution storage
n-1;
Reach storage number of days N at the storage number of days of coding video frequency data
n-1after, continuation gathers the video data of L number of days;
The video data collecting in coding L number of days;
With the video data of encoding in first resolution storage L number of days, the n-1 resolution that reduces the video data in initial storage number of days L is n resolution, reduces first resolution taking the video data in the video data initial storage number of days L of first resolution storage as n-1 resolution;
Whether detection reaches storage number of days N with the storage number of days of the video data of n resolution storage
n-N
1-N
n-1; And
Be less than storage number of days N at the storage number of days of the video data with the storage of n resolution
n-N
1-N
n-1time, continue to gather the video data of L number of days, the video data collecting in coding L number of days, with the video data of encoding in first resolution storage L number of days, reduce first resolution taking the video data in the video data initial storage number of days L of first resolution storage as n-1 resolution, and reduction is taking the n-1 resolution of the video data in the video data initial storage number of days L of n-1 resolution storage as n resolution.
Wherein, reach N at the storage number of days of the video data with the storage of n resolution
n-N
1-N
n-1after, described method also comprises:
Continue to gather the video data of L number of days;
The video data collecting in coding L number of days;
Delete the video data in initial L number of days, with the video data of encoding in first resolution storage L number of days, reduce first resolution taking the video data in the video data initial storage number of days L of first resolution storage as n-1 resolution, and reduction is taking the n-1 resolution of the video data in the video data initial storage number of days L of n-1 resolution storage as n resolution.
Wherein, in the time that the storage number of days with first resolution stored video data does not reach the shortest storage number of days N1, described method also comprises:
Continue to gather video data;
The video data that coding collects; And
With the video data after first resolution memory encoding.
Wherein, do not reach N at the storage number of days of the video data with the storage of n-1 resolution
n-1time, described method also comprises:
Continue to gather the video data of L number of days;
The video data collecting in coding L number of days;
With the video data of encoding in first resolution storage L number of days; And
Reduce first resolution taking the video data in the video data initial storage number of days L of first resolution storage as n-1 resolution.
The step of the video data that wherein, described coding collects is specially:
The basic layer of coding video frequency data;
The definition enhancement layer of coding video frequency data;
The frame per second enhancement layer of coding video frequency data; And
The picture quality enhancement layer of coding video frequency data.
Wherein, the step of the resolution of described reduction video data is specially: the partial information in outer other layer of the basic layer of deletion reduces the resolution of video data.
Another object of the embodiment of the present invention is also to provide a kind of storage device of video data, comprising:
Acquiring unit, for obtaining the shortest storage number of days N of storage size G, video data
1storage number of days N lives forever most
n;
Image unit, for gathering video data;
Coding unit, the video data collecting for encoding; And
Control unit, at the shortest storage number of days N
1interior with first resolution storage G
1video data after size coding, and at storage number of days N
n-N
1interior with the n resolution storage G-G lower than first resolution
1video data after size coding, wherein, n=2; And
At the shortest storage number of days N
1interior with first resolution storage G
1video data after size coding, at storage number of days N
n-1interior with the n-1 resolution storage G lower than first resolution
n-1video data after size coding, and at storage number of days N
n-N
1-N
n-1interior with the n resolution storage G-G lower than n-1 resolution
1-G
n-1video data after size coding, wherein, n>=3.
Wherein, described control unit comprises:
Memory module, for the video data with after first resolution memory encoding;
Whether detection module, reach the shortest storage number of days N for detection of the storage number of days with first resolution stored video data
1;
Control module, reaches the shortest storage number of days N for the storage number of days at coding video frequency data
1after, control image unit continues to gather the video data of L number of days, wherein L<=N
1, and the video data collecting in control coding cell encoding L number of days;
Executive Module, for the video data to encode in first resolution storage L number of days, the first resolution that reduces the video data in initial storage number of days L is n-1 resolution;
Whether described detection module, also reach storage number of days N for detection of the storage number of days of the video data with the storage of n-1 resolution
n-1; And
Described control module, also reaches storage number of days N for the storage number of days at coding video frequency data
n-1after, control image unit continues to gather the video data of L number of days, wherein L<=N
1, and the video data collecting in control coding cell encoding L number of days;
Described memory module, also for the video data to encode in first resolution storage L number of days;
Described Executive Module, is also n resolution for reducing the n-1 resolution of the video data in initial storage number of days L, reduces first resolution taking the video data in the video data initial storage number of days L of first resolution storage as n-1 resolution;
Whether described detection module, also reach storage number of days N for detection of the storage number of days of the video data with the storage of n resolution
n-N
1-N
n-1;
Described control module, is also less than storage number of days N for the storage number of days of the video data with the storage of n resolution
n-N
1-N
n-1time, control image unit continues to gather the video data of L number of days, and the video data collecting in control coding cell encoding L number of days;
Described memory module, also for the video data to encode in first resolution storage L number of days; And
Described Executive Module, be also n-1 resolution for reducing the first resolution of the video data in the video data initial storage number of days L taking first resolution storage, and reduce n-1 resolution taking the video data in the video data initial storage number of days L of n-1 resolution storage as n resolution, until reach and store number of days N with the storage number of days of the video data of n resolution storage
n-N
1-N
n-1.
Wherein, described control module also reaches N for the storage number of days of the video data with the storage of n resolution
n-N
1-N
n-1after, continue to control the video data of image unit collection L number of days, and the video data collecting in control coding cell encoding L number of days, described memory module is for the video data to encode in first resolution storage L number of days, described Executive Module is also for deleting the video data in initial L number of days, reduce first resolution taking the video data in the video data initial storage number of days L of first resolution storage as n-1 resolution, and reduce n-1 resolution taking the video data in the video data initial storage number of days L of n-1 resolution storage as n resolution, described control module does not also reach the shortest storage number of days N for the storage number of days with first resolution stored video data
1time, to control image unit and continue to gather video data, and the video data that collects of control coding cell encoding, described memory module is for the video data after first resolution memory encoding, described control module does not also reach N for the storage number of days of the video data with the storage of n-1 resolution
n-1time, control image unit continues to gather the video data of L number of days, and the video data collecting in control coding cell encoding L number of days, the video data of described memory module to encode in first resolution storage L number of days, and described Executive Module is also n-1 resolution for reducing the first resolution of the video data in the video data initial storage number of days L taking first resolution storage.
Wherein, described coding unit is the basic layer of video data, video data definition enhancement layer, video data frame per second enhancement layer and image of video data quality enhancement layer by the video data encoding collecting; Described Executive Module reduces the resolution of video data by the partial information in outer other layer of the basic layer of deletion video data.
Another object of the embodiment of the present invention is also to provide a kind of video monitoring system, comprises the storage device of video data described above, and from the storage device of described video data, obtains the client of the video data of monitoring.
In embodiments of the present invention, the storage means of video data, the storage device of video data and video monitoring system, use different resolution to store corresponding video data by the storage number of days different, extend the storage number of days of video data with this, and can avoid the loss of video data, thereby can, under limited memory space, realize the Video Data Storage of vast of heaven number, and can ensure the integrality of the video data of vast of heaven number storage.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
As one embodiment of the present of invention, Fig. 1 shows the storage means flow chart of the video data that the embodiment of the present invention provides.Described method comprises:
Step S61, obtains the shortest storage number of days N of storage size G, video data
1storage number of days N lives forever most
n.
Step S62, gathers video data.
Step S63, the video data that coding collects.
Step S64, at the shortest storage number of days N
1interior with first resolution storage G
1video data after size coding, and at storage number of days N
n-N
1interior with the n resolution storage G-G lower than first resolution
1video data after size coding, wherein, n=2; And
At the shortest storage number of days N
1interior with first resolution storage G
1video data after size coding, at storage number of days N
n-1interior with the n-1 resolution storage G lower than first resolution
n-1video data after size coding, and at storage number of days N
n-N
1-N
n-1interior with the n resolution storage G-G lower than n-1 resolution
1-G
n-1video data after size coding, wherein, n>=3.
Please refer to shown in Fig. 2, in present embodiment, step S63 specifically includes:
Step S631, the basic layer of coding video frequency data;
Step S632, the definition enhancement layer of coding video frequency data;
Step S633, the frame per second enhancement layer of coding video frequency data; And
Step S634, the picture quality enhancement layer of coding video frequency data.
In the present embodiment, in the time of n=2, at the shortest storage number of days N
1interior with first resolution storage G
1video data after size coding, and at storage number of days N
n-N
1interior with the n resolution storage G-G lower than first resolution
1the step of the video data after size coding is with in the time of n>=3, at the shortest storage number of days N
1interior with first resolution storage G
1video data after size coding, at storage number of days N
n-1interior with the n-1 resolution storage G lower than first resolution
n-1the step of the video data after size coding is the same, while being therefore not described in detail in this n=2, and the storage means of video data.
Please refer to shown in Fig. 3, in present embodiment, step S64 specifically includes:
Step S641, with the video data after first resolution memory encoding.
Step S642, detects whether reach N with the storage number of days of first resolution stored video data
1.
If the storage number of days of first resolution stored video data reaches N
1, perform step S643, continue to gather the video data of L number of days, wherein L<=N
1.
Step S644, the video data collecting in coding L number of days.
Step S645, with the video data in first resolution storage L number of days, the first resolution that reduces the video data in initial storage number of days L is n-1 resolution.
Step S646, whether detection reaches storage number of days Nn-1 with the storage number of days of the video data of n-1 resolution storage.
If the storage number of days of the video data of n-1 resolution storage reaches storage number of days Nn-1, perform step S647, continue to gather the video data of L number of days.
Step S648, the video data collecting in coding L number of days.
Step S649, with the video data in first resolution storage L number of days, the n-1 resolution that reduces the video data in initial storage number of days L is n resolution, reduces the first resolution with the video data in the video data initial storage number of days L of first resolution storage.
Step S650, whether detection reaches storage number of days Nn-N with the storage number of days of the video data of n resolution storage
1-Nn-1.
If the storage number of days of the video data of n resolution storage does not reach storage number of days Nn-N
1-Nn-1, performs step S651, continues to gather the video data of L number of days.
Step S652, the video data collecting in coding L number of days.
Step S653, with the video data in first resolution storage L number of days, reduce first resolution taking the video data in the video data initial storage number of days L of first resolution storage as n-1 resolution, and reduce n-1 resolution taking the video data in the video data initial storage number of days L of n-1 resolution storage after n resolution, return to step S650.
Do not reach N at the storage number of days with first resolution stored video data
1time, perform step S654, continue to gather the video data of L number of days.
Step S655, after the video data collecting, returns to step S641 in coding L number of days.
In the time that the storage number of days of the video data with the storage of n-1 resolution does not reach storage number of days Nn-1, perform step S656, continue to gather the video data of L number of days.
Step S657, the video data collecting in coding L number of days.
Step S658, with the video data in first resolution storage L number of days, and reduces first resolution taking the video data in the video data initial storage number of days L of first resolution storage after n-1 resolution, returns to step S646.
Reach storage number of days Nn-N at the storage number of days of the video data with the storage of n resolution
1when-Nn-1, perform step S659, continue to gather the video data of L number of days.
Step S660, the video data collecting in coding L number of days.
Step S661, delete the video data in initial L number of days, with the video data in first resolution storage L number of days, reduce first resolution taking the video data in the video data initial storage number of days L of first resolution storage as n-1 resolution, and reduction is taking the n-1 resolution of the video data in the video data initial storage number of days L of n-1 resolution storage as n resolution.
In present embodiment, in the storage means of this video data, be to reduce the resolution of video data by the partial information of deleting in outer other layer of basic layer, thereby reduce video data taking memory space by reducing resolution.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is can carry out the hardware that instruction is relevant by program to complete, described program can be stored in a computer read/write memory medium, described storage medium, as RONN/RANN, disk, CD etc.
Fig. 4 is the hardware structure chart of the video monitoring system 100 that provides of the embodiment of the present invention.In embodiments of the present invention, this video monitoring system 100 includes the storage device 10 of video data and from the storage device 10 of video data, obtains the client 200 of the video data of monitoring.The storage device 10 of this video data includes acquiring unit 20, image unit 30, coding unit 40 and control unit 50.
This acquiring unit 20 is for obtaining the shortest storage number of days N of storage size G, video data
1storage number of days N lives forever most
n.This image unit 30 is for gathering video data.The video data that this coding unit 40 collects for encoding.This control unit 50 is at the shortest storage number of days N
1interior with first resolution storage G
1video data after size coding, and at storage number of days N
n-N
1interior with the n resolution storage G-G lower than first resolution
1video data after size coding, wherein, n=2; And at the shortest storage number of days N
1interior with first resolution storage G
1video data after size coding, at storage number of days N
n-1interior with the n-1 resolution storage G lower than first resolution
n-1video data after size coding, and at storage number of days N
n-N
1-N
n-1interior with the n resolution storage G-G lower than n-1 resolution
1-G
n-1video data after size coding, wherein, n>=3.
In present embodiment, in the time of n=2, at the shortest storage number of days N
1interior with first resolution storage G
1video data after size coding, and at storage number of days N
n-N
1interior with the n resolution storage G-G lower than first resolution
1the way of the video data after size coding is with in the time of n>=3, at the shortest storage number of days N
1interior with first resolution storage G
1video data after size coding, at storage number of days N
n-1interior with the n-1 resolution storage G lower than first resolution
n-1the way of the video data after size coding is the same, therefore this during to n>=3 the storage of video data be described in detail.
In present embodiment, this control unit 50 includes memory module 51, detection module 52, control module 53 and Executive Module 54.
This memory module 51 is for the video data with after first resolution memory encoding.Whether this detection module 52 reaches the shortest storage number of days N for detection of the storage number of days with first resolution stored video data
1.This control module 53 reaches the shortest storage number of days N for the storage number of days at coding video frequency data
1after, control image unit 30 continues to gather the video data of L number of days, wherein L<=N
1, and control coding unit 40 video data collecting in L number of days of encoding.This Executive Module 54 is for the video data to encode in first resolution storage L number of days, and the first resolution that reduces the video data in initial storage number of days L is n-1 resolution.Whether this detection module 52 also reaches storage number of days N for detection of the storage number of days of the video data with the storage of n-1 resolution
n-1.This control module 53 also reaches storage number of days N for the storage number of days at coding video frequency data
n-1after, control image unit 30 continues to gather the video data of L number of days, wherein L<=N
1, and control coding unit 40 video data collecting in L number of days of encoding.This memory module 51 is also for the video data to encode in first resolution storage L number of days.This Executive Module 54 is also n resolution for reducing the n-1 resolution of the video data in initial storage number of days L, reduces first resolution taking the video data in the video data initial storage number of days L of first resolution storage as n-1 resolution.Whether this detection module 52 also reaches storage number of days N for detection of the storage number of days of the video data with the storage of n resolution
n-N
1-N
n-1.This control module 53 is also less than storage number of days N for the storage number of days of the video data with the storage of n resolution
n-N
1-N
n-1time, control image unit 30 and continue to gather the video data of L number of days, and control coding unit 40 video data collecting in L number of days of encoding.This memory module 51 is also for the video data to encode in first resolution storage L number of days.This Executive Module 54 is also n-1 resolution for reducing the first resolution of the video data in the video data initial storage number of days L taking first resolution storage, and reduce n-1 resolution taking the video data in the video data initial storage number of days L of n-1 resolution storage as n resolution, until reach and store number of days N with the storage number of days of the video data of n resolution storage
n-N
1-N
n-1.
Further, control module 53 also reaches N for the storage number of days of the video data with the storage of n resolution
n-N
1-N
n-1after, continue to control image unit 30 and gather the video data of L number of days, and control coding unit 40 video data collecting in L number of days of encoding.Memory module 51 is for the video data to encode in first resolution storage L number of days.Executive Module 54 is also for deleting the video data in initial L number of days, reduce first resolution taking the video data in the video data initial storage number of days L of first resolution storage as n-1 resolution, and reduction is taking the n-1 resolution of the video data in the video data initial storage number of days L of n-1 resolution storage as n resolution.
Further, control module 53 does not also reach the shortest storage number of days N for the storage number of days with first resolution stored video data
1time, control image unit 30 and continue to gather video datas, and control coding unit 40 video data collecting of encoding.Memory module 51 is for the video data with after first resolution memory encoding.
Further, control module 53 does not also reach N for the storage number of days of the video data with the storage of n-1 resolution
n-1time, control image unit 30 and continue to gather the video data of L number of days, and control coding unit 40 video data collecting in L number of days of encoding.The video data of memory module 51 to encode in first resolution storage L number of days.Executive Module 54 is also n-1 resolution for reducing the first resolution of the video data in the video data initial storage number of days L taking first resolution storage.
In present embodiment, coding unit 40 is the basic layer of video data, video data definition enhancement layer, video data frame per second enhancement layer and image of video data quality enhancement layer by the video data encoding collecting.Executive Module 54 reduces the resolution of video data by the partial information in outer other layer of the basic layer of deletion video data.Mode by above-mentioned multi-layer coding can provide multilayer code stream, and in basic coding layer, preserves the definition of minimum rank coded format and lower frame per second; In each enhancement layer, by improving the contents such as frame per second, resolution, picture quality, finally realize the compression storage of the video data of complete frame per second, high-level coded format.
Please also refer to Fig. 5, because the each grade of shared memory space of conventional resolution storage corresponding video data is certain, before stored video data, user can be the video data of storing corresponding number of days by the resolution of corresponding shelves of determining of fixing by the each grade of shared memory space of conventional resolution storage corresponding video data, makes at the now nearest number of days N of distance
1interior use highest resolution stored video data, at distance nearlyer number of days N now
n-1interior use high-resolution stored video data, counts N compared with the distant sky now in distance
ninterior use lowest resolution stored video data, meets consumers' demand with this.At this, the guarantee N trying one's best
1and N
n-1long enough; First resolution and n-1 resolution are enough high; And n resolution is enough low.Also, user is being known the shortest storage number of days N of storage size G, video data
1storage number of days N lives forever most
ntime can manually determine memory space G
1and G
n-1, storage number of days N
n-1, n-1 resolution and n resolution, according to the storage of the above-mentioned video data of these Numerical Implementation.Meanwhile, the requirement that user also can be based on above-mentioned, utilizes computer to calculate memory space G
1and G
n-1, storage number of days N
n-1, n-1 resolution and numerical value corresponding to n resolution.
For example, the present invention is in concrete application scenarios, and according to comparatively common storage demand at present, taking high definition 720P video as data source, realizing storage number of days is the shortest preservation 30 days, and the longest preservation 180 days is target.Desirable memory space has 2T, by common storage mode, can realize storage number of days and be about 48.7 days (48.7*42G ≈ 2T).
For realizing the storage target of the longest 180 days, user can be calculated and be shown that rational storage scheme is 30 days number of days of resolution 720P form storage by manual calculations or computer, 30 days number of days of resolution 4CIF form storage, 120 days number of days (42G*30+21G*30+1.3G*120 ≈ 2T) of resolution QCIF form storage.
Count to after 30 days in storage day, every L days, a 720P form L the earliest days video data is reduced to 4CIF from 720P.
Count to after 60 days in storage day, every L days, a 720P form L the earliest days video data is reduced to 4CIF from 720P, 4CIF form L the earliest days is reduced to QCIF from 4CIF.
Count to after 180 days in storage day, every L days, will delete QCIF form L days the earliest, 720P form L the earliest days video file data are reduced to 4CIF from 720P, and 4CIF form L the earliest days is reduced to QCIF from 4CIF.By above-mentioned mode, just can be by video data, with resolution 720P form storage 30 days, then with the form storage lower than resolution 720P 150 days.The video data of storing in apart from nearest 30 days now, because its resolution is the highest, so video pictures is the most clear, the video data of storing outside nearest 30 days now in distance, because its resolution is lower than highest resolution, so picture can be fuzzyyer, but, according to present user's demand, general is all that to wish to obtain the now nearest video pictures of distance the most clear, the video pictures that distance is now far away is fuzzyyer, so the present invention both can meet the requirement of user video image sharpness, can extend again the storage number of days of video pictures.
Storage means, storage device and the video monitoring system of video data of the present invention, use different resolution to store corresponding video data by the storage number of days different, make user can see distance the most clear nearest video data now, can also see distance video data more clearly far away now, thereby can be under limited memory space, realize the video storage of vast of heaven number, and can ensure the integrality of the video data of vast of heaven number storage.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.