The kinescope method of a kind of bottom collector
Technical field
The present invention relates to kinescope method, particularly relate to the kinescope method of a kind of bottom collector.
Background technology
In the dynamic environment safety protection field of base station, the kinescope method of common bottom collector has following several:
First kind be the bottom collector not tube field whether alarm video recording always takes place, and realtime graphic is uploaded to the upper strata monitoring software of client by network, the upper strata monitoring software is preserved into video file with the realtime graphic of receiving again, for consulting.The shortcoming of this method is, 1, upload image in real time and take a large amount of bandwidth; Video Document when 2, needing to find alarm after alarming take place from a large amount of video files is searched difficulty.
Second kind be the bottom collector not tube field whether take place the alarm always the video recording, realtime graphic is saved on the magnanimity hard disk.The shortcoming of this method is, 1, the bottom is equipped with the magnanimity hard disk, and the base station needs a large amount of magnanimity hard disk of configuration more for a long time, and cost is very high; 2, need manually in jumbo video file, to search the Video Document that takes place before and after the alarm constantly after alarming, search difficulty.
The third is that the bottom collector is not recorded a video with nowhere to turn to alert the generation time.Collector is uploaded to client upper layer data supervisory control system with the real time data of gathering, after the upper layer data supervisory control system has determined alarm, warning information is sent to frequency image monitoring system, and the frequency image monitoring system bottom collector that says the word again begins video recording and uploads video recording.The shortcoming of this method is: 1, alarm judges that time of delay is long through a plurality of links; In case 2 networks interrupt then can not record a video; 3, can not preserve the preceding constantly image of alarm.
Summary of the invention
Technical problem to be solved by this invention is: remedy above-mentioned the deficiencies in the prior art, propose the kinescope method of a kind of bottom collector, make before and after the video file record alarm of generation video and the file size of a period of time less.
Technical problem of the present invention is solved by following technical scheme:
The kinescope method of a kind of bottom collector, employing bottom collector is monitored in real time, is recorded a video and preserves view data, described preservation data are that the view data of will gather is kept in the buffer memory of opening up in the collector internal memory of described bottom by formation, it is characterized in that: following steps are arranged successively:
1) described bottom collector monitoring has judged whether alarm signal;
If there is not alarm signal, then return and continue monitoring, video recording and preserve view data, make the oldest view data in the described buffer memory clear out of formation, inferior old view data moves to the formation head from the formation middle part, and the latest image storage is at the formation afterbody;
If alarm signal is arranged, the view data that then will alarm earlier in the constantly preceding formation is saved in the newly-generated video file, will alarm the view data of gathering moment back then and continue in the described newly-generated video file;
2) described bottom collector continuation monitoring judges whether alarm signal finishes;
If alarm signal finishes, then stop video recording;
If alarm signal does not finish, then enter step 3);
3) described bottom collector continuation monitoring judges whether to reach the recording time upper limit that the client sets;
If do not reach the recording time upper limit, then get back to step 2);
If reached the recording time upper limit, then stop video recording.
Technical problem of the present invention is solved by following further technical scheme:
Also comprise step 4), after stopping to record a video, described bottom collector continues monitoring and judges whether network state is unobstructed;
If network is obstructed, then wait for, get back to step 4);
If network is unobstructed, then described newly-generated video file is uploaded to client from the collector base station.
In the optimized technical scheme:
The capacity of described buffer memory is the capacity that presets of the time period length setting before taking place according to the needed alarm of client.
Described newly-generated video file name is called the title that adds the alarm identifier name according to the time that alarm takes place.
The present invention also proposes a kind of bottom collector that is used to record a video, and comprises video recording control module, picture recording module and memory module, and described video recording control module is controlled described picture recording module described bottom collector environment of living in is recorded a video in real time; Described memory module receives the video recording data and the storage of described picture recording module;
Also comprise first monitoring module, second monitoring module and the 3rd monitoring module, described first monitoring module judges whether described bottom collector environment of living in has alarm signal: if alarm signal is arranged then send storage control signal and give memory module, if do not have alarm signal then do not send signal; The video recording data that described memory module will receive are preserved by formation, open up newly-generated video file memory block after receiving the storage control signal of first monitoring module output simultaneously, and the video recording data of current queue are saved in the newly-generated video file memory block; Described second monitoring module receives the alarm signal of described first monitoring module, judge whether described alarm signal finishes: output video recording end signal is exported first transition signal to described the 3rd monitoring module to described video recording control module if alarm signal does not finish if alarm signal finishes; Described the 3rd monitoring module receives described first transition signal, judge whether alarm back recording time reaches the recording time upper limit that the client sets: if reach then export the video recording end signal, if do not reach then export extremely described second monitoring module of second transition signal to the control module of recording a video; Described second monitoring module continues to judge whether described alarm signal finishes after receiving described second transition signal, and the described picture recording module of control finished video recording after described video recording control module received the video recording received signal.
Technical problem of the present invention is solved by following further technical scheme:
Also comprise the 4th monitoring module, described the 4th monitoring module judges whether network state is unobstructed: if unobstructed, then send control signal, be used for newly-generated video file is uploaded to client from the collector base station; If obstructed, then do not send control signal.
In the optimized technical scheme,
The capacity of described memory module is the capacity that presets of the time period length setting before taking place according to the needed alarm of client.
The beneficial effect that the present invention is compared with the prior art is:
The situation of the video file that kinescope method of the present invention generated before and after not only can display alarm, and capacity is less, can be in that to upload the back that finishes deleted, thereby can save the memory space of bottom collector, and be fit to upload obvious conserve transmission bandwidth by network.In addition, under the situation that network interrupts, the bottom collector can be preserved the on-the-spot realtime graphic of a period of time, after network recovery is normal, video file is uploaded to client upper strata monitoring software again.The video file that generates and alarm constantly and alarm identifier bind, more conveniently search and analyze.
Description of drawings
Fig. 1 is the flow chart of the specific embodiment of the invention;
Fig. 2 is that the view data of the specific embodiment of the invention is preserved schematic diagram by formation;
Fig. 3 is that the video file content of the specific embodiment of the invention is formed schematic diagram.
Embodiment
Below in conjunction with embodiment and contrast accompanying drawing the present invention is described in further details.
This embodiment is used for base station dynamic environment safety protection field, and the flow process of its kinescope method as shown in Figure 1.The bottom collector is monitored, is recorded a video the scene in real time and preserves view data.In the internal memory of bottom collector, open up the buffer memory of a fixed size, will collect image data storage in real time in buffer memory.This buffer memory adopts queue mechanism to preserve view data.
As shown in Figure 2, the schematic diagram of preserving by formation for view data.Wherein, V1, V2, V3, V4, V5, V6, V7 represent the view data of in chronological sequence storing, and V1 represents the oldest view data, and V7 represents up-to-date view data.After being filled with between queue empty, the view data V1 that is positioned at the formation head is eliminated dequeue, then time old view data V2 transfers to the formation head from the formation middle part, and newer then view data V6 is stored in the formation afterbody, and up-to-date view data V7 then waits for and enters formation.Preferably, preceding time period length takes place according to the needed alarm of client and sets in the size of this buffer memory.Video time segment length before the alarm that the client needs takes place is long more, and this buffer memory is big more.
Bottom collector monitoring has judged whether alarm signal.If there is not alarm signal, then continue monitoring, video recording and preserve view data, guarantee that the oldest view data in the buffer memory is cleared out of formation, inferior old view data moves to the formation head from the formation middle part, and the latest image storage is at the formation afterbody; If alarm signal is arranged, the view data that then will alarm earlier in the constantly preceding formation is saved in the newly-generated video file, will alarm the view data of gathering moment back then and continue in the described newly-generated video file.After alarm signal finished or reaches the recording time upper limit of client's setting, the bottom collector stopped video recording.At this moment, comprise alarm moment video file for the previous period takes place, just generated.
In this embodiment, alarm is constantly for after view data V7 is saved to buffer memory.As shown in Figure 3, form schematic diagram for corresponding video file content.Video file comprises V2, V3, V4, V5, V6, V7 ... Vn, wherein, V2, V3, V4, V5, V6, V7 view data come from the constantly preceding formation of alarm, and the view data after the V7 comes from real-time collection.
The content of video file is made of two parts, comprised the situation before and after the alarm, and video file has only write down the video of a period of time before and after the alarm, so file size is less, can upload finish the back deleted, thereby can save the memory space of bottom collector, and be fit to upload, obviously conserve transmission bandwidth by network.
After the alarm video file generated, the bottom collector continued monitoring and judges whether network state is unobstructed.If network is unobstructed, the video file that then will alarm the back generation uploads to client; If network is obstructed, then continue monitoring and judge network state, up to network recovery, video file is uploaded to client.Therefore, under the situation that network interrupts, the bottom collector can be preserved the on-the-spot realtime graphic of a period of time, after network recovery is normal, video file is uploaded to client upper strata monitoring software again.
Video file adds that according to the time that alarm takes place alarm identifier names, the video file of generation and alarm constantly and the alarm identifier binding, energy is more convenient to be searched and analyzes.
A kind of bottom collector that is used to record a video comprises video recording control module, picture recording module, memory module, first monitoring module, second monitoring module, the 3rd monitoring module and the 4th monitoring module.
Video recording control module control picture recording module is recorded a video in real time to bottom collector environment of living in.
First monitoring module judges whether collector environment of living in bottom has alarm signal: if alarm signal is arranged then send storage control signal and give memory module, if do not have alarm signal then do not send signal.
Memory module receives the video recording data of picture recording module and preserves by formation, makes the oldest view data clear out of formation, and inferior old view data moves to the formation head from the formation middle part, and the latest image storage is at the formation afterbody; Open up newly-generated video file memory block after receiving the storage control signal of first monitoring module output simultaneously, the video recording data of current queue are saved in the newly-generated video file memory block.The capacity of memory module is the capacity that presets of the time period length setting before taking place according to the needed alarm of client.
Second monitoring module receives the alarm signal of first monitoring module, judge whether alarm signal finishes: output video recording end signal is to the control module of recording a video, if alarm signal does not finish then exports first transition signal to the, three monitoring modules if alarm signal finishes.
The 3rd monitoring module receives first transition signal, judge whether alarm back recording time reaches the recording time upper limit that the client sets: if reach then export the end signal of recording a video, if do not reach then export second transition signal to the second monitoring module to the control module of recording a video; Second monitoring module continues to judge whether alarm signal finishes after receiving second transition signal, and the control picture recording module finished video recording after the video recording control module received the video recording received signal.
The 4th monitoring module, the 4th monitoring module judge whether network state is unobstructed: if unobstructed, then send control signal, be used for newly-generated video file is uploaded to client from the collector base station; If obstructed, then do not send control signal.
Adopt the content of the video file that collector video recording in bottom obtains in the present embodiment to constitute by two parts, comprised the situation before and after the alarm, and video file has only write down the video of a period of time before and after the alarm, so file size is less, can upload finish the back deleted, thereby can save the memory space of bottom collector, and be fit to upload, obviously conserve transmission bandwidth by network.
Above content be in conjunction with concrete preferred implementation to further describing that the present invention did, can not assert that concrete enforcement of the present invention is confined to these explanations.For the general technical staff of the technical field of the invention, make some substituting or obvious modification without departing from the inventive concept of the premise, and performance or purposes are identical, all should be considered as belonging to protection scope of the present invention.