CN103702238B - The multi-screen video sharing method and a terminal server - Google Patents

The multi-screen video sharing method and a terminal server Download PDF

Info

Publication number
CN103702238B
CN103702238B CN201310719853.6A CN201310719853A CN103702238B CN 103702238 B CN103702238 B CN 103702238B CN 201310719853 A CN201310719853 A CN 201310719853A CN 103702238 B CN103702238 B CN 103702238B
Authority
CN
China
Prior art keywords
terminal
video
server
websocket
address information
Prior art date
Application number
CN201310719853.6A
Other languages
Chinese (zh)
Other versions
CN103702238A (en
Inventor
程伯钦
Original Assignee
华为终端有限公司
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 华为终端有限公司 filed Critical 华为终端有限公司
Priority to CN201310719853.6A priority Critical patent/CN103702238B/en
Publication of CN103702238A publication Critical patent/CN103702238A/en
Application granted granted Critical
Publication of CN103702238B publication Critical patent/CN103702238B/en

Links

Abstract

本发明的实施例公开了一种多屏视频共享方法及终端、服务器,涉及通信技术领域。 Embodiments of the present invention discloses a method and a multi-screen video sharing terminal, a server, relates to communication technologies. 所述方法包括:第一终端与服务器建立websocket数据传输通道,并获取与所述服务器建立websocket连接的至少一个第二终端的地址信息;所述第一终端通过所述websocket数据传输通道,接收所述至少一个第二终端经由所述服务器发送的视频地址信息;所述第一终端根据所述视频地址信息,从所述服务器上获取所述视频。 The method comprising: establishing a first terminal and a server websocket data transmission channel, and acquires the address information to establish at least one second terminal connected to said server websocket; websocket the first terminal through the data transmission channel, receiving said at least one second terminal via the video transmitting address information of the server; the first terminal, acquires the video from the video server based on the address information. 终端通过与服务器建立websocket数据传输通道获取视频地址信息,所述终端通过浏览器接收媒体流、播放视频,使得终端不再需要安装客户端软件,提高了各设备之间的视频共享效率。 The terminal acquires address information of the video data transmission channel by establishing websocket server, the terminal receives the media stream through a browser, a video player, so that the terminal no longer need to install the client software to improve the efficiency of video sharing between the devices.

Description

一种多屏视频共享方法及终端、服务器 The multi-screen video sharing method and a terminal server

技术领域: FIELD:

[0001] 本发明通信技术领域,特别涉及一种多屏视频共享方法及终端、服务器。 Communication Field [0001] The present invention particularly relates to a multi-screen video sharing method and a terminal server.

背景技术: Background technique:

[0002] 互联网技术的进步以及终端电子设备的多样化发展,极大便利了人们的工作生活。 [0002] diversification progress and terminal electronic device development of Internet technology, greatly facilitate people's work and life. 比如在我们的工作生活中,有时需要将一个设备上的正在播放的视频节目直接推送到其它设备上播放,有时候又需要将其它设备上正在播放的视频节目拉到回到本设备上播放。 For example, in our work lives, it is sometimes necessary to being played on a video program pushed directly to the device to play on other devices, sometimes it needs to be played on other devices being pulled back to the video program playing on this device. 现有技术中,为实现多个这种设备之间的视频节目相互推拉,往往需要在各种形态的终端上安装指定的客户端软件,继而进行多屏互动的操作。 In the prior art, for the realization of a video program such devices to each other between a plurality of push-pull, often need to install specific software on the client terminal in various forms, in turn, interact with multi-screen operation. 如在DLNA (DIGITAL LIVING NETWORK ALLIANCE)技术中,若通过多屏互动配件WiPlug实现手机与电视之间的视频推拉, 需要在手机上下载WiPlug客户端,通过WiPlug客户端将手机的屏幕投射到电视上,并控制电视的视频播放。 As in the DLNA (DIGITAL LIVING NETWORK ALLIANCE) technology, if WiPlug for video push and pull between the phone and through multi-screen interactive TV accessories, WiPlug need to download a client on the phone, through WiPlug client phone's screen to your TV and control video playback TV.

[0003] 但由于终端的操作系统(Operating System,0S)、硬件等差异很大,客户端软件的开发者为适应终端的应用需要往往开发多种形态的客户端软件,用户面对多种形态的客户端软件往往无所适从,也会因客户端软件比较复杂而无法安装,进而无法实现各设备之间的视频共享。 [0003] However, due to the large terminal operating system (Operating System, 0S), hardware and other differences, the client software developers to adapt applications that require a terminal client software is often developed a variety of forms, users face a variety of forms the client software is often at a loss, it will be more complicated because the client software can not be installed, and thus can not achieve video sharing between devices.

发明内容: SUMMARY:

[0004] 本发明提供了一种多屏视频共享方法及终端、服务器,以提高各设备之间的视频共享效率。 [0004] The present invention provides a multi-screen video sharing method and a terminal, a server, in order to improve the efficiency of video sharing between the devices.

[0005] 第一方面,本发明提供了一种多屏视频共享方法的一个实施例。 [0005] In a first aspect, the present invention provides a method for a multi-screen video sharing embodiment.

[0006] 在第一种可能的实现方式中,所述方法包括:第一终端与服务器建立网页套接字协议websocket数据传输通道,并获取与所述服务器建立websocket连接的至少一个第二终端的地址信息; [0006] In a first possible implementation, the method comprising: a first terminal and a web server to establish a data transmission channel websocket sockets, and establishing at least one second terminal acquires websocket connection with the server Address information;

[0007] 所述第一终端通过所述websocket数据传输通道,接收所述至少一个第二终端经由所述服务器发送的视频地址信息;所述视频地址信息用于指示所述至少一个第二终端当前播放的视频在所述服务器上的位置; [0007] websocket the first terminal through the data transmission channel, receiving the at least a second video terminal via the address information sent from the server; the video address information indicating the at least one second terminal is currently video playback location on the server;

[0008] 所述第一终端根据所述视频地址信息,从所述服务器上获取所述视频。 [0008] The first video terminal according to the address information, acquires the video from the server.

[0009] 结合第一方面第一种可能的实现方式,在第二种可能的实现方式中,所述第一终端与服务器建立websocket数据传输通道具体为: [0009] combination with the first aspect of the first possible implementation mode, in a second possible implementation, the first terminal and the server establishes a data transmission channel websocket specifically is:

[0010] 第一终端向服务器发送websocket握手请求; [0010] The first terminal sends the server websocket handshake request;

[0011] 所述第一终端接收所述服务器发送的握手响应;所述握手响应为所述服务器对所述第一'终端发送的对所述websocket握手请求的响应;所述握手响应包含与所述服务器建立websocket连接的至少一个第二终端的地址信息。 [0011] The first terminal receives the handshake response sent by the server; the handshake response is the server for the first 'websocket handshake request sent by the terminal in response; as a handshake response comprising said address information of the server to establish at least one second terminal is connected to websocket.

[0012] 结合第一方面第一种或第二种可能的实现方式,在第三种可能的实现方式中,在所述第一终端接收所述至少一个第二终端经由所述服务器发送的视频地址信息之前,所述方法还包括: [0012] combination with the first aspect of the first or second possible implementation manner, in a third possible implementation manner, the first terminal receiving said at least one second terminal via the video sent by the server before the address information, the method further comprising:

[0013] 所述第一终端根据所述地址信息,通过所述websocket数据传输通道,经由所述服务器向所述第二终端发送第一请求,以请求所述第二终端将当前播放的视频的地址信息发送到所述第一终端; [0013] The first terminal according to the address information sent through the data transmission channel websocket via the server to the second terminal of the first request, requesting the second terminal to the currently playing video address information to the first terminal;

[0014] 所述第一终端接收所述至少一个第二终端经由所述服务器发送的同意所述第一请求的响应消息。 [0014] The first terminal receives at least one response message to the first terminal of the second consent request transmitted via the server.

[0015] 结合第一方面第一种或第二种或第三种可能的实现方式,在第四种可能的实现方式中,所述第一终端接收的视频地址信息为统一资源定位符(Uniform Resource Locator, URL);所述第一终端根据所述视频地址信息,从所述服务器获取所述视频具体为: [0015] combination with the first aspect of the first or the second or the third possible implementation manner, in a fourth possible implementation, the video receiving address information of the first terminal is a uniform resource locator (Uniform Resource Locator, URL); a first terminal of said address information according to the video, the video obtained from the server specifically comprises:

[0016] 所述第一终端根据所述URL与所述服务器建立视频链路,接收所述服务器发送的所述视频的视频流。 [0016] The first video terminal to establish a link with the server according to the URL, receive the video stream of the video sent by the server.

[0017] 结合第一方面第一种或第二种或第三种或第四种可能的实现方式,在第五种可能的实现方式中,在所述第一终端完成所述视频的播放后,所述方法还包括: After the [0017] combination with the first aspect of the first or the second or the third or the fourth possible implementation manner, in a fifth possible implementation manner, the video is finished playing the first terminal the method further comprising:

[0018] 所述第一终端关闭与所述服务器建立的websocket数据传输通道。 [0018] The first terminal is closed with the server to establish a data transmission channel websocket.

[0019] 第二方面,本发明提供了一种多屏视频共享方法的一个实施例。 [0019] a second aspect, the present invention provides a method for a multi-screen video sharing embodiment.

[0020] 在第一种可能的实现方式中,所述方法包括:第一终端与服务器建立websocket数据传输通道,并获取与所述服务器建立websocket连接的至少一个第二终端的地址信息; [0021] 所述第一终端通过所述websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送视频地址信息;所述视频地址信息用于指示所述第一终端当前播放的视频在所述服务器的位置。 [0020] In a first possible implementation, the method comprising: establishing a first terminal and a server websocket data transmission channel, and obtain the second terminal websocket establishing at least one connection with the server address information; [0021 ] websocket the first terminal through the data transmission channel, and transmitting image information to address said at least one second terminal via the server; the address information for the current video playing a first indication of the terminal in the video said location server.

[0022]结合第二方面第一种可能的实现方式,在第二种可能的实现方式中,所述第一终端与服务器建立websocket数据传输通道具体为: [0022] combination with the second aspect of the first possible implementation mode, in a second possible implementation, the first terminal and the server establishes a data transmission channel websocket specifically is:

[0023] 第一终端向服务器发送websocket握手请求; [0023] The first terminal sends the server websocket handshake request;

[0024]所述第一终端接收所述服务器发送的握手响应;所述握手响应为所述服务器对所述第一终端发送的对所述websocket握手请求的响应;所述握手响应包含与所述服务器连接的至少一个第二终端的地址信息。 [0024] The first terminal receives the handshake response sent by the server; the handshake response is a response to the handshake request websocket server transmits the first terminal of the; the handshake response comprising the address information of the at least one second terminal connected to the server.

[0025]结合第二方面第一种或第二种可能的实现方式,在第三种可能的实现方式中,在所述第一终端通过所述websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送视频地址信息之前,所述方法还包括: [0025] combination with the second aspect of the first or second possible implementation manner, in a third possible implementation manner, the first terminal through the data transmission channel websocket, via the server to the before least one second terminal video address transmitting information, the method further comprising:

[0026] 所述第一终端根据所述地址信息,通过所述websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送第二请求,以请求将所述第一终端将当前播放的视频的地址信息发送到所述至少一个第二终端; [0026] The first terminal according to the address information sent through the data transmission channel websocket via the server to the at least one second terminal a second request to request that the first terminal currently playing address information of the video to the at least one second terminal;

[0027]所述第一终端接收所述至少一个第二终端发送的同意所述第二请求的响应消息。 [0027] The first terminal receives at least one second message sent by the terminal in response to the second request agree. [0028]结合第二方面第一种或第二种或第三种可能的实现方式,在第四种可能的实现方式中,在所述第一终端完成所述视频地址信息的发送后,所述方法还包括: After the [0028] combination with the second aspect of the first or second or third possible implementation manner, in a fourth possible implementation manner, the terminal completes transmitting the first address of the video information, the said method further comprising:

[0029]所述第一终端关闭与所述服务器建立的websocket数据传输通道。 [0029] The first terminal is closed with the server to establish a data transmission channel websocket.

[0030]第三方面,本发明提供了一种多屏视频共享方法的一个实施例。 [0030] a third aspect, the present invention provides a multi-screen video sharing method according to an embodiment.

[0031] 在第一种可能的实现方式中,所述方法包括:服务器与第一终端建立websocket数据传输通道,并向所述第一终端发送与所述服务器建立websocket连接的至少一个桌一终端的地址信息; [0031] In a first possible implementation, the method comprising: a first terminal and a server websocket establishing a data transmission channel, and transmitting the first terminal to establish a desk websocket least one terminal connected to the server address information;

[0032]所述服务器接收所述至少一个第二终端发送的视频地址信息,并向所述第一终端发送视频地址信息;所述视频地址信息用于指示所述至少一个第二终端当前播放的视频在所述服务器的位置; [0032] The address information of the video server receives the transmitted at least one second terminal, and send the address information of the first video terminal; said video address information indicating the at least one second terminal is currently playing the position of said video server;

[0033]所述服务器接收所述第一终端根据所述视频地址信息获取视频的请求,向所述第一终端发送所述视频。 [0033] The server receives the request for acquiring a first terminal of a video according to the video address information to send the video to the first terminal.

[0034]结合第三方面第一种可能的实现方式,在第二种可能的实现方式中,所述服务器与第一终端建立websocket数据传输通道,并向所述第一终端发送与所述服务器建立websocket连接的至少一个第二终端的地址信息具体为: [0034] The third aspect of binding a first possible implementation manner, in a second possible implementation, the server websocket establishing a data transmission channel with the first terminal, the first terminal transmits to the server establishing at least one second terminal is connected websocket address information specifically is:

[0035]所述服务器接收所述第一终端发送的websocket握手请求; The [0035] the first server receives a handshake request sent by the terminal websocket;

[0036]所述服务器向所述第一终端发送握手响应;所述握手响应为所述服务器对所述第一终端发送的对所述websocket握手请求的响应;所述握手响应包含与所述服务器建立websocket连接的至少一个第二终端的地址信息。 [0036] The server sends handshake response to the first terminal; the handshake response is the response of the server websocket handshake request sent by the first terminal; in response to the handshake with the server comprising establishing the address information of the at least one second terminal is connected to websocket.

[0037]结合第三方面第一种或第二种可能的实现方式,在第三种可能的实现方式中,在所述服务器接收所述至少一个第二终端发送的视频地址信息之前,所述方法还包括: [0037] reference to the third aspect of the first or second possible implementation manner, in a third possible implementation manner, before the receiving the at least one second server terminal transmitting the video information of the address, the the method further comprises:

[0038]所述服务器接收所述第一终端通过所述websocket数据传输通道发送的第三请求,并向所述至少一个第二终端发送所述第三请求;所述第三请求用于请求所述至少一个第二终端将当前播放的视频的地址信息发送到所述第一终端; [0038] The server receives the third request sent by said first terminal websocket data transmission channel, and transmitting at least one second terminal to the third request; a third request for requesting the said at least one second terminal transmits the address information of the currently playing video to the first terminal;

[0039]所述服务器接收所述至少一个第二终端发送的同意所述第三请求的响应消息,并向所述第一终端发送所述响应消息。 [0039] The server receiving the consent of the at least one second terminal transmitting the response to the third request message, to the first terminal transmits the response message.

[0040] 结合第三方面第一种或第二种或第三种可能的实现方式,在第四种可能的实现方式中, [0040] reference to the third aspect of the first or second or third possible implementation manner, in a fourth possible implementation manner,

[0041] 所述视频地址信息为URL;所述服务器接收所述第一终端根据所述视频地址信息获取视频的请求,向所述第一终端发送所述视频具体为: [0041] The video information is the URL address; the first server receives the request for acquiring a video terminal according to the video address information, transmitting the video to the first terminal specifically comprises:

[0042]所述服务器接收所述第一终端根据所述视频地址信息获取视频的请求,与所述第一终端建立与所述URL对应的视频链路,向所述第一终端发送所述视频的视频流。 [0042] The server receives the first request for the video terminal according to the address information acquired video, and establishing a link to the URL corresponding to the first video terminal, transmits the video to the first terminal video stream.

[0043]第四方面,本发明提供了一种多屏视频共享方法的一个实施例。 [0043] a fourth aspect, the present invention provides a method for a multi-screen video sharing embodiment.

[0044]在第一种可能的实现方式中,所述方法包括:服务器与第一终端建立websocket数据传输通道,并向所述第一终端发送与所述服务器建立websocket连接的至少一个第二终端的地址信息; [0044] In a first possible implementation, the method comprising: a first terminal and a server websocket establishing a data transmission channel, and transmitting the first terminal to establish at least one second terminal is connected to the server websocket address information;

[0045]所述服务器接收所述第一终端发送的视频地址信息,并向所述至少一个第二终端发送所述视频地址信息;所述视频地址信息用于指示所述第一终端当前播放的视频在所述服务器的位置; [0045] The video server receives the address information of the first terminal transmitted to the at least one second terminal transmits the address information of video; the video address information indicating the currently playing first terminal the position of said video server;

[0046]所述服务器接收所述至少一个第二终端根据所述视频地址信息获取视频的请求, 向所述至少一个第二终端发送所述视频。 The [0046] at least one second server receives the request for acquiring a video terminal according to the address information of the video, the video transmitted to the at least one second terminal.

[0047]结合第四方面第一种可能的实现方式,在第二种可能的实现方式中,所述服务器与第一终端建立websocket数据传输通道,并向所述第一终端发送与所述服务器建立websocket连接的至少一个第二终端的地址信息具体为: [0047] The fourth aspect of binding a first possible implementation manner, in a second possible implementation, the server websocket establishing a data transmission channel with the first terminal, the first terminal transmits to the server establishing at least one second terminal is connected websocket address information specifically is:

[0048]所述服务器接收所述弟一终端发送的websocket握手请求; [0048] The server receives the younger brother websocket handshake request sent by the terminal;

[0049] 所述服务器向所述第一终端发送握手响应;所述握手响应为所述服务器对所述第一终端发送的对所述websocket握手请求的响应;所述握手响应包含与所述服务器建立websocket连接的至少一个第二终端的地址信息。 [0049] The server sends handshake response to the first terminal; the handshake response is the response of the server websocket handshake request sent by the first terminal; in response to the handshake with the server comprising establishing the address information of the at least one second terminal is connected to websocket.

[0050] 结合第四方面第一种或第二种可能的实现方式,在第三种可能的实现方式中,在所述服务器接收所述第一终端发送的视频地址信息之前,所述方法还包括: By [0050] reference to the fourth aspect of the first or second possible implementation manner, in a third possible implementation, the address information of the receiving video terminal transmits in the first server, the method further include:

[0051] 所述服务器接收所述第一终端通过所述websocket数据传输通道发送的第四请求,并向所述至少一个第二终端发送所述第四请求;所述第四请求用于请求将所述所述第一终端当前播放的视频的地址信息发送至所述至少一个第二终端; [0051] The fourth server receives the request sent by the first terminal websocket data transmission channel, and transmitting at least one second terminal of said fourth request; request for requesting the fourth address information of the first terminal of said current video playing is sent to the at least one second terminal;

[0052]所述服务器接收所述至少一个第二终端发送的同意所述第四请求的响应消息,并向所述第一终端发送所述响应消息。 [0052] agree to receive the at least one second server terminal transmitting the fourth message in response to the request, and send the response message to the first terminal.

[0053]结合第四方面第一种或第二种或第三种可能的实现方式,在第四种可能的实现方式中,所述视频地址信息为URL;所述服务器接收所述至少一个第二终端根据所述视频地址信息获取视频的请求,向所述至少一个第二终端发送所述视频具体为: [0053] reference to the fourth aspect of the first or second or third possible implementation manner, in a fourth possible implementation manner, the video information is the URL address; the first server receives the at least one two video acquisition request of the terminal according to the video address information, said at least one second terminal to transmit the video is specifically:

[0054]所述服务器接收所述至少一个第二终端根据所述视频地址信息获取视频的请求, 与所述至少一个第二终端建立与所述URL对应的视频链路,向所述至少一个第二终端发送所述视频的视频流。 [0054] The server receives the request for acquiring the at least one second terminal of the video according to the video address information corresponding to the URL establishing a video link with the at least one second terminal, at least one of the first to the two terminal transmits a video stream of the video.

[0055]第五方面,本发明提供了一种终端的一个实施例。 [0055] a fifth aspect, the present invention provides a terminal according to an embodiment.

[0056] 在第一种可能的实现方式中,所述终端包括:连接单元,用于与服务器建立websocket数据传输通道; [0056] In a first possible implementation, the terminal comprising: a connection unit for establishing websocket server data transmission channel;

[0057] 获取单兀,用于获取与所述服务器建立websocket连接的至少一个第二终端的地址信息;根据视频地址信息,从所述服务器上获取视频; [0057] Wu acquisition unit for acquiring the address information of the server to establish the at least one second terminal is connected to websocket;, acquires the video from the video server according to the address information;

[0058] 接收单元,用于通过所述websocket数据传输通道,接收所述至少一个第二终端经由所述服务器发送的视频地址信息;所述视频地址信息用于指示所述至少一个第二终端当前播放的视频在所述服务器上的位置。 [0058] The receiving unit through said websocket data transmission channel, receiving the at least a second video terminal via the address information sent from the server; the video address information indicating the at least one second terminal is currently playback position on the video server.

[0059]结合第五方面第一种可能的实现方式,在第二种可能的实现方式中,所述终端还包括: [0059] A fifth aspect of binding a first possible implementation mode, in a second possible implementation, the terminal further comprises:

[0060] 发送单元,用于在所述接收单元接收视频地址信息之前,根据所述地址信息,通过所述websocket数据传输通道,经由所述服务器向所述第二终端发送第五请求,以请求所述第二终端将当前播放的视频的地址信息发送到所述第一终端; [0060] The transmitting unit is configured to, before the receiving unit receives address information of the video, according to the address information through the data transmission channel websocket, transmits a fifth request to the second terminal via the server, to request the second terminal sends the address information of the currently playing video to the first terminal;

[0061] 所述接收单元还用于,接收所述至少一个第二终端发送的同意所述第五请求的响应消息。 [0061] The receiving unit is further configured to, in response to the fifth message requesting consent to receive the at least one second terminal of the transmission.

[0062] 结合第五方面第一种或第二种可能的实现方式,在第三种可能的实现方式中,所述接收单元接收的视频地址信息为URL; [0062] reference to the fifth aspect of the first or second possible implementation manner, in a third possible implementation manner, the receiving unit receives address information of the video to the URL;

[0063] 所述连接单元还用于,根据所述URL与所述服务器建立视频链路; [0063] The connection unit is further configured to establish a video link with the server according to the URL;

[0064] 所述获取单元根据视频地址信息,从所述服务器获取视频具体为: [0064] The video acquiring unit according to the address information acquired from the particular video server:

[0065] 所述获取单元根据所述视频链路,获取所述服务器发送的所述视频的视频流。 [0065] The acquisition unit based on the video link, acquiring a video stream of the video sent by the server.

[0066] 结合第五方面第一种或第二种或第三种可能的实现方式,在第四种可能的实现方式中,所述连接单元还用于,在所述获取单兀获取视频后,关闭与所述服务器建立的websocket数据传输通道。 [0066] reference to the fifth aspect of the first or the second or the third possible implementation manner, in a fourth possible implementation manner, the connection unit is further configured to, after the acquisition unit acquires video Wu closing websocket established with the server data transmission channel.

[0067]第六方面,本发明提供了一种终端的一个实施例。 [0067] The sixth aspect, the present invention provides a terminal according to an embodiment.

[0068]在第一种可能的实现方式中,所述终端包括:连接单元,用于与服务器[0069] 建立websocket数据传输通道; [0068] In a first possible implementation, the terminal comprising: a connecting unit for communicating with the server [0069] websocket establishing a data transmission channel;

[0070]获取单元,用于获取与所述服务器建立websocket连接的至少一个第二终端的地址f目息; [0070] acquiring unit, configured to obtain an address to establish the at least one second terminal is connected with the server websocket f mesh information;

[0071]发送单元,用于通过所述websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送视频地址信息;所述视频地址信息用于指示所述第一终端当前播放的视频在所述服务器的位置 [0071] The transmitting unit for transmitting address information of the video websocket data transmission channel via the server to the at least one second terminal; said video address information indicative of the first terminal for the video currently playing the position of the server

[0072]结合第六方面第一种可能的实现方式,在第二种可能的实现方式中,所述发送单元还用于,在发送视频地址信息之前,根据所述地址信息,通过所述websocket数据传输通道,经由所述服务器向所述第二终端发送第六请求,以请求将所述第一终端将当前播放的视频的地址信息发送到所述至少一个第二终端; [0072] conjunction with the sixth aspect of the first possible implementation mode, in a second possible implementation, the sending unit is further configured to, prior to transmitting video address information from the address information, by said websocket data transmission channel, a sixth transmission request to the second terminal via the server, to request that the first terminal sends the address information of the currently playing video to the at least one second terminal;

[0073] 所述终端还包括: [0073] The terminal further comprises:

[0074]接收单元,用于接收所述至少一个第二终端发送的同意所述第六请求的响应消息。 [0074] The receiving unit in response to the sixth message agree to receive the request sent by the at least one second terminal.

[0075]结合第六方面第一种可能的实现方式,在第三种可能的实现方式中,所述连接单元还用于,在所述发送单元完成所述视频地址信息的发送后,关闭与所述服务器的websocket数据传输通道。 After [0075] conjunction with the sixth aspect of the first possible implementation manner, in a third possible implementation manner, the connection unit is further configured to transmit the complete address information in the video transmission unit, and closed the data transmission channel websocket server.

[0076]第七方面,本发明提供了一种服务器的一个实施例。 [0076] a seventh aspect, the present invention provides a server according to one embodiment.

[0077]在第一种可能的实现方式中,所述服务器包括:连接单元,用于与第一[0078] 终端建立websocket数据传输通道; [0077] In a first possible implementation, the server comprising: a connection unit for the first [0078] websocket terminal establishes a data transmission channel;

[0079] 获取单元,用于获取与所述服务器建立websocket连接的至少一个第二终端的地址信息; [0079] acquiring unit, configured to obtain address information to establish at least one second terminal connected to said server websocket;

[0080] 发送单元,用于向所述第一终端发送与服务器建立websocket连接的至少一个第二终端的地址信息;向所述第一终端发送所述视频地址信息;所述视频地址信息用于指示所述至少一个第二终端当前播放的视频在所述服务器的位置;向所述第一终端发送视频; [0080] The transmitting unit for transmitting to the first terminal and the server address information to establish at least one second terminal is connected to websocket; send the address information to the first video terminal; address information of the video indicating the at least one second terminal is currently playing position in the video server; transmitting the video to the first terminal;

[0081] 接收单元,接收所述至少一个第二终端发送的视频地址信息;接收所述第一终端根据所述视频地址信息获取视频的请求。 [0081] The receiving unit receives address information of the video sent by the at least one second terminal; receiving a first video terminal acquires address information according to the video request.

[0082] 结合第七方面第一种可能的实现方式,在第二种可能的实现方式中,所述接收单元还用于,接收所述第一终端通过所述websocket数据传输通道发送的第七请求,所述第七请求用于请求所述至少一个第二终端将当前播放的视频的地址信息发送到所述第一终端; 接收所述至少一个第二终端发送的同意所述第七请求的响应消息; [0082] The seventh aspect of binding a first possible implementation manner, in a second possible implementation, the receiving unit is further configured to receive said first terminal via said transmitting data transmission channel to a seventh websocket request, the seventh request for requesting the second terminal to the at least one transmitting address information of the currently playing video to the first terminal; agreement to receive the at least one second terminal of the seventh request is sent response message;

[0083]所述发送单元还用于,向所述至少一个第二终端发送所述第七请求;向所述第一终端发送所述响应消息。 [0083] The sending unit is further configured to, at least one second terminal to send the request to the seventh; send the response message to the first terminal.

[0084]结合第七方面第一种或第二种可能的实现方式,在第三种可能的实现方式中,所述发送单元发送的视频地址信息为URL; [0084] reference to the seventh aspect of the first or second possible implementation manner, in a third possible implementation, the sending unit sends the address information of the video to the URL;

[0085] 所述连接单元还用于,与所述第一终端建立与所述URL对应的视频链路; [0085] The connection unit is further configured to establish a link to the URL corresponding to the first video terminal;

[0086] 所述发送单元向所述第一终端发送所述视频具体为: [0086] The transmitting unit transmits the video to the first terminal specifically comprises:

[0087] 所述发送单元通过所述视频链路,向所述第一终端发送所述视频的视频流。 The [0087] transmitting unit via the video link, transmitting a video stream of the video to the first terminal.

[0088]第八方面,本发明提供了一种服务器的一个实施例。 [0088] eighth aspect, the present invention provides a server according to one embodiment.

[0089]在第一种可能的实现方式中,所述服务器包括:连接单元,用于与第一终端建立websocket数据传输通道; [0089] In a first possible implementation, the server comprising: a connection unit for establishing a data transmission channel websocket with the first terminal;

[0090] 获取单元,用于获取与所述服务器建立websocket连接的至少一个第二终端的地址信息; [0090] acquiring unit, configured to obtain address information to establish at least one second terminal connected to said server websocket;

[0091] 发送单元,用于向所述第一终端发送所述与服务器建立websocket连接的至少一个第二终端的地址信息;向所述至少一个第二终端发送所述视频地址信息;所述视频地址信息用于指示所述第一终端当前播放的视频在所述服务器的位置;向所述至少一个第二终端发送所述视频。 [0091] The transmitting unit for transmitting to the first terminal the address information to establish at least one second terminal is connected to the server websocket; at least one second transmitting terminal to the address information of the video; the video video address information of the first terminal indicating the current playback position in the server; transmitting the video to the at least one second terminal.

[0092]接收单元,接收所述第一终端发送的视频地址信息;接收所述至少一个第二终端根据所述视频地址信息获取视频的请求。 [0092] The receiving unit receives address information of the video transmitted from a first terminal; receiving a request for at least one second terminal acquires the video according to the video address information.

[0093]结合第八方面第一种可能的实现方式,在第二种可能的实现方式中,所述接收单元还用于,在接收所述第一终端发送的视频地址信息之前,接收所述第一终端通过所述websocket数据传输通道发送的第八请求,所述第八请求用于请求将所述所述第一终端当前播放的视频的地址信息发送至所述至少一个第二终端;接收所述至少一个第二终端发送的同意所述第四请求的响应消息; [0093] The eighth aspect of binding a first possible implementation manner, in a second possible implementation, the receiving unit is further configured to, prior to receiving the address information of the first video sent by the terminal, receiving the requesting the first terminal through the eighth websocket transmitted data transmission channel, the eighth request for requesting the address information of the first terminal transmits the currently playing video to the at least one second terminal; receiving agree to the fourth message in response to the request sent by the at least one second terminal;

[0094] 所述发送单元还用于,向所述至少一个第二终端发送所述第八请求;向所述第一终端发送所述响应消息。 The [0094] transmitting unit is further for transmitting the at least one second terminal of the eighth to the request; send the response message to the first terminal.

[0095] 结合第八方面第一种或第二种可能的实现方式,在第三种可能的实现方式中,所述发送单元发送的视频地址信息为URL; [0095] The first binding eighth aspect or the second possible implementation manner, in a third possible implementation manner, the transmission unit transmits information of the URL address of the video;

[0096] 所述连接单元还用于,与所述至少一个第二终端建立与所述URL对应的视频链路; [0096] The connection unit is further configured to establish a video link to the URL corresponding to the at least one second terminal;

[0097] 所述发送单元向所述至少一个第二终端发送所述视频具体为: [0097] The transmitting unit transmits to the at least one second terminal is the video specifically:

[0098] 所述发送单元通过所述视频链路,向所述至少一个第二终端发送所述视频的视频流。 [0098] The transmitting unit transmits the video stream of the video to the at least one second terminal via the video link.

[0099] 在本发明提供的实施例中,终端通过与服务器建立websocket数据传输通道获取视频地址信息,所述终端通过浏览器接收媒体流、播放视频,使得终端不再需要安装客户端软件,提高了各设备之间的视频共享效率。 [0099] In an embodiment of the present invention is provided, the terminal obtained by the establishment of a data transmission channel websocket address information of the video server, the terminal receives the media stream through a browser, a video player, so that the terminal no longer need to install the client software, improve the efficiency of video sharing between devices.

附图说明: BRIEF DESCRIPTION OF:

[0100] 为了更清楚地说明本发明实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。 [0100] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings briefly described embodiments or the prior art needed to be used in describing the embodiments. Apparently, the drawings described below are merely present in Some embodiments of the invention, those of ordinary skill in the art is concerned, without creative efforts, can derive from these drawings other drawings.

[0101] 图1是本发明提供的一种多屏视频共享方法一个实施例的流程示意图; [0101] FIG. 1 is a flow diagram of an embodiment of the multi-screen video sharing according to the present invention provides a method embodiment;

[0102] 图2是本发明提供的一种多屏视频共享方法一个实施例的流程示意图; [0102] FIG. 2 is a flow diagram of an embodiment of the multi-screen video sharing according to the present invention provides a method embodiment;

[0103] 图3是本发明提供的一种多屏视频共享方法一个实施例的流程示意图; [0103] FIG. 3 is a flow diagram of a multi-screen video sharing according to the present invention provides a method embodiment;

[0104] 图4是本发明提供的一种多屏视频共享方法一个实施例的流程示意图; [0104] FIG. 4 is a flow diagram of an embodiment of the multi-screen video sharing according to the present invention provides a method embodiment;

[0105] 图5是本发明提供的一种终端的实施例的结构示意图; [0105] FIG. 5 is a block diagram of an embodiment of a terminal provided by the present invention;

[0106] 图6是本发明提供的一种终端的实施例的结构示意图; [0106] FIG. 6 is a block diagram of an embodiment of a terminal provided by the present invention;

[0107]图7是本发明提供的一种服务器的实施例的结构示意图; [0107] FIG. 7 is a schematic structural diagram of an embodiment of the present invention provides a server;

[0108]图8是本发明提供的一种服务器的实施例的结构示意图。 [0108] FIG. 8 is a schematic structural diagram of an embodiment of the present invention provides a server.

具体实施方式: Detailed ways:

[0109] 实施例一 [0109] Example a

[0110] 本发明实施例提供了一种多屏视频共享方法,如图1所示,所述方法包括: [0110] The method illustrated embodiment there is provided a multi-screen video sharing method of the present invention, shown in Figure 1 comprising:

[0111] S101,第一终端与服务器建立网页套接字协议websocket数据传输通道,并获取与所述服务器建立websocket连接的至少一个第二终端的地址信息; [0111] S101, the first terminal and the web server to establish a data transmission channel websocket sockets, and establishing at least one second terminal acquires websocket connection with the server address information;

[0112] 所述第一终端运行浏览器,所述浏览器为支持HTML5的浏览器,如chrome浏览器等。 [0112] The first terminal running a browser, the browser HTML5 supported browser, such as chrome browser like. 所述第一终端通过浏览器与服务器建立websocket连接,建立websocket数据传输通道。 Said first terminal to establish connection websocket browser and the server, to establish a data transmission channel websocket. 所述第一终端通过所述与服务器建立的websocket数据传输通道从所述服务器处获取至少一个第二终端的地址信息。 Said first terminal acquires address information of the at least one second terminal from the server by the server and establishing a data transmission channel websocket. 所述至少一个第二终端同样与所述服务器建立websocket连接, 建立websocket数据传输通道。 Similarly at least one second terminal to establish connection with the server websocket, websocket establishing a data transmission channel. 所述至少一个第二终端的地址信息可以为所述至少一个第二终端的IP地址、主机名等。 Said at least one address information of the second terminal may be at least one IP address, host name, etc. of the second terminal. 所述服务器获取所述第一终端的IP地址、主机名等信息。 The server gets the IP address of the first terminal, the host name and the like.

[0113] S102,所述第一终端通过所述websocket数据传输通道,接收所述至少一个第二终端经由所述服务器发送的视频地址信息;所述视频地址信息用于指示所述至少一个第二终端当前播放的视频在所述服务器上的位置; [0113] S102, the first terminal through the data transmission channel websocket, the receiving video terminal via the at least one second address information sent by the server; the video address information indicating the at least one second terminal position of the currently playing video on the server;

[0114] 具体地,所述至少一个第二终端获取所述第一终端的地址信息。 [0114] In particular, the at least one second terminal acquires address information of the first terminal. 所述至少一个第二终端将当前播放的视频在所述服务器上的地址信息经由所述服务器发送给所述第一终端。 At least one second terminal address information of the video currently playing on the server transmits to the first terminal via the server. 所述至少一个第二终端与所述服务器建立websocket数据传输通道,所述至少一个第二终端可通过与服务器建立的websocket数据传输通道将所述视频信息发送至服务器,由服务器通过该服务器与所述第一终端建立的websocket数据传输通道将所述视频信息发送至第一终端。 At least one second terminal websocket establishing a data transmission channel with the server, the at least one second terminal and the server may be established via a data transmission channel websocket the video information to the server, the server passes the server said first terminal to establish a data transmission channel websocket the video information is transmitted to the first terminal. 所述视频地址信息可以为所述至少一个第二终端当前直播视频的统一资源定位符(Uniform Resource Locator,URL)或者频道号信息;或者,所述视频信息也可以为所述至少一个第二终端将当前点播视频的URL;还可以包括当前视频的播放时间等参数。 The video information may address the at least one uniform resource locator of the second current terminal of the live video (Uniform Resource Locator, URL) or the channel number information; Alternatively, the video information may be the at least one second terminal the current demand video URL; may also include the current video playback time and other parameters.

[0115] S103,所述第一终端根据所述视频地址信息,从所述服务器上获取所述视频。 [0115] S103, the first video terminal according to the address information, acquires the video from the server.

[0116] 所述第一终端获取所述视频地址信息后,从所述服务器上获取所述视频的数据, 并播放所述视频。 After [0116] the first terminal acquires address information of the video, the video data acquired from the server, and playing the video. 所述视频数据可根据HTTP协议传输。 The video data may be transmitted according to the HTTP protocol.

[0117] 在本发明提供的实施例中,终端通过与服务器建立websocket数据传输通道获取视频地址信息,所述终端通过浏览器接收媒体流、播放视频,使得终端不再需要安装客户端软件,提高了各设备之间的视频共享效率。 [0117] In an embodiment of the present invention is provided, the terminal obtained by the establishment of a data transmission channel websocket address information of the video server, the terminal receives the media stream through a browser, a video player, so that the terminal no longer need to install the client software, improve the efficiency of video sharing between devices. 尤其在家庭网络中,终端与服务器建立websocket连接,降低了网络流量,节约了网络资源。 Especially in the home network, terminal and server to establish a connection websocket, reduces network traffic, saving network resources.

[0118] 在本发明实施例的一种实现方式中,所述第一终端与服务器建立websocket数据传输通道通过第一终端发送握手请求与服务器响应所述握手请求实现。 [0118] In one implementation of this embodiment of the present invention, the first terminal and the server to establish a data transmission channel websocket transmitting a handshake request from the handshake with the server in response to the request by the first terminal. 具体地,所述第一终端通过浏览器向所述服务器发送websocket握手请求,所述websocket握手请求可以包括所述第一终端的IP地址、主机名等。 In particular, the first terminal transmits to the server through the browser websocket handshake request, a handshake request websocket may include an IP address of the first terminal, the host name and the like. 所述服务器接收所述第一终端发送的websocket握手请求,获取所述第一终端的IP地址、主机名等。 The server receives the first request sent by the terminal websocket handshake, the first terminal obtains the IP address, host name, and the like. 所述服务器解析所述websocket握手请求并产生握手响应。 The server parses the request and generates handshake websocket handshake response. 所述服务器将所述握手响应发送至所述第一终端,实现成功握手,建立websocket数据传输通道。 The server, the handshake response is sent to the first terminal, a successful handshake, websocket establishing a data transmission channel. 所述服务器发送的握手响应可包含所述服务器获取的与该服务器连接的至少一个第二终端的地址信息,如IP地址、主机名等。 The server sends handshake response address information may comprise at least one server connected to the second terminal of the server acquired IP address, host name and the like. 所述至少一个第二终端与所述服务器建立websocket数据传输通道。 At least one second terminal websocket establishing a data transmission channel with the server. 具体地,第一终端向服务器端发送握手请求,所述握手请求可为特定数据格式。 Specifically, the first terminal transmits the handshake request to the server, it may be in the handshake request specific data format. 所述数据格式可以按照“协议头、字段一、字段分隔符、字段二、字段分隔符…”的格式排列。 The data format can be arranged in "protocol header, a field, the field separator, field two, field separator ..." format. 所述协议头、字段、字段分隔符均为可以显示的ASCII字符。 The protocol header fields, field separators are ASCII characters can be displayed. 所述协议头用于区分各个不同数据包。 The protocol header is used to distinguish between the different packets. 所述字段由字段关键字与数据两个部分组成。 The key field and the data field consists of two parts. 所述握手请求的数据格式的协议头可以是“start”,也可以是“begin”,用于表明本数据格式为握手请求。 The data format of the request Handshake protocol headers may be "start", may be a "begin", this data format is used to indicate that a handshake request. 本发明实施例中的字段可以有两种形式:其一为第一终端的设备名称“name”,若所述终端设备没有名称,则没有此字段。 The embodiments of the present invention field can have two forms: one for the first terminal device name "name", if the terminal device has no name, the field is absent. 其二为设备类型“device”,如“PC”,“Pad”, “Phone”,“IPClient” “MediaServer”等。 Second, the device type "device", as "PC", "Pad", "Phone", "IPClient" "MediaServer" and so on. 所述握手请求的数据格式的字段用字段分隔符加以区分。 The format of the handshake request data field delimiter used to distinguish field. 所述第一终端将包含所述协议头和所述字段的握手请求发送至服务器,请求与服务器建立websocket连接。 The first handshake terminal comprising said protocol header fields and the request to the server, requesting to establish connection with the server websocket. 所述服务器接收所述第一终端的握手请求,解析所述握手请求的数据格式后,向所述终端发送针对所述握手请求的响应消息。 The server receives the first terminal of the handshake request, parses the data format of the handshake request, transmits a response message in the handshake request to the terminal. 所述响应消息为特定数据格式,所述数据格式可以按照“协议头、字段一、字段分隔符、字段二、字段分隔符…”的格式排列。 Arranging the response message format specific data format, the data format according to "protocol header, a field, the field separator, field two, field separator ..." in. 所述响应消息数据格式的协议头可以是“list”,标明登录到服务器端的所有设备名称列表。 Protocol header format of the data response message may be a "list", a list indicating all the devices log in to the server names. 所述响应消息数据格式的协议头可以是“NtDm”,标明登录到服务器端的所有设备名、 IP、h〇Stname。 Protocol header format of the response message data may be "NtDm", to indicate that all log server device name, IP, h〇Stname. 所述“list”或“NtDm”协议头用于表示本数据格式的消息是对所述第一终端握手请求的响应消息。 The "list" or "NtDm" is used to indicate the protocol header format of this data message is a response message to the first terminal of the handshake request. 所述第一终端接收服务器发送的响应消息,与所述服务器建立websocket连接。 The first terminal receives a response message sent by the server to establish connection with the server websocket. 通过所述websocket数据传输通道传输相关数据,节约了网络资源。 Transmitting said data via data transmission channel websocket, saving network resources.

[0119] 在本发明实施例的一种实现方式中,在所述第一终端接收所述至少一个第二终端经由所述服务器发送的视频地址信息之前,所述第一终端可根据所述至少一个第二终端的地址信息,通过所述websocket数据传输通道,经由所述服务器向所述第二终端发送第一请求,以请求所述第二终端将当前播放的视频的地址信息发送到所述第一终端;所述第一终端接收所述至少一个第二终端经由所述服务器发送的同意所述第一请求的响应消息。 Before [0119] In one implementation of this embodiment of the present invention, the first terminal receiving said at least one second terminal via the video server sends the address information of the first terminal according to at least address information of a second terminal, a first request transmitted by said data transmission channel websocket via the server to the second terminal, requesting the second terminal to the transmitting address information of the currently playing video to the a first terminal; a first terminal receiving the consent of the at least one second terminal via the server transmits the response message to the first request.

[0120] 具体地,所述第一终端通过与所述服务器建立的websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送将所述至少一个第二终端当前播放的视频推送到所述第一终端的请求,即所述第一终端向所述至少一个第二终端拉取所述至少一个第二终端当前播放视频的请求。 [0120] Specifically, the first terminal and the server via the established websocket data transmission channel, the at least one second terminal transmitting to the said server via the at least one second terminal currently playing video pushed request for the first terminal, i.e., the pulling of the first terminal to the second terminal at least one request for at least one second terminal is currently playing video. 所述第一终端将所述第一请求先通过websocket数据传输通道发送至服务器,由服务器通过该服务器与所述至少一个第二终端建立的websocket数据传输通道将第一请求发送至至少一个第二终端。 The first terminal transmits the first request to the first server via the data transmission channel websocket, established by the server through the server with the at least one second terminal websocket data transmission channel transmits a first request to the at least one second terminal. 所述请求的数据格式的协议头可以是“push”, 用于表明本数据格式的第一请求是请求所述至少一个第二终端将当前播放的视频推送到所述第一终端。 Protocol header data format of the request may be a "push", indicating a first request from the request of the data format is at least one second terminal currently playing video pushed to the first terminal. 所述第一请求的字段可以包括四部分,其一,字段“dest”,表示目标设备名称,即第一终端;其二,字段“data”,用于表示视频信息,例如视频流id或者视频的URL;其三,字段“type”,用于表示所述视频是直播还是录播;其四,字段“device”,用于表示设备类型,例如“device”,如“PC”,“Pad”,“Phone”,“IP Client” “MediaServer”等。 The first request field may comprise four parts, one, the field "dest", represents the name of the target device, i.e., a first terminal; Second, the field "data", for video information, such as video streaming or video id of the URL; thirdly, field "type", is used to indicate a live or taped video; Fourth, the field "device", a device type indicates, for example, "device", such as "PC", "Pad" , "Phone", "IP Client" "MediaServer" and so on. 具体地,所述至少一个第二终端对所述第一终端发送的第一请求的回应消息的数据格式的协议头可以是“recv”,用于表示本数据格式的消息是对所述第一请求的回应。 In particular, the protocol header format of the data response to the first request message, the at least one second terminal to the first terminal may be sent "recv", used to indicate this is a data format of the first message to respond to the request. 所述回应消息的数据格式的字段可包括两部分,其一,字段“data”,用于表示视频流的id或者所述视频的URL;其二, 字段“type”,用于表示所述视频是直播还是录播。 The response data format of the message field may include two parts, one, the field "data", for indicating URL id or video stream of the video; Second, a field "type", for representing the video It is live or taped.

[0121] 所述至少一个第二终端接收所述第一请求后,经由所述服务器向所述第一终端发送同意所述第一请求的响应消息。 [0121] The at least one second terminal after receiving the first request, sending the first request message in response to agree to the first terminal via the server.

[0122] 在本发明实施例的一种实现方式中,所述第一终端接收的视频地址信息为统一资源定位符(Uniform Resource L〇cat〇r,URL),所述第一终端根据所述URL与所述服务器建立视频链路,接收所述服务器发送的所述视频的视频流。 [0122] In one implementation of this embodiment of the present invention, the address information of the first video terminal for receiving a uniform resource locator (Uniform Resource L〇cat〇r, the URL), the first terminal according to the URL establishing a video link with the server, receiving the video stream of the video sent by the server. 具体地,所述第一终端获取所述URL后,根据所述URL向所述服务器发送视频数据请求。 Specifically, the first rear terminal acquires the URL of the, video data transmission request to the server according to the URL. 所述第一终端与服务器建立视频链路,所述服务器将所述URL对应的视频的视频流发送至所述第一终端,所述第一终端接收所述服务器发送的所述视频的视频流。 The first terminal establishing a video link with the server, the server, the video stream corresponding to the URL is transmitted to the first video terminal, the first terminal receiving the video stream of the video sent by the server . 所述视频流可以为传输流(Transport Stream,TS)。 The video stream may be a transport stream (Transport Stream, TS). 所述视频流可以通过HTTP协议发送。 The video stream can be transmitted over the HTTP protocol. 所述第一终端接收所述视频流后,播放所述视频流对应的视频。 After the terminal receives the first video stream, the video stream corresponding to play video.

[0123] 在本发明实施例的上述实现方式中,在所述第一终端完成所述视频的播放后,所述方法还包括:所述第一终端关闭与所述服务器的websocket数据传输通道。 After [0123] In the implementation of this embodiment of the present invention, the first terminal of the video has finished playing, the method further comprising: closing the first terminal to the server websocket data transmission channel.

[0124] 实施例二 [0124] Second Embodiment

[0125] 本发明实施例提供了一种多屏视频共享方法,如图2所示,所述方法包括: [0125] The method illustrated embodiment there is provided a multi-screen video sharing method of the present invention, shown in Figure 2 comprising:

[0126] S201,第一终端通过浏览器与服务器建立websocket数据传输通道,获取与所述服务器建立websocket连接的至少一个第二终端的地址信息; [0126] S201, the first terminal establishes a data transmission channel websocket browser and server for establishing at least one second terminal is connected with the websocket server address information;

[0127] S202,所述第一终端通过所述websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送视频地址信息;所述视频地址信息用于指示所述第一终端当前播放的视频在所述服务器的位置。 [0127] S202, the first terminal through the data transmission channel websocket transmits video information to address said at least one second terminal via the server; the first terminal is currently playing video address information indicating the the position of the video server.

[0128] 具体地,所述第一终端获取所述至少一个第二终端的地址信息。 [0128] Specifically, the first terminal obtains the address information of the at least one second terminal. 所述第一终端可通过与服务器建立的websocket数据传输通道将所述视频地址信息发送至服务器,由服务器通过该服务器与所述至少一个第二终端建立的websocket数据传输通道将所述视频信息发送至至少一个第二终端。 The first terminal and the server may be established via a data transmission channel websocket the video address information to the server, the server establishes the server via the at least one second terminal websocket data transmission channel the transmitted video information at least one second terminal. 所述视频地址信息可以为所述至少一个第二终端当前直播视频的URL或者频道号信息;或者,所述视频信息也可以为所述至少一个第二终端将当前点播视频的URL;还可以包括当前视频的播放时间等参数。 The video information may be the address of the at least one second terminal of the current channel number or a URL of a live video information; or, the video information may be at least one second terminal to the URL of the current demand video; may further comprise the current video playback time and other parameters.

[0129] 在本发明提供的实施例中,终端通过与服务器建立websocket数据传输通道获取视频地址信息,所述终端通过浏览器接收媒体流、播放视频,使得终端不再需要安装客户端软件,提高了各设备之间的视频共享效率。 [0129] In an embodiment of the present invention is provided, the terminal obtained by the establishment of a data transmission channel websocket address information of the video server, the terminal receives the media stream through a browser, a video player, so that the terminal no longer need to install the client software, improve the efficiency of video sharing between devices. 尤其在家庭网络中,终端与服务器建立websocket连接,降低了网络流量,节约了网络资源。 Especially in the home network, terminal and server to establish a connection websocket, reduces network traffic, saving network resources.

[0130] 在本发明实施例的一种实现方式中,所述第一终端与服务器建立websocket数据传输通道通过第一终端发送握手请求与服务器响应所述握手请求实现。 [0130] In one implementation of this embodiment of the present invention, the first terminal and the server to establish a data transmission channel websocket transmitting a handshake request from the handshake with the server in response to the request by the first terminal. 具体地,所述第一终端通过浏览器向所述服务器发送websocket握手请求,所述websocket握手请求可以包括所述第一终端的IP地址、主机名等。 In particular, the first terminal transmits to the server through the browser websocket handshake request, a handshake request websocket may include an IP address of the first terminal, the host name and the like. 所述服务器接收所述第一终端发送的websocket握手请求,获取所述第一终端的IP地址、主机名等。 The server receives the first request sent by the terminal websocket handshake, the first terminal obtains the IP address, host name, and the like. 所述服务器解析所述websocket握手请求并产生握手响应。 The server parses the request and generates handshake websocket handshake response. 所述服务器将所述握手响应发送至所述第一终端,实现成功握手,建立websocket数据传输通道。 The server, the handshake response is sent to the first terminal, a successful handshake, websocket establishing a data transmission channel. 所述服务器发送的握手响应可包含所述服务器获取的与该服务器连接的至少一个第二终端的地址信息,如IP地址、主机名等。 The server sends handshake response address information may comprise at least one server connected to the second terminal of the server acquired IP address, host name and the like. 所述至少一个第二终端与所述服务器建立websocket数据传输通道。 At least one second terminal websocket establishing a data transmission channel with the server.

[0131] 在本发明实施例的一种实现方式中,在所述第一终端通过所述websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送视频地址信息之前,所述第一终端根据所述至少一个第二终端的地址信息,通过所述websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送第二请求,以请求将所述第一终端将当前播放的视频的地址信息发送到所述至少一个第二终端;所述第一终端接收所述至少一个第二终端发送的同意所述第二请求的响应消息。 Before [0131] In one implementation of this embodiment of the present invention, the first terminal through the data transmission channel websocket transmits video information to address said at least one second terminal via the server, the first a terminal according to the address information of the at least one second terminal through the data transmission channel websocket, via said at least one second server transmits a second request to the terminal, to request that the first terminal currently playing address information of the video to the at least one second terminal; a first response message to the terminal receiving the consent of the at least one second terminal transmits the second request. 具体地,所述第一终端通过与所述服务器建立的websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送将所述第一终端当前播放的视频推送到所述至少一个第二终端的请求,即所述第一终端向所述至少一个第二终端推送所述第一终端当前播放视频的请求。 In particular, the first terminal and the server via the established websocket data transmission channel, the at least one second transmitting terminal to the first terminal of the currently playing video pushed to the server via the at least one first two terminal request, i.e. the first terminal to the second terminal at least a request to push the currently playing video to the first terminal. 所述第一终端通过websocket数据传输通道将所述请求发送至服务器,由服务器通过该服务器与所述至少一个第二终端建立的websocket数据传输通道将所述请求发送所述至至少一个第二终端。 The first terminal through the data transmission channel websocket transmit the request to the server, the server establishes the server via the at least one second terminal websocket data transmission channel sending the request to the at least one second terminal . 所述请求的数据格式的协议头可以是“pull”,用于表明本数据格式的第一请求是请求将所述第一终端将当前播放的视频推送到所述至少一个第二终端。 Protocol header data format of the request may be a "pull", indicating a first request from the data format of the first terminal is a request currently playing video push the at least one second terminal. 所述视频拉请求的字段可以包括两部分:其一,字段“souce”,表示第一终端名称;其二,字段“device”,用于表示设备类型,例如“device”,如“PC”,“Pad”, “Phone”,“IP Client” “MediaServer”等。 The video pull request field may include two parts: First, the field "souce", represents the name of a first terminal; Second, the field "device", a device type indicates, for example, "device", such as "PC", "Pad", "Phone", "IP Client" "MediaServer" and so on. 所述至少一个第二终端对所述第一请求的响应消息的数据格式的协议头可以是“send”,用于表不本数据格式的消息是对所述第一请求的响应消息。 The data format of the at least one protocol header of the response message a second terminal to the first request may be a "send", a table format of the message data is not present in response to the first request message. 所述响应消息的数据隔格式的字段包括两部分,其一,字段“souce”,表示源设备名称,即所述第一终端的相关信息;其二,字段“device”,用于表示设备类型,例如“device”, 如“PC”,“Pad”,“Phone”,“IP Client” “MediaServer”。 The data field format response message separator comprises two parts, one, the field "souce", represents the name of the source device, i.e., information about the first terminal; Second, the field "device", a device type indicates , such as "device", as "PC", "Pad", "Phone", "IP Client" "MediaServer".

[0132] 在本发明实施例的上述实现方式中,在所述第一终端完成所述视频信息的发送后,所述方法还包括:所述第一终端关闭与所述服务器建立的websocket数据传输通道。 After [0132] In the implementation of this embodiment of the present invention, the first terminal completes transmitting the video information, the method further comprising: closing the first terminal to establish a data transmission websocket with the server aisle.

[0133] 实施例三 [0133] Example three

[0134] 本发明实施例提供了一种多屏视频共享方法,如图3所示,所述方法包括: [0134] The method illustrated embodiment there is provided a multi-screen video sharing method of the present invention, shown in Figure 3 comprising:

[0135] S3〇l,服务器与第一终端建立websocket数据传输通道,并向所述第一终端发送与所述服务器建立websocket连接的至少一个第二终端的地址信息; [0135] S3〇l, websocket server and the first terminal to establish a data transmission channel, and the first terminal transmits the address information to establish at least one second terminal connected to said server websocket;

[0136] 具体地,所述服务器与所述第一终端建立websocket连接,建立websocket数据传输通道。 [0136] In particular, the server and the first terminal establishes websocket connection establishment websocket data transmission channel. 所述服务器与所述至少一个第二终端建立websocket连接,建立websocket数据传输通道。 The server and the at least one second terminal establishes a connection websocket, websocket establishing a data transmission channel. 所述服务器将所述至少一个第二终端的地址信息通过所述与第一终端建立的websocket数据传输通道发送至所述第一终端。 Said at least one second server, the address information transmitting terminal to the first terminal through the established with the first terminal websocket data transmission channel. 所述至少一个第二终端的地址信息可以为所述至少一个第二终端的IP地址、主机名等。 Said at least one address information of the second terminal may be at least one IP address, host name, etc. of the second terminal.

[0137] S302,所述服务器接收所述至少一个第二终端发送的视频地址信息,并向所述第一终端发送视频地址信息;所述视频地址信息用于指示所述至少一个第二终端当前播放的视频在所述服务器的位置; [0137] S302, the server receives the address information of the at least one second video transmitting terminal, and sends the address information of the first video terminal; said video address information indicating the at least one second terminal is currently video playback position in the server;

[0138]具体地,所述服务器接收所述至少一个第二终端通过所述websocket数据传输通道发送的视频地址信息,并将所述视频地址信息通过该服务器与所述第一终端建立的websocket数据传输通道发送至所述第一终端。 [0138] Specifically, the server receives the at least one second terminal by the address information of the video data transmission channel transmitted websocket, websocket video data and the address information established by the server and the first terminal a first transmission channel is transmitted to the terminal. 所述第一终端获取所述视频地址信息。 Said first terminal acquires address information of the video. 所述视频地址信息可以为所述至少一个第二终端当前直播视频的URL或者频道号信息;或者,所述视频信息也可以为所述至少一个第二终端将当前点播视频的URL;还可以包括当前视频的播放时间等参数。 The video information may be the address of the at least one second terminal of the current channel number or a URL of a live video information; or, the video information may be at least one second terminal to the URL of the current demand video; may further comprise the current video playback time and other parameters.

[0139] S3〇3,所述服务器接收所述第一终端根据所述视频地址信息获取视频的请求,向所述第一终端发送所述视频。 [0139] S3〇3, the server receives the first terminal of a video acquisition request according to the video address information, transmitting the video to the first terminal.

[0140] 所述第一终端获取所述视频地址信息后,根据所述视频地址信息向服务器发送数据请求,请求获取所述视频地址信息对应的视频数据。 After [0140] the first video terminal to acquire the address information, sends a data request to the server according to the video address information, acquires the video data of the requested address information corresponding to the video. 所述服务器接收所述请求后,可向所述第一终端发送数据流。 After the server receives the request, it may send a data stream to the first terminal. 所述视频流可以为传输流。 The video stream may be a transport stream. 所述视频流可以通过HTTP协议发送。 The video stream can be transmitted over the HTTP protocol.

[0141] 在本发明提供的实施例中,终端通过与服务器建立websocket数据传输通道获取视频地址信息,所述终端通过浏览器接收媒体流、播放视频,使得终端不再需要安装客户端软件,提高了各设备之间的视频共享效率。 [0141] In an embodiment of the present invention is provided, the terminal obtained by the establishment of a data transmission channel websocket address information of the video server, the terminal receives the media stream through a browser, a video player, so that the terminal no longer need to install the client software, improve the efficiency of video sharing between devices. 尤其在家庭网络中,终端与服务器建立websocket连接,降低了网络流量,节约了网络资源。 Especially in the home network, terminal and server to establish a connection websocket, reduces network traffic, saving network resources.

[0142] 在本发明实施例的一种实现方式中,所述服务器与所述第一终端建立websocket 数据传输通道通过第一终端发送握手请求与服务器响应所述握手请求实现。 [0142] In one implementation of this embodiment of the present invention, the server and the first terminal to establish a data transmission channel websocket transmitting a handshake request from the handshake with the server in response to the request by the first terminal. 所述服务器接收所述第一终端发送的websocket握手请求;所述服务器向所述第一终端发送握手响应;所述握手响应为所述服务器对所述第一终端发送的对所述websocket握手请求的响应。 The server receives the first terminal transmits the handshake request websocket; handshake response sent by the server to the first terminal; a handshake response to the handshake request to the server to the first terminal websocket transmitted the response to. 所述第一终端接收所述握手响应,实现成功握手,建立websocket数据传输通道。 The first terminal receiving the handshake response, a successful handshake, websocket establishing a data transmission channel.

[0143] 在本发明实施例的一种实现方式中,在所述服务器接收所述至少一个第二终端发送的视频地址信息之前,所述服务器接收所述第一终端通过所述websocket数据传输通道发送的第三请求,并向所述至少一个第二终端发送所述第三请求;所述第三请求用于请求所述至少一个第二终端将当前播放的视频的地址信息发送到所述第一终端;所述服务器接收所述至少一个第二终端发送的同意所述第三请求的响应消息,并向所述第一终端发送所述响应消息。 [0143] In one implementation of this embodiment of the present invention, prior to receiving the video information of at least one second terminal address transmitted from the server, the server receives the first terminal through the data transmission channel websocket sending a third request, and to transmit at least one second terminal to the third request; a third request for requesting the second terminal to the at least one transmitting address information of the currently playing video to the first a terminal; said at least one second server receives the response message sent by the terminal agreed to the third request, and sends the response message to the first terminal. 具体地,所述第一终端获取与所述服务器连接的至少一个第二终端的地址信息后,所述第一终端通过与所述服务器建立的websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送将所述第一终端当前播放的视频推送到所述至少一个第二终端的请求,即所述第一终端向所述至少一个第二终端推送所述第一终端当前播放视频的请求。 Specifically, after obtaining the address information of the first terminal at least one second terminal is connected to the server, the first terminal and the server via the established websocket data transmission channel to said server via said at least a second transmitting terminal to the first terminal of the currently playing video push the at least one request of the second terminal, i.e. the first terminal to the second terminal at least one push a first terminal of the current video playing requests. 所述服务器接收所述第一终端通过第一终端与服务器建立的websocket数据传输通道发送的请求,并将所述请求通过所述至少一个第二终端与服务器建立的websocket数据传输通道发送至所述至少一个第二终端。 The server receives the first terminal and the server by requesting the first terminal to establish a data transmission channel websocket transmitted, and the at least one second terminal and the request made to the server via the data transmission channel websocket sent to the the at least one second terminal. 所述至少一个第二终端获取所述请求后,向所述第一终端发送对所述请求的响应消息。 After acquiring at least one second terminal the request, it sends a response to the request message to the first terminal. 所述服务器接收所述至少一个第二终端通过该终端与服务器建立的websocket数据传输通道发送的响应消息,并将所述响应消息通过所述第一终端与服务器建立的websocket数据传输通道发送至所述第一终端。 Said at least one second server receives the response message to the terminal through a terminal and the server to establish the data transmission channel websocket transmission, and the response message by the first terminal and the server to establish a data transmission channel websocket sent to the said first terminal.

[0144] 在本发明实施例的一种实现方式中,所述视频地址信息为统一资源定位符(URL); 所述服务器接收所述第一终端根据所述视频地址信息获取视频的请求,与所述第一终端建立与所述URL对应的视频链路,向所述第一终端发送所述视频的视频流。 [0144] In one implementation of this embodiment of the present invention, the video information address to a Uniform Resource Locator (the URL); the server receives the first terminal of a video acquisition request according to the video address information, and the first terminal establishing a video corresponding to the URL link, transmitting a video stream of the video to the first terminal.

[0145] 实施例四 [0145] Fourth Embodiment

[0146]本发明实施例提供了一种多屏视频共享方法,如图4所示,所述方法包括: [0146] The method illustrated embodiment there is provided a multi-screen video sharing method of the present invention, as shown in FIG 4 comprising:

[0147] S401,服务器与第一终端建立websocket数据传输通道,并向所述第一终端发送与所述服务器建立websocket连接的至少一个第二终端的地址信息; [0147] S401, the server and the first terminal websocket establish a data transmission channel, and the first terminal transmits the address information to establish at least one second terminal connected to said server websocket;

[0148] S4〇2,所述服务器接收所述第一终端发送的视频地址信息,并向所述至少一个第二终端发送所述视频地址信息;所述视频地址信息用于指示所述第一终端当前播放的视频在所述服务器的位置; [0148] S4〇2, the server receives the first terminal transmits the address information of the video, and transmitting the at least one second terminal address information of the video; the video address information indicating the first terminal currently playing position in the video server;

[0149] 具体地,所述服务器接收所述第一终端通过所述websocket数据传输通道发送的视频地址信息,并将所述视频地址信息通过该服务器与所述至少一个第二终端建立的websocket数据传输通道发送至所述至少一个第二终端。 [0149] Specifically, the server receives the first address information of the terminal through the video transmission channel data transmitted websocket, websocket video data and the address information of the server is established through said at least one second terminal send the transmission channel to the at least one second terminal. 所述至少一个第二终端获取所述视频地址信息。 At least one second terminal acquires address information of the video. 所述视频地址信息可以为所述第一终端当前直播视频的URL或者频道号信息;或者,所述视频信息也可以为所述第一终端将当前点播视频的URL;还可以包括当前视频的播放时间等参数。 The video information may be the address of the first terminal of the current channel number or a URL of a live video information; or, the information may be video on demand current URL as the first video terminal; may further include playing the current video time and other parameters.

[0150] S403,所述服务器接收所述至少一个第二终端根据所述视频地址信息获取视频的请求,向所述至少一个第二终端发送所述视频。 [0150] S403, the server receives the request for acquiring the at least one second terminal of the video according to the video address information to send the video to the at least one second terminal.

[0151]所述至少一个第二终端获取所述视频地址信息后,根据所述视频地址信息向服务器发送数据请求,请求获取所述视频地址信息对应的视频数据。 After [0151] the at least one second terminal acquires address information of the video, sends a data request to the server according to the video address information, acquires the video data of the requested address information corresponding to the video. 所述服务器接收所述请求后,可向所述至少一个第二终端发送数据流。 After the server receives the request, it may send a data stream to the at least one second terminal. 所述视频流可以为传输流。 The video stream may be a transport stream. 所述视频流可以通过HTTP协议发送。 The video stream can be transmitted over the HTTP protocol.

[0152]在本发明提供的实施例中,终端通过与服务器建立websocket数据传输通道获取视频地址信息,所述终端通过浏览器接收媒体流、播放视频,使得终端不再需要安装客户端软件,提高了各设备之间的视频共享效率。 [0152] In an embodiment of the present invention is provided, the terminal obtained by the establishment of a data transmission channel websocket address information of the video server, the terminal receives the media stream through a browser, a video player, so that the terminal no longer need to install the client software, improve the efficiency of video sharing between devices. 尤其在家庭网络中,终端与服务器建立websocket连接,降低了网络流量,节约了网络资源。 Especially in the home network, terminal and server to establish a connection websocket, reduces network traffic, saving network resources.

[0153]在本发明实施例的一种实现方式中,所述服务器与所述第一终端建立websocket 数据传输通道通过第一终端发送握手请求与服务器响应所述握手请求实现。 [0153] In one implementation of this embodiment of the present invention, the server and the first terminal to establish a data transmission channel websocket transmitting a handshake request from the handshake with the server in response to the request by the first terminal. 所述服务器接收所述第一终端发送的websocket握手请求;所述服务器向所述第一终端发送握手响应;所述握手响应为所述服务器对所述第一终端发送的对所述websocket握手请求的响应。 The server receives the first terminal transmits the handshake request websocket; handshake response sent by the server to the first terminal; a handshake response to the handshake request to the server to the first terminal websocket transmitted the response to. 所述第一终端接收所述握手响应,实现成功握手,建立websocket数据传输通道。 The first terminal receiving the handshake response, a successful handshake, websocket establishing a data transmission channel.

[0154]在本发明实施例的一种实现方式中,在所述服务器接收所述第一终端发送的视频地址信息之前,所述服务器接收所述第一终端通过所述websocket数据传输通道发送的第四请求,并向所述至少一个第二终端发送所述第四请求;所述第四请求用于请求将所述所述第一终端当前播放的视频的地址信息发送至所述至少一个第二终端;所述服务器接收所述至少一个第二终端发送的同意所述第四请求的响应消息,并向所述第一终端发送所述响应消息。 [0154] In one implementation of this embodiment of the present invention, prior to receiving the address information of the first video terminal transmitting at the server, the server receives the first terminal through the data transmission channel transmitted websocket a fourth request, and the at least one second terminal sends a request to the fourth; the fourth request for requesting the address information of the first terminal is currently playing video transmitted to the at least one first second terminal; said at least one second server receives the response message sent by the terminal agrees to the fourth request to the first terminal transmits the response message. 具体地,所述第一终端获取与所述服务器连接的至少一个第二终端的地址信息后, 所述第一终端通过与所述服务器建立的websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送将所述至少一个第二终端当前播放的视频推送到所述第一终端的请求,即所述第一终端向所述至少一个第二终端拉取所述至少一个第二终端当前播放视频的请求。 Specifically, after obtaining the address information of the first terminal at least one second terminal is connected to the server, the first terminal and the server via the established websocket data transmission channel to said server via said at least a second terminal sends a request to the at least one second terminal currently playing video to the first terminal is pushed, i.e., the first terminal at least one second terminal to pull the at least one second terminal request the video is currently playing. 所述服务器接收所述弟一终端通过第一'终端与服务器建立的websocket数据传输通道发送的第一请求,并将所述第一请求通过所述至少一个第二终端与服务器建立的websocket数据传输通道发送至所述至少一个第二终端。 The server receives the first request brother by a terminal establishes a first 'terminal and the server websocket data transmission channel from the transmitter and the first data transfer request websocket at least one second terminal and the server through the established transmission channel to the at least one second terminal. 所述至少一个第二终端获取所述请求后,向所述第一终端发送对所述请求的响应消息。 After acquiring at least one second terminal the request, it sends a response to the request message to the first terminal. 所述服务器接收所述至少一个第二终端通过该终端与服务器建立的websocket数据传输通道发送的响应消息,并将所述响应消息通过所述第一终端与服务器建立的websocket数据传输通道发送至所述第一终端。 Said at least one second server receives the response message to the terminal through a terminal and the server to establish the data transmission channel websocket transmission, and the response message by the first terminal and the server to establish a data transmission channel websocket sent to the said first terminal. [0155]在本发明实施例的一种实现方式中,所述视频地址信息为统一资源定位符(URL); 所述服务器接收所述至少一个第二终端根据所述视频地址信息获取视频的请求,与所述至少一个第二终端建立与所述URL对应的视频链路,向所述至少一个第二终端发送所述视频的视频流。 [0155] In one implementation of this embodiment of the present invention, the video information address to a Uniform Resource Locator (the URL); said at least one second server receives the request for acquiring a video terminal according to the address information of video establishment and video corresponding to the URL link with the at least one second terminal, transmits the video to the at least one second terminal of the video stream.

[0156] 实施例五 [0156] Embodiment V

[0157] 如图5所示,本发明实施例提供了一种终端,所述终端包括: [0157] 5, the embodiment of the present invention provides a terminal, said terminal comprising:

[0158] 连接单元502,用于与服务器建立websocket数据传输通道;所述连接单元通过浏览器与服务器建立websocket连接,建立websocket数据传输通道。 [0158] connecting means 502, for establishing a data transmission channel to the server websocket; websocket establishing the connection means is connected to establish a data transmission channel websocket browser and the server.

[0159] 获取单元503,用于获取与所述服务器建立websocket连接的至少一个第二终端的地址信息;根据视频地址信息,从所述服务器上获取视频•, [0159] acquiring unit 503 for acquiring the address information to establish at least one second terminal is connected with the server websocket;, • acquiring the video from the video server according to the address information,

[0160] 在所述连接单元与所述服务器建立websocket数据传输通道后,所述获取单兀通过所述websocket数据传输通道,从所述服务器获取与所述服务器建立websocket连接的至少一个第二终端的地址信息。 After [0160] websocket establishing a data transmission channel to the server the connection unit, the acquisition unit via said Wu websocket data transmission channel, obtaining the at least one second terminal websocket establishing connection with the server from the server the address information. 所述至少一个第二终端与所述服务器建立websocket连接。 At least one second terminal establishes a connection with the server websocket. 所述至少一个第二终端的地址信息可以为所述至少一个第二终端的IP地址、主机名等。 Said at least one address information of the second terminal may be at least one IP address, host name, etc. of the second terminal.

[0161] 接收单元505,用于通过所述websocket数据传输通道,接收所述至少一个第二终端经由所述服务器发送的视频地址信息;所述视频地址信息用于指示所述至少一个第二终端当前播放的视频在所述服务器上的位置。 [0161] The receiving unit 505, through the websocket for data transmission channel, receiving the at least one second terminal via the video server sends the address information; address information for indicating the video of the at least one second terminal current playback position on the video server. 在所述至少一个第二终端获取所述第一终端的地址信息后,所述至少一个第二终端将当前播放的视频的视频地址信息经由所述服务器推送给所述第一终端,所述接收单元接收所述至少一个第二终端经由所述服务器推送的所述视频地址信息。 After at least one second terminal acquires address information of the first terminal in said at least one second terminal address information of the currently playing video via the video server pushes the first terminal, the receiving means for receiving the at least one address information of the second video terminal via the push server. 所述至少一个第二终端可通过与所述服务器建立的websocket数据传输通道,经由所述服务器向所述第一终端推送所述视频的信息。 At least one second terminal can be established with the server through the data transmission channel websocket, push information of the video to the first terminal via the server.

[0162] 在所述接收单元505接收所述视频地址信息后,所述获取单元5〇3还用于,根据视频地址信息,从所述服务器获取视频。 [0162] After the video receiving unit 505 receives the address information, the obtaining unit further 5〇3 for acquiring video from the video server according to the address information.

[0163] 所述终端还包括通信总线501,用于连接所述连接单元5〇2、信息获取单元503、接收单元505。 [0163] The terminal further includes a communication bus 501, for connecting the connection unit 5〇2, the information acquisition unit 503, the receiving unit 505.

[0164] 在本发明提供的实施例中,终端通过与服务器建立websocket数据传输通道获取视频地址信息,所述终端通过浏览器接收媒体流、播放视频,使得终端不再需要安装客户端软件,提高了各设备之间的视频共享效率。 [0164] In an embodiment of the present invention is provided, the terminal obtained by the establishment of a data transmission channel websocket address information of the video server, the terminal receives the media stream through a browser, a video player, so that the terminal no longer need to install the client software, improve the efficiency of video sharing between devices. 尤其在家庭网络中,终端与服务器建立websocket连接,降低了网络流量,节约了网络资源。 Especially in the home network, terminal and server to establish a connection websocket, reduces network traffic, saving network resources.

[0165] 在本发明实施例的一种实现方式中,所述终端还包括发送单元504,用于在所述接收单元接收视频地址信息之前,根据所述地址信息,通过所述websocket数据传输通道,经由所述服务器向所述第二终端发送第五请求,以请求所述第二终端将当前播放的视频的地址信息发送到所述第一终端;所述接收单元505还用于,接收所述至少一个第二终端发送的同意所述第五请求的响应消息。 [0165] In one implementation of this embodiment of the present invention, the terminal further comprises a transmitting unit 504 for the video before the receiving unit receives address information from the address information, via the data transmission channel websocket , sent via the server to the second terminal fifth request, requesting the second terminal to the transmitting address information of the currently playing video to the first terminal; the receiving unit 505 is further configured to receive the said at least one second terminal sends a fifth response message agrees to the request. 在所述获取单元获取与所述服务器连接的至少一个第二终端的地址信息后,所述发送单元通过与所述服务器建立的websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送将所述至少一个第二终端当前播放的视频拉取到所述第一终端的请求。 After obtaining the address information in the at least one second terminal acquires said server unit connected to the sending unit to the server via the established websocket data transmission channel, via the server to the at least one second terminal transmitting the at least one second terminal currently playing video pulling request to the first terminal. 所述至少一个第二终端接收所述请求后,可通过与所述服务器建立的websocket数据传输通道经由所述服务器向所述第一终端发送同意所述请求的响应消息。 At least one second terminal, after receiving the request, the server sends a response message to the request for consent to the first terminal via the server via the established websocket said data transmission channel.

[0166] 在本发明实施例的一种实现方式中,所述接收单元接收的视频地址信息为URL;所述连接单元还用于,根据所述URL与所述服务器建立视频链路;所述获取单元根据视频地址信息,从所述服务器获取视频具体为:所述获取单元根据所述视频链路,获取所述服务器发送的所述视频的视频流。 [0166] In one implementation of this embodiment of the present invention, the receiving unit receives the video URL address information; and the further connecting unit for establishing a video link with the server according to the URL; the the video address information obtaining unit, obtaining from the specific video server: the acquisition unit based on the video link, acquiring a video stream of the video sent by the server. 所述视频流可以为传输流(Transport Stream,TS)。 The video stream may be a transport stream (Transport Stream, TS). 所述视频流可以通过HTTP协议发送。 The video stream can be transmitted over the HTTP protocol. 所述接收单元接收所述视频流后,所述第一终端播放所述视频流对应的视频。 After the receiving unit receives the video stream, the first play of the video stream corresponding to the video terminal.

[0167] 在本发明实施例的一种实现方式中,所述连接单元还用于,在所述获取单元获取视频后,关闭与所述服务器建立的websocket数据传输通道。 [0167] In one implementation of this embodiment of the present invention, the connecting unit is further configured to, after the acquisition unit acquires video, the server closes the websocket established data transmission channel.

[0168] 实施例六 [0168] Sixth Embodiment

[0169] 如图6所示,本发明实施例提供了一种终端,所述终端包括: [0169] shown in Figure 6, embodiments of the present invention provides a terminal, said terminal comprising:

[0170] 连接单元602,用于与服务器建立websocket数据传输通道; [0170] a connection unit 602 for establishing a data transmission channel with the server websocket;

[0171] 获取单元603,用于获取与所述服务器建立websocket连接的至少一个第二终端的地址信息; [0171] acquiring unit 603 for acquiring the address information of the server to establish the at least one second terminal is connected to websocket;

[0172] 发送单元604,用于通过所述websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送视频地址信息;所述视频地址信息用于指示所述第一终端当前播放的视频在所述服务器上的位置。 [0172] transmitting unit 604 through the websocket for data transmission channel, and transmitting image information to address said at least one second terminal via the server; the address information for the current video playing according to a first terminal indicates location on the video server.

[0173] 在所述获取单元获取与所述服务器连接的至少一个第二终端的地址信息后,所述发送单元通过与所述服务器建立的websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送所述第一终端当前播放的视频的视频地址信息。 [0173] After acquiring the address information of the at least one second terminal unit acquires the server connected to the sending unit to the server via the established websocket data transmission channel, via the server to the at least one transmitting address information of the second video terminal to the first terminal of the currently playing video.

[0174] 所述终端还包括通信总线601,用于连接所述连接单元602、信息获取单元603、发送单元604。 [0174] The terminal further includes a communication bus 601, for connecting the connection unit 602, the information acquisition unit 603, the transmission unit 604.

[0175] 在本发明提供的实施例中,终端通过与服务器建立websocket数据传输通道获取视频地址信息,所述终端通过浏览器接收媒体流、播放视频,使得终端不再需要安装客户端软件,提高了各设备之间的视频共享效率。 [0175] In an embodiment of the present invention is provided, the terminal obtained by the establishment of a data transmission channel websocket address information of the video server, the terminal receives the media stream through a browser, a video player, so that the terminal no longer need to install the client software, improve the efficiency of video sharing between devices. 尤其在家庭网络中,终端与服务器建立websocket连接,降低了网络流量,节约了网络资源。 Especially in the home network, terminal and server to establish a connection websocket, reduces network traffic, saving network resources.

[0176] 在本发明实施例的一种实现方式中,所述发送单元还用于,在发送视频地址信息之前,根据所述地址信息,通过所述websocket数据传输通道,经由所述服务器向所述第二终端发送第六请求,以请求将所述第一终端将当前播放的视频的地址信息发送到所述至少一个第二终端;所述终端还包括接收单元,用于接收所述至少一个第二终端发送的同意所述第六请求的响应消息。 [0176] In one implementation of this embodiment of the present invention, the sending unit is further configured to, prior to transmitting video address information from the address information, through the websocket data transmission channel, via the server to the a sixth transmission request said second terminal to request that the first terminal sends the address information of the currently playing video to the at least one second terminal; the terminal further comprises receiving means for receiving the at least one in response to the sixth message agrees request sent by the second terminal.

[0177] 在本发明实施例的一种实现方式中所述连接单元还用于,在所述发送单元完成所述视频信息的发送后,关闭与所述服务器的websocket数据传输通道。 After [0177] the connecting means In one implementation of this embodiment of the present invention is further configured to complete transmission of the video information in the sending unit, a data transmission channel WebSocket closed with the server.

[0178] 实施例七 [0178] Seventh Embodiment

[0179]如图7所示,本发明实施例提供了一种服务器,所述服务器包括: [0179] As shown in FIG. 7, the embodiment of the present invention provides a server, the server comprising:

[0180] 连接单元7〇2,用于与第一终端建立websocket数据传输通道;所述连接单元与所述第一终端建立websocket连接,建立websocket数据传输通道。 [0180] 7〇2 connection unit configured to establish a data transmission channel websocket with the first terminal; websocket establishing the connection means connected to the first terminal, to establish a data transmission channel websocket.

[0181] 获取单元703,用于获取与所述服务器建立websocket连接的至少一个第二终端的地址信息。 [0181] acquiring unit 703 for acquiring the address information to establish at least one second terminal connected to said server websocket. 所述至少一个第二终端与所述服务器建立websocket连接,所述至少一个第二终端的地址信息可以为所述至少一个第二终端的IP地址、主机名等。 At least one second terminal to establish connection with the server websocket, the at least one second terminal address information may be at least one IP address, host name and the like to the second terminal.

[0182] 发送单兀704,用于向所述第一终端发送与服务器建立websocket连接的至少一个第二终端的地址信息; [0182] Wu sending unit 704, configured to send the address information of the server to establish the at least one second terminal websocket connected to the first terminal;

[0183]在所述获取单元获取所述至少一个第二终端的地址信息后,所述发送单元将所述至少一个第二终端的地址信息发送至所述第一终端。 [0183] After the acquisition unit acquires the at least one second terminal of the address information, the transmitting unit transmits the at least one address information of the second terminal to the first terminal.

[0184]接收单元7〇5,接收所述至少一个第二终端发送的视频地址信息;所述视频地址信息用于指示所述至少一个第二终端当前播放的视频在所述服务器的位置; [0184] 7〇5 receiving unit, a video receiving address information of the at least one second terminal is transmitting; the video for the video address information indicating the at least one second terminal is currently playing position in the server;

[0185] 所述发送单元704还用于,在所述接收单元705接收所述视频地址信息后,向所述第一终端发送所述视频地址信息。 The [0185] transmitting unit 704 is further configured to, after the receiving unit 705 receives the address information of the video, the video transmitting address information to the first terminal.

[0186] 所述接收单元705还用于,在发送单元向所述第一终端发送所述视频地址信息后, 接收所述第一终端根据所述视频地址信息获取视频的请求。 The [0186] receiving unit 705 is further configured to, after the video address transmitting unit transmits information to the first terminal, the first terminal receiving the acquisition request of the video according to the video address information.

[0187] 所述发送单元704还用于,向所述第一终端发送与所述视频地址信息对应的视频。 The [0187] transmitting unit 704 is further configured to transmit the video information corresponding to the video address to the first terminal.

[0188] 所述服务器还包括通信总线7〇1,用于连接所述连接单元702、获取单元703、发送单元704和接收单元705。 [0188] The server further includes a communication bus 7〇1, for connecting the connection unit 702, acquisition unit 703, transmitting unit 704 and receiving unit 705.

[0189] 在本发明提供的实施例中,终端通过与服务器建立websocket数据传输通道获取视频地址信息,所述终端通过浏览器接收媒体流、播放视频,使得终端不再需要安装客户端软件,提高了各设备之间的视频共享效率。 [0189] In an embodiment of the present invention is provided, the terminal obtained by the establishment of a data transmission channel websocket address information of the video server, the terminal receives the media stream through a browser, a video player, so that the terminal no longer need to install the client software, improve the efficiency of video sharing between devices. 尤其在家庭网络中,终端与服务器建立websocket连接,降低了网络流量,节约了网络资源。 Especially in the home network, terminal and server to establish a connection websocket, reduces network traffic, saving network resources.

[0190] 在本发明实施例的一种实现方式中,所述接收单元还用于,接收所述第一终端通过所述websocket数据传输通道发送的第七请求,所述第七请求用于请求所述至少一个第二终端将当前播放的视频的地址信息发送到所述第一终端;所述发送单元还用于,在所述接收单元接收所述第七请求后,向所述至少一个第二终端发送所述第七请求;所述接收单元还用于,接收所述至少一个第二终端发送的同意所述第七请求的响应消息;所述发送单元还用于,在所述接收单元接收所述响应消息后向所述第一终端发送所述响应消息。 [0190] In one implementation of this embodiment of the present invention, the receiving unit is further for receiving a seventh request sent by the first terminal websocket the data transmission channel, said request requesting seventh at least one second terminal transmits the address information of the currently playing video to the first terminal; and the sending unit is further configured to, after the receiving unit receives the seventh request, to at least one of two terminal transmits the seventh request; wherein the receiving unit is further configured agreeing a response message to the seventh receiving the request sent by the at least one second terminal; wherein the sending unit is further configured to, after the receiving unit transmitting to the first terminal, after receiving the response message in response to the message.

[0191] 在本发明实施例的一种实现方式中,所述发送单元发送的视频地址信息为统一资源定位符(URL);所述连接单元还用于,与所述第一终端建立与所述URL对应的视频链路;所述发送单元向所述第一终端发送所述视频具体为:所述发送单元通过所述视频链路,向所述第一终端发送所述视频的视频流。 [0191] In one implementation of this embodiment of the present invention, the address information of the video transmitting unit for transmitting a uniform resource locator (the URL); said connecting unit is further configured to establish the first terminal and the said video corresponding to the URL link; the sending unit to the first terminal sending the video specifically is: the transmitting unit via the video link, transmitting a video stream of the video to the first terminal.

[0192] 实施例八 [0192] Example eight

[0193] 如图8所示,本发明实施例提供了一种服务器,所述服务器包括: [0193] As shown in FIG. 8, an embodiment of the present invention there is provided a server, the server comprising:

[0194] 连接单元802,用于与第一终端建立websocket数据传输通道;所述连接单元与所述第一终端建立websocket连接,建立websocket数据传输通道。 [0194] connecting means 802, for establishing a data transmission channel websocket with the first terminal; websocket establishing the connection means is connected to establish a data transmission channel websocket the first terminal.

[0195] 获取单元803,用于获取与所述服务器建立websocket连接的至少一个第二终端的地址信息;所述至少一个第二终端与所述服务器建立websocket连接,所述至少一个第二终端的地址信息可以为所述至少一个第二终端的IP地址、主机名等。 [0195] obtaining unit 803, configured to obtain at least one second terminal websocket establishing connection with the server address information; establishing at least one second terminal websocket connection with the server, the at least one second terminal address information may be at least one IP address, host name, etc. of the second terminal.

[0196] 发送单元804,用于向所述第一终端发送所述与服务器建立websocket连接的至少一个第二终端的地址信息; [0196] transmitting unit 804, configured to send to the first terminal the address information to establish at least one second terminal is connected to the server websocket;

[0197] 接收单元805,接收所述第一终端发送的视频地址信息;所述视频地址信息用于指示所述第一终端当前播放的视频在所述服务器的位置; [0197] The receiving unit 805 receives the address information of the video sent by the first terminal; the video address information indicative of the first terminal for the video currently being played on the server;

[0198] 所述发送单元804还用于,在所述接收单元接收所述视频地址信息后,向所述至少一个第二终端发送所述视频地址信息; [0198] The sending unit 804 is further configured to, after the receiving unit receives address information of the video, the video transmitting address information to said at least one second terminal;

[0199] 所述接收单元805还用于,在所述发送单元向所述至少一个第二终端发送所述视频地址信息后,接收所述至少一个第二终端根据所述视频地址信息获取视频的请求。 [0199] The receiving unit 805 is further configured to, after the transmission unit transmits the at least one second terminal video address information to the receiving terminal acquires at least one second video according to the video address information request.

[0200] 所述发送单元804还用于,向所述至少一个第二终端发送所述视频。 The [0200] transmitting unit 804 is further configured to transmit the video to the at least one second terminal.

[0201] 所述服务器还包括通信总线8〇1,用于连接所述连接单元802、获取单元803、发送单元804和接收单元8〇5。 [0201] The server further includes a communication bus 8〇1, for connecting the connection unit 802, acquisition unit 803, a transmitting unit 804 and receiving unit 8〇5.

[0202]在本发明提供的矣施例中,终端通过与服务器建立websocket数据传输通道获取视频地址信息,所述终端通过浏览器接收媒体流、播放视频,使得终端不再需要安装客户端软件,提高了各设备之间的视频共享效率。 [0202] In embodiments of the present invention provides a carry, the terminal acquires address information of the video data transmission channel by establishing websocket server, the terminal receives the media stream through a browser, a video player, so that the terminal no longer need to install the client software, improve the efficiency of video sharing between devices. 尤其在家庭网络中,终端与服务器建立websocket连接,降低了网络流量,节约了网络资源。 Especially in the home network, terminal and server to establish a connection websocket, reduces network traffic, saving network resources.

[0203]在本发明实施例的一种实现方式中,所述接收单元还用于,在接收所述第一终端发送的视频地址信息前,接收所述第一终端通过所述websocket数据传输通道发送的第八请求,所述第八请求用于请求将所述所述第一终端当前播放的视频的地址信息发送至所述至少一个第二终端;接收所述至少一个第二终端发送的同意所述第四请求的响应消息;所述发送单元还用于向所述至少一个第二终端发送所述第八请求;向所述第一终端发送所述响应消息。 [0203] In one implementation of this embodiment of the present invention, the receiving unit is further configured to, prior to receiving the address information of the video sent by the first terminal receiving the first terminal through the data transmission channel websocket an eighth request address information of the eighth request for requesting the first terminal of the currently playing video transmitted to the at least one second terminal; receiving the transmitted at least one second terminal agree a fourth message in response to the request; the sending unit is further configured to transmit said at least one second terminal of the eighth request; send the response message to the first terminal.

[0204]在本发明实施例的一种实现方式中,所述发送单元发送的视频地址信息为统一资源定位符(URL);所述连接单元还用于,与所述至少一个第二终端建立与所述URL对应的视频链路;所述发送单元向所述至少一个第二终端发送所述视频具体为:所述发送单元通过所述视频链路,向所述至少一个第二终端发送所述视频的视频流。 [0204] In one implementation of this embodiment of the present invention, the address information of the video transmitting unit for transmitting a uniform resource locator (the URL); the connection unit is further configured to establish at least one second terminal and the corresponding to the URL of the video link; the transmission unit transmits the video specifically to said at least one second terminal: the transmitting unit via the video link, to the at least one second terminal transmits said video stream video.

[0205]所述终端还包括处理器单元,所述服务器还包括处理器单元。 The [0205] terminal further comprises a processor unit, said server further comprises a processor unit. 所述处理器单元为电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储单元内的软件程序和/或模块,以及调用存储在存储单元内的数据,以执行电子设备的各种功能和/或处理数据。 The central processor unit to control an electronic device, using various interfaces and circuits connected to the respective portions of the entire electronic device, by running or executing the software program stored in the storage unit and / or module, and call in a storage unit data, the electronic device to perform various functions and / or processing data. 所述处理器单元可以由集成电路(Integrated Circuit,简称1C)组成,例如可以由单颗封装的1C所组成,也可以由连接多颗相同功能或不同功能的封装1C而组成。 The processor unit may be an integrated circuit (Integrated Circuit, abbreviated 1C) composed of, for example, consist 1C single package, it may be connected to multiple pieces of the same function or different functions of the package 1C and composition. 举例来说,处理器单元可以仅包括中央处理器(Central Processing Unit,简称CPU),也可以是GPU、数字信号处理器(Digital Signal Processor, 简称DSP)、及通信单元中的控制芯片(例如基带芯片)的组合。 For example, the processor may include only a central processing unit (Central Processing Unit, referred to as the CPU), may be the GPU, DSP (Digital Signal Processor, referred to the DSP), and a communication control unit chip (e.g., a baseband chip) combination. 在本发明实施方式中,CPU可以是单运算核心,也可以包括多运算核心。 In an embodiment of the present invention, the CPU may be a single core operation may include multiple processor cores.

[0206]本发明提供的一个实施例中,终端可实现对服务器视频提供设备的控制。 Example a [0206] The present invention provides, the terminal may be implemented to provide a control apparatus for a video server. 例如在家庭网络中,通过所述终端实现对机顶盒的远程控制。 For example, in a home network, the remote control of the set-top box by the terminal. 具体地,终端向服务器发送远程控制请求。 Specifically, the terminal transmits a remote control request to the server. 所述远程控制请求用于所述终端请求实现对所述服务器MediaServer设备的远程控制。 The remote control request for requesting said terminal to said server for remote controlling MediaServer device. 所述远程控制请求的数据格式的协议头可以是“RemoteIPKey”,用于表明本数据格式的请求是远程控制请求。 The protocol header data format may be a remote control request "RemoteIPKey", indicating the data format of this request is a remote control request. 所述远程控制请求的字段包括字段“key”,用于表示遥控器键值。 The remote control request field includes a field "key", for indicating a remote control key. 所述终端接收所述服务器对所述远程控制请求的响应。 The receiving terminal in response to the remote control server of the request. 所述服务器解析所述终端发送的远程控制请求,并向所述终端发送针对搜书远程控制请求的响应消息。 The server resolves the remote control request sent by the terminal, the terminal sends a response message to the book search for remote control request. 所述远程控制请求的响应消息的数据格式的协议头可以是“RIRT,用于表示本数据格式的消息是对所述远程控制请求的回应消息。所述远程控制请求的响应消息的字段包括“key”,用于表示远程遥控器键值。本发明实施例实现了在家庭网络中,终端通过浏览器实现了对视频提供设备的控制,提高了终端操控效率。 Said protocol header of the response message requests the remote control data format may be "RIRT, used to indicate this message is a data format of the remote control response message to the request. The field of remote control request response message comprises" key ", for representing remote remote control key. Example implemented in a home network, a browser implemented by the terminal control of the video providing device, that the terminal control efficiency of the present invention.

[0207] 在本发明的一个实施例中,终端可获取与服务器连接的其它终端的信息。 Information embodiment, the terminal may acquire the server connected to the other terminals [0207] In one embodiment of the present invention. 具体地, 所述终端向所述服务器发送获取与所述服务器连接的其它终端信息的请求。 Specifically, the terminal transmits obtaining request the other terminals connected to the server information to the server. 所述获取终端信息请求的数据格式的协议头可以是“NetworkDiagram”,用于表示本数据格式的请求是获取与所述服务器端连接的其它终端信息的请求。 Acquiring the terminal data format information request protocol headers may be "NetworkDiagram", this indicates that the request for data is a request format information acquired other terminals with the server end of the connection. 所述服务器解析所述请求,刷新与服务器端连接所有终端的网络拓扑图,获取与所述服务器连接的所有终_的佶息。 The server parses the request, the server flushes all the terminals connected to the network topology, and obtain all the ji _ end connected to the information server. 所述彳目息可以包括所述终端的IP地址、主机名等。 The left foot mesh information may include an IP address, host name and the like of the terminal. 所述终端接收所述服务器对所述请求的响应。 The terminal receives the server's response to the request. 所述响应消息的数据格式的协议头可以是“NtDm”,所述“NtDm”标明登录到MediaServer的所有设备名、IP、hostname等,用于表示本数据格式的消息是对所述获取终端信息请求的响应消息。 The response data protocol header format of the message may be "NtDm", the "NtDm" indicated log on to all the MediaServer device names, IP, hostname, etc., used to represent this data format of the message acquiring information terminal response to the request message. 所述服务器将包含所述“NtDm”协议头的针对所述获取终端信息请求的回应消息发送至与所述终端。 The server response message comprising the "NtDm" protocol header for acquiring the terminal information request is sent to the terminal. 所述终端获取与所述服务器连接的其它终端的信息。 The terminal acquires information of other terminals connected to the server.

[0208]需要说明的是,上述实施例中的相应技术特征可以相互参考。 [0208] It should be noted that the respective features of the above embodiments may refer to each other.

[0209]需要说明的是,在本发明的上述实施例中,本发明所揭示的媒体数据播放装置可以实作成单独一台装置,或整合于各种不同的媒体数据播放装置中,诸如机顶盒、移动电话、平板电脑(Tablet Personal Computer)、膝上型电脑(Laptop Computer)、多媒体播放器、数字摄影机、个人数字助理(personal digital assistant,简称PDA)、导航装置、移动上网装置(Mobile Internet Device,MID)或可穿戴式设备(Wearable Device)等。 [0209] Incidentally, in the above-described embodiments of the present invention, the present invention is disclosed in the media data playback apparatus can be realized made of a single unit, or integrated in a variety of different media data playback apparatus, such as a set top box, mobile phone, tablet (tablet personal computer), a laptop computer (laptop computer), multimedia players, digital cameras, personal digital assistants (personal digital assistant, referred to as PDA), navigation devices, mobile Internet devices (mobile Internet device, MID), or wearable devices (wearable device) and the like.

[0210]本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。 [0210] Those of ordinary skill in the art may understand that the above-described method embodiments all or part of the processes may be related hardware instructed by a computer program, the program may be stored in a computer readable storage medium. when the program is executed, the processes of the foregoing method embodiments. 其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,R0M)或随机存储记忆体(Random AccessMemory,RAM)等。 Wherein the storage medium may be a magnetic disk, an optical disk, read-only memory (Read-Only Memory, R0M) or a random access memory (Random AccessMemory, RAM) and the like.

[0211]最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换; 而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。 [0211] Finally, it should be noted that: the above embodiments are intended to illustrate the present invention, rather than limiting;. Although the present invention has been described in detail embodiments, those of ordinary skill in the art should be understood: may still be made to the technical solutions described in each embodiment of the modified or part of the technical features equivalents; as such modifications or replacements do not cause the essence of corresponding technical solutions to depart from the scope of the technical solutions of the embodiments of the present invention .

Claims (26)

1.一种多屏视频共享方法,其特征在于,所述方法包括: 第一终端与服务器建立网页套接字协议websocket数据传输通道,并获取与所述服务器建立websocket连接的至少一个第二终端的地址信息; 所述第一终端通过所述websocket数据传输通道,接收所述至少一个第二终端经由所述服务器发送的视频地址信息;所述视频地址信息用于指示所述至少一个第二终端当前播放的视频在所述服务器上的位置; 所述第一终端根据所述视频地址信息,从所述服务器上获取所述视频; 所述第一终端与服务器建立websocket数据传输通道具体为: 第一终端向服务器发送websocket握手请求; 所述第一终端接收所述服务器发送的握手响应;所述握手响应为所述服务器对所述第一终端发送的对所述websocket握手请求的响应;所述握手响应包含与所述服务器建立websocket连接的至少一个第二终端 A multi-screen video sharing method, wherein the method comprises: a first terminal and a web server to establish a data transmission channel websocket sockets, and establishing at least one second terminal acquires the connection with the server websocket address information; websocket the first terminal through the data transmission channel, receiving the at least one second terminal via the address information of the video sent by the server; the video address information indicating the at least one second terminal current playback position on said video server; the first terminal, acquires the video from the video server based on the address information; and the first terminal and the server to establish a data transmission channel websocket specifically: a first a terminal sends a handshake request to the server websocket; the first terminal receiving the handshake response sent by the server; the handshake response is the response of the server websocket handshake request sent by the first terminal; the websocket handshake response comprising establishing connection with the server at least one second terminal 地址信息。 Address information.
2. 根据权利要求1所述的方法,其特征在于,在所述第一终端接收所述至少一个第二终端经由所述服务器发送的视频地址信息之前,所述方法还包括: 所述第一终端根据所述至少一个第二终端的地址信息,通过所述websocket数据传输通道,经由所述服务器向所述第二终端发送第一请求,以请求所述第二终端将当前播放的视频的地址信息发送到所述第一终端; 所述第一终端接收所述至少一个第二终端经由所述服务器发送的同意所述第一请求的响应消息。 2. The method according to claim 1, wherein the first terminal receiving the second terminal via the at least one address information of the server before the video transmission, the method further comprising: said first the address information of the terminal at least one second terminal, through the websocket data transmission channel, sending a first request to said server via said second terminal, said second terminal to request the address of the currently playing video information to the first terminal; a first request response message to the first terminal receiving the consent of the at least one second terminal said transmitted via the server.
3. 根据权利要求1或2所述的方法,其特征在于,所述第一终端接收的视频地址信息为统一资源定位符URL;所述第一终端根据所述视频地址信息,从所述服务器获取所述视频具体为: 所述第一终端根据所述URL与所述服务器建立视频链路,接收所述服务器发送的所述视频的视频流。 3. The method of claim 1 or claim 2, wherein the address information of the first video terminal received the URL is a uniform resource locator; the first video terminal according to the address information from the server acquiring the video is specifically: the first video terminal to establish a link with the server according to the URL, receive the video stream of the video sent by the server.
4. 根据权利要求1或2任一所述的方法,其特征在于,在所述第一终端完成所述视频的播放后,所述方法还包括: 所述第一终端关闭与所述服务器建立的websocket数据传输通道。 4. The method of claim 1 or claims 2, wherein, after completion of playing the video at the first terminal, the method further comprising: establishing said first terminal is closed with the server websocket the data transmission channel.
5. —种多屏视频共享方法,其特征在于,所述方法包括: 第一终端与服务器建立websocket数据传输通道,并获取与所述服务器建立websocket 连接的至少一个第二终端的地址信息; 所述第一终端通过所述websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送视频地址信息;所述视频地址信息用于指示所述第一终端当前播放的视频在所述服务器上的位置; 所述第一终端与服务器建立websocket数据传输通道具体为: 第一终端向服务器发送websocket握手请求; 所述第一终端接收所述服务器发送的握手响应;所述握手响应为所述服务器对所述第一终端发送的对所述websocket握手请求的响应;所述握手响应包含与所述服务器连接的至少一个第二终端的地址信息。 5. - kind of multi-screen video sharing method, wherein the method comprises: establishing a first terminal and a server websocket data transmission channel, and acquires the address information to establish at least one second terminal connected to said server websocket; the websocket said first terminal through the data transmission channel, and transmitting image information to address said at least one second terminal via the server; the video address information indicating the current video playing in the first terminal server position; the first terminal and the server to establish a data transmission channel websocket specifically: a first terminal sending a handshake request to a server websocket; the first terminal receiving the handshake response sent by the server; the handshake response is the websocket response to the handshake request to the server for transmitting the first terminal; handshake response information contains the address of the at least one second terminal connected to the server.
6.根据权利要求5所述的方法,其特征在于,在所述第一终端通过所述websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送视频地址信息之前,所述方法还包括: 所述第一终端根据所述至少一个第二终端的地址信息,通过所述websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送第二请求,以请求将所述第一终端将当前播放的视频的地址信息发送到所述至少一个第二终端; 所述第一终端接收所述至少一个第二终端发送的同意所述第二请求的响应消息。 Before 6. The method as claimed in claim 5, wherein the first terminal websocket by said data transmission channel, information to the video address transmitting the at least one second terminal via the server, the method further comprising: a first terminal according to the address information of the at least one second terminal, through the transmission channel websocket data, sending a second request to the at least one second terminal via the server to the request the first terminal transmits the address information of the currently playing video to the at least one second terminal; a first response message to the terminal receiving the consent of the at least one second terminal transmits the second request.
7. 根据权利要求5或6所述的方法,其特征在于,在所述第一终端完成所述视频地址信息的发送后,所述方法还包括: 所述第一终端关闭与所述服务器建立的websocket数据传输通道。 The method according to claim 5 or claim 6, characterized in that, after completion of sending the address information of the video at the first terminal, the method further comprising: establishing said first terminal is closed with the server websocket the data transmission channel.
8. —种多屏视频共享方法,其特征在于,所述方法包括: 服务器与第一终端建立websocket数据传输通道,并向所述第一终端发送与所述服务器建立websocket连接的至少一个第二终端的地址信息; 所述服务器接收所述至少一个第二终端发送的视频地址信息,并向所述第一终端发送视频地址信息;所述视频地址信息用于指示所述至少一个第二终端当前播放的视频在所述服务器的位置; 所述服务器接收所述第一终端根据所述视频地址信息获取视频的请求,向所述第一终端发送所述视频; 所述服务器与第一终端建立websocket数据传输通道,并向所述第一终端发送与所述服务器建立websocket连接的至少一个第二终端的地址信息具体为: 所述服务器接收所述第一终端发送的websocket握手请求; 所述服务器向所述第一终端发送握手响应;所述握手响应为所述服务器对所述 8. - kind of multi-screen video sharing method, wherein the method comprises: a server websocket establishing a data transmission channel with the first terminal, and the server sends a setup with the first terminal connected to the at least one second websocket address information of the terminal; the video server receives the address information of the at least one second terminal sent by the first terminal to transmit the address information of video; video address information indicating the at least one second terminal is currently video playback at a position of the server; the server receives the first terminal of a video acquisition request according to the video address information, transmitting the video to the first terminal; the first server and the terminal establishes websocket data transmission channel, and transmitting said at least one second terminal websocket establishing connection with the server address information of a first terminal specifically comprises: receiving the server sent by the first terminal websocket handshake request; the server to the first terminal transmits handshake response; the handshake response is the server processes the 一终端发送的对所述websocket握手请求的响应;所述握手响应包含与所述服务器建立websocket连接的至少一个第二终端的地址信息。 A transmitting terminal in response to the handshake request websocket; handshake response information contains the address of the at least one second terminal websocket establish connection with the server.
9.根据权利要求8所述的方法,其特征在于,在所述服务器接收所述至少一个第二终端发送的视频地址信息之前,所述方法还包括: 所述服务器接收所述第一终端通过所述websocket数据传输通道发送的第三请求,并向所述至少一个第二终端发送所述第三请求;所述第三请求用于请求所述至少一个第二终端将当前播放的视频的地址信息发送到所述第一终端; 所述服务器接收所述至少一个第二终端发送的同意所述第三请求的响应消息,并向所述第一终端发送所述响应消息。 9. The method according to claim 8, characterized in that, prior to receiving the video information of at least one second terminal address transmitted in said server, said method further comprising: said server receives the first terminal by websocket the third request sent by a data transmission channel, and transmitting at least one second terminal to the third request; a third request for requesting the address of the at least one second terminal of the currently playing video information to the first terminal; the server receives the response to the third request message agree to at least one second transmitting terminal, and to a first terminal transmitting the response message.
10.根据权利要求8或9所述的方法,其特征在于,所述视频地址信息为URL;所述服务器接收所述第一终端根据所述视频地址信息获取视频的请求,向所述第一终端发送所述视频具体为: 所述服务器接收所述第一终端根据所述视频地址信息获取视频的请求,与所述第一终端建立与所述URL对应的视频链路,向所述第一终端发送所述视频的视频流。 10. The method of claim 8 or claim 9, characterized in that said video information is the URL address; the first server receives the request for acquiring a video terminal according to the video address information to the first transmitting the video terminal specifically comprises: the server receives the first terminal of a video acquisition request according to the video address information corresponding to the URL establishing a video link with the first terminal, to the first the terminal transmits a video stream of the video.
11. 一种多屏视频共享方法,其特征在于,所述方法包括: 服务器与第一终端建立websocket数据传输通道,并向所述第一终端发送与所述服务器建立websocket连接的至少一个第二终端的地址信息; 所述服务器接收所述第一终端发送的视频地址信息,并向所述至少一个第二终端发送所述视频地址信息;所述视频地址信息用于指示所述第一终端当前播放的视频在所述服务器上的位置; 所述服务器接收所述至少一个第二终端根据所述视频地址信息获取视频的请求,向所述至少一个第二终端发送所述视频; 所述服务器与第一终端建立websocket数据传输通道,并向所述第一终端发送与所述服务器建立websocket连接的至少一个第二终端的地址信息具体为: 所述服务器接收所述弟~终端发送的websocket握手请求; 所述服务器向所述第一终端发送握手响应;所述握手响应为所述 11. A multi-screen video sharing method, wherein the method comprises: a server websocket establishing a data transmission channel with the first terminal, and the server sends a setup with the first terminal connected to the at least one second websocket address information of the terminal; address information of the video server receives a first transmitting terminal of the, at least one second terminal and to transmit the video address information; address information for indicating the video terminal of the first current video playback location on the server; the server receives the request for acquiring the at least one second terminal of the video according to the video address information to send the video to the at least one second terminal; the server and websocket terminal establishes a first data transmission channel, and transmitting the first terminal to establish at least one second terminal is connected with the server websocket address information specifically is: the server receives the younger - a handshake request sent by the terminal websocket ; handshake response sent by the server to the first terminal; the handshake response is the 服务器对所述第一终端发送的对所述websocket握手请求的响应;所述握手响应包含与所述服务器建立websocket连接的至少一个第二终端的地址信息。 Websocket response to the handshake request to the server for transmitting the first terminal; handshake response information contains the address of the at least one second terminal websocket establish connection with the server.
12. 根据权利要求11所述的方法,其特征在于,在所述服务器接收所述第一终端发送的视频地址信息之前,所述方法还包括: 所述服务器接收所述第一终端通过所述websocket数据传输通道发送的第四请求,并向所述至少一个第二终端发送所述第四请求;所述第四请求用于请求将所述所述第一终端当前播放的视频的地址信息发送至所述至少一个第二终端; 所述服务器接收所述至少一个第二终端发送的同意所述第四请求的响应消息,并向所述第一终端发送所述响应消息。 12. The method according to claim 11, wherein, prior to receiving the address information of the first video terminal transmitting at the server, the method further comprising: said server receives the first terminal through the websocket fourth request data transmission channel, and to transmit the at least one second terminal of said fourth request; request address information of the fourth current playback request for the first terminal to the video transmission to at least one second terminal; the server receives the response message agrees to the at least one second terminal sends a fourth request, and the first terminal transmits the response message.
13. 根据权利要求11或12所述的方法,其特征在于,所述视频地址信息为URL;所述服务器接收所述至少一个第二终端根据所述视频地址信息获取视频的请求,向所述至少一个第二终端发送所述视频具体为: 所述服务器接收所述至少一个第二终端根据所述视频地址信息获取视频的请求,与所述至少一个第二终端建立与所述URL对应的视频链路,向所述至少一个第二终端发送所述视频的视频流。 13. The method according to claim 11 or claim 12, wherein said video information is the URL address; the server receives the request for acquiring the at least one second terminal of the video according to the video address information, to the transmitting said at least a second video terminal is specifically: the request server receives the at least one second terminal acquires the video based on the video information of the address, the at least one second terminal to establish a video corresponding to the URL link, transmission of the video stream to the at least one second terminal.
14. 一种用于多屏视频共享的终端,其特征在于,所述终端包括: 连接单元,用于与服务器建立websocket数据传输通道; 获取单元,用于获取与所述服务器建立websocket连接的至少一个第二终端的地址信息;根据视频地址信息,从所述服务器上获取视频; 接收单元,用于通过所述websocket数据传输通道,接收所述至少一个第二终端经由所述服务器发送的视频地址信息;所述视频地址信息用于指示所述至少一个第二终端当前播放的视频在所述服务器上的位置; 所述连接单元与服务器建立websocket数据传输通道,具体为: 所述连接单元通过发送单元向服务器发送websocket握手请求; 所述连接单元通过所述接收单元接收所述服务器发送的握手响应;所述握手响应为所述服务器对所述发送单元发送的对所述websocket握手请求的响应;所述握手响应包含与所述服务器建立webso 14. A multi-screen video sharing terminal, characterized in that, said terminal comprising: a connection unit for establishing a data transmission channel websocket server; acquiring unit for acquiring websocket to establish connection with the server at least address information of a second terminal; acquiring video from the video server based on the address information; receiving means for websocket through the data transmission channel, receiving the at least one second terminal via the video address sent by the server information; address information of the video for the video indicative of said at least one second terminal is currently playing position on the server; the server establishes a connection unit websocket data transmission channel, in particular: the connection unit by transmitting means websocket handshake request to the server; the connecting unit unit receives the handshake response sent by the server via said receiving; the handshake response is a response to the handshake request websocket the server sent by the transmission unit; the response handshake with the server comprising establishing webso cket连接的至少一个第二终端的地址信息。 Address information of the at least one second terminal is connected cket.
15. 根据权利要求14所述的用于多屏视频共享的终端,其特征在于,: 所述发送单元,还用于在所述接收单元接收视频地址信息之前,根据所述地址信息,通过所述websocket数据传输通道,经由所述服务器向所述第二终端发送第五请求,以请求所述第二终端将当前播放的视频的地址信息发送到所述终端; 所述接收单元还用于,接收所述至少一个第二终端发送的同意所述第五请求的响应消息。 Claim 15. The multi-screen video for sharing terminal 14, characterized in that: the sending unit is further configured to prior to the video receiving unit receives address information from the address information, by the websocket said data transmission channel, is sent via the server to the second terminal fifth request, requesting the second terminal to the transmitting address information of the currently playing video to the terminal; wherein the receiving unit is further configured to, receiving the at least one second terminal sends a fifth response message agrees to the request.
16. 根据权利要求14或15所述的用于多屏视频共享的终端,其特征在于,所述接收单元接收的视频地址信息为URL; 所述连接单元还用于,根据所述URL与所述服务器建立视频链路; 所述获取单元根据视频地址信息,从所述服务器获取视频具体为: 所述获取单元根据所述视频链路,获取所述服务器发送的所述视频的视频流。 Terminals for multi-screen video sharing according to claim 14 or 15, wherein the receiving unit receives address information of the video URL; for the connecting means further, according to the URL of the establishing a video link said server; the video acquisition unit according to the address information acquired from the particular video server: the video stream acquiring unit according to the video link, the server sends the acquired video.
17. 根据权利要求14或15所述的用于多屏视频共享的终端,其特征在于, 所述连接单元还用于,在所述获取单元获取视频后,关闭与所述服务器建立的websocket数据传输通道。 According to claim 17. A multi-screen video sharing terminal 15 or claim 14, wherein the connection unit is further configured to, after the data acquiring unit acquires video websocket closed established with the server transmission channel.
18. —种用于多屏视频共享的终端,其特征在于,所述终端包括: 连接单元,用于与服务器建立websocket数据传输通道; 获取单元,用于获取与所述服务器建立websocket连接的至少一个第二终端的地址信息; 发送单元,用于通过所述websocket数据传输通道,经由所述服务器向所述至少一个第二终端发送视频地址信息;所述视频地址信息用于指示所述终端当前播放的视频在所述服务器的位置; 所述连接单元与服务器建立websocket数据传输通道,具体为: 所述连接单元通过所述发送单元向服务器发送websocket握手请求; 所述连接单元通过接收单元接收所述服务器发送的握手响应;所述握手响应为所述服务器对所述终端发送的对所述websocket握手请求的响应;所述握手响应包含与所述服务器连接的至少一个第二终端的地址信息。 18. - type of terminal for multi-screen video sharing, wherein, said terminal comprising: a connection unit for establishing a data transmission channel websocket server; obtaining unit configured to obtain at least establish a connection with the server websocket address information of a second terminal; transmitting means for websocket through the data transmission channel, and transmitting image information to address said at least one second terminal via the server; the video address information indicating the current terminal video playback position in the server; the server establishes a connection unit websocket data transmission channel, in particular: the connection unit to send a request to a server through a handshake websocket said transmitting; the connection unit through the receiving unit receives the said handshake response sent from the server; the handshake response websocket response to the handshake request is sent by the terminal to the server; and the handshake response address information comprising at least one second terminal connected to the server.
19. 根据权利要求18所述的用于多屏视频共享的终端,其特征在于, 所述发送单元还用于,在发送视频地址信息之前,根据所述至少一个第二终端的地址信息,通过所述websocket数据传输通道,经由所述服务器向所述第二终端发送第六请求, 以请求将所述终端将当前播放的视频的地址信息发送到所述至少一个第二终端; 所述接收单元,还用于接收所述至少一个第二终端发送的同意所述第六请求的响应消息。 According to claim 19. A multi-screen video sharing terminal 18, wherein the sending unit is further configured to, prior to transmitting video address information, the address information of the at least one second terminal, by websocket the data transmission channel, is sent via the server to the second terminal sixth request, to request that the terminal transmits the address information of the currently playing video to the at least one second terminal; wherein the receiving unit further configured to receive the response message sent by the at least one second terminal of the sixth consent request.
20. 根据权利要求18或19所述的用于多屏视频共享的终端,其特征在于, 所述连接单元还用于,在所述发送单元完成所述视频地址信息的发送后,关闭与所述服务器的websocket数据传输通道。 Claim 20. The multi-screen video terminal shared for 18 or 19, wherein the connection unit is further configured to, after transmitting the video transmitting unit completes the address information, and the closed websocket data transmission channel of said server.
21. —种用于多屏视频共享的服务器,其特征在于,所述服务器包括: 连接单元,用于与第一终端建立websocket数据传输通道; 获取单元,用于获取与所述服务器建立websocket连接的至少一个第二终端的地址信息; 发送单元,用于向所述第一终端发送与服务器建立websocket连接的至少一个第二终端的地址信息;向所述第一终端发送视频地址信息;所述视频地址信息用于指示所述至少一个第二终端当前播放的视频在所述服务器的位置;向所述第一终端发送视频; 接收单元,接收所述至少一个第二终端发送的视频地址信息;接收所述第一终端根据所述视频地址信息获取视频的请求; 所述连接单元与第一终端建立websocket数据传输通道,具体为: 所述连接单元通过所述接收单元接收所述第一终端发送的websocket握手请求; 所述连接单元通过所述发送单元向所述第一 21. - a kind of multi-screen video sharing server, wherein, said server comprising: a connection unit for establishing a data transmission channel websocket with the first terminal; obtaining unit, configured to acquire to establish connection with the server websocket at least one address of the second terminal; transmitting means for transmitting to the first terminal and the server address information to establish at least one second terminal is connected to websocket; send address information to the first video terminal; the video video address information for at least one second terminal indicating the current playback position in the server; transmitting the video to the first terminal; receiving means for receiving the at least one second terminal transmitting address information of video; acquiring the first receiving terminal according to the video address to the video information request; a first terminal unit with the connection establishment websocket data transmission channel, specifically: a first receiving unit connected to the terminal by transmitting the receiving unit websocket the handshake request; said connecting unit via said transmitting means to said first 端发送握手响应;所述握手响应为所述服务器对所述第一终端发送的对所述websocket握手请求的响应;所述握手响应包含与所述服务器建立websocket连接的至少一个第二终端的地址信息。 Sends handshake response; the handshake response is the response of the server websocket handshake request sent by the first terminal; handshake response the address comprises at least one second terminal establishes a connection with the websocket server information.
22.根据权利要求21所述的用于多屏视频共享的服务器,其特征在于, 所述接收单元还用于,接收所述第一终端通过所述websocket数据传输通道发送的第七请求,所述第七请求用于请求所述至少一个第二终端将当前播放的视频的地址信息发送到所述第一终端;接收所述至少一个第二终端发送的同意所述第七请求的响应消息; 所述发送单元还用于,向所述至少一个第二终端发送所述第七请求;向所述第一终端发送所述响应消息。 Claim 22. The multi-screen video for the shared server 21, characterized in that the receiving unit is further configured to receive said first terminal via the seventh websocket requesting the data transmission channel of the transmission, the said seventh request for requesting the second terminal to the at least one transmitting address information of the currently playing video to the first terminal; receiving a response message for the seventh consent request sent by at least one second terminal; the sending unit is further configured to send the request to the seventh least one second terminal; transmitting the response message to the first terminal.
23.根据权利要求21或22所述的用于多屏视频共享的服务器,其特征在于,所述发送单元发送的视频地址信息为URL; 所述连接单元还用于,与所述第一终端建立与所述URL对应的视频链路; 所述发送单元向所述第一终端发送所述视频具体为: 所述发送单元通过所述视频链路,向所述第一终端发送所述视频的视频流。 23. A server for multi-screen video sharing 21 or claim 22, wherein the transmission unit transmits information of the URL address of the video; the connection unit is further configured to, with said first terminal establish a link to the URL corresponding video; the transmission unit transmits the video to the first terminal specifically comprises: the transmitting unit via the video link, transmitting to the first terminal of the video video stream.
24.—种用于多屏视频共享的服务器,其特征在于,所述服务器包括: 连接单元,用于与第一终端建立websocket数据传输通道; 获取单元,用于获取与所述服务器建立websocket连接的至少一个第二终端的地址信息; 发送单元,用于向所述第一终端发送所述与服务器建立websocket连接的至少一个第二终端的地址信息;向所述至少一个第二终端发送视频地址信息;所述视频地址信息用于指示所述第一终端当前播放的视频在所述服务器的位置;向所述至少一个第二终端发送所述视频; 接收单元,接收所述第一终端发送的视频地址信息;接收所述至少一个第二终端根据所述视频地址信息获取视频的请求; 所述连接单元与第一终端建立websocket数据传输通道,具体为: 所述连接单元通过所述接收单元接收所述第一终端发送的websocket握手请求; 所述连接单元通过所述发 24.- species for multi-screen video sharing server, wherein, said server comprising: a connection unit for establishing a data transmission channel websocket with the first terminal; obtaining unit, configured to acquire to establish connection with the server websocket at least one address of the second terminal; transmitting means for transmitting said address information to establish at least one second terminal is connected to the websocket server to the first terminal; transmitting the video address to the at least one second terminal information; address information of the video for the video indicative of the first terminal is currently being played on the server; transmitting the video to the at least one second terminal; receiving means for receiving the transmitted first terminal video address information; receiving the at least one second terminal acquires address information request according to the video of the video; the terminal unit and the first connection establishment websocket data transmission channel, in particular: the connection unit received through the receiving unit websocket the first terminal transmits the handshake request; the connection unit through the hair 单元向所述第一终端发送握手响应;所述握手响应为所述服务器对所述第~'终端发送的对所述websocket握手请求的响应;所述握手响应包含与所述服务器建立websocket连接的至少一个第二终端的地址信息。 Unit sends a handshake in response to the first terminal; the handshake response is the server processes the first response to the websocket ~ handshake request sent by the terminal & apos; the handshake response comprises establishing a connection with the server websocket at least one address information of the second terminal.
25.根据权利要求24所述的用于多屏视频共享的服务器,其特征在于, 所述接收单元还用于,在接收所述第一终端发送的视频地址信息之前,接收所述第一终端通过所述websocket数据传输通道发送的第八请求,所述第八请求用于请求将所述所述第一终端当前播放的视频的地址信息发送至所述至少一个第二终端;接收所述至少一个第二终端发送的同意所述第八请求的响应消息; 所述发送单元还用于,向所述至少一个第二终端发送所述第八请求;向所述第一终端发送所述响应消息。 Claim 25. The multi-screen video sharing server according to claim 24, wherein the receiving unit is further configured to, prior to receiving the address information of the video sent by the first terminal, the first terminal receiving an eighth request address information transmitted through the data transmission channel websocket, the eighth request for requesting the first terminal of the currently playing video transmitted to the at least one second terminal; receiving the at least a second terminal agrees response message sent to the eighth request; said sending unit is further configured to send the request to the eighth least one second terminal; transmitting to the first terminal the response message .
26.根据权利要求24或25所述的用于多屏视频共享的服务器,其特征在于,所述发送单元发送的视频地址信息为URL; 所述连接单元还用于,与所述至少一个第二终端建立与所述URL对应的视频链路; 所述发送单元向所述至少一个第二终端发送所述视频具体为: 所述发送单元通过所述视频链路,向所述至少一个第二终端发送所述视频的视频流。 26. The multi-screen video sharing server for 24 or claim 25, wherein the address information of the video transmitting unit for transmitting the URL; the connection unit is further configured, with the at least one first and two terminal establishes a link to the URL corresponding video; the transmitting unit transmits the at least one second terminal to the video is specifically: the transmitting unit via the video link, to the at least one second the terminal transmits a video stream of the video.
CN201310719853.6A 2013-12-23 2013-12-23 The multi-screen video sharing method and a terminal server CN103702238B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310719853.6A CN103702238B (en) 2013-12-23 2013-12-23 The multi-screen video sharing method and a terminal server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310719853.6A CN103702238B (en) 2013-12-23 2013-12-23 The multi-screen video sharing method and a terminal server

Publications (2)

Publication Number Publication Date
CN103702238A CN103702238A (en) 2014-04-02
CN103702238B true CN103702238B (en) 2017-11-28

Family

ID=50363620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310719853.6A CN103702238B (en) 2013-12-23 2013-12-23 The multi-screen video sharing method and a terminal server

Country Status (1)

Country Link
CN (1) CN103702238B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135686B (en) * 2014-08-14 2017-12-08 广东威创视讯科技股份有限公司 A method of splicing signals sharing a wall and a user terminal
CN104301400B (en) * 2014-09-28 2017-10-03 四川长虹电器股份有限公司 Samba multi-screen collaboration and resource sharing agreements based on
CN105142011A (en) * 2015-08-12 2015-12-09 青岛海信电器股份有限公司 Web-based television terminal multi-screen interaction method and device
CN105554559A (en) * 2015-09-29 2016-05-04 深圳市美贝壳科技有限公司 Media projection method based on http
CN105163053A (en) * 2015-09-30 2015-12-16 小米科技有限责任公司 Video projection method and apparatus
CN105306857A (en) * 2015-11-20 2016-02-03 小米科技有限责任公司 Projection display method and device
CN106791944A (en) * 2015-11-23 2017-05-31 北大方正集团有限公司 Multi-screen interaction method, multi-screen interaction apparatus, and multi-screen interaction system
CN107040798A (en) * 2016-02-04 2017-08-11 深圳市光息谷科技发展有限公司 Interactive presentation control method and system, server, control terminal and playing terminal
CN105871897A (en) * 2016-05-20 2016-08-17 腾讯科技(深圳)有限公司 Method for controlling media playing, related device and system
CN106507127A (en) * 2016-09-29 2017-03-15 北京奇艺世纪科技有限公司 Video playing method and video playing device
CN107105339A (en) * 2017-03-31 2017-08-29 广州酷狗计算机科技有限公司 Method, device and system for broadcasting live videos
CN109274634A (en) * 2017-07-18 2019-01-25 腾讯科技(深圳)有限公司 Multimedia communication method and device, storage medium
CN107483972B (en) * 2017-07-24 2019-05-07 平安科技(深圳)有限公司 A kind of live streaming processing method of audio-video, storage medium and a kind of mobile terminal
CN108881361A (en) * 2017-12-26 2018-11-23 北京视联动力国际信息技术有限公司 Data pushing method and device based on internet of visions

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546616A (en) * 2011-12-28 2012-07-04 Tcl集团股份有限公司 Achieving method for media sharing and interaction and digital household media server
CN102739800A (en) * 2012-07-05 2012-10-17 合一网络技术(北京)有限公司 System and method for remotely controlling browser Web page based on internet
CN103024526A (en) * 2012-12-31 2013-04-03 上海全景数字技术有限公司 Multi-screen interaction system based on digital television set-top box
WO2013102335A1 (en) * 2012-01-06 2013-07-11 华为技术有限公司 Gateway handshake and communication method, gateway and web communication system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546616A (en) * 2011-12-28 2012-07-04 Tcl集团股份有限公司 Achieving method for media sharing and interaction and digital household media server
WO2013102335A1 (en) * 2012-01-06 2013-07-11 华为技术有限公司 Gateway handshake and communication method, gateway and web communication system
CN102739800A (en) * 2012-07-05 2012-10-17 合一网络技术(北京)有限公司 System and method for remotely controlling browser Web page based on internet
CN103024503A (en) * 2012-07-05 2013-04-03 合一网络技术(北京)有限公司 System and method for achieving remote control through mobile communication equipment terminal
CN103024526A (en) * 2012-12-31 2013-04-03 上海全景数字技术有限公司 Multi-screen interaction system based on digital television set-top box

Also Published As

Publication number Publication date
CN103702238A (en) 2014-04-02

Similar Documents

Publication Publication Date Title
KR100870587B1 (en) Multimedia session management
KR100728025B1 (en) Method and appratus for obtaining external charged content in the upnp network
US8356083B2 (en) System and method for transmitting and receiving a call on a home network
CN102595239B (en) Multi-screen interactive method, device and intelligent television for terminal system
CN102802048B (en) A multi-screen interactive system and method
CN101636967B (en) Remote data access technology for portable devices
KR101056617B1 (en) Information processing apparatus, information processing method and the content
JP2009521843A (en) Method for converting between unicast session and multicast session
US20070162165A1 (en) SYSTEM AND METHOD FOR USING WEB SYNDICATION PROTOCOLS AS AN OUT-OF-BAND UPnP SERVICE DISCOVERY SYSTEM
CN104253856B (en) Scalable Web real-time communication media engine and related methods, systems,
CN101072359A (en) Method, system and user end for realizing network media audio-video synchronization
CN103647991A (en) Method and system for sharing video in intelligent television
CN102461076B (en) Method and arrangement for obtaining a media object for a device in a local network
AU2010256543A1 (en) Systems and methods for creating virtual universal plug-and-play systems
CN102124752A (en) Apparatus and method for sharing a bookmark with other user in a home network
CN101247332A (en) Bandwidth requesting system, bandwidth requesting device, client device, bandwidth requesting method, content playback method, and program
JP5588517B2 (en) Streaming by the option of broadcast delivery of the data segment
CN101094243B (en) Multimedia adaptation system and method of adaptating multimedia content for different types of devices base on UPnP
CN101794298A (en) Method for realizing page adaptation, page adaptation system and communication system
CN100481934C (en) Module and process for inter-user communication
CN105309036B (en) Without the need for Internet Protocol MAC layer transport Wi-Fi Direct service application service platform
JP5094840B2 (en) Method and apparatus for synchronizing content of a home network device
CN102833365A (en) File playing method and system based on DLNA (Digital Living Network Alliance) and driving and driven DLNA equipment
CN102325144B (en) Method and system for interconnection between media equipment and multimedia equipment
CN103781055A (en) Data downloading method and associated device

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
GR01
CP01
TR01