CN103824574A - Video data storage method and system capable of supporting code stream switching - Google Patents

Video data storage method and system capable of supporting code stream switching Download PDF

Info

Publication number
CN103824574A
CN103824574A CN201410065673.5A CN201410065673A CN103824574A CN 103824574 A CN103824574 A CN 103824574A CN 201410065673 A CN201410065673 A CN 201410065673A CN 103824574 A CN103824574 A CN 103824574A
Authority
CN
China
Prior art keywords
code stream
store tasks
video
storage
execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410065673.5A
Other languages
Chinese (zh)
Other versions
CN103824574B (en
Inventor
汪勇
徐亮
顾文锦
林昶荣
梁子正
田西泽
谈其扬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Sunwin Intelligent Co Ltd
Original Assignee
Shenzhen Sunwin Intelligent Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Sunwin Intelligent Co Ltd filed Critical Shenzhen Sunwin Intelligent Co Ltd
Priority to CN201410065673.5A priority Critical patent/CN103824574B/en
Publication of CN103824574A publication Critical patent/CN103824574A/en
Application granted granted Critical
Publication of CN103824574B publication Critical patent/CN103824574B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)

Abstract

The invention discloses a video data storage method and system capable of supporting code stream switching. The method comprises the steps that after a trigger video instruction is received, whether an execution storage task exists or not is judged, when it is judged that the execution storage task exists, whether a first storage code stream of a new storage task corresponding to a newly received video task trigger instruction is higher than a second storage code stream of the execution storage task or not is judged, if yes, the rest execution time is calculated according to the executed time and video duration time in the execution storage task, and then a new storage task is executed after the video data in the next second in the execution storage task are received; if not, the rest execution time is calculated according to the executed time and video duration time of the execution storage task, then the execution storage task is continuously executed in the rest execution time, and the new storage task is executed at the next second after the execution storage task is completed. Through the video data storage method and system, high code streams and low code streams are flexibly switched in the video data storage process to achieve seamless splicing video storage.

Description

A kind of video data storage method and system thereof of supporting to switch code stream
Technical field
The present invention relates to video storage field, relate in particular to a kind of video data storage method and system thereof of supporting to switch code stream.
Background technology
In life, due to protection safety, the needs of management etc., often real-time video information to be recorded a video automatically and continuously, in automatic video recording, often can carry out video information storage time according to special requirement, the adjustment of image resolution ratio and frame per second etc., also need to adopt different image resolution ratios to store according to different safety grades, and the requirement of the storage play quality of video is also more and more higher, in order to guarantee best picture quality, also guarantee the flatness of image code stream conversion simultaneously, existing video code flow handoff technique is in handoff procedure, it is blunt not only in speed, to have, cannot seamlessly transit, also also imperfect in the picture quality of video, often there will be picture to be detained, therefore be necessary the problems referred to above to improve.
Summary of the invention
For solving the problems of the technologies described above, the invention provides a kind of can fine solution high code stream in video storage process and the flexible switching of low-bit video and realize seamless spliced video storage method and system thereof.
The technical scheme that the present invention adopts is:
Support to switch a video data storage method for code stream, be applied in the main frame of supervisory system, supervisory system comprises the main frame that obtains the camera head of video data and be connected with camera head communication, and described method comprises step:
S1: receiving video data, judge whether newly to receive the record task triggering command for carrying out store tasks simultaneously, if so, perform step S2; Wherein, described store tasks is for being stored to storage unit by the video data in the video recording duration and index data according to storage code stream;
S2: judged whether store tasks in execution, and whether the first storage code stream of new store tasks corresponding to the record task triggering command that judgement newly receives in the time being determined with store tasks in execution is higher than the second storage code stream of store tasks in carrying out, if, execution step S4, if not, execution step S3;
S3: according to carry out in store tasks the executed time and video recording the duration calculate residue the execution time, then continue residue the execution time complete execution in store tasks, and after completing next second carry out new store tasks;
S4: calculate and remain the execution time according to the executed time of store tasks in carrying out and video recording duration, then the new store tasks of execution after next second video data of store tasks in execution receives.
Wherein, also comprise step: when judging the middle store tasks and while not receiving record task triggering command of not executing the task, start the task of pre-recording, video data and corresponding index data are kept in annular cushion district.
Wherein, in described step S2 " judge whether store tasks in execution; if " also comprise step below: whether the priority that judges new store tasks is greater than task in execution, in the time that judgement is greater than, carry out described step S4, in the time that judgement is not more than, execution step " whether the first storage code stream of new store tasks corresponding to record task triggering command that judgement newly receives is higher than the second storage code stream of store tasks in carrying out " step in S2.
Wherein, the type of described record task triggering command comprises that the plan that priority improves successively triggers video recording instruction, manual triggers video recording instruction and condition triggering video recording instruction, and storage code stream corresponding to record task triggering command that priority is high is greater than storage code stream corresponding to record task triggering command that priority is low.
Wherein, when described record task triggering command triggers video recording when instruction for plan, store tasks is specifically for since video recording start-up time, by the video data in the video recording duration according to the storage of storage code stream;
When described record task triggering command is that condition triggers video recording when instruction, store tasks is specifically in the time meeting video recording trigger condition, by the video data in the video recording duration according to storing code stream storage;
In the time that described record task triggering command is manual triggers video recording instruction, store tasks is specifically in the time receiving manual triggers video recording instruction, directly by the video data in the video recording duration according to storing code stream storage.
Another technical solution used in the present invention is:
A kind of video data storage systems of supporting to switch code stream, run in the main frame of supervisory system, supervisory system comprises the main frame that obtains the camera head of video data and be connected with camera head communication, and the video data storage systems that code stream is switched in described support comprises:
Data receiver unit, for receiving video data, judge whether newly to receive the record task triggering command for carrying out store tasks, wherein, described store tasks is for being stored to storage unit by the video data in the video recording duration and index data according to storage code stream simultaneously;
Scheduling unit, for judging and newly receive after record task triggering command when described data receiver unit, judged whether store tasks in execution, and the first storage code stream of new store tasks corresponding to the record task triggering command that judgement newly receives in the time being determined with store tasks in execution is whether higher than the second storage code stream of store tasks in carrying out;
Performance element, for carrying out store tasks, comprising:
The first performance element, for in the time that code stream is stored in described scheduling unit judgement first not higher than the second storage code stream, calculate and remain the execution time according to the executed time of store tasks in carrying out and video recording duration, then continue residue the execution time complete execution in store tasks, and after completing next second carry out new store tasks; And
The second performance element, for in the time that code stream is stored in described scheduling unit judgement first higher than the second storage code stream, calculate and remain the execution time according to the executed time of store tasks in carrying out and video recording duration, then the new store tasks of execution after next second video data of store tasks in execution receives.
Wherein, described performance element also comprises the module of pre-recording, for judge do not execute the task middle store tasks and while not receiving record task triggering command of performance element when described scheduling unit, the startup task of pre-recording, is kept at video data and corresponding index data in annular cushion district.
Wherein, described scheduling unit specifically comprises:
Priority scheduling module, for when being determined with after execution store tasks, judges whether the priority of new store tasks is greater than the priority of task in execution, and in the time that judgement is greater than, notifies described the second performance element to carry out corresponding operating; And
Code stream scheduling module, for when described priority scheduling module judges that the priority of new store tasks is not more than the priority of execution task, carry out the operation of described " whether the first storage code stream of new store tasks corresponding to record task triggering command that judgement newly receives stores code stream higher than second of store tasks in carrying out ".
Wherein, the type of the record task triggering command that described data receiver unit receives comprises that the plan that priority improves successively triggers video recording instruction, manual triggers video recording instruction and condition triggering video recording instruction, and storage code stream corresponding to record task triggering command that priority is high is greater than storage code stream corresponding to record task triggering command that priority is low.
Wherein, when the triggering video recording instruction receiving when described data receiver unit triggers video recording instruction for plan, store tasks, specifically for since video recording start-up time, is stored to storage unit by the video data in the video recording duration according to storage code stream;
The triggering video recording instruction receiving when described data receiver unit is that condition triggers while recording a video instruction, and store tasks, specifically in the time meeting video recording trigger condition, is stored to storage unit by the video data in the video recording duration according to storage code stream;
When the triggering video recording instruction receiving when described data receiver unit is manual triggers video recording instruction, store tasks, specifically in the time receiving manual triggers video recording instruction, is directly stored to storage unit by the video data in the video recording duration according to storage code stream.
The present invention is different from and in prior art, in the process of video code conversion, in speed, has bluntly, cannot realize seamlessly transitting of high code stream and low code stream, also also imperfect in the picture quality of video, often there will be the problems such as picture delay, has the following advantages:
1, by corresponding priority and corresponding storage code stream can be set to record task triggering command according to different use scenes in advance, such as the warning scene complicated, prediction scheme scene, condition triggering scene etc. need to be stored high code and be flowed to guarantee that video pictures is clear, and carry out video storage to save storage space with extremely low code stream under common scenarios at ordinary times, when needs carry out high-low code flow switching, the code stream that judges new store tasks is not higher than in carrying out when store tasks, calculate and remain the execution time according to the executed time of store tasks in carrying out and video recording duration, then continue store tasks in the residue execution time completes execution, and after completing next second carry out new store tasks, if new store tasks code stream calculates equally the residue execution time and carries out the instruction of code stream force handoff in next number of seconds according to after receiving higher than store tasks in carrying out.Can guarantee the continuity of video storage by this video storage method, in guaranteeing video image quality, realize seamlessly transitting of different memory code stream translation, and the delay that can not produce picture, impact monitoring.
2, a kind of video data storage method and system of supporting to switch code stream provided by the invention, can in there is no video storage task, automatically start the task of pre-recording, there is interior for the previous period video information for recording accident, also can be set in advance and the code stream size of pre-recording the time of pre-recording, and pre-record data and corresponding index data of video is kept to corresponding the pre-recording in annular cushion district of storage unit, in the time that occurring, accident obtains the video recording in accident generation for the previous period in buffer zone, make the video recording content intact of accident front and back, so that the real-time monitoring of the grasp scene that staff is complete, described pre-recording function also can reclaim the expired data of pre-recording in time to save storage space.
Accompanying drawing explanation
Fig. 1 is a kind of step block diagram of supporting the video data storage method that switches code stream;
Fig. 2 is a kind of step block diagram of supporting video data storage method one embodiment that switches code stream;
Fig. 3 is a kind of composition frame chart of supporting the video data storage systems of switching code stream;
Fig. 4 is a kind of composition frame chart of the scheduling unit of supporting the video data storage systems of switching code stream;
Label declaration:
1, data receiver unit; 2, scheduling unit; 3, performance element;
4, the first performance element; 5, the second performance element; 6, storage unit
7, priority scheduling module; 8, code stream scheduling module.
Embodiment
By describing technology contents of the present invention, structural attitude in detail, being realized object and effect, below in conjunction with embodiment and coordinate accompanying drawing to be explained in detail.
Refer to Fig. 1, it is a kind of step block diagram of supporting the video data storage method that switches code stream of the present invention, described storage means is applied in the main frame of supervisory system, supervisory system comprises the main frame that obtains the camera head of video data and be connected with camera head communication, it is characterized in that, described method comprises step:
S1: receiving video data, judge whether newly to receive the record task triggering command for carrying out store tasks simultaneously, if so, perform step S2; Wherein, described store tasks is for being stored to storage unit by the video data in the video recording duration and index data according to storage code stream;
S2: judged whether store tasks in execution, and whether the first storage code stream of new store tasks corresponding to the record task triggering command that judgement newly receives in the time being determined with store tasks in execution is higher than the second storage code stream of store tasks in carrying out, if, execution step S4, if not, execution step S3;
S3: according to carry out in store tasks the executed time and video recording the duration calculate residue the execution time, then continue residue the execution time complete execution in store tasks, and after completing next second carry out new store tasks;
S4: calculate and remain the execution time according to the executed time of store tasks in carrying out and video recording duration, then the new store tasks of execution after next second video data of store tasks in execution receives.
In said method by can corresponding priority and corresponding storage code stream be set according to different use scenes to record task triggering command in advance, need to store high code and flow to guarantee that video pictures is clear such as the warning scene complicated, prediction scheme scene, condition trigger scene etc., facilitate staff to judge accurately scene changes, and carry out video storage to save storage space with extremely low code stream common scenarios is at ordinary times next.The main frame of supervisory system is receiving after record task triggering command through in judging and determining and need to carry out high-low code flow switching, calculate and remain the execution time according to the executed time of store tasks in carrying out and video recording duration, then in carrying out, next second video data of store tasks carried out new store tasks after receiving immediately; And when not needing force handoff code stream, calculate equally the residue execution time, the then new store tasks of execution after next second video data of store tasks in execution receives.Described store tasks is for being stored to storage unit 6 by the video data in the video recording duration and index data according to storage code stream.Performance element 3 is kept at video data in the video file of storage unit 6, corresponding straw line data are kept in second level index file of specifying in storage unit 6, to search fast the video storage data that need by search key when staff needs, storage space carried out to orderly management simultaneously.
Method of the present invention adopts fixed-length file stored video data, in a fixed length video file, can preserve the continuous video of multistage, the video file that one section of continuous videos can take multiple fixed length is stored, and can reach second level index file and store the information such as time and position of every frame video association.In the time of memory space inadequate, can circulate and cover video recording according to the information of artificial setting, to save storage space.Can guarantee the continuity of video storage picture by the storage means of this video data, in guaranteeing video image quality, realize seamlessly transitting of different memory code stream translation, and can not produce the delay situation of picture, and avoid missing important picture video recording, affect scene monitoring.
In this specific embodiment, above-mentionedly a kind ofly support the video data storage method that switches code stream also to comprise step: when judging when not executing the task middle store tasks and not receiving record task triggering command, start the task of pre-recording, video data and corresponding index data are kept in annular cushion district.When task does not receive record task triggering command yet in judgement is not carried out, will automatically start the task of pre-recording, there is interior for the previous period video information for recording accident, according to managerial demand, the time of pre-recording and video pictures quality are set in advance, comprise the rules of pre-recording such as code stream size, resolution, in the time having accident, can in buffer zone, obtain the Video Document in accident generation for the previous period, make the video recording content intact of accident front and back, to guarantee the real-time monitoring in monitoring range.The described assignment instructions of pre-recording comprises and starts time delay instruction and the scene restructuring instruction of pre-recording of pre-recording, wherein, it is store tasks to be started to video data buffer memory in a period of time before get off that startup time delay is pre-recorded, and starts for solving video storage the video image information loss problem that time delay causes; It is to trigger in condition before storage instruction triggers under the video data buffer memory in a period of time, to be used to condition to trigger store tasks and to recombinate and provide alarm that the video data in the time of front one end occurs as scenes such as warning scenes that scene restructuring is pre-recorded.Moreover pre-recording function also can reclaim the expired data of pre-recording in time, avoids committed memory.System will be opened up the corresponding annular cushion district of pre-recording for each video source in storage unit, pre-record data and corresponding index data of video is kept at and pre-recorded in annular cushion district, in the time that occurring, accident can in buffer zone, extract the video recording in accident generation for the previous period, make the video recording content intact before and after accident, so that the real-time monitoring of the complete grasp scene of staff.
Refer to Fig. 2, in a specific embodiment, in the S2 of step described in above-described embodiment " judge whether store tasks in execution; if " also comprise step below: whether the priority that judges new store tasks is greater than task in execution, in the time that judgement is greater than, carry out described step S4, in the time that judgement is not more than, execution step " whether the first storage code stream of new store tasks corresponding to record task triggering command that judgement newly receives is higher than the second storage code stream of store tasks in carrying out " step in S2.Because system can arrange the priority of record task triggering command and corresponding storage code stream in advance, so priority height of task in need to first judging new store tasks and carry out in receiving record task triggering command, when in carrying out, the priority of store tasks is higher, the pending middle store tasks such as new store tasks, when in carrying out, the priority of store tasks is not higher than new store tasks, execution step " whether the first storage code stream of new store tasks corresponding to record task triggering command that judgement newly receives is higher than the second storage code stream of store tasks in carrying out " step in S2, and then the height of judgement storage code stream, judge whether to store the conversion of code stream.
In a specific embodiment, the type of described record task triggering command comprises that the plan that priority improves successively triggers video recording instruction, manual triggers video recording instruction and condition triggering video recording instruction, and storage code stream corresponding to record task triggering command that priority is high is greater than storage code stream corresponding to record task triggering command that priority is low.System arranges after priority different record task triggering command, controls according to the priority performance element 3 and records a video.Concrete, it is that user need to formulate video recording plan rules according to what manage in advance that plan triggers video recording, system triggers video record automatically according to video recording schedule plan; It is that user triggers video recording plan rules according to managerial demand formulation condition in advance that condition triggers video recording, and the condition of triggering comprises alarm, event, interlock, prediction scheme etc., just starts immediately video record once concrete trigger condition produces; Manual triggers video recording is that user immediately selectes video recording target and manually boots video record according to managerial demand.Plan triggering command parameter in record task triggering command comprises video recording target, the start-up time of recording a video, the duration of video recording, record a video picture bit stream and the regular executing state etc. of recording a video; Condition triggers video recording order parameter and comprises video recording target, the trigger condition of recording a video, the duration of recording a video, record a video picture bit stream and the regular executing state etc. of recording a video; Manual triggers video recording order parameter comprises video recording target, the trigger condition of recording a video, the duration of recording a video, record a video picture bit stream and the regular executing state etc. of recording a video.High storage code stream corresponding to record task triggering command of priority arranging in system is greater than storage code stream corresponding to record task triggering command that priority is low, the judgement of system advanced row major level in carrying out the instruction of storage instruction triggers, the preferential higher store tasks of execution priority, and storage code stream corresponding to the higher store tasks of priority is higher, will automatically store the conversion of code stream; When being not less than in the situation of store tasks priority in execution the storage rule of judgement storage code stream height again, new storage execution priority judges whether task in conversion storage.
In a specific embodiment, described a kind of video data storage method of supporting to switch code stream, in the time that described record task triggering command triggers video recording instruction for plan, store tasks is specifically for since video recording start-up time, by the video data in the video recording duration according to the storage of storage code stream; When described record task triggering command is that condition triggers video recording when instruction, store tasks is specifically in the time meeting video recording trigger condition, by the video data in the video recording duration according to storing code stream storage; In the time that described record task triggering command is manual triggers video recording instruction, store tasks is specifically in the time receiving manual triggers video recording instruction, directly by the video data in the video recording duration according to storing code stream storage.Described store tasks, according to the difference of record task triggering command, is carried out different concrete store tasks.
Another technical solution used in the present invention is:
Referring to Fig. 3, is a kind of structured flowchart of supporting the video data storage systems of switching code stream of the present invention.A kind of video data storage systems of supporting to switch code stream, run in the main frame of supervisory system, supervisory system comprises the main frame that obtains the camera head of video data and be connected with camera head communication, it is characterized in that, the video data storage systems that code stream is switched in described support comprises:
Data receiver unit 1, for receiving video data, judge whether newly to receive the record task triggering command for carrying out store tasks, wherein, described store tasks is for being stored to storage unit 6 by the video data in the video recording duration and index data according to storage code stream simultaneously;
Scheduling unit 2, for judging and newly receive after record task triggering command when described data receiver unit 1, judged whether store tasks in execution, and the first storage code stream of new store tasks corresponding to the record task triggering command that judgement newly receives in the time being determined with store tasks in execution is whether higher than the second storage code stream of store tasks in carrying out;
Performance element 3, for carrying out store tasks, comprising:
The first performance element 4, for in the time that described scheduling unit 2 is judged the first storage code stream not higher than the second storage code stream, calculate and remain the execution time according to the executed time of store tasks in carrying out and video recording duration, then continue residue the execution time complete execution in store tasks, and after completing next second carry out new store tasks; And
The second performance element 5, for in the time that described scheduling unit 2 is judged the first storage code stream higher than the second storage code stream, calculate and remain the execution time according to the executed time of store tasks in carrying out and video recording duration, then the new store tasks of execution after next second video data of store tasks in execution receives.
Described data receiver unit 1 is sent to described scheduling unit 2 after receiving instruction; The video data that described scheduling unit 2 is taken for receiving camera head, and judge whether newly to receive the record task triggering command for carrying out store tasks simultaneously, judgement receives after record task triggering command and makes an immediate response and be sent to scheduling unit 2, scheduling unit 2 has judged whether task in execution after receiving new record task triggering command immediately, carries out new store tasks if trigger immediately performance element 3 without task in commission; If whether the first storage code stream of depositing task in commission and judge new store tasks is higher than the second storage code stream of store tasks in carrying out, described scheduling unit 2 is sent to described performance element 3 and carries out concrete Video Data Storage task after judgement finishes.If scheduling unit 2 is judged the first storage code stream and is not just sent video data to the first performance element 4 higher than the second storage code stream, described the first performance element 4 calculates the residue execution time according to the executed time of store tasks in carrying out and video recording duration, then continue residue the execution time complete execution in store tasks, and after completing next second carry out new store tasks; If judging after the first storage code stream is higher than the second storage code stream, scheduling unit 2 is sent to the second performance element 5 in performance element 3, described the second performance element 5 calculates the residue execution time according to the executed time of store tasks in carrying out and video recording duration, then the new store tasks of execution after next second video data of store tasks in execution receives, described storage unit 6 storages comprise the video data of typing in performance element 3 and corresponding index data.Can guarantee the continuity of video storage picture by the storage system of this video data, in guaranteeing video image quality, realize seamlessly transitting of different memory code stream translation, and can not produce the delay situation of picture, and avoid missing important picture video recording, affect scene monitoring.
In a specific embodiment, described performance element 3 also comprises the module of pre-recording, for judge do not execute the task middle store tasks and while not receiving record task triggering command of performance element 3 when described scheduling unit 2, start the task of pre-recording, video data and corresponding index data are kept in annular cushion district.When task does not receive record task triggering command yet in judgement is not carried out, will automatically start the task of pre-recording, there is interior for the previous period video information for recording accident, according to the needs of management, the concrete time of pre-recording and video pictures quality can be set in advance, concrete video pictures quality comprises code stream size, the regular setting of pre-recording such as resolution, need to adjust back video information in the time having accident to occur time, can in buffer zone, obtain the Video Document in accident generation for the previous period, make the video recording content intact of accident front and back, to guarantee the real-time monitoring in monitoring range.The described module of pre-recording comprises that to start time delay the pre-record pattern etc. of pattern and scene restructuring of pre-recording optional, wherein, starting the time delay pattern of pre-recording is store tasks to be started to video data buffer memory in a period of time before get off, and starts for solving video storage the video image information loss problem that time delay causes; The scene restructuring pattern of pre-recording is to trigger in condition before storage instruction triggers under the video data buffer memory in a period of time, to be used to condition to trigger store tasks and to recombinate and provide alarm that the video data in the time of front one end occurs as scenes such as warning scenes.The described module of pre-recording also has the function of the expired data of pre-recording of timely recovery, avoids committed memory.Described video data storage systems is just opened up the corresponding annular cushion district of pre-recording for each video source in storage unit, pre-record data and corresponding index data of video is kept at and pre-recorded in annular cushion district, so that the real-time monitoring of the complete grasp scene of staff.
Refer to Fig. 4, in a specific embodiment, described scheduling unit 2 specifically comprises:
Priority scheduling module 7, for when being determined with after execution store tasks, judges whether the priority of new store tasks is greater than the priority of task in execution, and notifies described the second performance element 5 to carry out corresponding operating in the time that judgement is greater than; And
Code stream scheduling module 8, for when described priority scheduling module 7 judges that the priority of new store tasks is not more than the priority of execution task, carry out the operation of described " whether the first storage code stream of new store tasks corresponding to record task triggering command that judgement newly receives stores code stream higher than second of store tasks in carrying out ".Described priority scheduling module 7 has the judgement of priority and notifies the function of concrete performance element 3; And code stream scheduling module 8 mainly applies to the judgement of the code stream height of carrying out after priority scheduling module 7 is judged priority and notifies concrete performance element 3, to need to store in code stream switches and notify timely performance element 3 to carry out the switching of code stream in judgement.
In a specific embodiment, the type of the record task triggering command that described data receiver unit 1 receives comprises that the plan that priority improves successively triggers video recording instruction, manual triggers video recording instruction and condition triggering video recording instruction, and storage code stream corresponding to record task triggering command that priority is high is greater than storage code stream corresponding to record task triggering command that priority is low.Specifically, plan triggers video recording need to formulate video recording plan rules for user according to what manage in advance, and system triggers video record automatically according to video recording schedule plan; Condition triggers video recording and triggers video recording plan rules for user according to managerial demand formulation condition in advance, and the condition of triggering comprises alarm, event, interlock, prediction scheme etc., just starts immediately video record once concrete trigger condition produces; Manual triggers video recording is immediately selected video recording target and manually boots video record according to managerial demand for user.Plan triggering command parameter in record task triggering command comprises video recording target, the start-up time of recording a video, the duration of video recording, record a video picture bit stream and the regular executing state etc. of recording a video; Condition triggers video recording order parameter and comprises video recording target, the trigger condition of recording a video, the duration of recording a video, record a video picture bit stream and the regular executing state etc. of recording a video; Manual triggers video recording order parameter comprises video recording target, the trigger condition of recording a video, the duration of recording a video, record a video picture bit stream and the regular executing state etc. of recording a video.High storage code stream corresponding to record task triggering command of priority arranging in described video data storage systems is greater than storage code stream corresponding to record task triggering command that priority is low, the judgement of system advanced row major level in carrying out the instruction of storage instruction triggers, the preferential higher store tasks of execution priority, and storage code stream corresponding to the higher store tasks of priority is higher, will automatically store the conversion of code stream; When being not less than in the situation of store tasks priority in execution the storage rule of judgement storage code stream height again, new storage execution priority judges whether task in conversion storage.
In a specific embodiment, when the triggering video recording instruction receiving when described data receiver unit 1 triggers video recording instruction for plan, store tasks, specifically for since video recording start-up time, is stored to storage unit 6 by the video data in the video recording duration according to storage code stream;
The triggering video recording instruction receiving when described data receiver unit 1 is that condition triggers while recording a video instruction, and store tasks, specifically in the time meeting video recording trigger condition, is stored to storage unit 6 by the video data in the video recording duration according to storage code stream;
When the triggering video recording instruction receiving when described data receiver unit 1 is manual triggers video recording instruction, store tasks, specifically in the time receiving manual triggers video recording instruction, is directly stored to storage unit 6 by the video data in the video recording duration according to storage code stream.
The present invention's difference and video storage method of the prior art and memory device, in the process of video high-low code flow transcoding, cannot realize and seamlessly transitting, all can be blunt to some extent on speed and picture and the problem such as delay, by different use scenes being arranged to corresponding priority and corresponding storage code stream, under special screne, adopt high code stream to store to guarantee the sharpness of video pictures, save storage space and carry out video storage with extremely low code stream under common scenarios at ordinary times, in needing to carry out high-low code flow switching or accept new record task triggering command in video process, the triggering command receiving is sent to scheduling unit 2 by data receiver unit 1, judge in performance element 3, whether there is executory task by scheduling unit 2, carry out new store tasks if trigger immediately performance element 3 without store tasks in commission, if deposit in commission store tasks, the priority of store tasks and new store tasks in scheduling unit 2 judgement execution, the higher store tasks of performance element 3 preferential execution priority, when the priority of the store tasks of new reception not higher than the execution in performance element 3 in when store tasks, scheduling unit 2 so judge new store tasks and carry out in the code stream height of store tasks, in the time that the first storage code stream of new store tasks is not stored code stream higher than second of store tasks in carrying out, store tasks triggering command is sent to the first performance element 4, the first performance element 4 calculates the residue execution time according to the executed time of store tasks in carrying out and video recording duration, then continue store tasks in the residue execution time completes execution, and after completing next second carry out new store tasks, if be sent to the second performance element 5 of performance element 3 when the first code stream code stream of new store tasks is stored code stream higher than second of the store tasks in performance element 3 through store tasks triggering command, the second performance element 5 calculates the residue execution time according to the executed time of store tasks in carrying out and video recording duration, then the new store tasks of execution after next second video data of store tasks in execution receives.Can guarantee the continuity of video storage by this video storage method, in guaranteeing video image quality, realize seamlessly transitting of different memory code stream translation, and the delay that can not produce picture, impact monitoring.Simultaneously, in not carrying out, in task, automatically trigger the module of the pre-recording task of pre-recording, there is the video information in for the previous period for recording accident, make the video recording content intact before and after accident, so that the real-time monitoring of the complete grasp scene of staff.Moreover described pre-recording function also can reclaim the expired data of pre-recording in time to save storage space.
The foregoing is only embodiments of the invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes instructions of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (10)

1. support to switch a video data storage method for code stream, be applied in the main frame of supervisory system, supervisory system comprises the main frame that obtains the camera head of video data and be connected with camera head communication, it is characterized in that, described method comprises step:
S1: receiving video data, judge whether newly to receive the record task triggering command for carrying out store tasks simultaneously, if so, perform step S2; Wherein, described store tasks is for being stored to storage unit by the video data in the video recording duration and index data according to storage code stream;
S2: judged whether store tasks in execution, and whether the first storage code stream of new store tasks corresponding to the record task triggering command that judgement newly receives in the time being determined with store tasks in execution is higher than the second storage code stream of store tasks in carrying out, if, execution step S4, if not, execution step S3;
S3: according to carry out in store tasks the executed time and video recording the duration calculate residue the execution time, then continue residue the execution time complete execution in store tasks, and after completing next second carry out new store tasks;
S4: calculate and remain the execution time according to the executed time of store tasks in carrying out and video recording duration, then the new store tasks of execution after next second video data of store tasks in execution receives.
2. a kind of video storage method of supporting to switch code stream according to claim 1, it is characterized in that, also comprise step: when judging the middle store tasks and while not receiving record task triggering command of not executing the task, start the task of pre-recording, video data and corresponding index data are kept in annular cushion district.
3. a kind of video data storage method of supporting to switch code stream according to claim 1, it is characterized in that, in described step S2 " judge whether store tasks in execution; if " also comprise step below: whether the priority that judges new store tasks is greater than task in execution, in the time that judgement is greater than, carry out described step S4, in the time that judgement is not more than, execution step " whether the first storage code stream of new store tasks corresponding to record task triggering command that judgement newly receives is higher than the second storage code stream of store tasks in carrying out " step in S2.
4. a kind of video data storage method of supporting to switch code stream according to claim 1, it is characterized in that, the type of described record task triggering command comprises that the plan that priority improves successively triggers video recording instruction, manual triggers video recording instruction and condition triggering video recording instruction, and storage code stream corresponding to record task triggering command that priority is high is greater than storage code stream corresponding to record task triggering command that priority is low.
5. a kind of video data storage method of supporting to switch code stream according to claim 1, is characterized in that,
When described record task triggering command triggers video recording when instruction for plan, store tasks is specifically for since video recording start-up time, by the video data in the video recording duration according to the storage of storage code stream;
When described record task triggering command is that condition triggers video recording when instruction, store tasks is specifically in the time meeting video recording trigger condition, by the video data in the video recording duration according to storing code stream storage;
In the time that described record task triggering command is manual triggers video recording instruction, store tasks is specifically in the time receiving manual triggers video recording instruction, directly by the video data in the video recording duration according to storing code stream storage.
6. support to switch the video data storage systems of code stream for one kind, run in the main frame of supervisory system, supervisory system comprises the main frame that obtains the camera head of video data and be connected with camera head communication, it is characterized in that, the video data storage systems that code stream is switched in described support comprises:
Data receiver unit, for receiving video data, judge whether newly to receive the record task triggering command for carrying out store tasks, wherein, described store tasks is for being stored to storage unit by the video data in the video recording duration and index data according to storage code stream simultaneously;
Scheduling unit, for judging and newly receive after record task triggering command when described data receiver unit, judged whether store tasks in execution, and the first storage code stream of new store tasks corresponding to the record task triggering command that judgement newly receives in the time being determined with store tasks in execution is whether higher than the second storage code stream of store tasks in carrying out;
Performance element, for carrying out store tasks, comprising:
The first performance element, for in the time that code stream is stored in described scheduling unit judgement first not higher than the second storage code stream, calculate and remain the execution time according to the executed time of store tasks in carrying out and video recording duration, then continue residue the execution time complete execution in store tasks, and after completing next second carry out new store tasks; And
The second performance element, for in the time that code stream is stored in described scheduling unit judgement first higher than the second storage code stream, calculate and remain the execution time according to the executed time of store tasks in carrying out and video recording duration, then the new store tasks of execution after next second video data of store tasks in execution receives.
7. a kind of video data storage systems of supporting to switch code stream according to claim 6, it is characterized in that, described performance element also comprises the module of pre-recording, for judge do not execute the task middle store tasks and while not receiving record task triggering command of performance element when described scheduling unit, start the task of pre-recording, video data and corresponding index data are kept in annular cushion district.
8. a kind of video data storage systems of supporting to switch code stream according to claim 6, is characterized in that, described scheduling unit specifically comprises:
Priority scheduling module, for when being determined with after execution store tasks, judges whether the priority of new store tasks is greater than the priority of task in execution, and in the time that judgement is greater than, notifies described the second performance element to carry out corresponding operating; And
Code stream scheduling module, for when described priority scheduling module judges that the priority of new store tasks is not more than the priority of execution task, carry out the operation of described " whether the first storage code stream of new store tasks corresponding to record task triggering command that judgement newly receives stores code stream higher than second of store tasks in carrying out ".
9. a kind of video data storage systems of supporting to switch code stream according to claim 6, is characterized in that,
The type of the record task triggering command that described data receiver unit receives comprises that the plan that priority improves successively triggers video recording instruction, manual triggers video recording instruction and condition triggering video recording instruction, and storage code stream corresponding to record task triggering command that priority is high is greater than storage code stream corresponding to record task triggering command that priority is low.
10. a kind of video data storage systems of supporting to switch code stream according to claim 6, is characterized in that,
When the triggering video recording instruction receiving when described data receiver unit triggers video recording instruction for plan, store tasks, specifically for since video recording start-up time, is stored to storage unit by the video data in the video recording duration according to storage code stream;
The triggering video recording instruction receiving when described data receiver unit is that condition triggers while recording a video instruction, and store tasks, specifically in the time meeting video recording trigger condition, is stored to storage unit by the video data in the video recording duration according to storage code stream;
When the triggering video recording instruction receiving when described data receiver unit is manual triggers video recording instruction, store tasks, specifically in the time receiving manual triggers video recording instruction, is directly stored to storage unit by the video data in the video recording duration according to storage code stream.
CN201410065673.5A 2014-02-25 2014-02-25 Video data storage method and system capable of supporting code stream switching Active CN103824574B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410065673.5A CN103824574B (en) 2014-02-25 2014-02-25 Video data storage method and system capable of supporting code stream switching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410065673.5A CN103824574B (en) 2014-02-25 2014-02-25 Video data storage method and system capable of supporting code stream switching

Publications (2)

Publication Number Publication Date
CN103824574A true CN103824574A (en) 2014-05-28
CN103824574B CN103824574B (en) 2017-01-25

Family

ID=50759590

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410065673.5A Active CN103824574B (en) 2014-02-25 2014-02-25 Video data storage method and system capable of supporting code stream switching

Country Status (1)

Country Link
CN (1) CN103824574B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141891A (en) * 2015-08-04 2015-12-09 浙江宇视科技有限公司 Alarm-ahead video caching method and device
CN105338279A (en) * 2015-09-28 2016-02-17 中安消物联传感(深圳)有限公司 Control method for video prerecording and alarm system linkage
CN106921870A (en) * 2015-12-24 2017-07-04 北京奇虎科技有限公司 A kind of video broadcasting method and device
CN108076317A (en) * 2016-11-17 2018-05-25 杭州海康威视数字技术股份有限公司 Video data storage method and system, video cut-in method and node

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070081787A1 (en) * 2005-10-10 2007-04-12 Samsung Electronics Co., Ltd. Display apparatus and control method thereof
CN101237571A (en) * 2008-03-03 2008-08-06 杭州华三通信技术有限公司 A video coding storage method and device in monitoring system
CN102186064A (en) * 2011-05-30 2011-09-14 无锡中星微电子有限公司 Distributed video monitoring system and monitoring method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070081787A1 (en) * 2005-10-10 2007-04-12 Samsung Electronics Co., Ltd. Display apparatus and control method thereof
CN101237571A (en) * 2008-03-03 2008-08-06 杭州华三通信技术有限公司 A video coding storage method and device in monitoring system
CN102186064A (en) * 2011-05-30 2011-09-14 无锡中星微电子有限公司 Distributed video monitoring system and monitoring method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141891A (en) * 2015-08-04 2015-12-09 浙江宇视科技有限公司 Alarm-ahead video caching method and device
CN105338279A (en) * 2015-09-28 2016-02-17 中安消物联传感(深圳)有限公司 Control method for video prerecording and alarm system linkage
CN105338279B (en) * 2015-09-28 2018-12-28 深圳市豪恩安全科技有限公司 A kind of control method that video is pre-recorded with alarm system linkage
CN106921870A (en) * 2015-12-24 2017-07-04 北京奇虎科技有限公司 A kind of video broadcasting method and device
CN108076317A (en) * 2016-11-17 2018-05-25 杭州海康威视数字技术股份有限公司 Video data storage method and system, video cut-in method and node
CN108076317B (en) * 2016-11-17 2020-08-11 杭州海康威视数字技术股份有限公司 Video data storage method and system, video access method and node

Also Published As

Publication number Publication date
CN103824574B (en) 2017-01-25

Similar Documents

Publication Publication Date Title
US9973728B2 (en) System and method for supporting selective backtracking data recording
US10412451B2 (en) Storing same channel overlapping recordings
US8539535B2 (en) Methods and apparatus for supporting VOD requests in a system with hierarchical content stores
CN103824574A (en) Video data storage method and system capable of supporting code stream switching
CN101959071B (en) Synchronous decoding method and device
US10999643B2 (en) Subtitle switching method and display device
CN103974013B (en) Carry out the method and video record equipment of video record playback
CN114189696A (en) Video playing method and device
CN113382210A (en) Processing method of multi-channel monitoring video data, streaming media server and electronic equipment
CN105872711B (en) Switching animation display method and device during multi-system switching
CN103338351A (en) A method, an apparatus, and a system for monitoring video data uploading through utilizing a wireless network
CN102065320B (en) Method and equipment for processing trick playing command related to transport stream (TS) code stream
CN103546697A (en) Peer-to-peer control playing method of star structure
CN102457693A (en) System and method capable of regularly recording TV programmes
US10237453B2 (en) Video processing apparatus, control method, and effect switcher
CN105163073A (en) Image analysis based expressway monitoring method
TWI483614B (en) System and method for pre-recording of network video recorder
EP3422695B1 (en) Imaging apparatus
CN115484494B (en) Digital twin video stream processing method, device and equipment
KR101301618B1 (en) Apparatus for synchronizing of special effect and 4d projecting ststem
CN111953984B (en) Image pickup apparatus, control method thereof, and non-volatile computer-readable storage medium
CN100364318C (en) A Method for Precise Control of Video Signal
JP2012227613A (en) Program playback system
KR101213153B1 (en) System and method for searching video data having simultaneous play function
CN104662922A (en) Program identifier based recording

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant