Summary of the invention
The invention provides a kind of data capture method and equipment, with the video recording data of accurate acquisition fixed time based on video file.
In order to achieve the above object, the invention provides a kind of data capture method based on video file, be applied in the supervisory control system, when the memory device in the described supervisory control system receives monitor data from watch-dog, described memory device is stored described monitor data by video file, and this method may further comprise the steps:
The stored position information of the identification information of the watch-dog of the described monitor data correspondence of record, time information corresponding, correspondence in the management server of described supervisory control system;
Described management server receives the request of specifying watch-dog, the monitor data of fixed time of checking from videoconference client VC;
Described management server is that index is inquired about with the identification information and the fixed time information of specifying watch-dog, and the stored position information that inquires is sent to described VC;
Described VC searches corresponding monitor data by described stored position information from described memory device.
The stored position information of described monitor data correspondence is: the physical location information of described monitor data in described memory device, perhaps, described monitor data is at the relative position information of described video file and the routing information of described video file.
Described monitor data time information corresponding is: described watch-dog sends the time of described monitor data, and perhaps, described memory device receives the time of described monitor data.
The stored position information of the identification information of the watch-dog of the described monitor data correspondence of record, time information corresponding, correspondence in the management server of described supervisory control system specifically comprises:
If the interval between the temporal information of the monitor data that described monitor data time information corresponding and last time write down in described management server is not less than the scheduled time, the then identification information, time information corresponding of the watch-dog of the described monitor data correspondence of record, corresponding stored position information in described management server; Perhaps,
If the data bulk between the monitor data that write down in described management server described monitor data and last time is not less than predetermined value, the then identification information, time information corresponding of the watch-dog of the described monitor data correspondence of record, corresponding stored position information in described management server.
Described method also comprises: when needs are deleted described video file, and the record of the described video file correspondence of deletion in described management server.
A kind of management server is applied in the supervisory control system, and when the memory device in the described supervisory control system received monitor data from watch-dog, described memory device was stored described monitor data by video file, and this management server comprises:
Logging modle is used to write down the identification information, time information corresponding of the watch-dog of described monitor data correspondence, corresponding stored position information;
Receiver module is used to receive the request of specifying watch-dog, the monitor data of fixed time of checking from videoconference client VC;
Enquiry module, the identification information and the fixed time information that are used for to specify watch-dog are that index is inquired about;
Sending module, the stored position information that is used for inquiring sends to described VC, searches corresponding monitor data by described stored position information from described memory device by described VC.
The stored position information of described monitor data correspondence is: the physical location information of described monitor data in described memory device, perhaps, described monitor data is at the relative position information of described video file and the routing information of described video file.
Described monitor data time information corresponding is: described watch-dog sends the time of described monitor data, and perhaps, described memory device receives the time of described monitor data.
Described logging modle, if the interval that specifically is used between the temporal information of monitor data of described monitor data time information corresponding and last registration is not less than the scheduled time, then write down the identification information, time information corresponding of the watch-dog of described monitor data correspondence, corresponding stored position information; Perhaps,
If the data bulk between the monitor data of described monitor data and last registration is not less than predetermined value, then write down the identification information, time information corresponding of the watch-dog of described monitor data correspondence, corresponding stored position information.
Also comprise: removing module is used for then deleting the record of described video file correspondence when the described video file of needs deletion.
Compared with prior art, the present invention has the following advantages at least:
Identification information by the watch-dog of record monitor data correspondence in management server, time information corresponding, corresponding stored position information, when the video recording data of the fixed time that needs checking monitoring equipment, can utilize this corresponding relation to index the positional information of video recording data accurately, by directly reading the video recording data of this positional information in the video file, can play video recording at this fixed time, thereby can obtain the video recording data of fixed time accurately, can not cause occurring a large amount of video files.
Embodiment
The present invention proposes a kind of data capture method based on video file, and this method is applied in the supervisory control system, comprises watch-dog (as encoder etc.), memory device (as IP SAN etc.), management server and VC in this supervisory control system at least.This management server is used to realize current VM (Video Management, video management) server and DM (Data Management, data management) function of server, demand according to actual networking, can also directly dispose VM server and DM server, with Fig. 1 is grid of reference model schematic diagram of the present invention, directly disposes VM server and DM server in the supervisory control system.
Among the present invention, in order to realize the data capture method based on video file, can also dispose indexing apparatus in supervisory control system, this indexing apparatus can be functional module (as index module), and is integrated on the equipment of current supervisory control system; Be integrated on the DM server or be integrated on the VM server or be integrated on the memory device as function index module; For convenience of description, be that example describes with independent indexing apparatus among the present invention.
As shown in Figure 2, should may further comprise the steps based on the data capture method of video file:
Step 201, memory device receives the monitor data from watch-dog.This watch-dog can be video source, and promptly monitor data can be video data, because these data are used for playing video recording, this monitor data also can be described as the video recording data.
It should be noted that watch-dog is that unit sends monitor data to memory device with the frame, promptly memory device is that unit receives monitor data with the frame.
Step 202, the monitor data that memory device receives by the video file storage.
The starting position (be physical address) of memory device by obtaining video file, when video file is sky, for the first frame monitor data (data 1) that receives, these data 1 are written to the starting position of video file, for after the monitor data (data 2 that receive ...), be written on the video file successively.
For example, X is the beginning physical address of video file, and data 1 are written to address X, and to upgrade next writing position be X+Y (Y is the size of data 1), when receiving the data 2 of next frame, directly data 2 is written to address X+Y, by that analogy.
Identification information, monitor data time information corresponding, the monitor data that step 203, indexing apparatus are obtained the watch-dog that sends this monitor data is written to the stored position information of memory device.
At this monitor data, indexing apparatus can obtain the identification information of the watch-dog of monitor data correspondence from monitor data.
When memory device was stored this monitor data by video file, this stored position information can be the physical location information of this monitor data in memory device.With data 1 is example, if data 1 are written to address X, this address X is the physical location of memory device, can uniquely inquire corresponding monitor data by address X.Perhaps,
This stored position information can also for: this monitor data is at the relative position information (being the positional information that monitor data is written to video file) of video file and the routing information of video file.With data 2 is example, if data 2 are written to address Y, this address Y is the relative position information of video file; In addition, for the video file of storage data 2, indexing apparatus can be known the routing information of this video file; Path by address Y and video file can uniquely inquire corresponding monitor data.
This monitor data time information corresponding is: watch-dog sends the time of this monitor data, and perhaps, memory device receives the time of this monitor data.
Consider the time-delay situation of transmission data between watch-dog and the memory device, temporal information can send the transmission time information of data for watch-dog, in this case, portability temporal information in the data, indexing apparatus are obtained the transmission time information of data by the temporal information of carrying in the data.
Concrete, memory device can extract the transmission time information in the data, and sends to indexing apparatus; This transmission time information can be absolute time (as 2011-01-0 110:00:00), and indexing apparatus determines that this absolute time is a transmission time information; This transmission time information can be relative time (being the side-play amount of relative previous frame data), as time of previous frame be 2011-01-01 10:00:00, relative time is 1s, then indexing apparatus determines that transmission time information is 2011-01-01 10:00:01.
Consider the transmission strategy of watch-dog, can not carry temporal information in the data, in this case, temporal information can receive the receiving time information of data for memory device; The receiving time information that memory device directly will receive data sends to indexing apparatus.
Step 204, indexing apparatus is written to identification information, time information corresponding, the corresponding stored position information of the watch-dog of monitor data correspondence in the contingency table of DM, i.e. the stored position information of the identification information of the watch-dog of record monitor data correspondence, time information corresponding, correspondence in DM.
Be provided with contingency table in the database of DM, this contingency table is used to write down the temporal information of monitor data, the stored position information that monitor data is written to memory device, the identification information that sends the watch-dog of this monitor data; With the stored position information is that monitor data is an example at the relative position information of video file and the routing information of video file, then when satisfying write-in policy, indexing apparatus can be written to the information (being time information, relative position information, routing information, identification information) of monitor data correspondence in the contingency table of database of this DM.
Mode one: if current monitor data time information corresponding and the interval that write in contingency table last time between the temporal information of monitor data are not less than the scheduled time (as 1s), then indexing apparatus determines to satisfy write-in policy.
For example, write the information of data 1 last time in contingency table, the temporal information of data 1 is time A, and the temporal information that then write monitor data last time in contingency table is time A; When receiving data 2, the interval of the temporal information of data 2 and time A is less than 1s, then the information of data 2 is not written to contingency table; By that analogy, when receiving data 10, the temporal information of data 10 (time B) is not less than 1s with the interval of time A, then the information with data 10 is written to contingency table, at this moment, the temporal information that write monitor data last time in contingency table is time B, by that analogy.
Mode two: if the data bulk that writes in contingency table current monitor data and last time between the monitor data is not less than predetermined value (as 100 frames), then indexing apparatus determines to satisfy write-in policy.
For example, write the information of data 1 last time in contingency table, data 1 are the 1st frame data, and then writing monitor data last time in contingency table is the 1st frame data; When receiving data 2, data 2 are the 2nd frame data, and the data bulk between the 2nd frame data and the 1st frame data is less than 100 frames, and the information with data 2 is not written to contingency table; By that analogy, when receiving data 101, data 101 are the 101st frame data, and the data bulk between the 101st frame data and the 1st frame data is not less than 100 frames, the information of data 101 is written to contingency table, write monitor data last time this moment in contingency table be the 101st frame data, by that analogy.
Need to prove,, need the information of these data is written in the contingency table,, then adopt above-mentioned strategy to judge whether the information of current data is written in the contingency table for follow-up data for first frame data that are stored in video file.
As shown in table 1, the signal situation of the contingency table when the scheduled time is 1s in the mode one, and stored position information is that monitor data is at the relative position information of video file and the routing information of video file.
Table 1
By the situation of table 1 record, when needs are checked appointment watch-dog, the video recording data of fixed time, then can retrieve the position that monitor data write in the 1s, thereby can obtain the video recording data of fixed time accurately.
The contingency table that writes down in the database based on above-mentioned DM when VC need check appointment watch-dog, the monitor data of fixed time, can also may further comprise the steps:
Step 205, VM receives the request of checking the fixed time data from VC, carries the identification information of waiting to check the affiliated watch-dog of data, the fixed time information of waiting to check data in this request.
Step 206, VM sends to DM with this request.Need to prove, if the function distributing of VM and DM on management server, does not then need to carry out this step.
Step 207, DM is the search index contingency table with identification information and the fixed time information in the request, will inquire stored position information and send to VC by VM.
For example, identification information in the request is video camera 1, when temporal information is 2011-01-01 10:00:01, DM is by the contingency table shown in the question blank 1 (stored position information is relative position information and routing information), the routing information that can know video file be HD1 Camera01.video, relative position information is X+1000, afterwards, DM can by VM with HD1 Camera01.video and X+1000 send to VC.
Step 208, VC searches corresponding monitor data by stored position information from memory device.Because stored position information can uniquely inquire corresponding monitor data, so VC can find corresponding monitor data.For example, when stored position information was relative position information and routing information, VC can find video file from memory device by routing information, and obtained monitor data to be checked by relative position information from video file.
For example, VC by routing information HD1 Camera01.video find video file from memory device, and from video file, obtain data to be checked, and watch video recording by positional information X+1000.
Among the present invention, when the path of video file changed (position of having moved video file as the user) or need the deletion video file, then indexing apparatus upgraded corresponding record in the database of DM.
Concrete, when the path of video file changed, indexing apparatus obtained the path of the video file after the variation, and replaced the routing information of the video file that writes down in the contingency table by the path of the video file after changing.For example, when the position of video file A became FilePathB, then indexing apparatus upgraded the record of video file A correspondence in the contingency table, is FilePathB with the current path information updating.
When needs deletion video file, the record of video file correspondence in the indexing apparatus deletion contingency table.For example, when needs were deleted the video file A of appointment, then the routing information with video file A was the condition query contingency table, with the relative recording of deletion video file A.
Based on the inventive concept same with said method, the invention allows for a kind of management server, be applied in the supervisory control system, when the memory device in the described supervisory control system receives monitor data from watch-dog, described memory device is stored described monitor data by video file, as shown in Figure 3, this management server comprises:
Logging modle 11 is used to write down the identification information, time information corresponding of the watch-dog of described monitor data correspondence, corresponding stored position information;
Receiver module 12 is used to receive the request of specifying watch-dog, the monitor data of fixed time of checking from videoconference client VC;
Enquiry module 13, the identification information and the fixed time information that are used for to specify watch-dog are that index is inquired about;
Sending module 14, the stored position information that is used for inquiring sends to described VC, searches corresponding monitor data by described stored position information from described memory device by described VC.
The stored position information of described monitor data correspondence is: the physical location information of described monitor data in described memory device, perhaps, described monitor data is at the relative position information of described video file and the routing information of described video file.
Described monitor data time information corresponding is: described watch-dog sends the time of described monitor data, and perhaps, described memory device receives the time of described monitor data.
Described logging modle 11, if the interval that specifically is used between the temporal information of monitor data of described monitor data time information corresponding and last registration is not less than the scheduled time, then write down the identification information, time information corresponding of the watch-dog of described monitor data correspondence, corresponding stored position information; Perhaps,
If the data bulk between the monitor data of described monitor data and last registration is not less than predetermined value, then write down the identification information, time information corresponding of the watch-dog of described monitor data correspondence, corresponding stored position information.
This management server also comprises: removing module 15 is used for then deleting the record of described video file correspondence when the described video file of needs deletion.
Wherein, each module of apparatus of the present invention can be integrated in one, and also can separate deployment.Above-mentioned module can be merged into a module, also can further split into a plurality of submodules.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by hardware, also can realize by the mode that software adds necessary general hardware platform.Based on such understanding, technical scheme of the present invention can embody with the form of software product, it (can be CD-ROM that this software product can be stored in a non-volatile memory medium, USB flash disk, portable hard drive etc.) in, comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, module in the accompanying drawing or flow process might not be that enforcement the present invention is necessary.
It will be appreciated by those skilled in the art that the module in the device among the embodiment can be distributed in the device of embodiment according to the embodiment description, also can carry out respective change and be arranged in the one or more devices that are different from present embodiment.The module of the foregoing description can be merged into a module, also can further split into a plurality of submodules.
The invention described above sequence number is not represented the quality of embodiment just to description.
More than disclosed only be several specific embodiment of the present invention, still, the present invention is not limited thereto, any those skilled in the art can think variation all should fall into protection scope of the present invention.