Summary of the invention
To the defective that exists in the prior art; The object of the present invention is to provide and a kind ofly realize the interactive method and system of sharing between the multi-screen multi-user, realize between single users' such as portable terminal, computer, Web TV on the network difference screen or share the method for literal, picture, audio frequency and video between the different screens of multi-user through sliding screen.
For realizing above-mentioned purpose, the technical scheme that the present invention adopts is following:
A kind of through the interactive method of sharing between the sliding screen realization multi-screen multi-user, may further comprise the steps:
(1) user terminal is set up communications protocol with server and other terminal equipment with network communication function and is connected through the network entry server; Described user terminal is divided into main control terminal and controlled terminal in logic from business, and described network comprises the Internet, 3G or 4G wireless wide-area communication network, wired local area network or WLAN;
(2) main control terminal sends to server with the mode of sliding screen with corresponding instruction; Described mode with sliding screen is meant the mode through finger slip terminal Touch Screen, sliding button, button click; Corresponding instruction is meant the main control terminal user needs information transmitted, comprises communications protocol, authentication information, system information, point-to-point information;
(3) server is handled, transfer, is broadcast to the controlled terminal that connects with server said instruction;
(4) controlled terminal receive server or the instruction of directly sending by main control terminal after, operate accordingly based on instruction, thereby realize that the interaction between single user multiple terminals, between the multi-user multiple terminals shares.
Further; Aforesaid a kind of through the interactive method of sharing between the sliding screen realization multi-screen multi-user; In the step (1), described login comprises manual entry and logins dual mode automatically that described manual entry is meant that the user imports the mode that username and password is logined; Described automatic login is meant through hardware is discerned like MAC Address, realizes the terminal mode of login automatically;
Further, in the step (1), described server is meant the intermediary service layer, is the general designation of one group of server.
Further; Described server is a property server, comprises subscriber management server, continued broadcasting server, protocol instructions server, database server, Video processing server, CDN& streaming media server, web service server, Streaming Media processing server.
Perhaps, described server is the server through software virtual;
If after main control terminal and the controlled terminal login; Judge that through network main control terminal and controlled terminal are in same LAN; Main control terminal and controlled terminal communication will directly connect through communications protocol, and at this time main control terminal or controlled terminal reception server function provide service.If the user opens function of local area network, main control terminal and controlled terminal are logined the virtual server by main control terminal or controlled terminal software creation, and directly set up the communication relation.
Further, described communications protocol is ICP/IP protocol, proprietary protocol.
Said user terminal is mobile phone terminal, PDA portable terminal, panel computer, computer terminal, internet television all-in-one or STB.
Further; Aforesaid a kind of through the interactive method of sharing between the sliding screen realization multi-screen multi-user, described main control terminal is after server sends instruction, if in the time of setting, do not receive server response information; Then declarative instruction is sent failure, need resend.Server is after controlled terminal sends instruction, if in the time of setting, do not receive the controlled terminal echo message, then declarative instruction is sent failure, need resend.Main control terminal is after controlled terminal directly sends instruction, if in the time of setting, do not receive the controlled terminal echo message, then declarative instruction is sent failure, need resend.Or the information that receiving terminal receives is imperfect, and is inaccurate, and then declarative instruction is sent failure, and receiving terminal proposes to resend demand.
Further; Aforesaid a kind of through the interactive method of sharing between the sliding screen realization multi-screen multi-user; Described echo message comprises synchronous echo message and asynchronous echo message; Synchronously echo message is meant when main control terminal sends a message to server, the discovering server controlled terminal online (online be meant the terminal on the network and successfully login) also after the successfully transmission information, server returns to main control terminal with the information processing result after receiving the information that controlled terminal successfully receives immediately; Asynchronous echo message is meant that working as main control terminal sends to server with point-to-point message; The discovering server controlled terminal not online (not online be meant the terminal not on the network or on network but not login) information is kept at server; The wait controlled terminal receives; After controlled terminal online (the online terminal that is meant is being logined on the network and successfully) and the successfully reception information, server returns to main control terminal with the information processing result.
Further; Aforesaid a kind of through the interactive method of sharing between the sliding screen realization multi-screen multi-user; It is described after main control terminal and/or controlled terminal and server are set up communications protocol and be connected; Server end can send a heartbeat to each terminal according to the temporal frequency of setting and instruct to confirm whether each terminal is normal with being connected of server, and said heartbeat instruction is the information that is used for keeping connection of default.
Further, aforesaid a kind of through sliding the method that screen realizes that interaction is shared between the multi-screen multi-user, the described instruction through heartbeat confirms that the terminal is connected whether normal specifically mode and is with server:
If the terminal gives a response server based on the heartbeat instruction, illustrate that then server is connected normally with the network at terminal; If the terminal no response, then server can break off being connected of current and this terminal, and this terminal need be landed once more with server and connect.
Further; Aforesaid a kind of through the interactive method of sharing between the sliding screen realization multi-screen multi-user; Described system information and point-to-point information are made up of message header or message header and message body; Comprise in the said message header by message and send the message SN that source terminal generates that described message SN is unique, and message SN is constant in the message process of one whole in the message queue that message transmission source terminal generates.
Further; Aforesaidly a kind ofly realize the interactive method of sharing between the multi-screen multi-user through sliding screen, described system information comprises the binding instruction that is used to set up the terminal and connects, be used for cancellation link order that disconnected end connects and the terminal inquiry instruction of inquiring about online terminal list; Said point-to-point information comprises between the terminal different instruction of the different information of transmission, comprises that video (in the video on the browser browse network that comprise video that system provides, provides through system, the terminating machine, terminal obtain video file of sharing on the network or the video flowing of taking in real time through camera through sharing agreement) transfer instruction, voice (comprise in the terminating machine, terminal through the voice document sharing agreement and obtain to share on the network or the audio stream through Mike or camera real-time recording) transfer instruction, file (comprise in the terminating machine or file that the terminal exists with document form through picture file shared on the shared agreement acquisition network, voice document, video file, text (files such as text-only file, word, Excel), pdf document etc.) transfer instruction, information (information on the browser browse network that comprise information that system provides, provides through system) transfer instruction, express one's feelings transfer instruction, paper slip transfer instruction, long-distance video or speech play instruction and video or voice status obtain instruction.
Further; Aforesaid a kind of through the interactive method of sharing between the sliding screen realization multi-screen multi-user; Described when send between main control terminal and the controlled terminal instruct for video transmission the time; During the video content that if said video is a system to be provided, main control terminal is video ID and the initial reproduction time of video in the server to Server Transport, and server is transferred to controlled terminal with the initial reproduction time of video playback address video again.If said video is the video in this machine of main control terminal or passes through the video flowing that camera is taken in real time; Then earlier this video content is reached in the server; Server is compressed into the video media file that different terminals uses through compression algorithm with video file; And (use different broadcast agreements (http protocol, RTSP agreement, 3GPP agreement, RTP/RTCP agreement, MMS, proprietary protocol) according to different terminals, the initial reproduction time of the video playback address video that will newly produce again is transferred to controlled terminal to be distributed to corresponding streaming media server;
When send between main control terminal and the controlled terminal when the video editing transfer instruction; During the video content that if said video is a system to be provided; The finishes time for the initial reproduction time of the video ID in the server, video and video of main control terminal and Server Transport, video editing information (comprise captions, dub, scribble etc.), server is given controlled terminal with the initial reproduction time of video playback address, video and finishes time, the video editing message transmission of video again.If said video is the video in this machine of main control terminal or passes through the video flowing that camera is taken in real time; Then earlier this video is accomplished this machine editor; Again the video content that edits is reached in the server; Server is compressed into the video media file that different terminals uses through compression algorithm with video file, and is distributed to corresponding streaming media server, and the video playback address transfer that will newly produce is again given controlled terminal;
When send between main control terminal and the controlled terminal instruct for file transfer the time; Through Server Transport between main control terminal and the controlled terminal is the file address in the server; If being file or the terminal in this machine of main control terminal, said file obtains file shared on the network through sharing agreement; Then earlier file is reached in the server, the file address that will newly produce again is transferred to controlled terminal;
What between main control terminal and controlled terminal, send is that voice transfer is instructed; During the voice content that if said voice are system to be provided; Through Server Transport between main control terminal and the controlled terminal is the speech play address in the server; If said voice are voice in this machine of main control terminal or the audio stream that passes through Mike or camera real-time recording, then earlier voice are reached in the server, the speech play address transfer that will newly produce is again given controlled terminal;
When send between main control terminal and the controlled terminal when the information transfer instruction, if the information that system provides, through Server Transport between main control terminal and the controlled terminal is the address of information; If the information on the browser browse network that the user provides through system, the network address through Server Transport between main control terminal and the controlled terminal for the information browsed at browser;
When what send between main control terminal and the controlled terminal is when expressing one's feelings transfer instruction, encoding for expressing one's feelings through Server Transport between main control terminal and the controlled terminal;
When send between main control terminal and the controlled terminal when the paper slip transfer instruction, main control terminal through server directly with the content delivery on the paper slip to controlled terminal;
When send between main control terminal and the controlled terminal for the instruction of long-distance video or speech play the time; Through Server Transport between main control terminal and the controlled terminal is video or voice ID and the initial reproduction time in the server; If said video or voice are video or voice in this machine of main control terminal; Then earlier video or voice are reached in the server; Server is compressed into the audiovisual media file that different terminals uses through compression algorithm with video or voice document, and is distributed to corresponding streaming media server, and the audio frequency and video broadcast address that will newly produce again, the initial reproduction time of audio frequency and video are transferred to controlled terminal;
When main control terminal between controlled terminal, send obtain instruction for video or voice status the time; Controlled terminal is received after this instruction the current state (comprising video or voice ID and video or speech play time) with video or speech play, through Server Transport to main control terminal.
A kind of system of sharing through interaction between the sliding screen realization multi-screen multi-user comprises user terminal and server, and wherein said user terminal is divided into main control terminal and controlled terminal in logic from business;
Wherein, described main control terminal: relative in logic controlled terminal is used for uploading the file content of sharing with the file content on the mode sharing service device of sliding screen or to server, and instructs to the controlled terminal transmission through server;
Described controlled terminal: relative main control terminal in logic, be used for the instruction that reception server is transmitted, and carry out corresponding operating based on instruction, represent or play information or the file content that exists in the server;
Described server: refer to the intermediary service layer; It is the general designation of one group of server; It is the virtual server that property server is perhaps produced by software virtual; Be used to handle and store the file content that upload at each terminal, and the transfer of main control terminal instruction and the transfer of controlled terminal return information, the realization main control terminal is communicated by letter with controlled terminal.
Further, described user terminal is meant mobile phone terminal, PDA portable terminal, panel computer, computer terminal, internet television all-in-one or STB.
Further again; Described server comprises subscriber management server, continued broadcasting server, protocol instructions server, database server, Video processing server, CDN& streaming media server, web service server, Streaming Media processing server etc., is that the server through software virtual provides service under the local area network (LAN) situation.
Wherein, described CDN server is used to store the file medium content that upload at the audiovisual media that provides with dissemination system and terminal, on the task allocation strategy, comprises " property nearby " principle.According to request user's geographical position, the selection net is interior to provide service from its nearest node, avoids occurring the inter-network transfer of data as far as possible.
Described streaming media server (comprise live with program request streaming media server) is responsible for handling and store audiovisual media that the file medium content uploaded at each terminal and system provide and the broadcast that audio and video stream media is provided.Comprise http protocol streaming media server, RTSP protocol streams media server, 3GPP protocol streams media server, MMS streaming media server, RTP/RTCP protocol streams media server, proprietary protocol streaming media server from agreement.Streaming media server be used for to media content gather, buffer memory, scheduling and to the user terminal transmission with play.
Described protocol instructions server is responsible for the transfer of main control terminal instruction and the transfer of controlled terminal return information, and the realization main control terminal is communicated by letter with controlled terminal; The virtual protocol commander server is used for the transfer of main control terminal instruction and the transfer of controlled terminal return information under the local area network (LAN) situation, and the realization main control terminal is communicated by letter with controlled terminal;
Described subscriber management server is realized functions such as the landing of user, registration, good friend's grouping.
Described continued broadcasting server provides watching record of user and breakpoint record, guarantees that the user can realize the continued broadcasting function.
Further again, comprise with lower module in the described Video processing server:
The file receiver module is used to receive the file content that upload at each terminal;
Video coding and compression module, the video that is used for each terminal is uploaded carries out encoding and decoding and compression;
The file distributing module is used for the streaming media server that the video file that compression is good is distributed to different agreement;
The data writing module is used to upload the tracking and the record of data and points out the state after the user uploads;
Further, aforesaid a kind of through realizing the interactive system of sharing between the sliding screen realization multi-screen multi-user, described system comprises system architecture design, terminal room and/or the design of server communications protocol.
Effect of the present invention is: method and system of the present invention are that the switching (sharing) of content between portable terminal, computer, the TV multi-screen (literal, audio frequency and video, file etc.) provides support; Make the user experience smooth and easy that interaction shares; Transmit the instant messaging of main control terminal through intermediary service layer (server or the virtual server that produces by software virtual)
Embodiment
Below in conjunction with Figure of description and embodiment the present invention is done further detailed description.
Of the present invention a kind of as shown in Figure 1 through sliding the realization of shielding the method and system that realize that the multi-screen multiuser interactive is shared, can be divided into two aspects of system architecture and communications protocol, and system architecture can be divided into simple extension type and logical extension type; Communications protocol can be divided into TCP/IP communications protocol, privately owned communications protocol.The TCP/IP communications protocol can be divided into Transmission Control Protocol, udp protocol etc. again; And in Transmission Control Protocol, can adopt concrete communications protocol such as binary message, XMPP agreement, http protocol.
The simple extension type is as shown in Figure 2, and every station server is born whole service logics, is responsible for load balancing by the applications exchange machine, with traffic sharing in the crowd on every station server.
The logical extension type; Expand according to the server logic function; If it is as shown in Figure 3 that the protocol instructions server is carried out logical extension; The protocol instructions server from dividing the different logical function in logic, is expanded like navigation nodes, access node, IM core node, S2S routing node to each function.
Its effect of navigation nodes (Redirect Server) is with the user who newly lands, and according to certain strategy (ip region, system load, user property or the like), the user is guided to the proper service node, to improve user experience.
Navigation clothes node can be divided into overall navigation nodes and local navigation nodes, and it is inner to act on whole server cluster and clustered partition respectively.
The effect of access node (Access Server) is to receive that client connects and request, and with client-requested deliver to the back-end logic server; Before forwarding is submitted, possibly simply judge and logical process client-requested, to reduce the pressure of back-end logic server.
IM core node (IM Core Server) is handled nearly all IM core affairs, such as user's registration, authentification of user, session management, data base querying, deferred information, personal information management, good friend's logic, user message strategy and information inquiry or the like.
The IM core node that S2S routing node (S2S Router) UNICOM cluster is inner all makes that the communication between the IM core node becomes simple: only need send to the S2S route, do forwarding by the S2S route.
Under the environment of mobile phone, computer, TV " three screens merge "; On the network between different screen between single user or multi-user interactive realization of sharing complicated than difficulty; A kind of method and system of sharing through sliding screen realization multi-screen multiuser interactive that the present invention proposes to this problem are just shared to realize the interaction between the multi-screen multi-user.
It is a kind of through the sliding simple logic structured flowchart that shields the system that realizes that the multi-screen multiuser interactive is shared that Fig. 4 shows the present invention, comprising:
Main control terminal 11: user terminal is through network entry server 12 and set up communications protocol with server and be connected.The user of main control terminal 11 sends the content of sharing with the mode of sliding screen to server 12, and sends instruction through server 12 to controlled terminal 13;
Server 12: be used to handle and store the file or the information content of uploading at each terminal, and the transfer of main control terminal instruction and the transfer of controlled terminal return information, the realization main control terminal is communicated by letter with controlled terminal;
Controlled terminal 13: be used to receive server or the instruction of directly sending by main control terminal after, operate accordingly based on instruction, thereby realize that the interaction between single user multiple terminals, between the multi-user multiple terminals shares.
Described server comprises subscriber management server, continued broadcasting server, protocol instructions server, database server, Video processing server, CDN& streaming media server, web service server, Streaming Media processing server, is that the server through software virtual provides service under the local area network (LAN) situation;
Wherein, Described CDN server is used to store the file medium content that upload at the audiovisual media that provides with dissemination system and terminal; On the task allocation strategy, comprise " property nearby " principle; According to request user's geographical position, the selection net is interior to provide service from its nearest node, avoids occurring the inter-network transfer of data as far as possible;
Described streaming media server is responsible for handling and store audiovisual media that the file medium content uploaded at each terminal and system provide and the broadcast that audio and video stream media is provided; Comprise http protocol streaming media server, RTSP protocol streams media server, 3GPP protocol streams media server, MMS streaming media server, RTP/RTCP protocol streams media server, proprietary protocol streaming media server from agreement, streaming media server be used for to media content gather, buffer memory, scheduling and to the user terminal transmission with play;
Described protocol instructions server is responsible for the transfer of main control terminal instruction and the transfer of controlled terminal return information, and the realization main control terminal is communicated by letter with controlled terminal; The virtual protocol commander server is used for the transfer of main control terminal instruction and the transfer of controlled terminal return information under the local area network (LAN) situation, and the realization main control terminal is communicated by letter with controlled terminal;
Described subscriber management server is used to realize the landing of user, registration, good friend's block functions;
Described continued broadcasting server is used to provide watching record of user and breakpoint record, guarantees that the user can realize the continued broadcasting function;
As shown in Figure 8, described Video processing server comprises with lower module:
The file receiver module is used to receive the file content that upload at each terminal;
Video coding and compression module, the video that is used for each terminal is uploaded carries out encoding and decoding and compression;
The file distributing module; Be used for to compress the streaming media server that good video file is distributed to different agreement; Described streaming media server be used for to media content gather, buffer memory, scheduling and play to the user terminal transmission, streaming media server comprises HTTP streaming media server, RTSP streaming media server and 3GPP streaming media server, MMS streaming media server, RTP/RTCP protocol streams media server, proprietary protocol streaming media server.
The data writing module is used to upload the tracking and the record of data and points out the state after the user uploads.
Fig. 5 shows a kind of through the sliding flow chart that shields the method that realizes that the multi-screen multiuser interactive is shared, by finding out that this method may further comprise the steps among the figure:
Step S21: each terminal of main control terminal is set up communications protocol with server and is connected;
User terminal is through network entry or system's automatic login server; Setting up communications protocol TCP with server is connected; Described terminal is divided into main control terminal and controlled terminal in logic from business, and the terminal specifically is meant mobile phone terminal, PDA portable terminal, panel computer, computer terminal, internet television (all-in-one or STB).Described network comprises the Internet, 3G or 4G wireless wide-area communication network (at present China's 3G network has the TD-SCDMA of China Mobile and the CDMA2000 of China Telecom and three kinds of network formats of WCDMA of CHINAUNICOM), wired local area network or WLAN.
Step S22: main control terminal sends to server with instruction;
Main control terminal sends to server with the mode of sliding screen with corresponding instruction; Described mode with sliding screen is meant the mode through finger slip terminal Touch Screen, sliding button, button click; Corresponding instruction is meant the main control terminal user needs information transmitted, comprises authentication information (comprise user log-in authentication and be connected Certificate Authority), system information and point-to-point information.
Step S23: server is forwarded to controlled terminal with instruction;
The file or the information content that upload at server process and each terminal of storage, and the transfer of main control terminal instruction and the transfer of controlled terminal return information, the realization main control terminal is communicated by letter with controlled terminal;
Step S24: controlled terminal carries out corresponding operating after receiving instruction.
Controlled terminal is operated based on instruction after receiving the instruction that server sends accordingly, thereby realizes that the interaction between single user multiple terminals, between the multi-user multiple terminals shares.
Wherein, in the operating process of practical application, set up communications protocol when user terminal and server and be connected; During game server; Server needs the terminal to send the debarkation authentication instruction, have only the debarkation authentication instruction to pass through after, this terminal can receive instruction from server; And operate accordingly according to instruction, as shown in Figure 6.
System serves as the instant messaging that the multiple terminals multi-user is accomplished on the basis with communications protocol (comprise but be not limited to ICP/IP protocol, proprietary protocol).
In the present embodiment, be example with the Transmission Control Protocol binary message in TCP/IP (the Transmission Control Protocol transmission control protocol/Internet Protocol internet interconnection protocol) agreement earlier, describe the realization of the method for the invention and system.
Each terminal (main control terminal and controlled terminal) is after the automatic login of user or system; Setting up TCP with server is connected; Main control end sends to server with corresponding instruction; Server carries out transfer, is broadcast on the online terminal that has connected with service instruction again, after controlled terminal receives instruction, carries out the corresponding action operation.System is that real time content switching (sharing) provides support between portable terminal, computer, the TV multi-screen, transmits request through an intermediary service layer.And then realize the instant messaging at a plurality of terminals.
The base unit that transmits in the agreement is a message, and message is divided into three major types: authentication information, system information and point-to-point information.Article one, complete information is made up of message header and message body, and the type of message that has does not have message body.Data type in the message comprises signless integer Integer type and text type.The information such as total length, type, transmission source ID, message SN that in message header, has comprised message.
Wherein, described message SN sends the source end by message and generates, and in the message queue of source terminal, be unique, and message SN is unmodifiable in the message process of one whole.For example: terminal A sends a piece of news to terminal B.Source ID is the ID of terminal A, and purpose ID is the ID of terminal B, and sequence number is created on sequence number unique among the A of terminal for terminal A.Message is dealt into server, and the server former state is transmitted to terminal B, and terminal B needs to respond this message after receiving message; The source of the receiveing the response ID of this moment is the ID of terminal B, and purpose ID is the ID of terminal A, and sequence number is constant; Message is dealt into server, and the server former state is given terminal A with forwards.
Then source ID or purpose ID represent with 0 if with server communication.For example: terminal A sends the online terminal list message of inquiry to server and obtains the online terminal list of designated user.Source ID is the ID of terminal A, and purpose ID is 0, and the sequence number meaning is constant.Server is responded this message after receiving message, and this moment, source ID was 0, and purpose ID is the ID of terminal A.
In the present embodiment, system information mainly comprises the binding instruction that is used to set up the terminal and connects, be used for cancellation link order that disconnected end connects and the terminal inquiry instruction of inquiring about online terminal list; Point-to-point information comprises the different instruction of the different information of transmission between the terminal, comprises that video transmission instruction, voice transfer instruction, picture transfer instruction, information transfer instruction, expression transfer instruction, paper slip transfer instruction, long-distance video or speech play instruction and video or voice status obtain instruction.
Wherein, For point-to-point information; When send between main control terminal and the controlled terminal instruct for video transmission the time; During the video content that if said video is a system to be provided, main control terminal is video ID and the initial reproduction time of video in the server to Server Transport, and server is transferred to controlled terminal with the initial reproduction time of video playback address video again.If said video is the video in this machine of main control terminal or passes through the video flowing that camera is taken in real time; Then earlier this video content is reached in the server; Server is compressed into the video media file that different terminals uses through compression algorithm with video file; And (use different broadcast agreements (http protocol, RTSP agreement, 3GPP agreement, RTP/RTCP agreement, MMS, proprietary protocol) according to different terminals, the initial reproduction time of the video playback address video that will newly produce again is transferred to controlled terminal to be distributed to corresponding streaming media server;
When send between main control terminal and the controlled terminal when the video editing transfer instruction; During the video content that if said video is a system to be provided; The finishes time for the initial reproduction time of the video ID in the server, video and video of main control terminal and Server Transport, video editing information (comprise captions, dub, scribble etc.), server is given controlled terminal with the initial reproduction time of video playback address, video and finishes time, the video editing message transmission of video again.If said video is the video in this machine of main control terminal or passes through the video flowing that camera is taken in real time; Then earlier this video is accomplished this machine editor; Again the video content that edits is reached in the server; Server is compressed into the video media file that different terminals uses through compression algorithm with video file, and is distributed to corresponding streaming media server, and the video playback address transfer that will newly produce is again given controlled terminal;
When send between main control terminal and the controlled terminal instruct for file transfer the time; Through Server Transport between main control terminal and the controlled terminal is the file address in the server; If being file or the terminal in this machine of main control terminal, said file obtains file shared on the network through sharing agreement; Then earlier file is reached in the server, the file address that will newly produce again is transferred to controlled terminal;
What between main control terminal and controlled terminal, send is that voice transfer is instructed; During the voice content that if said voice are system to be provided; Through Server Transport between main control terminal and the controlled terminal is the speech play address in the server; If said voice are voice in this machine of main control terminal or the audio stream that passes through Mike or camera real-time recording, then earlier voice are reached in the server, the speech play address transfer that will newly produce is again given controlled terminal;
When send between main control terminal and the controlled terminal when the information transfer instruction, if the information that system provides, through Server Transport between main control terminal and the controlled terminal is the address of information; If the information on the browser browse network that the user provides through system, the network address through Server Transport between main control terminal and the controlled terminal for the information browsed at browser;
When what send between main control terminal and the controlled terminal is when expressing one's feelings transfer instruction, encoding for expressing one's feelings through Server Transport between main control terminal and the controlled terminal;
When send between main control terminal and the controlled terminal when the paper slip transfer instruction, main control terminal through server directly with the content delivery on the paper slip to controlled terminal;
When send between main control terminal and the controlled terminal for the instruction of long-distance video or speech play the time; Through Server Transport between main control terminal and the controlled terminal is video or voice ID and the initial reproduction time in the server; If said video or voice are video or voice in this machine of main control terminal; Then earlier video or voice are reached in the server; Server is compressed into the audiovisual media file that different terminals uses through compression algorithm with video or voice document, and is distributed to corresponding streaming media server, and the audio frequency and video broadcast address that will newly produce again, the initial reproduction time of audio frequency and video are transferred to controlled terminal;
When main control terminal between controlled terminal, send obtain instruction for video or voice status the time; Controlled terminal is received after this instruction the current state (comprising video or voice ID and video or speech play time) with video or speech play, through Server Transport to main control terminal.
In the present embodiment, be example with the XMPP agreement in the Transmission Control Protocol again, describe the realization of the method for the invention and system.Adopt ripe instant communication protocol XMPP exploitation, XMPP is a kind of agreement based on XML, and it has inherited in the XML environment expansionary flexibly.Therefore, the application based on XMPP has superpower extensibility.
XMPP (scalable message is handled on-the-spot agreement) is based on the agreement of extend markup language (XML), and it is used for instant message (IM) and online on-the-spot the detection.It is at the accurate real time operation that promotes between the server.This agreement possibly finally allow the Internet user to transfer immediate news to all other men on the internet, even its operating system is different with browser.
XMPP has been accomplished standardization effort by IETF International Standards Organization at present.Standardized core results is divided into two parts:
◆ the XML flow host-host protocol of core
◆ based on the instant messaging expanded application of XML FreeEIM flow transmission
Each terminal (main control terminal and controlled terminal) is after login; Setting up TCP with server is connected; Main control end sends to server with the mode of sliding screen with corresponding instruction; Server carries out transfer, is broadcast on the online terminal that has connected with service instruction again, after controlled terminal receives instruction, carries out the corresponding action operation.System is that real time content switching (sharing) provides support between portable terminal, computer, the internet television multi-screen, transmits request through an intermediary service layer.And then realize the instant messaging at a plurality of terminals.
Login XML asks detailed reference example following in the present embodiment:
User rs authentication is following through detailed reference example in the present embodiment:
The user rs authentication detailed reference example of failing is following in the present embodiment:
It is following to transmit the detailed reference example of sharing video frequency in the present embodiment:
It is following to receive the detailed reference example of sharing video frequency in the present embodiment:
This explanation is an example with the http protocol in the Transmission Control Protocol again, describes the realization of the method for the invention and system.
After client was landed, the interface of server was read in circulation, through judging return value, carried out different operating according to return value, and the communications protocol of client and service end all is the http agreement.
Main control end: after the video playback, send switching command (http get request) with the mode of sliding screen to server, behind the server end record current information, return the server current time and stab, client keeps this timestamp.
Controlled terminal: after the login, create order and read thread, whenever read a server data (http get),, carry out different operating according to return value if return data is not 0 at a distance from 2 seconds.
Terminal and service end use TCP to connect, and send and receive message, and message structure is message size+message body, and message body is the text data of JSON structure.
When being in accepting state, at first read message size, if the data that read greater than 0, continue to receive the data of corresponding size so, it is resolved execution.
When needs send message, at first construct message, send message size then, send source body then.
Because the unsteadiness of network; Service end is connected the situation that improper disconnection may occur with the network at terminal; In order to guarantee the correctness of online tabulation; Server may timed sending the presence of a heartbeat instruction inquiring client terminal, after client is received the heartbeat instruction, need make corresponding response.If server end is found the long-time no response of client, will close current link so.Client needs login once more to carry out communication with other-end.
The mutual employing answer-mode at service end and terminal; After service end (terminal) receives instruction; Service end (terminal) must be returned the message that comprises MsgType and RetCode field, and the RetCode field also is to judge that current message is order or unique foundation of replying.
Every message all comprises a field " MsgType " type of message, and its value is an integer, and the parameter of different messages has nothing in common with each other.Under most of situation, service end is only done the forwards operation, and the message that client is sent can completely be transmitted to other equipment, so can be with reference to sending message structure during the message that client process receives under the most situation.
Application example below in conjunction with concrete is described in more detail the present invention again.
Should with instance with the broadcast of video be transmitted as example and describe.
User terminal is through behind the network login server; If current not displaying video; This user terminal self is video playback and receives prosecutor (controlled terminal) so; Set up communications protocol with the protocol instructions server and be connected, wait for the instruction that other terminal or user send, carry out video request program, break-point continuous playing, live operation after receiving instruction.After carrying out video playback operation, break off with the protocol instructions server is long and being connected, get into armed state, when the mode of main control terminal, the relevant information of current displaying video is sent to server with sliding screen, this machine stops or continuing broadcast based on user's setting simultaneously.Receive the instruction of the displaying video that main control terminal sends when prosecution after; Just can receive the relevant information of this video in the streaming media server: comprise video ID and play zero-time etc.; Carry out the instant online playing of video immediately; The zero-time that play by prosecutor is exactly that time point of current displaying video when sending instruction, and its effect is as shown in Figure 9.
If the video of playing is the video in this machine of main control terminal; Then need master earlier this video to be uploaded to the Video processing server; The file receiver module of server is responsible for uploading and breakpoint transmission work of user; Like Fig. 7 and shown in Figure 8; After video has all been uploaded, change coding and decoding video and compression module over to video is carried out encoding and decoding and compression, will compress the streaming media server that good video file is distributed to different agreement by the file distributing module again and (use in the different broadcast agreements (http protocol, RTSP agreement, 3GPP agreement, RTP/RTCP agreement, MMS, proprietary protocol) according to different terminals; Master just can receive the relevant information of this video in the streaming media server: comprise video ID and play zero-time etc., carry out the broadcast of video.Simultaneously, the data writing module is responsible for data tracking and record, the state after the prompting user uploads.
Method and system of the present invention are not limited only to above-mentioned broadcast and transmission to video, are equally applicable to transmission of Information such as note, picture, file or information.Adopt effect sketch map that method of the present invention carries out picture, file, note transmission respectively like Figure 10, Figure 11, shown in Figure 12.The communication of experiencing network through the characteristics of slip screen combination of touch control screen is convenient, through this method, and sharing fast between the multi-screen multi-user of realization information.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, belong within the scope of claim of the present invention and equivalent technology thereof if of the present invention these are revised with modification, then the present invention also is intended to comprise these changes and modification interior.