CN107734336A - A kind of compression method and device of video memory space - Google Patents
A kind of compression method and device of video memory space Download PDFInfo
- Publication number
- CN107734336A CN107734336A CN201610658070.5A CN201610658070A CN107734336A CN 107734336 A CN107734336 A CN 107734336A CN 201610658070 A CN201610658070 A CN 201610658070A CN 107734336 A CN107734336 A CN 107734336A
- Authority
- CN
- China
- Prior art keywords
- video file
- video
- compressed
- threshold value
- original
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/156—Availability of hardware or computational resources, e.g. encoding based on power-saving criteria
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
- H04N19/423—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements
- H04N19/426—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements using memory downsizing methods
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiments of the invention provide a kind of compression method and device of video memory space.The embodiment of methods described includes:Original video files to be compressed are determined from the video file stored;Obtain the resolution ratio of the original video files;According to preset rules, the resolution ratio of the original video files is reduced, generates the video file after compression;The video file after the compression is stored, deletes the original video files.The present embodiment can avoid video from playing slack situation by compression rear video.
Description
Technical field
The present invention relates to technical field of video storage, the more particularly to a kind of compression method and device of video memory space.
Background technology
Generally, the data volume of a video file is all bigger, when storing video, no matter stores it in local hard
Cloud storage space is arrived in disk, or storage, and shared space is all bigger.When needing to store multitude of video, this problem is outstanding
For protrusion.For example, video file amount caused by video monitoring is just very big, the space required for storage video monitoring file is just
It is very big.
For the memory space shared by compressed video file, mode is used by prior art, according to default rule
Then to video take out frame, such as M frames are extracted out every N frames, then will take out the video storage after frame and arrive local hard drive or cloud storage
In the resource pool in space.
Although this mode has reached the purpose of compression video memory space, but because some frames in video are taken out
, therefore play it is this compressed video when, it may appear that the slack situation of video playback.
The content of the invention
The purpose of the embodiment of the present invention is the provision of a kind of compression method and device of video memory space, can avoid
Video plays slack situation by compression rear video.
In order to achieve the above object, this application discloses a kind of compression method of video memory space, methods described to include:
Original video files to be compressed are determined from the video file stored;
Obtain the resolution ratio of the original video files;
According to preset rules, the resolution ratio of the original video files is reduced, generates the video file after compression;
The video file after the compression is stored, deletes the original video files.
Optionally, it is described to determine original video files to be compressed from the video file stored, including:
Obtain the first numerical value of the storage size shared by the video file stored;
Judge whether first numerical value meets preparatory condition;
If it is, the video file stored described in will be all or part of is defined as original video files to be compressed.
Optionally, it is described to judge whether first numerical value meets preparatory condition, be:
Judge whether first numerical value is more than default memory space threshold value;Or,
Obtain the default total value for being used to store the storage size of video file;
Judge that first numerical value accounts for the ratio of the total value and whether is more than preset ratio threshold value.
Optionally, the video file is stored in the resource pool in cloud storage space;
It is described to determine original video files to be compressed from the video file stored, including:
Determine resource pool to be detected;
Obtain the second number of the storage size shared by the video file that each resource pool to be detected has stored
Value;
Judge whether each second value meets preparatory condition respectively;
The video file stored described in all or part that will meet in the resource pool of preparatory condition is defined as to be compressed
Original video files.
Optionally, the determination resource pool to be detected, including:
According to predetermined period, determine that the resource pool of predetermined number is used as from all resource pools in the cloud storage space and treat
Detect resource pool.
Optionally, it is described to judge whether each second value meets preparatory condition respectively, be:
Judge whether each second value is more than default memory space threshold value respectively;Or,
Obtain the total value of the storage size of each resource pool to be detected;
Judge whether the ratio that each first numerical value accounts for the total value is more than preset ratio threshold value respectively.
Optionally, it is literary to be defined as original video to be compressed for the video file that all or part of described will have been stored
Part, including:
The last access time of each video file stored is obtained, according to current time, it is determined that each
The current of the video file stored is not accessed duration;
It is more than preset duration threshold value with the presence or absence of current not accessed duration in the video file stored described in judging
Video file;
If it is present the video file that currently not accessed duration is more than preset duration threshold value is defined as to be compressed
Original video files.
Optionally, in addition to:
Video of the duration more than preset duration threshold value is not accessed currently when being not present in the video file stored
During file, then the video file stored is sorted according to the currently not accessed order of duration from big to small;
Determine that current not accessed duration is larger and what is taken deposits in the video file stored described in after sequence
Storage space size reaches the target video file of target value;The target value is according to video file and default vacates sky
Between threshold value or default vacating space ratio-dependent;
The target video file is defined as original video files to be compressed.
Optionally, it is described according to preset rules, the resolution ratio of the original video files is reduced, generates the video after compression
File, including:
According to the corresponding relation of default former resolution ratio and resolution ratio after compression, by point of each original video files
Resolution is reduced to corresponding resolution ratio after compressing.
Optionally, according to preset rules, the resolution ratio of the original video files is reduced, generates the video text after compression
Before part, in addition to:
Judge original the regarding for being not more than default minimum resolution threshold value in the original video files with the presence or absence of resolution ratio
Frequency file;
If it is present the original video files for being not more than default minimum resolution threshold value to the resolution ratio carry out taking out frame
Processing.
Optionally, in addition to:
Detect in the video file stored with the presence or absence of the first video file for having been subjected to reduction resolution processes;
If it is present obtain the last access time of each first video file, according to current time, really
Fixed the current of each first video file is not accessed duration;
The first video file that currently not accessed duration is more than preset duration threshold value is defined as video file to be compressed;
Obtain the resolution ratio of the video file to be compressed;
According to preset rules, the resolution ratio of the video file to be compressed is reduced, generates the video file after compression;
The video file after the compression is stored, deletes the video file to be compressed.
In order to achieve the above object, this application discloses a kind of compression set of video memory space, described device to include:
Determining module, for determining original video files to be compressed from the video file stored;
Module is obtained, for obtaining the resolution ratio of the original video files;
Compression module, for according to preset rules, reducing the resolution ratio of the original video files, generating regarding after compression
Frequency file;
Memory module, for storing the video file after the compression, delete the original video files.
Optionally, the determining module includes:
First obtains submodule, for obtaining the first number of the storage size shared by the video file stored
Value;
First judging submodule, for judging whether first numerical value meets preparatory condition;
First determination sub-module, for when judging that first numerical value meets preparatory condition, by all or part of institute
State the video file stored and be defined as original video files to be compressed.
Optionally, first judging submodule is specifically used for:
Judge whether first numerical value is more than default memory space threshold value;Or,
Obtain the default total value for being used to store the storage size of video file;Judge that first numerical value accounts for institute
Whether the ratio for stating total value is more than preset ratio threshold value.
Optionally, the video file is stored in the resource pool in cloud storage space;The determining module includes:
Second determination sub-module, for determining resource pool to be detected;
Second obtains submodule, depositing shared by the video file stored for obtaining each resource pool to be detected
Store up the second value of space size;
Second judging submodule, for judging whether each second value meets preparatory condition respectively;
3rd determination sub-module, for being regarded what is stored described in all or part met in the resource pool of preparatory condition
Frequency file is defined as original video files to be compressed.
Optionally, second determination sub-module is specifically used for:
According to predetermined period, determine that the resource pool of predetermined number is used as from all resource pools in the cloud storage space and treat
Detect resource pool.
Optionally, second judging submodule is specifically used for:
Judge whether each second value is more than default memory space threshold value respectively;Or,
Obtain the total value of the storage size of each resource pool to be detected;Each first number is judged respectively
Whether the ratio that value accounts for the total value is more than preset ratio threshold value.
Optionally, first determination sub-module includes:
First duration determination subelement, when the last time for obtaining each video file stored accesses
Between, according to current time, it is determined that each the current of the video file stored is not accessed duration;
First duration judgment sub-unit, it is not accessed currently for judging to whether there is in the video file stored
Duration is more than the video file of preset duration threshold value;
First video file determination subelement, for when having current not accessed in the video file stored
It is when length is more than the video file of preset duration threshold value, currently not accessed duration is true more than the video file of preset duration threshold value
It is set to original video files to be compressed.
Optionally, the first determination sub-module also includes:
First sequence subelement, it is more than for working as in the video file stored in the absence of current not accessed duration
During the video file of preset duration threshold value, according to the currently not accessed order of duration from big to small to the video stored
File ordering;
First object file determination subelement, for determined in the video file that has stored described in after sequence it is current not
Accessed duration is larger and the storage size that takes reaches the target video file of target value;The target value
It is according to video file and default vacating space threshold value or default vacating space ratio-dependent;
Second video file determination subelement, for the target video file to be defined as to original video text to be compressed
Part.
Optionally, the compression module is specifically used for:
According to the corresponding relation of default former resolution ratio and resolution ratio after compression, by point of each original video files
Resolution is reduced to corresponding resolution ratio after compressing.
Optionally, in addition to frame module is taken out, be specifically used for:
According to preset rules, the resolution ratio of the original video files reduced, before the video file after generation compression,
Judge the original video files for being not more than default minimum resolution threshold value in the original video files with the presence or absence of resolution ratio;
If it is present the original video files for being not more than default minimum resolution threshold value to the resolution ratio carry out taking out frame
Processing.
Optionally, in addition to detection module;
Detection module, the first of resolution processes are reduced for detecting to whether there is to have been subjected in the video file stored
Video file;
The determining module, be additionally operable to when detect in the video file stored exist have been subjected to reduction resolution processes
The first video file when, obtain the last access time of each first video file, according to current time, it is determined that
The current of each first video file is not accessed duration;Currently not accessed duration is more than the of preset duration threshold value
One video file is defined as video file to be compressed;
The acquisition module, it is additionally operable to obtain the resolution ratio of the video file to be compressed;
The compression module, it is additionally operable to reduce the resolution ratio of the video file to be compressed, generation pressure according to preset rules
Video file after contracting;
The memory module, it is additionally operable to store the video file after the compression, deletes the video file to be compressed.
As seen from the above technical solution, the embodiment of the present invention is according to the resolution ratio of original video files to be compressed, according to
Preset rules, the resolution ratio of original video files is reduced, the video file after generation compression, then the video after storage compression is literary
Part, and delete original video files.Reach compression video in the embodiment of the present invention by the way of video resolution is reduced to deposit
The purpose in space is stored up, with the prior art carrying out taking out frame processing video to be compressed to compress the method for video memory space not
Together, all exist in the video file of each frame upon compression in the embodiment of the present invention in original video files, therefore can keep away
Exempt from video and slack situation is played by compression rear video.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described.It should be evident that drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of the compression method of video memory space provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic flow sheet of step S101 in Fig. 1;
Fig. 3 is another schematic flow sheet of the compression method of video memory space provided in an embodiment of the present invention;
Fig. 4 is another schematic flow sheet of the compression method of video memory space provided in an embodiment of the present invention;
Fig. 5 is a kind of structural representation of the compression set of video memory space provided in an embodiment of the present invention;
Fig. 6 is another structural representation of the compression set of video memory space provided in an embodiment of the present invention;
Fig. 7 is the yet another construction schematic diagram of the compression set of video memory space provided in an embodiment of the present invention;
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Whole description.Obviously, described embodiment is only the part of the embodiment of the present invention, rather than whole embodiments.Base
Embodiment in the present invention, those of ordinary skill in the art are obtained all on the premise of creative work is not made
Other embodiment, belong to the scope of protection of the invention.
The embodiments of the invention provide a kind of compression method and device of video memory space, video can be avoided to be compressed
Rear video plays slack situation.The embodiment of the present invention can be applied in the equipment for needing to compress video memory space, example
Such as it is applied to terminal or cloud storage space, wherein terminal can include the equipment such as computer, mobile terminal.
Below by specific embodiment, the present invention is described in detail.
Fig. 1 be video memory space provided in an embodiment of the present invention compression method a kind of schematic flow sheet, the side
Method comprises the following steps:
Step S101:Original video files to be compressed are determined from the video file stored.
Specifically, determine that original video files to be compressed can include numerous embodiments, can according to preset rules,
Original video files to be compressed are determined from the video file stored.Wherein, preset rules can be regarded what is stored
Accessed duration reaches the video file of predetermined threshold value as original video files to be compressed or incited somebody to action in frequency file
Access times are less than the video file of preset times threshold value as original to be compressed in preset duration in the video file stored
Beginning video file, etc..
It is understood that after original video files to be compressed are determined from the video file stored, Ke Yifu
A original video files of system are into caching or other memory spaces, to carry out subsequent treatment to it.
It is pointed out that the present embodiment is not limited the concrete form for storing the equipment of video file, i.e., video is literary
Part can be stored in the local hard drive or other internal storage spaces of terminal, can also be stored in the resource pool in cloud storage space
In.
Step S102:Obtain the resolution ratio of original video files.
In actual applications, graphics video processing software Adobe After Effects (AE) or video can be used to close
The resolution ratio of video file is obtained into software Fusion or MPC software etc..
Step S103:According to preset rules, the resolution ratio of original video files is reduced, generates the video file after compression.
Wherein, the resolution ratio of video file is reduced according to preset rules, can be reduced according to default resolution gradient
The resolution ratio of video file or the resolution ratio of original video files is reduced to default resolution value etc..Arrange below
Lift a kind of specific embodiment.
In the present embodiment, step S103 can include:According to default former resolution ratio with compression after resolution ratio it is corresponding
Relation, by the resolution ratio of each original video files be reduced to corresponding to compress after resolution ratio.
For example, the corresponding relation of default former resolution ratio and resolution ratio after compression see the table below.For example, original video is worked as
When the resolution ratio of file is more than 1920 pixel 1080 pixels of *, the resolution ratio of the original video files is reduced to 1920 pixel *
1080 pixels.
Former resolution ratio/pixel | Resolution ratio/pixel after compression |
> 1920*1080 | 1920*1080 |
1920*1080~1280*720 | 1280*720 |
1280*720~768*432 | 768*432 |
768*432~512*288 | 512*288 |
It should be noted that the resolution ratio of video file is reduced into given resolution, can also use in the prior art
Video processing software or Video Composition software realize, this belongs to prior art, and detailed process repeats no more.
Step S104:Video file after storage compression, deletes original video files.
It is understood that after original video files to be compressed are compressed into processing, also storage in equipment is regarded
Original video files in the memory space of frequency file replace with the video file after compression, and it is empty could so to reduce video storage
Between.
As shown in the above, the embodiment of the present invention is according to the resolution ratio of original video files to be compressed, according to default
Rule, the resolution ratio of original video files is reduced, the video file after generation compression, then stores the video file after compression,
And delete original video files.It is empty to reach compression video storage in the embodiment of the present invention by the way of video resolution is reduced
Between purpose, it is different to compress the method for video memory space to video to be compressed take out frame processing in the prior art,
All exist in the video file of each frame upon compression in inventive embodiments in original video files, therefore video can be avoided
Slack situation is played by compression rear video.
In the embodiment shown in fig. 1, before step S103, i.e., according to preset rules, the original video text is reduced
The resolution ratio of part, before generating the video file after compression, methods described can also comprise the following steps:
Judge the original video text for being not more than default minimum resolution threshold value in original video files with the presence or absence of resolution ratio
Part, if it is present the original video files for being not more than default minimum resolution threshold value to resolution ratio carry out taking out frame processing.
Wherein, it can be 512*288 or other resolution values to preset minimum resolution threshold value.
It is understood that when the resolution ratio of original video files is too small, if carried out again to its resolution ratio at reduction
Reason, the definition of the original video files after compression is too low, possibly can not meet the viewing needs of user.Therefore, regarded when original
When the resolution ratio of frequency file is too small, it can be carried out to take out frame processing.
Specifically, carrying out taking out frame processing to original video files, numerous embodiments can be included, for example, can extract
All I frames of original video files, according to default code check, by the video file after all I frames generation compression of extraction.
Can also be that according to preset ratio, the I frames of preset ratio are extracted from original video files, according to default code check,
By the video file after the I frames generation compression of extraction.
In the embodiment shown in fig. 1, step S101, i.e., original video to be compressed is determined from the video file stored
File can be carried out according to schematic flow sheet shown in Fig. 2, be specifically included:
Step S101A:Obtain the first numerical value of the storage size shared by the video file stored.
Illustrated below by taking terminal as an example.It is assumed that video file is stored in the E disks of local disk, then can be obtained
Take the size of the memory space shared by the video file stored in E disks, it is assumed that be 80GB, i.e. the first numerical value is 80GB.
Step S101B:Judge whether the first numerical value meets preparatory condition, if it is, performing step S101C, otherwise, no
Process.
Specifically, judging whether the first numerical value meets preparatory condition, a variety of embodiments can be included.It is exemplified below
Several specific embodiments:
One kind is to judge whether the first numerical value is more than default memory space threshold value.
Assuming that default memory space threshold value is 85GB, if the first numerical value is more than 85GB, it is determined that the first numerical value meets pre-
If condition, that is, illustrate that the memory space needs are compressed by.
Another kind is, obtains the default total value for being used to store the storage size of video file, then judges the
Whether the ratio that one numerical value accounts for total value is more than preset ratio threshold value.
For example, the total value for the storage size that the local disk E disks obtained are used to store video file is 100GB, E
The video file that disk has stored is 80GB, then judge whether 80/100=80% is more than preset ratio threshold value, if it is greater, then
Illustrate that the video file of E disk storages is excessive, it is necessary to compress the video file of the E disks.
Step S101C:All or part of video file stored is defined as original video files to be compressed.
As a kind of specific embodiment, all or part of video file stored is defined as to be compressed original
Video file, it can include:
Step 1:The last access time of each video file stored is obtained, according to current time, it is determined that often
The current of the individual video file stored is not accessed duration.
Step 2:It is more than preset duration threshold value with the presence or absence of current not accessed duration in the video file for judging to have stored
Video file, if it is present perform step 3, if it does not exist, then perform step 4.
Wherein, preset duration threshold value can be 3 days or 2 days.
Step 3:The video file that currently not accessed duration is more than preset duration threshold value is defined as to be compressed original
Video file.
In actual applications, if the current of all video files in the video file stored is not accessed duration all
More than preset duration threshold value, then the video file all stored is defined as into original video files to be compressed.If
The current not accessed duration of partial video file in the video file of storage is more than preset duration threshold value, then by this part
The video file stored is defined as original video files to be compressed.
If the video text that current not accessed duration is more than preset duration threshold value is not present in the video file stored
Part, then in order to compress video memory space, original video files to be compressed are determined using the process of step 4~step 6.
Step 4:The video file stored is sorted according to the currently not accessed order of duration from big to small.
Step 5:Determine that current accessed duration is larger from the video file stored after sequence and take
Storage size reaches the target video file of target value.
Wherein, target value is according to video file and default vacating space threshold value or default vacating space ratio-dependent
's.
Specifically, determine that target video file can include a variety of embodiments, for example, with default first numerical value
For unit, the storage of larger, the original occupancy of current not accessed duration is determined from the video file stored after sequence
Space is the first video file of the first numerical value, estimates the size after the first video file is compressed, and first after being compressed
The size of video file vacating space, then compare the size of the vacating space and the magnitude relationship of default vacating space threshold value.
If the former is less than the latter, when determining current not accessed from the video file stored after sequence again
The memory space of long larger, original occupancy is the first video file of 2 times of first numerical value, continues executing with and estimates the first video text
Part compressed after size the step of.
If the former is more than the latter, and the difference of the size of vacating space and default vacating space threshold value is less than preset difference value
Threshold value, then the first video file is defined as target video file.
Said process is illustrated with instantiation below.Assuming that default vacating space threshold value is 10MB, default first numerical value
For 10MB, preset difference value threshold value is 5MB.Each video file stored is according to the currently not accessed row of duration from long to short
Sequence is:
Video file 1 (4MB), video file 2 (6MB), video file 3 (10MB), video file 4 (2MB), video file
5 (5MB), video file 6 (10MB), video file 7 (10MB) ...
Wherein, the storage size taken in bracket for video file.Determine to work as in order from above-mentioned video file
The first video file that the memory space of longer, the original occupancy of preceding not accessed duration is 10MB.Due to video file 1 and 2
Occupancy storage size and be 4MB+6MB=10MB, therefore by video file 1 and 2 collectively as the first video file.
Then, estimate to obtain taken after video file 1 and 2 is compressed storage size and be 6MB, then can
Using the vacating space of the video file 1 and 2 after being compressed as:The sum for the storage size that video file 1 and 2 takes
The storage size that 10MB- video files 1 and 2 take after being compressed and 6MB=vacating spaces 4MB.
Because vacating space 4MB is less than default vacating space threshold value 10MB, therefore weighed in order from above-mentioned video file
It is new to determine first video file of the current memory space for not being accessed larger, the original occupancy of duration for 2 times of first numerical value.By
In the storage size of the occupancy of video file 1,2 and 3 and it is 4MB+6MB+10MB=2 times of the first numerical value 20MB, therefore will
Video file 1,2 and 3 is collectively as the first video file.
Then, estimate taken after video file 1,2 and 3 is compressed storage size and be 9MB, must can compress
The vacating space of video file 1,2 and 3 afterwards is:The storage size and 20MB- videos that video file 1,2 and 3 takes
The storage size and 9MB=vacating space 11MB, vacating space 11MB that file 1,2 and 3 takes after being compressed is big
In default vacating space threshold value 10MB, and its difference 11MB-10MB=1MB is 5MB less than preset difference value threshold value, therefore can be with
Video file 1,2 and 3 is defined as target video file.
Step 6:Target video file is defined as to original video files to be compressed.
From the above, in the present embodiment, current according to the video file stored is not accessed duration, will
The video file that current not accessed duration is more than preset duration threshold value in the video file stored is defined as original to be compressed
Beginning video file, i.e., the video file preferentially infrequently accessed user are defined as original video files, can avoid user
The video file often accessed is compressed, therefore can improve Consumer's Experience.
In order to improve the compression efficiency to the memory space of equipment, embodiment illustrated in fig. 1 can also comprise the following steps, this
A little steps are as shown in Figure 3.
Step S301:Detect in the video file stored with the presence or absence of the first video for having been subjected to reduction resolution processes
File, if it is present performing step S302, otherwise, do not process.
Step S302:The last access time of each first video file is obtained, according to current time, it is determined that each
The current of first video file is not accessed duration.
Step S303:The first video file that currently not accessed duration is more than preset duration threshold value is defined as to be compressed
Video file.
Step S304:Obtain the resolution ratio of video file to be compressed.
Step S305:According to preset rules, the resolution ratio of video file to be compressed is reduced, generates the video text after compression
Part.
Step S306:Video file after storage compression, deletes the video file to be compressed.
It should be noted that step S304~S306 and step S102~S104 are essentially identical, particular content can phase
Mutual reference.
As shown in the above, in the present embodiment, differentiated if existing in the video file stored and having been subjected to reduction
First video file of rate processing, and current not accessed duration in the first video file be present and be more than preset duration threshold value
Video file, illustrate that user is not high to the attention rate of this partial video file.At this moment this partial video file can be defined as
Video file to be compressed, and pair video file to be compressed determined is compressed processing, so as to improve the compression to memory space
Efficiency.
Fig. 4 is another schematic flow sheet of the compression method of video memory space provided in an embodiment of the present invention, wherein,
Video file is stored in the resource pool in cloud storage space.Methods described comprises the following steps:
Step S401:Determine resource pool to be detected.
In actual applications, multiple storage devices can be included in cloud storage space, are provided with each storage device more
Individual resource pool, each resource pool are assigned the mark that uniquely can determine that the resource pool.It can be true to determine resource pool to be detected
The numbering or address information of fixed resource pool to be detected.Also, safeguard there is resource pool information in cloud storage space, the resource pool information
The total value of the storage size of mark, resource pool including each resource pool, the residual memory space size of resource pool, money
The memory space threshold value in source pond, not accessed duration threshold value etc..
Wherein, the total value of the storage size of resource pool, the memory space threshold value of resource pool and not accessed duration
The information that threshold value inputs when can be according to user establishing resource pond determines.
In the present embodiment, resource pool to be detected is determined, numerous embodiments can be included:
One kind is, according to predetermined period, to determine that the resource pool of predetermined number is made from all resource pools in cloud storage space
For resource pool to be detected.Wherein, predetermined period can be 2 hours, or one day.Predetermined number can be 1, or
2.Predetermined period and the specific value of predetermined number can be according to setting be actually needed, and the present embodiment is not specifically limited to this.
Another kind is, according to preset rules, the resource pool of determination predetermined number from all resource pools in cloud storage space
As resource pool to be detected.Wherein, preset rules can be chosen or randomly select successively according to set order,
The present embodiment is not specifically limited to this.
Step S402:Obtain the of the storage size shared by the video file that each resource pool to be detected has stored
Two numerical value.
Specifically, after resource pool to be detected is determined, each resource pool to be detected can have been obtained from resource pool information
Storage size shared by the video file of storage.
Step S403:Judge whether each second value meets preparatory condition respectively.
Specifically, judging whether each second value meets preparatory condition respectively, numerous embodiments can be included:
One kind is to judge whether each second value is more than default memory space threshold value respectively.
Another kind is the total value for the storage size for obtaining each resource pool to be detected, judges each first respectively
Whether the ratio that numerical value accounts for total value is more than preset ratio threshold value.
For example, the total value of resource pool A storage size is 100GB, preset ratio threshold value is 80%, then, work as A
In the second value of video file that has stored when being more than 80GB, it may be determined that the second value meets preparatory condition.
, can be with it is understood that when the storage size of all resource pools in cloud storage space is all basically identical
By the way of judging whether each second value is more than default memory space threshold value.When all resource pools in cloud storage space
Storage size it is uneven or difference it is more when, using judge each first numerical value account for total value ratio whether be more than in advance
If the mode of proportion threshold value is more reasonable.
It should be noted that according to user when default memory space threshold value and preset ratio threshold value can be resource pool establishments
Setting determine or equipment setting themselves.
Step S404:The video file that all or part met in the resource pool of preparatory condition has stored is defined as treating
The original video files of compression.
Specifically, determine that original video files to be compressed can include various ways, can be according to preset rules, from completely
Original video files to be compressed are determined in the resource pool of sufficient preparatory condition.Wherein, preset rules can will meet default bar
Accessed duration reaches the video file of predetermined threshold value as original video files to be compressed in the resource pool of part, can also
It is using access times are less than the video file of preset times threshold value as treating in preset duration in the resource pool for meeting preparatory condition
Original video files of compression, etc..
It is understood that after original video files to be compressed are determined from the resource pool for meet preparatory condition, can
To replicate a original video files into caching or other memory spaces, to carry out subsequent treatment to it.
Step S405:Obtain the resolution ratio of original video files.
Step S406:According to preset rules, the resolution ratio of original video files is reduced, generates the video file after compression.
In the present embodiment, step S406, can specifically include:According to default former resolution ratio and resolution ratio after compression
Corresponding relation, by the resolution ratio of each original video files be reduced to corresponding to compress after resolution ratio.
Step S407:Video file after storage compression, deletes original video files.
Wherein, step S405~S407 is identical with step S102~S104 in embodiment illustrated in fig. 1 respectively, detailed process
Can be with cross-referenced.
From the above, the embodiment of the present invention determines to be compressed original regard from the resource pool for meet preparatory condition
Frequency file, then according to the resolution ratio of original video files to be compressed, according to preset rules, reduce dividing for original video files
Resolution, the video file after generation compression, the video file after finally storage compression, and delete original video files.With Fig. 1 institutes
Show unlike embodiment, embodiment illustrated in fig. 4 can carry out reducing to the video file in the resource pool in cloud storage space divides
Resolution processing, therefore the video file in resource pool can be avoided to play slack situation by compression rear video.
In the embodiment shown in fig. 4, before step S406, i.e., according to preset rules, original video files are reduced
Resolution ratio, before generating the video file after compression, shown method can also comprise the following steps:
Judge the original video text for being not more than default minimum resolution threshold value in original video files with the presence or absence of resolution ratio
Part, if it is present the original video files for being not more than default minimum resolution threshold value to resolution ratio carry out taking out frame processing.
Wherein, it can be 512*288 or other resolution values to preset minimum resolution threshold value.
Specifically, carrying out taking out frame processing to original video files, numerous embodiments can be included, for example, can extract
All I frames of original video files, according to default code check, by the video file after all I frames generation compression of extraction.
Can also be that according to preset ratio, the I frames of preset ratio are extracted from original video files, according to default code check,
By the video file after the I frames generation compression of extraction.
It is understood that when the resolution ratio of original video files is too small, if carried out again to its resolution ratio at reduction
Reason, the definition of the original video files after compression is too low, possibly can not meet the viewing needs of user.Therefore, regarded when original
When the resolution ratio of frequency file is too small, it can be carried out to take out frame processing.
In the embodiment shown in fig. 4, step S404, it will meet that all or part in the resource pool of preparatory condition has been deposited
The video file of storage is defined as original video files to be compressed, can include:
Step 1:Obtain the last access of each video file stored met in the resource pool of preparatory condition
Time, according to current time, it is determined that the current of each video file stored is not accessed duration.
Step 2:It is more than preset duration threshold value with the presence or absence of current not accessed duration in the video file for judging to have stored
Video file, if it is present perform step 3, otherwise, perform step 4.
Step 3:The video file that currently not accessed duration is more than preset duration threshold value is defined as to be compressed original
Video file.
In actual applications, if the current of all video files in the video file stored is not accessed duration all
More than preset duration threshold value, then the video file all stored is defined as into original video files to be compressed.If
The current not accessed duration of partial video file in the video file of storage is more than preset duration threshold value, then by this part
The video file stored is defined as original video files to be compressed.
If the video text that current not accessed duration is more than preset duration threshold value is not present in the video file stored
Part, then in order to compress video memory space, original video files to be compressed are determined using the process of step 4~step 6.
Step 4:The video file stored is sorted according to the currently not accessed order of duration from big to small.
Step 5:Determine that current accessed duration is larger from the video file stored after sequence and take
Storage size reaches the target video file of target value.
Wherein, target value is according to video file and default vacating space threshold value or default vacating space ratio-dependent
's.
Specifically, determine that target video file can include a variety of embodiments, for example, with default first numerical value
For unit, the storage of larger, the original occupancy of current not accessed duration is determined from the video file stored after sequence
Space is the first video file of the first numerical value, estimates the size after the first video file is compressed, and first after being compressed
The size of video file vacating space, then compare the size of the vacating space and the magnitude relationship of default vacating space threshold value.
If the former is less than the latter, when determining current not accessed from the video file stored after sequence again
The memory space of long larger, original occupancy is the first video file of 2 times of first numerical value.
If the former is more than the latter, and the difference of the size of vacating space and default vacating space threshold value is less than preset difference value
Threshold value, then the first video file is defined as target video file.
Step 6:Target video file is defined as to original video files to be compressed.
From the above, in the present embodiment, according to the video text stored in the resource pool for meeting preparatory condition
The current of part is not accessed duration, and current not accessed duration in the video file stored is more than into regarding for preset duration threshold value
Frequency file is defined as original video files to be compressed, i.e., the video file preferentially infrequently accessed user is defined as original regard
Frequency file, the video file that can avoid often accessing user are compressed, therefore can improve Consumer's Experience.
In order to improve the compression efficiency to the video file of resource pool, embodiment illustrated in fig. 4 can also comprise the following steps:
Step 1:Detect in the video file stored with the presence or absence of the first video text for having been subjected to reduction resolution processes
Part, if it is present performing step 2, otherwise, do not process.
Step 2:The last access time of each first video file is obtained, according to current time, it is determined that each
The current of one video file is not accessed duration.
Step 3:The first video file that currently not accessed duration is more than preset duration threshold value is defined as to be compressed regard
Frequency file.
Step 4:Obtain the resolution ratio of video file to be compressed;
Step 5:According to preset rules, the resolution ratio of video file to be compressed is reduced, generates the video file after compression.
Step 6:Video file after storage compression, deletes video file to be compressed.
As shown in the above, in the present embodiment, had been subjected to if existed in the video file stored of resource pool
When reducing the first video file of resolution processes, and being more than default in the presence of current accessed duration in the first video file
The video file of long threshold value, illustrate that user is not high to the attention rate of this partial video file.At this moment can be by this partial video text
Part is defined as video file to be compressed, and pair video file to be compressed determined is compressed processing, judges to be somebody's turn to do without performing again
Whether the second value for the storage size shared by video file that the residue of resource pool has stored meets condition, if full
Enough, the step of then by original video files to be compressed are determined in the resource pool, so as to improve to resource pool memory space
Compression efficiency.
The application is elaborated again with reference to instantiation.
Cloud storage space includes Resource Manager SourceManager, data manager DataManager and transcoding person
Transcoder.Wherein, SourceManager is mainly responsible for the resource pool of user's establishment, and matching somebody with somebody according to resource pool
Put strategy and make different actions.DataManager is mainly responsible for receiving the video file of user's storage, and extraneous video text
The extraction of part.Transcoder is responsible for performing transcoding task, and the data after transcoding are stored.
When user is using cloud storage space storage video file, it is necessary to first establishing resource pond, and depositing for resource pool is set
The preset duration threshold value that storage space size and video file are not accessed, while configure the storage for implementing Compression Strategies to resource pool
Capacity-threshold.It is assumed that the total value of the size of the memory space for the resource pool that user is set is 100GB, preset duration threshold value is 3
My god, memory space threshold value is 80GB.
SourceManager is according to the input operation establishing resource pond A of user, and by the total of resource pool A memory space
The information records such as numerical value 100GB and memory space threshold value 80GB, preset duration threshold value 3 days are in resource pool information list.
That is the resource pool information in ample resources pond is stored in resource pool information list.
DataManager receives the video file that user sends, and video file is stored to corresponding resource pool, then
The information such as size, storage address the video file are sent to SourceManager, SourceManager by the information more
Newly into resource pool information list, the storage size shared by the video file that the resource pool has stored then is calculated,
And store.When the access instruction of video file during DataManager receives user to resource pool, by video file send to
User, and access time information is recorded in resource pool information list by SourceManager.
If the video of user's storage continuously generates with the time, such as monitor video, DataManager will can be used
The monitor video file that family is sent is segmented according to a certain size, such as is segmented according to 64MB, and segment information is led to
SourceManager is crossed to be recorded in resource pool information list.
In SourceManager regular visit resource pool information lists shared by the video file stored of each resource pool
Whether storage size is more than the memory space threshold value of the resource pool, if it is, obtain in the resource pool it is each
The last access time of the video file of storage, according to current time, it is determined that each video file stored is current
Duration is not accessed, and the video file that currently not accessed duration is more than preset duration threshold value is defined as to be compressed original regard
Frequency file.
SourceManager sends the address of original video files to be compressed to Transcoder, makes Transcoder
Reduction resolution processes are carried out to original video files to be compressed.
Transcoder is according to the addresses of the original video files to be compressed of reception, by the original to be compressed in resource pool
Beginning video file takes out, and obtains the resolution ratio of original video files to be compressed, and according to default former resolution ratio with after compression
The corresponding relation of resolution ratio, transcoding processing is carried out to original video files to be compressed, makes original video files to be compressed
Resolution ratio is reduced to corresponding resolution ratio after compressing.Then, the video file after compression is stored into respective resources pond, and deleted
Except the original video files to be compressed in the resource pool.
Fig. 5 is a kind of structural representation of the compression set of video memory space provided in an embodiment of the present invention, with Fig. 1 institutes
Show that embodiment of the method is corresponding, described device includes determining module 501, obtains module 502, compression module 503 and memory module
504。
Determining module 501, for determining original video files to be compressed from the video file stored;
Module 502 is obtained, for obtaining the resolution ratio of the original video files;
Compression module 503, for according to preset rules, reducing the resolution ratio of the original video files, generating after compressing
Video file;
Memory module 504, for storing the video file after the compression, delete the original video files.
In the embodiment shown in fig. 5, determining module 501 can include:
First obtains submodule (not shown), and the memory space shared by video file stored for acquisition is big
The first small numerical value;
First judging submodule (not shown), for judging whether first numerical value meets preparatory condition;
First determination sub-module (not shown), for when judging that first numerical value meets preparatory condition, inciting somebody to action
The video file stored described in all or part of is defined as original video files to be compressed.
In the embodiment shown in fig. 5, the first judging submodule is specifically used for:
Judge whether first numerical value is more than default memory space threshold value;Or,
Obtain the default total value for being used to store the storage size of video file;Judge that first numerical value accounts for institute
Whether the ratio for stating total value is more than preset ratio threshold value.
In the embodiment shown in fig. 5, the first determination sub-module includes:
First duration determination subelement (not shown), for obtaining the nearest of each video file stored
Access time, according to current time, it is determined that each the current of the video file stored is not accessed duration;
First duration judgment sub-unit (not shown), for judging to whether there is in the video file stored
Currently not accessed duration is more than the video file of preset duration threshold value;
First video file determination subelement (not shown), work as working as to exist in the video file stored
When preceding not accessed duration is more than the video file of preset duration threshold value, currently it will be more than preset duration threshold value by not accessed duration
Video file be defined as original video files to be compressed.
In the embodiment shown in fig. 5, the first determination sub-module also includes:
First sequence subelement (not shown), for when be not present in the video file stored it is current not by
When access duration is more than the video file of preset duration threshold value, according to the currently not accessed order of duration from big to small to described
The video file sequence stored;
First object file determination subelement (not shown), for the video file stored described in after sequence
The middle storage size for determining that current not accessed duration is larger and taking reaches the target video file of target value;
The target value is according to video file and default vacating space threshold value or default vacating space ratio-dependent;
Second video file determination subelement (not shown), it is to be compressed for the target video file to be defined as
Original video files.
In the embodiment shown in fig. 5, compression module 503 is specifically used for:
According to the corresponding relation of default former resolution ratio and resolution ratio after compression, by point of each original video files
Resolution is reduced to corresponding resolution ratio after compressing.
In the embodiment shown in fig. 5, described device also includes taking out frame module (not shown);
Frame module is taken out, for according to preset rules, reducing the resolution ratio of the original video files, generating after compressing
Before video file, the original for being not more than default minimum resolution threshold value in the original video files with the presence or absence of resolution ratio is judged
Beginning video file;If it is present the original video files for being not more than default minimum resolution threshold value to the resolution ratio are carried out
Take out frame processing.
Fig. 6 is a kind of structural representation of the compression set of video memory space provided in an embodiment of the present invention, with Fig. 3 institutes
It is corresponding to state embodiment of the method.Determining module 601, acquisition module 602, compression module 603 and memory module 604 in the device
It is identical with the determining module 501 in embodiment illustrated in fig. 5, acquisition module 502, compression module 503 and memory module 504 respectively.
Also include detection module 605 in the device.
Wherein, detection module 605, reduced for detecting to whether there is to have been subjected in the video file stored at resolution ratio
First video file of reason;
Determining module 601, be additionally operable to when detect in the video file stored exist have been subjected to reduction resolution processes
The first video file when, obtain the last access time of each first video file, according to current time, it is determined that
The current of each first video file is not accessed duration;Currently not accessed duration is more than the of preset duration threshold value
One video file is defined as video file to be compressed;
Module 602 is obtained, is additionally operable to obtain the resolution ratio of the video file to be compressed;
Compression module 603, it is additionally operable to reduce the resolution ratio of the video file to be compressed, generation pressure according to preset rules
Video file after contracting;
Memory module 604, it is additionally operable to store the video file after the compression, deletes the video file to be compressed.
Fig. 7 is a kind of structural representation of the compression set of video memory space provided in an embodiment of the present invention, with Fig. 4 institutes
Show that embodiment of the method is corresponding, the video file is stored in the resource pool in cloud storage space.Acquisition module in the device
702nd, compression module 703 and memory module 704 respectively with the acquisition module 502 in embodiment illustrated in fig. 5, compression module 503 and
Memory module 504 is identical.
Wherein it is determined that module 701 includes:
Second determination sub-module 7011, for determining resource pool to be detected;
Second obtains submodule 7012, shared by the video file stored for obtaining each resource pool to be detected
Storage size second value;
Second judging submodule 7013, for judging whether each second value meets preparatory condition respectively;
3rd determination sub-module 7014, for will have been stored described in all or part met in the resource pool of preparatory condition
Video file be defined as original video files to be compressed.
In the embodiment shown in fig. 7, the second determination sub-module 7011 is specifically used for:
According to predetermined period, determine that the resource pool of predetermined number is used as from all resource pools in the cloud storage space and treat
Detect resource pool.
In the embodiment shown in fig. 7, the second judging submodule 7013 is specifically used for:
Judge whether each second value is more than default memory space threshold value respectively;Or,
Obtain the total value of the storage size of each resource pool to be detected;Each first number is judged respectively
Whether the ratio that value accounts for the total value is more than preset ratio threshold value.
Because said apparatus embodiment is that embodiment of the method obtains, there is identical technique effect with this method, therefore
The technique effect of device embodiment will not be repeated here.
For device embodiment, because it is substantially similar to embodiment of the method, so describe fairly simple, it is related
Part illustrates referring to the part of embodiment of the method.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality
Body or operation make a distinction with another entity or operation, and not necessarily require or imply and deposited between these entities or operation
In any this actual relation or order.Moreover, term " comprising ", "comprising" or any other variant be intended to it is non-
It is exclusive to include, so that process, method, article or equipment including a series of elements not only include those key elements,
But also the other element including being not expressly set out, or also include solid by this process, method, article or equipment
Some key elements.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including
Other identical element also be present in the process of the key element, method, article or equipment.
It will appreciated by the skilled person that all or part of step in above-mentioned embodiment is can to pass through journey
Come what is completed, described program can be stored in computer read/write memory medium the related hardware of sequence instruction.It is designated herein
Storage medium, refer to ROM/RAM, magnetic disc, CD etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent substitution and improvements done within the spirit and principles in the present invention etc., are all contained in protection scope of the present invention
It is interior.
Claims (22)
1. a kind of compression method of video memory space, it is characterised in that methods described includes:
Original video files to be compressed are determined from the video file stored;
Obtain the resolution ratio of the original video files;
According to preset rules, the resolution ratio of the original video files is reduced, generates the video file after compression;
The video file after the compression is stored, deletes the original video files.
2. according to the method for claim 1, it is characterised in that it is described determined from the video file stored it is to be compressed
Original video files, including:
Obtain the first numerical value of the storage size shared by the video file stored;
Judge whether first numerical value meets preparatory condition;
If it is, the video file stored described in will be all or part of is defined as original video files to be compressed.
3. according to the method for claim 2, it is characterised in that described to judge whether first numerical value meets default bar
Part, it is:
Judge whether first numerical value is more than default memory space threshold value;Or,
Obtain the default total value for being used to store the storage size of video file;
Judge that first numerical value accounts for the ratio of the total value and whether is more than preset ratio threshold value.
4. according to the method for claim 1, it is characterised in that the video file is stored in the resource pool in cloud storage space
In;
It is described to determine original video files to be compressed from the video file stored, including:
Determine resource pool to be detected;
Obtain the second value of the storage size shared by the video file that each resource pool to be detected has stored;
Judge whether each second value meets preparatory condition respectively;
The video file stored described in all or part that will meet in the resource pool of preparatory condition is defined as original to be compressed
Beginning video file.
5. according to the method for claim 4, it is characterised in that the determination resource pool to be detected, including:
According to predetermined period, determine the resource pool of predetermined number as to be detected from all resource pools in the cloud storage space
Resource pool.
6. according to the method for claim 4, it is characterised in that described to judge whether each second value meets respectively
Preparatory condition, it is:
Judge whether each second value is more than default memory space threshold value respectively;Or,
Obtain the total value of the storage size of each resource pool to be detected;
Judge whether the ratio that each first numerical value accounts for the total value is more than preset ratio threshold value respectively.
7. according to the method for claim 2, it is characterised in that it is described will it is all or part of described in the video file that has stored
It is defined as original video files to be compressed, including:
The last access time of each video file stored is obtained, according to current time, it is determined that each described
The current of the video file stored is not accessed duration;
It is more than the video of preset duration threshold value in the video file stored described in judging with the presence or absence of current not accessed duration
File;
If it is present the video file that currently not accessed duration is more than preset duration threshold value is defined as to be compressed original
Video file.
8. according to the method for claim 7, it is characterised in that also include:
Video file of the duration more than preset duration threshold value is not accessed currently when being not present in the video file stored
When, then the video file stored is sorted according to the currently not accessed order of duration from big to small;
The storage for determining that current not accessed duration is larger in the video file stored described in after sequence and taking is empty
Between size reach the target video file of target value;The target value is according to video file and default vacating space threshold
Value or default vacating space ratio-dependent;
The target video file is defined as original video files to be compressed.
9. according to the method described in any one of claim 1~8, it is characterised in that it is described according to preset rules, reduce the original
The resolution ratio of beginning video file, the video file after generation compression, including:
According to the corresponding relation of default former resolution ratio and resolution ratio after compression, by the resolution ratio of each original video files
Resolution ratio after being compressed corresponding to being reduced to.
10. according to the method described in any one of claim 1~8, it is characterised in that according to preset rules, reduce the original
The resolution ratio of beginning video file, before generating the video file after compression, in addition to:
Judge the original video text for being not more than default minimum resolution threshold value in the original video files with the presence or absence of resolution ratio
Part;
If it is present the original video files for being not more than default minimum resolution threshold value to the resolution ratio take out at frame
Reason.
11. according to the method described in any one of claim 1~8, it is characterised in that also include:
Detect in the video file stored with the presence or absence of the first video file for having been subjected to reduction resolution processes;
If it is present the last access time of each first video file is obtained, according to current time, it is determined that often
The current of individual first video file is not accessed duration;
The first video file that currently not accessed duration is more than preset duration threshold value is defined as video file to be compressed;
Obtain the resolution ratio of the video file to be compressed;
According to preset rules, the resolution ratio of the video file to be compressed is reduced, generates the video file after compression;
The video file after the compression is stored, deletes the video file to be compressed.
12. a kind of compression set of video memory space, it is characterised in that described device includes:
Determining module, for determining original video files to be compressed from the video file stored;
Module is obtained, for obtaining the resolution ratio of the original video files;
Compression module, for according to preset rules, reducing the resolution ratio of the original video files, generating the video text after compression
Part;
Memory module, for storing the video file after the compression, delete the original video files.
13. device according to claim 12, it is characterised in that the determining module includes:
First obtains submodule, for obtaining the first numerical value of the storage size shared by the video file stored;
First judging submodule, for judging whether first numerical value meets preparatory condition;
First determination sub-module, for when judging that first numerical value meets preparatory condition, inciting somebody to action described in all or part
The video file of storage is defined as original video files to be compressed.
14. device according to claim 13, it is characterised in that first judging submodule is specifically used for:
Judge whether first numerical value is more than default memory space threshold value;Or,
Obtain the default total value for being used to store the storage size of video file;It is described total to judge that first numerical value accounts for
Whether the ratio of numerical value is more than preset ratio threshold value.
15. device according to claim 12, it is characterised in that the video file is stored in the resource in cloud storage space
Chi Zhong;The determining module includes:
Second determination sub-module, for determining resource pool to be detected;
Second obtains submodule, and the storage shared by the video file stored for obtaining each resource pool to be detected is empty
Between size second value;
Second judging submodule, for judging whether each second value meets preparatory condition respectively;
3rd determination sub-module, for the video text that will have been stored described in all or part met in the resource pool of preparatory condition
Part is defined as original video files to be compressed.
16. device according to claim 15, it is characterised in that second determination sub-module is specifically used for:
According to predetermined period, determine the resource pool of predetermined number as to be detected from all resource pools in the cloud storage space
Resource pool.
17. device according to claim 15, it is characterised in that second judging submodule is specifically used for:
Judge whether each second value is more than default memory space threshold value respectively;Or,
Obtain the total value of the storage size of each resource pool to be detected;Judge that each first numerical value accounts for respectively
Whether the ratio of the total value is more than preset ratio threshold value.
18. device according to claim 13, it is characterised in that first determination sub-module includes:
First duration determination subelement, for obtaining the last access time of each video file stored, root
According to current time, it is determined that each the current of the video file stored is not accessed duration;
First duration judgment sub-unit, for judging not to be accessed duration with the presence or absence of current in the video file stored
More than the video file of preset duration threshold value;
First video file determination subelement, for being grown up when having current not accessed in the video file stored
When the video file of preset duration threshold value, the video file that currently not accessed duration is more than preset duration threshold value is defined as
Original video files to be compressed.
19. device according to claim 18, it is characterised in that the first determination sub-module also includes:
First sequence subelement, for default when being more than in the video file stored in the absence of current not accessed duration
During the video file of duration threshold value, according to the currently not accessed order of duration from big to small to the video file stored
Sequence;
First object file determination subelement, for determining not to be interviewed currently in the video file that has stored described in after sequence
The storage size asked that duration is larger and taken reaches the target video file of target value;The target value is root
According to video file and default vacating space threshold value or default vacating space ratio-dependent;
Second video file determination subelement, for the target video file to be defined as into original video files to be compressed.
20. according to the device described in any one of claim 12~19, it is characterised in that the compression module is specifically used for:
According to the corresponding relation of default former resolution ratio and resolution ratio after compression, by the resolution ratio of each original video files
Resolution ratio after being compressed corresponding to being reduced to.
21. according to the device described in any one of claim 12~19, it is characterised in that also include taking out frame module, be specifically used for:
According to preset rules, the resolution ratio of the original video files is reduced, before generating the video file after compression, is judged
It is not more than the original video files of default minimum resolution threshold value in the original video files with the presence or absence of resolution ratio;
If it is present the original video files for being not more than default minimum resolution threshold value to the resolution ratio take out at frame
Reason.
22. according to the device described in any one of claim 12~19, it is characterised in that also including detection module;
Detection module, for detecting in the video file stored with the presence or absence of the first video for having been subjected to reduction resolution processes
File;
The determining module, it is additionally operable to reduce the of resolution processes when detecting in the video file stored to exist to have been subjected to
During one video file, the last access time of each first video file is obtained, according to current time, it is determined that each
The current of first video file is not accessed duration;Currently not accessed duration is more than into the first of preset duration threshold value to regard
Frequency file is defined as video file to be compressed;
The acquisition module, it is additionally operable to obtain the resolution ratio of the video file to be compressed;
The compression module, it is additionally operable to reduce the resolution ratio of the video file to be compressed according to preset rules, after generation compression
Video file;
The memory module, it is additionally operable to store the video file after the compression, deletes the video file to be compressed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610658070.5A CN107734336B (en) | 2016-08-10 | 2016-08-10 | Compression method and device for video storage space |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610658070.5A CN107734336B (en) | 2016-08-10 | 2016-08-10 | Compression method and device for video storage space |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107734336A true CN107734336A (en) | 2018-02-23 |
CN107734336B CN107734336B (en) | 2019-12-20 |
Family
ID=61200541
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610658070.5A Active CN107734336B (en) | 2016-08-10 | 2016-08-10 | Compression method and device for video storage space |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107734336B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108366218A (en) * | 2018-04-16 | 2018-08-03 | 上海小蚁科技有限公司 | Video file forming method and device, computer readable storage medium, picture pick-up device |
CN109753572A (en) * | 2018-12-26 | 2019-05-14 | 维沃移动通信有限公司 | A kind of method and apparatus of multimedia-data procession |
CN110958460A (en) * | 2019-11-22 | 2020-04-03 | 北京软通智城科技有限公司 | Video storage method and device, electronic equipment and storage medium |
CN111324585A (en) * | 2020-02-19 | 2020-06-23 | 珠海格力电器股份有限公司 | Method for storing file in electronic device, storage medium and electronic device |
CN111400264A (en) * | 2019-12-06 | 2020-07-10 | 杭州海康威视系统技术有限公司 | Data management method and data storage system |
CN111770377A (en) * | 2020-04-03 | 2020-10-13 | 北京数智鑫正科技有限公司 | Compression method for video playing system |
CN112463039A (en) * | 2020-11-17 | 2021-03-09 | 浙江大华技术股份有限公司 | Data storage method, device and storage medium |
CN115022670A (en) * | 2022-05-31 | 2022-09-06 | 咪咕文化科技有限公司 | Video file storage method, restoration method, device, equipment and storage medium |
CN117241057A (en) * | 2023-09-08 | 2023-12-15 | 黄建邦 | Data storage method, video system, device, medium, product and storage system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101442674A (en) * | 2007-11-19 | 2009-05-27 | 三星电子株式会社 | Method and apparatus efficiently encoding and decoding moving image using image resolution adjustment |
CN104506934A (en) * | 2014-12-25 | 2015-04-08 | 合肥寰景信息技术有限公司 | Video processing method capable of saving storage space |
CN104572113A (en) * | 2015-01-21 | 2015-04-29 | 深圳市中兴移动通信有限公司 | Automatic storage space arranging method and mobile terminal |
CN105659587A (en) * | 2015-12-19 | 2016-06-08 | 张北江 | A data storage method for a monitor system and a system thereof |
-
2016
- 2016-08-10 CN CN201610658070.5A patent/CN107734336B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101442674A (en) * | 2007-11-19 | 2009-05-27 | 三星电子株式会社 | Method and apparatus efficiently encoding and decoding moving image using image resolution adjustment |
CN104506934A (en) * | 2014-12-25 | 2015-04-08 | 合肥寰景信息技术有限公司 | Video processing method capable of saving storage space |
CN104572113A (en) * | 2015-01-21 | 2015-04-29 | 深圳市中兴移动通信有限公司 | Automatic storage space arranging method and mobile terminal |
CN105659587A (en) * | 2015-12-19 | 2016-06-08 | 张北江 | A data storage method for a monitor system and a system thereof |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108366218A (en) * | 2018-04-16 | 2018-08-03 | 上海小蚁科技有限公司 | Video file forming method and device, computer readable storage medium, picture pick-up device |
CN109753572A (en) * | 2018-12-26 | 2019-05-14 | 维沃移动通信有限公司 | A kind of method and apparatus of multimedia-data procession |
CN110958460A (en) * | 2019-11-22 | 2020-04-03 | 北京软通智城科技有限公司 | Video storage method and device, electronic equipment and storage medium |
CN111400264A (en) * | 2019-12-06 | 2020-07-10 | 杭州海康威视系统技术有限公司 | Data management method and data storage system |
CN111324585A (en) * | 2020-02-19 | 2020-06-23 | 珠海格力电器股份有限公司 | Method for storing file in electronic device, storage medium and electronic device |
CN111770377A (en) * | 2020-04-03 | 2020-10-13 | 北京数智鑫正科技有限公司 | Compression method for video playing system |
CN112463039A (en) * | 2020-11-17 | 2021-03-09 | 浙江大华技术股份有限公司 | Data storage method, device and storage medium |
CN112463039B (en) * | 2020-11-17 | 2023-05-12 | 浙江大华技术股份有限公司 | Data storage method, device and storage medium |
CN115022670A (en) * | 2022-05-31 | 2022-09-06 | 咪咕文化科技有限公司 | Video file storage method, restoration method, device, equipment and storage medium |
CN115022670B (en) * | 2022-05-31 | 2023-09-05 | 咪咕文化科技有限公司 | Video file storage method, video file restoration device, video file storage equipment and storage medium |
CN117241057A (en) * | 2023-09-08 | 2023-12-15 | 黄建邦 | Data storage method, video system, device, medium, product and storage system |
Also Published As
Publication number | Publication date |
---|---|
CN107734336B (en) | 2019-12-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107734336A (en) | A kind of compression method and device of video memory space | |
CN105589812B (en) | Disk fragments method for sorting, device and host | |
CN109428913B (en) | Storage capacity expansion method and device | |
CN101673192B (en) | Method for time-sequence data processing, device and system therefor | |
CN102156738A (en) | Method for processing data blocks, and data block storage equipment and system | |
CN107026900A (en) | One kind shoots method for allocating tasks and device | |
CN108196978A (en) | Date storage method, device, data-storage system and readable storage medium storing program for executing | |
CN104504147B (en) | A kind of resource coordination method of data-base cluster, apparatus and system | |
CN108076317A (en) | Video data storage method and system, video cut-in method and node | |
CN104239527B (en) | A kind of method for screening picture, device and terminal | |
CN104967807B (en) | Caching method and apparatus | |
CN106648445A (en) | Data storage method and apparatus used for crawler | |
US8423704B2 (en) | Dynamic optimization of memory use in a digital recording device | |
CN107357686A (en) | A kind of daily record delet method and device | |
CN106303724B (en) | The method and apparatus that smart television adds dynamic expression automatically | |
CN106027854A (en) | United filtering denoising method which is applied to a camera and is applicable to be realized in FPGA (Field Programmable Gate Array) | |
CN101706814B (en) | Motion vector based file storage overlay method | |
CN108268499A (en) | A kind of Webpage display process and device | |
CN106527891A (en) | Editing object selection method and related apparatus | |
CN106412505A (en) | Video display method and apparatus in P2P mode | |
CN106843767A (en) | The memory space method for cleaning and mobile terminal of a kind of terminal | |
CN104394420B (en) | A kind of video process apparatus, method and terminal device | |
CN103731623B (en) | The method and the digital hard disc video recorder that digital hard disc video recorder is recorded a video | |
CN108635848A (en) | A kind of scene of game back method that no limit quickly positions | |
CN100559487C (en) | The method and system of the recording capacity of management accounts equipment |
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 |