CN106899894B - The adaptive stream media method, apparatus and server of dynamic optimization - Google Patents
The adaptive stream media method, apparatus and server of dynamic optimization Download PDFInfo
- Publication number
- CN106899894B CN106899894B CN201510955760.2A CN201510955760A CN106899894B CN 106899894 B CN106899894 B CN 106899894B CN 201510955760 A CN201510955760 A CN 201510955760A CN 106899894 B CN106899894 B CN 106899894B
- Authority
- CN
- China
- Prior art keywords
- fragment
- user terminal
- new
- index file
- bandwidth
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
- H04N21/8456—Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
-
- 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/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/442—Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
- H04N21/44209—Monitoring of downstream path of the transmission network originating from a server, e.g. bandwidth variations of a wireless network
-
- 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/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
- H04N21/8455—Structuring of content, e.g. decomposing content into time segments involving pointers to the content, e.g. pointers to the I-frames of the video stream
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Databases & Information Systems (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention discloses the adaptive stream media method, apparatus and server of a kind of dynamic optimization.This method comprises: acquiring the bandwidth status of user terminal in real time;Judge whether the current bandwidth of user terminal is stable;If the current bandwidth of user terminal is stablized, subsequent multiple fragments of index file are merged, new fragment and new index file are generated;The fragment that indicating user terminal downloads new index file and please look for novelty, is directed to new fragment and new index file later, and execution judges the whether stable step of the current bandwidth of user terminal.The present invention acquires the bandwidth status of user terminal by server end in real time, subsequent multiple fragments are merged when bandwidth is stablized, generate new fragment and index file, to reduce the TCP connection number that user terminal is initiated to server, adaptive stream media systematic entirety energy and efficiency are improved.
Description
Technical field
The present invention relates in data communication field, in particular to the adaptive stream media method, apparatus of a kind of dynamic optimization
And server.
Background technique
Adaptive stream media technology is emerging a kind of stream media technology on internet in recent years, is proposed with Apple Inc.
HLS (Http Live Streaming, hypertext transfer protocol live streaming media) be representative, obtained at present extensive
Using.Video source content segmentation is multiple fragment contents of certain time length by encoder by HLS technology, and will be in each fragment
Hold one or more code rates (code rate from low to high, representing video quality from difference to good) all in accordance with setting and carry out coding and generates pair
The fragment answered, while the index file of m3u8 format is generated, record duration, the file of different code rate and each fragment content
The information such as name, the address URL.It is parsed after user terminal downloads index file, is selected according to the real-time change of network bandwidth dynamic
The fragment content of corresponding code rate is selected, to ensure that user can also obtain preferable user's body in different network bandwidths
It tests.
One typical HLS program structure example is as shown in Figure 1, include master index file 101, subindex file 102, son
Index file 103 and subindex file 104, wherein subindex file 102, subindex file 103 and subindex file 104 divide
Not corresponding to includes every kind of code rate in tri- kinds of code rates of 200000bps, 484444bps, 737777bps and each subindex file
Corresponding fragment, #EXTINF represent fragment duration 10 seconds, and 001.ts, 002.ts ... 100.ts are slicing files name.
HLS technology is based on HTTP and Transmission Control Protocol and transmits, since HLS fragment content is smaller (usually default 10 seconds one), one
A complete HLS program generally comprises a fragments up to a hundred, and user terminal requests a fragment every time, will initiate to server
Then TCP connection request establishes connection and receives data, disconnects after the completion and re-initiate TCP connection again and request next point
Piece.When network bandwidth often changes (such as mobile network), user terminal needs are frequently cut between the fragment of different code rates
It changes, the fragment of small particle size ensure that the timely perceived bandwidth variation of user terminal to smoothly switch.
But when network bandwidth is more stable (such as broadband network), what user terminal was usually requested for a long time is all
Fragment under same code rate, but user terminal still needs to the fragment duration repetitive requests fragment according to small particle size, and frequent TCP connects
It connects request and has aggravated network load, affect the overall performance and efficiency of adaptive stream media system.
Summary of the invention
In view of the above technical problem, the present invention provides a kind of adaptive stream media method, apparatus kimonos of dynamic optimization
It is engaged in device, reduces the TCP connection number that user terminal is initiated to server, improving adaptive stream media systematic entirety can be with
Efficiency.
According to an aspect of the present invention, a kind of adaptive stream media method of dynamic optimization is provided, comprising:
The bandwidth status of acquisition user terminal in real time;
Judge whether the current bandwidth of user terminal is stable;
If the current bandwidth of user terminal is stablized, subsequent multiple fragments of index file are merged, are generated new
Fragment and new index file;
The fragment that indicating user terminal downloads new index file and please look for novelty is directed to new fragment and new index later
File, execution judge the whether stable step of the current bandwidth of user terminal.
In one embodiment of the invention, the step of bandwidth status of real-time acquisition user terminal includes:
The code rate for obtaining fragment to user terminal records, wherein the code rate embodies the bandwidth status of user terminal.
In one embodiment of the invention, judge that the whether stable step of the current bandwidth of user terminal includes:
Whether the N number of fragment for judging that user terminal continuously acquires belongs to same code rate, and wherein N is greater than 1 and to be less than sub- rope
The natural number of fragment sum in quotation part;
If N number of fragment that user terminal continuously acquires belongs to same code rate, determine that the current bandwidth of user terminal is stablized;
If N number of fragment that user terminal continuously acquires is not belonging to same code rate, the current bandwidth of user terminal is determined not
Stablize.
In one embodiment of the invention, subsequent multiple fragments of index file are merged, generates new fragment
Include: with the step of new index file
New subsequent 1st fragment is merged by the subsequent 1st to n-th fragment, subsequent other fragments remain unchanged, and raw
The index file of Cheng Xin.
In one embodiment of the invention, for new fragment and new index file, execution judges user terminal
The whether stable step of current bandwidth includes:
Using new subsequent 1st fragment as Y in the N number of fragment continuously acquired, executes judge user's end later
The step of holding the N number of fragment continuously acquired whether to belong to same code rate, wherein Y is the nature more than or equal to 1 and less than or equal to N
Number.
In one embodiment of the invention, the method further include:
If the current bandwidth of user terminal is unstable, using subsequent 1st fragment as in the N number of fragment continuously acquired
Y executes the step of whether N number of fragment for judge that user terminal continuously acquires belongs to same code rate later, wherein Y for greater than
Natural number equal to 1 and less than or equal to N.
According to another aspect of the present invention, a kind of adaptive stream media device of dynamic optimization, including bandwidth acquisition are provided
Module, identification module, merging module and indicating module, in which:
Bandwidth acquisition module, for acquiring the bandwidth status of user terminal in real time;
Whether identification module, the current bandwidth for judging user terminal are stable;
Merging module, for the judging result according to identification module, if the current bandwidth of user terminal is stablized, to index
Subsequent multiple fragments of file merge, and generate new fragment and new index file;
Indicating module, the fragment that is used to indicate the new index file of user terminal downloads and please look for novelty, later instruction identification
Module is directed to new fragment and new index file, judges whether the current bandwidth of user terminal is stable.
In one embodiment of the invention, bandwidth acquisition module be specifically used for user terminal obtain fragment code rate into
Row record, wherein the code rate embodies the bandwidth status of user terminal.
In one embodiment of the invention, identification module is specifically used for judging N number of fragment that user terminal continuously acquires
Whether same code rate is belonged to, and wherein N is the natural number greater than 1 and less than fragment sum in subindex file;If user terminal connects
The continuous N number of fragment obtained belongs to same code rate, then determines that the current bandwidth of user terminal is stablized;What if user terminal continuously acquired
N number of fragment is not belonging to same code rate, then determines that the current bandwidth of user terminal is unstable.
In one embodiment of the invention, merging module is merged in subsequent multiple fragments to index file, raw
When the fragment of Cheng Xin and new index file, specifically for merging into new subsequent 1st point for the subsequent 1st to n-th fragment
Piece, subsequent other fragments remain unchanged, and generate new index file.
In one embodiment of the invention, indicating module is in instruction identification module for new fragment and new index text
When part judges whether the current bandwidth of user terminal is stable, specifically for new subsequent 1st fragment for generating merging module
As Y in the N number of fragment continuously acquired, and indicate that identification module execution judges N number of point that user terminal continuously acquires
Whether piece belongs to the operation of same code rate, and wherein Y is the natural number more than or equal to 1 and less than or equal to N
In one embodiment of the invention, described device further includes specified module, in which:
Specified module, for the judging result according to identification module, if the current bandwidth of user terminal is unstable, will after
Continuous 1st fragment indicates that identification module execution judges that user terminal is continuous as Y in the N number of fragment continuously acquired
Whether the N number of fragment obtained belongs to the operation of same code rate, and wherein Y is the natural number more than or equal to 1 and less than or equal to N.
According to another aspect of the present invention, a kind of adaptive stream media server of dynamic optimization is provided, including such as above-mentioned
The adaptive stream media device of dynamic optimization described in any embodiment.
The present invention acquires the bandwidth status of user terminal by server end in real time, when bandwidth is stablized to subsequent multiple points
Piece merges, and generates new fragment and index file, to reduce the TCP connection time that user terminal is initiated to server
Number, improves adaptive stream media systematic entirety energy and efficiency.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention without any creative labor, may be used also for those of ordinary skill in the art
To obtain other drawings based on these drawings.
Fig. 1 is the schematic diagram of original HLS program structure in one embodiment of the invention.
Fig. 2 is the schematic diagram of adaptive stream media method one embodiment of dynamic optimization of the present invention.
Fig. 3 is the schematic diagram of another embodiment of adaptive stream media method of dynamic optimization of the present invention.
Fig. 4 is the schematic diagram of modified HLS program structure in one embodiment of the invention.
Fig. 5 is the schematic diagram of adaptive stream media device one embodiment of dynamic optimization of the present invention.
Fig. 6 is the schematic diagram of another embodiment of adaptive stream media device of dynamic optimization of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Below
Description only actually at least one exemplary embodiment be it is illustrative, never as to the present invention and its application or make
Any restrictions.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise
Under every other embodiment obtained, shall fall within the protection scope of the present invention.
Unless specifically stated otherwise, positioned opposite, the digital table of the component and step that otherwise illustrate in these embodiments
It is not limited the scope of the invention up to formula and numerical value.
Simultaneously, it should be appreciated that for ease of description, the size of various pieces shown in attached drawing is not according to reality
Proportionate relationship draw.
Technology, method and apparatus known to person of ordinary skill in the relevant may be not discussed in detail, but suitable
In the case of, the technology, method and apparatus should be considered as authorizing part of specification.
It is shown here and discuss all examples in, any occurrence should be construed as merely illustratively, without
It is as limitation.Therefore, the other examples of exemplary embodiment can have different values.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, then in subsequent attached drawing does not need that it is further discussed.
Fig. 2 is the schematic diagram of adaptive stream media method one embodiment of dynamic optimization of the present invention.Preferably, this implementation
Example can be executed by the adaptive stream media device of dynamic optimization.Method includes the following steps:
Step 201, the bandwidth status of user terminal is acquired in real time.
In one embodiment of the invention, step 201 may include: that the code rate for obtaining fragment to user terminal is remembered
Record, wherein the code rate embodies the bandwidth status of user terminal.
Step 202, judge whether the current bandwidth of user terminal is stable.
In one embodiment of the invention, step 202 may include:
Whether step 1, the N number of fragment for judging that user terminal continuously acquires belong to same code rate, and wherein N is greater than 1 and small
The natural number of fragment sum in subindex file.
In a preferred embodiment of the invention, 3 N.
If N number of fragment that step 2, user terminal continuously acquire belongs to same code rate, the current band of user terminal is determined
Width is stablized.
If N number of fragment that step 3, user terminal continuously acquire is not belonging to same code rate, the current of user terminal is determined
Bandwidth is unstable.
Step 203, if the current bandwidth of user terminal is stablized, subsequent multiple fragments of index file are merged,
Generate new fragment and new index file.
In one embodiment of the invention, step packet 203 may include: to merge into the subsequent 1st to n-th fragment newly
Subsequent 1st fragment, subsequent other fragments remain unchanged, and generate new index file.
Step 204, the fragment that indicating user terminal downloads new index file and please look for novelty, later for new fragment and
New index file executes step 202.
In one embodiment of the invention, for new fragment and new index file, executing step 202 be can wrap
It includes: using new subsequent 1st fragment as Y in the N number of fragment continuously acquired, executing step 202 later, wherein Y is
Natural number more than or equal to 1 and less than or equal to N.
Adaptive stream media method based on the dynamic optimization that the above embodiment of the present invention provides, can be to self adaptation stream matchmaker
System system carries out dynamic optimization, by merging the methods of small fragment, update index file, can effectively improve prior art net
The problem of network expense is larger, file fragmentation etc., to effectively increase systematic entirety energy and efficiency.
The above embodiment of the present invention is suitable for platform and system using HLS adaptive stream media technology.In broadband network
Under environment (such as OTT set-top box, IPTV, PC video website), since network bandwidth is relatively stable, it is not easy to be disturbed, this hair
The method of bright proposition can effectively reduce TCP request number of times and fragment quantity, optimize network load and disk performance.
It is right below with reference to modified original HLS program structure described in original HLS program structure described in Fig. 1 and Fig. 4
The adaptive stream media method of dynamic optimization of the present invention is described further:
Fig. 3 is the schematic diagram of another embodiment of adaptive stream media method of dynamic optimization of the present invention.Preferably, this implementation
Example can be executed by the adaptive stream media device of dynamic optimization.Method includes the following steps:
Step 301, the bandwidth status of user terminal is acquired in real time.
In one embodiment of the invention, the original m3u8 index file as shown in Figure 1 when user terminal acquisition, wherein
The m3u8 index file includes master index file 101, subindex file 102, subindex file 103 and subindex file 104,
And according to index description successively request original slice 001.ts, 002.ts, 003.ts ... when, step 301 may include: to
The burst information that family terminal obtains is recorded, wherein the burst information includes fragment code rate, i.e., each original slice difference
From which subindex file acquisition, such as: subindex file 102, subindex file 103 and subindex file 104 respectively correspond
Tri- kinds of code rates of 200000bps, 484444bps, 737777bps.
Step 302, judge whether the unread fragment number X of user terminal is more than or equal to N, wherein the fragment that N merges every time
Number, N are the natural number greater than 1 and less than fragment sum M in subindex file.If X is more than or equal to N, 303 are thened follow the steps;
Otherwise, if X is less than N, 307 are thened follow the steps.
In one embodiment of the invention, for original m3u8 index file shown in FIG. 1, M=100, N selection 3.
Step 303, whether the N number of fragment for judging that user terminal continuously acquires belongs to same code rate.If user terminal is continuous
The N number of fragment obtained belongs to same code rate (i.e. the current bandwidth of user terminal is stablized), thens follow the steps 304;Otherwise, if user
N number of fragment that terminal continuously acquires is not belonging to same code rate (i.e. the current bandwidth of user terminal is unstable), thens follow the steps
306。
Step 304, new subsequent 1st fragment is merged by the subsequent 1st to n-th fragment, subsequent other fragments are kept
It is constant, and generate new index file.
Such as: under the gear3 catalogue (subindex file 104) of representative code rate 737777bps as shown in Figure 1
When 003.ts, 004.ts, 005.ts belong to same code rate, by each code rate (subindex file 102, subindex file 103 and son
Index file 104) subsequent 3 fragments merge, as shown in Figure 4.
M3u8 index file new in modified HLS program structure includes master index file 401, subindex text in Fig. 4
Part 402, subindex file 403 and subindex file 404.As shown in figure 4, by subindex file 102 shown in FIG. 1, subindex
Original fragment 006.ts, 007.ts, 008.ts in file 103 and subindex file 104 merge into subindex text shown in Fig. 4
New fragment 006-008.ts in part 402, subindex file 403 and subindex file, corresponding fragment duration #EXTINF is by 10
Second is changed to 30 seconds, to generate new m3u8 index file.
Step 305, indicating user terminal re-downloads new index file, and from new subsequent 1st point after merging
Piece (such as 006-008.ts shown in Fig. 4) starts, the fragment that please be looked for novelty;It is directed to new fragment and new index file later,
Execute step 302.
In one embodiment of the invention, in step 305, for new fragment and new index file, step is executed
302 may include: to execute step later using new subsequent 1st fragment as Y in the N number of fragment continuously acquired
302, wherein Y is the natural number more than or equal to 1 and less than or equal to N.
In the first specific embodiment of the invention, Y=1;That is, being directed to new fragment and new index file, step is executed
Rapid 302 may include: to execute step later using new subsequent 1st fragment as first in the N number of fragment continuously acquired
302。
Such as: for specific embodiment shown in Fig. 4, according to the mode that loops to determine of the first specific embodiment, then will
006-008.ts executes step 302, that is, judge that user terminal continuously acquires as first in 3 fragments continuously acquired
006-008.ts, 009.ts, 010.ts whether belong to same code rate;If so, continuing 011.ts, 012.ts, 013.ts
It merges, to form circular treatment.
In the second specific embodiment of the invention, Y=N;That is, being directed to new fragment and new index file, step is executed
Rapid 302 may include: to execute step later using new subsequent 1st fragment as the last one in the N number of fragment continuously acquired
Rapid 302.
Such as: for specific embodiment shown in Fig. 4, according to the mode that loops to determine of the second specific embodiment, then will
006-008.ts executes step 302, that is, judge that user terminal continuously obtains as the last one in 3 fragments continuously acquired
Whether fragment 004.ts, 005ts, the 006-008.t taken belongs to same code rate;If so, continue by fragment 009.ts,
010.ts, 011.ts are merged, to form circular treatment.
Second specific embodiment of the invention compares the first specific embodiment, right if the code rate of user terminal keeps stablizing
Fragment is continuously merged, and reduces the former fragment quantity not merged, so as to be further reduced user terminal to server
The TCP connection number of initiation promotes adaptive stream media systematic entirety energy and efficiency.
In third embodiment of the present invention third specific embodiment, for new fragment and new index file, execute
Step 302 may include: to execute step using new subsequent 1st fragment as Y in the N number of fragment continuously acquired
302, wherein Y is the natural number more than or equal to 1 and less than or equal to N.
Such as: for specific embodiment shown in Fig. 4, according to the mode that loops to determine of third specific embodiment, then will
006-008.ts executes step 302, that is, judge that user terminal continuously acquires as the 2nd in 3 fragments continuously acquired
Fragment 005ts, 006-008.t, 009ts whether belong to same code rate;If so, continue by fragment 010.ts, 011.ts,
012.ts is merged, to form circular treatment.
Step 306, it keeps original fragment and index file constant, continues to observe user terminal bandwidth situation of change, that is, needle
Step 302 is continued to execute to successive fragment.User terminal continues to request successive fragment at this time.
In an embodiment of the invention, in step 306, for successive fragment continue to execute step 302 may include: by
Subsequent 1st fragment executes step 302 as Y in the N number of fragment continuously acquired later, and wherein Y is more than or equal to 1
And it is less than or equal to the natural number of N.
In the 4th specific embodiment of the invention, Y=1;That is, continuing to execute step 302 for successive fragment and may include:
Using subsequent 1st fragment as first in the N number of fragment continuously acquired, step 302 is executed later.
For example, mode is looped to determine according to the 4th specific embodiment for specific embodiment shown in FIG. 1, if point
The code rate of piece 001.ts, 002.ts, 003.ts is not identical, then user terminal continue obtain fragment 004.ts, 005.ts,
After 006.ts, execute step 302 for 004.ts, 005.ts, 006.ts, judge 004.ts that user terminal continuously acquires,
Whether 005.ts, 006.ts belong to same code rate, to form circular treatment.
In the 5th specific embodiment of the invention, Y=N;That is, continuing to execute step 302 for successive fragment and may include:
Using subsequent 1st fragment as the last one in the N number of fragment continuously acquired, step 302 is executed later.
For example, mode is looped to determine according to the 5th specific embodiment for specific embodiment shown in FIG. 1, if point
The code rate of piece 001.ts, 002.ts, 003.ts is not identical, then after user terminal continues to obtain fragment 004.ts, for fragment
002.ts, 003.ts, 004.ts execute step 302, that is, judge fragment 002.ts, 003.ts that user terminal continuously acquires,
Whether 004.ts belongs to same code rate, to form circular treatment.
5th specific embodiment of the invention compares the 4th specific embodiment, accelerates the frequency looped to determine, once there is company
Continuous three fragments belong to same code rate, just merge immediately, connect to further reduce the TCP that user terminal is initiated to server
Number is connect, adaptive stream media systematic entirety energy and efficiency are improved.
In the 6th specific embodiment of the invention, Y is the natural number greater than 1 and less than N.
For example, mode is looped to determine according to the 6th specific embodiment for specific embodiment shown in FIG. 1, if point
The code rate of piece 001.ts, 002.ts, 003.ts is not identical, then after user terminal continues to obtain fragment 004.ts, 005.ts, needle
Step 302 is executed to fragment 003.ts, 004.ts, 005.ts, that is, judge fragment 003.ts that user terminal continuously acquires,
Whether 004.ts, 005.ts belong to same code rate, to form circular treatment.
Step 307, keep original fragment and index file constant, until user terminal has read all points of index file
Piece.
Such as: in Fig. 1 and specific embodiment shown in Fig. 4, if residue fragment number X less than 3 (such as X=2), no longer
Bandwidth (code rate) whether stable judgement is carried out, keeps original fragment and index file constant, until user terminal has read rope
All fragments of quotation part.
The above embodiment of the present invention is more for current adaptive stream media program fragment quantity, and user terminal is frequently initiated
It the problems such as HTTP and TCP connection request cause network overhead larger, influence system whole efficiency and file fragmentation, proposes
A kind of adaptive stream media method of dynamic optimization, is acquired the bandwidth status of user terminal in real time by server end, works as bandwidth
Subsequent multiple fragments are merged when stablizing, new fragment and index file are generated, to reduce user terminal to service
The TCP connection number that device is initiated, improves adaptive stream media systematic entirety energy and efficiency.
Fig. 5 is the schematic diagram of adaptive stream media device one embodiment of dynamic optimization of the present invention.Described device includes
Bandwidth acquisition module 501, identification module 502, merging module 503 and indicating module 504, in which:
Bandwidth acquisition module 501, for acquiring the bandwidth status of user terminal in real time.
In one embodiment of the invention, bandwidth acquisition module 501 specifically can be used for obtaining fragment to user terminal
Code rate recorded, wherein the code rate embody user terminal bandwidth status.
Whether identification module 502, the current bandwidth for judging user terminal are stable.
In one embodiment of the invention, identification module 502 specifically can be used for judging the N that user terminal continuously acquires
Whether a fragment belongs to same code rate, and wherein N is the natural number greater than 1 and less than fragment sum M in subindex file;If user
N number of fragment that terminal continuously acquires belongs to same code rate, then determines that the current bandwidth of user terminal is stablized;If user terminal is continuous
The N number of fragment obtained is not belonging to same code rate, then determines that the current bandwidth of user terminal is unstable.
Merging module 503, for the judging result according to identification module 502, if the current bandwidth of user terminal is stablized,
Subsequent multiple fragments of index file are merged, new fragment and new index file are generated.
In one embodiment of the invention, merging module 503 is merged in subsequent multiple fragments to index file,
When generating new fragment and new index file, it specifically can be used for merging into new subsequent for the subsequent 1st to n-th fragment
1 fragment, subsequent other fragments remain unchanged, and generate new index file.
Indicating module 504, the fragment that is used to indicate the new index file of user terminal downloads and please look for novelty, instruction is known later
Other module 502 judges whether the current bandwidth of user terminal is stable for new fragment and new index file.
In one embodiment of the invention, indicating module 504 is in instruction identification module 502 for new fragment and new
When index file judges whether the current bandwidth of user terminal is stable, specifically can be used for generating merging module 503 is new
Subsequent 1st fragment indicates that identification module execution judges that user terminal connects as Y in the N number of fragment continuously acquired
Whether the continuous N number of fragment obtained belongs to the operation of same code rate, and wherein Y is the natural number more than or equal to 1 and less than or equal to N.
Adaptive stream media device based on the dynamic optimization that the above embodiment of the present invention provides, can be according to network bandwidth
Situation dynamically merges optimization to successive fragment, modifies index file, and user terminal is notified to update index file, weight
It is new to obtain fragment, dynamic optimization is carried out to adaptive stream media system it is possible thereby to realize.The above embodiment of the present invention passes through conjunction
And the modes such as small fragment, update index file, it can effectively improve the side such as larger, file fragmentation of prior art network expense
The problem of face, to improve systematic entirety energy and efficiency.
Fig. 6 is the schematic diagram of another embodiment of adaptive stream media device of dynamic optimization of the present invention.Implement with shown in Fig. 5
Example is compared, and in the embodiment shown in fig. 6, described device can also include specified module 505, in which:
Specified module 505, for the judging result according to identification module 502, if the current bandwidth of user terminal is unstable,
Then using subsequent 1st fragment as Y in the N number of fragment continuously acquired, and indicate that the execution of identification module 502 judges user
Whether N number of fragment that terminal continuously acquires belongs to the operation of same code rate, and wherein Y is the nature more than or equal to 1 and less than or equal to N
Number.
The above embodiment of the present invention can be unstable in the current bandwidth of user terminal by specified module, to successive fragment
Continue to judge bandwidth it is whether stable, thus realize it is whether stable to bandwidth loop to determine, it is possible thereby to realize to subsequent more
A fragment merges, and generates new fragment and index file, to reduce the TCP connection that user terminal is initiated to server
Number improves adaptive stream media systematic entirety energy and efficiency.
According to another aspect of the present invention, a kind of adaptive stream media server of dynamic optimization is provided, including such as above-mentioned
The adaptive stream media device of dynamic optimization described in any embodiment (such as Fig. 5 or embodiment illustrated in fig. 6).
Adaptive stream media server based on the dynamic optimization that the above embodiment of the present invention provides is suitable for using HLS
The platform and system of adaptive stream media technology.Under broadband network environment (such as OTT set-top box, IPTV, PC video website),
Since network bandwidth is relatively stable, it is not easy to be disturbed, the adaptive stream media server of dynamic optimization proposed by the present invention can
To effectively reduce TCP request number of times and fragment quantity, optimize network load and disk performance.
In the above embodiment of the present invention, m3u8 index file is based on http protocol plaintext transmission, does not encrypt, all fragments
The information such as quantity, filename, the duration of content are easy to extract, and content can be with real-time edition;HLS fragment coding uses ts format,
The characteristics of ts format is to can be used as binary file sequential concatenation and decoding (such as to order by DOS in Windows system
Enable and carry out file mergences: copy/b 006.ts+007.ts+008.ts 006-008.ts), basic neglect is influenced on server performance
Slightly disregard;And the above embodiment of the present invention is not necessarily to change the existing network architecture and relevant hardware devices, and it only need to be in server
End increases corresponding functional module.Therefore, the technical solution of the proposition of the above embodiment of the present invention is easy to accomplish.
Bandwidth acquisition module 501 described above, identification module 502, merging module 503, indicating module 504,
The functional units such as one specified module 505, specified module 506 can be implemented as the general place for executing function described herein
Manage device, programmable logic controller (PLC) (PLC), digital signal processor (DSP), specific integrated circuit (ASIC), field-programmable
Gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components or
It is any appropriately combined.
So far, the present invention is described in detail.In order to avoid covering design of the invention, it is public that this field institute is not described
The some details known.Those skilled in the art as described above, completely it can be appreciated how implementing technology disclosed herein
Scheme.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
Description of the invention is given for the purpose of illustration and description, and is not exhaustively or will be of the invention
It is limited to disclosed form.Many modifications and variations are obvious for the ordinary skill in the art.It selects and retouches
It states embodiment and is to more preferably illustrate the principle of the present invention and practical application, and those skilled in the art is enable to manage
The solution present invention is to design various embodiments suitable for specific applications with various modifications.
Claims (7)
1. a kind of adaptive stream media method of dynamic optimization characterized by comprising
The bandwidth status of acquisition user terminal in real time;
Judge whether the current bandwidth of user terminal is stable;
If the current bandwidth of user terminal is stablized, subsequent multiple fragments of index file are merged, new fragment is generated
With new index file;
The fragment that indicating user terminal downloads new index file and please look for novelty, later for new fragment and new index text
Part, execution judge the whether stable step of the current bandwidth of user terminal;
Wherein, judge that the whether stable step of the current bandwidth of user terminal includes:
Whether the N number of fragment for judging that user terminal continuously acquires belongs to same code rate, and wherein N is greater than 1 and to be less than subindex text
The natural number of fragment sum in part;
If N number of fragment that user terminal continuously acquires belongs to same code rate, determine that the current bandwidth of user terminal is stablized;
If N number of fragment that user terminal continuously acquires is not belonging to same code rate, determine that the current bandwidth of user terminal is unstable;
Wherein, the adaptive stream media method of the dynamic optimization further include:
If the current bandwidth of user terminal is unstable, using subsequent 1st fragment as the Y in the N number of fragment continuously acquired
It is a, execute the N number of fragment the step of whether belonging to same code rate for judge that user terminal continuously acquires later, wherein Y for greater than etc.
In 1 and be less than or equal to N natural number;
Wherein, the step of bandwidth status of real-time acquisition user terminal includes:
The code rate for obtaining fragment to user terminal records, wherein the code rate embodies the bandwidth status of user terminal.
2. being given birth to the method according to claim 1, wherein subsequent multiple fragments to index file merge
The step of fragment of Cheng Xin and new index file includes:
New subsequent 1st fragment is merged by the subsequent 1st to n-th fragment, subsequent other fragments remain unchanged, and generate new
Index file.
3. according to the method described in claim 2, it is characterized in that, executing judgement for new fragment and new index file
The whether stable step of the current bandwidth of user terminal includes:
Using new subsequent 1st fragment as Y in the N number of fragment continuously acquired, executes judge that user terminal connects later
The step of whether continuous N number of fragment obtained belongs to same code rate, wherein Y is the natural number more than or equal to 1 and less than or equal to N.
4. a kind of adaptive stream media device of dynamic optimization, which is characterized in that including bandwidth acquisition module, identification module, conjunction
And module and indicating module, in which:
Bandwidth acquisition module, for acquiring the bandwidth status of user terminal in real time;
Whether identification module, the current bandwidth for judging user terminal are stable;
Merging module, for the judging result according to identification module, if the current bandwidth of user terminal is stablized, to index file
Subsequent multiple fragments merge, generate new fragment and new index file;
Indicating module, the fragment that is used to indicate the new index file of user terminal downloads and please look for novelty, indicates identification module later
Judge whether the current bandwidth of user terminal is stable for new fragment and new index file;
Wherein, whether N number of fragment that identification module is specifically used for judging that user terminal continuously acquires belongs to same code rate, wherein N
For the natural number greater than 1 and less than fragment sum in subindex file;If N number of fragment that user terminal continuously acquires belongs to same
Code rate then determines that the current bandwidth of user terminal is stablized;If N number of fragment that user terminal continuously acquires is not belonging to same code rate,
Then determine that the current bandwidth of user terminal is unstable;
Wherein, the adaptive stream media device of the dynamic optimization further includes specified module, in which:
Specified module, for the judging result according to identification module, if the current bandwidth of user terminal is unstable, by subsequent the
1 fragment indicates that identification module execution judges that user terminal continuously acquires as Y in the N number of fragment continuously acquired
N number of fragment whether belong to the operation of same code rate, wherein Y is more than or equal to 1 and to be less than or equal to the natural number of N;
Wherein, the code rate that bandwidth acquisition module is specifically used for obtaining user terminal fragment records, wherein the code rate body
The bandwidth status of existing user terminal.
5. device according to claim 4, which is characterized in that
Merging module is merged in subsequent multiple fragments to index file, when generating new fragment and new index file,
Specifically for merging into new subsequent 1st fragment for the subsequent 1st to n-th fragment, subsequent other fragments are remained unchanged, and raw
The index file of Cheng Xin.
6. device according to claim 5, which is characterized in that
Indicating module judges that the current bandwidth of user terminal is for new fragment and new index file in instruction identification module
When no stable, specifically for new subsequent 1st fragment that generates merging module as the in the N number of fragment continuously acquired
Y, and indicate that identification module executes the operation for judging whether N number of fragment that user terminal continuously acquires belongs to same code rate,
Middle Y is the natural number more than or equal to 1 and less than or equal to N.
7. a kind of adaptive stream media server of dynamic optimization, which is characterized in that including any one of such as claim 4-6 institute
The adaptive stream media device for the dynamic optimization stated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510955760.2A CN106899894B (en) | 2015-12-18 | 2015-12-18 | The adaptive stream media method, apparatus and server of dynamic optimization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510955760.2A CN106899894B (en) | 2015-12-18 | 2015-12-18 | The adaptive stream media method, apparatus and server of dynamic optimization |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106899894A CN106899894A (en) | 2017-06-27 |
CN106899894B true CN106899894B (en) | 2019-06-18 |
Family
ID=59188855
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510955760.2A Active CN106899894B (en) | 2015-12-18 | 2015-12-18 | The adaptive stream media method, apparatus and server of dynamic optimization |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106899894B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109302621A (en) * | 2017-07-24 | 2019-02-01 | 中兴通讯股份有限公司 | A kind of file polymerization and server |
CN109996092B (en) * | 2017-12-29 | 2021-01-15 | 华为技术有限公司 | Method and device for video playing |
CN109040854B (en) * | 2018-08-09 | 2021-02-02 | 武汉烽火凯卓科技有限公司 | Stream connection scheduling method suitable for multi-server self-adaptive stream media system |
WO2021064754A2 (en) | 2019-10-04 | 2021-04-08 | Novi Digital Entertainment Private Limited | Systems and methods for dynamic optimization of content delivery in a wireless communication network |
CN112948600B (en) * | 2021-01-26 | 2023-06-02 | 四川天翼网络股份有限公司 | High-performance multi-protocol audio and video storage system |
CN114221954A (en) * | 2021-12-07 | 2022-03-22 | 中国电信股份有限公司 | File transmission method and device, electronic equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103354618A (en) * | 2013-06-24 | 2013-10-16 | 西安交通大学 | HLS-based multi-scenario streaming media adaptive live broadcast method |
CN103929681A (en) * | 2014-04-09 | 2014-07-16 | 安徽超远信息技术有限公司 | Method for improving RTP video streaming treatment efficiency in low-speed network |
CN104333818A (en) * | 2014-10-17 | 2015-02-04 | 中兴通讯股份有限公司 | Splicing method and splicing system for HTTP real-time streaming media fragment |
CN104349176A (en) * | 2013-07-30 | 2015-02-11 | 中国电信股份有限公司 | Self-adaptive stream media system, downloading method and stream media server, user terminal |
CN104683884A (en) * | 2015-02-09 | 2015-06-03 | 网宿科技股份有限公司 | Live method and system for stream medium |
-
2015
- 2015-12-18 CN CN201510955760.2A patent/CN106899894B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103354618A (en) * | 2013-06-24 | 2013-10-16 | 西安交通大学 | HLS-based multi-scenario streaming media adaptive live broadcast method |
CN104349176A (en) * | 2013-07-30 | 2015-02-11 | 中国电信股份有限公司 | Self-adaptive stream media system, downloading method and stream media server, user terminal |
CN103929681A (en) * | 2014-04-09 | 2014-07-16 | 安徽超远信息技术有限公司 | Method for improving RTP video streaming treatment efficiency in low-speed network |
CN104333818A (en) * | 2014-10-17 | 2015-02-04 | 中兴通讯股份有限公司 | Splicing method and splicing system for HTTP real-time streaming media fragment |
CN104683884A (en) * | 2015-02-09 | 2015-06-03 | 网宿科技股份有限公司 | Live method and system for stream medium |
Also Published As
Publication number | Publication date |
---|---|
CN106899894A (en) | 2017-06-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106899894B (en) | The adaptive stream media method, apparatus and server of dynamic optimization | |
CN105357591B (en) | A kind of QoE monitoring of self-adaption code rate net cast and optimization method | |
CN108848060B (en) | Multimedia file processing method, processing system and computer readable storage medium | |
CN105052107B (en) | Media content Adaptive Transmission is carried out using quality information | |
US10169740B2 (en) | Tag cloud buddy list for messaging contacts | |
US9167007B2 (en) | Stream complexity mapping | |
CN105100961B (en) | Video thumbnail generation method and generating means | |
CN108124202B (en) | Method for making stream media server support H L S protocol | |
CN104349176B (en) | Adaptive stream media system, method for down loading and streaming media server, user terminal | |
CN107612912B (en) | Method and device for setting playing parameters | |
CN111510770B (en) | Method and device for switching definition, computer equipment and readable storage medium | |
CN106547683B (en) | A kind of redundant code detection method and device | |
CN108924630B (en) | Method for displaying cache progress and playing device | |
CN110087141A (en) | Method of transmitting video data, device, client and server | |
CN105357302B (en) | A kind of network packet breaker point continuous transmission method and device | |
CN105025294A (en) | Video transmission control device and method | |
CN113079386B (en) | Video online playing method and device, electronic equipment and storage medium | |
CN103152606A (en) | Video file processing method, device and system | |
CN110719526A (en) | Video playing method and device | |
CN108769830B (en) | Method for caching video and related equipment | |
US9742870B2 (en) | Selective download of alternate media files | |
US11089379B2 (en) | Preload hinting for low latency HTTP live streaming system | |
CN109214895A (en) | A kind of game resource promotion method, apparatus and system | |
JP6305738B2 (en) | Media playback control device, media playback control method, and program | |
CN110519656A (en) | Playback method, system and the server of adaptive stream media |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |