CN103824574B - 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
CN103824574B
CN103824574B CN201410065673.5A CN201410065673A CN103824574B CN 103824574 B CN103824574 B CN 103824574B CN 201410065673 A CN201410065673 A CN 201410065673A CN 103824574 B CN103824574 B CN 103824574B
Authority
CN
China
Prior art keywords
code stream
execution
store tasks
video
storage
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.)
Active
Application number
CN201410065673.5A
Other languages
Chinese (zh)
Other versions
CN103824574A (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

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 its system supporting to switch code stream
Technical field
The present invention relates to video field of storage, more particularly, to a kind of video data storage method supporting to switch code stream and its System.
Background technology
In life, due to the needs of protection safety, management etc., often real-time video information is automatically and continuously recorded Picture, while automatic video recording, often carries out video information storage time, image resolution ratio and frame per second etc. according to special requirement Adjustment, also need to be stored using different image resolution ratios according to different safety grades, and the storage of video play Prescription also more and more higher, in order to can guarantee that optimal picture quality, also ensures the flatness of image code stream conversion simultaneously, existing Some video code flow handoff techniques in handoff procedure, not only have in speed blunt it is impossible to seamlessly transit, in the figure of video As also and imperfect in quality, often occur that picture is detained it is therefore necessary to improve to the problems referred to above.
Content of the invention
For solving above-mentioned technical problem, the present invention provides one kind can solve high code stream and low in video storing process very well The flexible switching of streaming video and realize seamless spliced video storage method and its system.
One aspect of the present invention is:
A kind of video data storage method supporting switching code stream, is applied in the main frame of monitoring system, monitoring system bag Include the camera head obtaining video data and with the camera head main frame that is connected of communication, methods described includes step:
S1: receive video data, judge whether newly to receive simultaneously for execute store tasks record task trigger refer to Order, if so, then execution step s2;Wherein, described store tasks are used for the video data in the video recording persistent period and index number Store to memory element according to according to storage code stream;
S2: determine whether store tasks in execution, and judge when being determined with store tasks in execution newly to receive Whether the first storage code stream of the corresponding new store tasks of record task triggering command is deposited higher than second of store tasks in execution Storage code stream, if so, execution step s4, if it is not, execution step s3;
S3: remaining execution time is calculated according to the executed time of store tasks in execution and video recording persistent period, so After continue remaining execution time complete execution in store tasks, and when after the completion of next second execute new store tasks;
S4: remaining execution time is calculated according to the executed time of store tasks in execution and video recording persistent period, so Execute new store tasks after next second video data of store tasks in execution receives afterwards.
Wherein, further comprise the steps of: when judgement is not carried out in task store tasks and is not received by record task and touches When sending instructions, start task of pre-recording, video data and corresponding index data are saved in annular cushion area.
Wherein, in described step s2 " determine whether store tasks in execution, if " to further comprise the steps of: judgement below new The priority of store tasks, whether more than task in execution, when judging to be more than, executes described step s4, when judgement is not more than When, " the first storage code of the corresponding new store tasks of record task triggering command that judgement newly receives in execution step s2 Whether stream stores code stream higher than second of store tasks in execution " step.
Wherein, the type of described record task triggering command include plan triggering video recording instruction that priority improves successively, Triggering video recording instruction and condition triggering video recording instruction manually, the high record task triggering command of priority corresponding storage code stream is big In the low record task triggering command corresponding storage code stream of priority.
Wherein, when described record task triggering command is plan triggering video recording instruction, store tasks are specifically for from one Video recording starting time starts, by a video data recorded a video in the persistent period according to storage code stream storage;
When described record task triggering command is for condition triggering video recording instruction, store tasks are specifically for when satisfaction video recording During trigger condition, by a video data recorded a video in the persistent period according to storage code stream storage;
When described record task triggering command is manual triggering video recording instruction, store tasks are specifically in one's hands when receiving During dynamic triggering video recording instruction, directly by a video data recorded a video in the persistent period according to storage code stream storage.
Another technical solution used in the present invention is:
A kind of video data storage systems supporting switching code stream, run in the main frame of monitoring system, monitoring system bag Include the camera head obtaining video data and the main frame being connected with camera head communication, described support switches the video counts of code stream Include according to storage system:
Data receipt unit, for receiving video data, judges whether newly to receive for executing store tasks simultaneously Record task triggering command, wherein, described store tasks are used for pressing the video data in the video recording persistent period and index data Store to memory element according to storage code stream;
Scheduling unit, for, after described data receipt unit judges newly to receive record task triggering command, judgement is No have store tasks in execution, and judge the record task triggering command pair newly receiving when being determined with store tasks in execution Whether the first storage code stream of the new store tasks answered stores code stream higher than second of store tasks in execution;
Performance element, for executing store tasks, including:
First performance element, for when described scheduling unit judges first storage code stream the not higher than second storage code stream, Remaining execution time is calculated according to the executed time of store tasks in execution and video recording persistent period, then proceedes in residue Execution time complete execution in store tasks, and when after the completion of next second execute new store tasks;And
Second performance element, for when described scheduling unit judge first storage code stream be higher than second storage code stream when, root Executed time and video recording persistent period according to store tasks in execution calculate remaining execution time, then when storage in execution Next second video data of task executes new store tasks after receiving.
Wherein, described performance element also includes module of pre-recording, for judging do not have in performance element when described scheduling unit Store tasks and when being not received by record task triggering command in execution task, start task of pre-recording, by video data and Corresponding index data is saved in annular cushion area.
Wherein, described scheduling unit specifically includes:
Priority scheduling module, the priority for after being determined with store tasks in execution, judging new store tasks is The no priority more than task in execution, and described second performance element execution corresponding operating is notified when judging and being more than;With And
Code stream scheduling module, the priority for judging new store tasks when described priority scheduling module is not more than execution During the priority of middle task, described " the of the corresponding new store tasks of record task triggering command judging newly to receive of execution Whether one storage code stream higher than the second storage code stream of store tasks in execution " operation.
Wherein, the type of the record task triggering command that described data receipt unit receives includes what priority improved successively Plan triggering video recording instruction, manually triggering video recording instruction and condition triggering video recording instruction, the high record task triggering of priority refers to Corresponding storage code stream is made to be more than the low record task triggering command corresponding storage code stream of priority.
Wherein, when the triggering video recording instruction that described data receipt unit receives is for plan triggering video recording instruction, storage Task is specifically for, from the beginning of a video recording starting time, a video data recorded a video in the persistent period being stored according to storage code stream To memory element;
When the triggering video recording instruction that described data receipt unit receives is for condition triggering video recording instruction, store tasks have Body is used for, when meeting video recording trigger condition, a video data recorded a video in the persistent period being stored to storage according to storage code stream Unit;
When the triggering video recording instruction that described data receipt unit receives is for manual triggering video recording instruction, store tasks have Body is used for when receiving manual triggering video recording instruction, directly by a video data recorded a video in the persistent period according to storage code stream Store to memory element.
The present invention be different from prior art have in speed during video code conversion blunt it is impossible to realize high code Stream seamlessly transits with low code stream, also and imperfect in the picture quality of video, and picture be detained the problems such as often occurs, tool Have the advantage that
1st, pass through can arrange corresponding priority and correspondence according to difference using scene to record task triggering command in advance Storage code stream, such as need to store high code stream to ensure in complicated warning scene, prediction scheme scene, condition triggering scene etc. Video pictures are clear, and carry out video with extremely low code stream under common scenarios at ordinary times and store to save memory space, needing When carrying out high-low code flow switching, when judging that the code stream of new store tasks is not higher than store tasks in execution, according to execution The executed time of middle store tasks and video recording persistent period calculate remaining execution time, then proceed in remaining execution time Complete execution in store tasks, and when after the completion of next second execute new store tasks;If new store tasks code stream is higher than in execution Store tasks then equally calculate remaining execution time and execute code stream pressure switching command after next second data receives.Logical Cross the seriality that this video storage method can guarantee that video storage, realize different storage codes while ensureing video image quality What circulation was changed seamlessly transits, without producing the delay of picture, impact monitoring.
2nd, a kind of video data storage method and system supporting to switch code stream that the present invention provides, can not have video to deposit When storage task, automatic is pre-recorded task, for recording accident, video information interior for the previous period occurs, also may be used Setting pre-records the time and code stream size of pre-recording in advance, and video prerecorded data and corresponding index data are saved in memory element Corresponding pre-record in annular cushion area, when accident occurs in relief area obtain accident occur interior for the previous period Video recording, make the Video content before and after accident complete so that the monitor in real time of the complete grasp scene of staff, described Pre- recording function also can reclaim expired prerecorded data in time to save memory space.
Brief description
Fig. 1 is a kind of step block diagram of the video data storage method supporting switching code stream;
Fig. 2 is a kind of step block diagram of video data storage method one embodiment supporting switching code stream;
Fig. 3 is a kind of composition frame chart of the video data storage systems supporting switching code stream;
Fig. 4 is a kind of composition frame chart of the scheduling unit of video data storage systems supporting switching code stream;
Label declaration:
1st, data receipt unit;2nd, scheduling unit;3rd, performance element;
4th, the first performance element;5th, the second performance element;6th, memory element
7th, priority scheduling module;8th, code stream scheduling module.
Specific embodiment
By the technology contents of the detailed description present invention, structural features, realized purpose and effect, below in conjunction with embodiment And coordinate accompanying drawing to be explained in detail.
Refer to Fig. 1, being that the present invention is a kind of supports to switch the step block diagram of the video data storage method of code stream, described deposits Method for storing is applied in the main frame of monitoring system, and monitoring system includes camera head and and the camera head obtaining video data The main frame that communication connects is it is characterised in that methods described includes step:
S1: receive video data, judge whether newly to receive simultaneously for execute store tasks record task trigger refer to Order, if so, then execution step s2;Wherein, described store tasks are used for the video data in the video recording persistent period and index number Store to memory element according to according to storage code stream;
S2: determine whether store tasks in execution, and judge when being determined with store tasks in execution newly to receive Whether the first storage code stream of the corresponding new store tasks of record task triggering command is deposited higher than second of store tasks in execution Storage code stream, if so, execution step s4, if it is not, execution step s3;
S3: remaining execution time is calculated according to the executed time of store tasks in execution and video recording persistent period, so After continue remaining execution time complete execution in store tasks, and when after the completion of next second execute new store tasks;
S4: remaining execution time is calculated according to the executed time of store tasks in execution and video recording persistent period, so Execute new store tasks after next second video data of store tasks in execution receives afterwards.
Passing through in said method in advance can be excellent accordingly according to different use scene setting to record task triggering command First level and corresponding storage code stream, such as need storage higher in complicated warning scene, prediction scheme scene, condition triggering scene etc. Code stream is clear to ensure video pictures, facilitates staff accurately to judge scene changes, and under common scenarios at ordinary times then Carry out video with extremely low code stream to store to save memory space.The main frame of monitoring system is receiving record task triggering command Afterwards when judging that determination needs to carry out high-low code flow switching, according to the executed time of store tasks and video recording in execution Persistent period calculates remaining execution time, then when execution in store tasks after video data receives within next second immediately Execute new store tasks;When without forcing switching code stream, then equally calculate remaining execution time, then when in execution Next second video data of store tasks executes new store tasks after receiving.When described store tasks are used for continuing video recording Interior video data and index data store to memory element 6 according to storage code stream.Video data is saved in by performance element 3 In the video file of memory element 6, corresponding straw line data is saved in the second level index file specify in memory element 6, with Just quickly search the video data storage of needs when staff needs by search key, simultaneously to depositing Storage space carries out orderly management.
Method of the present invention adopts fixed-length file to store video data, can preserve many in a fixed length video file The continuous video of section, the video file that one section of continuous videos can take multiple fixed length is stored, and can reach second level index literary composition The information such as the time of part storage every frame video association and position.Can be according to the artificial letter setting when memory space inadequate Breath is circulated covering video recording, to save memory space.Can guarantee that video stores picture by the storage method of this video data The seriality in face, realizes seamlessly transitting of different storage code stream conversion, without producing while ensureing video image quality The delay situation of picture, it is to avoid miss important picture video recording, affect scene monitoring.
In this specific embodiment, a kind of above-mentioned video data storage method supporting switching code stream also includes walking Rapid: when judging to be not carried out in task store tasks and be not received by record task triggering command, start task of pre-recording, Video data and corresponding index data are saved in annular cushion area.Also it is not received by when judgement is not carried out middle task When record task triggering command, automatic is pre-recorded task, for recording accident, interior for the previous period regarding occurs Frequency information, needs to arrange the time of pre-recording and video pictures quality according to management in advance, pre-records rule including code stream size, resolution etc. Then, accident can be obtained when there being accident in relief area Video Document interior for the previous period occurs, make burst thing Video content before and after part is complete, to ensure to the monitor in real time in monitoring range.Described assignment instructions of pre-recording include startup and prolong When pre-record instruction and scene restructuring is pre-recorded instruction, wherein, start-up study pre-record be by store tasks start interior for the previous period Video data caches, and stores, for solving video, the video image information loss problem that start-up study causes;Scene is recombinated Pre-record is to cache the video data interior for the previous period triggering store instruction triggering in condition, for triggering for condition The restructuring of the scenes such as store tasks such as warning scene provides alarm that the video data in the time of front one end occurs.Furthermore, pre- recording function Expired prerecorded data also can be reclaimed in time, it is to avoid committed memory.System will be opened up in memory element for each video source Corresponding annular cushion area of pre-recording, video prerecorded data and corresponding index data is saved in and pre-records in annular cushion area, when Accident can be extracted accident in relief area and video recording interior for the previous period be occurred, before and after making accident when occurring Video content is complete, so that the monitor in real time of the complete grasp scene of staff.
Refer to Fig. 2, in a specific embodiment, " determine whether to execute in step s2 described in above-described embodiment Middle store tasks, if " further comprise the steps of: below and judge the priority of new store tasks whether more than task in executing, when sentencing When being surely more than, execute described step s4, " the record task that judgement newly receives when judging to be not more than, in execution step s2 Whether the first storage code stream of the corresponding new store tasks of triggering command stores code stream higher than second of store tasks in execution " step Suddenly.Because system can arrange the priority of record task triggering command and corresponding storage code stream in advance, then connecing Need when receiving record task triggering command first to judge the priority height of new store tasks and task in execution, work as execution When the priority of middle store tasks is higher, the pending middle store tasks such as new store tasks, when store tasks in execution " the record task triggering command pair that judgement newly receives when priority is not higher than new store tasks, in execution step s2 Whether the first storage code stream of the new store tasks answered stores code stream higher than second of store tasks in execution " step, and then sentence The height of disconnected storage code stream, judges whether to store the conversion of code stream.
In a specific embodiment, the type of described record task triggering command includes the plan that priority improves successively Triggering video recording instruction, manually triggering video recording instruction and condition triggering video recording instruction, the high record task triggering command pair of priority The storage code stream answered is more than the low record task triggering command corresponding storage code stream of priority.System is to different record task After triggering command setting priority, performance element 3 is controlled to be recorded a video according to the priority.Specifically, plan triggering video recording User according to management need formulate video recording plan rules in advance, system triggers video record automatically according to video recording schedule plan Picture;Condition triggering video recording is that user needs to formulate condition triggering video recording plan rules according to management in advance, and the condition of triggering includes Alarm, event, linkage, prediction scheme etc., specific trigger condition soon starts video record once producing;Triggering video recording manually is User needs immediately to select video recording target and manually boot video record according to management.Plan in record task triggering command is touched The parameter that sends instructions includes record a video target, video recording starting time, video recording persistent period, video frames code stream and video recording rule execution shape State etc.;Condition triggering video recording order parameter includes record a video target, video recording trigger condition, video recording persistent period, video frames code stream Regular execution state etc. with video recording;Manually triggering video recording order parameter includes recording a video target, video recording trigger condition, video recording when continuing Between, video frames code stream and the regular execution state of video recording etc..The high record task triggering command pair of the priority of setting in system The storage code stream answered is more than the low record task triggering command corresponding storage code stream of priority, and system is touched in execution store instruction The judgement of advanced row major level when sending instructions, the higher store tasks of preferential execution priority, and higher the depositing of priority Storage task corresponding storage code stream is higher, is automatically carried out storing the conversion of code stream;Hold when new storage execution priority is not less than Judge in the case of store tasks priority in row that the storage rule storing code stream height carries out judging whether in conversion storage again Task.
In a specific embodiment, a kind of described video data storage method supporting switching code stream, when described video recording When task triggering command is plan triggering video recording instruction, store tasks are specifically for, from the beginning of a video recording starting time, one being recorded Video data in the image persistence time is according to storage code stream storage;When described record task triggering command refers to for condition triggering video recording When making, store tasks specifically for when meeting video recording trigger condition, by a video data recorded a video in the persistent period according to depositing Storage code stream storage;When described record task triggering command is triggering video recording instruction manually, store tasks are specifically for when reception To during manual triggering video recording instruction, directly by a video data recorded a video in the persistent period according to storage code stream storage.Described deposit Storage task, according to the difference of record task triggering command, carries out different specific store tasks.
Another technical solution used in the present invention is:
Refer to Fig. 3, being that the present invention is a kind of supports to switch the structured flowchart of the video data storage systems of code stream.A kind of Hold the video data storage systems of switching code stream, run in the main frame of monitoring system, monitoring system includes obtaining video data Camera head and with the camera head main frame that is connected of communication it is characterised in that the video data of described support switching code stream Storage system includes:
Data receipt unit 1, for receiving video data, judges whether newly to receive for executing store tasks simultaneously Record task triggering command, wherein, described store tasks are used for pressing the video data in the video recording persistent period and index data Store to memory element 6 according to storage code stream;
Scheduling unit 2, for, after described data receipt unit 1 judges newly to receive record task triggering command, judging Whether there are store tasks in execution, and judge the record task triggering command newly receiving when being determined with store tasks in execution Whether the first storage code stream of corresponding new store tasks stores code stream higher than second of store tasks in execution;
Performance element 3, for executing store tasks, including:
First performance element 4, for judging first storage code stream the not higher than second storage code stream when described scheduling unit 2 When, remaining execution time is calculated according to the executed time of store tasks in execution and video recording persistent period, then proceedes to Remaining execution time complete execution in store tasks, and when after the completion of next second execute new store tasks;And
Second performance element 5, for when described scheduling unit 2 judge first storage code stream be higher than second storage code stream when, Remaining execution time is calculated according to the executed time of store tasks in execution and video recording persistent period, then deposits in executing Next second video data of storage task executes new store tasks after receiving.
Described data receipt unit 1 sends to described scheduling unit 2 after being used for receiving instruction;Described scheduling unit 2 is used for Receive the video data that camera head shoots, and the record task simultaneously judging whether newly to receive for executing store tasks is tactile Send instructions, to scheduling unit 2, scheduling unit 2 receives new for the transmission that makes an immediate response after judging to receive record task triggering command Determine whether task in execution immediately after record task triggering command, if nothing task in commission, trigger performance element immediately The 3 new store tasks of execution;If depositing task in commission and judging the first storage code stream of new store tasks whether higher than in execution Second storage code stream of store tasks, described scheduling unit 2 sends after judging to terminate and executes specifically to described performance element 3 Video data store tasks.If scheduling unit 2 judges that first storage code stream the not higher than second storage code stream just sends video data To the first performance element 4, described first performance element 4 is according to the executed time of store tasks in execution and video recording persistent period Calculate remaining execution time, then proceed to remaining execution time complete execution in store tasks, and when after the completion of next second Execute new store tasks;If scheduling unit 2 judges that the first storage code stream sends to performance element 3 higher than after the second storage code stream The second performance element 5, described second performance element 5 according to execution in store tasks the executed time and video recording the persistent period Calculate remaining execution time, then the new storage of execution is appointed after next second video data of store tasks in execution receives Business, described memory element 6 stores video data and corresponding index data including typing in performance element 3.By this video The storage system of data can guarantee that the seriality of video stored picture, realizes different storages while ensureing video image quality What code stream was changed seamlessly transits, without producing the delay situation of picture, it is to avoid miss important picture video recording, impact scene prison Control.
In a specific embodiment, described performance element 3 also includes module of pre-recording, for sentencing when described scheduling unit 2 When being not carried out in task store tasks in disconnected performance element 3 and being not received by record task triggering command, startup is pre-recorded Task, video data and corresponding index data are saved in annular cushion area.Do not have when judgement is not carried out middle task yet Receive and when record task triggering command, automatic is pre-recorded task, occur for the previous period for recording accident Interior video information, can arrange, according to the needs of management, specifically pre-record time and video pictures quality in advance, specifically regard Frequency image quality include code stream size, resolution etc. pre-record rule setting, when have accident occur when need adjust back video When information, accident can be obtained in relief area and Video Document interior for the previous period occurs, before and after making accident Video content complete, to ensure to the monitor in real time in monitoring range.Described module of pre-recording includes start-up study and pre-records pattern Optional with scene restructuring pattern etc. of pre-recording, wherein, the start-up study pattern of pre-recording be by store tasks start interior for the previous period Video data caches, and stores, for solving video, the video image information loss problem that start-up study causes;Scene is recombinated The pattern of pre-recording is to cache the video data interior for the previous period triggering store instruction triggering in condition, for for condition The restructuring of the triggering store tasks such as scenes such as warning scene provides alarm that the video data in the time of front one end occurs.Described mould of pre-recording Block also has the timely function of reclaiming expired prerecorded data, it is to avoid committed memory.Described video data storage systems are just directed to Each video source opens up corresponding annular cushion area of pre-recording in memory element, by video prerecorded data and corresponding index data It is saved in and pre-records in annular cushion area, so that the monitor in real time of the complete grasp scene of staff.
Refer to Fig. 4, in a specific embodiment, described scheduling unit 2 specifically includes:
Priority scheduling module 7, the priority for after being determined with store tasks in execution, judging new store tasks is The no priority more than task in execution, and described second performance element 5 execution corresponding operating is notified when judging and being more than;With And
When described priority scheduling module 7, code stream scheduling module 8, for judging that the priority of new store tasks is no more than held In row during the priority of task, execution described " the corresponding new store tasks of record task triggering command judging newly to receive Whether the first storage code stream higher than the second storage code stream of store tasks in execution " operation.Described priority scheduling module 7 has There are the judgement of priority and the function of notifying concrete performance element 3;And code stream scheduling module 8 mainly applies in priority scheduling Module 7 judge priority after the judgement of code stream height of execution and notify specific performance element 3, to judge that needs carry out Performance element 3 is timely notified to carry out the switching of code stream when storage bitstreams switching.
In a specific embodiment, the type of the record task triggering command that described data receipt unit 1 receives includes Plan triggering video recording instruction, manually triggering video recording instruction and condition triggering video recording instruction that priority improves successively, priority is high Record task triggering command corresponding storage code stream be more than the low record task triggering command corresponding storage code stream of priority. Specifically, plan triggering video recording for user according to management need formulate video recording plan rules in advance, system according to video recording meter Draw timetable and automatically trigger video record;Condition triggering video recording needs to formulate condition triggering video recording according to management for user in advance Plan rules, the condition of triggering includes alarm, event, linkage, prediction scheme etc., and specific trigger condition soon starts once producing Video record;Triggering video recording needs immediately to select video recording target and manually boot video record according to management for user manually. Plan triggering command parameter in record task triggering command includes record a video target, video recording starting time, video recording persistent period, record As picture bit stream and the regular execution state of video recording etc.;Condition triggering video recording order parameter include record a video target, video recording trigger condition, Video recording persistent period, video frames code stream and the regular execution state of video recording etc.;Triggering video recording order parameter includes mesh of recording a video manually Mark, video recording trigger condition, video recording persistent period, video frames code stream and the regular execution state of video recording etc..Described video data is deposited In storage system, the high record task triggering command of the priority of setting corresponding storage code stream is more than the low record task of priority Triggering command corresponding storage code stream, the judgement of system advanced row major level when executing store instruction triggering command, excellent First carry out the higher store tasks of priority, and the higher store tasks of priority corresponding storage code stream is higher, is automatically entered The conversion of row storage code stream;Judge again to deposit in the case that new storage execution priority is not less than store tasks priority in execution The storage rule of storage code stream height carries out judging whether task in conversion storage.
In a specific embodiment, when the triggering video recording instruction that described data receipt unit 1 receives is plan triggering Video recording instruction when, store tasks specifically for from one video recording starting time from the beginning of, by one record a video the persistent period in video data Store to memory element 6 according to storage code stream;
When the triggering video recording instruction that described data receipt unit 1 receives is for condition triggering video recording instruction, store tasks Specifically for when meeting video recording trigger condition, a video data recorded a video in the persistent period being stored to depositing according to storage code stream Storage unit 6;
When the triggering video recording instruction that described data receipt unit 1 receives is for manual triggering video recording instruction, store tasks Specifically for when receiving manual triggering video recording instruction, directly by a video data recorded a video in the persistent period according to storage code Stream stores to memory element 6.
Present invention difference and video storage method of the prior art and storage device, in the mistake of video high-low code flow transcoding Cannot realize in journey seamlessly transitting, in speed and picture all can blunt and be detained the problems such as, by field is used to difference Scape arranges corresponding priority and corresponding storage code stream, adopts high code stream to be stored to ensure video under special screne The definition of picture, and carry out video storage to save memory space with extremely low code stream, in video recording under common scenarios at ordinary times During when need to carry out high-low code flow switching or accept new record task triggering command, data receipt unit 1 will The triggering command receiving sends to scheduling unit 2, judges whether to have executory in performance element 3 by scheduling unit 2 Business, if nothing store tasks in commission, triggering performance element 3 executes new store tasks immediately;If depositing storage in commission to appoint Business, scheduling unit 2 judges the priority of store tasks and new store tasks in execution, and the preferential execution priority of performance element 3 is relatively High store tasks;When the priority of the new store tasks receiving is not higher than store tasks in the execution in performance element 3, adjust Spend unit 2 and then judge the code stream height of new store tasks and store tasks in execution, when the first storage code of new store tasks Stream when being not higher than the second storage code stream of store tasks in executing sends store tasks triggering command to the first performance element 4, First performance element 4 calculates remaining execution time according to the executed time of store tasks in execution and video recording persistent period, Then proceed to remaining execution time complete execution in store tasks, and when after the completion of next second execute new store tasks;If new When first code stream code stream of store tasks is higher than the second storage code stream of the store tasks in performance element 3, stored task is touched Send instructions the second performance element 5 sending to performance element 3, and the second performance element 5 is according to the executed of store tasks in execution Time and video recording persistent period calculate remaining execution time, then when next second video data of store tasks in execution receives New store tasks are executed after finishing.Can guarantee that the seriality of video storage by this video storage method, ensure video image Seamlessly transitting of different storage code stream conversion is realized, without producing the delay of picture, impact monitoring while quality.Meanwhile, In being not carried out, when task, automatically triggering module of pre-recording is carried out pre-recording task, for recording accident, occurs the last period Video information in time, makes the Video content before and after accident complete, so that the reality of the complete grasp scene of staff When monitoring.Furthermore, described pre- recording function also can reclaim expired prerecorded data in time to save memory space.
The foregoing is only embodiments of the invention, not thereby limit the present invention the scope of the claims, every using this Equivalent structure or equivalent flow conversion that bright description and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (8)

1. a kind of video data storage method supporting switching code stream, is applied in the main frame of monitoring system, monitoring system includes Obtain the camera head of video data and communicate, with camera head, the main frame being connected it is characterised in that methods described includes walking Rapid:
S1: receive video data, judge whether newly to receive the record task triggering command for executing store tasks simultaneously, if It is, then execution step s2;Wherein, described store tasks be used for will video recording the persistent period in video data and index data according to Storage code stream stores to memory element;
S2: determine whether store tasks in execution, and judge the video recording newly receiving when being determined with store tasks in execution Whether the first storage code stream of the corresponding new store tasks of task triggering command stores code higher than second of store tasks in execution Stream, if so, execution step s4, if it is not, execution step s3;
S3: remaining execution time, Ran Houji are calculated according to the executed time of store tasks in execution and video recording persistent period Continue remaining execution time complete execution in store tasks, and when after the completion of next second execute new store tasks;
S4: according to execution in store tasks the executed time and video recording the persistent period calculate remaining execution time, then when In execution, next second video data of store tasks executes new store tasks after receiving;
In described step s2, " determine whether store tasks in execution, if " further comprises the steps of: below and judges new store tasks Priority whether more than task in execution, when judging to be more than, execute described step s4, when judging to be not more than, execute step In rapid s2 " whether the first storage code stream judging the corresponding new store tasks of record task triggering command newly receiving be higher than Second storage code stream of store tasks in execution " step.
2. a kind of video data storage method supporting to switch code stream according to claim 1 is it is characterised in that also include Step: when judging to be not carried out in task store tasks and be not received by record task triggering command, starting pre-records appoints Business, video data and corresponding index data are saved in annular cushion area.
3. a kind of video data storage method supporting to switch code stream according to claim 1 is it is characterised in that described record As the type of task triggering command includes plan triggering video recording instruction, manual triggering video recording instruction and the bar that priority improves successively Part triggering video recording instruction, the high record task triggering command of priority corresponding storage code stream is more than the low record task of priority Triggering command corresponding storage code stream.
4. according to claim 1 a kind of support switch code stream video data storage method it is characterised in that
When described record task triggering command is plan triggering video recording instruction, store tasks are specifically for when a video recording starts Between start, by one record a video the persistent period in video data according to storage code stream storage;
When described record task triggering command is for condition triggering video recording instruction, store tasks are specifically for when satisfaction video recording triggering During condition, by a video data recorded a video in the persistent period according to storage code stream storage;
When described record task triggering command is for manual triggering video recording instruction, store tasks are touched manually specifically for working as to receive When sending out video recording instruction, directly by a video data recorded a video in the persistent period according to storage code stream storage.
5. a kind of video data storage systems supporting switching code stream, run in the main frame of monitoring system, monitoring system includes Obtain the camera head of video data and communicate, with camera head, the main frame being connected it is characterised in that described support switches code The video data storage systems of stream include:
Data receipt unit, for receiving video data, judges whether newly to receive the video recording for executing store tasks simultaneously Task triggering command, wherein, described store tasks are used for the video data in the video recording persistent period and index data according to depositing Storage code stream stores to memory element;
Scheduling unit, for, after described data receipt unit judges newly to receive record task triggering command, determining whether Store tasks in execution, and judge that when being determined with store tasks in execution the record task triggering command newly receiving is corresponding Whether the first storage code stream of new store tasks stores code stream higher than second of store tasks in execution;
Performance element, for executing store tasks, including:
First performance element, for when described scheduling unit judges first storage code stream the not higher than second storage code stream, according to In execution, the executed time of store tasks and video recording persistent period calculate remaining execution time, then proceed in remaining execution Time complete execution in store tasks, and when after the completion of next second execute new store tasks;And
Second performance element, for when described scheduling unit judges that the first storage code stream is higher than the second storage code stream, according to holding In row, the executed time of store tasks and video recording persistent period calculate remaining execution time, then when store tasks in execution Next second video data receive after execute new store tasks;
Described scheduling unit specifically includes:
Priority scheduling module, whether the priority for after being determined with store tasks in execution, judging new store tasks is big The priority of task in execution, and described second performance element execution corresponding operating is notified when judging and being more than;And
Code stream scheduling module, the priority for judging new store tasks when described priority scheduling module is not more than in execution appoints During the priority of business, execution is described " to judge that the first of the corresponding new store tasks of record task triggering command newly receiving deposit Whether storage code stream higher than the second storage code stream of store tasks in execution " operation.
6. a kind of video data storage systems supporting to switch code stream according to claim 5 are it is characterised in that described hold Row unit also includes module of pre-recording, for judging to be not carried out in task store tasks in performance element simultaneously when described scheduling unit And when being not received by record task triggering command, start task of pre-recording, video data and corresponding index data are saved in In annular cushion area.
7. according to claim 5 a kind of support switch code stream video data storage systems it is characterised in that
The type of the record task triggering command that described data receipt unit receives includes the plan triggering that priority improves successively Video recording instruction, manually triggering video recording instruction and condition triggering video recording instruction, the high record task triggering command of priority is corresponding Storage code stream is more than the low record task triggering command corresponding storage code stream of priority.
8. according to claim 5 a kind of support switch code stream video data storage systems it is characterised in that
When the triggering video recording instruction that described data receipt unit receives is for plan triggering video recording instruction, store tasks are specifically used Yu Congyi video recording starting time starts, and a video data recorded a video in the persistent period is stored single to storage according to storage code stream Unit;
When the triggering video recording instruction that described data receipt unit receives is for condition triggering video recording instruction, store tasks are specifically used In when meeting video recording trigger condition, a video data recorded a video in the persistent period is stored single to storage according to storage code stream Unit;
When the triggering video recording instruction that described data receipt unit receives is for manual triggering video recording instruction, store tasks are specifically used In when receiving manual triggering video recording instruction, directly by a video data recorded a video in the persistent period according to storage code stream storage To memory element.
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 CN103824574A (en) 2014-05-28
CN103824574B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141891B (en) * 2015-08-04 2019-04-30 浙江宇视科技有限公司 It records a video before a kind of police caching method and device
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
CN108076317B (en) * 2016-11-17 2020-08-11 杭州海康威视数字技术股份有限公司 Video data storage method and system, video access method and node

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100691327B1 (en) * 2005-10-10 2007-03-12 삼성전자주식회사 Display device and control method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN103824574A (en) 2014-05-28

Similar Documents

Publication Publication Date Title
CN103824574B (en) Video data storage method and system capable of supporting code stream switching
CN100592379C (en) Apparatuses and methods for switching between buffers using a video frame buffer flip queue
CN105430480B (en) A method and system for storing video data
CN101815168B (en) Imaging apparatus, and variable speed imaging method
CN104219579A (en) Video switching method and video switching device
CN105763885B (en) Method and device for releasing three-dimensional image-text information in real time
CN101959071B (en) Synchronous decoding method and device
CN104469310A (en) Record data network storage method and system and video monitoring platform
CN104320701B (en) The switching method and device of signal source
CN103544055A (en) Method for collecting resource demand data, and method and system for stably running application programs
CA2795296A1 (en) Trick playback of video data
CN103974013B (en) Carry out the method and video record equipment of video record playback
CN106926466B (en) A kind of method and system of 3D printing video monitoring
US9338421B2 (en) Imaging apparatus and control method for the same, shooting control apparatus, and shooting control method
CN103338351A (en) A method, an apparatus, and a system for monitoring video data uploading through utilizing a wireless network
CN105163167A (en) Method and device for continuing to play video
CN105872711B (en) Switching animation display method and device during multi-system switching
CN104038806B (en) A kind of application interface display methods and set top box
CN106598411B (en) Information processing method and electronic equipment
US9472167B2 (en) Video capture through hardware
US20100223580A1 (en) Data browsing apparatus and control method therefor
CN107087232A (en) The real-time status detection method and system of user
CN106385627A (en) Video coding method and device
CN102457693A (en) System and method capable of regularly recording TV programmes
CN105163073A (en) Image analysis based expressway monitoring method

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