Realize the method for video interactive
Technical field
The present invention relates to the multimedia communication technology field, particularly relate to a kind of method that realizes video interactive.
Background technology
Video traffic on the present the Internet mainly provides video request program, and (Video on Demand is VOD) with two kinds of business models of net cast.Video request program is also referred to as the interactive television VOD system, can play corresponding video frequency program according to user's needs, has fundamentally changed the traditional passive pattern of watching of user.Net cast is exactly online live, delays time a little 1-5 minute than live telecast, and it mainly relies on the Internet and Streaming Media to realize live.Video interactive mainly is meant the content interaction of video, refers to can participate in when the user watches video the content of video.Video interactive on the Internet also is in developing stage at present, generally is based on the text interaction mode of video, such as the content evaluation, and degree of liking assessment etc.In the existing video traffic, the real video interactive of also being unrealized.Can not satisfy the demand that the user carries out real-time video interactive, reduce user's network and experienced.
Summary of the invention
(1) technical problem that will solve
At the defective that can not realize video interactive in the existing video traffic, the technical problem to be solved in the present invention is: how a kind of method that realizes video interactive is provided, satisfies the demand that the user carries out real-time video interactive, thereby the network that improves the user is experienced.
(2) technical scheme
For solving the problems of the technologies described above, the invention provides a kind of method that realizes video interactive, this method comprises:
A, video source send the video interactive instruction to video receiver;
B, receive video interactive instruction after, video receiver is according to video interactive instruction carrying out video interactive.
Preferably, before the steps A, this method further comprises:
Step to the encapsulation of video interactive instruction carrying out message.
Preferably, described video interactive instruction message comprises: sequence of message territory, message identification territory, message length territory and data content territory;
The sequence number of described sequence of message domain representation video interactive instruction is used to distinguish the video interactive instruction;
Described message identification territory, the Digital ID of expression video interactive instruction;
Described message length territory, the length of the message data of expression video interactive instruction;
Described data content territory, the particular content information of expression video interactive instruction.
Preferably, described data content comprises: one or more in literal, picture, uniform resource position mark URL, video, the executable code.
Preferably, described steps A specifically comprises:
A1, video source judge whether that the video interactive that exists needs to send instructs, and if there is no, then continue to wait for; Otherwise, enter A2;
A2, video source will need video interactive instruction that sends and the video content that needs send to superpose;
A3, video source are key with the video content that needs send, and the video content of the video interactive instruction that superposeed is encrypted;
The stack that A4, video source will be encrypted the video content of video interactive instruction send to video receiver.
Preferably, described steps A 2 specifically comprises:
Length is superimposed less than the bag of 1280 bytes in video interactive instruction that video source will need to send and the audio, video data bag.
Preferably, described step B specifically comprises:
B1, receive encryption stack behind the video content of video interactive instruction, video receiver is decrypted it;
B2, video receiver separate the video interactive instruction with video content;
B3, video receiver are according to video interactive instruction carrying out video interactive.
Preferably, described step B2 specifically comprises:
Video receiver identifies the data that have the video interactive content by the sign of transmission data, and according to the form of video interactive instruction, instruction separates with video interactive with video content.
Preferably, described video interactive comprises: display ads, show one or more in questionnaire or the demonstration character introduction identical with video content.。
(3) beneficial effect
The present invention proposes the embodiment of the invention and proposed a kind of method that realizes video interactive, the video interactive instruction can arrive receiving terminal simultaneously with video content, very strong ageing and strict the whole network synchronism is arranged, satisfy the instant communicating system demands of applications, thereby the network that improves the user is experienced; Utilize the content of video each video interactive command content to be encrypted, guaranteed the transmission security of video interactive instruction as the encryption key of video interactive instruction.
Description of drawings
Fig. 1 is the method flow diagram of realization video interactive of the present invention;
Fig. 2 is the flow chart that video source sends the video interactive instruction in the inventive method to video receiver;
Fig. 3 is that video receiver is according to the flow chart of video interactive instruction carrying out video interactive after receiving the video interactive instruction in the inventive method.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples are used to illustrate the present invention, but are not used for limiting the scope of the invention.
Main thought of the present invention is: video source judges whether that the video interactive that exists needs to send instructs, and if there is no, then continues to wait for; Otherwise video source will need video interactive instruction that sends and the video content that needs send to superpose; And be key with the video content that needs send, the video content of the video interactive instruction that superposeed is encrypted; The stack that to encrypt at last the video content of video interactive instruction send to video receiver; After receiving the video interactive instruction, video receiver is according to video interactive instruction carrying out video interactive.
The method of realization video interactive provided by the invention is applicable to the video interactive business with high real-time requirement.
Fig. 1 is the method flow diagram of realization video interactive of the present invention.As shown in Figure 1, the method for the invention mainly may further comprise the steps:
Steps A, video source send the video interactive instruction to video receiver.
Before this step, in order to be suitable for transmission of video interaction instruction in network, need encapsulate the video interactive instruction, its encapsulated message form is as shown in table 1:
Sequence of message number |
Message identification |
Message length |
Data content |
Table 1
In table 1, sequence of message number takies four bytes, and the sequence number of expression video interactive instruction has the effect of difference video interactive instruction; Because the unreliability of Network Transmission can overcome the influence of Network Packet Loss to video interactive by the mode that repeatedly sends same video interactive wrapper; Video receiver by the detection of sequence of message number is distinguished the video interactive instruction that receives be same video interactive instruction repeat send or another video interactive instruction; Message identification takies a byte, and the Digital ID of expression video interactive instruction has indicated the corresponding type of this instruction, severity level, and relevant informations such as Executive Module, for example 0x0008 represents that this message is that message is represented in an advertisement; Message length takies a byte, show the instruction of this video interactive message data length.Data content, indefinite length can not surpass 128 bytes at most, and the particular content information for the video interactive instruction specifically comprises: literal, picture, URL(uniform resource locator) (URL), video or executable code (for example JS) etc.
Fig. 2 is the flow chart that video source sends the video interactive instruction in the inventive method to video receiver; Described referring to Fig. 2, this flow process comprises:
Steps A 1, video source judge whether that the video interactive that exists needs to send instructs, and if there is no, then continue to wait for; Otherwise, enter steps A 2;
In this step, described video interactive instruction can be literal or executable code.
Steps A 2, video source will need video interactive instruction that sends and the video content that needs send to superpose;
In this step, concrete stacking method is, video source will need the less bag (less than 1280 bytes) of length in the video interactive instruction that sends and the audio, video data bag, be superimposed, and make interaction instruction and video content transmit together.
Steps A 3, video source are key with the video content that needs send, and the video content of the video interactive instruction that superposeed is encrypted;
In this step, concrete encryption method is to the data of needs transmission, according to selected cryptographic algorithm, to carry out the encryption of data.Available cryptographic algorithm comprises DEA (DES) and RSA etc.
The stack that steps A 4, video source will be encrypted the video content of video interactive instruction send to video receiver.
Step B, receive video interactive instruction after, video receiver is according to video interactive instruction carrying out video interactive.
In this step, if video receiver is only handled first instruction message when receiving a plurality of instruction message with identical sequence of message number, and ignore other instruction message.
Fig. 3 is that video receiver is according to the flow chart of video interactive instruction carrying out video interactive after receiving the video interactive instruction in the inventive method; Described referring to Fig. 3, this flow process comprises:
Step B1, receive encryption stack behind the video content of video interactive instruction, video receiver is decrypted it.
In this step, the method for concrete deciphering is, by with cryptographic algorithm DES for example, corresponding decipherment algorithm such as RSA, to the stack of encrypting the video content of video interactive instruction be decrypted.
Step B2, video receiver separate the video interactive instruction with video content;
In this step, specifically be, video receiver, the sign by the transmission data identifies the data that have the video interactive content, and according to the form of video interactive instruction, instruction separates with video interactive with video content.
Step B3, video receiver is according to video interactive instruction carrying out video interactive.
Described video interactive can show corresponding advertisement for for example, shows questionnaire, shows the character introduction identical with video content etc.
As can be seen from the above embodiments, the embodiment of the invention has proposed a kind of method that realizes video interactive, the video interactive instruction can arrive receiving terminal simultaneously with video content, very strong ageing and strict the whole network synchronism is arranged, satisfy the instant communicating system demands of applications, thereby the network that improves the user is experienced; Utilize the content of video each video interactive command content to be encrypted, guaranteed the transmission security of video interactive instruction as the encryption key of video interactive instruction.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the technology of the present invention principle; can also make some improvement and modification, these improve and modification also should be considered as protection scope of the present invention.