CN108076317B - Video data storage method and system, video access method and node - Google Patents

Video data storage method and system, video access method and node Download PDF

Info

Publication number
CN108076317B
CN108076317B CN201611024214.8A CN201611024214A CN108076317B CN 108076317 B CN108076317 B CN 108076317B CN 201611024214 A CN201611024214 A CN 201611024214A CN 108076317 B CN108076317 B CN 108076317B
Authority
CN
China
Prior art keywords
video data
storage capacity
storage
threshold
code
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
CN201611024214.8A
Other languages
Chinese (zh)
Other versions
CN108076317A (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201611024214.8A priority Critical patent/CN108076317B/en
Publication of CN108076317A publication Critical patent/CN108076317A/en
Application granted granted Critical
Publication of CN108076317B publication Critical patent/CN108076317B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23113Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving housekeeping operations for stored content, e.g. prioritizing content for deletion because of storage space restrictions

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The invention discloses a video data storage method, a video data storage device, a video data storage system, a video access method and a video access device based on cloud storage, and relates to the technical field of video data processing and storage. The video data storage method is applied to a cloud storage system, the cloud storage system comprises a management node and a storage node, and the method comprises the following steps: the management node detects the available residual storage capacity of the storage node; the management node compares the available remaining storage capacity of the storage node with a first threshold, a second threshold and/or a third threshold; when the available residual storage capacity is judged to be smaller than a first threshold value, the storage node receives and stores the double-code-rate video data generated by the front-end equipment; and according to the available residual storage capacity, deleting the first code rate video data and/or the second code rate video data in the stored part or all of the double code rate video data by the storage node. The present invention can save higher definition video data when the storage space is sufficient and save longer video data when the storage space is insufficient.

Description

Video data storage method and system, video access method and node
Technical Field
The invention relates to the technical field of video data processing and storage, in particular to a video data storage method and system, a video access method based on cloud storage and a node.
Background
With the development and wide application of video monitoring technology, the volume of video monitoring data is increasingly huge, and a huge storage space is often needed. Cloud storage is a new network storage technology extended and developed on the basis of cloud computing (cloud computing) concept, and refers to a system which integrates a large number of various types of storage devices in a network through application software to cooperatively work through functions such as cluster application, network technology or distributed file systems and provides data storage and service access functions to the outside. Since the cloud storage can conveniently expand a storage space as required, and is particularly suitable for mass storage, the cloud storage technology has been widely used to store video data.
Currently, when video data is stored in the cloud, a coverage period (the shortest time required for storing each video) is generally set, and when the storage time of the video data reaches the coverage period, the video data can be covered or deleted (namely, the video data is periodically covered), so that the cloud storage space is released, and cyclic video recording can be performed.
In the process of implementing the invention, the inventor finds that the method at least has the following disadvantages:
when the code rate of the stored video data is higher than the predetermined code rate or the cloud storage space is reduced for some reason, the storage time of the next video data covered by the period in the stored video data does not reach the coverage period (i.e. no stored data can be deleted), but the storage space is used up, and then the video (video data) is lost due to insufficient storage space. The user can deal with the situation by a method of expanding the capacity of the cloud storage space in time. However, if the capacity is not expanded in time, there may be a period of video lost due to insufficient storage space before the user performs the capacity expansion.
Disclosure of Invention
In view of this, embodiments of the present invention provide a video data storage method and system, a video access method based on cloud storage, and a node, so as to store higher definition video data when a storage space is sufficient and store longer video data when the storage space is insufficient. The technical scheme is as follows:
in a first aspect, a video data storage method is provided, and is applied to a cloud storage system, where the cloud storage system includes a management node and a storage node, and the method includes:
the management node detects the available residual storage capacity of the storage node, wherein the available residual storage capacity is the storage capacity which can be used for storing the first video data between the current time and the time covered by the next period;
the management node compares the available remaining storage capacity of the storage node with a first threshold, a second threshold and/or a third threshold;
when the available residual storage capacity is judged to be smaller than a first threshold value, the storage node receives and stores double-code-rate video data generated by front-end equipment, wherein the double-code-rate video data comprise first code-rate video data and second code-rate video data which are identical in content, and the first code rate is higher than the second code rate;
when the available residual storage capacity is judged to be smaller than a second threshold value, deleting the first code rate video data in the stored partial or all double-code rate video data by the storage node; and/or when the available residual storage capacity is larger than a third threshold value, deleting the second code rate video data in the stored part or all of the double code rate video data by the storage node.
In a second aspect, a video data storage system is provided, which includes a management node and a storage node, wherein the management node includes a detection module and a comparison module; the storage node comprises a storage module and a deletion module;
the detection module is used for detecting the available residual storage capacity of the storage node, wherein the available residual storage capacity is the storage capacity which can be used for storing the first video data between the current moment and the moment covered by the next period;
the comparing module is used for comparing the available residual storage capacity of the storage node with a first threshold, a second threshold and/or a third threshold;
the storage module is used for receiving and storing double-code-rate video data, wherein the double-code-rate video data comprise first code-rate video data and second code-rate video data which have the same content, and the first code rate is higher than the second code rate;
the deleting module is used for deleting the first code rate video data in the stored partial or all double-code rate video data when the available residual storage capacity is smaller than a second threshold value; and/or deleting the second code rate video data from the stored partial or whole dual code rate video data when the available remaining storage capacity is greater than a third threshold.
In a third aspect, a video access method based on cloud storage is provided, and is applied to a video access node, and the method includes:
when the available remaining storage capacity between the current time and the next time covered by the cycle is smaller than a first threshold, the video access node accesses dual-rate video data from the front-end equipment and forwards the dual-rate video data to the storage node, so that: when the available residual storage capacity is smaller than a second threshold value, deleting the first code rate video data in the stored partial or all double-code rate video data by the storage node; and/or when the available remaining storage capacity is greater than a third threshold, the storage node deletes second code rate video data from the stored partial or whole dual code rate video data,
the double-code-rate video data comprises first code-rate video data and second code-rate video data which have the same content, and the first code rate is higher than the second code rate.
In a fourth aspect, a cloud storage based video access node is provided, the node comprising:
the receiving and sending module is used for accessing the double-code-rate video data and forwarding the double-code-rate video data to the storage node when the available remaining storage capacity between the current moment and the next cycle coverage moment of the storage node of the cloud storage system is smaller than a first threshold value, so that: when the available residual storage capacity is smaller than a second threshold value, deleting the first code rate video data in the stored partial or all double-code rate video data by the storage node; and/or when the available remaining storage capacity is greater than a third threshold, the storage node deletes second code rate video data from the stored partial or whole dual code rate video data,
the double-code-rate video data comprises first code-rate video data and second code-rate video data which have the same content, and the first code rate is higher than the second code rate.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
when the storage space is insufficient, namely the available residual storage capacity of the first video data between the current moment and the next cycle covering moment is smaller than a first threshold value, receiving and storing the double-code-rate video data, wherein the double-code-rate video data comprises the first code-rate video data and the second code-rate video data with the same content, so that the first code-rate video data or the second code-rate video data in part or all of the double-code-rate video data can be deleted according to the available residual storage capacity, namely, the higher-definition video data can be stored when the storage space is sufficient, and the video data with longer time can be stored when the storage space is insufficient.
Specifically, the first bitrate video data in the dual-bitrate video data can be deleted when the available remaining storage capacity is insufficient, that is, smaller than the second threshold, and the second bitrate is smaller than the first bitrate, so that the video time length stored in the unit storage capacity is longer, and the video data can be stored in the limited storage space for a longer time, thereby preventing that the video data cannot be stored for a period of time or a part of the video data is covered when the storage time of the video data does not reach the coverage period due to the difficulty in expanding the storage capacity for a while.
Meanwhile, the double-code-rate video data comprises the first-code-rate video data and the second-code-rate video data which are identical in content, namely the first-code-rate video data can be received and stored in a full time period, so that even if the first-code-rate video data needs to be deleted due to insufficient storage capacity and incapability of timely expanding the capacity, the first-code-rate video data can be stored for as long as possible on the premise of storing the video data in the full time period, and the video data with the as long as possible can keep high definition.
Furthermore, when the available remaining storage capacity is sufficient, i.e., greater than the third threshold, it is possible to stop receiving the dual rate video data and to store only the first rate video data and delete the previously stored second rate video data as a backup, thereby reducing the complexity of operations and the amount of data transmitted and stored in the case of sufficient storage space.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic block diagram of an operating environment of an embodiment of the present invention;
fig. 2 is a flowchart of a video data storage method according to an embodiment of the present invention;
fig. 3 is a flowchart of threshold setting in a video data storage method according to an embodiment of the present invention;
fig. 4 is a block diagram of a video data storage system according to an embodiment of the present invention;
fig. 5 is a block diagram illustrating the structure of modules for setting threshold values in the video data storage system according to an embodiment of the present invention;
fig. 6 is a flowchart of a video access method based on cloud storage according to an embodiment of the present invention;
fig. 7 is a block diagram of a video access node based on cloud storage according to an embodiment of the present invention;
fig. 8 is a block diagram of a video access and storage system according to an embodiment of the present invention;
fig. 9 is an exemplary operational flow diagram of the system shown in fig. 8.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
An embodiment of the present invention provides a video access method and a video data storage method based on cloud storage, and fig. 1 shows an implementation environment related to the two methods. The implementation environment comprises a cloud storage system 1, a video access node 2 and a front-end device 3. The video access node 2 is connected with one or more front-end devices 3 in a communication mode and is connected with the cloud storage system 1 in a communication mode. The front-end device 3 is a device capable of providing video streams with at least two different bit rates (including a first bit rate and a second bit rate mentioned below), and the front-end device 3 may be, for example, a camera as shown in fig. 1, and it should be understood that the number of the front-end devices 3 shown in fig. 1 is three only for illustration and may be one or more actually. Each front-end device 3 records a video for a respective monitored scene in real time, and the video access device 2 accesses video data from the front-end device 3 and then forwards the video data to the cloud storage system 1. The cloud storage system 1 stores video data. Data can be transmitted between the video access device 2 and the front-end equipment 3, and between the video access node 2 and the cloud storage system 1 in a wired or wireless manner through a data channel or a network. The cloud storage system 1 shown in fig. 1 includes three servers, but may actually include one or more servers of any number, where one server may be a management node, and the other servers may be storage nodes, and it should be noted that the management node in the embodiment of the present invention refers to a server having a management function in the cloud storage system, and in some architectures of the cloud storage system, sometimes the management node may also be a storage node at the same time.
The storage server of the cloud storage system 1 is generally provided with an overlay period, and the video data whose storage time reaches the overlay period may be overlaid (i.e., deleted or overlaid with new video data). In order to display monitoring information more clearly during playback of a video, the video access device 2 preferentially accesses high-bitrate video data to be stored in the cloud storage system 1, but sometimes the storage space of the cloud storage system 1 is not enough to store the high-bitrate video data recorded by the front-end device 3 between the current time and the time covered by the next period. In view of this, the present embodiment is an inventive improvement over the prior art. The following respectively describes a video data storage method and system at a video data storage side, a video access method and node at a video access side, and an overall video access and storage system in this embodiment.
The embodiment firstly provides a video data storage method, which is applied to a cloud storage system, wherein the cloud storage system comprises a management node and a storage node, and as shown in fig. 2, the method comprises the following steps:
step S11: the management node detects the available remaining storage capacity of the storage node. The available remaining storage capacity is a storage capacity that can be used for storing the first video data between the current time and the time covered by the next period;
generally, there is only one management node, and there may be a plurality of storage nodes, each or all of which may be used to store video sends its available remaining storage capacity to the management node in real time or periodically. The detection is preferably performed periodically to reduce the data processing burden.
Step S12: the management node compares the detected available remaining storage capacity with a first threshold, a second threshold and/or a third threshold;
the available remaining storage capacity being less than the first threshold value indicates that the available remaining storage capacity has reached the alert level and that the dual rate video data needs to be stored as a spare, and therefore it goes to step S13. Note that, in practical applications, the available remaining storage capacity is generally compared with the second threshold and/or the third threshold after it has been previously detected that the available remaining storage capacity is smaller than the first threshold and step S13 has been passed; and there is generally no need to compare the available remaining storage capacity with the first threshold in storing the dual rate video data. Such comparison is preferably performed periodically to reduce the data processing burden, and typically may be performed after the available remaining storage capacity is detected.
The first threshold, the second threshold and/or the third threshold may be empirical values, calculated values or both, as described in detail below for setting the first threshold, the second threshold and/or the third threshold.
Step S13: when the available residual storage capacity is judged to be smaller than a first threshold value, the storage node receives and stores double-code-rate video data generated by the front-end equipment, wherein the double-code-rate video data comprise first code-rate video data and second code-rate video data which are identical in content, and the first code rate is higher than the second code rate;
note that in the present invention, the use of "when …" does not mean that the subsequent operation is performed immediately, but may lag a period of time or require another condition to be reached.
When the comparison result of step S12 is that the available remaining storage capacity is less than the first threshold, the storage node receives and stores the double rate video data generated by the head-end device from the video access node.
The bit rate is also called bit rate, and generally refers to the size of a storage space occupied by video data of a unit duration when the bit rate is applied to the video field. The first rate video data refers to video data with a first rate, and the second rate video data refers to video data with a second rate.
Obviously, the code rates of the video data from different video sources may be different, and at the same time, the code rates may also be fluctuated rather than constant and unchangeable on a time axis, so that the first code rate and the second code rate are mainly used for distinguishing the code rates of the first code rate video data and the second code rate video data corresponding to the dual-code rate video data, and when the contents are the same, the former is higher than the former, but does not necessarily refer to two fixed code rates, and does not mean that the code rate of any first code rate video data is higher than that of any second code rate video data.
Videos with different bit rates can be obtained by adjusting the video resolution and/or the video frame rate. For example, the video resolution corresponding to the first code rate may be 1080P, and the video resolution corresponding to the second code rate may be 720P, and when the frame rates are all the same, for example, 30 frames per second, the latter is obviously smaller than the former in comparison with the storage space occupied by the video data per unit time; it is also possible to provide that: the video resolution corresponding to the first code rate and the second code rate is 1080P, but the former frame rate is 30 frames per second, and the latter can be 15 frames per second, and the latter is smaller than the former.
The method comprises the steps of receiving and storing double-code-rate video data, namely for the same video source, additionally receiving and storing second-code-rate video data while receiving and storing first-code-rate video data, wherein the fact that the contents are the same means that the two video data come from the same video source and are recorded in the same time period, so that the contents of the two video data are videos of the same scene in the same time period, for example, the content of the two video data is generated by compressing the two video data in a certain code rate reducing mode, so that the resolution, the picture frame and/or the frame rate can be different, and the content of the two video data can be reduced in the resolution, the picture frame.
When the double-code-rate video data is stored in the storage node, the double-code-rate video data is generally stored in pairs, that is, one second-code-rate video data file corresponds to one first-code-rate video data file with the same content, and certainly, one or more second-code-rate video data files correspond to a plurality of first-code-rate video data files with the same content. It should be understood that video data is generally in the form of video data streams during transmission and playing, and in the form of video data files during storage, and the contents of the two are substantially the same, and for simplicity, the video data is referred to as video data, which is also referred to as video recording. In the invention, the first code rate is higher than the second code rate, which means that the code rate of the video data with the first code rate and the same content is higher than that of the video data with the second code rate. The video data in the present invention is not limited to a simple video, but may include other related data such as audio.
Step S14: and deleting the first code rate video data or the second code rate video data in the stored part or all of the double code rate video data according to the available residual storage capacity.
Note that, in the present invention, once the first bitrate video data or the second bitrate video data is deleted from the stored dual-bitrate video data, it cannot be called as dual-bitrate video data, and therefore, before the time of the cycle coverage arrives, in order to preserve the integrity of the video recording time period, the remaining first bitrate video data or second bitrate video data in the dual-bitrate video data on which the deletion operation is performed cannot be deleted any more.
This step includes two cases:
the first method comprises the following steps: deleting the first code rate video data in the stored partial or all double-code rate video data when the available residual storage capacity is smaller than a second threshold value;
and the second method comprises the following steps: and deleting the second code rate video data in the stored double code rate video data when the available residual storage capacity is larger than a third threshold value. At this point, the storage node may also stop storing the second rate video data but continue to store the first rate video data.
Note that both cases do not occur after one comparison. In addition, in the invention, the receiving can be correspondingly stopped when the storage is stopped.
In the invention, the first threshold, the second threshold or the third threshold can be set according to the storage capacity required by the first code rate video data between the current time and the next period coverage time. The third threshold value will be described as an example.
As shown in fig. 3, the third threshold may be set according to the following steps:
substep S121: detecting the residual storage capacity every other set monitoring period;
the monitoring period may be set to 10 minutes or other duration, for example. The detected remaining storage capacity refers to the sum of the remaining storage capacities in all the cloud storage devices.
Substep S122: and determining the average storage speed in the previous monitoring period according to the storage capacity occupied by the first code rate video data in the previous monitoring period and the monitoring period.
Due to the periodic monitoring, the newly occupied storage capacity in the previous monitoring period can be obtained by subtracting the currently detected remaining storage capacity P2 from the previously detected remaining storage capacity P1, but since the second code rate video data is additionally stored, the space P3 occupied by it cannot be calculated in calculating the average storage speed and the remaining storage space. An alternative way to calculate the storage capacity occupied by the first-rate video data in the previous monitoring period is to record an index of each stored second-rate video data, and obtain the second-rate video data with a size changing in the previous monitoring period according to the index, so as to obtain a total newly occupied storage space P3 of the second-rate video data in the previous monitoring period, and meanwhile, set the monitoring period as T1, so the calculation formula of the average storage speed is as follows: s1 ═ (P1-P2-P3)/T1. Of course, the index of the first code rate video data may also be recorded, and the first code rate video data with the size changed in the previous monitoring period may be obtained according to the index, so as to obtain the storage space newly occupied by the first code rate video data in the previous monitoring period in total, and the average storage speed of the previous period may be obtained by directly dividing the storage space by the monitoring period T1.
Substep S123: determining the time length from the current time to the next time of cycle coverage;
the time of the next period coverage generally refers to the time when the video data saved earliest in the stored video data reaches the period coverage, that is, the time when the video data saved earliest or covered next can be covered, at this time, the storage capacity can be expanded by deleting the video data reaching the period coverage, so that the time when the next period coverage is performed can be considered as the time when the next period coverage is performed, and of course, the execution period for performing the coverage or deletion operation may be preset, and the period coverage operation is performed every other preset execution period, and the video data whose saving time reaches or exceeds the coverage period is deleted. Assuming that the current time is T3, the overlay period is T, and the time from the storage time of the video data stored earliest is T2, the time period from the current time to the time of the next period overlay is T- (T3-T2).
Substep S124: determining the required storage capacity according to the average storage speed and the duration;
determining the required storage capacity to be (T- (T3-T2)) × S1 according to the average storage speed S1 and the time length T- (T3-T2);
substep S125: according to the required storage capacity, obtaining a threshold value.
That is, the third threshold is set according to the storage capacity required for storing the video data of the first bitrate between the current time and the time covered by the next period, and for example, the third threshold may be made equal, or the first threshold may be obtained by increasing the set amplitude or the set margin, and is not generally decreased, but the decrease should be considered to be included in the scope of the present invention. The manner of setting the threshold value is exemplified, and various changes may be made in practice, for example, the average storage speed may be obtained for a plurality of monitoring periods when the average storage speed is obtained, or the average storage speed between any two times may be obtained regardless of the monitoring period.
As an embodiment of the present invention, the method for detecting the available remaining storage capacity is: and the management node calculates the sum of the current residual storage capacity and the storage capacity occupied by the second code rate video data in the stored double-code rate video data to obtain the available residual storage capacity. The available remaining storage capacity at this time is the sum of the currently remaining storage capacity and the storage capacity occupied by the second bitrate video data in the stored dual-bitrate video data, because there is the first bitrate video data with the same content, and therefore the second bitrate video data in the dual-bitrate video data can be deleted if necessary, so that the storage capacity occupied by the second bitrate video data can be included in the category of the available remaining storage capacity.
Assuming that the current remaining storage capacity is P2, and the storage capacity occupied by the second bitrate video data in the stored dual bitrate video data is P3 ', the available remaining storage capacity is P2+ P3 ', and an expression that the available remaining storage capacity is greater than the first threshold is P2+ P3 ' > (T- (T3-T2)) × S1, as mentioned above, a margin may be set on the right. An alternative way to obtain P3' is to record an index for each second-bitrate video data stored, and from the index, the storage capacity occupied by all second-bitrate video data is available. Note that here P3' should not contain the storage capacity occupied by the portion of the second bitrate video data whose content is the same that the first bitrate video data has been deleted, because this portion of the second bitrate video data cannot be deleted until the time of its period coverage is reached.
In an embodiment of the present invention, an additional condition may be set on the basis that the available remaining storage capacity is greater than the third threshold, for example, the following operation is performed after the monitoring period is continuously set and the available remaining storage capacity is detected to be greater than the third threshold.
When the available residual storage capacity is larger than the third threshold, that is, after measures such as artificially expanding the storage capacity or deleting a part of data are taken, the first code rate video data received from the current time to the next time covered by the period are sufficiently stored, so that the first code rate video data does not need to be deleted, the double-code rate video data does not need to be received, only the first code rate video data needs to be received, and the existing second code rate video data can be deleted. It should be understood, of course, that in the present invention, only the second code rate video data of the dual code rate video data is deleted, preventing the video data of a certain scene at a certain time period from being deleted.
The second threshold may also be set according to the same procedure as the third threshold, specifically referring to the description above with reference to fig. 3, that is, the second threshold is set according to the storage capacity required for storing the first bitrate video data between the current time and the time covered by the next period, for example, the second threshold may be made equal, or the first threshold may be obtained by increasing or decreasing the set amplitude or the set margin.
The available remaining storage capacity at this time may also be the sum of the currently remaining storage capacity plus the storage capacity occupied by the second code rate video data of the stored two code rate video data. One expression for the available remaining storage capacity being less than the first threshold is P2+ P3' < (T- (T3-T2)). times.S 1, and the right side can be increased or decreased.
In one embodiment of the present invention, the following operation may be performed when an additional condition is satisfied that the available remaining storage capacity is smaller than the second threshold, for example, smaller than another specific threshold.
If the available remaining storage capacity is smaller than the second threshold, it indicates that some first bitrate video data needs to be deleted, otherwise, the storage space may be used up without time to delete the first bitrate video data. Therefore, another specific threshold value can be set and adjusted according to the storage speed, and cannot be too small to occur when the time for performing the deletion operation to cover the next period is not reached but the storage space is used up, and also cannot be too large to delete the first bitrate video data prematurely because the user may actually have time to take measures such as increasing the storage capacity without deleting the first bitrate video data.
When it is satisfied that the available remaining storage capacity is less than the second threshold, the occupied storage capacity to delete the first-bitrate video data corresponding to the already-stored second-bitrate video data is preferably greater than the storage capacity still lacking in storing the first-bitrate video data between the current time and the time covered by the next period, i.e., greater than (T- (T3-T2)) × S1-P3' -P2. In this way, the available remaining storage capacity after the deletion processing is enough to store the first-bitrate video data between the current time and the time covered by the next period, so that the dual-bitrate video data does not need to be accessed in a normal situation. Of course, it is also possible to delete a segment of the first bitrate video data after detecting that the available remaining storage capacity is smaller than the second threshold, so as to save the first bitrate video data for as long as possible under the condition that the available remaining storage capacity is artificially expanded at any time. When deleting, the first code rate video data accessed from the front-end equipment with low importance of the corresponding monitoring scene can be selected to delete, the first code rate video data accessed from the front-end equipment with high importance of the corresponding monitoring scene is stored as much as possible, and the importance can be set by setting the priority. It should be understood that, in the present invention, only the first bitrate video data having the stored second bitrate video data with the same content is deleted, so as to prevent the video data of a certain scene in a certain period from being deleted.
Monitoring the available remaining storage capacity above the third threshold and the available remaining storage capacity below the second threshold may be performed separately, e.g. by setting different monitoring periods, but may also be performed in combination.
It should be understood that, in the present invention, the first code rate video data may be initially received and stored by default, and then the available remaining storage capacity may be periodically detected and compared with the first threshold to determine whether to receive and store the dual code rate video data, or the available remaining storage capacity may be initially detected and compared with the first threshold to determine whether to receive and store the dual code rate video data and then received and stored.
When only the first bitrate video data is received and stored, the available remaining storage capacity can also be calculated as the sum of the current remaining storage capacity and the storage capacity occupied by the second bitrate video data in the stored dual-bitrate video data, except that the storage capacity occupied by the second bitrate video data in the stored dual-bitrate video data may be zero (because the dual-bitrate video data was not received and stored before). Meanwhile, the first threshold may also be determined according to the method shown in fig. 3, that is, the first threshold is set according to the storage capacity required for storing the video data with the first bitrate between the current time and the time covered by the next period, for example, the first threshold may be made equal, or the first threshold may be obtained by increasing or decreasing the first threshold by a set amplitude or a set margin. Just because the double-rate video data is not accessed at this time, the storage capacity required for calculating the first-rate video data between the current time and the next time covered by the period can be simpler, that is, P3 is 0, so that the calculation formula of the average storage speed can be: s1 ═ P1-P2)/T1, and P3' is also zero, so one expression for the available remaining storage capacity being less than the first threshold may be P2 < (T- (T3-T2)) × S1.
The condition that the available residual storage capacity is smaller than the first threshold value means that if only the first rate video data is continuously stored, video of some scenes which are lost for a period of time due to insufficient storage space or video which is stored for a part of time without reaching the coverage period is covered. And receiving and storing the double-rate video data after the first code rate video data is satisfied (i.e. additionally accessing and storing the second code rate video data), then deleting part or all of the first code rate video data in the double-rate video data, and reserving the second code rate video data. The second code rate is lower than the first code rate, and the video time stored in unit storage capacity is longer, so that the video data with longer time can be stored in a limited storage space, and the situation that the video cannot be stored for a period of time or a part of the video data is covered when the storage time of the video data does not reach the covering period due to the fact that the storage capacity is difficult to expand for a while is prevented; meanwhile, when the first code rate video data is not met, the available residual storage capacity can store the first code rate video data between the current moment and the moment covered by the next period, so that the double-code rate video data does not need to be accessed, and the operation complexity and the data transmission quantity are reduced.
Alternatively, an additional condition may be set on the basis of satisfaction that the available remaining storage capacity is smaller than the first threshold, for example, the latter operation is performed after a certain time has elapsed and is satisfied again.
Regardless of how the first threshold, the second threshold, and the third threshold are set, monitoring whether the available remaining storage capacity is smaller than the first threshold, smaller than the second threshold, and larger than the third threshold may be preferably a periodic operation, and specifically may be performed as follows: periodically monitoring whether the signal is less than the first threshold before meeting the signal less than the first threshold without detecting whether the signal is greater than a third threshold and less than a second threshold; periodically detecting whether the dual rate video data is greater than a third threshold and less than a second threshold after the dual rate video data is received and stored while being less than the first threshold, without detecting whether less than the first threshold is satisfied; after the deletion operation is executed when the condition that the deletion operation is larger than the first threshold is met, periodically monitoring whether the deletion operation is smaller than the first threshold in return without detecting whether the deletion operation is larger than a third threshold and smaller than a second threshold; after the deletion operation is performed while satisfying the condition of being less than the second threshold, it is still periodically detected whether the deletion operation is greater than the third threshold and less than the second threshold without detecting whether the deletion operation is less than the first threshold.
The video data storage method in this embodiment may be performed by a cloud storage system including a management node and one or more storage nodes. The management node may periodically detect (for example, once in 10 minutes, that is, one monitoring period in 10 minutes) states of all storage nodes, obtain storage space conditions of the storage nodes, and select an appropriate storage node (that is, a remaining storage space with an appropriate size) to store the video data if the video data is received at this time. The storage node is a passive server providing storage services. When the sum of the available residual storage spaces of all the storage nodes is insufficient, the management node controls the storage nodes to carry out capacity coverage or prompts a user to carry out capacity expansion so as to ensure normal storage of the video data. When the method is specifically executed, the management node can monitor the initial storage capacity and the final storage capacity of all the storage nodes in each monitoring period by using the monitoring thread so as to obtain the available residual storage capacity and the average storage speed, and can determine whether the available residual storage capacity is smaller than a first threshold, smaller than a second threshold or larger than a third threshold, thereby executing the operation of storing or stopping the storage of the double-code-rate video data, and controlling the storage server to execute the deletion operation; meanwhile, the management node stores the index information of each stored video data, and can find out the second code rate video data with the same content corresponding to the first code rate video data in each double-code rate video data, and vice versa, thereby conveniently indicating which video data are deleted by the storage node. Note that in the art, a management node may also be referred to as a metadata server or similar name, and a storage node may also be referred to as a storage server, data server, or similar name. The management node and the storage node are communicated through wireless or wired communication.
In the video data storage method provided by this embodiment, when the storage space is insufficient, that is, the available remaining storage capacity for storing the first video data between the current time and the time covered by the next period is smaller than the first threshold, the storage node receives and stores the dual-rate video data, where the dual-rate video data includes the first-rate video data and the second-rate video data having the same content, so that the first-rate video data and/or the second-rate video data in part or all of the dual-rate video data can be deleted according to the available remaining storage capacity, that is, when the storage space is sufficient, the higher-definition video data can be stored, and when the storage space is insufficient, the longer-time video data can be stored.
Specifically, the first bitrate video data in the dual-bitrate video data can be deleted when the available remaining storage capacity is insufficient, that is, smaller than the second threshold, and the second bitrate is smaller than the first bitrate, so that the video time length stored in the unit storage capacity is longer, and the video data can be stored in the limited storage space for a longer time, thereby preventing that the video data cannot be stored for a period of time or a part of the video data is covered when the storage time of the video data does not reach the coverage period due to the difficulty in expanding the storage capacity for a while.
Meanwhile, the double-code-rate video data comprises the first-code-rate video data and the second-code-rate video data which are identical in content, namely the first-code-rate video data can be received and stored in a full time period, so that even if the first-code-rate video data needs to be deleted due to insufficient storage capacity and incapability of timely expanding the capacity, the first-code-rate video data can be stored for as long as possible on the premise of storing the video data in the full time period, and the video data with the as long as possible can keep high definition.
Furthermore, when the available remaining storage capacity is sufficient, that is, greater than the third threshold, the storage of the dual rate video data may be stopped and only the first rate video data may be stored and the second rate video data among the previously stored dual rate video data may be deleted, thereby reducing the complexity of operations and the amount of data transmitted and stored in the case where the storage space is sufficient.
The embodiment also provides a video data storage system, as shown in fig. 4, the system includes a management node 1 and a storage node 2, where the management node includes a detection module 11 and a comparison module 12, and the storage node includes a storage module 13 and a deletion module 14.
The detection module 11 is configured to detect an available remaining storage capacity of the storage node, where the available remaining storage capacity is a storage capacity that can be used to store first video data between a current time and a time covered by a next period;
in practice, the detection module 11 is specifically configured to calculate a sum of the current remaining storage capacity and a storage capacity occupied by second code rate video data in the stored dual code rate video data, so as to obtain an available remaining storage capacity.
The comparing module 12 is configured to compare the available remaining storage capacity of the storage node with a first threshold, a second threshold and/or a third threshold;
the storage module 13 is configured to receive and store double-rate video data, where the double-rate video data includes first rate video data and second rate video data with the same content, and the first rate is higher than the second rate;
and the deleting module 14 is configured to delete the first bitrate video data or the second bitrate video data in the stored part or all of the dual bitrate video data according to the available remaining storage capacity.
Depending on the available remaining storage capacity, the deletion module 12 may be specifically used in two situations:
the first method comprises the following steps: deleting the first code rate video data in the stored partial or all double-code rate video data when the available residual storage capacity is smaller than a second threshold value;
and the second method comprises the following steps: and deleting the second code rate video data in the stored part or all of the dual code rate video data when the available remaining storage capacity is larger than a third threshold. At this point, the storage of the second rate video data may also be stopped but the storage of the first rate video data may continue.
The deleting module 12 is further configured to stop storing the second bitrate video data but continue storing the first bitrate video data when the available remaining storage capacity is greater than the first threshold.
The first threshold, the second threshold and/or the third threshold may be set according to a storage capacity required for storing the first bitrate video data between the current time and the time covered by the next period. As shown in fig. 5, setting the threshold value can be implemented by the following modules, taking a third threshold value as an example:
a period detection submodule 121 configured to detect a remaining storage capacity every other set monitoring period;
the speed determination submodule 122 is configured to determine an average storage speed in a previous monitoring period according to a storage capacity occupied by the first code rate video data in the previous monitoring period and the monitoring period;
a time length determining submodule 123, configured to determine a time length from a current time to a time covered by a next period;
a demand determination submodule 124 for determining a required storage capacity based on the average storage speed and the period
An obtaining submodule 125 is used for obtaining the threshold value according to the required storage capacity.
As can be seen from the above, the third threshold may be set according to the storage capacity required for storing the video data with the first bitrate between the current time and the next period coverage, for example, the third threshold may be made equal, or the first threshold may be increased by a set margin or a set margin, and is not generally decreased, but the decrease should be considered to be included in the scope of the present invention.
The available remaining storage capacity at this time may be the sum of the currently remaining storage capacity plus the storage capacity occupied by the second code rate video data among the already stored two code rate video data.
The second threshold may also be set by calling the module of fig. 5, that is, the second threshold is set according to the storage capacity required for storing the first bitrate video data between the current time and the time covered by the next period, for example, the second threshold may be made equal, or the second threshold may be increased or decreased by a set amplitude or a set margin. Alternatively, for the sake of caution, the latter operation may be performed upon satisfaction of an additional condition that the available remaining storage capacity is smaller than the second threshold, for example, smaller than another specific threshold set.
The available remaining storage capacity at this time may also be the sum of the currently remaining storage capacity plus the storage capacity occupied by the second code rate video data of the stored two code rate video data.
It should be understood that, in the present invention, the storage module may initially receive and store the first-rate video data by default, and then the detection module periodically detects the available remaining storage capacity, and the comparison module compares the available remaining storage capacity with the threshold to determine whether to receive and store the dual-rate video data, or may initially detect the available remaining storage capacity, and compare the available remaining storage capacity with the threshold to determine whether to receive and store the corresponding dual-rate video data, and then receive and store the dual-rate video data.
When only the first bitrate video data is received and stored, the available remaining storage capacity can also be calculated as the sum of the current remaining storage capacity and the storage capacity occupied by the second bitrate video data in the stored double-bitrate video data, except that the storage capacity occupied by the second bitrate video data in the stored double-bitrate video data may be zero (the double-bitrate video data is not received and stored at first).
Meanwhile, the first threshold may also be set by using the module in fig. 5, that is, the third threshold is set according to the storage capacity required for storing the first bitrate video data between the current time and the time covered by the next period, for example, the third threshold may be made equal, or the first threshold may be obtained by increasing or decreasing the set amplitude or the set margin. Only because the double-rate video data is not accessed at this time, the storage capacity occupied by the second-rate video data may not need to be considered. Alternatively, an additional condition may be set on the basis of satisfaction that the available remaining storage capacity is smaller than the first threshold, for example, the latter operation is performed after a certain time has elapsed and is satisfied again.
Since the video data storage method and the video data storage system correspond to each other, the latter can refer to the description of the former and will not be described herein.
The cloud storage system generally has a metadata server (i.e., a management node) and one or more storage servers (i.e., storage nodes), where the storage servers are configured to store video data, the metadata is data used to describe other stored data, and the metadata server is generally configured to record an index of the stored video data, such as a time period corresponding to each video data file, an ID of a recorded front-end device, and a storage address (e.g., including a server ID, a block ID, and a segment ID), so that first bitrate video data with the same content corresponding to second bitrate video data in the dual-bitrate video data can be found, and vice versa. When the cloud storage device has one or more storage servers and a metadata server, the storage servers may perform or be controlled to perform operations of storing and deleting video data, and the metadata server may perform operations of detecting, calculating, determining, finding, controlling, and the like (see corresponding descriptions in the video data storage method in particular), but the present invention is not limited thereto.
The video data storage system provided by this embodiment receives and stores the dual-rate video data when the storage space is insufficient, that is, the available remaining storage capacity for storing the first video data between the current time and the time covered by the next cycle is smaller than the first threshold, where the dual-rate video data includes the first rate video data and the second rate video data having the same content, so that the first rate video data or the second rate video data in part or all of the dual-rate video data can be deleted according to the available remaining storage capacity, that is, the higher definition video data can be stored when the storage space is sufficient, and the video data of a longer time can be stored when the storage space is insufficient.
Specifically, the first bitrate video data in the dual-bitrate video data can be deleted when the available remaining storage capacity is insufficient, that is, smaller than the second threshold, and the second bitrate is smaller than the first bitrate, so that the video time length stored in the unit storage capacity is longer, and the video data can be stored in the limited storage space for a longer time, thereby preventing that the video data cannot be stored for a period of time or a part of the video data is covered when the storage time of the video data does not reach the coverage period due to the difficulty in expanding the storage capacity for a while.
Meanwhile, the double-code-rate video data comprises the first-code-rate video data and the second-code-rate video data which are identical in content, namely the first-code-rate video data can be received and stored in a full time period, so that even if the first-code-rate video data needs to be deleted due to insufficient storage capacity and incapability of timely expanding the capacity, the first-code-rate video data can be stored for as long as possible on the premise of storing the video data in the full time period, and the video data with the as long as possible can keep high definition.
Furthermore, when the available remaining storage capacity is sufficient, that is, greater than the third threshold, it is possible to stop storing the double-rate video data and store the first-rate video data and delete the second-rate video data in the previously stored double-rate video data, thereby reducing the complexity of operations and the amount of data transmitted and stored in the case where the storage space is sufficient.
The embodiment also provides a video access method based on cloud storage, which is applied to a video access node, and as shown in fig. 6, the method includes:
step S21: when the available remaining storage capacity between the current time and the next time covered by the cycle is smaller than a first threshold, the video access node accesses the double-code-rate video data from the front-end equipment and forwards the double-code-rate video data to the storage node, so that: when the available residual storage capacity is smaller than a second threshold value, the storage node deletes the first code rate video data in the stored partial or all double-code rate video data; and/or when the available remaining storage capacity is larger than a third threshold, the storage node deletes second code rate video data in part of or all stored double code rate video data, wherein the double code rate video data comprises first code rate video data and second code rate video data with the same content, and the first code rate is higher than the second code rate.
The source of the video data may be a head-end device or other suitable device. It should be understood that, assuming that the number of front-end devices accessing video data therefrom is a first number and the number of front-end devices accessing double-rate video data (i.e., front-end devices accessing second-rate video data therefrom in addition to accessing first-rate data) is a second number, the first number and the second number are both natural numbers greater than or equal to one, and the second number may be less than or equal to the first number. In this way, the first bitrate video data can be selectively accessed from some front-end devices monitoring important scenes and having high priority, and the same is true when the video data are stored, so that the high-definition videos of the important scenes are stored in all monitoring time, namely corresponding to the situation that the second number is less than the first number.
It should be understood that, in the present invention, the first code rate video data may be initially accessed and forwarded by default, and then whether to receive and store the corresponding double code rate video data is determined according to the result of comparing the available remaining storage capacity with the first threshold, or whether to receive and store the double code rate video data is initially determined according to the result of comparing the available remaining storage capacity with the first threshold, and then the receiving and storing are performed.
As shown in fig. 6, the method may further include:
step S22: and when the available residual storage capacity is larger than a third threshold value, stopping forwarding the double-code-rate video data and forwarding the first-code-rate video data.
Note that in the present invention, when the forwarding of the dual-rate video data is stopped and the forwarding of the first-rate video data is performed, the dual-rate video data may be continuously accessed but the second-rate video data is not forwarded, but it is more preferable to access only the first-rate video data instead of the second-rate video data.
As described above, the storage node deletes the first bitrate video data or the second bitrate video data in the stored part or all of the dual bitrate video data according to the situation of the available remaining storage capacity, which can be divided into two situations:
in the first case: when the available residual storage capacity is smaller than a second threshold value, deleting the first code rate video data in the stored partial or all double-code rate video data by the storage node;
in the second case: and when the available residual storage capacity is larger than a third threshold value, deleting the second code rate video data in the stored part or all of the double code rate video data by the storage node.
The setting of the first threshold, the second threshold and the third threshold is the same as that in the video data storage method, and may be referred to above specifically, and is not described herein again.
According to the video access method based on cloud storage provided by the embodiment, when a storage node of a cloud storage system can be used for storing available residual storage capacity between the current moment and the moment covered by the next cycle is smaller than a first threshold, the video access node accesses double-code-rate video data from front-end equipment and forwards the double-code-rate video data to the storage node, the double-code-rate video data comprises first code-rate video data and second code-rate video data with the same content, and therefore the cloud storage system can delete the first code-rate video data or the second code-rate video data in part or all of the double-code-rate video data according to the situation of the available residual storage capacity, namely, higher-definition video data can be stored when the storage space is sufficient, and longer-time video data can be stored when the storage space is insufficient.
Specifically, when the available remaining storage capacity is insufficient, that is, smaller than the second threshold, the cloud storage device deletes the first bitrate video data in the dual-bitrate video data, and because the second bitrate is smaller than the first bitrate, the video duration stored in the unit storage capacity is longer, so that the video data stored in the limited storage space can be stored for a longer time, and it is prevented that the video data cannot be stored for a while or a part of the video data is covered when the storage time of the video data does not reach the coverage period due to the fact that the storage capacity is difficult to be expanded for a while.
Meanwhile, the double-code-rate video data comprises the first-code-rate video data and the second-code-rate video data which are identical in content, namely the first-code-rate video data can be received and stored in a full time period, so that even if the first-code-rate video data needs to be deleted due to insufficient storage capacity and incapability of timely expanding the capacity, the first-code-rate video data can be stored for as long as possible on the premise of storing the video data in the full time period, and the video data with the as long as possible can keep high definition.
Furthermore, when the available remaining storage capacity is sufficient, i.e., greater than the third threshold, forwarding (and also accessing) of the dual rate video data may be stopped and the cloud storage system may delete the second code rate video data among the previously stored dual rate video data, thereby reducing the complexity of operations and the amount of data transmitted and stored in the case of sufficient storage space.
Corresponding to the above video access method based on cloud storage, as shown in fig. 7, the video access apparatus based on cloud storage provided in this embodiment includes a transceiver module 21.
The transceiving module 21 is configured to, when a storage node of the cloud storage system is available for storing an available remaining storage capacity between a current time and a time covered by a next cycle is smaller than a first threshold, access the dual-rate video data and forward the dual-rate video data to the storage node, so that: when the available residual storage capacity is smaller than a second threshold value, the storage node deletes the first code rate video data in the stored partial or all double-code rate video data; and/or when the available remaining storage capacity is larger than a third threshold, the storage node deletes second code rate video data in part of or all stored double code rate video data, wherein the double code rate video data comprises first code rate video data and second code rate video data with the same content, and the first code rate is higher than the second code rate.
As shown in fig. 7, the video access node may further include:
and the conversion module 22 is configured to stop forwarding the double-bitrate video data and forward the first-bitrate video data when the available remaining storage capacity is greater than the third threshold.
This is because when the available remaining storage capacity is greater than the third threshold, the cloud storage device stops storing the dual-bitrate video data and stores the first-bitrate video data, and accordingly, the video access node may stop forwarding the dual-bitrate video data and forward the first-bitrate video data, thereby reducing the operation load.
Since the video access method based on cloud storage and the video access node based on cloud storage correspond to each other, the latter may refer to the description of the former and is not described herein again.
The video access node of the present invention may be a video access device entity, such as a video access gateway, provided with the above-mentioned functional modules, or may be a medium or carrier storing software formed by integrating corresponding program modules, and the software is capable of controlling the video access device to execute the above-mentioned steps when running. Each functional module of the video access node can be arranged outside the video access device, and can operate the video access device through an instruction, and can also be arranged in the video access device to directly execute the operation.
The video access node based on cloud storage provided by the embodiment comprises a transceiver module, and is used for accessing double-bitrate video data from front-end equipment and forwarding the double-bitrate video data to a storage node when the available remaining storage capacity between the current moment and the next cycle coverage moment of the storage node of a cloud storage system is smaller than a first threshold, wherein the double-bitrate video data comprises first bitrate video data and second bitrate video data with the same content, so that the cloud storage system can delete the first bitrate video data or the second bitrate video data in part or all of the double-bitrate video data according to the available remaining storage capacity, that is, higher clear video data can be stored when the storage space is sufficient, and video data with a longer time can be stored when the storage space is insufficient.
Specifically, when the available remaining storage capacity is insufficient, that is, smaller than the second threshold, the cloud storage device deletes the first bitrate video data in the dual-bitrate video data, and because the second bitrate is smaller than the first bitrate, the video duration stored in the unit storage capacity is longer, so that the video data stored in the limited storage space can be stored for a longer time, and it is prevented that the video data cannot be stored for a while or a part of the video data is covered when the storage time of the video data does not reach the coverage period due to the fact that the storage capacity is difficult to be expanded for a while.
Meanwhile, the double-code-rate video data comprises the first-code-rate video data and the second-code-rate video data which are identical in content, namely the first-code-rate video data can be received and stored in a full time period, so that even if the first-code-rate video data needs to be deleted due to insufficient storage capacity and incapability of timely expanding the capacity, the first-code-rate video data can be stored for as long as possible on the premise of storing the video data in the full time period, and the video data with the as long as possible can keep high definition.
Furthermore, when the available remaining storage capacity is sufficient, i.e., greater than the third threshold, forwarding (and also accessing) of the dual rate video data may be stopped and the cloud storage system may delete the second code rate video data in the previously stored dual rate video data, thereby reducing the complexity of operations and the amount of data transmitted and stored in the case of sufficient storage space.
The video access node and the video data storage system of the embodiment can cooperate to form a video access and storage system. As shown in fig. 8, the video access and storage system includes a video data storage system 1 and a video access node 2 provided in the present embodiment. The video access node 2 accesses video data from, for example, a front-end device and forwards the video data to the video data storage apparatus 1, and the storage system 1 receives and stores the video data, which can be specifically referred to the above description.
Fig. 9 shows an illustrative workflow diagram of a video access and storage system that performs the following steps:
in step S1, the video access node 2 accesses the first bitrate video data and forwards the first bitrate video data, the storage node of the video data storage system 1 stores the first bitrate video data, and when a predetermined time (for example, a monitoring period) is reached, the method proceeds to step S2;
in step S2, the management node of the video data storage system 1 detects whether the available remaining storage capacity of the storage nodes of the video data storage system 1 satisfies the first condition, and if so, goes to step S3, otherwise, goes to step S1;
in step S3, since the first condition is satisfied, the video access node 2 accesses the dual-bitrate video data, the storage node of the video data storage system 1 stores the dual-bitrate video data, and when a predetermined time (for example, a monitoring period) is reached, the process proceeds to step S4;
in step S4, the management node of the video data storage system 1 detects whether the available remaining storage capacity of the storage node satisfies the second condition, and if so, goes to step S5, otherwise goes to step S6;
at step S5, since the second condition is satisfied (it can be set that the second condition is satisfied continuously in a plurality of monitoring periods), the storage node of the video data storage system 1 deletes the first bitrate video data in the stored dual bitrate video data, and when the deleted amount is sufficient (the available storage space can store the first bitrate video data between the current time and the time covered by the next period), the storage node goes to step S1 to access and store the first bitrate video data (this case is not shown in the figure), and when the amount is insufficient, the storage node continues to access and store the dual bitrate video data, that is, the process goes back to step S3;
at step S6, the management node of the video data storage system 1 checks whether the available remaining storage capacity of the storage nodes satisfies the third condition, and if so, goes to step S7, otherwise goes to step S4, noting that S4 and S6 can be performed at the same time, and S4 and S6 can be performed generally once every one monitoring period;
in step S7, the storage node of the video data storage system 1 deletes the second bitrate video data among the stored part or all of the double bitrate video data, and proceeds to step S1.
The first condition may be that the available remaining storage capacity mentioned above is smaller than a first threshold, the second condition may be that the available remaining storage capacity mentioned above is smaller than a second threshold, the third condition may be that the available remaining storage capacity mentioned above is larger than a third threshold, or some other limiting condition may be added to each condition.
The above working flows can refer to the descriptions of the video data storage method and node and the video access method and node in this embodiment, so as to be better understood and can be complementary to each other, and further description is omitted here.
It will be understood by those skilled in the art that all or part of the steps and modules for implementing the above embodiments may be implemented by hardware, or may be implemented by hardware related to instructions of a program, where the program may be stored in a computer readable storage medium, and the above mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (12)

1. A video data storage method is applied to a cloud storage system, the cloud storage system comprises a management node and a storage node, and the method comprises the following steps:
the management node detects the available residual storage capacity of the storage node, wherein the available residual storage capacity is the storage capacity which can be used for storing the first video data between the current time and the time covered by the next period;
the management node comparing the available remaining storage capacity of the storage node with a first threshold;
when the available residual storage capacity is judged to be smaller than a first threshold value, the storage node receives and stores double-code-rate video data generated by front-end equipment, wherein the double-code-rate video data comprise first code-rate video data and second code-rate video data which are identical in content, and the first code rate is higher than the second code rate;
after judging that the available residual storage capacity is smaller than the first threshold, the management node compares the available residual storage capacity of the storage node with a second threshold and/or a third threshold;
when the available residual storage capacity is judged to be smaller than a second threshold value, deleting the first code rate video data in the stored partial or all double-code rate video data by the storage node; and/or when the available remaining storage capacity is judged to be larger than a third threshold value, deleting second code rate video data in the stored partial or all double code rate video data by the storage node, wherein the second threshold value is smaller than the first threshold value, and the third threshold value is larger than or equal to the first threshold value.
2. The method of claim 1, further comprising:
and when the available residual storage capacity is judged to be larger than the third threshold value, the storage node stops storing the second code rate video data but continues storing the first code rate video data.
3. The method according to claim 1 or 2, wherein the management node detecting the available remaining storage capacity of the storage node comprises: and the management node calculates the sum of the current residual storage capacity and the storage capacity occupied by the second code rate video data in the stored double-code rate video data to obtain the available residual storage capacity.
4. The method according to claim 1 or 2, wherein the first threshold, the second threshold and/or the third threshold are set according to a storage capacity required for storing the video data with the first bitrate between a current time and a time covered by a next period.
5. The video data storage system is characterized by comprising a management node and a storage node, wherein the management node comprises a detection module and a comparison module; the storage node comprises a storage module and a deletion module;
the detection module is used for detecting the available residual storage capacity of the storage node, wherein the available residual storage capacity is the storage capacity which can be used for storing the first video data between the current moment and the moment covered by the next period;
the comparing module is used for comparing the available residual storage capacity of the storage node with a first threshold value;
the storage module is used for receiving and storing double-code-rate video data when the available residual storage capacity is smaller than a first threshold, wherein the double-code-rate video data comprises first code-rate video data and second code-rate video data which have the same content, and the first code rate is higher than the second code rate;
the comparing module is further used for comparing the available residual storage capacity of the storage node with a second threshold and/or a third threshold after the available residual storage capacity is smaller than the first threshold;
the deleting module is used for deleting the first code rate video data in the stored partial or all double-code rate video data when the available residual storage capacity is smaller than a second threshold value; and/or deleting second code rate video data in the stored partial or all double code rate video data when the available remaining storage capacity is larger than a third threshold value, wherein the second threshold value is smaller than the first threshold value, and the third threshold value is larger than or equal to the first threshold value.
6. The system of claim 5, wherein the deletion module is further configured to:
and when the available residual storage capacity is larger than a third threshold value, stopping storing the second code rate video data but continuing to store the first code rate video data.
7. The system according to claim 5 or 6, wherein the detection module is specifically configured to calculate a sum of a currently remaining storage capacity and a storage capacity occupied by second bitrate video data in the stored dual bitrate video data, so as to obtain an available remaining storage capacity.
8. The system according to claim 5 or 6, wherein the first threshold, the second threshold and/or the third threshold are set according to a storage capacity required for storing the video data with the first bitrate between a current time and a time covered by a next period.
9. A video access method based on cloud storage is applied to a video access node, and comprises the following steps:
when the available remaining storage capacity between the current time and the next time covered by the cycle is smaller than a first threshold, the video access node accesses dual-rate video data from the front-end equipment and forwards the dual-rate video data to the storage node, so that: after the available residual storage capacity is smaller than a first threshold value, when the available residual storage capacity is smaller than a second threshold value, the storage node deletes the first code rate video data in the stored partial or all double code rate video data; and/or when the available remaining storage capacity is larger than a third threshold, the storage node deletes second code rate video data in the stored partial or all double code rate video data, wherein the second threshold is smaller than the first threshold, and the third threshold is larger than or equal to the first threshold;
the double-code-rate video data comprises first code-rate video data and second code-rate video data which have the same content, and the first code rate is higher than the second code rate.
10. The method of claim 9, further comprising:
and when the available residual storage capacity is larger than a third threshold value, the video access node stops forwarding the second code rate video data but continues forwarding the first code rate video data.
11. A video access node based on cloud storage, the node comprising:
the receiving and sending module is used for accessing the double-code-rate video data and forwarding the double-code-rate video data to the storage node when the available remaining storage capacity between the current moment and the next cycle coverage moment of the storage node of the cloud storage system is smaller than a first threshold value, so that: after the available residual storage capacity is smaller than a first threshold value, when the available residual storage capacity is smaller than a second threshold value, the storage node deletes the first code rate video data in the stored partial or all double code rate video data; and/or when the available remaining storage capacity is greater than a third threshold, the storage node deletes second code rate video data in the stored partial or all dual code rate video data, wherein the second threshold is less than the first threshold, and the third threshold is greater than or equal to the first threshold,
the double-code-rate video data comprises first code-rate video data and second code-rate video data which have the same content, and the first code rate is higher than the second code rate.
12. The node of claim 11, further comprising a conversion module configured to stop forwarding the second bitrate video data and continue forwarding the first bitrate video data when the available remaining storage capacity is greater than a third threshold.
CN201611024214.8A 2016-11-17 2016-11-17 Video data storage method and system, video access method and node Active CN108076317B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611024214.8A CN108076317B (en) 2016-11-17 2016-11-17 Video data storage method and system, video access method and node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611024214.8A CN108076317B (en) 2016-11-17 2016-11-17 Video data storage method and system, video access method and node

Publications (2)

Publication Number Publication Date
CN108076317A CN108076317A (en) 2018-05-25
CN108076317B true CN108076317B (en) 2020-08-11

Family

ID=62160606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611024214.8A Active CN108076317B (en) 2016-11-17 2016-11-17 Video data storage method and system, video access method and node

Country Status (1)

Country Link
CN (1) CN108076317B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965987A (en) * 2018-06-27 2018-12-07 广州视源电子科技股份有限公司 TV programme storage method, television set, mobile terminal and storage medium
CN111061423B (en) * 2018-10-17 2023-09-26 杭州海康威视系统技术有限公司 Data processing method and device and management node
CN109618198A (en) * 2018-12-10 2019-04-12 网易(杭州)网络有限公司 Live content reports method and device, storage medium, electronic equipment
CN111538457A (en) * 2019-06-11 2020-08-14 深圳迈瑞生物医疗电子股份有限公司 Endoscope camera system, camera host and data storage method thereof
CN110430395A (en) * 2019-07-19 2019-11-08 苏州维众数据技术有限公司 Video data AI processing system and processing method
CN111580755B (en) * 2020-05-09 2022-07-05 杭州海康威视系统技术有限公司 Distributed data processing system and distributed data processing method
CN112506429B (en) * 2020-11-30 2023-05-05 杭州海康威视系统技术有限公司 Method, device, equipment and storage medium for deleting
CN113268205B (en) * 2021-05-28 2023-02-03 海信集团控股股份有限公司 Vehicle-mounted data storage method and device and vehicle-mounted electronic equipment
CN114153399B (en) * 2021-12-07 2023-10-20 四川云从天府人工智能科技有限公司 Data storage method, device, control device and medium of storage system
CN114461151B (en) * 2022-04-11 2022-08-26 武汉中科通达高新技术股份有限公司 Video storage method, computer equipment and storage medium of national standard camera

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103824574A (en) * 2014-02-25 2014-05-28 深圳市赛为智能股份有限公司 Video data storage method and system capable of supporting code stream switching
CN105430480A (en) * 2015-11-13 2016-03-23 Tcl集团股份有限公司 Method and system for storing video data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8548297B2 (en) * 2008-09-11 2013-10-01 Nice Systems Ltd. Method and system for utilizing storage in network video recorders

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103824574A (en) * 2014-02-25 2014-05-28 深圳市赛为智能股份有限公司 Video data storage method and system capable of supporting code stream switching
CN105430480A (en) * 2015-11-13 2016-03-23 Tcl集团股份有限公司 Method and system for storing video data

Also Published As

Publication number Publication date
CN108076317A (en) 2018-05-25

Similar Documents

Publication Publication Date Title
CN108076317B (en) Video data storage method and system, video access method and node
WO2017140130A1 (en) Method and device for storage resource allocation for video cloud storage
CN105245912A (en) Methods and devices for caching video data and reading video data
KR20120102664A (en) Allocating storage memory based on future use estimates
US8473676B2 (en) Controlling replication of data among storage devices
CN104301671B (en) Traffic Surveillance Video storage method based on event closeness in HDFS
CN113495889B (en) Distributed object storage method and device, electronic equipment and storage medium
CN111966632B (en) Streaming data storage method, reading method, equipment and readable storage medium
WO2017124800A1 (en) Pre-event video recording method and device
CN106534952A (en) Method for continuingly playing film source after source switching and smart television
CN112272217B (en) Kafka cluster load balancing method, system, equipment and medium
EP3812994A1 (en) Data evidence preservation method and system based on multiple blockchain networks
CN113590027B (en) Data storage method, data acquisition method, system, device and medium
CN112367384B (en) Kafka cluster-based dynamic speed limiting method and device and computer equipment
US20210382872A1 (en) Blockchain-based Data Storage Method, Related Device and Storage Medium
US10706700B2 (en) Prioritization of video sources
CN106998436B (en) Video backup method and device
US10515053B2 (en) Electronic device and database constructing method
CN114095386B (en) Data stream statistics method, device and storage medium
JP2009238316A (en) Stream recording control device, method, and program
CN112073518B (en) Cloud storage system, cloud storage system management method and central management node
CN111405313B (en) Method and system for storing streaming media data
CN107491264A (en) Method for writing data and device in a kind of distributed system
KR102369798B1 (en) Data management method and data management system
CN111524059A (en) Memory utilization method, system, terminal and storage medium during image caching

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