Video data storage method and video monitoring apparatus
Technical field
The present invention relates to video data processing technology field, particularly to a kind of video data storage method and regard
Frequently supervising device.
Background technology
In environmental sanitation, when wastewater treatment vehicle carries out sewage disposal, in order to monitor the work of wastewater treatment vehicle
Situation, is typically provided opposite to video monitoring equipment at wastewater treatment vehicle, and this video monitoring equipment passes through photographic head
The working condition of wastewater treatment vehicle is carried out video acquisition, and follow-up work personnel can check the video collected
Data, to confirm whether wastewater treatment vehicle breaks down.
In prior art, during the video data that video monitoring equipment storage collects, it is to carry out reality according to the time
Time sequential storage, concrete, the video data that video monitoring equipment is collected by caching thread caches successively
In buffer memory device, meanwhile, the video data in buffer memory device is stored storage device by storage thread successively
In, say, that video monitoring equipment collects how many video datas, just stores how many video datas to depositing
Storage equipment.
There is following defect in the above-mentioned video data storage method of prior art:
1, staff searches the effective information (video counts before and after fault generation in the video data of storage
According to) time, need all video datas of traversal storage so that the efficiency searching effective information is the lowest, example
As, in 24, certain sky, wastewater treatment vehicle there occurs that primary fault, follow-up work personnel check sewage disposal
When whether car exists the video data before and after fault and fault generation, it is necessary to little in 24, this sky of storage
Time video data in make a look up, search efficiency is the lowest.
2, due to space and the restriction of cost, the video data storage that video monitoring equipment typically will collect
On hard disk or mini memory card, but hard disk or the limited storage space of storage card, and therefore can store regards
Frequency is according to limited, and the invalid information that above-mentioned video data storage method produces is more, thus wastes more
Memory space so that carrying cost is higher, and such as, wastewater treatment vehicle is in 24 hours of certain day, only
There occurs primary fault, but existing video data storage method is accomplished by storing the video of 24 hours
Data, waste more memory space.
Summary of the invention
The embodiment of the present invention provides a kind of video data storage method and video monitoring apparatus, existing in order to solve
The efficiency searching effective information in technology in the video data of storage is the lowest, and wastes more depositing
Storage space so that the problem that carrying cost is higher.
Embodiment of the present invention technical scheme is as follows:
The embodiment of the present invention provides a kind of video data storage method, including:
Being cached to successively in buffer memory device by the video data collected, wherein, described buffer memory device comprises respectively
Data block, the duration of the video data of each data-block cache is preset duration;
After receiving the fault alarm signal that monitored target device sends, determine that receiving described fault accuses
The data block at the video data place that the time point of alert signal is corresponding;
In the data block that will determine, the video data of caching stores in storage device.
As shown from the above technical solution, in the video data storage method that the embodiment of the present invention provides, no longer base
Store video data in the time, but fault based on target device trigger the storage of video data, then
The video data being stored in storage device is all the video data before and after fault occurs, and greatly reduces storage
Invalid information, therefore improve staff in the video data of storage, search the efficiency of effective information,
Additionally, also save the memory space that storage device is more, reduce carrying cost.
Preferably, when the video data collected is cached in buffer memory device successively, also include:
Record current video file control information, described current video file control information comprises current cache
The mark of the data block at video data place;
Determine the data block receiving video data place corresponding to the time point of described fault alarm signal, tool
Body includes:
Obtain the current video file control information of record;
By the data block corresponding to the mark of the data block comprised in described current video file control information, really
Think and receive the data block at video data place corresponding to the time point of described fault alarm signal.
By the scheme of the present embodiment, by record current video file control information, it is possible to quickly, accurately
The data block at the video data place finding current cache, thus improve the effect of storage video data
Rate.
Preferably, described current video file control information also includes the video data place of current cache
The video initial time dot information that data block is corresponding;
In the data block that will determine, the video data of caching stores in storage device, specifically includes:
Judge that the time point receiving described fault alarm signal comprises in current video file control information
Time point corresponding to video initial time dot information between time interval whether more than the time set between
Every threshold value;
If judging more than the time interval threshold value set, then by the data block determined and next data
In block, the video data of caching stores in storage device;
If judging the time interval threshold value no more than set, then by the data block determined and a upper number
Store in storage device according to the video data of caching in block.
By the scheme of the present embodiment, owing to the video data in the time period that target device breaks down may
It is buffered in two data blocks, therefore when storing video data, not only by regarding of caching in current data block
The video data of caching in upper one (or next) data block, according to storing, is also stored by frequency,
Thus ensure that the integrity of the video data of storage.
Preferably, after described current video file control information also including the preposition storage mark of video and video
Put storage mark;
The video data of caching in the data block determined and next data block is stored storage device
Before in, also include:
Check the video rearmounted storage mark set the most comprised in described current video file control information,
If non-set, then by rearmounted for described video storage mark set, and go to described by the data block determined with
And the video data of caching stores the step in storage device in next one data block;
The video data of caching in the data block determined and a upper data block is stored storage device
Before in, also include:
Check the video preposition storage mark set the most comprised in described current video file control information,
If non-set, then by preposition for described video storage mark set, and go to described by the data block determined with
And the video data of caching stores the step in storage device in a upper data block.
By the scheme of the present embodiment, the video data cached at current data block due to target device is corresponding
Time period in it may happen that repeatedly fault, therefore rearmounted by arranging the preposition storage mark of video and video
Storage mark comes, it is possible to is effectively prevented from video data and repeats the situation of storage, saves depositing of storage device
Storage space.
Preferably, described method also includes:
When updating current video file control information, the current video file control information before updating wraps
The value of the rearmounted storage mark of video contained be assigned to update after current video file control information in comprise regard
The most preposition storage mark.
By the scheme of the present embodiment, when updating current video file control information, current before updating
The value of the rearmounted storage mark of video comprised in video file control information is assigned to the current video literary composition after updating
The preposition storage mark of video comprised in part control information, it is possible to avoid video data to repeat the situation of storage,
Save the memory space of storage device further.
Preferably, the described fault alarm signal received comprises fault type information and fault rank letter
Breath;
When in the data block that will determine, the video data of caching stores in storage device, also include:
According to the fault alarm signal received, video data is set up in the operation for this storage video data
Search index record, video data search index record includes the time point receiving described fault alarm signal
The video data of information, fault type information, fault class information and storage is corresponding regarding in storage device
The file identification of frequency file.
By the scheme of the present embodiment, set up video data search index record, it is possible to after being easy to staff
Continuous pass through stored video data and check the failure condition of target device.
Preferably, the video data of caching in the data block determined and next data block is stored deposit
Before in storage equipment, also include:
If the video rearmounted storage mark set comprised in described current video file control information, then basis
The fault alarm signal received sets up video data search index record, and the video data wherein set up is inquired about
In the video data search index record that the file identification of the video file in index record and last time set up
The file identification of video file consistent;
The video data of caching in the data block determined and a upper data block is stored storage device
Before in, also include:
If the video preposition storage mark set comprised in described current video file control information, then basis
The fault alarm signal received sets up video data search index record, and the video data wherein set up is inquired about
In the video data search index record that the file identification of the video file in index record and last time set up
The file identification of video file consistent.
By the scheme of the present embodiment, the video data cached at current data block due to target device is corresponding
Time period in it may happen that repeatedly fault, therefore in (or the rearmounted storage of video of the preposition storage mark of video
Mark) set time, although do not perform to store the operation of video data, but can be according to the fault that receives
Warning signal sets up video data search index record, consequently facilitating staff is follow-up checks target device institute
The concrete condition (such as fault type and fault rank etc.) of the fault occurred.
Preferably, the described fault alarm signal received comprises fault class information;
In the data block that will determine, the video data of caching stores in storage device, specifically includes:
In each memory area of storage device, search the fault rank letter comprised in described fault alarm signal
Memory area corresponding to breath;
In the data block that will determine, the video data of caching stores in the memory area found.
By the scheme of the present embodiment, the most corresponding memory area of each fault rank, at storage video
During data, carry out subregion storage according to fault rank, follow-up video data is carried out Classification Management.
The embodiment of the present invention also provides for a kind of video monitoring apparatus, including:
Video data acquiring equipment, is used for gathering video data;
Video data buffer memory device, for caching the video data that video data acquiring equipment collects successively
In buffer memory device, wherein, described buffer memory device comprises each data block, the video counts of each data-block cache
According to duration be preset duration;
Warning signal receives equipment, for receiving the fault alarm signal that the target device monitored sends;
Data block determines equipment, receives monitored target device transmission for receiving equipment in warning signal
Fault alarm signal after, determine and receive the video data institute that the time point of described fault alarm signal is corresponding
Data block;
Video data storage device, the video of caching in data block is determined the data block that equipment is determined
Data store in storage device.
As shown from the above technical solution, in the video monitoring apparatus that the embodiment of the present invention provides, video monitoring fills
Put and be no longer based on time storage video data, but fault based on target device triggers depositing of video data
Storage, then the video data being stored in storage device is all the video data before and after fault occurs, and significantly subtracts
Lack the invalid information of storage, therefore improve staff in the video data of storage, search effective information
Efficiency, additionally, also save the memory space that storage device is more, reduce carrying cost.
Preferably, described video monitoring apparatus also includes:
Control information-recording apparatus, be used for recording current video file control information, described current video file
Control information comprises the mark of the data block at the video data place of current cache;
Described data block determines equipment, specifically for obtaining the current video file control information of record, by institute
State the data block corresponding to the mark of the data block comprised in current video file control information, confirm as receiving
Data block to video data place corresponding to the time point of described fault alarm signal.
By the scheme of the present embodiment, by record current video file control information, it is possible to quickly, accurately
The data block at the video data place finding current cache, thus improve the effect of storage video data
Rate.
Preferably, described current video file control information also includes the video data place of current cache
The video initial time dot information that data block is corresponding;
Described video data storage device specifically includes:
Time interval judges subset, for judging that the time point receiving described fault alarm signal is with current
Between the time between the time point that the video initial time dot information that comprises in video file control information is corresponding
Every whether more than the time interval threshold value set;
In time interval, first video data storage subset, for judging that subset is judged more than setting
During time interval threshold value, cache in data block is determined the data block and next data block that equipment determines
Video data store in storage device;
Second video data storage subset, sets for judging subset to judge no more than in time interval
Time interval threshold value time, slow in data block is determined the data block and a upper data block that equipment determines
The video data deposited stores in storage device.
By the scheme of the present embodiment, owing to the video data in the time period that target device breaks down may
It is buffered in two data blocks, therefore when storing video data, not only by regarding of caching in current data block
The video data of caching in upper one (or next) data block, according to storing, is also stored by frequency,
Thus ensure that the integrity of the video data of storage.
Preferably, after described current video file control information also including the preposition storage mark of video and video
Put storage mark;
Described video monitoring apparatus also includes:
Rearmounted storage mark checks equipment, for data block being determined, equipment determines at video data storage device
Before in the data block gone out and next data block, the video data of caching stores in storage device, check
The video rearmounted storage mark set the most comprised in described current video file control information;
Rearmounted storage mark set equipment, for when the video non-set of rearmounted storage mark, by described video
Rearmounted storage mark set;
Described video data storage device, specifically for when the video non-set of rearmounted storage mark, by data
Block determines the video data storage of caching in the data block and next data block that equipment determines
In equipment;
Preposition storage mark checks equipment, for data block being determined, equipment determines at video data storage device
Before in the data block gone out and a upper data block, the video data of caching stores in storage device, check
The video preposition storage mark set the most comprised in described current video file control information;
Preposition storage mark set equipment, for when the video non-set of preposition storage mark, by described video
Preposition storage mark set;
Described video data storage device, specifically for when the video non-set of preposition storage mark, by data
Block determines the video data storage of caching in the data block and a upper data block that equipment determines
In equipment.
By the scheme of the present embodiment, the video data cached at current data block due to target device is corresponding
Time period in it may happen that repeatedly fault, therefore rearmounted by arranging the preposition storage mark of video and video
Storage mark comes, it is possible to is effectively prevented from video data and repeats the situation of storage, saves depositing of storage device
Storage space.
Preferably, described control information-recording apparatus, it is additionally operable to when updating current video file control information,
The value of the rearmounted storage mark of video comprised in the current video file control information before updating is assigned to update
After current video file control information in the preposition storage mark of video that comprises.
By the scheme of the present embodiment, when updating current video file control information, current before updating
The value of the rearmounted storage mark of video comprised in video file control information is assigned to the current video literary composition after updating
The preposition storage mark of video comprised in part control information, it is possible to avoid video data to repeat the situation of storage,
Save the memory space of storage device further.
Preferably, described warning signal comprises failure classes in receiving the described fault alarm signal that equipment receives
Type information and fault class information;
Described video monitoring apparatus also includes:
Index record sets up equipment, for receiving, according to warning signal, the fault alarm signal that equipment receives,
Video data search index record is set up in operation for video data storage device this time storage video data,
Video data search index record includes receiving the time point information of described fault alarm signal, fault type
The files-designated of the video file that the video data of information, fault class information and storage is corresponding in storage device
Know.
By the scheme of the present embodiment, set up video data search index record, it is possible to after being easy to staff
Continuous pass through stored video data and check the failure condition of target device.
Preferably, described index record sets up equipment, is additionally operable to:
At video data storage device, data block determined the data block and next data that equipment determines
Before in block, the video data of caching stores in storage device, if in described current video file control information
The video rearmounted storage mark set comprised, then receive, according to warning signal, the fault warning that equipment receives
Signal sets up video data search index record, the video in the video data search index record wherein set up
The file of the video file in the video data search index record that the file identification of file and last time set up
Mark is consistent, and
Video data storage device data block determined data block that equipment determines and on data
Before in block, the video data of caching stores in storage device, if in described current video file control information
The video preposition storage mark set comprised, then receive, according to warning signal, the fault warning that equipment receives
Signal sets up video data search index record, the video in the video data search index record wherein set up
The file of the video file in the video data search index record that the file identification of file and last time set up
Mark is consistent.
By the scheme of the present embodiment, the video data cached at current data block due to target device is corresponding
Time period in it may happen that repeatedly fault, therefore in (or the rearmounted storage of video of the preposition storage mark of video
Mark) set time, although do not perform store video data operation, but video monitoring apparatus is according to connecing
The fault alarm signal received sets up video data search index record, checks consequently facilitating staff is follow-up
The concrete condition (such as fault type and fault rank etc.) of the fault that target device is occurred.
Preferably, described warning signal comprises failure level in receiving the described fault alarm signal that equipment receives
Other information;
Described video data storage device, specifically in each memory area of storage device, searches described
By data block, the memory area corresponding to fault class information comprised in fault alarm signal, determines that equipment is true
In the data block made, the video data of caching stores in the memory area found.
By the scheme of the present embodiment, the most corresponding memory area of each fault rank, at storage video
During data, carry out subregion storage according to fault rank, follow-up video data is carried out Classification Management.
Accompanying drawing explanation
Fig. 1 is in the embodiment of the present invention one, video data storage method schematic flow sheet;
Fig. 2 is in the embodiment of the present invention one, the schematic diagram of the data block in buffer memory device;
Fig. 3 is in the embodiment of the present invention one, and video data sequential loop is cached to each data block by caching thread
Schematic diagram;
Fig. 4 is in the embodiment of the present invention one, the schematic diagram of the video file of storage in storage device;
Fig. 5 is in the embodiment of the present invention two, video monitoring apparatus structural representation.
Detailed description of the invention
Below in conjunction with each accompanying drawing, the main of embodiment of the present invention technical scheme is realized principle, specific embodiment party
Formula and the beneficial effect that should be able to reach is set forth in.
Embodiment one
As it is shown in figure 1, be the video data storage method flow chart in the embodiment of the present invention one, it is specifically located
Reason flow process is as follows:
Step 11, is cached in buffer memory device successively by the video data collected, and wherein, described caching sets
For comprising each data block, the duration of the video data of each data-block cache is preset duration.
For convenience, the executive agent of the video data storage method in the embodiment of the present invention one is referred to as
Video monitoring apparatus.Video monitoring apparatus can be arranged in video monitoring equipment, it is also possible to is separately provided.
In order to ensure the effectiveness that video data stores, the embodiment of the present invention one proposes, and video monitoring apparatus can
Carry out Segment-based caching with the video data that will collect, pre-set the duration of every section of video data, then will
The buffer zone of buffer memory device is divided into each data block, and one section of video data of each data-block cache is the most each
The duration of the video data of data-block cache is the above-mentioned duration (being properly termed as preset duration) pre-set.
Such as, above-mentioned preset duration is 15 minutes, as in figure 2 it is shown, drawn the buffer zone of buffer memory device
It is divided into N number of data block, the duration of the video data of each data-block cache to be 15 minutes.
When video monitoring apparatus is started working, starting caching thread, caching thread is by video monitoring apparatus collection
To video data be cached to successively in buffer memory device.Wherein, caching thread is with N number of data block as circulating cycle
Phase, the video data sequential loop collected by video monitoring apparatus is cached in each data block, concrete,
As it is shown on figure 3, the caching first paragraph video data that first collected by video monitoring apparatus of thread is cached to the
In 1 data block, the collect the 2nd section of video data is cached in the 2nd data block ..., depend on
Secondary analogize, the N+1 section video data collected is cached in the 1st data block, covers the 1st section and regard
Frequency evidence.Wherein, the duration of every section of video data that video monitoring apparatus collects is preset duration.
Step 12, after receiving the fault alarm signal that monitored target device sends, determines and receives institute
State the data block at video data place corresponding to the time point of fault alarm signal.
When the target device (such as wastewater treatment vehicle) that video monitoring apparatus is monitored breaks down, this mesh
Marking device can send fault alarm signal to video monitoring apparatus, to indicate video monitoring apparatus to carry out video counts
According to storage.Video monitoring apparatus can be using the time point receiving fault alarm signal as the mesh monitored
The time point that marking device breaks down.
In prior art, when video monitoring apparatus is started working, start caching thread and storage thread, caching
Video data is cached in buffer memory device by thread successively, and meanwhile, storage thread is by the video in buffer memory device
Data store in storage device successively.And the embodiment of the present invention one proposes, video monitoring apparatus is started working
Time, starting caching thread, do not start storage thread, storage thread is to be triggered by fault alarm signal to open
Move, after video monitoring apparatus receives the fault alarm signal that monitored target device sends, confirm
Target device now there occurs fault, and therefore video monitoring apparatus starts storage thread, performs storage video counts
According to flow process, i.e. the storage of video data is to be triggered by the fault of target device.
In the embodiment of the present invention one, when video data is cached in buffer memory device by video monitoring apparatus successively,
Current video file control information can be recorded, wherein, the current video file control information of record comprises
The mark of the data block at the video data place of current cache, such as, video monitoring apparatus will gather the 1st
When section video data is cached in the 1st data block, the data block at the video data place of current cache is
1st data block, just comprises the mark of the 1st data block in current video file control information.
After video monitoring apparatus receives fault alarm signal, starting storage thread, storage thread first obtains works as
Front video file controls information, the mark institute of data block that then will comprise in current video file control information
Corresponding data block, confirms as receiving the video data place that the time point of described fault alarm signal is corresponding
Data block.Such as, current video file control information comprises the mark of data block 1, therefore can be true
Think that the data block receiving video data place corresponding to the time point of fault alarm signal is data block 1.
Wherein, the data block at video data place corresponding to the time point of described fault alarm signal is received also
It is properly termed as current data block, in the following description, all represents the data determined with current data block
The data block at the video data place of block, i.e. current cache.
Step 13, in the data block that will determine, the video data of caching stores in storage device.
In the embodiment of the present invention one, video monitoring apparatus can also be further at current video file control information
The video initial time dot information that middle record current data block is corresponding, such as, video monitoring apparatus is by collection
When 1st section of video data is cached in the 1st data block, current data block is the 1st data block, the 1st
Video start time point corresponding to individual data block is the start time point of the 1st section of video.
Video data in the time period that target device breaks down may be buffered in a data block, now
In the data block that video monitoring apparatus will be determined, the video data of caching stores in storage device.
Additionally, the video data in time period of breaking down of target device is likely to be buffered in two data blocks
In, in order to ensure the integrity of the video data of storage, the embodiment of the present invention one proposes, at storage video counts
According to time, can first judge to receive time point and the current video file control information of described fault alarm signal
In time interval between time point corresponding to the video initial time dot information that comprises whether more than setting
Time interval threshold value, if judging more than the time interval threshold value set, then to show that target device breaks down
Time period in video data may be buffered in current data block and next data block, therefore ought
In front data block and next data block, the video data of caching stores in storage device, if judging not
More than the time interval threshold value set, then show that the video data in the time period that target device breaks down can
Can be buffered in current data block and a upper data block, therefore by current data block and upper data
In block, the video data of caching stores in storage device.
Such as, the video data of each data-block cache time a length of 15 minutes, the time interval threshold of setting
Value is 7 minutes, say, that if the time point receiving fault alarm signal is delayed at current data block
In first 7 minutes of the time period that the video data deposited is corresponding, then storage current data block and a upper data block
Interior video data, receives the video data that the time point of fault alarm signal is cached at current data block
In latter 8 minutes of corresponding time period, then storage current data block and the video data in next data block.
During above-mentioned storage video data, the video data that target device is cached at current data block
It may happen that repeatedly fault in the corresponding time period, in order to avoid video data repeats the situation of storage, joint
Saving the memory space of storage device, the embodiment of the present invention one proposes, and video monitoring apparatus can also exist further
Current video file control information records the preposition storage mark of video and the rearmounted storage mark of video, now when
It is as shown in table 1 that front video file controls information:
Table 1
The video initial time dot information that current data block is corresponding |
The mark of current data block |
…… |
The preposition storage mark of video |
The rearmounted storage mark of video |
If video monitoring apparatus judges the time point receiving fault alarm signal and current video file control
Time interval between the time point that the video initial time dot information that comprises in information processed is corresponding is more than setting
Time interval threshold value, the most first check the rearmounted storage mark of the video comprised in current video file control information
Set the most, if non-set (value of storage mark is 0), then shows the frequency that current data block is cached
There is not fault according in the corresponding time period, therefore can perform current data block and next number
Store the step in storage device according to the video data of caching in block, and rearmounted for video storage mark is put
Position, if set (value of storage mark is 1), then shows at the video data pair that current data block is cached
Fault was had occurred and that, say, that video monitoring apparatus has indicated storage thread in the time period answered
The operation of the video data cached in performing storage current data block and next data block, the most now may be used
No longer to perform to store the operation of video data.Such as, the time point of fault alarm signal is received currently
In latter 8 minutes of the time period that video data that data block is cached is corresponding, if the rearmounted storage mark of video is not
Set, then storage current data block and the video data in next data block, if the rearmounted storage mark of video
Set, does not the most perform to store the operation of video data.Such as, the time point of fault alarm signal is received
In latter 8 minutes of the time period that the video data that cached at current data block is corresponding, if the rearmounted storage of video
The non-set of mark, then storage current data block and the video data in next data block, deposit if video is rearmounted
Storage mark set, does not the most perform to store the operation of video data.
If video monitoring apparatus judges the time point receiving fault alarm signal and current video file control
Time interval between the time point that the video initial time dot information that comprises in information processed is corresponding no more than sets
Fixed time interval threshold value, the most first checks the video comprised in current video file control information preposition storage mark
Will set the most, if non-set, then shows the time that the video data that cached at current data block is corresponding
There is not fault in Duan, therefore can perform caching in current data block and a upper data block
Video data stores the step in storage device, and by preposition for video storage mark set, if set,
Fault was had occurred and that, the most just in then showing the time period that the video data cached at current data block is corresponding
Being to say, video monitoring apparatus has indicated storage thread and has performed storage current data block and upper data
The operation of the video data of caching in block, the most now can no longer perform to store the operation of video data.Example
As, receive the time that video data that the time point of fault alarm signal cached at current data block is corresponding
In first 7 minutes of section, if the non-set of the preposition storage mark of video, then storage current data block and a upper number
According to the video data in block, if video preposition storage mark set, the most do not perform to store the behaviour of video data
Make.
The embodiment of the present invention one proposes, if current data block changes, then and current video file control information
Needs are updated, wherein, update current video file control information time, can by update before current
The value of the rearmounted storage mark of video comprised in video file control information is assigned to the current video literary composition after updating
The preposition storage mark of video comprised in part control information such that it is able to avoid video data to repeat the feelings of storage
Condition, saves the memory space of storage device further.Such as, the 1st section gathered is regarded by video monitoring apparatus
Frequency is according to when being cached in the 1st data block, and current data block is the 1st data block, at the 1st section of video
Latter 8 minutes in, target device there occurs fault, therefore video monitoring apparatus store the 1st data block and
The video data of caching in 2nd data block, and by rearmounted for video storage mark set (storage mark
Value is 1), when the 2nd section of video data gathered is cached in the 2nd data block by video monitoring apparatus,
Current data block is the 2nd data block, and current video file control information needs to be updated, now, and can
With replicate update before current video file control information in the rearmounted storage mark of video value to renewal after
Current video file control information in the preposition storage mark of video, say, that work as forward sight after renewal
In frequency file control information, the value of the preposition storage mark of video is 1, then target device was sent out at first 7 minutes
During raw fault, due to video monitoring apparatus indicated storage thread perform the 1st data block of storage and
The operation of the video data of caching in 2nd data block, the most now without performing to store video data again
Operation such that it is able to avoid video data to repeat the situation of storage, the storage saving storage device further is empty
Between.
The fault alarm signal that video monitoring apparatus receives can comprise fault type information and failure level
Other information, checks the fault feelings of target device for the ease of staff subsequently through the video data stored
Condition, the embodiment of the present invention one proposes, when being stored in storage device by video data, it is also possible to according to reception
The fault alarm signal arrived, video data search index note is set up in the operation for this storage video data
Record, video data search index record includes that the time point information receiving fault alarm signal (i.e. occurs event
The time point information of barrier), fault type information, the video data of fault class information and storage set in storage
The file identification of the video file of standby middle correspondence.
Wherein, video data search index record can be as shown in table 2.
Table 2
When video data in buffer memory device is stored in storage device by video monitoring apparatus, can be with video
The form of file stores, wherein, and the video counts in each video file correspondence defined amount data block
According to, such as, as shown in Figure 4, in each data block the video data of caching time a length of 15 minutes, then
The duration of each video file can be 30 minutes, and the most each video file can be in corresponding 2 data blocks
Video data.
Wherein, fault rank is that the order of severity according to fault carries out classification, such as, and serious by fault
Degree, is divided into Three Estate by all of fault, and the respectively the 1st rank, the 2nd rank and 3rd level are other,
The fault of the 1st rank the most serious, next to that the 2nd rank, is that 3rd level is other again.The embodiment of the present invention
One proposes, in storage device, and the most corresponding memory area of each fault rank, video monitoring apparatus
When being stored in storage device by video data, first in each memory area of storage device, lookup receives
Fault alarm signal in the memory area corresponding to fault class information that comprises, the most again by video data
Store in the memory area found.Such as, the rank of the fault that target device occurs is the 1st rank,
Therefore target device comprises fault rank in the fault alarm signal that video monitoring apparatus sends is the 1st rank
Information, when video data is stored in storage device by video monitoring apparatus, first respectively depositing in storage device
In storage area territory, search the memory area corresponding to the 1st rank, video data is stored find the most again
Memory area in.
Additionally, for memory area insufficient space situation, the corresponding different treatment measures of different fault ranks,
Such as, the treatment measures that the 1st rank is corresponding are: when memory area insufficient space, periodically send report
Alert prompting, to point out staff to process;The treatment measures that 3rd level is not corresponding are: work as memory area
During insufficient space, cover the video data stored;Treatment measures corresponding to the 2nd rank can be with the 1st grade
Not corresponding treatment measures are identical, it is also possible to the treatment measures the most corresponding with 3rd level are identical.
During above-mentioned storage video data, the video data that target device is cached at current data block
It may happen that repeatedly fault in the corresponding time period, although by arranging the preposition storage mark of video and video
Rearmounted storage mark, it is possible to avoid video data to repeat the situation of storage, but the event of repeatedly fault occurred
Barrier type or fault rank may be different, for the ease of the follow-up event checking that target device is occurred of staff
The concrete condition (such as fault type and fault rank etc.) of barrier, the embodiment of the present invention one proposes, if video
Supervising device is judged to wrap in the time point receiving fault alarm signal and current video file control information
Time interval between the time point that the video initial time dot information that contains is corresponding is more than the time interval set
Threshold value, the most first checks that the rearmounted storage mark of the video comprised in current video file control information is put the most
Position, if set, then video monitoring apparatus sets up video data inquiry according to the fault alarm signal received
Index record, wherein, the file identification of the video file in the video data search index record of foundation is with upper
The file identification of the video file in the video data search index record once set up is consistent;If video monitoring
Device is judged to receive and is comprised in the time point of fault alarm signal and current video file control information
Time interval between the time point that video initial time dot information is corresponding is not more than the time interval threshold set
Value, the most first checks the video comprised in current video file control information preposition storage mark set the most,
If set, then video monitoring apparatus sets up video data search index according to the fault alarm signal received
Record, wherein, the file identification of the video file in the video data search index record of foundation is with last
The file identification of the video file in the video data search index record set up is consistent.
It is to say, a video file of storage device storage may comprise the video counts of multiple fault
According to, in video data search index record, the file identification of video file and fault type information and event
Barrier class information can be the relation of one-to-many, as shown in table 3.
Table 3
Embodiment two
Corresponding with the video data storage method that the embodiment of the present invention one proposes, the embodiment of the present invention two proposes one
Planting video monitoring apparatus, its structure is as it is shown in figure 5, include:
Video data acquiring equipment 51, is used for gathering video data;
Video data buffer memory device 52, for depending on the video data that video data acquiring equipment 51 collects
Secondary being cached in buffer memory device, wherein, described buffer memory device comprises each data block, each data-block cache
The duration of video data is preset duration;
Warning signal receives equipment 53, for receiving the fault alarm signal that the target device monitored sends;
Data block determines equipment 54, sets for receiving monitored target at warning signal reception equipment 53
After the fault alarm signal that preparation is sent, determine and receive the video that the time point of described fault alarm signal is corresponding
The data block at data place;
Video data storage device 55, caches in data block determines the data block that equipment 54 is determined
Video data store in storage device.
Preferably, described video monitoring apparatus also includes:
Control information-recording apparatus, be used for recording current video file control information, described current video file
Control information comprises the mark of the data block at the video data place of current cache;
Described data block determines equipment 54, specifically for obtaining the current video file control information of record, and will
The data block corresponding to mark of the data block comprised in described current video file control information, confirms as connecing
Receive the data block at video data place corresponding to the time point of described fault alarm signal.
Preferably, described current video file control information also includes the video data place of current cache
The video initial time dot information that data block is corresponding;
Described video data storage device 55 specifically includes:
Time interval judges subset, for judging that the time point receiving described fault alarm signal is with current
Between the time between the time point that the video initial time dot information that comprises in video file control information is corresponding
Every whether more than the time interval threshold value set;
In time interval, first video data storage subset, for judging that subset is judged more than setting
During time interval threshold value, cache in data block is determined the data block and next data block that equipment determines
Video data store in storage device;
Second video data storage subset, sets for judging subset to judge no more than in time interval
Time interval threshold value time, slow in data block is determined the data block and a upper data block that equipment determines
The video data deposited stores in storage device.
Preferably, after described current video file control information also including the preposition storage mark of video and video
Put storage mark;
Described video monitoring apparatus also includes:
Rearmounted storage mark checks equipment, for data block being determined equipment at video data storage device 55
In 54 data blocks determined and next data block, the video data of caching stores in storage device it
Before, check the video rearmounted storage mark set the most comprised in described current video file control information;
Rearmounted storage mark set equipment, for when the video non-set of rearmounted storage mark, by described video
Rearmounted storage mark set;
Described video data storage device 55, specifically for when the video non-set of rearmounted storage mark, by number
Determine that the video data of caching stores in the data block and next data block that equipment determines according to block
In storage equipment;
Preposition storage mark checks equipment, for data block being determined equipment at video data storage device 55
In 54 data blocks determined and a upper data block, the video data of caching stores in storage device it
Before, check the video preposition storage mark set the most comprised in described current video file control information;
Preposition storage mark set equipment, for when the video non-set of preposition storage mark, by described video
Preposition storage mark set;
Described video data storage device 55, specifically for when the video non-set of preposition storage mark, by number
Determine that the video data of caching stores in the data block and a upper data block that equipment determines according to block
In storage equipment.
Preferably, described control information-recording apparatus, it is additionally operable to when updating current video file control information,
The value of the rearmounted storage mark of video comprised in the current video file control information before updating is assigned to update
After current video file control information in the preposition storage mark of video that comprises.
Preferably, described warning signal comprises event in receiving the described fault alarm signal that equipment 53 receives
Barrier type information and fault class information;
Described video monitoring apparatus also includes:
Index record sets up equipment, for receiving, according to warning signal, the fault warning letter that equipment 53 receives
Number, video data inquiry rope is set up in the operation for video data storage device 55 this time storage video data
Draw record, video data search index record include receiving described fault alarm signal time point information,
The video file that the video data of fault type information, fault class information and storage is corresponding in storage device
File identification.
Preferably, described index record sets up equipment, is additionally operable to:
At video data storage device 55, data block determined the data block and the next one that equipment 54 determines
Before in data block, the video data of caching stores in storage device, if described current video document control letter
The video rearmounted storage mark set comprised in breath, then receive what equipment 53 received according to warning signal
Fault alarm signal sets up video data search index record, the video data search index record wherein set up
In the file identification of video file and the video literary composition in the last video data search index record set up
The file identification of part is consistent, and
Video data storage device 55 data block determined data block that equipment 54 determines and on one
Before in data block, the video data of caching stores in storage device, if described current video document control letter
The video preposition storage mark set comprised in breath, then receive what equipment 53 received according to warning signal
Fault alarm signal sets up video data search index record, the video data search index record wherein set up
In the file identification of video file and the video literary composition in the last video data search index record set up
The file identification of part is consistent.
Preferably, described warning signal comprises event in receiving the described fault alarm signal that equipment 53 receives
Barrier class information;
Described video data storage device 55, specifically in each memory area of storage device, searches institute
State the memory area corresponding to fault class information comprised in fault alarm signal, data block is determined equipment
In 54 data blocks determined, the video data of caching stores in the memory area found.
In the embodiment of the present invention two, video monitoring apparatus can be arranged in video monitoring equipment, it is also possible to single
Solely arrange.
One of ordinary skill in the art will appreciate that and realize all or part of step that above-described embodiment method is carried
Suddenly the program that can be by completes to instruct relevant hardware, and described program can be stored in a kind of computer
In readable storage medium storing program for executing, this program upon execution, including one or a combination set of the step of embodiment of the method.
It addition, each functional unit in each embodiment of the present invention can be integrated in a processing module,
Can also be that unit is individually physically present, it is also possible to two or more unit are integrated in a module
In.Above-mentioned integrated module both can realize to use the form of hardware, it would however also be possible to employ software function module
Form realizes.If described integrated module realizes and as independent product using the form of software function module
When selling or use, it is also possible to be stored in a computer read/write memory medium.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or meter
Calculation machine program product.Therefore, the present invention can use complete hardware embodiment, complete software implementation or knot
The form of the embodiment in terms of conjunction software and hardware.And, the present invention can use and wherein wrap one or more
Computer-usable storage medium containing computer usable program code (include but not limited to disk memory and
Optical memory etc.) form of the upper computer program implemented.
The present invention is with reference to method, equipment (system) and computer program product according to embodiments of the present invention
The flow chart of product and/or block diagram describe.It should be understood that can by computer program instructions flowchart and
/ or block diagram in each flow process and/or flow process in square frame and flow chart and/or block diagram and/
Or the combination of square frame.These computer program instructions can be provided to general purpose computer, special-purpose computer, embedding
The processor of formula datatron or other programmable data processing device is to produce a machine so that by calculating
The instruction that the processor of machine or other programmable data processing device performs produces for realizing at flow chart one
The device of the function specified in individual flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and computer or the process of other programmable datas can be guided to set
In the standby computer-readable memory worked in a specific way so that be stored in this computer-readable memory
Instruction produce and include the manufacture of command device, this command device realizes in one flow process or multiple of flow chart
The function specified in flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, makes
Sequence of operations step must be performed to produce computer implemented place on computer or other programmable devices
Reason, thus the instruction performed on computer or other programmable devices provides for realizing flow chart one
The step of the function specified in flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
Obviously, those skilled in the art can carry out various change and modification to the embodiment of the present invention and not take off
From the spirit and scope of the present invention.So, if these amendments of the present invention and modification belong to right of the present invention
Require and within the scope of equivalent technologies, then the present invention is also intended to comprise these change and modification.