CN106993147B - A kind of video recording covering method, device and network hard disk video recorder - Google Patents

A kind of video recording covering method, device and network hard disk video recorder Download PDF

Info

Publication number
CN106993147B
CN106993147B CN201710168855.9A CN201710168855A CN106993147B CN 106993147 B CN106993147 B CN 106993147B CN 201710168855 A CN201710168855 A CN 201710168855A CN 106993147 B CN106993147 B CN 106993147B
Authority
CN
China
Prior art keywords
storage medium
target storage
file
video
video file
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
CN201710168855.9A
Other languages
Chinese (zh)
Other versions
CN106993147A (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 Infinova Ltd
Original Assignee
Shenzhen Infinova 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 Infinova Ltd filed Critical Shenzhen Infinova Ltd
Priority to CN201710168855.9A priority Critical patent/CN106993147B/en
Publication of CN106993147A publication Critical patent/CN106993147A/en
Application granted granted Critical
Publication of CN106993147B publication Critical patent/CN106993147B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/78Television signal recording using magnetic recording
    • H04N5/781Television signal recording using magnetic recording on disks or drums

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Television Signal Processing For Recording (AREA)
  • Management Or Editing Of Information On Record Carriers (AREA)

Abstract

The invention belongs to protection and monitor field, provide a kind of video recording covering method, device and network hard disk video recorder, the method judge whether the current state of target storage medium is equilibrium state when meeting preset coverage condition;If the current state of the target storage medium is equilibrium state, it is determined that recording channel corresponding with currently video file to be stored;Choose determining corresponding first video file of the recording channel;First video file of selection is covered.Through the embodiment of the present invention, whether the current state for first determining whether target storage medium is equilibrium state, only when it is equilibrium state, each recording channel can just cover the earliest video file of this recording channel storage initial time, and when it is nonequilibrium condition, then can other covering methods be taken, efficiency and reasonability have been taken into account according to the actual situation.

Description

A kind of video recording covering method, device and network hard disk video recorder
Technical field
The invention belongs to protection and monitor field more particularly to a kind of video recording covering methods, device and network hard disk video recorder (Network Video Recorder, NVR).
Background technique
With the development of security industry high-definition video technology and informationization technology, what it is there is an urgent need to raising is NVR items industry The performance of business, wherein video recording covering is not only the most crucial business of NVR, and is also the basic guarantee of NVR efficient stable.Record As covering specifically refers to need after Video data writes disk space that data are written again in original data.Magnetic Disk space is always limited, and is recorded a video and cannot be stopped, so video recording covering is exactly to be repeated after first round blank writes It rewrites, the two big key factors for influencing video recording covering are disk space size and recording channel quantity.
Video recording covering method in the prior art is mostly on the basis of file writes full, and the video recording in each channel is unconditional Ground directly covers the earliest file of itself, although this covering method is easy, due to not considering the practical shape in each channel State, what is covered not necessarily needs most capped file.
Summary of the invention
In consideration of it, the embodiment of the present invention provides a kind of video recording covering method and device, to solve existing video recording covering side It is coating to there is not necessarily needing most of being covered in method with the earliest file that the video recording in each channel directly covers itself The problem of file of lid.
A kind of video recording covering method provided in an embodiment of the present invention may include:
When meeting preset coverage condition, judge whether the current state of target storage medium is equilibrium state;It is described Equilibrium state is the covering weight system of corresponding each first video file of each recording channel in the target storage medium Number meets state when preset weight coefficient condition;The covering weight coefficient is used to characterize capped preferential of video file Degree, the covering cycle of recording channel where storing initial time and the video file by the file of the video file come It determines;First video file is that file stores the earliest video file of initial time in recording channel;
If the current state of the target storage medium is equilibrium state, it is determined that corresponding with currently video file to be stored Recording channel;
Choose determining corresponding first video file of the recording channel;
First video file of selection is covered.
Further, it after whether the current state for judging target storage medium is equilibrium state, can also wrap It includes:
If the current state of the target storage medium is nonequilibrium condition, according to preset selection rule from described each Alternative file to be covered is chosen in a recording channel;
The covering weight coefficient corresponding with the alternatively file to be covered is calculated according to preset computation rule;
The alternative file to be covered is ranked up according to the covering weight coefficient, obtains ranking results;
The alternative file to be covered is covered according to the ranking results.
Preferably, whether the current state for judging target storage medium is that equilibrium state may include:
Obtain the maximum value and minimum value in the covering weight coefficient of each first video file;
Calculate the difference of the maximum value and the minimum value;
Judge whether the difference of the maximum value and the minimum value is less than preset first threshold;
If the difference of the maximum value and the minimum value is less than the first threshold, it is determined that the target storage medium Current state be equilibrium state;
If the difference of the maximum value and the minimum value is greater than or equal to the first threshold, it is determined that the target is deposited The current state of storage media is nonequilibrium condition.
Optionally, whether the current state for judging target storage medium is that equilibrium state may include:
Calculate the variance of the covering weight coefficient of each first video file;
Judge whether the variance is less than preset second threshold;
If the variance is less than the second threshold, it is determined that the current state of the target storage medium is equilibrium-like State;
If the variance is greater than or equal to the second threshold, it is determined that the current state of the target storage medium is non- Equilibrium state.
Further, after first video file chosen at described Dui covers, can also include:
Judge the video recording of the recording channel of the target storage medium or each recording channel of the target storage medium Whether code stream changes;
If the video recording code of the recording channel of the target storage medium or each recording channel of the target storage medium Stream changes, then the current state for modifying the target storage medium is nonequilibrium condition.
A kind of video recording cladding system provided in an embodiment of the present invention may include:
First judgment module, for when meeting preset coverage condition, judging that the current state of target storage medium is No is equilibrium state;The equilibrium state is corresponding each first video recording of each recording channel in the target storage medium The covering weight coefficient of file meets state when preset weight coefficient condition;The covering weight coefficient is for characterizing video recording The capped degree of priority of file is recorded a video where storing initial time and the video file by the file of the video file The covering cycle in channel determines;First video file is that file stores the earliest video recording text of initial time in recording channel Part;
Determining module, if for the target storage medium current state be equilibrium state, it is determined that with currently wait deposit Store up the corresponding recording channel of video file;
First chooses module, for choosing corresponding first video file of the determining recording channel;
First overlay module, for being covered to first video file of selection.
Further, the video recording cladding system can also include:
Second chooses module, if the current state for the target storage medium is nonequilibrium condition, according to default Selection rule alternative file to be covered is chosen from each recording channel;
Computing module, for calculating the covering corresponding with the alternatively file to be covered according to preset computation rule Weight coefficient;
Sorting module is arranged for being ranked up according to the covering weight coefficient to the alternative file to be covered Sequence result;
Second overlay module, for being covered according to the ranking results to the alternative file to be covered.
Preferably, the first judgment module may include:
Acquiring unit, the maximum value and minimum in covering weight coefficient for obtaining each first video file Value;
First computing unit, for calculating the difference of the maximum value and the minimum value;
First judging unit, for judging whether the difference of the maximum value and the minimum value is less than preset first threshold Value;
First determination unit, if being less than the first threshold for the difference of the maximum value and the minimum value, really The current state of the fixed target storage medium is equilibrium state;
Second determination unit, if being greater than or equal to first threshold for the difference of the maximum value and the minimum value Value, it is determined that the current state of the target storage medium is nonequilibrium condition.
Optionally, the first judgment module may include:
Second computing unit, the variance of the covering weight coefficient for calculating each first video file;
Second judgment unit, for judging whether the variance is less than preset second threshold;
Third determination unit, if being less than the second threshold for the variance, it is determined that the target storage medium Current state is equilibrium state;
4th determination unit, if being greater than or equal to the second threshold for the variance, it is determined that the target storage The current state of medium is nonequilibrium condition.
Further, the video recording cladding system can also include:
Second judgment module, for judge the target storage medium recording channel or the target storage medium it is each Whether the video recording code stream of a recording channel changes;
Modified module, if for the recording channel of the target storage medium or each video recording of the target storage medium The video recording code stream in channel changes, then the current state for modifying the target storage medium is nonequilibrium condition.
A kind of network hard disk video recorder provided in an embodiment of the present invention may include that above-described any video recording covers Lid arrangement.
Existing beneficial effect is the embodiment of the present invention compared with prior art: the embodiment of the present invention is worked as and meets preset cover When cover fillet part, judge whether the current state of target storage medium is equilibrium state;The equilibrium state is target storage The covering weight coefficient of corresponding each first video file of each recording channel on medium meets preset weight coefficient item State when part;The covering weight coefficient is used to characterize the capped degree of priority of video file, passes through the video file File storage initial time and the covering cycle of video file place recording channel determine;First video file The earliest video file of initial time is stored for file in recording channel;If the current state of the target storage medium is balance State, it is determined that recording channel corresponding with currently video file to be stored;Choose the determining recording channel corresponding the One video file;First video file of selection is covered.Through the embodiment of the present invention, first determine whether that target stores Whether the current state of medium is equilibrium state, and only when it is equilibrium state, each recording channel can just cover this video recording Channel stores the earliest video file of initial time, and when it is nonequilibrium condition, then it can take it according to the actual situation Its covering method, such as each recording channel is uniformly accounted for, by scheduled calculation method to each recording channel In video file assessed, select prepreerence video file to cover.It can both guarantee to adopt in equilibrium state in this way Most convenient and fast covering method is taken, and can guarantee other methods is taken to be covered in nonequilibrium condition must most need Video file to be covered, has taken into account efficiency and reasonability.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to needed in the embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for ability For the those of ordinary skill of domain, without any creative labor, it can also be obtained according to these attached drawings others Attached drawing.
Fig. 1 is a kind of schematic flow diagram for video recording covering method that the embodiment of the present invention one provides;
Fig. 2 is the schematic flow diagram for the first preferred steps that the embodiment of the present invention one provides;
Fig. 3 is the schematic flow diagram for the first optional step that the embodiment of the present invention one provides;
Fig. 4 is a kind of schematic block diagram of cladding system of recording a video provided by Embodiment 2 of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " instruction is described special Sign, entirety, step, operation, the presence of element and/or component, but be not precluded one or more of the other feature, entirety, step, Operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt Be construed to " when ... " or " once " or " in response to determination " or " in response to detecting ".Similarly, phrase " if it is determined that " or " if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
Embodiment one:
A kind of schematic flow diagram for video recording covering method that the embodiment of the present invention one provides referring to Fig. 1, be specifically described as Under:
Step S101 judges whether the current state of target storage medium is balance when meeting preset coverage condition State.
If the current state of the target storage medium is equilibrium state, S102~S104 is thened follow the steps.
If the current state of the target storage medium is nonequilibrium condition, S107~step S110 is thened follow the steps.
The coverage condition can be with are as follows: the remaining space of the target storage medium is less than preset reserved space, at this In embodiment, FreeSpace can be used to indicate remaining space, indicate reserved space using ReservedSpace, The unit of FreeSpace and ReservedSpace generally takes GB.
Then the coverage condition can indicate are as follows: FreeSpace < ReservedSpace.
The size of ReservedSpace can be arranged by system default, can also be set according to the actual situation by user It sets, the present embodiment is not especially limited this.
Unless otherwise specified, the target storage medium is the disk for storing video file in the present embodiment, especially TotalSpace can be used to indicate in total memory space of the disk of NVR, the target storage medium, and unit is generally GB.
The equilibrium state is corresponding each first video file of each recording channel in the target storage medium State of covering weight coefficient when meeting preset weight coefficient condition;The covering weight coefficient is for characterizing video file Capped degree of priority, recording channel where storing initial time and the video file by the file of the video file Covering cycle determine;First video file is that file stores the earliest video file of initial time in recording channel.
In the present embodiment, Channels can be used to indicate the recording channel number of the target storage medium, singly Position is a.Generally, 0~Channels-1 of number can be used each recording channel is numbered.
In the present embodiment, FileCount_n can be used to indicate each recording channel of the target storage medium Video file number, unit is a.The value of n is [0, Channels-1], the i.e. video file of the recording channel marked as 0 Number is FileCount_0, and the video file number of the recording channel marked as 1 is FileCount_1, and subsequent each video recording is logical The video file number in road and so on.
In the present embodiment, FileSpace can be used to indicate the size of single video file, unit MB, this reality Apply middle default FileSpace=300MB, it is readily appreciated that ground, it in practice can also be by user according to the actual situation to FileSpace It is configured, the present embodiment is not especially limited this.
TimeFile_n_m can be used to indicate in the file storage initial time of each video file, and unit is the second, What middle n was indicated is recording channel label, and what m was indicated is video file number, and the value of m is [0, FileCount_n-1].Generally Ground, video file number are to store initial time according to file to number, and file storage initial time is more early, then video file The value of number m is also smaller, for example, when the video file that video file number m is 0 is exactly file storage starting in existing file Between earliest video file.
In the present embodiment, Factor_n_m can be used to indicate covering weight coefficient, indicated using Period_n Covering cycle.
Preferably, the covering weight coefficient is both negatively correlated with the file of video file storage initial time, also with The covering cycle of recording channel is negatively correlated where the video file.For example, can define as follows:
Wherein, TimeNow is current time, and unit is the second.
Obviously, file storage initial time is smaller (more early), and covering cycle is smaller (shorter), then covers weight coefficient and get over Greatly.
Ideally, if the video recording code stream of each recording channel (can be indicated, unit is with BitRate_n Mbps it) is all consistent, and the covering cycle of each recording channel is also all consistent, and is denoted as Period, it is further assumed that covering Period be with total memory space of target storage medium it is matched (practical application and planning in, target storage medium is always deposited Storing up space is the space occupied corresponding to covering cycle to be slightly larger than), i.e. Period=TotalSpace*1024*8/ (BitRate_n*Channels), then following change can be done to above formula:
Wherein, TimeDefined=max (TimeFileDiff_max, Period), that is, take TimeFileDiff_max and The larger value in Period, and TimeFileDiff_max=TimeNow-TimeFile_min, wherein TimeFile_min be Minimum value in each TimeFile_n_m.Compared with original calculation formula, the formula after change is counted under identical circumstances The Factor_n_m obtained generally can be smaller, it is easier to meet preset weight coefficient condition.
It is readily appreciated that ground, above is only a kind of example to covering weight coefficient calculation formula, in practice can also be by User is according to the actual situation configured covering weight coefficient calculation formula, and the present embodiment is not especially limited this.For example, It was both positively correlated with the file of video file storage initial time alternatively it is also possible to which the covering weight coefficient is arranged, It is positively correlated with the covering cycle of recording channel where the video file, then, file storage initial time is smaller (more early), covers The lid period is smaller (shorter), then it is smaller to cover weight coefficient.
Preferably, step S101 may include the first preferred steps as shown in Figure 2:
Step S201 obtains maximum value and minimum value in the covering weight coefficient of each first video file.
Step S202 calculates the difference of the maximum value and the minimum value;
Step S203, judges whether the difference of the maximum value and the minimum value is less than preset first threshold;
If the difference of the maximum value and the minimum value is less than the first threshold, S204 is thened follow the steps, is otherwise held Row step S205.
Step S204 determines that the current state of the target storage medium is equilibrium state;
Step S205 determines that the current state of the target storage medium is nonequilibrium condition.
Specifically, the smallest TimeFile_n_m is obtained, TimeFile_min is denoted as, while being obtained in each recording channel The smallest TimeFile_n_m, then the maximum is taken, it is denoted as TimeFile_ChannelMin_max.Calculate separately TimeFile_ The corresponding Factor_n_m of min and TimeFile_ChannelMin_max, is set to Factor_max and Factor_ ChannelMax_min, if the difference of the two be less than the first threshold (such as desirable 0.001 or 0.0001 or it is other more Small value), it is determined that the current state of the target storage medium is equilibrium state, otherwise, it determines the target storage medium Current state be nonequilibrium condition.
The above is a kind of FUZZY ALGORITHMS FOR CONTROL, because when multiple recording channels, it is impossible to respective first video recording text The covering weight coefficient of part is all essentially equal, but when differing few, still it is believed that the first of each recording channel records a video The file storage initial time of file is relative synchronization, i.e., gap is negligible, then each channel need to only cover itself File, that is, enter a kind of equilibrium state.Else if stringent calculate, such as two of them recording channel A and B, first Wheel A first deletes two files, creates file to AB, the second wheel B deletes two files again and creates file to AB;So final effect It is similar with fuzzy control, but calculates but all existing all the time.And it is numerous to calculate the parameter being related to every time, all may Risk is brought, unstability is increased.Space is bigger, and channel is more, and calculation amount is bigger.
Preferably, total storage of the first threshold (Range can be used to indicate) and the target storage medium is empty Between it is negatively correlated, i.e., total memory space is bigger, and the first threshold is smaller.
For the relationship being better described between the first threshold and total memory space of the target storage medium, with Under illustrated by specific example:
For example, the total memory space TotalSpace of certain disk is 10TB, Channels is 100, and BitRate_n is 4Mbps can calculate Period=TotalSpace*1024*8/ if the covering cycle of each recording channel is all consistent (BitRate_n*Channels)=209715.2 second, about 58 hours.If taking the first threshold Range at this time is 0.004, Corresponding two video files at most can gap 0.004*Period, about 14 minutes, 14 minutes relative to the 58 small of Period Shi Eryan is acceptable, reasonably.If the total memory space TotalSpace of disk becomes 100TB, Period has become about 580 hours, can adjust Range downwards at this time was 0.0005, then corresponding two video files at most can gap 0.004* Period, about 17 minutes.
Optionally, step S101 may include the first optional step as shown in Figure 3:
Step S301 calculates the variance of the covering weight coefficient of each first video file;
Step S302, judges whether the variance is less than preset second threshold;
If the variance is less than the second threshold, S303 is thened follow the steps, it is no to then follow the steps S304.
Step S303 determines that the current state of the target storage medium is equilibrium state;
Step S304 determines that the current state of the target storage medium is nonequilibrium condition.
Preferably, the second threshold and total memory space of the target storage medium are negatively correlated, i.e., total memory space Bigger, the second threshold is smaller.
It is readily appreciated that ground, it is all each by measuring that the effect of the first optional step and the first preferred steps, which is identical, The extent of deviation of weight coefficient is covered to judge whether current state is equilibrium state, but the measurement standard used is different, first Preferred steps be with maximum deviation (i.e. the difference of maxima and minima) Lai Hengliang, the first optional step be with variance come It measures.It certainly, is diversified to the measurement mode of the extent of deviation of each covering weight coefficient, however it is not limited to both sides Formula according to the actual situation can also be configured specific measurement mode by user in practice, and the present embodiment is not made this specifically It limits.
Step S102 determines recording channel corresponding with currently video file to be stored;
Step S103 chooses corresponding first video file of the determining recording channel;
Step S104 covers first video file of selection.
Algorithm above is exactly rationally using target storage medium memory space is big, recording channel number is more, video file The more and runing times of number are waited so long feature, and the gap between greatest coefficient and the minimum value of single channel greatest coefficient is calculated, When gap is seldom, the state of a relative equilibrium can be entered, then each channel only needs to cover the earliest file in this channel ?;It greatly reduces and covers again and again, is innumerable, being without end without necessary calculating, while also greatly improving The stability of covering;And after covering runs a period of time, more or when space is bigger in channel, advantage is more obvious.
Preferably, after step s 104, the video recording covering method can also include step S105:
Each video recording of step S105, the recording channel or the target storage medium that judge the target storage medium are logical Whether the video recording code stream in road changes;
If the video recording code of the recording channel of the target storage medium or each recording channel of the target storage medium Stream changes, and thens follow the steps S106;Otherwise, it may be determined that the current state of the target storage medium is still equilibrium-like at this time State can continue to be covered according to step S102~step S104 method.
Step S106, the current state for modifying the target storage medium is nonequilibrium condition.It later can be according to step S107~step S110 method is covered.
Step S107 chooses alternative file to be covered according to preset selection rule from each recording channel;
Step S108 calculates the covering weight corresponding with the alternatively file to be covered according to preset computation rule Coefficient;
Step S109 is ranked up the alternative file to be covered according to the covering weight coefficient, obtains sequence knot Fruit;
Step S110 covers the alternative file to be covered according to the ranking results.
After step silo, it can return to the judgement that step S101 continues to execute equilibrium state.
Step S107~S110 is when the current state of target storage medium is nonequilibrium condition, to each recording channel It uniformly accounts for, the video file in each recording channel is assessed by scheduled calculation method, select override Video file cover.
It is readily appreciated that ground, all of above narration is only to cover with a wheel to be illustrated, video recording covering in practice It is that ceaselessly circulation carries out.
In conclusion the embodiment of the present invention when meeting preset coverage condition, judges the current shape of target storage medium Whether state is equilibrium state;The equilibrium state is each recording channel corresponding each first in the target storage medium The covering weight coefficient of video file meets state when preset weight coefficient condition;The covering weight coefficient is for characterizing The capped degree of priority of video file stores initial time and video file place by the file of the video file The covering cycle of recording channel determines;First video file is that file stores the earliest record of initial time in recording channel As file;If the current state of the target storage medium is equilibrium state, it is determined that corresponding with currently video file to be stored Recording channel;Choose determining corresponding first video file of the recording channel;To first video file of selection It is covered.Through the embodiment of the present invention, whether the current state for first determining whether target storage medium is equilibrium state, is only existed When it is equilibrium state, each recording channel can just cover the earliest video file of this recording channel storage initial time, and work as When it is nonequilibrium condition, then other covering methods can be taken according to the actual situation, such as unified to each recording channel It accounts for, the video file in each recording channel is assessed by scheduled calculation method, selects prepreerence record It is covered as file.It can not only guarantee to take most convenient and fast covering method in equilibrium state in this way, but also can guarantee non-flat Take that other methods to be covered when weighing apparatus state must need most capped video file, take into account efficiency and rationally Property.
Embodiment two:
It referring to fig. 4, is a kind of schematic block diagram of cladding system of recording a video provided by Embodiment 2 of the present invention, for the ease of saying It is bright, part related to the embodiment of the present invention is only shown.
The video recording cladding system can be the software unit being built in terminal (such as NVR etc.), hardware cell or soft Harden the unit closed, can also be used as independent pendant and is integrated into the terminal.
The video recording cladding system may include:
First judgment module 401, for when meeting preset coverage condition, judging the current state of target storage medium It whether is equilibrium state;The equilibrium state is corresponding each first record of each recording channel in the target storage medium Meet state when preset weight coefficient condition as the covering weight coefficient of file;The covering weight coefficient is for characterizing record As the degree of priority that file is capped, recorded where storing initial time and the video file by the file of the video file It is determined as the covering cycle in channel;First video file is that file stores the earliest video recording of initial time in recording channel File;
Determining module 402, if for the target storage medium current state be equilibrium state, it is determined that with currently to Store the corresponding recording channel of video file;
First chooses module 403, for choosing corresponding first video file of the determining recording channel;
First overlay module 404, for being covered to first video file of selection.
Preferably, the first judgment module 401 may include:
Acquiring unit 4011, the maximum value and most in covering weight coefficient for obtaining each first video file Small value;
First computing unit 4012, for calculating the difference of the maximum value and the minimum value;
First judging unit 4013, for judging whether the difference of the maximum value and the minimum value is less than preset One threshold value;
First determination unit 4014, if being less than the first threshold for the difference of the maximum value and the minimum value, The current state for then determining the target storage medium is equilibrium state;
Second determination unit 4015, if being greater than or equal to described first for the difference of the maximum value and the minimum value Threshold value, it is determined that the current state of the target storage medium is nonequilibrium condition.
Optionally, the first judgment module 401 may include:
Second computing unit 4016, the variance of the covering weight coefficient for calculating each first video file;
Second judgment unit 4017, for judging whether the variance is less than preset second threshold;
Third determination unit 4018, if being less than the second threshold for the variance, it is determined that the target storage is situated between The current state of matter is equilibrium state;
4th determination unit 4019, if being greater than or equal to the second threshold for the variance, it is determined that the target The current state of storage medium is nonequilibrium condition.
Further, the video recording cladding system can also include:
Second judgment module 405, for judge the target storage medium recording channel or the target storage medium The video recording code stream of each recording channel whether change;
Modified module 406, if for the target storage medium recording channel or the target storage medium it is each The video recording code stream of recording channel changes, then the current state for modifying the target storage medium is nonequilibrium condition.
Further, the video recording cladding system can also include:
Second chooses module 407, if the current state for the target storage medium is nonequilibrium condition, according to pre- If selection rule alternative file to be covered is chosen from each recording channel;
Computing module 408, it is corresponding described with the alternative file to be covered for being calculated according to preset computation rule Cover weight coefficient;
Sorting module 409 is obtained for being ranked up according to the covering weight coefficient to the alternative file to be covered Ranking results;
Second overlay module 410, for being covered according to the ranking results to the alternative file to be covered.
Those of ordinary skill in the art may be aware that mould described in conjunction with the examples disclosed in the embodiments of the present disclosure Block and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not It is considered as beyond the scope of this invention.
In embodiment provided by the present invention, it should be understood that disclosed device and method can pass through others Mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the module or unit, Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be with In conjunction with or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling or direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING of device or unit or Communication connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional module in each embodiment of the present invention can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the embodiment of the present invention Substantially all or part of the part that contributes to existing technology or the technical solution can be with software product in other words Form embody, which is stored in a storage medium, including some instructions use so that one Computer equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute this hair The all or part of the steps of bright each embodiment the method for embodiment.And storage medium above-mentioned include: USB flash disk, mobile hard disk, Read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic The various media that can store program code such as dish or CD.
Embodiment three:
The embodiment of the present invention provides a kind of network hard disk video recorder, which may include Fig. 4 corresponding Any one video recording cladding system described in embodiment.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and model of each embodiment technical solution of the embodiment of the present invention that it does not separate the essence of the corresponding technical solution It encloses.

Claims (7)

1. a kind of video recording covering method characterized by comprising
When meeting preset coverage condition, judge whether the current state of target storage medium is equilibrium state;The balance State is that the covering weight coefficient of corresponding each first video file of each recording channel in the target storage medium is full State when the preset weight coefficient condition of foot;The covering weight coefficient is used to characterize the capped preferential journey of video file Degree, the covering cycle of recording channel is where storing initial time and the video file by the file of the video file come really It is fixed;First video file is that file stores the earliest video file of initial time in recording channel;
If the current state of the target storage medium is equilibrium state, it is determined that record corresponding with currently video file to be stored As channel;
Choose determining corresponding first video file of the recording channel;
First video file of selection is covered;
Whether the current state for judging target storage medium is that equilibrium state includes:
Obtain the maximum value and minimum value in the covering weight coefficient of each first video file;
Calculate the difference of the maximum value and the minimum value;
Judge whether the difference of the maximum value and the minimum value is less than preset first threshold;
If the difference of the maximum value and the minimum value is less than the first threshold, it is determined that the target storage medium is worked as Preceding state is equilibrium state;
If the difference of the maximum value and the minimum value is greater than or equal to the first threshold, it is determined that the target storage is situated between The current state of matter is nonequilibrium condition.
2. video recording covering method according to claim 1, which is characterized in that in the current of the judgement target storage medium After whether state is equilibrium state, further includes:
If the current state of the target storage medium is nonequilibrium condition, according to preset selection rule from each record As choosing alternative file to be covered in channel;
The covering weight coefficient corresponding with the alternatively file to be covered is calculated according to preset computation rule;
The alternative file to be covered is ranked up according to the covering weight coefficient, obtains ranking results;
The alternative file to be covered is covered according to the ranking results.
3. video recording covering method according to any one of claim 1 to 2, which is characterized in that in the institute that described pair is chosen It states after the first video file covered, further includes:
Judge the video recording code stream of the recording channel of the target storage medium or each recording channel of the target storage medium Whether change;
If the video recording code stream of the recording channel of the target storage medium or each recording channel of the target storage medium is sent out Changing, then the current state for modifying the target storage medium is nonequilibrium condition.
4. a kind of video recording cladding system characterized by comprising
First judgment module, for when meeting preset coverage condition, judge target storage medium current state whether be Equilibrium state;The equilibrium state is corresponding each first video file of each recording channel in the target storage medium State of covering weight coefficient when meeting preset weight coefficient condition;The covering weight coefficient is for characterizing video file Capped degree of priority, recording channel where storing initial time and the video file by the file of the video file Covering cycle determine;First video file is that file stores the earliest video file of initial time in recording channel;
Determining module, if for the target storage medium current state be equilibrium state, it is determined that with currently wait store record As the corresponding recording channel of file;
First chooses module, for choosing corresponding first video file of the determining recording channel;
First overlay module, for being covered to first video file of selection;
The first judgment module includes:
Acquiring unit, the maximum value and minimum value in covering weight coefficient for obtaining each first video file;
First computing unit, for calculating the difference of the maximum value and the minimum value;
First judging unit, for judging whether the difference of the maximum value and the minimum value is less than preset first threshold;
First determination unit, if being less than the first threshold for the difference of the maximum value and the minimum value, it is determined that institute The current state for stating target storage medium is equilibrium state;
Second determination unit, if being greater than or equal to the first threshold for the difference of the maximum value and the minimum value, The current state for determining the target storage medium is nonequilibrium condition.
5. video recording cladding system according to claim 4, which is characterized in that further include:
Second chooses module, if the current state for the target storage medium is nonequilibrium condition, according to preset choosing Rule is taken to choose alternative file to be covered from each recording channel;
Computing module, for calculating the covering weight corresponding with the alternatively file to be covered according to preset computation rule Coefficient;
Sorting module obtains sequence knot for being ranked up according to the covering weight coefficient to the alternative file to be covered Fruit;
Second overlay module, for being covered according to the ranking results to the alternative file to be covered.
6. the video recording cladding system according to any one of claim 4 to 5, which is characterized in that further include:
Second judgment module, for judging the recording channel of the target storage medium or each record of the target storage medium As whether the video recording code stream in channel changes;
Modified module, if for the recording channel of the target storage medium or each recording channel of the target storage medium Video recording code stream change, then modify the target storage medium current state be nonequilibrium condition.
7. a kind of network hard disk video recorder including cladding system of recording a video described in any one of claim 4 to 6.
CN201710168855.9A 2017-03-21 2017-03-21 A kind of video recording covering method, device and network hard disk video recorder Active CN106993147B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710168855.9A CN106993147B (en) 2017-03-21 2017-03-21 A kind of video recording covering method, device and network hard disk video recorder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710168855.9A CN106993147B (en) 2017-03-21 2017-03-21 A kind of video recording covering method, device and network hard disk video recorder

Publications (2)

Publication Number Publication Date
CN106993147A CN106993147A (en) 2017-07-28
CN106993147B true CN106993147B (en) 2019-08-23

Family

ID=59412123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710168855.9A Active CN106993147B (en) 2017-03-21 2017-03-21 A kind of video recording covering method, device and network hard disk video recorder

Country Status (1)

Country Link
CN (1) CN106993147B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737389B (en) * 2018-07-19 2023-05-16 杭州海康威视系统技术有限公司 Method and device for storing data
CN112231288A (en) * 2020-09-30 2021-01-15 北京金山云网络技术有限公司 Log storage method and device and medium
CN112365904B (en) * 2020-11-16 2021-08-10 深圳市天视通技术有限公司 Method, device, equipment and medium for prolonging storage time of alarm video

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217632A (en) * 2008-01-21 2008-07-09 中兴通讯股份有限公司 A sorting method and device of video documents
CN103402067A (en) * 2013-08-02 2013-11-20 山东神戎电子股份有限公司 File value rating-based video coverage method
CN105306858A (en) * 2014-05-29 2016-02-03 杭州海康威视系统技术有限公司 Video data storage method and device
CN105979278A (en) * 2016-06-17 2016-09-28 武汉斗鱼网络科技有限公司 Saving method and device of live videos
CN106060442A (en) * 2016-05-20 2016-10-26 浙江宇视科技有限公司 Video storage method, device and system
CN106060453A (en) * 2015-04-14 2016-10-26 群晖科技股份有限公司 Method and apparatus for managing video storage space in a surveillance system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217632A (en) * 2008-01-21 2008-07-09 中兴通讯股份有限公司 A sorting method and device of video documents
CN103402067A (en) * 2013-08-02 2013-11-20 山东神戎电子股份有限公司 File value rating-based video coverage method
CN105306858A (en) * 2014-05-29 2016-02-03 杭州海康威视系统技术有限公司 Video data storage method and device
CN106060453A (en) * 2015-04-14 2016-10-26 群晖科技股份有限公司 Method and apparatus for managing video storage space in a surveillance system
CN106060442A (en) * 2016-05-20 2016-10-26 浙江宇视科技有限公司 Video storage method, device and system
CN105979278A (en) * 2016-06-17 2016-09-28 武汉斗鱼网络科技有限公司 Saving method and device of live videos

Also Published As

Publication number Publication date
CN106993147A (en) 2017-07-28

Similar Documents

Publication Publication Date Title
CN106993147B (en) A kind of video recording covering method, device and network hard disk video recorder
CN108243246A (en) A kind of edge calculations resource regulating method, edge device and system
CN108351999B (en) System and method for providing multi-channel inventory distribution avenues for retailers
CN105306539B (en) Service information display control method and device and Internet service information display platform
CN106471773A (en) The distribution of integrated form global resource and load balance
CN104348887B (en) Resource allocation methods and device in cloud management platform
CN107040578A (en) Method of data synchronization, device and system
US20120150576A1 (en) Integrating simulation and forecasting modes in business intelligence analyses
CN106662963A (en) Method and apparatus for managing application package installed in mobile communication terminal
CN109343801A (en) Date storage method, equipment and computer readable storage medium
CN106961569B (en) Video coverage method and device and network video recorder
CN107480854A (en) A kind of method and device of risk identification
CN109146381A (en) Logistics data monitoring method, device, electronic equipment and computer storage medium
CN109284956B (en) Task duration determining method and device and electronic equipment
CN110162292A (en) Voice broadcast method and device
CN106303112B (en) A kind of method for equalizing traffic volume and device
CN108920265A (en) A kind of task executing method and server based on server cluster
CN115689451A (en) Method, device, terminal and medium for determining replenishment quantity of off-line retail store
CN104348852B (en) A kind of method, apparatus and system for realizing telecommunication capability mass-sending
CN104679444B (en) The dynamic adjusting method and device of virtualized memory resource
CN108332423A (en) Information control method, server and computer-readable medium
CN102779058B (en) Interface data charger and interface data loading method
CN104133616B (en) Information display method and device and terminal
CN106161516A (en) For storing the method for data, device and system
CN106993148B (en) A kind of video recording covering method, device and network hard disk video recorder

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant