Summary of the invention
In view of the shortcomings of the prior art and defect, the embodiment of the present invention provide a kind of video recording inspection of video monitoring systemRope method and device.
On the one hand, the embodiment of the present invention proposes a kind of video retrieval method of video monitoring system, comprising:
S1, the video retrieval request for obtaining video monitoring system, request according to the video retrieval, are obtained in advance by inquiryAssociated data, obtain purpose and record initial time and purpose recording the end time, wherein the video retrieval request includesInitial time and retrieval end time are retrieved, the associated data includes the device identification of the equipment of video monitoring system, this setsStandby file identification, this document for identifying the Video data file that corresponding equipment is recorded identifies the files-designated of corresponding index fileKnow and this document identifies the corresponding recording initial time of file identification of corresponding index file and records the end time;
S2, determine that the purpose records the corresponding document misregistration of initial time and the purpose recording end time is correspondingDocument misregistration records the corresponding document misregistration of initial time according to the purpose and the purpose records end time corresponding textPart offset obtains video retrieval as a result, and returning by the Video data file that the equipment for inquiring the video monitoring system is recordedReturn the video retrieval result.
On the other hand, the embodiment of the present invention proposes a kind of video retrieval device of video monitoring system, comprising:
First video recording storage service query unit, the video retrieval for obtaining video monitoring system is requested, according to describedVideo retrieval request, by inquiring the associated data being obtained ahead of time, at the end of obtaining purpose recording initial time and purpose recordingBetween, wherein the video retrieval request includes retrieval initial time and retrieval end time, and the associated data includes video prisonFile identification, this article for the Video data file that the device identification of the equipment of control system, the corresponding equipment of the device identification are recordedPart identifies the file identification of corresponding index file and this document identifies the corresponding record of file identification of corresponding index fileInitial time processed and recording end time;
Second video recording storage service query unit, for determine the purpose record the corresponding document misregistration of initial time andThe purpose records end time corresponding document misregistration, records the corresponding document misregistration of initial time and institute according to the purposeIt states purpose and records end time corresponding document misregistration, the Video data recorded by the equipment for inquiring the video monitoring systemFile obtains video retrieval as a result, and returning to the video retrieval result.
The third aspect, the embodiment of the present invention provide a kind of electronic equipment, comprising: processor, memory, bus and are stored inOn memory and the computer program that can run on a processor;
Wherein, the processor, memory complete mutual communication by the bus;
The processor realizes the above method when executing the computer program.
Fourth aspect, the embodiment of the present invention provide a kind of non-transient computer readable storage medium, on the storage mediumIt is stored with computer program, which realizes the above method when being executed by processor.
The video retrieval method and device of video monitoring system provided in an embodiment of the present invention is recorded in index text for originalTemporal information and facility information on part are recorded in the form of associated data, so that the write frequency of index file is reduced,The time loss for traversing index file and file content when inquiry is reduced, the stability and video monitoring system of system are improvedVideo recording search efficiency.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present inventionIn attached drawing, technical solution in the embodiment of the present invention is explicitly described, it is clear that described embodiment is the present inventionA part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not havingEvery other embodiment obtained under the premise of creative work is made, the range of protection of the embodiment of the present invention is belonged to.
Referring to Fig. 1, the present embodiment discloses a kind of video retrieval method of video monitoring system, comprising:
S1, the video retrieval request for obtaining video monitoring system, request according to the video retrieval, are obtained in advance by inquiryAssociated data, obtain purpose and record initial time and purpose recording the end time, wherein the video retrieval request includesInitial time and retrieval end time are retrieved, the associated data includes the device identification of the equipment of video monitoring system, this setsStandby file identification, this document for identifying the Video data file that corresponding equipment is recorded identifies the files-designated of corresponding index fileKnow and this document identifies the corresponding recording initial time of file identification of corresponding index file and records the end time;
S2, determine that the purpose records the corresponding document misregistration of initial time and the purpose recording end time is correspondingDocument misregistration records the corresponding document misregistration of initial time according to the purpose and the purpose records end time corresponding textPart offset obtains video retrieval as a result, and returning by the Video data file that the equipment for inquiring the video monitoring system is recordedReturn the video retrieval result.
The video retrieval method of video monitoring system provided in an embodiment of the present invention, will be on original record indexed fileTemporal information and facility information are recorded in the form of associated data, to reduce the write frequency of index file, are also reducedThe time loss that index file and file content are traversed when inquiry, improves the video recording of the stability and video monitoring system of systemSearch efficiency.
On the basis of preceding method embodiment, the associated data be can store in the database;
Wherein, described to be requested according to the video retrieval, by inquiring the associated data being obtained ahead of time, obtain purpose recordingInitial time and purpose record the end time, may include:
It is requested according to the video retrieval, by inquiring the associated data stored in the database, obtains purpose recordingInitial time and purpose record the end time.
On the basis of preceding method embodiment, the associated data can be synchronized in memory mapping;
Wherein, described to be requested according to the video retrieval, by inquiring the associated data being obtained ahead of time, obtain purpose recordingInitial time and purpose record the end time, may include:
It is requested according to the video retrieval, by audit memory, obtaining purpose recording initial time and purpose recording terminatesTime.
In the present embodiment, when the number of devices that video monitoring system needs to record a video is more, for storage equipment and serviceProgram is a biggish challenge, because data information, the temporal information etc. of video data are constantly recorded in local, meanwhile,Multiple users also can constantly carry out video recording inquiry playback, and the file for being equivalent to storing data is constantly written and is read,File I/O operations are very frequent.By pair of the information such as original video information such as equipment, file, time recorded on indexed fileIt answers relation record after local file database, further to promote efficiency data query, reduces the number of database write-inAnd consumption, recording equipment, data file, index file, the information table content of period in local file database are integrated intoThe internal storage data of certain forms is stored in mapping MAP, and when there is new data update, first more new database content, updates simultaneouslyThe internal storage data is directly inquired by way of reading memory in this way when there is video recording inquiry request, avoids databaseThe operation such as traversal read-write reduce the utilization of system I/O resource to reduce the read-write operation frequency of a large amount of index fileFrequency, and the speed that memory is read is very fast, quickly can position and return the query information of user, improve the record of systemAs recall precision.
On the basis of preceding method embodiment, the database can be light-duty document data bank.
It, being capable of th Fast Recording Equipment, data file, index file, time using light-duty document data bank in the present embodimentThe incidence relation of section, while video time section can be efficiently inquired, the video recording search efficiency of lifting system.
Referring to Fig. 2, the present embodiment discloses a kind of video retrieval device of video monitoring system, comprising:
First video recording storage service query unit 1, the video retrieval for obtaining video monitoring system is requested, according to describedVideo retrieval request, by inquiring the associated data being obtained ahead of time, at the end of obtaining purpose recording initial time and purpose recordingBetween, wherein the video retrieval request includes retrieval initial time and retrieval end time, and the associated data includes video prisonFile identification, this article for the Video data file that the device identification of the equipment of control system, the corresponding equipment of the device identification are recordedPart identifies the file identification of corresponding index file and this document identifies the corresponding record of file identification of corresponding index fileInitial time processed and recording end time;
Second video recording storage service query unit 2, for determining that the purpose records the corresponding document misregistration of initial timeRecord end time corresponding document misregistration with the purpose, according to the purpose record the corresponding document misregistration of initial time andThe purpose records end time corresponding document misregistration, the video recording number recorded by the equipment for inquiring the video monitoring systemVideo retrieval is obtained according to file as a result, and returning to the video retrieval result.
Specifically, the first video recording storage service query unit 1 obtains the video retrieval request of video monitoring system, rootIt is requested according to the video retrieval, by inquiring the associated data being obtained ahead of time, obtains purpose and record initial time and purpose recordingEnd time, wherein the video retrieval request includes retrieval initial time and retrieval end time, and the associated data includesThe files-designated for the Video data file that the device identification of the equipment of video monitoring system, the corresponding equipment of the device identification are recordedKnow, this document identifies the file identification of corresponding index file and this document identifies the file identification pair of corresponding index fileThe recording initial time answered and recording end time;The second video recording storage service query unit 2 determines that the purpose is recordedThe corresponding document misregistration of initial time and the purpose record end time corresponding document misregistration, are recorded according to the purposeBegin time corresponding document misregistration and purpose recording end time corresponding document misregistration, passes through and inquires the video monitoringThe Video data file that the equipment of system is recorded obtains video retrieval as a result, and returning to the video retrieval result.
The video retrieval device of video monitoring system provided in an embodiment of the present invention, will be on original record indexed fileTemporal information and facility information are recorded in the form of associated data, to reduce the write frequency of index file, are also reducedThe time loss that index file and file content are traversed when inquiry, improves the video recording of the stability and video monitoring system of systemSearch efficiency.
On the basis of aforementioned device embodiment, the associated data be can store in the database;
Wherein, the first video recording storage service query unit, specifically can be used for:
It is requested according to the video retrieval, by inquiring the associated data stored in the database, obtains purpose recordingInitial time and purpose record the end time.
On the basis of aforementioned device embodiment, the associated data can be synchronized in memory mapping;
Wherein, the first video recording storage service query unit, specifically can be used for:
It is requested according to the video retrieval, by audit memory, obtaining purpose recording initial time and purpose recording terminatesTime.
On the basis of aforementioned device embodiment, the database can be light-duty document data bank.
The video retrieval device of the video monitoring system of the present embodiment, can be used for executing the technology of preceding method embodimentScheme, it is similar that the realization principle and technical effect are similar, and details are not described herein again.
Fig. 3 shows the entity structure schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention, as shown in figure 3, shouldElectronic equipment may include: processor 11, memory 12, bus 13 and be stored on memory 12 and can transport on processor 11Capable computer program;
Wherein, the processor 11, memory 12 complete mutual communication by the bus 13;
The processor 11 realizes method provided by above-mentioned each method embodiment when executing the computer program, such asInclude: the video retrieval request for obtaining video monitoring system, is requested according to the video retrieval, by inquiring the pass being obtained ahead of timeJoin data, obtain purpose and record initial time and purpose recording end time, wherein the video retrieval request includes retrievingBegin time and retrieval end time, the associated data includes the device identification of the equipment of video monitoring system, the device identificationFile identification, this document for the Video data file that corresponding equipment is recorded identify corresponding index file file identification andThis document identifies the corresponding recording initial time of file identification of corresponding index file and records the end time;Determine the meshThe corresponding document misregistration of recording initial time and the purpose record end time corresponding document misregistration, according to the purposeIt records the corresponding document misregistration of initial time and the purpose records end time corresponding document misregistration, by inquiring the viewThe Video data file that the equipment of frequency monitoring system is recorded obtains video retrieval as a result, and returning to the video retrieval result.
The embodiment of the present invention provides a kind of non-transient computer readable storage medium, is stored thereon with computer program, shouldMethod provided by above-mentioned each method embodiment is realized when computer program is executed by processor, for example, obtain video prisonThe video retrieval of control system is requested, and is requested according to the video retrieval, by inquiring the associated data being obtained ahead of time, obtains purposeIt records initial time and purpose records the end time, wherein the video retrieval request includes retrieval initial time and retrieval knotBeam time, the associated data include the device identification of the equipment of video monitoring system, the corresponding equipment recording of the device identificationVideo data file file identification, this document identify corresponding index file file identification and this document mark correspond toIndex file the corresponding recording initial time of file identification and record the end time;Determine that the purpose records initial timeCorresponding document misregistration and the purpose record end time corresponding document misregistration, record initial time pair according to the purposeThe document misregistration answered and the purpose record end time corresponding document misregistration, by inquiring setting for the video monitoring systemThe Video data file of priming obtains video retrieval as a result, and returning to the video retrieval result.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer programProduct.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the applicationApply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) producesThe form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present applicationFigure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructionsThe combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programsInstruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produceA raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for realThe device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spyDetermine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram orThe function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that countingSeries of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer orThe instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram oneThe step of function of being specified in a box or multiple boxes.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a realityBody or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operationIn any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended toNon-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including thoseElement, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipmentIntrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded thatThere is also other identical elements in process, method, article or equipment including the element.Term " on ", "lower" etc. refer toThe orientation or positional relationship shown is to be based on the orientation or positional relationship shown in the drawings, and is merely for convenience of the description present invention and simplifiesDescription, rather than the device or element of indication or suggestion meaning must have a particular orientation, constructed and grasped with specific orientationMake, therefore is not considered as limiting the invention.Unless otherwise clearly defined and limited, term " installation ", " connected "," connection " shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or be integrally connected;It can beMechanical connection, is also possible to be electrically connected;It can be directly connected, two can also be can be indirectly connected through an intermediaryConnection inside element.For the ordinary skill in the art, above-mentioned term can be understood at this as the case may beConcrete meaning in invention.