CN103763638B - Video resource obtaining method and device - Google Patents

Video resource obtaining method and device Download PDF

Info

Publication number
CN103763638B
CN103763638B CN201410032120.XA CN201410032120A CN103763638B CN 103763638 B CN103763638 B CN 103763638B CN 201410032120 A CN201410032120 A CN 201410032120A CN 103763638 B CN103763638 B CN 103763638B
Authority
CN
China
Prior art keywords
video
source server
browser
video source
resource
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
Application number
CN201410032120.XA
Other languages
Chinese (zh)
Other versions
CN103763638A (en
Inventor
田新雪
马书惠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201410032120.XA priority Critical patent/CN103763638B/en
Publication of CN103763638A publication Critical patent/CN103763638A/en
Application granted granted Critical
Publication of CN103763638B publication Critical patent/CN103763638B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a video resource obtaining method and device. The method includes the steps that a browser obtains a hypertext markup language HTML code corresponding to a video resource to be downloaded, wherein the HTML code carries addresses of multiple video source servers, and the video source servers can provide video resources for the browser; the browser builds multiple network connections with the video source servers according to the addresses of the multiple video source servers; the browser obtains multiple video fragmentations of the video resource from the video source servers through the network connections; the browser plays the video resource after reconstructing the obtained video fragmentations. By means of the video resource obtaining method and device, the video fragmentations are obtained from the video source servers, the speed of the browser in obtaining the video resource is improved, and playing of the video resource is optimized to a certain degree.

Description

Video resource acquisition methods and device
Technical field
The present invention relates to video on demand techniques, more particularly, to a kind of video resource acquisition methods and device.
Background technology
With the development of network technology, video on demand techniques is widely used.Video request program in correlation technique, Plug-in unit or HTML can be passed through(Hyper Text Markup Language, abbreviation HTML)5 realizing.Its In, plug-in part technology is widely used, but the mode of plug-in unit there is a problem of more.For example, in the page having designed In, the content wanting plug-in unit to show is integrated with other elements on the page relatively difficult, cuts out with transparency etc. because can cause Problem.Plug-in unit uses the rending model carrying, with general network(Web)It is different that the page is used, so when ejection When menu or other visualized elements are overlapping with plug-in unit, implement more complicated.
HTML5 is the HTML standard version for replacing HTML4.01 the and XHTML1.0 standard formulated for 1999, HTML5 can directly use CSS(Cascading style sheets, referred to as CSS)With Java description language (JavaScript)Mode control page layout.And HTML5 be not only provide new element support New function it is often more important that With the addition of to the primary interaction capabilities between script and layout, overcome the defect carrying out video playback using plug-in unit.
But, in correlation technique, adopt HTML technology(Such as HTML5)When carrying out video playback, browser passes through The video source server address that HTML5 code carries obtains corresponding video resource, due to because of video source server bandwidth Etc. the restriction of factor, impact browser is obtained the speed of video resource, poor user experience.
Content of the invention
The present invention is directed to the defect of prior art, provides a kind of video resource acquisition methods and device.
The first aspect of the invention provides a kind of video resource acquisition methods, including:
Browser obtains video resource corresponding HTML HTML code to be downloaded, in described HTML code Carry the address of multiple video source servers, each video source server all can provide described video money for described browser Source;
Described browser is according to the address of the plurality of video source server, many with the foundation of the plurality of video source server Individual network connection;
Described browser, by the plurality of network connection, regards described in acquisition from the plurality of video source server respectively Multiple video slicings of frequency resource;
After described browser is recombinated to the plurality of video slicing getting, play described video resource.
Another aspect of the present invention provides a kind of video resource acquisition device, including:
First acquisition module, for obtaining video resource to be downloaded corresponding HTML HTML code, institute State the address carrying multiple video source servers in HTML code, each video source server all can provide for described browser Described video resource;
Set up module, for the address according to the plurality of video source server, build with the plurality of video source server Found multiple network connections;
Second acquisition module, for by the plurality of network connection, obtaining respectively from the plurality of video source server Take multiple video slicings of described video resource;
Playing module, after the plurality of video slicing getting is recombinated, plays described video resource.
Video resource acquisition methods and device that the present invention provides, are divided by obtaining video from multiple video source servers Piece, improves the speed that browser obtains video resource, optimizes the broadcasting of video resource to a certain extent.
Brief description
Fig. 1 is the flow chart of video resource acquisition methods of the present invention;
Fig. 2 is the schematic diagram based on the multi-link VOD method of websocket for the embodiment of the present invention;
Fig. 3 is the structural representation of the video resource acquisition device of the present invention.
Specific embodiment
Fig. 1 is the flow chart of video resource acquisition methods of the present invention, as shown in figure 1, the method for the present embodiment can include Following steps:
Step S101, browser obtains video resource corresponding HTML HTML code to be downloaded, described The address of multiple video source servers is carried, each video source server all can provide institute for described browser in HTML code State video resource;
In the embodiment of the present invention, user if desired watches some video resource by browser, then can be by browsing The address of device input video website, is watched by clicking on video resource link.To watch when browser gets user The information of video resource after, ask the address of the video source server for downloading this video resource first to video website, Video website can be by returning to, to browser, the address that HTML5 code carries video source server.
The embodiment of the present invention is with the difference of prior art, can carry multiple video source clothes in HTML5 code Business device address, that is, video website inform the address of browser multiple video source server simultaneously, each video source server is equal Video resource required for can providing for browser.
Step S102, described browser, according to the address of the plurality of video source server, is taken with the plurality of video source Multiple network connections set up by business device;
Browser, after receiving HTML5 code, therefrom obtains the address of multiple video source servers it is possible to pass through certainly The web socket of body connects(Web socket)Module sets up network connection with multiple video source servers simultaneously, with by institute The multiple network connections set up download required video resource.
Step S103, described browser by the plurality of network connection, respectively from the plurality of video source server Obtain multiple video slicings of described video resource;
Because, in the embodiment of the present invention, browser can set up multiple network connections with multiple video source servers simultaneously, Therefore in order to improve speed of download, different video slicings can be downloaded from each video source server respectively, specifically permissible Determine to download which or which video slicing from which video source server by browser.
Step S104, after described browser is recombinated to the plurality of video slicing getting, plays described video Resource.
After browser downloads to all of video slicing from each video source server, multiple video slicings can be carried out Restructuring, to form a complete video resource work user viewing.
By above-mentioned steps, browser can carry according in the corresponding HTML code of broadcasting network address of the video getting Multiple video source servers address, set up multiple websocket network connections and multiple video source server between, and from Multiple video source servers obtain multiple video slicings, and play the video resource file of the combined one-tenth of multiple video slicings.By It is to obtain video slicing from multiple video source servers in the embodiment of the present invention, it is to avoid taken according to HTML code in prior art When a network connection is set up to obtain video resource in the address of one video source server of band, because by this video source The restriction of server bandwidth, leads to the problem that speed of download is slow, and divides due to obtaining video from multiple video source servers Piece, improves the speed that browser obtains video resource, optimizes the broadcasting of video content to a certain extent.
In force, browser can be connected by multiple websocket as follows, obtains the burst of video:Clear Video resource to be downloaded can be divided into multiple video slicings by device of looking at first, and then this browser can be according to default equal Weighing apparatus mode, determines the video slicing that each video source server obtains from the plurality of video source server, finally, browser is permissible Obtain corresponding video slicing from each video source server.
For example:Video resource to be downloaded is divided into 8 video slicings by browser, then according to default equilibrium side Formula, determines and obtains these video slicings from 4 video source servers.For example:Obtain video slicing 1 He from video source server 1 5, obtain video slicing 2,3 and 4 from video source server 2, obtain video slicing 6 and 8 from video source server 3, from video source Server 4 obtains video slicing 7.
In the case of one kind, this balanced way can be acquiescence, does not carry this balanced way in the HTML code getting. In the case of another kind, this balanced way can carry in HTML code, and this balanced way can include:According to following at least it One determines the video slicing that each video source server obtains from the plurality of video source server:The performance of described browser, The network bandwidth, the occupancy situation of bandwidth of each video source server, the number seeds of the video source of each video source server.
Alternatively, video resource to be downloaded can be divided into multiple bursts by browser in the following way:Browser Duration according to described video resource to be downloaded and playing sequence, determine the original position of each video slicing, duration and suitable Sequence identifies, and then video resource is divided into multiple videos and divides according to the original position of each video slicing and duration by this browser Piece.
After above-mentioned preferred implementation, multiple videos are divided by this browser according to video slicing corresponding sequence mark Piece is recombinated, and the video resource after restructuring play by browser.
Real-time bandwidth between browser and each video source server is continually changing, in order to ensure to obtain video slicing Seriality and promptness, browser dynamic can adjust according to the real-time bandwidth between browser and multiple video source server The whole video slicing to multiple video source server institutes acquisition request.
Fig. 2 is the schematic diagram based on the multi-link VOD method of websocket for the embodiment of the present invention, as shown in Fig. 2 The network address of the video playback website of browser receiving user's input, then sends HTTP request to video playback website, to ask Acquisition can provide the address of the video source server of video resource to be downloaded.Video playback website returns to browser HTML5 code, carries the address of multiple websocket video source servers in this HTML5 code, and above-mentioned equalizer set System;Browser, according to the address of the multiple video source servers in HTML5 code, is set up by the network socket word modules of itself Browser is that websocket is connected with the network connection of each video source server.Foundation with each video source server After websocket connects, browser carries out burst to video resource to be downloaded automatically by scheduler module, and to different The different video slicing of video source server request.Carry out when burst is processed, considering size and the sequence of video slicing Etc. factor.After browser downloads corresponding video slicing from multiple video source servers, carry out being reassembled into complete regarding Play out after frequency file.Alternatively, according to the change to the real-time bandwidth and different video servers between, dynamic adjustment Video slicing is asked in different video source server, for ensureing seriality and the promptness of video playback.
In various embodiments above, the address that HTML5 code carries multiple video source servers can be as follows with concrete example, HTML5 code is:
<Meta name=" websocketapplication-task " content=" name=websocket video source takes Business device;action=connecting;autoLoadbancance
url=http://websocket.vidoesource1.com
url=http://websocket.vidoesource2.com/>
Based on identical inventive concept, corresponding to said method embodiment, the present embodiment additionally provides a kind of video resource Acquisition device, is used for realizing above-mentioned video resource acquisition methods.
Fig. 3 is the structural representation of the video resource acquisition device of the present invention, and this device includes the first acquisition module 31, builds Formwork erection block 32, the second acquisition module 33 and playing module 34, wherein, the first acquisition module 31 is used for obtaining video money to be downloaded Source corresponding HTML HTML code, carries the address of multiple video source servers, respectively in described HTML code Video source server all can provide described video resource for described browser;Set up module 32 for according to the plurality of video The address of source server, sets up multiple network connections with the plurality of video source server;Second acquisition module 33 is used for passing through The plurality of network connection, obtains multiple video slicings of described video resource respectively from the plurality of video source server; After playing module 34 is used for the plurality of video slicing getting is recombinated, play described video resource.
Further, the second acquisition module 33 includes the first division unit, multiple for being divided into described video resource Video slicing;First determining unit, for according to default balanced way, determining and respectively regarding from the plurality of video source server The video slicing that frequency source server obtains;And, acquiring unit, for obtaining corresponding regarding respectively from each video source server Frequency division piece.
In said apparatus embodiment, described balanced way carries in described HTML code;Described balanced way includes: The video slicing that each video source server obtains from the plurality of video source server is determined according at least one of:Described The performance of browser, the network bandwidth, the occupancy situation of bandwidth of each video source server, the video source of each video source server Number seeds.
In said apparatus embodiment, the first division unit 31 can include the second determining unit, for being regarded according to described The duration of frequency resource and playing sequence, determine original position and duration and the sequence mark of each video slicing;Second divides list Described video resource is divided into multiple video slicings for the original position according to each video slicing described and duration by unit. Further, playing module 34 can include assembled unit, for being identified to described according to the corresponding sequence of described video slicing Multiple video slicings are recombinated;Broadcast unit, for playing restructuring rear video resource..
In said apparatus embodiment, this device can also include adjusting module, for according to described browser with described Real-time bandwidth between multiple video source servers, dynamically adjusts the video to the plurality of video source server institute acquisition request Burst.
Offer device embodiment of the present invention can obtain flow process, its concrete function specifically for executing above-mentioned each video resource May refer to the description of said method, here is omitted.Said apparatus can be arranged in the browser of user, according to acquisition To video the corresponding HTML code of broadcasting network address in the address of multiple video source servers that carries, with multiple video source clothes Set up multiple websocket network connections between business device, and obtain multiple video slicings from multiple video source servers, and play The video resource file of the combined one-tenth of multiple video slicings.Because the embodiment of the present invention is to obtain from multiple video source servers to regard Frequency division piece a, it is to avoid network is set up even in the address of the video source server being carried according to HTML code in prior art When fetching acquisition video resource, because being limited by this video source server bandwidth, lead to slow the asking of speed of download Topic, and due to obtaining video slicing from multiple video source servers, improve the speed that browser obtains video resource, certain The broadcasting of video content is optimized on degree.
One of ordinary skill in the art will appreciate that:The all or part of step realizing above-mentioned each method embodiment can be led to Cross the related hardware of programmed instruction to complete.Aforesaid program can be stored in a computer read/write memory medium.This journey Sequence upon execution, executes the step including above-mentioned each method embodiment;And aforesaid storage medium includes:ROM, RAM, magnetic disc or Person's CD etc. is various can be with the medium of store program codes.
Finally it should be noted that:Various embodiments above only in order to technical scheme to be described, is not intended to limit;To the greatest extent Pipe has been described in detail to the present invention with reference to foregoing embodiments, it will be understood by those within the art that:Its according to So the technical scheme described in foregoing embodiments can be modified, or wherein some or all of technical characteristic is entered Row equivalent;And these modifications or replacement, do not make the essence of appropriate technical solution depart from various embodiments of the present invention technology The scope of scheme.

Claims (2)

1. a kind of video resource acquisition methods are it is characterised in that include:
Browser obtains video resource corresponding HTML HTML code to be downloaded, carries in described HTML code There is the address of multiple video source servers, each video source server all can provide described video resource for described browser;
Described browser, according to the address of the plurality of video source server, sets up multiple nets with the plurality of video source server Network connects;
Described browser, by the plurality of network connection, obtains described video money respectively from the plurality of video source server Multiple video slicings in source;
After described browser is recombinated to the plurality of video slicing getting, play described video resource;
Described browser, by the plurality of network connection, obtains described video money respectively from the plurality of video source server Multiple video slicings in source include:
Described video resource is divided into multiple video slicings by described browser;
Described browser, according to default balanced way, determines that each video source server obtains from the plurality of video source server The video slicing taking;
Described browser obtains corresponding video slicing from each video source server respectively;
Described balanced way carries in described HTML code;Described balanced way includes:According at least one of determine from The video slicing that in the plurality of video source server, each video source server obtains:The performance of described browser, the network bandwidth, The occupancy situation of bandwidth of each video source server, the number seeds of the video source of each video source server;
Described video resource is divided into multiple video slicings and includes by described browser:
Described browser according to the duration of described video resource and playing sequence, determine each video slicing original position and when Long and sequence identifies;
Described video resource is divided into multiple regarding according to the original position of each video slicing described and duration by described browser Frequency division piece;
After described browser is recombinated to the plurality of video slicing getting, play described video resource and include:
Described browser is recombinated to the plurality of video slicing according to described video slicing corresponding sequence mark;Described clear Restructuring rear video resource play by device of looking at.
2. a kind of video resource acquisition device is it is characterised in that include:
First acquisition module, for obtaining video resource to be downloaded corresponding HTML HTML code, described The address of multiple video source servers is carried, each video source server all can regard described in browser offer in HTML code Frequency resource;
Set up module, for the address according to the plurality of video source server, many with the foundation of the plurality of video source server Individual network connection;
Second acquisition module, for by the plurality of network connection, obtaining institute respectively from the plurality of video source server State multiple video slicings of video resource;
Playing module, after the plurality of video slicing getting is recombinated, plays described video resource;
Described second acquisition module includes:
First division unit, for being divided into multiple video slicings by described video resource;
First determining unit, for according to default balanced way, determining each video source from the plurality of video source server The video slicing that server obtains;
Acquiring unit, for obtaining corresponding video slicing respectively from each video source server;
Described balanced way carries in described HTML code;Described balanced way includes:According at least one of determine from The video slicing that in the plurality of video source server, each video source server obtains:The performance of described browser, the network bandwidth, The occupancy situation of bandwidth of each video source server, the number seeds of the video source of each video source server;
Described first division unit includes:
Second determining unit, for the duration according to described video resource and playing sequence, determines the initial of each video slicing Position and duration and sequence mark;
Described video resource is divided into by the second division unit for the original position according to each video slicing described and duration Multiple video slicings;
Described playing module includes:
Assembled unit, for recombinating to the plurality of video slicing according to described video slicing corresponding sequence mark;
Broadcast unit, for playing restructuring rear video resource.
CN201410032120.XA 2014-01-23 2014-01-23 Video resource obtaining method and device Active CN103763638B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410032120.XA CN103763638B (en) 2014-01-23 2014-01-23 Video resource obtaining method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410032120.XA CN103763638B (en) 2014-01-23 2014-01-23 Video resource obtaining method and device

Publications (2)

Publication Number Publication Date
CN103763638A CN103763638A (en) 2014-04-30
CN103763638B true CN103763638B (en) 2017-02-15

Family

ID=50530786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410032120.XA Active CN103763638B (en) 2014-01-23 2014-01-23 Video resource obtaining method and device

Country Status (1)

Country Link
CN (1) CN103763638B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104168501A (en) * 2014-08-14 2014-11-26 厦门美图之家科技有限公司 Method for video playback of mobile terminal
CN104270671A (en) * 2014-09-28 2015-01-07 可牛网络技术(北京)有限公司 Flash video playing method and device
CN104822087B (en) * 2015-04-30 2017-11-28 无锡天脉聚源传媒科技有限公司 A kind of processing method and processing device of video-frequency band
CN106231440A (en) * 2016-07-22 2016-12-14 华为技术有限公司 A kind of files in stream media burst method for down loading, device and terminal
CN112714365B (en) * 2019-10-25 2024-02-09 上海哔哩哔哩科技有限公司 Video playing method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102312A (en) * 2007-06-11 2008-01-09 华为技术有限公司 A network communication data processing method, network communication system and client
US7324555B1 (en) * 2003-03-20 2008-01-29 Infovalue Computing, Inc. Streaming while fetching broadband video objects using heterogeneous and dynamic optimized segmentation size
CN101282348A (en) * 2007-04-06 2008-10-08 上海晨兴电子科技有限公司 Method for implementing flow medium function using HTTP protocol
CN103024593A (en) * 2012-12-26 2013-04-03 人民搜索网络股份公司 Online VOD (video on demand) acceleration system and online VOD playing method
CN103064958A (en) * 2012-12-31 2013-04-24 乐视致新电子科技(天津)有限公司 Method for automatic recognition and analysis of browser and based on hyper text makeup language (HTML) 5 video label
CN103077191A (en) * 2012-12-21 2013-05-01 中金数据系统有限公司 Self-adaptive Web platform audio playing method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005110024A (en) * 2003-09-30 2005-04-21 Toshiba Corp Data transmitter, data transmission/reception system, and data transmission/reception method
CN101447994B (en) * 2008-12-30 2012-07-04 深圳市迅雷网络技术有限公司 Method for downloading and playing multimedia file and equipment thereof
CN102123303B (en) * 2011-03-25 2012-10-24 天脉聚源(北京)传媒科技有限公司 Audio/video file playing method and system as well as transmission control device
CN102263783A (en) * 2011-06-14 2011-11-30 上海聚力传媒技术有限公司 Method and device for transmitting media files based on time slices
CN102378043A (en) * 2011-09-29 2012-03-14 深圳市矽伟智科技有限公司 Content delivery method and Internet television (TV) playing method as well as corresponding device and systems
CN102647634B (en) * 2012-05-02 2014-07-02 合一网络技术(北京)有限公司 Multi-fragment video playing method and device based on hypertext markup language (HTML) 5 video

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7324555B1 (en) * 2003-03-20 2008-01-29 Infovalue Computing, Inc. Streaming while fetching broadband video objects using heterogeneous and dynamic optimized segmentation size
CN101282348A (en) * 2007-04-06 2008-10-08 上海晨兴电子科技有限公司 Method for implementing flow medium function using HTTP protocol
CN101102312A (en) * 2007-06-11 2008-01-09 华为技术有限公司 A network communication data processing method, network communication system and client
CN103077191A (en) * 2012-12-21 2013-05-01 中金数据系统有限公司 Self-adaptive Web platform audio playing method and device
CN103024593A (en) * 2012-12-26 2013-04-03 人民搜索网络股份公司 Online VOD (video on demand) acceleration system and online VOD playing method
CN103064958A (en) * 2012-12-31 2013-04-24 乐视致新电子科技(天津)有限公司 Method for automatic recognition and analysis of browser and based on hyper text makeup language (HTML) 5 video label

Also Published As

Publication number Publication date
CN103763638A (en) 2014-04-30

Similar Documents

Publication Publication Date Title
CN103763638B (en) Video resource obtaining method and device
CN103379362B (en) VOD method and system
JP4857349B2 (en) Method, system, and computer program for providing asynchronous portal pages within a portal system
CN103268337B (en) The playing method and device of video in a kind of webpage
CN103942225B (en) A kind of resource transfer method, client and the system of mixed type applications client
CN101415069B (en) Server and method for sending on-line play video
US20160234278A1 (en) Audio commenting and publishing system
JP4791542B2 (en) System, method, and program for independently refreshing portlet content in portal view (independent refresh of portlet content in portal view)
CN108319483A (en) Web page processing method, device, terminal and storage medium
CN104063460A (en) Method and device for loading webpage in browser
CN105453582B (en) A method of playing Media Stream in browser
SG189304A1 (en) Multi-phased and partitioned content preparation and delivery
CN107454384A (en) A kind of live performance test methods and device
US20160217109A1 (en) Navigable web page audio content
EP2990958A1 (en) Reception device, information processing method in reception device, transmission device, information processing device, and information processing method
CN107133064A (en) The hot update method of the page and device of native applications
CN106993238A (en) Audio and video playing method and device, audio frequency and video live broadcasting method and system based on Html5
CN103518201B (en) A kind of carousel method of advertisement and the device and system for advertisement carousel
CN103648011A (en) Audio and video synchronization device and method based on HLS protocol
US20170214948A1 (en) Method And Device For Presenting Content Data From Network
CN103747280B (en) A kind of method and electronic equipment for creating programme
CN112449250A (en) Method, device, equipment and medium for downloading video resources
KR101958662B1 (en) Method and Apparatus for sharing java script object in webpage
CN108241602A (en) A kind of online method and apparatus for making PowerPoint
CN107423312A (en) Live data player method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant