Summary of the invention
In order to overcome the deficiencies in the prior art, the object of the present invention is to provide a kind of video interception storage means and the device of being convenient to retrieval, distributed storage scheme is provided, according to the bibliographic structure of business need from each level of multiple orientation optimization, set up shot image information database, improve the performance of searching, moving and delete sectional drawing file.
For solving the problem, the technical solution adopted in the present invention is as follows:
Scheme one:
Be convenient to the video interception storage means retrieved, comprise the following steps:
S1: sectional drawing storage server receives the sectional drawing data that send of client and parses the attribute of these sectional drawing data;
S2: sectional drawing storage server judges whether the last residual capacity storing the disk of sectional drawing data enough stores these sectional drawing data, if so, then performs step S3, if not, then performs step S4;
S3: sectional drawing storage server stores this sectional drawing data according to the attribute of these sectional drawing data according to the path rule of specifying upper once storage in the disk of sectional drawing data;
S4: sectional drawing storage server switches to the next one to be had the disk of enough capacity and store this sectional drawing data according to the attribute of these sectional drawing data according to the path rule of specifying;
S5: database server obtains the information of these sectional drawing data and the tables of data write in current secondary data library file, the information of sectional drawing data comprises the attribute of sectional drawing data and the absolute path information of sectional drawing data place catalogue and relative path information.
Preferably, the attribute of described sectional drawing data comprises packet numbering, camera numbering, date of formation and rise time.
Preferably, the path rule of specifying is: packet numbering is defined as ground floor catalogue, camera number definition is second layer catalogue, date of formation is defined as third layer catalogue, rise time is defined as the title of sectional drawing data and sectional drawing data are arranged in third layer catalogue, forms the path of specifying with the title of three hierarchical directory and sectional drawing data.
Preferably, database server is also for generating a secondary data library file corresponding to the next time cycle and tables of data wherein before end cycle at a fixed time, time cycle is one month or 1 year, and the tables of data in each secondary data library file is for storing the information of the sectional drawing data generated in the time cycle corresponding to this secondary data library file.
Scheme two:
Be convenient to the video interception storage system retrieved, comprise with lower module:
Sectional drawing data reception module, is located in sectional drawing storage server, for receiving sectional drawing data that client sends and parsing the attribute of these sectional drawing data;
Capacity determination module, is located in sectional drawing storage server, for judging whether the last residual capacity storing the disk of sectional drawing data enough stores these sectional drawing data, if so, then performs the first judging treatmenting module, if not, then performs the second judging treatmenting module;
First judging treatmenting module, is located in sectional drawing storage server, for storing this sectional drawing data according to the attribute of these sectional drawing data according to the path rule of specifying upper once storage in the disk of sectional drawing data;
Second judging treatmenting module, is located in sectional drawing storage server, has the disk of enough capacity for switching to the next one and stores this sectional drawing data according to the attribute of these sectional drawing data according to the path rule of specifying;
Sectional drawing data message writing module, be located in database server, for obtaining the information of these sectional drawing data and the tables of data write in current secondary data library file, the information of sectional drawing data comprises the attribute of sectional drawing data and the absolute path information of sectional drawing data place catalogue and relative path information.
Preferably, the attribute of described sectional drawing data comprises packet numbering, camera numbering, date of formation and rise time.
Preferably, the path rule of specifying is: packet numbering is defined as ground floor catalogue, camera number definition is second layer catalogue, date of formation is defined as third layer catalogue, rise time is defined as the title of sectional drawing data and sectional drawing data are arranged in third layer catalogue, forms the path of specifying with the title of three hierarchical directory and sectional drawing data.
Preferably, database server is also for generating a secondary data library file corresponding to the next time cycle and tables of data wherein before end cycle at a fixed time, time cycle is one month or 1 year, and the tables of data in each secondary data library file is for storing the information of the sectional drawing data generated in the time cycle corresponding to this secondary data library file.
Compared to existing technology, beneficial effect of the present invention is: utilize time date of formation of sectional drawing data, different grouping and different camera to be optimized design to the bibliographic structure storing sectional drawing data, make the memory property under each catalogue meet the scene of most high-frequency sectional drawing.And, for each sectional drawing data, also extract in attribute write into Databasce wherein, make retrieval effectively, and can by retrieving in a database and locating sectional drawing data, to carry out moving or deletion action in quick position to the absolute path of sectional drawing data.In addition, distributed storage mode can also be utilized to be stored in different disks or hard disk by sectional drawing data and secondary data file, improve retrieval performance.
Embodiment
Below, by reference to the accompanying drawings and embodiment, the present invention is described further:
Be a kind of video interception storage means being convenient to retrieve of the present invention with reference to figure 1, be mainly used in the scene needing frequent generating video sectional drawing carrying out to store, such as safety check website, take the scene such as website and a certain section of highway.At the scene in region, usually be provided with multiple camera to monitor in real time multiple point respectively, with certain frequency sectional drawing carried out to monitor video by client and upload, specifically be uploaded in sectional drawing storage server and carry out associative operation, wherein, the shot operation of client and upload operation are conventional operation, and main storage means is embodied in sectional drawing storage server and database server, below storage means is described, specifically comprises the following steps:
S1: sectional drawing storage server receives the sectional drawing data that send of client and parses the attribute of these sectional drawing data;
S2: sectional drawing storage server judges whether the last residual capacity storing the disk of sectional drawing data enough stores these sectional drawing data, if so, then performs step S3, if not, then performs step S4;
S3: sectional drawing storage server stores this sectional drawing data according to the attribute of these sectional drawing data according to the path rule of specifying upper once storage in the disk of sectional drawing data;
S4: sectional drawing storage server switches to the next one to be had the disk of enough capacity and store this sectional drawing data according to the attribute of these sectional drawing data according to the path rule of specifying;
S5: database server obtains the information of these sectional drawing data and the tables of data write in current secondary data library file, the information of sectional drawing data comprises the attribute of sectional drawing data and the absolute path information of sectional drawing data place catalogue and relative path information.
In said method, the sectional drawing data uploaded comprise corresponding attribute, specifically comprise packet numbering, camera numbering, date of formation and rise time.Wherein, packet numbering refers to the numbering of the numbering in certain safety check region, the numbering of certain charge station or certain section of highway; Camera numbering refers to each camera in the region that packet numbering is corresponding, such as, has 100 cameras in a region, then respectively to there being 100 camera numberings; The current date when video that date of formation and rise time refer to captured by corresponding each camera carries out sectional drawing and current time.In step s 2, sectional drawing storage server all can judge when receiving sectional drawing data each time whether the residual capacity when front disk enough stores, it should be noted that, usual each disk can reserve certain capacity as floating space, such as reserved 1G capacity, if when front disk only remaining 1G capacity, then think that this disk has not had residual capacity to store sectional drawing data, needing to switch to the next one has the disk of enough capacity to store.
No matter in step S3 or S4, all can store this sectional drawing data according to the attribute of sectional drawing data according to the path rule of specifying.Concrete, the path rule of specifying is: packet numbering is defined as ground floor catalogue, camera number definition is second layer catalogue, date of formation is defined as third layer catalogue, rise time is defined as the title of sectional drawing data and sectional drawing data are arranged in third layer catalogue, forms the path of specifying with the title of three hierarchical directory and sectional drawing data.Definition about above-mentioned path rule considers for the file under each catalogue or catalogue quantity and memory property, because being learnt by test, within the storage system, when the file under a catalogue and catalogue quantity are more than 10000, its operating performance can become very low, need the response time of one to two minutes, therefore must limit the file under each catalogue and catalogue quantity.According to path rule defined above, the path of its correspondence be " packet numbering camera numbering the date Hour Minute Second .jpg ", wherein the suffix of filename is not limited to " .jpg ", also can be the picture format such as " .png " or " .bmp ".Based on above-mentioned path rule, it can meet the video interception demand of most of monitoring scene, also meet the memory property demand of data simultaneously, if client carries out sectional drawing to the picture of certain camera with the frequency of 10 seconds sectional drawings one, within one day, generate 8640, this sectional drawing frequency can meet the requirement of most of scene for sectional drawing frequency.
In step s 5, after current sectional drawing data store by sectional drawing storage server, database server can obtain the information of these sectional drawing data and the information of acquisition be write in the tables of data in current secondary data library file, secondary data library file and ndf file.The information of sectional drawing data comprises the attribute of sectional drawing data and the absolute path information of sectional drawing data place catalogue and relative path information, namely the packet numbering of these sectional drawing data, camera numbering, date created, creation-time, absolute path and relative path is comprised, wherein, relative path is convenient to WEB website and is retrieved, and absolute path is convenient to locate the physical location of these sectional drawing data and is carried out moving or deletion action.Concrete, the data list structure storing the information of sectional drawing data is as follows:
Further, database server is also for generating a secondary data library file corresponding to the next time cycle and tables of data wherein before end cycle at a fixed time, time cycle is one month or 1 year, and the tables of data in each secondary data library file is for storing the information of the sectional drawing data generated in the time cycle corresponding to this secondary data library file.Such as, a secondary data library file corresponds to one month, then represent the secondary data library file that can generate next month before terminating this month, in the tables of data be stored in time corresponding to the sectional drawing data of next month to enable the sectional drawing data across next month during the moon, such as can create the secondary data library file in June during May, when May across the June moon time, the information of the sectional drawing data in June just can be saved in the tables of data corresponding to the secondary data library file in June.The object generating a secondary data library file with a fixed cycle is the record preventing storing excess in a secondary data library file, causes recall precision to reduce.In addition, when generating next secondary data library file, first can rule of thumb for the secondary data library file being about to generate sets a prediction size, whether the residual capacity size then retrieving current disk is greater than the prediction size being about to the secondary data library file generated, if, then in current disk, generate next secondary data library file, otherwise be switched to the next one and have the disk of enough capacity to store.For storing the hard disk of secondary data library file and the hard disk for storing sectional drawing data can be different hard disk.
In order to improve operating performance, can also by multiple hard disk composition array, sectional drawing data and secondary data library file dispersion different hard disks in an array, when operating, multiple hard disk can work simultaneously, increases work efficiency.
The solution of the present invention utilizes time date of formation of sectional drawing data, different grouping and different camera to be optimized design to the bibliographic structure storing sectional drawing data, makes the memory property under each catalogue meet the scene of most high-frequency sectional drawing.And, for each sectional drawing data, also extract in attribute write into Databasce wherein, make retrieval effectively, and can by retrieving in a database and locating sectional drawing data, to carry out moving or deletion action in quick position to the absolute path of sectional drawing data.In addition, distributed storage mode can also be utilized to be stored in different disks or hard disk by sectional drawing data and secondary data file, improve retrieval performance.
The invention also discloses a kind of video interception storage system being convenient to retrieve, comprise with lower module:
Sectional drawing data reception module, is located in sectional drawing storage server, for receiving sectional drawing data that client sends and parsing the attribute of these sectional drawing data;
Capacity determination module, is located in sectional drawing storage server, for judging whether the last residual capacity storing the disk of sectional drawing data enough stores these sectional drawing data, if so, then performs the first judging treatmenting module, if not, then performs the second judging treatmenting module;
First judging treatmenting module, is located in sectional drawing storage server, for storing this sectional drawing data according to the attribute of these sectional drawing data according to the path rule of specifying upper once storage in the disk of sectional drawing data;
Second judging treatmenting module, is located in sectional drawing storage server, has the disk of enough capacity for switching to the next one and stores this sectional drawing data according to the attribute of these sectional drawing data according to the path rule of specifying;
Sectional drawing data message writing module, be located in database server, for obtaining the information of these sectional drawing data and the tables of data write in current secondary data library file, the information of sectional drawing data comprises the attribute of sectional drawing data and the absolute path information of sectional drawing data place catalogue and relative path information.
Preferably, the attribute of described sectional drawing data comprises packet numbering, camera numbering, date of formation and rise time.
Preferably, the path rule of specifying is: packet numbering is defined as ground floor catalogue, camera number definition is second layer catalogue, date of formation is defined as third layer catalogue, rise time is defined as the title of sectional drawing data and sectional drawing data are arranged in third layer catalogue, forms the path of specifying with the title of three hierarchical directory and sectional drawing data.
Preferably, database server is also for generating a secondary data library file corresponding to the next time cycle and tables of data wherein before end cycle at a fixed time, time cycle is one month or 1 year, and the tables of data in each secondary data library file is for storing the information of the sectional drawing data generated in the time cycle corresponding to this secondary data library file.
To one skilled in the art, according to technical scheme described above and design, other various corresponding change and deformation can be made, and all these change and deformation all should belong within the protection domain of the claims in the present invention.