Summary of the invention
The present invention provides a kind of dynamic video monitoring method and system, to solve the problems referred to above.
The present invention provides a kind of dynamic video monitoring method.Said method comprises the following steps: capturing and coding server obtains the fault right weight of the video collector of zones of different in predetermined period;Capturing and coding server is according to the fault right weight obtained, and according to the synopsis of fault right weight scope and monitoring periods in each region of storage, it is determined that the monitoring periods of video monitor, and sends Monitoring instruction to video monitor according to monitoring periods;Video monitor receives after Monitoring instruction, subscribes to video flowing to streaming media server, and judges whether to continue to receive video flowing, if continuing to receive, then whether the Frame of video flowing judging to continue to receive is consistent with setting data frame.
The present invention also provides for a kind of dynamic video monitoring system, including capturing and coding server, video collector, video monitor and streaming media server.Capturing and coding server connects video collector, streaming media server and video monitor, and video monitor connects streaming media server.Wherein, capturing and coding server, for obtaining the fault right weight of the video collector of zones of different in predetermined period.Capturing and coding server, for according to the fault right weight obtained, according to the synopsis of fault right weight scope and monitoring periods in each region of storage, it is determined that the monitoring periods of video monitor, and sends Monitoring instruction to video monitor according to monitoring periods.Video monitor receives after Monitoring instruction, subscribes to video flowing to streaming media server, and judges whether to continue to receive video flowing, if continuing to receive, then whether the Frame of video flowing judging to continue to receive is consistent with setting data frame.
Compared to prior art, method and system are monitored according to dynamic video provided by the invention, capturing and coding server obtains the fault right weight of the video collector of zones of different in predetermined period, capturing and coding server is according to the fault right weight obtained, the synopsis of fault right weight scope and monitoring periods according to each region of storage, determine the monitoring periods of video monitor, and according to monitoring periods transmission Monitoring instruction to video monitor.So, the monitoring periods of regional can dynamically adjust according to the difference of the fault right weight in region, thus realizing the dynamic adjustment of video monitoring.Additionally, video monitor receives after Monitoring instruction, subscribing to video flowing to streaming media server, and judge whether to continue to receive video flowing, if continuing to receive, then whether the Frame of video flowing judging to continue to receive is consistent with setting data frame.So, video monitor realizes the concordance of video flowing interruptibility and video stream data frame is monitored, and can be accurately positioned video pictures and extremely be blocked by video flowing picture or frame number is to causing, thus improving the accuracy of video flow detection.
Detailed description of the invention
Below with reference to accompanying drawing and describe the present invention in detail in conjunction with the embodiments.It should be noted that when not conflicting, the embodiment in the application and the feature in embodiment can be mutually combined.
Fig. 1 show the flow chart of the dynamic video monitoring method provided according to presently preferred embodiments of the present invention.As it is shown in figure 1, the dynamic video monitoring method that presently preferred embodiments of the present invention provides includes step 101~103.
In step 101, capturing and coding server obtains the fault right weight of the video collector of zones of different in predetermined period.Specifically, capturing and coding server obtains the fault frequency of the video collector of zones of different in predetermined period;Capturing and coding server calculates the ratio of the fault right weight of the video collector of the zones of different fault frequency equal to area video harvester to be calculated and the fault frequency summation of the video collector in all regions.
In the present embodiment, the control server running by capturing and coding server controls video collector.Specifically, control server passes through video acquisition direction and the angle of capturing and coding server controls video collector.For video collector for photographic head, control server can control the operations such as photographic head rotates, image zooms in or out.
In the present embodiment, capturing and coding server obtains video data stream from video collector, and video data stream is converted to RTMP data stream transmitting streaming media server, above-mentioned RTMP data stream can be sent to client by streaming media server, and then client plays video information by instruments such as flash plug-in units.
In this, for three regions A, B, C, in the A of region, the number of video collector is such as three, and in the B of region, the number of video collector is such as two, and in the C of region, the number of video collector is such as five.But, the number of video collector in each region is not limited by the present invention.If the video collector in respective regions breaks down (such as, video collector cannot normal operation or control server cannot normally control video collector when operating), video collector or control server can send failure notification to capturing and coding server, the fault frequency of capturing and coding server statistics all regions video collector in predetermined period (such as, 12 hours).In this, such as in a predetermined period, the results are as follows for capturing and coding server: the fault frequency of the video collector of region A is 1 time, the fault frequency of the video collector of region B is 0 time, and the fault frequency of the video collector of region C is 4 times.Now, according to the calculation of the fault right weight of different video collector it can be seen that the fault right weight=4/5=80% of the fault right weight=0/5=0 of the fault right weight=1/5=20% of region A, region B, region C.Additionally, capturing and coding server can again add up the fault frequency of video collector in all regions in next predetermined period, and obtain the new fault right weight of regional.
In step 102, described capturing and coding server is according to the described fault right weight obtained, the synopsis of fault right weight scope and monitoring periods according to each region of storage, it is determined that the monitoring periods of video monitor, and send Monitoring instruction to described video monitor according to described monitoring periods.
In the present embodiment, capturing and coding server stores the fault right weight scope in each region and the synopsis of monitoring periods.In this, still for three regions A, B, C, the synopsis of fault right weight scope and monitoring periods is such as shown in table 1.But, the present invention is not limited to this.
Table 1
In table 1, T1, T2, T3 can be configured according to practical situation, it is only necessary to meet T3 < T2 < T1.Wherein, monitoring periods represents the video monitor monitoring periods to the video data stream of respective regions.
In step 101, the fault right weight of region A is 20%, the fault right weight of region B is 0, the fault right weight of region C is 80% is example, according to table 1 it can be seen that the monitoring periods of region A be T2(such as, 8 hours), the monitoring periods of region B be T1(such as, 24 hours), the monitoring periods of region C be T3(such as, 4 hours).
In the present embodiment, if the synopsis that capturing and coding server is according to fault right weight scope Yu monitoring periods, it is determined that the monitoring periods of the video monitor of respective regions, then according to the monitoring periods transmission Monitoring instruction determined to video monitor.For example, the detection cycle of region C be T3(such as, 4 hours), then capturing and coding server is to when reaching T3 duration every time, sending Monitoring instruction to video monitor, and whether the video flowing that notice video monitor starts monitored area C normal.In addition, when capturing and coding server is after next predetermined period obtains the new fault right weight of regional, again the monitoring periods of regional is determined according to above-mentioned synopsis, and carry out video flowing monitoring according to the monitoring periods notice video monitor redefined, thus realize the dynamic adjustment of video surveillance.
In step 103, after described video monitor receives described Monitoring instruction, subscribe to video flowing to streaming media server, and judge whether to continue to receive described video flowing, if continuing to receive, then whether the Frame of described video flowing judging to continue to receive is consistent with setting data frame.
In the present embodiment, after video monitor receives the Monitoring instruction that capturing and coding server sends, subscribe to video flowing to streaming media server, if video monitor is from streaming media server successful subscription video flowing, then judge whether to continue to receive video flowing from streaming media server.If video monitor is not from streaming media server successful subscription video flowing, then send abnormal information to mailbox set in advance or mobile phone to remind, meanwhile, send command for stopping notice capturing and coding server, after capturing and coding server receives command for stopping, terminate capturing and coding process.If video monitor is from streaming media server successful subscription video flowing, but do not continue to receive video flowing, then video monitor sends abnormal information prompting to mailbox set in advance or mobile phone, simultaneously, send command for stopping notice capturing and coding server, after capturing and coding server receives described command for stopping, terminate capturing and coding process.If video monitor is from streaming media server successful subscription video flowing, and can continue to receive video flowing, then video monitor judges that whether the Frame of video flowing continuing to receive is consistent with setting data frame.If video monitor is from streaming media server successful subscription video flowing, and continue the Frame of video flowing that receives consistent with setting data frame time, video monitor renews one's subscription video flowing the concordance of the interruptibility of cycle criterion video flowing and Frame.If video monitor is from streaming media server successful subscription video flowing, and continue the Frame of video flowing that receives inconsistent with setting data frame time, video monitor sends abnormal information to mailbox set in advance or mobile phone and reminds, simultaneously, send command for stopping notice capturing and coding server, after capturing and coding server receives described command for stopping, terminate capturing and coding process.
Additionally, in the present embodiment, whether video monitor sends heartbeat packet in setting cycle to control server normal to monitor control server.Specifically, video monitor can send heartbeat packet every the time of setting (such as, 1 hour) to control server.After control server receives heartbeat packet, returning heartbeat packet to video monitor, video monitor receives the heartbeat packet of return, can continue to monitor, it does not have receive heartbeat packet, sends unexpected message, and sends abnormal information prompting to mailbox set in advance and mobile phone.
Fig. 2 show the schematic diagram of the dynamic video monitoring system provided according to presently preferred embodiments of the present invention.As in figure 2 it is shown, the dynamic video monitoring system that presently preferred embodiments of the present invention provides includes capturing and coding server 12, video collector 10, video monitor 14 and streaming media server 16.Capturing and coding server 12 connects video collector 10, streaming media server 16 and video monitor 14.Video monitor 14 connects streaming media server 16.
In the present embodiment, capturing and coding server 12, for obtaining the fault right weight of the video collector 10 of zones of different in predetermined period.Capturing and coding server 12, for according to the fault right weight obtained, according to the synopsis of fault right weight scope and monitoring periods in each region of storage, it is determined that the monitoring periods of video monitor 14, and sends Monitoring instruction to video monitor 14 according to monitoring periods.After video monitor 14 receives Monitoring instruction, subscribing to video flowing to streaming media server 16, and judge whether to continue to receive video flowing, if continuing to receive, then whether the Frame of video flowing judging to continue to receive is consistent with setting data frame.
Additionally, in the present embodiment, dynamic video monitoring system also includes control server 18, and control server 18 connects capturing and coding server 12 and video monitor 14.Control server 18 controls the running of video collector 10 by capturing and coding server 12.It addition, about the specific operation process of said system with described in said method, therefore repeat no more in this.
In sum, according to the dynamic video monitoring method and system that present pre-ferred embodiments provides, capturing and coding server obtains the fault right weight of the video collector of zones of different in predetermined period, capturing and coding server is according to the fault right weight obtained, the synopsis of fault right weight scope and monitoring periods according to each region of storage, determine the monitoring periods of video monitor, and according to monitoring periods transmission Monitoring instruction to video monitor.So, the monitoring periods of regional can dynamically adjust according to the difference of the fault right weight in region, thus realizing the dynamic adjustment of video monitoring.Additionally, video monitor receives after Monitoring instruction, subscribing to video flowing to streaming media server, and judge whether to continue to receive video flowing, if continuing to receive, then whether the Frame of video flowing judging to continue to receive is consistent with setting data frame.So, video monitor realizes the concordance of video flowing interruptibility and video stream data frame is monitored, and can be accurately positioned video pictures and extremely be blocked by video flowing picture or frame number is to causing, thus improving the accuracy of video flow detection.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.All within the spirit and principles in the present invention, any amendment of making, equivalent replacement, improvement etc., should be included within protection scope of the present invention.