Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of real-time video gateway approach and device, guarantees that the user watches the real-time of video frequency program, and reduces the construction cost and the operation cost of communication link.
For achieving the above object, technical scheme of the present invention is achieved in that
The invention provides a kind of real-time video gateway approach, may further comprise the steps:
According to the video request information of client terminal, the video frequency program of search coupling in local two-level cache, when not searching the video frequency program of coupling, to video content server request video frequency program, the video frequency program of the coupling that the receiver, video content server sends;
Behind the video frequency program that obtains mating, video request information according to client terminal, when determining the specification of video frequency program of coupling and client terminal request inequality, with the format conversion of video frequency program of coupling is the specification of client terminal request, be sent to client terminal then and play this video frequency program, when determining specification and client terminal request identical of video frequency program of coupling, directly be sent to client terminal and play this video frequency program.
In the such scheme, the video frequency program of described coupling, for: specification is not less than the video frequency program of the specification of client terminal request.
In the such scheme, after the video frequency program of the coupling that described receiver, video content server sends, further comprise: the video frequency program of the coupling that the store video content server sends in local two-level cache.
In the such scheme, the described video frequency program that search is mated in local two-level cache specifically comprises:
According to the video request information of client terminal, the video frequency program of search coupling in local first order buffer memory,
If search, when then determining the specification of video frequency program of coupling and client terminal request inequality, with the format conversion of video frequency program of coupling is the specification of client terminal request, be sent to client terminal then and play this video frequency program, when determining specification and client terminal request identical of video frequency program of coupling, directly be sent to client terminal and play this video frequency program;
If do not search, the video frequency program of search coupling in the buffer memory of the local second level, if in the buffer memory of the local second level, search, when then determining the specification of video frequency program of coupling and client terminal request inequality, with the format conversion of video frequency program of coupling is the specification of client terminal request, be sent to client terminal then and play this video frequency program, when determining specification and client terminal request identical of video frequency program of coupling, directly be sent to client terminal and play this video frequency program; If in the buffer memory of the local second level, do not search, to video content server request video frequency program.
In the such scheme, described local first order buffer memory is: the local cache of the video playback/cache module of video gateway; Described local second level buffer memory is: the local cache of the video source request/cache module of video gateway.
In the such scheme, described video request information according to client terminal is searched in local two-level cache before the video frequency program of coupling, further comprises: receive the solicited message of client terminal, according to wherein identification information client terminal is carried out authentication.
The present invention also provides a kind of real-time video gateway apparatus, comprising:
The video cache module, be used for the video request information according to client terminal, the video frequency program of search coupling in local two-level cache is not when searching the video frequency program of coupling, to video content server request video frequency program, the video frequency program of the coupling that the receiver, video content server sends; Behind the video frequency program that obtains mating, video request information according to client terminal, when determining the specification of video frequency program of coupling and client terminal request inequality, video frequency program is sent to video conversion module, and the video frequency program after the conversion that video conversion module is sent is sent to client terminal and plays this video frequency program, during the specification of determining the video frequency program received and client terminal request identical, directly be sent to client terminal and play this video frequency program;
Video conversion module is used for the video frequency program that the receiver, video cache module sends, and is the specification of client terminal request with the format conversion of video frequency program, is sent to the video cache module then.
In the such scheme, described video cache module is further used for: the video frequency program of the coupling that the buffer memory video content server sends.
In the such scheme, described device further comprises: the access control module, be used to receive the solicited message that client terminal sends, and according to wherein identification information client terminal is carried out authentication, client terminal is sent to the video cache module by after the authentication with the video request information in the solicited message.
In the such scheme, described video cache module comprises: video playback/cache module and video source request/cache module,
Described video playback/cache module is used for the video request information according to client terminal, the video frequency program of search coupling in local cache; When not searching the video frequency program of coupling,, receive the video frequency program of coupling to the video request information of video source request/cache module transmission client terminal; Behind the video frequency program that obtains mating, video request information according to client terminal, when determining the specification of described video frequency program and client terminal request inequality, video frequency program is sent to video conversion module, and the video frequency program after the conversion that video conversion module is sent is sent to client terminal and plays this video frequency program, during the specification of determining described video frequency program and client terminal request identical, be sent to client terminal and play this video frequency program;
Described video source request/cache module is used for the video request information according to client terminal, the video frequency program of search coupling in local cache; When not searching the video frequency program of coupling, to video content server request video frequency program, the video frequency program of the coupling that the receiver, video content server sends; Behind the video frequency program that obtains mating, video request information according to client terminal, when determining the specification of described video frequency program and client terminal request inequality, described video frequency program is sent to video conversion module, during the specification of determining described video frequency program and client terminal request identical, be sent to client terminal by video playback/cache module and play this video frequency program;
Described video conversion module specifically is used for: the format conversion of the video frequency program that video playback/cache module or video source request/cache module is sent is the specification of client terminal request, is sent to video playback/cache module then.
In the such scheme, described video playback/cache module is further used for the video frequency program that buffer memory is received;
Described video source request/cache module is further used for the video frequency program that the buffer memory video content server sends.
Therefore, real-time video gateway approach provided by the present invention and device have following advantage and characteristics:
By local two-level cache mechanism, reduced the operand that the video format conversion in the video gateway is handled, the hardware cost and the implementation complexity of video gateway have been reduced, make it can satisfy the various video form of client terminal request, and, reduced demand, thereby reduced the transmission network construction cost the communication link transmission bandwidth between video gateway and the video content server; Improved present utilization of network bandwidth, the transmission network bandwidth pressure when alleviating the time to peak section, thus can support the request of more client terminal video playback, guarantee the demand of watching video frequency program in real time.
Embodiment
Basic thought of the present invention is: video gateway is according to the video request information of client terminal, the video frequency program of search coupling in local two-level cache, when not searching the video frequency program of coupling, to video content server request video frequency program, the video frequency program of the coupling that the receiver, video content server sends; Behind the video frequency program that obtains mating, video request information according to client terminal, when determining the specification of video frequency program of coupling and client terminal request inequality, with the format conversion of video frequency program of coupling is the specification of client terminal request, be sent to client terminal then and play this video frequency program, when determining specification and client terminal request identical of video frequency program of coupling, directly be sent to client terminal and play this video frequency program.
Wherein, the video frequency program of described coupling is meant: specification is not less than the video frequency program of the specification of client terminal request.The described video frequency program that obtains mating is the video frequency program that searches coupling or receives the video frequency program of the coupling that video content server sends.
Further, the video gateway video frequency program that the store video content server sends in local two-level cache.
The described video frequency program that search is mated in local two-level cache, specifically comprise: according to the video request information of client terminal, the video frequency program of search coupling in local first order buffer memory, if search, when then determining the specification of video frequency program of coupling and client terminal request inequality, with the format conversion of video frequency program of coupling is the specification of client terminal request, be sent to client terminal then and play this video frequency program, when determining specification and client terminal request identical of video frequency program of coupling, directly be sent to client terminal and play this video frequency program; If do not search, the video frequency program of search coupling in the buffer memory of the local second level, if in the buffer memory of the local second level, search, when then determining the specification of video frequency program of coupling and client terminal request inequality, with the format conversion of video frequency program of coupling is the specification of client terminal request, be sent to client terminal then and play this video frequency program, when determining specification and client terminal request identical of video frequency program of coupling, directly be sent to client terminal and play this video frequency program; If in the buffer memory of the local second level, do not search, to video content server request video frequency program.
The present invention is further described in more detail below in conjunction with drawings and the specific embodiments.
Real-time video gateway approach of the present invention as shown in Figure 1, concrete steps are as follows:
Step 101: after video gateway is received the solicited message of client terminal, client terminal is carried out authentication, if client terminal then enters step 102 by authentication according to wherein identification information; If client terminal by authentication, does not then finish current flow process.
Described request information comprises identification information and video request information.Wherein, identification information is specially information such as user ID, password, after the access control module of video gateway is received the solicited message of client terminal, when client terminal is carried out authentication, whether search exists the user profile of coupling in self stored user information, if exist, then client terminal is sent to video playback/cache module by authentication with the video request information in the solicited message; If there is no, then client terminal does not pass through authentication.
Step 102: video gateway is resolved the video request information of this client terminal, and is the unique client terminal identification number of client terminal distribution the whole network.
Video gateway is resolved video request information and is specifically comprised: after the video playback/cache module of video gateway is received video request information, comprise in the parsing video request information: video frequency program numbering, video image resolution, frame per second, code check, coding protocol etc.
Video gateway allows the video frequency program of the unique multiple different size of client terminal identification number request of each the whole network, uses different client terminals to watch identical or different video frequency programs to support unique user.
Step 103: video gateway is according to the video frequency program numbering that parses, video image resolution, frame per second, code check, coding protocol etc., in local first order buffer memory, search and whether have the video frequency program identical with the specification of client terminal request, if exist, then enter step 108; If there is no, then enter step 104.
Step 103 also can for: video gateway searches whether there be the video frequency program identical with the specification of client terminal request in local first order buffer memory, if there be the video frequency program identical with the specification of client terminal request, then enter step 108; If there is no identical with the specification of client terminal request video frequency program is then searched the video frequency program that whether has the specification that is higher than the client terminal request in local first order buffer memory, if exist, then enter step 107, if there is no, then enters step 104.
In the step 103, the local first order buffer memory of video gateway specifically refers to the local cache of video playback/cache module, if video playback/cache module does not find the video frequency program identical with the specification of client terminal request or is higher than the video frequency program of the specification of client terminal request in local cache, then the video source request/cache module to video gateway sends video request information and client terminal identification number, enters step 104 then; If video playback/cache module finds the video frequency program of the specification that is higher than the client terminal request in local cache, then the video conversion module to video gateway sends video program data and goal standard, enters step 107 then.
Described goal standard specifically is meant the specification of client terminal request.
Step 104: video gateway in the buffer memory of the local second level, search whether exist be not less than, promptly more than or equal to the video frequency program of the specification of client terminal request, if exist, then enter step 107; If there is no, then enter step 105.
Describedly be not less than, more than or equal to the video frequency program of the specification of client terminal request, the frame per second, code check, resolution that specifically is meant video frequency program is all greater than the specification of client terminal request.
Step 104 also can for: video gateway searches whether there be the video frequency program identical with the specification of client terminal request in the buffer memory of the local second level, if there be the video frequency program identical with the specification of client terminal request, then enter step 108; If there is no identical with the specification of client terminal request video frequency program is then searched the video frequency program that whether has the specification that is higher than the client terminal request in the buffer memory of the local second level, if exist, then enter step 107, if there is no, then enters step 105.
In the step 104, the local second level buffer memory of described video gateway specifically refers to the local cache of video source request/cache module, after video source request/cache module is received video request information, parse wherein video frequency program numbering, video image resolution, frame per second, code check, coding protocol etc.
If find the video frequency program of the specification that is not less than the client terminal request in local cache, then the video conversion module to video gateway sends video program data and goal standard, enters step 107 then; If in local cache, do not find the video frequency program of the specification that is not less than the client terminal request, then enter step 105;
Perhaps,
If in local cache, find the video frequency program identical with the specification of client terminal request, then send video program data to video playback/cache module, enter step 108 then; If find the video frequency program of the specification that is higher than the client terminal request in local cache, then the video conversion module to video gateway sends video program data and goal standard, enters step 107 then; If in local cache, do not find the video frequency program of the specification that is higher than the client terminal request, then enter step 105.
Step 105: video gateway sends video request to video content server, comprises the video request information of client terminal and the unique gateway identification number (gateway_ID) of the whole network of this video gateway in this video request, with request corresponding video program; After video content server is received the video request of video gateway, issue specification according to video request information to video gateway and be not less than the video frequency program of being asked.
If video content server at video gateway to its request during video frequency program, directly issue the video frequency program of maximum specification to video gateway, then video gateway can not comprise the video request information of client terminal in the video request that video content server sends.Wherein maximum specification is meant: maximum frame per second, maximal rate, ultimate resolution, coding protocol arbitrarily.
In the step 105, to video content server transmission video request specifically is the video source request/cache module of video gateway.
Step 106: after video gateway is received the video frequency program that video content server issues, compare,, then enter step 108 if identical with the specification of client terminal request; Otherwise enter step 107.
Further, the video gateway video frequency program that the store video content server issues in the buffer memory of the local second level.
After the video source request/cache module of video gateway is received the video frequency program that video content server issues, be stored in local cache, and based on the video request information of client terminal, the specification of the video frequency program received and the specification of client terminal request are compared, if identical, then video program data is directly sent to video playback/cache module; If inequality, then the video conversion module to video gateway sends video program data and goal standard, enters step 107 then.
Step 107: video gateway is according to the video request information of client terminal, is the specification of client terminal request with the format conversion of the video frequency program received.
The video conversion module of video gateway is changed the form of the video frequency program of video source request/cache module transmission according to the video image resolution in the video request information, frame per second, code check, coding protocol etc., make it to meet the specification of client terminal request, the video program data after will changing then is sent to the video playback/cache module of video gateway.
Step 108: video gateway sends to the client terminal of request with video program data, and client terminal is play the video frequency program of being asked.
Further, video gateway is stored the video frequency program after changing in local first order buffer memory.
Particularly, the video playback/cache module of video gateway is directly stored the video frequency program of receiving in local cache, and is sent to the client terminal of request, is play the video frequency program of being asked by client terminal.
Real-time video gateway apparatus of the present invention comprises as shown in Figure 2: video cache module 21 and video conversion module 22.Wherein,
Video cache module 21, be used for the video request information according to client terminal, the video frequency program of search coupling in local two-level cache is not when searching the video frequency program of coupling, to video content server request video frequency program, the video frequency program of the coupling that the receiver, video content server sends; Behind the video frequency program that obtains mating, video request information according to client terminal, when determining the specification of video frequency program of coupling and client terminal request inequality, video frequency program is sent to video conversion module 22, and the video frequency program after the conversion that video conversion module 22 is sent is sent to client terminal and plays this video frequency program, during the specification of determining the video frequency program received and client terminal request identical, directly be sent to client terminal and play this video frequency program;
Video conversion module 22 is used for the video frequency program that receiver, video cache module 21 sends, and is the specification of client terminal request with the format conversion of video frequency program, is sent to video cache module 21 then.
Video cache module 21 is further used for the video frequency program of the coupling of buffer memory video content server transmission.
Described video gateway also comprises access control module 23, be used to receive the solicited message that client terminal sends, according to wherein identification information client terminal is carried out authentication, client terminal is sent to video cache module 21 by after the authentication with the video request information in the solicited message.
Described video cache module 21 can comprise video playback/cache module 211 and video source request/cache module 212, as shown in Figure 3, and wherein,
Video playback/cache module 211 is used for the video request information according to client terminal, the video frequency program of search coupling in local cache; When not searching the video frequency program of coupling, to the video request information of video source request/cache module 212 transmission client terminals, receive the video frequency program of coupling, be sent to client terminal and play this video frequency program; Behind the video frequency program that obtains mating, video request information according to client terminal, when determining the specification of described video frequency program and client terminal request inequality, video frequency program is sent to video conversion module 22, and the video frequency program after the conversion that video conversion module 22 is sent is sent to client terminal and plays this video frequency program, during the specification of determining described video frequency program and client terminal request identical, be sent to client terminal and play this video frequency program;
Video source request/cache module 212 is used for the video request information according to client terminal, the video frequency program of search coupling in local cache; When not searching the video frequency program of coupling, to video content server request video frequency program, the video frequency program of the coupling that the receiver, video content server sends; Behind the video frequency program that obtains mating, video request information according to client terminal, when determining the specification of described video frequency program and client terminal request inequality, described video frequency program is sent to video conversion module 22, during the specification of determining described video frequency program and client terminal request identical, be sent to client terminal by video playback/cache module 211 and play this video frequency program;
The format conversion that video conversion module 22 specifically is used for the video frequency program of video playback/ cache module 211 or 212 transmissions of video source request/cache module is the specification of client terminal request, is sent to video playback/cache module 211 then.
The above video frequency program that obtains mating specifically is meant the video frequency program of video frequency program that searches coupling or the coupling of receiving.
Video playback/cache module 211 is further used for the video frequency program that buffer memory is received.
Video source request/cache module 212 is further used for the video frequency program of the coupling of buffer memory video content server transmission.
In addition, video conversion module 22 can comprise a plurality of video conversion submodules, is used for finishing respectively the format conversion task of different video frequency programs.
Because video source request/cache module 212 also may be through the conversion of video conversion module 22 to the specification of the video frequency program of video playback/cache module 211, as can be seen, the specification of video frequency program of storage is the video frequency program that is not less than storage in video playback/cache module 211 in video source request/cache module 212, therefore, by two-level cache mechanism, reduced number of times in the specific embodiment of the invention to video content server request video frequency program.
The present invention can be applicable to have in the system of real-time video format conversion demand, for example IPTV system, broadcast digital TV VOD video on-demand system, integration of three networks synthetic video service system afterwards etc.When for example the method for this invention and video gateway are applied in the IPTV system, the transmission network bandwidth pressure in the time of can alleviating the time to peak section.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.