CN105491395B - Server video management method and system - Google Patents
Server video management method and system Download PDFInfo
- Publication number
- CN105491395B CN105491395B CN201510903153.1A CN201510903153A CN105491395B CN 105491395 B CN105491395 B CN 105491395B CN 201510903153 A CN201510903153 A CN 201510903153A CN 105491395 B CN105491395 B CN 105491395B
- Authority
- CN
- China
- Prior art keywords
- video
- hash
- frame
- file
- server
- 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
Links
- 238000007726 management method Methods 0.000 title claims abstract description 13
- 239000000463 material Substances 0.000 claims description 45
- 238000012790 confirmation Methods 0.000 claims description 4
- 230000000717 retained effect Effects 0.000 claims description 2
- 238000000034 method Methods 0.000 abstract description 7
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004140 cleaning Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/231—Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
- H04N21/23113—Content 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/23418—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention discloses a kind of server video management method and system, wherein method includes: to generate the Hash hash of all video files on server, and by the Hash Hash record of all video files to file Hash record sheet;Obtain the Hash hash of new uploaded videos file;Judge that the Hash hash of new uploaded videos file whether there is in Hash record sheet, if so, new uploaded videos file is not saved, if it is not, then saving new uploaded videos file.It repeats to upload on video archive server by the above-mentioned means, the present invention can reduce similar video, has saved the memory space of video archive server.
Description
Technical field
The present invention relates to technical field of video processing, more particularly, to a kind of server video management method and system.
Background technique
Video file format is varied at present, in compression ratio difference or format difference, will lead to video file
Difference, and the content of actual video file is essentially identical.A large amount of near video file wastes boths server storage.
And also need user to click to enter viewing to each video for the screening of same file, classification at present, or
Whether be same video, inefficiency if being screened by the play time of video, and expends very big manpower and time, can
Operability is not high.
Summary of the invention
The technical problems to be solved by the present invention are: being hashed and being carried out by Hash after the video for identifying identical content
Unique authentication can avoid the new video for uploading identical content, to reduce server storage pressure.
In order to solve the above-mentioned technical problem, the technical solution adopted by the present invention are as follows: a kind of server video manager is provided
Method, comprising:
Generate the Hash hash of all video files on server, and by the Hash Hash record of all video files to literary
Part Hash record sheet;
Obtain the Hash hash of new uploaded videos file;
Judge that the Hash hash of new uploaded videos file whether there is in Hash record sheet,
If so, new uploaded videos file is not saved,
If it is not, then saving new uploaded videos file.
To solve the above problems, the present invention also provides a kind of server video management systems, comprising:
Hash module, the Hash for generating all video files on server hash, and by the Kazakhstan of all video files
Hash record is wished to file Hash record sheet;
New file module, the Hash for obtaining new uploaded videos file hash;
Judgment module, for judging that the Hash of new uploaded videos file is hashed with the presence or absence of in Hash record sheet;
Memory module, for saving/not saving new uploaded videos file.
The beneficial effects of the present invention are: it is different from the prior art, the present invention is by comparing multiple on existing server
Video only saves several versions of different resolution to obtain the video of identical content, and generates Hash hash, is stored in clothes
It is engaged on device, when new video is uploaded, is hashed by comparing Hash, to judge whether to save.By the above-mentioned means, this
Invention can reduce similar video and repeat to upload on video archive server, and the storage for having saved video archive server is empty
Between.
Detailed description of the invention
Fig. 1 is the flow diagram of embodiment of the present invention method one;
Fig. 2 is the structural block diagram of present system embodiment two.
Specific embodiment
To explain the technical content, the achieved purpose and the effect of the present invention in detail, below in conjunction with embodiment and cooperate attached
Figure is explained.
The most critical design of the present invention is: video is compared in video archive server, similar video is found out,
Only retain several versions of the different resolution of same video, and clears up other versions to reduce committed memory, and video is literary
The Hash Hash record of part is into file Hash record sheet.If the Hash hash for the video file that user uploads is not present in regarding
It is just uploaded in file Hash record sheet in frequency file server.
Embodiment one
Fig. 1 is please referred to, the embodiment of the present invention one provides a kind of server video management method, comprising:
S1: the Hash hash of all video files on server is generated, and by all Hash Hash records to file Hash
Record sheet;
S2: the Hash hash of new uploaded videos file is obtained;
S3: judging that the Hash hash of new uploaded videos file whether there is in Hash record sheet,
If so, thening follow the steps S4: new uploaded videos file is not saved,
If it is not, thening follow the steps S5: saving new uploaded videos file.
The present embodiment is by having the Hash Hash record table of video in the Hash hash and server by new uploaded videos
It is compared, if new Hash hash is present in Hash record sheet, then it represents that have identical video file on server,
Prompt user saves the video file no longer to reduce occupancy server memory.
Embodiment two
The embodiment of the present invention two increases the step of clearing server similar video file on the basis of example 1.It is right
All videos are compared two-by-two in server, it is determined whether and it is same video, method particularly includes:
The raw frames of the first video and the second video are decoded, the first material and the second material are obtained;
Since first frame, compare the first material and the second material frame by frame, obtains similar frame;
If all frames are similar frame, according to similar frame, determine the first video and the second video is same video.
And in the generation of material, the embodiment of the present invention one can scan the first video and second on video archive server
Video;The raw frames for decoding the first video and the second video, generate bitmap frame by frame;According to bitmap, the first material and the are obtained
Two materials.
Bitmap is that picture codec is indicated its color with a numerical value for each pixel.Video pictures of compression itself have
It may be stored with vector or other modes, to be converted into bitmap can be compared using this method.
After generating bitmap, the embodiment of the present invention one is further obtained,
Reduce the screen resolution of the first material and the second material;Resolution ratio is usually reduced to 1/4;
The RGB component value of pixel in the first material and the second material video frame is compared one by one;
Judge whether maximum tolerance is less than predetermined tolerance in component value, and the predetermined tolerance is, for example, 10.Specifically, if
It is respectively (10,10,10) and (12,8,13) that the value of (R, G, B) three colors compares respectively, the tolerance of R, G, B is respectively 2,2,
3, then take wherein maximum difference 3 be maximum tolerance.
If maximum tolerance is less than predetermined tolerance, then it is assumed that pixel color is similar;
It is on the contrary, then it is assumed that pixel color is dissimilar;
The similar pixel total number of color is obtained, determines that the similar pixel total number of the color accounts for all pixels point
Ratio whether be greater than predetermined ratio value, such as 90%;
If so, the video frame that confirmation compares is similar frame;
Conversely, then confirming that the video frame of comparison is not similar frame.
According to similar frame, the step of the first video and the second video are same video is determined specifically:
Compare the first video and the second video one by one since first frame;
If there is dissimilar frame, then it is assumed that the first video and the second video are different video;
If all frames are similar frame, then it is assumed that the first video and the second video are same video.
In practical operation, it is possible to which the resolution ratio for two videos occur is different, it should be compared with a low point resolution
Can be to avoid some special circumstances: such as video be compressed into the color difference occurred after small resolution ratio, will compared with high-resolution
There is large error.Video, which is also possible to repeatedly compress, to be compressed to low resolution and changes into high-resolution again, and actual color is to lose
?.Resolution ratio is reduced to 1/4 this number that can modify, and can be adjusted according to the actual situation, and such as 1/2,1/8 etc..
Specifically, when the video of video and 1280x720 to 1920x1080 is compared, resolution ratio is reduced to than the two
The all low resolution ratio of numerical value compares, and could reduce in this way due to video compress bring error.The video of 1920x1080 is set up
It is that h.265 lossy compression format rather than original video, color therein will be supplemented with difference arithmetic, such supplement will lead to
Error when comparison is very big, and such error can be reduced by reducing resolution ratio, excludes the pixel that difference is calculated.It should
Understand, in addition to reducing resolution ratio, there can also be other modes, can also such as compare pixel whether complete of two frames
Match.But this mode, the frame of video compress is relatively difficult to exactly match.
It for all similar videos, is grouped by resolution ratio, such as is divided into greater than 1280x1080, is less than
1280x1080 is greater than 1024x720 and less than tri- group of 1024x720, determines every group of maximum video of intermediate-resolution, is respectively labeled as
It is saved after super clear, high definition, SD, remaining video is then deleted.
The present embodiment is compared by video and the method for resolution ratio grouping, only remains the different editions of same video, and
Remaining video is deleted, effective cleaning has been carried out to server memory.
Embodiment three
The embodiment of the present invention three is improved on the basis of embodiment one and two, wherein if what discovery newly uploaded
The Hash hash of video file is existing with Hash record sheet, illustrates existing identical video on server, then first judges
In server mutually should Hash hash video file it is multiple with the presence or absence of different resolution.For example, defining resolution ratio in advance
Greater than the video file of 1280x1080 labeled as super clear, the video file less than 1280x1080 greater than 1024x720 is labeled as high
Clearly, the video file less than 1024x720 is labeled as SD.If the video file resolution ratio newly uploaded is in high definition range, and this
When server in not yet preserve the high definition version of the video, then save the video of the new upload.If the video file newly uploaded
Resolution ratio is in high definition range, and has preserved the high definition version of the video in server at this time, then newer uploaded videos text
The resolution ratio of part and the high definition version saved, if the high resolution of new uploaded videos is in the resolution of the high definition version saved
Rate then replaces previously stored high definition version with the video file newly uploaded and is labeled as " high definition ", that is, saves the new upload
Video file, and delete the high definition version saved;If the resolution ratio of new uploaded videos is equal to or less than the high definition version saved
This resolution ratio, then do not save the resolution ratio of the new uploaded videos, and remind client server with there are the videos.
Example IV
As shown in Fig. 2, the embodiment of the present invention four provides a kind of server video management system 100, comprising:
Hash module 120, the Hash for generating all video files on server hash, and by all video files
Hash Hash record is to file Hash record sheet;
New file module 130, the Hash for obtaining new uploaded videos file hash;
Judgment module 140, for judging that the Hash of new uploaded videos file is hashed with the presence or absence of in Hash record sheet;
Memory module 150, for saving/not saving new uploaded videos file.
Wherein, the system 100 further includes source file module 110, for comparing multiple video files on server, really
Determine same video;
The source file module 110 includes:
Decoding unit obtains the first material and the second material for decoding the raw frames of the first video and the second video;
Comparing unit obtains similar frame for comparing the first material and the second material frame by frame since first frame;
As a result unit, for determining the first video and the second video for same video according to similar frame.
The decoding unit is specifically used for:
The first video and the second video are scanned on video archive server;
The raw frames for decoding the first video and the second video, generate bitmap frame by frame;
According to bitmap, the first material and the second material are obtained.
The comparing unit is specifically used for:
Reduce the screen resolution of the first material and the second material;
The RGB component value of pixel in the first material and the second material video frame is compared one by one;
Judge whether maximum tolerance is less than predetermined tolerance in component value;
If so, thinking that pixel color is similar;
It is on the contrary, then it is assumed that pixel color is dissimilar;
The similar pixel total number of color is obtained, determines whether the total number ratio is greater than predetermined ratio value;
If so, the video frame that confirmation compares is similar frame;
Conversely, then confirming that the video frame of comparison is not similar frame.
Since first frame, compared one by one to the last frame of the first video and the second video;
If all frames are similar frame, the first video and the second video are same video;
It is on the contrary, then it is assumed that the first video and the second video are not same video.
Wherein, the hash module 120 further include:
Grouped element for the first video and the second video to be generated Hash hash, and is recorded in database, generates view
Frequency file packet numbering;
It clears up unit and retains the video file of different resolution for being cleared up according to packet numbering.
It is different from the prior art, the present invention is by comparing multiple videos on existing server, to obtain identical content
Video is grouped according to resolution ratio, is retained every group of highest video of intermediate-resolution, remaining video is deleted, with clearing server
Memory;It is stored on the server by generating hash table, when new video is uploaded, is hashed by comparing Hash, with
It judges whether to save.It repeats to upload to video file service by the above-mentioned means, the present invention can reduce similar video
On device, the memory space of video archive server has been saved.
The above description is only an embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalents made by bright specification and accompanying drawing content are applied directly or indirectly in relevant technical field, similarly include
In scope of patent protection of the invention.
Claims (6)
1. a kind of server video management method characterized by comprising
The Hash hash of all video files on server is generated, and the Hash Hash record of all video files to file is breathed out
Uncommon record sheet;
Obtain the Hash hash of new uploaded videos file;
Judge that the Hash hash of new uploaded videos file whether there is in Hash record sheet,
If so, new uploaded videos file is not saved,
If it is not, then saving new uploaded videos file;
Further include: compare multiple video files on server, determines same video;Specifically:
The raw frames of the first video and the second video are decoded, the first material and the second material are obtained;
Since first frame, compare the first material and the second material frame by frame, obtains similar frame;
If all frames are similar frame, determine the first video and the second video is same video;
The step of decoding the raw frames of the first video and the second video, obtaining the first material and the second material specifically:
The first video and the second video are scanned on video archive server;
The raw frames for decoding the first video and the second video, generate bitmap frame by frame;
According to bitmap, the first material and the second material are obtained.
2. server video management method according to claim 1, which is characterized in that since first frame, compare frame by frame
First material and the second material, the step of obtaining similar frame specifically:
Reduce the screen resolution of the first material and the second material;
The RGB component value of pixel in the first material and the second material video frame is compared one by one;
Judge whether maximum tolerance is less than predetermined tolerance in component value;
If so, thinking that pixel color is similar;
It is on the contrary, then it is assumed that pixel color is dissimilar;
The similar pixel total number of color is obtained, determines whether the total number ratio is greater than predetermined ratio value;
If so, the video frame that confirmation compares is similar frame;
Conversely, then confirming that the video frame of comparison is not similar frame.
3. server video management method according to claim 1, which is characterized in that will determine as all of same video
Video file is grouped by resolution ratio, is retained every group of highest video file of intermediate-resolution, is deleted remaining video file.
4. server video management method according to claim 1 or 3, which is characterized in that if new uploaded videos file
Hash hash is present in Hash record sheet, then follows the steps below:
According to scheduled resolution ratio rule of classification, judge whether to have in server with the resolution ratio of new uploaded videos in identical group
Same video save the higher side of resolution ratio, delete if so, the resolution ratio of newer uploaded videos and the same video
Except another party;If it is not, then saving the video file of the new upload.
5. a kind of server video management system characterized by comprising
Hash module, the Hash for generating all video files on server hashes, and the Hash of all video files is dissipated
File Hash record sheet is recorded in column;
New file module, the Hash for obtaining new uploaded videos file hash;
Judgment module, for judging that the Hash of new uploaded videos file is hashed with the presence or absence of in Hash record sheet;
Memory module, for saving/not saving new uploaded videos file;
Further include: source file module determines same video for comparing multiple video files on server;
Wherein, the source file module includes:
Decoding unit obtains the first material and the second material for decoding the raw frames of the first video and the second video;
Comparing unit obtains similar frame for comparing the first material and the second material frame by frame since first frame;
As a result unit determines the first video and the second video is same video if being similar frame for all frames;
The decoding unit is specifically used for:
The first video and the second video are scanned on video archive server;
The raw frames for decoding the first video and the second video, generate bitmap frame by frame;
According to bitmap, the first material and the second material are obtained.
6. server video management system according to claim 5, which is characterized in that the comparing unit is specifically used for:
Reduce the screen resolution of the first material and the second material;
The RGB component value of pixel in the first material and the second material video frame is compared one by one;
Judge whether maximum tolerance is less than predetermined tolerance in component value;
If so, thinking that pixel color is similar;
It is on the contrary, then it is assumed that pixel color is dissimilar;
The similar pixel total number of color is obtained, determines whether the total number ratio is greater than predetermined ratio value;
If so, the video frame that confirmation compares is similar frame;
Conversely, then confirming that the video frame of comparison is not similar frame.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510903153.1A CN105491395B (en) | 2015-12-09 | 2015-12-09 | Server video management method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510903153.1A CN105491395B (en) | 2015-12-09 | 2015-12-09 | Server video management method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105491395A CN105491395A (en) | 2016-04-13 |
CN105491395B true CN105491395B (en) | 2019-05-07 |
Family
ID=55678060
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510903153.1A Active CN105491395B (en) | 2015-12-09 | 2015-12-09 | Server video management method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105491395B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106844619A (en) * | 2017-01-17 | 2017-06-13 | 深圳市金立通信设备有限公司 | A kind of file clean-up method and terminal |
CN107172121A (en) * | 2017-03-29 | 2017-09-15 | 努比亚技术有限公司 | A kind of devices and methods therefor for preventing Data duplication from submitting |
CN110365629A (en) * | 2018-04-11 | 2019-10-22 | 福建师范大学 | A kind of method and system monitoring video data secure storage in real time |
CN108875062B (en) * | 2018-06-26 | 2021-07-23 | 北京奇艺世纪科技有限公司 | Method and device for determining repeated video |
CN111294613A (en) * | 2020-02-20 | 2020-06-16 | 北京奇艺世纪科技有限公司 | Video processing method, client and server |
CN114268750A (en) * | 2021-12-14 | 2022-04-01 | 咪咕音乐有限公司 | Video processing method, device, equipment and storage medium |
CN114257879B (en) * | 2021-12-17 | 2023-05-12 | 深圳市瑞云科技有限公司 | Method and system for playing video |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101354745A (en) * | 2008-09-03 | 2009-01-28 | 深圳市迅雷网络技术有限公司 | Method and apparatus for recognizing video document |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006304272A (en) * | 2005-03-25 | 2006-11-02 | Matsushita Electric Ind Co Ltd | Transmitting device |
JP4948147B2 (en) * | 2006-12-15 | 2012-06-06 | 富士通株式会社 | Method and apparatus for editing composite content file |
CN100551065C (en) * | 2006-12-26 | 2009-10-14 | 腾讯科技(深圳)有限公司 | A kind of verifying video content system and method |
CN103118045B (en) * | 2011-11-17 | 2017-03-15 | 腾讯科技(深圳)有限公司 | A kind of method and system of offline download |
CN103313090B (en) * | 2012-03-16 | 2017-05-03 | 腾讯科技(深圳)有限公司 | Method and system for off-line downloading video files |
CN103108033B (en) * | 2013-01-09 | 2015-11-18 | 广东一一五科技有限公司 | File uploading method and system |
CN103618911B (en) * | 2013-10-12 | 2017-02-01 | 北京视博云科技有限公司 | Video streaming providing method and device based on video attribute information |
-
2015
- 2015-12-09 CN CN201510903153.1A patent/CN105491395B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101354745A (en) * | 2008-09-03 | 2009-01-28 | 深圳市迅雷网络技术有限公司 | Method and apparatus for recognizing video document |
Also Published As
Publication number | Publication date |
---|---|
CN105491395A (en) | 2016-04-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105491395B (en) | Server video management method and system | |
US9736488B2 (en) | Decoding for high efficiency video transcoding | |
US20070116110A1 (en) | Optimized video compression using hashing function | |
US11049283B2 (en) | Lossless compression of fragmented image data | |
CN110446062B (en) | Receiving processing method for big data file transmission, electronic device and storage medium | |
US9667982B2 (en) | Techniques for transform based transcoding | |
CN111918065A (en) | Information compression/decompression method and device | |
US20110040735A1 (en) | System and method for compressing files | |
CN110740352B (en) | SPICE protocol-based difference image display method in video card transparent transmission environment | |
US11323701B2 (en) | Systems and methods for group of pictures encoding | |
US20150063435A1 (en) | Techniques for reference based transcoding | |
WO2016082285A1 (en) | Video processing apparatus and method and terminal device | |
CN109417585B (en) | Method, system and computer readable storage medium for image transmission, image compression and image restoration | |
CN103974087B (en) | Video image file compressibility, client and method | |
US8867850B2 (en) | Modeling human perception of media content | |
JP2018082442A (en) | Screen image transfer method, image restoration method, screen image transfer system, image restoration system, screen image transfer program, image restoration program, image compression method, image compression system and image compression program | |
US20140244787A1 (en) | Digital signage playback system, monitoring system, and monitoring method thereof | |
US20150264375A1 (en) | Encapsulation of video scanning format information for media transport and storage | |
US20080199092A1 (en) | Image Data Generating Method, Apparatus Thereof, Image Distributing System, Image Distributing Apparatus Thereof, and Their Programs | |
US8369637B2 (en) | Image processing apparatus, image processing method, and program | |
US10356424B2 (en) | Image processing device, recording medium, and image processing method | |
US20060023951A1 (en) | Method and system for processing an input image and generating an output image having low noise | |
CN109344308A (en) | A kind of personnel file management method and system | |
US11328398B2 (en) | Method and system of reducing block boundary artifacts in digital image processing | |
US20140254657A1 (en) | Key frame aligned transcoding using statistics file |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |