CN108023864A - Streaming Media method for pushing and device - Google Patents
Streaming Media method for pushing and device Download PDFInfo
- Publication number
- CN108023864A CN108023864A CN201610962959.2A CN201610962959A CN108023864A CN 108023864 A CN108023864 A CN 108023864A CN 201610962959 A CN201610962959 A CN 201610962959A CN 108023864 A CN108023864 A CN 108023864A
- Authority
- CN
- China
- Prior art keywords
- streaming media
- network bandwidth
- piecemeal
- client
- buffering area
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/40—Support for services or applications
- H04L65/4061—Push-to services, e.g. push-to-talk or push-to-video
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/75—Media network packet handling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/80—Responding to QoS
-
- 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/238—Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
- H04N21/2387—Stream processing in response to a playback request from an end-user, e.g. for trick-play
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention discloses a kind of Streaming Media method for pushing, including:Receive the Streaming Media piecemeal request that client is sent;The Streaming Media piecemeal request is responded, the buffer size and network bandwidth of Streaming Media to be played are currently stored according to the client, determines N number of Streaming Media piecemeal corresponding with the Streaming Media piecemeal request;N is the integer more than or equal to 1;Definite N number of Streaming Media piecemeal is pushed to the client.The present invention also discloses a kind of Streaming Media pusher.
Description
Technical field
The present invention relates to stream media technology, more particularly to a kind of Streaming Media method for pushing and device.
Background technology
With the development of internet and mobile Internet, in past 10 years, video traffic is such as emerged rapidly in large numbersBamboo shoots after a spring rain, swift and violent hair
Exhibition, the main carrying form that video traffic will be linked up and entertained as following people.
In recent years, internet video was grown rapidly, and the flow of video content has accounted for the half of whole internet traffic.
Speak of internet video to would have to mention stream media technology, the continuous development for being exactly stream media technology promotes current internet
The fast development of video.The development of science and technology also promotes the development of stream media technology at the same time so that stream media technology is from biography
System technology develops into adaptive (HAS, the HTTP Adaptive Streaming) technology of newest code stream.
In HAS technologies, hypertext transfer protocol (HTTP, HyperText Transfer Protocol) is all based on
Come what is realized.Although HTTP 2.0 reduces the section request that user end to server is sent, realize the low of net cast and prolong
When, but in k video segment push response, the code check of k video segment is constant, it is impossible in time according to bandwidth
Change to choose corresponding video segment, therefore bandwidth can not be made full use of.
The content of the invention
To solve existing technical problem, the embodiment of the present invention provides a kind of Streaming Media method for pushing and device.
What the technical solution of the embodiment of the present invention was realized in:
An embodiment of the present invention provides a kind of Streaming Media method for pushing, including:
Receive the Streaming Media piecemeal request that client is sent;
The Streaming Media piecemeal request is responded, the buffer size of Streaming Media to be played is currently stored according to the client
And network bandwidth, determine N number of Streaming Media piecemeal corresponding with the Streaming Media piecemeal request;N is the integer more than or equal to 1;
Definite N number of Streaming Media piecemeal is pushed to the client.
In such scheme, the buffer size and Netowrk tape that Streaming Media to be played is currently stored according to the client
Width, determines N number of Streaming Media piecemeal corresponding with the Streaming Media piecemeal request, including:
Compare first buffering area size and second buffering area size, obtain comparative result;The first buffering area size table
Sign currently stores the buffer size of Streaming Media to be played;The second buffering area size is the buffer size set;
Using comparative result, and current network bandwidth is combined, determine N number of Streaming Media piecemeal.
It is described to utilize comparative result in such scheme, and current network bandwidth is combined, determine N number of Streaming Media piecemeal,
Including:
When first buffering area size is less than or equal to the second buffering area size, compare first network bandwidth and the second net
Network bandwidth;First network bandwidth characterizes current network bandwidth;M Streaming Media piecemeal institute of second network bandwidth characterization last push
The network bandwidth used;M is the integer more than or equal to 1;
N number of Streaming Media piecemeal is determined according to comparative result.
It is described that N number of Streaming Media piecemeal is determined according to comparative result in such scheme, including:
The first network bandwidth is more than or equal to second network bandwidth, and is used with push Streaming Media piecemeal before
Network bandwidth compare, when the first network bandwidth is bandwidth increase twice in succession, it is the sum of M and the first value to determine N.
It is described that N number of Streaming Media piecemeal is determined according to comparative result in such scheme, including:
First network bandwidth is more than or equal to second network bandwidth, and with pushing net used in Streaming Media piecemeal before
Network bandwidth is compared, and when the first network bandwidth is not bandwidth increase twice in succession, it is M to determine N.
It is described that N number of Streaming Media piecemeal is determined according to comparative result in such scheme, including:
When the first network bandwidth is less than second network bandwidth, it is 1 to determine N.
It is described to utilize comparative result in such scheme, and current network bandwidth is combined, determine N number of Streaming Media piecemeal,
Including:
When first buffering area size is more than second buffering area size, the time span and client of Streaming Media piecemeal are utilized
Buffer size, and combine least cost function, determine N number of Streaming Media piecemeal.
It is described using the time span of Streaming Media piecemeal and the buffer size of client in such scheme, and combine most
Small cost function, determines N number of Streaming Media piecemeal, including:
Using N, first function, the cost letter for the section number of requests that the first function characterization client is sent are formed
Number;
Using N, the buffer size of client and the time span using Streaming Media piecemeal, second function is formed, it is described
The cost function of the buffer size of second derived function characterization client;
Using first function and second function, least cost function is formed;
Using least cost function, the value of N is determined.
The embodiment of the present invention additionally provides a kind of Streaming Media pusher, including:
Receiving unit, for receiving the Streaming Media piecemeal request of client transmission;
Determination unit, for responding the Streaming Media piecemeal request, stream matchmaker to be played is currently stored according to the client
The buffer size and network bandwidth of body, determine N number of Streaming Media piecemeal corresponding with the Streaming Media piecemeal request;N be more than
Integer equal to 1;
Transmitting element, for definite N number of Streaming Media piecemeal to be pushed to the client.
In such scheme, the determination unit, including:
Comparison module, for comparing first buffering area size and second buffering area size, obtains comparative result;Described first
Buffer size characterizes the buffer size for currently storing Streaming Media to be played;The second buffering area size is the buffering set
Area's size;
Determining module, for using comparative result, and combines current network bandwidth, determines N number of Streaming Media piecemeal.
In such scheme, the determining module, is specifically used for:
When first buffering area size is less than or equal to the second buffering area size, compare first network bandwidth and the second net
Network bandwidth;First network bandwidth characterizes current network bandwidth;M Streaming Media piecemeal institute of second network bandwidth characterization last push
The network bandwidth used;M is the integer more than or equal to 1;
N number of Streaming Media piecemeal is determined according to comparative result.
In such scheme, the determining module, is specifically used for:
When first buffering area size is more than the second buffering area size, time span and visitor using Streaming Media piecemeal
The buffer size at family end, and least cost function is combined, determine N number of Streaming Media piecemeal.
Streaming Media method for pushing and device provided in an embodiment of the present invention, receive the Streaming Media piecemeal that client is sent and ask
Ask;The Streaming Media piecemeal request is responded, the buffer size and net of Streaming Media to be played are currently stored according to the client
Network bandwidth, determines N number of Streaming Media piecemeal corresponding with the Streaming Media piecemeal request;N is the integer more than or equal to 1;It will determine
N number of Streaming Media piecemeal be pushed to the client, determine N value when, taken into full account the influence of network bandwidth, such as
This, can push the Streaming Media piecemeal of respective numbers according to the change of network bandwidth in time.There is provided using the embodiment of the present invention
Scheme, while net cast low delay requirement is met, can reach adaptively according to the change of network bandwidth select phase
The Streaming Media piecemeal of quantity is answered, takes full advantage of network bandwidth.
Brief description of the drawings
In attached drawing (it is not necessarily drawn to scale), similar reference numeral phase described in different views
As component.Similar reference numerals with different letter suffix can represent the different examples of similar component.Attached drawing with example and
Unrestricted mode generally shows each embodiment discussed herein.
Fig. 1 is the realization principle schematic diagram of HAS technologies in correlation technique;
Fig. 2 is the media piecemeal schematic diagram that HAS technologies cut into various code rate;
Fig. 3 is once to interact schematic diagram based on HTTP/1.1 agreements come the HAS technologies client and server realized;
Fig. 4 is to interact schematic diagram based on HTTP/1.1 agreements come the HAS technologies client and server realized;
Fig. 5 is to interact schematic diagram based on 2.0 agreements of HTTP come the HAS technologies client and server realized;
Fig. 6 is the method flow schematic diagram of one stream media push of the embodiment of the present invention;
Fig. 7 is the flow diagram that the embodiment of the present invention two determines video segment quantity;
Fig. 8 is three Streaming Media pusher structure diagram of the embodiment of the present invention.
Embodiment
The present invention is described in further detail again with reference to the accompanying drawings and embodiments.
As it was previously stated, the continuous development of stream media technology promotes the fast development of current internet video.At present, matchmaker is flowed
Body technique develops into HAS technologies via conventional art.Wherein, traditional stream media technology mainly has two major classes, Yi Leishi
Real time streaming transport protocol (RTSP, Real Time Streaming Protocol)/real-time transport protocol (RTP, Real Time
Transfer Protocol) represent connection-oriented stream media technology, it is another kind of, be use connectionless HTTP it is progressive
Formula is downloaded.
Lower stream media technology describes in detail.
First, the Streaming Media scheme of RTSP/RTP is introduced
RTSP is a kind of traditional Streaming Media control protocol, it has the characteristics that state means to connect since client
Server end is connected to, until during the entire process of disconnecting, server end can monitor the state of client always.Client
Control command is passed on to server by RTSP, such as plays, suspend or interrupts.
RTP/RTP control protocols (RTCP, Real Time Transfer Control Protocol) are end-to-end are based on
The application layer protocol of multicast.Wherein, RTP is used for data transfer, and RTCP is used to count, manage and control RTP to transmit, both cooperate with
Work, can significantly improve the efficiency of transmission of network real time data.
Stream media technology scheme based on this framework, is established after connection, server starts between server-side and client
Media data packet is continuously sent, media data packet is packaged using RTP, and client control information passes through RTSP information
Bag is with User Datagram Protocol (UDP, User Datagram Protocol) or transmission control protocol (TCP, Transmission
Control Protocol) mode transmit.
Furthermore introduce HTTP progressive downloads
HTTP progressive downloads technology employs stateless HTTP compared with stateful RTSP/RTP technologies.When
During HTTP client forward end request datas, server end is by the data distributing of request to client, but server end is not
The state of client can be recorded, each HTTP request is all a disposable independent session.
The terminal player of the current mainstream of function of progressive download is supported, the Flash, Microsoft such as Adobe
Silverlight and Windows Media Player.So-called progressive download, refers to:Terminal player can be whole
A media file can start the broadcasting of media before being downloaded completion, if client and server end support HTTP1.1,
Terminal, which can also be downloaded never, arbitrarily to be chosen a time point and commences play out in the part of completion.
Then, HAS technologies are introduced.
Media content is transmitted to user using based on the transmission mode of HTTP, the media play body of user can be greatly promoted
Test, while also reduce the technical sophistication degree of server.Transmission mode based on HTTP improves media content in the network equipment
In penetration capacity, the technology at present become streaming media video industry development trend.
The advantages of transmission mode based on HTTP, and the characteristics of combine Streaming Media so that HAS technologies are come into being, it melts
Closed traditional RTSP/RTP stream media technologys and the advantages of based on HTTP progressive download technologies, have it is efficient, expansible with
And the characteristics of compatible strong.Fig. 1 is the realization principle schematic diagram of HAS technologies.As shown in Figure 1, the key of HAS technologies is exactly media
The cutting whole into sections of data, the time span of each piecemeal is identical, generally 2~10 seconds.In video coding layer, it means that each
All by several complete video pictures group (GOP, Group of Pictures) compositions, (each piecemeal has a pass to piecemeal
Key I frames), each piecemeal and the media piecemeal onrelevant in past and future are ensured with this.
Media piecemeal is stored in HTTP Web servers, and client asks media to Web server in a linear fashion
Piecemeal, and carry out in a manner of traditional HTTP the download of media piecemeal, when media piecemeal is downloaded to client, client according to
This series of media piecemeal of played in order.Because these media piecemeals are encoded according to the rule of agreement, each media piecemeal it
Between it is sleazy overlapping or discontinuous, for a user, then see a seamless smooth result of broadcast.
As shown in Fig. 2, if piece of content has been provided for various code rate when encoding and exporting, server can be cut to
The media piecemeal of various code rate.Because Web server transmission data are to be carried out as much as possible using network bandwidth under content
Carry, without the controlling mechanism of flow, client can reliably detect Web server to the available network band of client
Width, so as to determine to download greater or lesser media piecemeal, realizes the adaptive of code check.
Compared with traditional streaming media distribution technology, HAS technologies have the advantage that:
First, Web server is easier to dispose, because HAS technologies employ general HTTP, therefore traditional HTTP delays
Deposit/act on behalf of, the network equipment such as fire wall can be perfect compatible;
Secondly, there is provided preferably compatibility and arrival rate, can dynamically adjust according to the amount of bandwidth of last access net
Code check, realizes the distribution of content;
3rd, experience is more preferable for a user, and is not required service supplier to go to consider the bandwidth for watching user.
In conclusion relative to traditional stream media technology, HAS technologies are capable of providing more preferable service quality, because it
Whole available bandwidth can be used, and (non-self-adapting Flow Technique then needs to force client to select consolidating less than available bandwidth
Bit rates).
At present, during practical application, the code stream technology of HAS is all based on HTTP/1.1 agreements to realize, but HTTP/
1.1 agreements are an application layer protocols, by asking and response is formed.All it is visitor forever as shown in figure 3, in HTTP/1.1 agreements
Initiate request, server back response in family end.HTTP1.1 agreements are a stateless agreements, i.e. server will not store visitor
The information at family end, so the current request and last time request of same client are no correspondences, in this way, when client does not have
When having initiation request, server will be unable to PUSH message to client, so limit the use of HTTP1.1 agreements.
Specifically, video live broadcast service is done in application, as shown in figure 4, often obtaining using HAS based on HTTP/1.1 agreements
One video segment, which will be sent, once asks so that web server is once asked to respond;At the same time, it is necessary to reduce each regard
The time span of frequency section, to reduce net cast when, postpone end to end, thus need client repeatedly to web server
Request is sent to complete net cast, is asked however, being transmitted across more video flowing piecemeals to web server, mobile network can be taken
Network bandwidth, while web server will also handle substantial amounts of request, add the load of web server, and due to cell phone customer
End is frequently asked, and will also consume mobile phone electricity.
Based on this, HTTP 2.0 has increased a powerful new function newly, is exactly that server can ask one of client
Ask and send multiple responses.In other words, in addition to the response to initial request, server can also be provided additionally to client push
Source, without the clear request of client, so in net cast, as shown in figure 5, when client sends a section request
When, server will respond k section, send request for each video segment without client, can be used in client
SETTINGS_MAX_CONCURRENT_STREAMS sets the number of slices quantity for carrying out limiting server push.Using this push
Mode realizes although the low delay of net cast reduces the section request number of times that user end to server is sent, but due to k
In a section push response, the code check of k video segment is constant, therefore cannot be chosen in time according to the change of bandwidth
Corresponding video segment, can not make full use of network bandwidth.
So needing a solution, the quantitative value that server continuously pushes section every time can be set adaptively,
That is section that the user end to server of reduction is sent request, while corresponding video segment is chosen according to the change of bandwidth.
Based on this, in various embodiments of the present invention:Receive the Streaming Media piecemeal request that client is sent;Described in response
Streaming Media piecemeal is asked, and the buffer size and network bandwidth of Streaming Media to be played are currently stored according to the client, is determined
N number of Streaming Media piecemeal corresponding with the Streaming Media piecemeal request;N is the integer more than or equal to 1;By definite N number of Streaming Media
Piecemeal is pushed to the client.
Embodiment one
The method of Streaming Media of embodiment of the present invention push, applied to server, as shown in fig. 6, this method includes following step
Suddenly:
Step 601:Receive the Streaming Media piecemeal request that client is sent;
Step 602:The Streaming Media piecemeal request is responded, the slow of Streaming Media to be played is currently stored according to the client
Area's size and network bandwidth are rushed, determines N number of Streaming Media piecemeal corresponding with the Streaming Media piecemeal request;
Here, N is the integer more than or equal to 1.
Specifically, compare first buffering area size and second buffering area size, obtain comparative result;The first buffering area
Size characterizes the buffer size for currently storing Streaming Media to be played;The second buffering area size is big for the buffering area set
It is small;
Using comparative result, and current network bandwidth is combined, determine N number of Streaming Media piecemeal.
Wherein, during practical application, the second buffering area size can be according to being arranged to:
In client, ensure video playing it is successional under the premise of, the minimum value of the buffering area of the player of client.
During practical application, for definite N number of Streaming Media piecemeal, its code check is identical, and this code check is according to working as
What preceding network bandwidth determined.
In one embodiment, it is described to utilize comparative result, and current network bandwidth is combined, determine N number of Streaming Media point
Block, specifically includes:
When first buffering area size is less than or equal to the second buffering area size, compare first network bandwidth and the second net
Network bandwidth;First network bandwidth characterizes current network bandwidth;M Streaming Media piecemeal institute of second network bandwidth characterization last push
The network bandwidth used;M is the integer more than or equal to 1;
N number of Streaming Media piecemeal is determined according to comparative result.
Specifically, the first network bandwidth is more than or equal to second network bandwidth, and with pushing Streaming Media before
Network bandwidth is compared used in piecemeal, when the first network bandwidth is bandwidth increase twice in succession, determines N for M and the
The sum of one value.In other words, N is equal to the sum of values of M and first.
When the first network bandwidth is bandwidth increase twice in succession, just determine N for M with first be worth the sum of, be because
For:During practical application, it is possible to which the bandwidth increase detected is probably caused by network jitter, so network is trembled in order to prevent
It is dynamic to be influenced caused by network bandwidth, it is necessary to detect that network bandwidth is the value for just increasing N when increasing twice in succession.
During practical application, in order to ensure the continuity played, gentle property, the first value generally can be 1.
Here, first network bandwidth is more than or equal to second network bandwidth, and is made with push Streaming Media piecemeal before
Network bandwidth is compared, and when the first network bandwidth is not bandwidth increase twice in succession, it is M to determine N.That is,
The quantity of the Streaming Media section of this secondary push is identical with the Streaming Media number of sections that last time pushes.
First network band is wider than second network bandwidth, illustrates current network bandwidth and network bandwidth phase before
Than increasing.
When the first network bandwidth is less than second network bandwidth, it is 1 to determine N.First network bandwidth is less than the
Two network bandwidths, illustrate that current network bandwidth is being reduced compared with network bandwidth before, need to return to no push at this time
Pattern, i.e., one section request can only correspond to a response, a Streaming Media piecemeal carried in a response.Certainly, this
The corresponding code check of Streaming Media piecemeal is that the code check of the M Streaming Media piecemeal with transmitting before is different.
In one embodiment, it is described to utilize comparative result, and current network bandwidth is combined, determine N number of Streaming Media point
Block, including:
When first buffering area size is more than the second buffering area size, time span and visitor using Streaming Media piecemeal
The buffer size at family end, and least cost function is combined, determine N number of Streaming Media piecemeal.
Specifically, using N, first function is formed, the section number of requests that the first function characterization client is sent
Cost function;
Using N, the buffer size of client and the time span using Streaming Media piecemeal, second function is formed, it is described
The cost function of the buffer size of second derived function characterization client;
Using first function and second function, least cost function is formed;
Using least cost function, the value of N is determined.
That is, taking different values to N, bring least cost function into and obtain different functional values, by multiple functional values
In minimum value corresponding to N value of the value as definite N.The different values of N are traveled through, by least cost function
Value of the value of N as definite N when functional value is minimum.
During practical application, first function is expressed with formula, then is had:
Second function is expressed with formula, then is had:
Wherein, σ represents the time span of Streaming Media section, BiRepresent first buffering area size, BlowRepresent second buffering area
Size.
Least cost function is expressed with formula, then is had:
C=a × Cr+(1-a)×Cb (3)
Wherein, a represents weight coefficient, CrRepresent first function, CbRepresent second function.
By formula (1) and (2), formula (3) is substituted into, then can obtain least cost function is:
Step 603:Definite N number of Streaming Media piecemeal is pushed to the client.
Here, during practical application, the process of push meets the relevant regulations of HTTP.
That is, being based on HTTP, definite N number of Streaming Media piecemeal is pushed to the client.
Media push method provided in an embodiment of the present invention, receives the Streaming Media piecemeal request that client is sent;Response institute
The request of Streaming Media piecemeal is stated, the buffer size and network bandwidth of Streaming Media to be played are currently stored according to the client, really
Fixed N number of Streaming Media piecemeal corresponding with the Streaming Media piecemeal request;N is the integer more than or equal to 1;By definite N number of stream matchmaker
Body piecemeal is pushed to the client, when determining the value of N, the influence of network bandwidth has been taken into full account, in this way, can be in time
The Streaming Media piecemeal of respective numbers is pushed according to the change of network bandwidth.Using scheme provided in an embodiment of the present invention, full
While sufficient net cast low delay requirement, it can reach adaptively according to the stream matchmaker of the change selection respective numbers of network bandwidth
Body piecemeal, takes full advantage of network bandwidth.
Embodiment two
On the basis of embodiment one, the present embodiment is described in detail how to choose the video of phase code rate using network bandwidth
Cut into slices (Streaming Media piecemeal).
In this example, it is assumed that the client last time has received that the K of server pushi-1A video segment, it
Afterwards, client have sent section request to server again;After server receives section request, to calculate active client can connect
The K for the server push receivediA video segment, this KiThe code check of a video segment is corresponding with current network bandwidth, is lifted a
For example, it is assumed that current network bandwidth 2M, then KiThe code check of a video segment is code check corresponding with 2M.
Assuming that the size of the screen buffer of the storage Streaming Media to be played of client is B at presenti, meanwhile, in order to ensure
The continuity of video playing, sets the minimum value of the player buffering area of a client, is Blow。
As shown in fig. 7, the process of selecting video number of sections comprises the following steps:
Step 701:Response section request;
Step 702:Judge BiWhether B is more thanlow, if it is, performing step 708, otherwise, perform step 703;
Step 703:Network bandwidth is changed at present, judges Ti-1Whether T is more thani, if it is, performing step
704, otherwise perform step 705;
Wherein, Ti-1Represent last push Ki-1Network bandwidth during a video segment, TiRepresent current network bandwidth.
Ti-1More than TiIllustrate that network bandwidth is reduced, this can cause the video segment quantity for being transferred to client player to subtract
Less, it is necessary to perform step 704.
Ti-1More than TiIllustrate that network bandwidth adds, can suitably increase the video for being transferred to client player at this time
Number of sections.
Step 704:Select Ki=1, and perform step 711;
That is, in order to adapt to the change of network bandwidth, it is necessary to return to no push mode, i.e., one section request pair
Answer a response.
Selection at this time carrys out encoded video section with the corresponding code check of current network bandwidth.
Step 705:Judge TiIt is whether increased twice in succession on the basis of before as a result, if it is, performing step
Rapid 706, otherwise, perform step 707;
Here, during practical application, it is possible to the bandwidth increase detected is probably caused by network jitter, so in order to
Preventing network jitter influences caused by network bandwidth, it is necessary to detect that network bandwidth is when increasing twice in succession, just to perform step
Rapid 706, the increase for illustrating network bandwidth at this time is bandwidth increase truly;Work as TiIt is once to increase on the basis of before
It is adding as a result, the increase of this Time Bandwidth is likely to be caused by network jitter, it is also possible to the increase of bandwidth truly,
Due to not can determine that cause bandwidth increase at this time, so this still cuts according to quantity pushing video of last time push
Piece, that is, select Ki=Ki-1。
Step 706:Select Ki=Ki-1+ 1, and perform step 711;
Here, Ki=Ki-1+ 1 purpose is:Allow player it is gentle, continuously play video.
Step 707:Select Ki=Ki-1, and perform step 711;
Step 708:Different values is taken to calculate the functional value of least cost function C;
Specifically, least cost function C is:
C=a × Cr+(1-a)×Cb (3)
Wherein, a represents weight coefficient, CrRepresent the cost function for the section number of requests that client is sent, CbRepresent client
The cost function of the buffer size at end.
Wherein, σ represents the time span of Streaming Media section.
Step 709:Whether the functional value for judging to draw is minimum, if it is, performing step 610, otherwise, performs step
Rapid 708;
Work as KiTake a value, substitute into the functional value that after above-mentioned formula calculates functional value, judges to draw whether be it is minimum,
If it is not, then needing to take a value again again, then go to calculate functional value, after obtaining minimum function value, without going to take again
Value, that is to say, that traversal Ki, a minimum cost function value has been calculated, at this time KiValue be the server video to be pushed
The quantity of section.
Step 710:Using the corresponding value j of minimum function value as Ki, and perform step 711;
Step 711:Terminate currently processed process.
View of the above, it will be seen that scheme provided in an embodiment of the present invention, on the basis of http protocol is not changed,
Size by the change of network bandwidth, buffering area is equivalent, to calculate appropriate server continuous pushing video section every time
The section request that the user end to server of quantity, i.e. reduction is sent, at the same it is corresponding to choose according to the change of network bandwidth
Video segment, reach video flowing it is live when adaptively sufficiently utilize network bandwidth, while reach the requirement of live low delay.
After the scheme of the embodiment of the present invention, the live low delay requirement of net cast can be reached, while can also root
Choose the video segments of respective numbers according to the change of network bandwidth, reach video flowing it is live when adaptively make full use of Netowrk tape
Wide purpose.
Embodiment three
To realize the method for the embodiment of the present invention, the present embodiment provides a kind of Streaming Media pusher, server is arranged on,
As shown in fig. 7, the device includes:
Receiving unit 81, for receiving the Streaming Media piecemeal request of client transmission;
Determination unit 82, for responding the Streaming Media piecemeal request, stream to be played is currently stored according to the client
The buffer size and network bandwidth of media, determine N number of Streaming Media piecemeal corresponding with the Streaming Media piecemeal request;N is big
In the integer equal to 1;
Transmitting element 83, for definite N number of Streaming Media piecemeal to be pushed to the client.
Wherein, the determination unit 81, including:
Comparison module, for comparing first buffering area size and second buffering area size, obtains comparative result;Described first
Buffer size characterizes the buffer size for currently storing Streaming Media to be played;The second buffering area size is the buffering set
Area's size;
Determining module, for using comparative result, and combines current network bandwidth, determines N number of Streaming Media piecemeal.
Wherein, during practical application, the second buffering area size can be according to being arranged to:
In client, ensure video playing it is successional under the premise of, the minimum value of the buffering area of the player of client.
During practical application, for definite N number of Streaming Media piecemeal, its code check is identical, and this code check is according to working as
What preceding network bandwidth determined.
In one embodiment, the determining module, is specifically used for:
When first buffering area size is less than or equal to the second buffering area size, compare first network bandwidth and the second net
Network bandwidth;First network bandwidth characterizes current network bandwidth;M Streaming Media piecemeal institute of second network bandwidth characterization last push
The network bandwidth used;M is the integer more than or equal to 1;
N number of Streaming Media piecemeal is determined according to comparative result.
Specifically, the first network bandwidth is more than or equal to second network bandwidth, and with pushing Streaming Media before
Network bandwidth is compared used in piecemeal, when the first network bandwidth is bandwidth increase twice in succession, the determining module
It is the sum of M and the first value to determine N.In other words, N is equal to the sum of values of M and first.
When the first network bandwidth is bandwidth increase twice in succession, just determine N for M with first be worth the sum of, be because
For:During practical application, it is possible to which the bandwidth increase detected is probably caused by network jitter, so network is trembled in order to prevent
It is dynamic to be influenced caused by network bandwidth, it is necessary to detect that network bandwidth is the value for just increasing N when increasing twice in succession.
During practical application, in order to ensure the continuity played, gentle property, the first value generally can be 1.
Here, first network bandwidth is more than or equal to second network bandwidth, and is made with push Streaming Media piecemeal before
Network bandwidth is compared, and when the first network bandwidth is not bandwidth increase twice in succession, the determining module determines that N is
M.That is, the quantity of the Streaming Media section of this secondary push is identical with the Streaming Media number of sections that last time pushes.
First network band is wider than second network bandwidth, illustrates current network bandwidth and network bandwidth phase before
Than increasing.
When the first network bandwidth is less than second network bandwidth, the determining module determines that N is 1.First net
Network bandwidth is less than the second network bandwidth, illustrates that current network bandwidth is being reduced compared with network bandwidth before, needs at this time
No push mode is returned to, i.e., one section request can only correspond to a response, a Streaming Media piecemeal is carried in a response.
Certainly, this corresponding code check of Streaming Media piecemeal is that the code check of the M Streaming Media piecemeal with transmitting before is different.
In one embodiment, the determining module, is specifically used for:
When first buffering area size is more than the second buffering area size, time span and visitor using Streaming Media piecemeal
The buffer size at family end, and least cost function is combined, determine N number of Streaming Media piecemeal.
Specifically, using N, first function is formed, the section number of requests that the first function characterization client is sent
Cost function;
Using N, the buffer size of client and the time span using Streaming Media piecemeal, second function is formed, it is described
The cost function of the buffer size of second derived function characterization client;
Using first function and second function, least cost function is formed;
Using least cost function, the value of N is determined.
That is, taking different values to N, the determining module brings least cost function into and obtains different functional values,
Value using the value of the N corresponding to the minimum value in multiple functional values as definite N.The different values of N are traveled through, it is described
Value of the determining module using the value of the functional value of least cost function N when minimum as definite N.
During practical application, first function is expressed with formula, then is had:
Second function is expressed with formula, then is had:
Wherein, σ represents the time span of Streaming Media section, BiRepresent first buffering area size, BlowRepresent second buffering area
Size.
Least cost function is expressed with formula, then is had:
C=a × Cr+(1-a)×Cb (3)
Wherein, a represents weight coefficient, CrRepresent first function, CbRepresent second function.
By formula (1) and (2), formula (3) is substituted into, then can obtain least cost function is:
Here, during practical application, the process that the transmitting element 83 pushes meets the relevant regulations of HTTP.
That is, the transmitting element 83 is based on HTTP, definite N number of Streaming Media piecemeal is pushed to the client
End.
During practical application, receiving unit 81 and transmitting element 83 can be by the transceiver implementations in Streaming Media pusher;Institute
Stating determination unit 82, comparison module and determining module can be by central processing unit (CPU, the Central in Streaming Media pusher
Processing Unit), microprocessor (MCU, Micro Control Unit), digital signal processor (DSP, Digital
Signal Processor) or programmable logic array (FPGA, Field-Programmable Gate Array) realization.
Media push device provided in an embodiment of the present invention, receiving unit 81 receives the Streaming Media piecemeal that client is sent please
Ask;Determination unit 82 responds the Streaming Media piecemeal request, and the buffering of Streaming Media to be played is currently stored according to the client
Area's size and network bandwidth, determine N number of Streaming Media piecemeal corresponding with the Streaming Media piecemeal request;N is whole more than or equal to 1
Number;Definite N number of Streaming Media piecemeal is pushed to the client by transmitting element 83, when determining the value of N, is taken into full account
The influence of network bandwidth, in this way, the Streaming Media piecemeal of respective numbers can be pushed according to the change of network bandwidth in time.Using
Scheme provided in an embodiment of the present invention, while net cast low delay requirement is met, can reach adaptively according to network
The Streaming Media piecemeal of the change selection respective numbers of bandwidth, takes full advantage of network bandwidth.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program
Product.Therefore, the shape of the embodiment in terms of the present invention can use hardware embodiment, software implementation or combination software and hardware
Formula.Moreover, the present invention can use the computer for wherein including computer usable program code in one or more to use storage
The form for the computer program product that medium is implemented on (including but not limited to magnetic disk storage and optical memory etc.).
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that it can be realized by computer program instructions every first-class in flowchart and/or the block diagram
The combination of flow and/or square frame in journey and/or square frame and flowchart and/or the block diagram.These computer programs can be provided
The processors of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that the instruction performed by computer or the processor of other programmable data processing devices, which produces, to be used in fact
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or
The instruction performed on other programmable devices is provided and is used for realization in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in a square frame or multiple square frames.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the scope of the present invention.
Claims (12)
- A kind of 1. Streaming Media method for pushing, it is characterised in that the described method includes:Receive the Streaming Media piecemeal request that client is sent;The Streaming Media piecemeal request is responded, the buffer size and net of Streaming Media to be played are currently stored according to the client Network bandwidth, determines N number of Streaming Media piecemeal corresponding with the Streaming Media piecemeal request;N is the integer more than or equal to 1;Definite N number of Streaming Media piecemeal is pushed to the client.
- 2. according to the method described in claim 1, it is characterized in that, described currently store stream matchmaker to be played according to the client The buffer size and network bandwidth of body, determine N number of Streaming Media piecemeal corresponding with the Streaming Media piecemeal request, including:Compare first buffering area size and second buffering area size, obtain comparative result;The first buffering area size characterization is worked as The buffer size of preceding storage Streaming Media to be played;The second buffering area size is the buffer size set;Using comparative result, and current network bandwidth is combined, determine N number of Streaming Media piecemeal.
- 3. according to the method described in claim 2, it is characterized in that, described utilize comparative result, and current network bandwidth is combined, Determine N number of Streaming Media piecemeal, including:When first buffering area size is less than or equal to the second buffering area size, compare first network bandwidth and the second Netowrk tape It is wide;First network bandwidth characterizes current network bandwidth;Second network bandwidth characterization M Streaming Media piecemeal of last push is used Network bandwidth;M is the integer more than or equal to 1;N number of Streaming Media piecemeal is determined according to comparative result.
- 4. according to the method described in claim 3, it is characterized in that, described determine N number of Streaming Media point according to comparative result Block, including:The first network bandwidth is more than or equal to second network bandwidth, and with pushing net used in Streaming Media piecemeal before Network bandwidth is compared, and when the first network bandwidth is bandwidth increase twice in succession, it is the sum of M and the first value to determine N.
- 5. according to the method described in claim 3, it is characterized in that, described determine N number of Streaming Media point according to comparative result Block, including:First network bandwidth is more than or equal to second network bandwidth, and with pushing Netowrk tape used in Streaming Media piecemeal before Width is compared, and when the first network bandwidth is not bandwidth increase twice in succession, it is M to determine N.
- 6. according to the method described in claim 3, it is characterized in that, described determine N number of Streaming Media point according to comparative result Block, including:When the first network bandwidth is less than second network bandwidth, it is 1 to determine N.
- 7. according to the method described in claim 2, it is characterized in that, described utilize comparative result, and current network bandwidth is combined, Determine N number of Streaming Media piecemeal, including:When first buffering area size is more than second buffering area size, the time span of Streaming Media piecemeal and delaying for client are utilized Area's size is rushed, and combines least cost function, determines N number of Streaming Media piecemeal.
- 8. the method according to the description of claim 7 is characterized in that time span and client using Streaming Media piecemeal Buffer size, and combine least cost function, determine N number of Streaming Media piecemeal, including:Using N, first function, the cost function for the section number of requests that the first function characterization client is sent are formed;Using N, client buffer size and using Streaming Media piecemeal time span, formed second function, described second The cost function of the buffer size of derived function characterization client;Using first function and second function, least cost function is formed;Using least cost function, the value of N is determined.
- 9. a kind of Streaming Media pusher, it is characterised in that described device includes:Receiving unit, for receiving the Streaming Media piecemeal request of client transmission;Determination unit, for responding the Streaming Media piecemeal request, Streaming Media to be played is currently stored according to the client Buffer size and network bandwidth, determine N number of Streaming Media piecemeal corresponding with the Streaming Media piecemeal request;N is more than or equal to 1 Integer;Transmitting element, for definite N number of Streaming Media piecemeal to be pushed to the client.
- 10. device according to claim 9, it is characterised in that the determination unit, including:Comparison module, for comparing first buffering area size and second buffering area size, obtains comparative result;First buffering Area's size characterization currently stores the buffer size of Streaming Media to be played;The second buffering area size is big for the buffering area set It is small;Determining module, for using comparative result, and combines current network bandwidth, determines N number of Streaming Media piecemeal.
- 11. device according to claim 10, it is characterised in that the determining module, is specifically used for:When first buffering area size is less than or equal to the second buffering area size, compare first network bandwidth and the second Netowrk tape It is wide;First network bandwidth characterizes current network bandwidth;Second network bandwidth characterization M Streaming Media piecemeal of last push is used Network bandwidth;M is the integer more than or equal to 1;N number of Streaming Media piecemeal is determined according to comparative result.
- 12. device according to claim 10, it is characterised in that the determining module, is specifically used for:When first buffering area size is more than the second buffering area size, the time span and client of Streaming Media piecemeal are utilized Buffer size, and combine least cost function, determine N number of Streaming Media piecemeal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610962959.2A CN108023864A (en) | 2016-10-28 | 2016-10-28 | Streaming Media method for pushing and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610962959.2A CN108023864A (en) | 2016-10-28 | 2016-10-28 | Streaming Media method for pushing and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108023864A true CN108023864A (en) | 2018-05-11 |
Family
ID=62084173
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610962959.2A Pending CN108023864A (en) | 2016-10-28 | 2016-10-28 | Streaming Media method for pushing and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108023864A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109040213A (en) * | 2018-07-23 | 2018-12-18 | Oppo广东移动通信有限公司 | Document down loading method and Related product |
CN114727128A (en) * | 2022-03-30 | 2022-07-08 | 恒玄科技(上海)股份有限公司 | Data transmission method and device of playing terminal, playing terminal and storage medium |
CN115152241A (en) * | 2020-02-04 | 2022-10-04 | 杜比国际公司 | Method and apparatus for adaptive playback of media content |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1518285A (en) * | 2003-01-16 | 2004-08-04 | 华为技术有限公司 | Network bandwidth detecting method for implementing stream medium service |
CN102123303A (en) * | 2011-03-25 | 2011-07-13 | 天脉聚源(北京)传媒科技有限公司 | Audio/video file playing method and system as well as transmission control device |
CN102333089A (en) * | 2011-09-26 | 2012-01-25 | 南京邮电大学 | Adaptive control method of multi-rate media stream based on hypertext transfer protocol (HTTP) streaming |
CN102843351A (en) * | 2012-03-31 | 2012-12-26 | 华为技术有限公司 | Streaming media service processing method, streaming media server and system |
-
2016
- 2016-10-28 CN CN201610962959.2A patent/CN108023864A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1518285A (en) * | 2003-01-16 | 2004-08-04 | 华为技术有限公司 | Network bandwidth detecting method for implementing stream medium service |
CN102123303A (en) * | 2011-03-25 | 2011-07-13 | 天脉聚源(北京)传媒科技有限公司 | Audio/video file playing method and system as well as transmission control device |
CN102333089A (en) * | 2011-09-26 | 2012-01-25 | 南京邮电大学 | Adaptive control method of multi-rate media stream based on hypertext transfer protocol (HTTP) streaming |
CN102843351A (en) * | 2012-03-31 | 2012-12-26 | 华为技术有限公司 | Streaming media service processing method, streaming media server and system |
Non-Patent Citations (1)
Title |
---|
DUC V.NGUYEN: "Request Adaptation for Adaptive Streaming over HTTP/2", 《2016 IEEE INTERNATIONAL CONFERENCE ON CONSUMER ELECTRONICS (ICCE)》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109040213A (en) * | 2018-07-23 | 2018-12-18 | Oppo广东移动通信有限公司 | Document down loading method and Related product |
CN109040213B (en) * | 2018-07-23 | 2021-06-08 | Oppo广东移动通信有限公司 | File downloading method and related product |
CN115152241A (en) * | 2020-02-04 | 2022-10-04 | 杜比国际公司 | Method and apparatus for adaptive playback of media content |
CN114727128A (en) * | 2022-03-30 | 2022-07-08 | 恒玄科技(上海)股份有限公司 | Data transmission method and device of playing terminal, playing terminal and storage medium |
CN114727128B (en) * | 2022-03-30 | 2024-04-12 | 恒玄科技(上海)股份有限公司 | Data transmission method and device of playing terminal, playing terminal and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6178523B2 (en) | Transport accelerator implementing request manager and connection manager functionality | |
US8732274B2 (en) | Method and apparatus for generating and handling streaming media quality-of-experience metrics | |
US10110650B2 (en) | Client side stream switching | |
CN104956631B (en) | For performing the device and method of link-aware self adaptation stream transmission | |
US9167007B2 (en) | Stream complexity mapping | |
CN103535047B (en) | Transmit the node in the method for video content, the network of monitoring video content stream as a stream | |
US9247276B2 (en) | System and method for progressive delivery of media content | |
EP3200423B1 (en) | Media host transmitting media stream with adapted bit rate | |
US7783773B2 (en) | Glitch-free media streaming | |
CN106688239B (en) | Method for downloading video, apparatus and system | |
US20140149557A1 (en) | Network-Capacity Optimized Adaptive HTTP Streaming | |
Cherif et al. | DASH fast start using HTTP/2 | |
JP7307211B2 (en) | Client, Server, Receiving Method and Sending Method | |
JP6425649B2 (en) | Integrated controller based pacing for HTTP pseudostreaming | |
RU2598805C2 (en) | Method for dynamic adaptation of repetition frequency of bits when receiving and appropriate receiver | |
CN104967872A (en) | Live broadcasting method and server based on dynamic self-adaptive code rate transport protocol HLS streaming media | |
CN108668146A (en) | A kind of method and apparatus of adjustment streaming media bit rate | |
CN108023864A (en) | Streaming Media method for pushing and device | |
US20060031564A1 (en) | Methods and systems for streaming data at increasing transmission rates | |
CN107920108A (en) | A kind of method for pushing of media resource, client and server | |
JP2023522895A (en) | Method and server for audio and/or video content delivery | |
CN111617466A (en) | Method and device for determining coding format and method for realizing cloud game | |
JP7496022B2 (en) | Client, server, receiving method and transmitting method | |
Ameur | TCP protocol optimization for HTTP adaptive streaming | |
Kim et al. | A bandwidth estimation scheme to improve the QoE of HTTP adaptive streaming in the multiple client environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180511 |