CN105915930A - Video file sending method and apparatus - Google Patents

Video file sending method and apparatus Download PDF

Info

Publication number
CN105915930A
CN105915930A CN201610237884.1A CN201610237884A CN105915930A CN 105915930 A CN105915930 A CN 105915930A CN 201610237884 A CN201610237884 A CN 201610237884A CN 105915930 A CN105915930 A CN 105915930A
Authority
CN
China
Prior art keywords
video
source server
flowing
eigenvalue
index
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.)
Pending
Application number
CN201610237884.1A
Other languages
Chinese (zh)
Inventor
苏超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING NETENTSEC Inc
Original Assignee
BEIJING NETENTSEC Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING NETENTSEC Inc filed Critical BEIJING NETENTSEC Inc
Priority to CN201610237884.1A priority Critical patent/CN105915930A/en
Publication of CN105915930A publication Critical patent/CN105915930A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23106Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving caching operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/23406Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving management of server-side video buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234309Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4 or from Quicktime to Realvideo
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the invention discloses a video file sending method. The method comprises: a source server video stream sent to a first client by a first source server is obtained; according to the content of the source server video stream, a video corresponding to the source server video stream is obtained from a caching video base; on the basis of the video, a destination video sent to the first client is obtained; and the destination video is sent to the first client. With the method, the video in the caching video base of the caching server can be identified precisely; and the space of the caching server is also saved. Furthermore, the embodiment of the invention also discloses a video file sending apparatus.

Description

A kind of video file sending method and device
Technical field
The present invention relates to the caching identification technology of field of data transmission, particularly relate to a kind of video file sender Method and device.
Background technology
Caching server is a kind of Relay Server connecting source server and client, can store source service Device is sent to the video of client in buffered video storehouse, and when next time, client asks source server to be sent out again When giving this video, first caching server can identify this video in buffered video storehouse, the most directly will be slow This video deposited in video library is sent to client, such that it is able to alleviate the pressure of source server, saves network Bandwidth, improves the fluency of Online Video.
Current caching server generally chooses URL, and (Uniform Resource Locator, unified resource is fixed Position symbol) as video labeling, the video in buffered video storehouse is identified, described URL by video in source Store path in server determines.In actual application, obtain source server for the first time at caching server and send out When giving the video of client, the URL corresponding with video can be obtained simultaneously, and using this URL as The index of video is stored in buffered video storehouse together with video.
But, owing to source server has load-balancing mechanism, identical video can come from different source clothes Business device, it is also possible under the different paths of same source server.Such as, video C can come from source clothes Business device H, it is also possible to from source server I, wherein, video C is URL1 at the store path of source server H, Store path at source server I is URL2.Have from source server H when buffered video storehouse is the most stored When being designated the video C of URL1, if client request source server I sends video C, i.e. client Ask from the video C of URL2, now caching server None-identified go out stored be designated URL1 The video C from URL2 that corresponding video C asks with client is identical, therefore need nonetheless remain for taking from source Business device I sends video C to client.Now video G is simply forwarded by caching server, and does not has There is the effect playing the pressure alleviating source server I.It addition, caching server also can be with URL2 for mark Again storage video G, stores two corresponding video F and G the most simultaneously, causes caching server The waste in space.
Summary of the invention
For solving above-mentioned technical problem, embodiment of the present invention expectation provides a kind of video file sending method and dress Put, it is possible to identify the video in the buffered video storehouse of caching server more accurately, at the same time it can also be joint Save the space of caching server.
The technical scheme is that and be achieved in that:
On the one hand the embodiment of the present invention provides a kind of video file sending method, including:
Obtain one section of first source server and be sent to the source server video flowing of the first client;
According to the content of described source server video flowing, with described source server video in acquisition buffered video storehouse The video that stream is corresponding;
According to described video, obtain the purpose video being sent to described first client;
Described purpose video is sent to described first client.
Optionally, the source server video of the first client it is sent at one section of first source server of described acquisition Before stream, described method also includes:
Obtain the second source server and be sent to the video of the second client;
According to the content of described video, obtain at least one index of described video;
Described video is stored according at least one index described.
Optionally, described source server video flowing includes that N number of key frame, described N are more than or equal to 1 Integer;
The described content according to described source server video flowing, with described source server in acquisition buffered video storehouse The video that video flowing is corresponding includes:
According to the content of described source server video flowing the i-th key frame, calculate described source server video flowing The First Eigenvalue;
Determine and whether described buffered video storehouse exist the first video group that index is identical with described the First Eigenvalue, Described first video group includes at least one video;
When the first video group that existence index in described buffered video storehouse is identical with described the First Eigenvalue, At least one video that described first video group includes obtains the video corresponding with described source server video flowing.
Optionally, described acquisition at least one video that described first video group includes services with described source The video that device video flowing is corresponding includes:
According to the content of described source server video flowing i+1 key frame, obtain described source server video flowing Second Eigenvalue;
Determine and whether at least one video that described first video group includes exists index and described second feature Being worth the second identical video group, described second video group includes at least one video;
When the second video group that existence index in described buffered video storehouse is identical with described Second Eigenvalue, At least one video that described second video group includes obtains the video corresponding with described source server video flowing.
Optionally, the described content according to described source server video flowing, obtain in buffered video storehouse with described The video that source server video flowing is corresponding includes:
Obtain the content of described source server video flowing preset range;
According to the content of described preset range, calculate the eigenvalue of described source server video flowing;
Determine and whether described buffered video storehouse exists the video that index is identical with described eigenvalue;
When described buffered video storehouse exists identical with the described eigenvalue video of index, by described index and The identical video of described eigenvalue is as the video corresponding with described source server video flowing.
Optionally, described according to described video, acquisition is sent to the purpose video of described first client and includes:
According to described video and described source server video flowing, determine start frame and the termination of described purpose video Frame.
On the other hand the embodiment of the present invention provides a kind of video file dispensing device, including:
First acquiring unit, is sent to the source server of the first client for obtaining one section of first source server Video flowing;
Second acquisition unit, for the content according to described source server video flowing, obtains in buffered video storehouse The video corresponding with described source server video flowing;
3rd acquiring unit, for according to described video, acquisition is sent to the purpose of described first client and regards Frequently;
Transmitting element, for being sent to described first client by described purpose video.
Optionally, described device also includes:
4th acquiring unit, is sent to the video of the second client for obtaining the second source server;
5th acquiring unit, for the content according to described video, obtains at least one index of described video;
Memory element, for storing described video according at least one index described.
Optionally, described source server video flowing includes that N number of key frame, described N are more than or equal to 1 Integer;
Second acquisition unit, specifically for:
According to the content of described source server video flowing the i-th key frame, calculate described source server video flowing The First Eigenvalue;
Determine and whether described buffered video storehouse exist the first video group that index is identical with described the First Eigenvalue, Described first video group includes at least one video;
When the first video group that existence index in described buffered video storehouse is identical with described the First Eigenvalue, At least one video that described first video group includes obtains the video corresponding with described source server video flowing.
Optionally, second acquisition unit, specifically for:
According to the content of described source server video flowing i+1 key frame, obtain described source server video flowing Second Eigenvalue;
Determine and whether at least one video that described first video group includes exists index and described second feature Being worth the second identical video group, described second video group includes at least one video;
When the second video group that existence index in described buffered video storehouse is identical with described Second Eigenvalue, At least one video that described second video group includes obtains the video corresponding with described source server video flowing.
Optionally, second acquisition unit, specifically for:
Obtain the content of described source server video flowing preset range;
According to the content of described preset range, calculate the eigenvalue of described source server video flowing;
Determine and whether described buffered video storehouse exists the video that index is identical with described eigenvalue;
When described buffered video storehouse exists identical with the described eigenvalue video of index, by described index and The identical video of described eigenvalue is as the video corresponding with described source server video flowing.
Optionally, the 3rd acquiring unit, specifically for:
According to described video and described source server video flowing, determine start frame and the termination of described purpose video Frame.
Embodiments provide a kind of video file sending method and device, including: obtain one section first Source server is sent to the source server video flowing of the first client;According in described source server video flowing Hold, obtain video corresponding with described source server video flowing in buffered video storehouse;According to described video, obtain Take the purpose video being sent to described first client;Described purpose video is sent to described first client. Compared to prior art, caching server by the content of extraction source server video stream as video labeling, Can more accurately identify the video in the buffered video storehouse corresponding with source server video flowing, thus Alleviate the pressure of source server, improve the fluency of Online Video;Simultaneously, it is to avoid according only to storage Occur during path differentiation video repeats storage video, saves the space of caching server.
Accompanying drawing explanation
The schematic flow sheet 1 of a kind of video file sending method that Fig. 1 provides for the embodiment of the present invention;
The schematic flow sheet 2 of a kind of video file sending method that Fig. 2 provides for the embodiment of the present invention;
The structural representation Fig. 1 of a kind of video file dispensing device that Fig. 3 provides for the embodiment of the present invention;
The structural representation Fig. 2 of a kind of video file dispensing device that Fig. 4 provides for the embodiment of the present invention.
Detailed description of the invention
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 clearly Chu, it is fully described by.
Embodiment one
Embodiments provide a kind of video file sending method, be applied to caching server, described slow Deposit server to be connected with at least one source server, be connected with at least one client simultaneously, can receive and appoint A source server of anticipating is sent to the video flowing of any one client.The buffered video of described caching server Storehouse includes key frame buffered video storehouse and without crucial frame buffer video library.As it is shown in figure 1, described video is civilian Part sending method includes:
Step 101, one section of first source server of acquisition are sent to the source server video flowing of the first client.
Example, when sending a film video or a collection TV series video, owing to described video leads to It is unfavorable for complete transmission in a network the most greatly, therefore described video can be divided into some sections of shorter videos Streaming.In actual applications, when the first client needs to play certain film video, can be first to first Source server sends request;Then, the first source server can be according to request, by one section in this film video Source server video stream is to caching server;It follows that again by caching server according to this source server Video flowing generates purpose video, and is sent to the first client.Therefore, caching server needs first to obtain One section of first source server is sent to the source server video flowing of the first client.Described one section of source server regards Frequently stream can be the video of P byte in complete video, it is also possible to is the video of Q second duration in complete video, Wherein P is the integer more than or equal to 0, and Q is the real number more than 0.
Step 102, content according to described source server video flowing, obtain in buffered video storehouse with described source The video that server video stream is corresponding.
Concrete, source server video flowing includes signaling information and video data;Wherein signaling information be for Controlling the information of transmission, these information are generally not the information of user's direct requirement;And video data includes Video information, audio-frequency information, text message etc., be the information of user's direct requirement, and therefore video data is i.e. Content for source server video flowing.
Owing to caching server is when storing video, first eigenvalue can be calculated according to the content of video, then Using this eigenvalue as the index of video, store this video.Therefore, with described in obtaining buffered video storehouse During video corresponding to source server video flowing, first can calculate feature according to the content of source server video flowing Value, when there is the index identical with this feature value in buffered video storehouse, the video corresponding to this index is The video corresponding with source server video flowing.
Step 103, according to described video, obtain the purpose video being sent to described first client.
Concrete, if source server video flowing does not include key frame, then, regarding of the first client request Frequency is complete video, and being stored in the video in buffered video storehouse is also complete video, and therefore, caching regards Frequently corresponding with source server video flowing in storehouse video be for the purpose of video.
If source server video flowing includes key frame, then, in actual applications, the first client request Video be also possible to as imperfect video, such as, when first one film of client terminal playing, can basis User indicates, and directly commences play out sometime from the centre of film, now, and regarding of the first client request Frequency is the video after this moment, and therefore, caching server needs to intercept in buffered video storehouse and services with source In the video that device video flowing is corresponding, the video after this moment is as purpose video.
Step 104, described purpose video is sent to described first client.
Example, purpose video can be divided into some sections of shorter video flowings and be sent to the first client piecemeal.
So, caching server passes through the content of extraction source server video stream as video labeling, energy Enough more accurately identify the video in the buffered video storehouse corresponding with source server video flowing, thus slow Solve the pressure of source server, improve the fluency of Online Video;Simultaneously, it is to avoid according only to storage road Occur when video is distinguished in footpath repeats storage video, saves the space of caching server.
Optionally, the source server video of the first client it is sent at one section of first source server of described acquisition Before stream, first described method can also obtain the second source server and be sent to the video of the second client;So After, according to the content of described video, obtain at least one index of described video;Then, according to described extremely A few index stores described video.
Example, it can be the video including key frame that the second source server is sent to the video of the second client, It can also be the video not including key frame.It is sent to when buffered video storehouse does not exist this second source server During the video of the second client, if this video is the video including key frame, can be according to the rope of this video Draw and this video is stored in key frame video library;If this video is the video not including key frame, permissible According to the index of this video, this video is stored in without in key frame video library.
When storage includes the video of key frame, can first obtain all key frames of video, wherein video Key frame can be one can also be for multiple.When key frame is one, can according to hash algorithm, The content transformation of this key frame is characterized value, and using this feature value as the index of video, now, video Index be one.When key frame is multiple, can be according to hash algorithm, respectively by each key frame Content transformation be corresponding eigenvalue, and using obtain all corresponding with key frame eigenvalue as video Index, now, the index of video is multiple.When storage does not include the video of key frame, can will regard Frequently the content transformation of preset range is characterized the value index as video, and now, the index of video is one, For example, it is possible to the content of front W the byte of selecting video calculates the eigenvalue of this video, it is also possible to choose and regard Before frequency, the content of H second calculates the eigenvalue of this video, and this is not limited by the embodiment of the present invention, and wherein W is Integer more than or equal to 0, H is the real number more than 0.
It is also preferred that the left above-mentioned hash algorithm can be MD5 (Message Digest Algorithm MD5, message Digest algorithm the 5th edition) algorithm.MD5 is the widely used a kind of hash function of computer safety field, can With by numerical value that video data computing is a regular length.Under normal circumstances, video data A convert MD5 value is different from the MD5 value that non-video data A converts, and therefore MD5 value has unique mark The effect of video data A.
Optionally, described source server video flowing includes that N number of key frame, described N are more than or equal to 1 Integer.With described source server in the content according to described source server video flowing, acquisition buffered video storehouse During video corresponding to video flowing, can first according to the content of described source server video flowing the i-th key frame, Calculate the First Eigenvalue of described source server video flowing;Then, it is determined that whether described buffered video storehouse deposits In the first video group that index is identical with described the First Eigenvalue, described first video group includes at least one Video;When the first video group that existence index in described buffered video storehouse is identical with described the First Eigenvalue, At least one video that described first video group includes obtains and described corresponding the regarding of source server video flowing Frequently.Optionally, obtain and described source server video flowing at least one video that the first video group includes During corresponding video, can obtain first according to the content of described source server video flowing i+1 key frame The Second Eigenvalue of described source server video flowing;Then, it is determined that described first video group include at least one Whether individual video exists the second video group that index is identical with described Second Eigenvalue, described second video group Include at least one video;It is identical with described Second Eigenvalue when described buffered video storehouse exists index During the second video group, obtain and described source server at least one video that described second video group includes The video that video flowing is corresponding.
Example, when source server video flowing includes N number of key frame, can first obtain the i-th key frame Content.Then according to hash algorithm, the eigenvalue of the content calculating the i-th key frame regards as source server The First Eigenvalue of frequency stream.Then, it is judged that whether buffered video storehouse exists index identical with the First Eigenvalue Video;When indexing the video identical with the First Eigenvalue and being one, this video is and regards with source server The video that frequency stream is corresponding;When indexing the video identical with the First Eigenvalue and being multiple, by these multiple indexes and The video that the First Eigenvalue is identical forms the first video group.It follows that obtain source server video flowing i+1 The content of key frame.Then according to hash algorithm, the eigenvalue of content of i+1 key frame is calculated as source The Second Eigenvalue of server video stream.Then, it is judged that whether the first video group exists index special with second The video that value indicative is identical;When indexing the video identical with Second Eigenvalue and being one, this video is and source The video that server video stream is corresponding;When indexing the video identical with Second Eigenvalue and being multiple, this is many Video composition the 3rd video group that individual index is identical with Second Eigenvalue.The processing mode of the 3rd video group and the The processing mode of two video groups is similar to, and here is omitted, until can uniquely determine and source server video Till the video that stream is corresponding.
Such as, recall to go out in the 3rd collection video in the 23rd collection video as the personage in TV series During existing content, the 23rd collection video and the 3rd collection video will include same section of video, if in this section of video By chance include the i-th key frame, then, the eigenvalue of the i-th key frame will simultaneously as the 23rd collection video with The index of the 3rd collection video, therefore, when using the eigenvalue of the i-th key frame as source server video flowing During the First Eigenvalue, it is determined that go out two videos that index is identical with the First Eigenvalue, the i.e. the 23rd collection video Collect video with the 3rd, and cannot determine which video in two videos is and source server video flowing pair The video answered.Accordingly, it would be desirable to the content of the next key frame according to source server video flowing, obtain second Eigenvalue, if in the first video group there is the index identical with Second Eigenvalue, just in the only the 23rd collection video May determine that the 23rd collection video is the video corresponding with source server video flowing.
It is also preferred that the left the i-th key frame can be the 1st key frame.
Optionally, with described source in the content according to described source server video flowing, acquisition buffered video storehouse During video corresponding to server video stream, can first obtain the interior of described source server video flowing preset range Hold;Then, according to the content of described preset range, the eigenvalue of described source server video flowing is calculated;Continue And, determine and whether described buffered video storehouse exists the video that index is identical with described eigenvalue;When described slow When depositing the video that in video library, existence index is identical with described eigenvalue, by described index and described eigenvalue phase Same video is as the video corresponding with described source server video flowing.
The embodiment of the present invention illustrates as a example by 10240 bytes as video or before video flowing with preset range. In actual applications, preset range can be configured as the case may be, and this is not done by the embodiment of the present invention Limit.
When source server video flowing is the video flowing not including key frame, can first obtain source server and regard Front 10240 bytes of frequency stream.Then, the content transformation of these front 10240 bytes is characterized value.Then, Judge the video identical with this feature value without whether there is index in key frame video library, when there is this video, This video is the video corresponding with described source server video flowing.
What deserves to be explained is, be also front 10240 words of this video without the index of the video in key frame video library The eigenvalue of joint, and the index without the video in key frame video library is unique, therefore, when without key frame During the video that in video library, existence index is identical with the eigenvalue of source server video flowing, index and source server The video that the eigenvalue of video flowing is identical is typically unique, and therefore, this video is and described source server The video that video flowing is corresponding.
Optionally, according to described video, when obtaining the purpose video being sent to described first client, can According to described video and described source server video flowing, to determine start frame and the abort frame of described purpose video.
Example, when source server video flowing is the video flowing including key frame, signaling information would generally wrap Include key frame label, all keys included in the purpose video required for key frame label record user The label of frame, each of which label record this key frame order in all frames of complete video, because of This, according to key frame label, it may be determined that the starting keyframe label in purpose video required for user and Terminate key frame label, thus obtain this purpose video.Such as, key frame label be respectively 3398,3491, 201028,241480, needed for user is described, the 1st key frame of purpose video is the 3398 in complete video Frame, the 2nd key frame is the 3491st frame in complete video, and the 3rd key frame is the 201028 in complete video Frame, the 4th key frame is the 241480th frame in complete video, may thereby determine that the start frame of purpose video For the 3398th frame in complete video, the abort frame of purpose video is the 241480th frame in complete video, Then may determine that purpose video is the video in complete video between the 3398th frame to the 241480th frame. Then, obtain in video corresponding with source server video flowing in buffered video storehouse from the 3398th frame to the Video between 241480 frames, i.e. for the purpose of video.
Embodiments provide a kind of video file sending method, including: obtain one section of first source service Device is sent to the source server video flowing of the first client;According to the content of described source server video flowing, obtain Take video corresponding with described source server video flowing in buffered video storehouse;According to described video, obtain and send Purpose video to described first client;Described purpose video is sent to described first client.Compare In prior art, caching server passes through the content of extraction source server video stream as video labeling, it is possible to More accurately identify the video in the buffered video storehouse corresponding with source server video flowing, thus alleviate The pressure of source server, improves the fluency of Online Video;Simultaneously, it is to avoid according only to store path Occur when distinguishing video repeats storage video, saves the space of caching server.
Embodiment two
Embodiments provide a kind of video file sending method, as in figure 2 it is shown, be applied to caching clothes Business device, described caching server is connected with at least one source server, is connected with at least one client simultaneously, Any one source server can be received and be sent to the video flowing of any one client, described caching server Buffered video storehouse include key frame buffered video storehouse and without crucial frame buffer video library.The present embodiment is to regard Frequency file is to illustrate as a example by FLV form, and described video file sending method includes:
Step 201, obtain the second source server and be sent to the video of the second client, perform step 202.
Concrete, the video that is stored in buffered video storehouse needs for complete video, and such as, one complete Film video, an or complete TV play video of collection.Owing to, in transmitting procedure, complete video council is divided into Some sections of shorter video flowings.Therefore, it is sent to second when buffered video storehouse does not exist the second source server During certain video of client, in the transmitting procedure of this video, caching server can obtain and belong to this video All video flowings;Then form the second source server and be sent to the complete video of the second client.
Step 202, content according to video, obtain at least one index of video, perform step 203.
Preferably, when video includes key frame, the MD5 value of this key frame of video can be calculated, and will This MD5 value is as the index of video, because video includes at least one key frame, it is possible to obtains and regards At least one index of frequency;When video does not includes key frame, the content of this video preset range can be obtained Calculate MD5 value, and using this MD5 value as the index of video, now can obtain the unique index of video.
Step 203, according at least one index storage video, perform step 204.
Example, when video includes key frame, video is stored in key frame according at least one index and regards Frequently in storehouse;When video does not includes key frame, video is stored in without key frame video library according to unique index In.
Step 204, one section of first source server of acquisition are sent to the source server video flowing of the first client, Perform step 205.
Step 205, parsing source server video flowing head, obtain signaling information, perform step 206.
Example, the signaling information of the source server video flowing of FLV form is stored in head, signaling information bag Include key frame mark, for identifying whether source server video flowing is the video flowing including key frame.When source takes Business device video flowing is when being the video flowing including key frame, and signaling information also includes the institute of purpose video needed for user Having a key frame label, wherein first key frame is numbered the start frame label of purpose video, and last closes Key frame is numbered the abort frame label of purpose video.What deserves to be explained is, due to the purpose video needed for user Generally the longest, need segmentation to be transmitted, although the signaling information of now this section of source server video flowing wraps Include all key frame labels of purpose video, but the content of this section of source server video flowing may only include mesh A few key frame of video.
Step 206, the key frame judged in signaling information identify whether effectively;When the key in signaling information When frame identification is effective, perform step 207;When the key frame in signaling information identifies invalid, perform step 215。
Concrete, the determination method of video from the video not including key frame owing to including key frame is different, Accordingly, it would be desirable to first determine whether whether source server video flowing is the video flowing including key frame.Work as signaling information In key frame mark effective time, illustrate that source server video flowing is the video flowing including key frame, needs exist In key frame buffered video storehouse, according to the determination method of the video including key frame, determine and regard with source server The video that frequency stream is corresponding;When the key frame in signaling information identifies invalid, illustrate that source server video flowing is Do not include the video flowing of key frame, need in the crucial frame buffer video library of nothing, according to not including key frame The determination method of video, determines the video corresponding with source server video flowing.Assume that key frame is designated ture Time, represent key frame mark effectively;When key frame is designated false, represents that key frame mark is invalid, then may be used To determine that key frame identifies whether effectively by judging the key frame in signaling information to identify whether as ture.
Step 207, according to the key frame label in signaling information, obtain the i-th crucial of source server video flowing Frame, performs step 208.
Example, the i-th with signaling information can be obtained crucial in the content of source server video flowing Frame corresponding to frame label, as the i-th key frame of source server video flowing.Such as, regard at source server The content of frequency stream obtains the 1st frame corresponding to key frame label with signaling information, as source server 1st key frame of video flowing.Concrete, it is assumed that the key frame in signaling information is numbered 120,271,362, 583,1264,1755,2686, can first obtain the 1st key frame label 120 in signaling information, Then obtaining the frame being numbered 120 in the content of source server video flowing, this frame is source server video 1st key frame in stream.
Step 208, calculate the MD5 value of the content of the i-th key frame, and using this MD5 value as a MD5 Value, performs step 209.
Example, the MD5 value of the content of the i-th key frame according to MD5 algorithm, can be calculated.
Step 209, judge whether key frame buffered video storehouse exists index and identical the regarding of MD5 value Frequently;When there is described video, perform step 210;When there is not described video, perform step 219.
Step 210, judge whether described video is multiple;When described video is multiple, perform step 211; When described video is one, perform step 212.
Step 211, give i by the value of i+1, perform step 207.
By the way of giving i by the value of i+1, obtain next key frame.
, if there is multiple index and a MD5 of the 1st key frame in key frame buffered video storehouse in example It is worth identical video, the plurality of video can be formed the first video group, then obtain the 2nd key frame, And calculate a MD5 value of the 2nd key frame, then according to a MD5 value of described 2nd key frame from First video group obtains the video corresponding with source server video flowing.If the first video group exists multiple with The video that oneth MD5 value of the 2nd key frame is identical, can form the second video group by the plurality of video, And continue to obtain the 3rd key frame, and calculate a MD5 value of the 3rd key frame, then crucial according to the 3rd Oneth MD5 value of frame obtains the video corresponding with source server video flowing from the second video group.Class successively Push away, can uniquely determine the video corresponding with source server video flowing.
Step 212, obtain the video corresponding with source server video flowing, execution step 213.
Step 213, according to key frame label, determine start frame and the abort frame of purpose video, perform step 214。
Example, the start frame of purpose video can be determined according to the first of signaling information key frame label; According to last key frame label of signaling information, determine the abort frame of purpose video.
Step 214, the basis video corresponding with source server video flowing and the start frame of purpose video and end Only frame, generates purpose video, performs step 218.
Step 215, calculate the MD5 value of content of source server video flowing preset range, and by this MD5 It is worth as the 2nd MD5 value, performs step 216.
Example, the MD5 of the content of source server video flowing preset range according to MD5 algorithm, can be calculated Value.
Step 216, judge without whether crucial frame buffer video library exists index identical with the 2nd MD5 value Video;When the video that existence index is identical with the 2nd MD5 value, perform step 217;When there is not index During identical with the 2nd MD5 value video, perform step 219.
Example, when the video that existence index in the crucial frame buffer video library of nothing is identical with the 2nd MD5 value, Described video is only possible to be one, and therefore, this video is the video corresponding with source server video flowing.
Step 217, using the video corresponding with source server video flowing as purpose video, perform step 218.
Example, when source server video flowing does not includes key frame, purpose video is complete video, therefore, Can directly using the video corresponding with source server video flowing as purpose video.
Step 218, purpose video being sent to the first client, this flow process terminates.
Example, purpose video can be divided into some sections of shorter video flowings and be sent to the first client piecemeal.
Step 219, give the first client by source server video stream, and store source server video flowing, This flow process terminates.
It should be noted that the elder generation of a kind of video file sending method step of embodiment of the present invention offer Rear order can suitably adjust, and step can also increase and decrease the most accordingly, any familiar Those skilled in the art, in the technical scope that the invention discloses, can readily occur in the side of change Method, all should contain within protection scope of the present invention, therefore repeat no more.
Embodiments provide a kind of video file sending method, compared to prior art, described method By the content of extraction source server video stream as video labeling, it is possible to more accurately identify and take with source Video in the buffered video storehouse that business device video flowing is corresponding, thus alleviate the pressure of source server, improve The fluency of Online Video;Simultaneously, it is to avoid repeating of occurring when distinguishing video according only to store path is deposited Storage video, saves the space of caching server.
Embodiment three
Embodiments provide a kind of video file dispensing device 30, as it is shown on figure 3, described device 30 Including:
First acquiring unit 301, is sent to the source clothes of the first client for obtaining one section of first source server Business device video flowing;
Second acquisition unit 302, for the content according to described source server video flowing, obtains buffered video Video corresponding with described source server video flowing in storehouse;
3rd acquiring unit 303, for according to described video, obtaining the mesh being sent to described first client Video;
Transmitting element 304, for being sent to described first client by described purpose video.
So, caching server passes through the content of extraction source server video stream as video labeling, energy Enough more accurately identify the video in the buffered video storehouse corresponding with source server video flowing, thus slow Solve the pressure of source server, improve the fluency of Online Video;Simultaneously, it is to avoid according only to storage road Occur when video is distinguished in footpath repeats storage video, saves the space of caching server.
Optionally, as shown in Figure 4, described device 30 also includes: the 4th acquiring unit 305, is used for obtaining Second source server is sent to the video of the second client;5th acquiring unit 306, for regarding according to described The content of frequency, obtains at least one index of described video;Memory element 307, for according to described at least One index stores described video.
Optionally, described source server video flowing includes that N number of key frame, described N are more than or equal to 1 Integer;Second acquisition unit 302, specifically for: according in described source server video flowing the i-th key frame Hold, calculate the First Eigenvalue of described source server video flowing;Determine in described buffered video storehouse and whether exist Indexing the first video group identical with described the First Eigenvalue, described first video group includes that at least one regards Frequently;When the first video group that existence index in described buffered video storehouse is identical with described the First Eigenvalue, At least one video that described first video group includes obtains the video corresponding with described source server video flowing.
Optionally, second acquisition unit 302, specifically for: according to described source server video flowing i+1 The content of key frame, obtains the Second Eigenvalue of described source server video flowing;Determine described first video group Including at least one video in whether there is the index second video group identical with described Second Eigenvalue, institute State the second video group and include at least one video;When described buffered video storehouse exists index and described second During identical the second video group of eigenvalue, obtain at least one video that described second video group includes with The video that described source server video flowing is corresponding.
Optionally, second acquisition unit 302, specifically for: obtain described source server video flowing and preset model The content enclosed;According to the content of described preset range, calculate the eigenvalue of described source server video flowing;Really Whether fixed described buffered video storehouse exists the video that index is identical with described eigenvalue;When described buffered video During the video that in storehouse, existence index is identical with described eigenvalue, by regard identical with described eigenvalue of described index Frequency is as the video corresponding with described source server video flowing.
Optionally, the 3rd acquiring unit 303, specifically for: regard according to described video and described source server Frequency stream, determines start frame and the abort frame of described purpose video.
It should be noted that first, those skilled in the art is it can be understood that arrive, for describe Convenient and succinct, the device of foregoing description and the specific works process of unit, it is referred to preceding method and implements Corresponding process in example, does not repeats them here.
Second, in actual applications, described first acquiring unit 301, second acquisition unit the 302, the 3rd obtain Take unit the 303, the 4th acquiring unit the 305, the 5th acquiring unit 306, memory element 307 all can be by being positioned at Central processing unit (Central Processing Unit, CPU) in device 30, microprocessor (Micro Processor Unit, MPU), digital signal processor (Digital Signal Processor, DSP) or Field programmable gate arrays (Field Programmable Gate Array, FPGA) etc. realize.Transmitting element 304 can be realized by the drive circuit of the antenna being positioned in device 30 and antenna.
Embodiments provide a kind of video file dispensing device, including: the first acquiring unit, it is used for Obtain one section of first source server and be sent to the source server video flowing of the first client;Second acquisition unit, With described source server video in the content according to described source server video flowing, acquisition buffered video storehouse The video that stream is corresponding;3rd acquiring unit, for according to described video, obtains and is sent to described first client The purpose video of end;Transmitting element, for being sent to described first client by described purpose video.Compare In prior art, shown device passes through the content of extraction source server video stream as video labeling, it is possible to more Add the video accurately identified in the buffered video storehouse corresponding with source server video flowing, thus alleviate The pressure of source server, improves the fluency of Online Video;Simultaneously, it is to avoid according only to store path district Occur when dividing video repeats storage video, saves the space of caching server.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or meter Calculation machine program product.Therefore, the present invention can use hardware embodiment, software implementation or combine software and The form of the embodiment of hardware aspect.And, the present invention can use and wherein include calculating one or more The computer-usable storage medium of machine usable program code (includes but not limited to disk memory and optical storage Device etc.) form of the upper computer program implemented.
The present invention is with reference to method, equipment (system) and computer program according to embodiments of the present invention Flow chart and/or block diagram describe.It should be understood that can be by computer program instructions flowchart and/or side Flow process in each flow process in block diagram and/or square frame and flow chart and/or block diagram and/or the knot of square frame Close.Can provide these computer program instructions to general purpose computer, special-purpose computer, Embedded Processor or The processor of other programmable data processing device is to produce a machine so that by computer or other can The instruction that the processor of programming data processing equipment performs produces for realizing in one flow process or multiple of flow chart The device of the function specified in flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and can guide computer or other programmable data processing device In the computer-readable memory worked in a specific way so that be stored in this computer-readable memory Instruction produces the manufacture including command device, and this command device realizes at one flow process of flow chart or multiple stream The function specified in journey and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, makes Sequence of operations step must be performed to produce computer implemented process on computer or other programmable devices, Thus the instruction performed on computer or other programmable devices provides for realizing in one flow process of flow chart Or the step of the function specified in multiple flow process and/or one square frame of block diagram or multiple square frame.
The above, only presently preferred embodiments of the present invention, it is not intended to limit the protection model of the present invention Enclose.

Claims (12)

1. a video file sending method, it is characterised in that described method includes:
Obtain one section of first source server and be sent to the source server video flowing of the first client;
According to the content of described source server video flowing, with described source server video in acquisition buffered video storehouse The video that stream is corresponding;
According to described video, obtain the purpose video being sent to described first client;
Described purpose video is sent to described first client.
Method the most according to claim 1, it is characterised in that in one section of first source service of described acquisition Before device is sent to the source server video flowing of the first client, described method also includes:
Obtain the second source server and be sent to the video of the second client;
According to the content of described video, obtain at least one index of described video;
Described video is stored according at least one index described.
Method the most according to claim 1 and 2, it is characterised in that described source server video stream packets Including N number of key frame, described N is the integer more than or equal to 1;
The described content according to described source server video flowing, with described source server in acquisition buffered video storehouse The video that video flowing is corresponding includes:
According to the content of described source server video flowing the i-th key frame, calculate described source server video flowing The First Eigenvalue;
Determine and whether described buffered video storehouse exist the first video group that index is identical with described the First Eigenvalue, Described first video group includes at least one video;
When the first video group that existence index in described buffered video storehouse is identical with described the First Eigenvalue, At least one video that described first video group includes obtains the video corresponding with described source server video flowing.
Method the most according to claim 3, it is characterised in that described include in described first video group At least one video in obtain the video corresponding with described source server video flowing include:
According to the content of described source server video flowing i+1 key frame, obtain described source server video flowing Second Eigenvalue;
Determine and whether at least one video that described first video group includes exists index and described second feature Being worth the second identical video group, described second video group includes at least one video;
When the second video group that existence index in described buffered video storehouse is identical with described Second Eigenvalue, At least one video that described second video group includes obtains the video corresponding with described source server video flowing.
Method the most according to claim 1 and 2, it is characterised in that described according to described source server The content of video flowing, obtains the video corresponding with described source server video flowing in buffered video storehouse and includes:
Obtain the content of described source server video flowing preset range;
According to the content of described preset range, calculate the eigenvalue of described source server video flowing;
Determine and whether described buffered video storehouse exists the video that index is identical with described eigenvalue;
When described buffered video storehouse exists identical with the described eigenvalue video of index, by described index and The identical video of described eigenvalue is as the video corresponding with described source server video flowing.
6. according to the method described in claim 1-4 any one claim, it is characterised in that described According to described video, acquisition is sent to the purpose video of described first client and includes:
According to described video and described source server video flowing, determine start frame and the termination of described purpose video Frame.
7. a video file dispensing device, it is characterised in that described device includes:
First acquiring unit, is sent to the source server of the first client for obtaining one section of first source server Video flowing;
Second acquisition unit, for the content according to described source server video flowing, obtains in buffered video storehouse The video corresponding with described source server video flowing;
3rd acquiring unit, for according to described video, acquisition is sent to the purpose of described first client and regards Frequently;
Transmitting element, for being sent to described first client by described purpose video.
Device the most according to claim 7, it is characterised in that described device also includes:
4th acquiring unit, is sent to the video of the second client for obtaining the second source server;
5th acquiring unit, for the content according to described video, obtains at least one index of described video;
Memory element, for storing described video according at least one index described.
9. according to the device described in claim 7 or 8, it is characterised in that described source server video stream packets Including N number of key frame, described N is the integer more than or equal to 1;
Second acquisition unit, specifically for:
According to the content of described source server video flowing the i-th key frame, calculate described source server video flowing The First Eigenvalue;
Determine and whether described buffered video storehouse exist the first video group that index is identical with described the First Eigenvalue, Described first video group includes at least one video;
When the first video group that existence index in described buffered video storehouse is identical with described the First Eigenvalue, At least one video that described first video group includes obtains the video corresponding with described source server video flowing.
Device the most according to claim 9, it is characterised in that second acquisition unit, specifically for:
According to the content of described source server video flowing i+1 key frame, obtain described source server video flowing Second Eigenvalue;
Determine and whether at least one video that described first video group includes exists index and described second feature Being worth the second identical video group, described second video group includes at least one video;
When the second video group that existence index in described buffered video storehouse is identical with described Second Eigenvalue, At least one video that described second video group includes obtains the video corresponding with described source server video flowing.
11. according to the device described in claim 7 or 8, it is characterised in that second acquisition unit, specifically For:
Obtain the content of described source server video flowing preset range;
According to the content of described preset range, calculate the eigenvalue of described source server video flowing;
Determine and whether described buffered video storehouse exists the video that index is identical with described eigenvalue;
When described buffered video storehouse exists identical with the described eigenvalue video of index, by described index and The identical video of described eigenvalue is as the video corresponding with described source server video flowing.
12. according to the device described in claim 7-10 any one claim, it is characterised in that the 3rd Acquiring unit, specifically for:
According to described video and described source server video flowing, determine start frame and the termination of described purpose video Frame.
CN201610237884.1A 2016-04-15 2016-04-15 Video file sending method and apparatus Pending CN105915930A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610237884.1A CN105915930A (en) 2016-04-15 2016-04-15 Video file sending method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610237884.1A CN105915930A (en) 2016-04-15 2016-04-15 Video file sending method and apparatus

Publications (1)

Publication Number Publication Date
CN105915930A true CN105915930A (en) 2016-08-31

Family

ID=56747275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610237884.1A Pending CN105915930A (en) 2016-04-15 2016-04-15 Video file sending method and apparatus

Country Status (1)

Country Link
CN (1) CN105915930A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108111866A (en) * 2016-11-24 2018-06-01 法乐第(北京)网络科技有限公司 The control method and system of audio and video playing
CN109104614A (en) * 2018-07-02 2018-12-28 北京东方网信科技股份有限公司 A kind of live streaming caching system and method
WO2019196225A1 (en) * 2018-04-10 2019-10-17 网宿科技股份有限公司 Resource file feedback method and apparatus
CN110543584A (en) * 2018-05-29 2019-12-06 腾讯科技(深圳)有限公司 method, device, processing server and storage medium for establishing face index

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102111685A (en) * 2011-02-24 2011-06-29 深信服网络科技(深圳)有限公司 Acceleration method, equipment and system for network video loading
CN102202229A (en) * 2011-05-18 2011-09-28 北京瀚景锦河科技有限公司 Method and device for real-time video gateway
US20140072275A1 (en) * 2012-09-13 2014-03-13 Sony Corporation Display control device, recording control device, and display control method
CN104506493A (en) * 2014-12-04 2015-04-08 武汉市烽视威科技有限公司 HLS content source returning and caching realization method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102111685A (en) * 2011-02-24 2011-06-29 深信服网络科技(深圳)有限公司 Acceleration method, equipment and system for network video loading
CN102202229A (en) * 2011-05-18 2011-09-28 北京瀚景锦河科技有限公司 Method and device for real-time video gateway
US20140072275A1 (en) * 2012-09-13 2014-03-13 Sony Corporation Display control device, recording control device, and display control method
CN104506493A (en) * 2014-12-04 2015-04-08 武汉市烽视威科技有限公司 HLS content source returning and caching realization method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108111866A (en) * 2016-11-24 2018-06-01 法乐第(北京)网络科技有限公司 The control method and system of audio and video playing
WO2019196225A1 (en) * 2018-04-10 2019-10-17 网宿科技股份有限公司 Resource file feedback method and apparatus
US11206302B2 (en) 2018-04-10 2021-12-21 Wangsu Science & Technology Co., Ltd. Method and device for feeding back a resource file
CN110543584A (en) * 2018-05-29 2019-12-06 腾讯科技(深圳)有限公司 method, device, processing server and storage medium for establishing face index
CN110543584B (en) * 2018-05-29 2023-05-05 腾讯科技(深圳)有限公司 Method, device, processing server and storage medium for establishing face index
CN109104614A (en) * 2018-07-02 2018-12-28 北京东方网信科技股份有限公司 A kind of live streaming caching system and method

Similar Documents

Publication Publication Date Title
CN104348740B (en) Data package processing method and system
CN105553880B (en) Data processing method and device in a kind of software defined network
CN105915930A (en) Video file sending method and apparatus
CN1980198B (en) Method and apparatus for striping message payload data over a network
CN104503745B (en) A kind of method and apparatus generated using channel packet
CN111211980B (en) Transmission link management method, transmission link management device, electronic equipment and storage medium
CN107483627A (en) A kind of file distributing, method for down loading, Distributor, client and system
CN109391627B (en) Method for identifying encrypted transmission YouTube DASH video of TLS protocol
CN101753586A (en) Method for transmitting data, process method for receiving data and device
CN101188477A (en) A data packet sequence receiving method and device
CN108429701A (en) network acceleration system
CN105282138A (en) Interest return control message
CN107241305A (en) A kind of network protocol analysis system and its analysis method based on polycaryon processor
CN106210032A (en) The method and device reported based on terminal data batch
CN104918108A (en) Video accurate positioning device and method based on HLS (HTTP Live Streaming) protocol
CN107071358A (en) Panorama live broadcast system under video-splicing server and mobile status
CN109788247A (en) A kind of method and apparatus monitoring instruction identification
CN105791382A (en) Resource allocation using CCN manifests
WO2018121705A1 (en) Stream data bidirectional transmission method and device
CN106411842A (en) Transferring state in content centric network stacks
CN113452630B (en) Data merging method, data splitting method, device, equipment and storage medium
CN110248379A (en) The performance test methods and device of base station in WLAN
CN103561013B (en) The data distribution systems of Streaming Media
CN101771494A (en) Data transmission method and data transmission device
CN108234567A (en) Method for uploading, client, cloud storage platform and the server of datagram 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160831