Long-range mobile reservation high definition video recording system of a kind of support and method based on set-top box
Technical field
The present invention relates to communication technical field, relate in particular to the long-range mobile reservation high-definition videocorder set-top box system of a kind of support based on set-top box.
Background technology
The digital TV in high resolution set-top box relies on the home appliance that television terminal provides the integrated information business as a kind of, comes into huge numbers of families, for the user provides interactively digitlization amusement, education and commercialization activity.Developed greatly for the user provides various personalized subscribed services by set-top box at present, and the user is more and more higher to household electrical appliances amusement requirement, programming makes its service variation become a kind of industrial trend at set-top box.
Mobile phone is as a kind of mobile communication equipment, and function is more and more diversified.By portable terminal and household electrical appliance networking realization Long-distance Control such as mobile phones, be a trend of Smart Home development.Sensu lato high-definition digital set-top box is exactly a network terminal that is connected with TV, and it links network and mobile phone communicates and will become the first step of portable terminal control household electrical appliance.
Occur at present the application of a lot of mobile TVs on the market, this application cost is low, be easy to carry, but but needs the support of third party software, and has shortcomings such as image resolution ratio is low, channel is few, instability.And the needed flow of mobile TV is bigger, and the wireless network bandwidth that present China operator provides is difficult to satisfy the demand of user to HDTV (High-Definition Television).
All there is its limitation the secondly present communications field by the application of Radio Transmission Technology control TV set-top box.That Radio Transmission Technology mainly contains is infrared, bluetooth, Wlan etc., and infrared transmission needs point-to-point operation, and transmission range is short, and barrier can not be arranged on its transmission route; The Bluetooth transmission transmission range is short, and a little less than the fail safe, is subjected to external interference easily; The Wlan hardware device costs an arm and a leg, and is not suitable for promoting on a large scale.Therefore, these technology all are not suitable for Long-distance Control.
Summary of the invention
In view of this, the present invention is based on the programming of communication of mobile terminal and set-top box, realized the long-range mobile reservation high definition video recording system of a kind of support, better met the requirement of user, realized the household appliances intellectuality the amusement of digital TV in high resolution set-top box based on set-top box.The present invention realizes like this
The long-range mobile reservation high definition video recording system of a kind of support based on set-top box comprises:
Portable terminal is used for Control on Communication to realize the Remote configuration function, has the internet function of being connected into;
Set-top box is used for receiving control information and realizes recording function.
Further, described portable terminal is the remote handset client, and this remote handset client further comprises:
The UI module is used to provide the interface of man-machine interaction;
The reservation communication module is used for communicating by letter of client and set-top box;
The mobile phone control module is used for the control signal of converting users input and carries out control and treatment.
Further, described set-top box comprises:
Based on the server of embedded Linux platform, be used for realizing Remote configuration with the remote handset client;
The 10/100M adaptive network adapter is used for realizing being connected into the Internet;
SATA/IDE external hard drive interface is used to support the above big capacity hard disk of external 80G to deposit the HDTV (High-Definition Television) that records.
Further, described server comprises:
The channel information acquisition module is used to gather current all television channel informations and also regularly the rendition list of set-top box supervisor top box end is upgraded;
Set-top box code stream receiver module is used to receive the HDTV (High-Definition Television) code stream and stores external hard drive into;
Set-top box reservation communication module is used for set-top box and moves communicating by letter of reservation client;
The video recording memory module is used to the timed task of recording a video and storing;
The error handling processing module is used for treatment system situation when unusual takes place.
Further, the channel information acquisition module of above-mentioned server is responsible for regularly the rendition list of set-top box supervisor top box end is upgraded.Set-top box reservation communication module is responsible for network monitoring, when mobile phone reservation client communication module by the Internet when set-top box is initiated request, set-top box reservation communication module allows the mobile phone termination to go into, and return current the rendition list, mobile phone end reservation communication module is given the rendition list mobile phone end UI module simultaneously and is given the user and browse, the setting of mobile phone end control module monitoring users, and set-top box reservation communication module will be sent to after the information of correspondence encapsulates as a result, set-top box reservation communication module is delivered to the video recording memory module with information, the video recording memory module is by inquiring about the rendition list, timer is set, and the update reservation timetable, trigger the video recording storage behind the wait Pgmtime.Emergency case such as the error handling processing resume module communicating interrupt of server end, set-top box Control Failure, outage, and error message is recorded in the journal file, and, carry out processing such as remote notification user according to the processing mode that sets in the subscription time table.
Further, set-top box reservation communication module of the present invention communicates by Transmission Control Protocol (SCTP) and portable terminal.Set-top box reservation communication module provides following method interface to call for server or user: Listen () method is used for by calling API the Socket () interface of TCP/IP network, constantly monitor 8008 ports of TCP, discovery has the transfer of data true that comes to return then, provides fault reason module otherwise return fasle; Accept () method is used for set-top-box server and data connect, when the socket that accept () method monitors receives connection request, socket () interface will be set up a new socket, simultaneously the address of this new socket and request connection process is connected, set up an input data queue for this socket simultaneously, the service request that arrives is kept in this formation, up to other resume module of server they; DataRecieve () method is used for receiving the data of accept () method formation; DataSend () method is used to send the data-signal that control module sends over.
Further, set-top box channel information acquisition module of the present invention is at first set up the rendition list file storage tabulation on hard disk, and this tabulation is read by row by set-top box reservation communication module, and to return to the user after the encapsulation of XML form; When set-top box reservation communication module was received user's connection request, whether the inquiry of this module invokes query () method existed the rendition list storage file, found to exist this document then to return 0, otherwise returned-1; After receiving query () method return value 0, call createChannel () method, this method is created a First Input First Output, and by capable the rendition list file that reads, all the rendition lists in chronological sequence, exist in the middle of this formation, this sequence sends to set-top box reservation communication module by ChannelSend () method, and arrives the cell phone terminal by UI module update displayed.
Code stream receiver module of the present invention receives the video codeword data stream of this program channel, and is stored in the external hard drive by connecting the program channel of appointment, and video is taked AVI encoding compression form; When hard-disk capacity is not enough, send a message to the error handling processing module.
Further, after set-top box of the present invention video recording memory module is received the signal of set-top box reservation communication module, call query () method and the channel list file is carried out and the result is returned; If query () method returns 0, set-top box video recording memory module is added to a new task in the middle of the task queue, and the video recording timer is set with the Pgmtime unanimity, when program begins by the time, timer triggers, and the video recording memory module is called the code stream receiver module and begun video recording; This set-top box control module has a timer, and the user sends and selects this channel and this module is obtained this section video when beginning to record duration, and the timer video recording that picks up counting used up when the time period, and video recording stops; The also available portable terminal of user is provided with video time and channel in advance, arrives the timer video recording that picks up counting when set time.
Further, mobile phone control module of the present invention is monitored the control signal that the client passes over by the UI module by clic_to_response () method, and calls transfer () method and signal is changed into file format pass to mobile phone reservation communication module; When receiving the data of mobile phone reservation communication module, be converted to corresponding information by transfer () method.
Beneficial effect of the present invention is as follows:
1, the present invention has realized the long-range mobile reservation high definition video recording system of a kind of support based on set-top box, this system efficiently solves that the modern is busy with one's work and the problem that can not in time watch the TV programme of liking, by shifting to an earlier date book setting the television program record of liking is got off, system has reliability, stability, and only needs very little flow for communication.
2, the present invention passes through the good mutual of cell phone terminal and HDTV (High-Definition Television) set-top box, has realized the function of mobile terminal remote configuration furniture and appliances, has set up good basis for more better application will be provided from now on, has met the direction of Smart Home development.
Description of drawings
Fig. 1 is the integral module frame diagram of system of the present invention;
Fig. 2 is the flow chart between each module of system of the present invention.
Embodiment
The present invention is described further below in conjunction with accompanying drawing.
Fig. 1 is the integral module block diagram of the long-range mobile reservation high definition video recording system of the support based on set-top box of the present invention, this example based on hardware structure comprise: have the cell phone terminal that is connected into internet function and have the high definition interactive digital television set-top box of network interface card network interface.The software architecture of cell phone terminal comprises: UI module, mobile phone reservation communication module and mobile phone control module; Have a server platform in the high-definition digital set-top box, this server platform comprises code stream receiver module, channel information acquisition module, reservation communication module, video recording memory module and error message processing module.
The software architecture execution mode of cell phone terminal is as follows: wherein,
The UI module is used for user interface.This module is with html form web page explicit user information needed.It comprises three pages: page is used for the channel list information that the display machines top box returns and the channel selection function is provided, and selects the user information to send to the mobile phone control module then; Second page is used to set the subscription and video recording time, and the user only need configure video time and channel information in advance, and mobile phone reservation communication module sends to set-top-box server to information, set-top box meeting automatically recording video program using after the time period arrives; The 3rd page is used to show error message.
The mobile phone control module is monitored the control signal that the client passes over by the UI module by click_to_response () method, and calls transfer () method and signal is changed into file format pass to mobile phone reservation communication module; When receiving the data of mobile phone reservation communication module, be converted to corresponding information by transfer () method.
Mobile phone reservation communication module is called Listen () method, and this method is constantly monitored 8008 ports of TCP by calling the APISocket () interface of TCP/IP network, finds to have the transfer of data true that comes to return then, provides fault reason module otherwise return fasle; When the socket that accept () method monitors receives connection request, socket () interface will be set up a new socket, simultaneously the address of this new socket and request connection process is connected, set up an input data queue for this socket simultaneously, the service request that arrives is kept in this formation, up to other resume module of server they; DataRecieve () method is used for receiving the data of accept () method formation; DataSend () method is used to send the data-signal that control module sends over.
Set-top-box server assembly execution mode is as follows: as shown in Figure 2, and wherein,
Set-top box reservation communication module communicates by Transmission Control Protocol (HTML (Hypertext Markup Language)) and portable terminal.Set-top box reservation communication module provides following method interface to call for server or user: Listen () method is used for by calling API the Socket () interface of TCP/IP network, constantly monitor 8008 ports of TCP, discovery has the transfer of data true that comes to return then, provides fault reason module otherwise return fasle; Accept () method is used for set-top-box server and data connect, when the socket that accept () method monitors receives connection request, socket () interface will be set up a new socket, simultaneously the address of this new socket and request connection process is connected, set up an input data queue for this socket simultaneously, the service request that arrives is kept in this formation, up to other resume module of server they; DataRecieve () method is used for receiving the data of accept () method formation; DataSend () method is used to send the data-signal that control module sends over.
Set-top box channel information acquisition module is by setting up the rendition list file storage tabulation on hard disk, this tabulation is read by row by set-top box reservation communication module, and to return to the user after the encapsulation of XML form.When set-top box reservation communication module was received user's connection request, whether the inquiry of this module invokes query () method existed the rendition list storage file, found to exist this document then to return 0, otherwise returned-1; After receiving query () method return value 0, call createChannel () method, this method is created a First Input First Output, and by capable the rendition list file that reads, all the rendition lists in chronological sequence, exist in the middle of this formation, this sequence sends to set-top box reservation communication module by ChannelSend () method, and arrives the cell phone terminal by UI module update displayed.
The code stream receiver module connects the program channel of appointment, receives the television video of playing at that time in real time, and is stored in the external hard drive, and video is taked AVI encoding compression form; When hard-disk capacity is not enough, send a message to the error handling processing module.
After the video recording memory module is received the signal of set-top box reservation communication module, call query () method and the channel list file is carried out and the result is returned; If query () method returns 0, set-top box video recording memory module is added to a new task in the middle of the task queue, and the video recording timer is set with the Pgmtime unanimity, when program begins by the time, timer triggers, and the video recording memory module is called the code stream receiver module and begun video recording; This set-top box control module has a timer, and the user sends and selects this channel and this module is obtained this section video when beginning to record duration, and the timer video recording that picks up counting used up when the time period, and video recording stops; The also available portable terminal of user is provided with video time and channel in advance, arrives the timer video recording that picks up counting when set time.
The error handling processing module is notified the user and is reminded the user to take corresponding measure when application program or hardware make a mistake, and has ensured the robustness of program.Error handling processing comprises following mistake: InvalidCommandException () user command mistake; ChannelException () is a channel error; The TimeException () time is provided with mistake; IllegalSignalException () is that the set-top box outage maybe can not detect mistake; NoCapacityException () is the not enough mistake of hard-disk capacity.Later on can also be according to using the actual error category that increases.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of the foregoing description is to instruct relevant hardware to finish by program, this program can be stored in the computer-readable recording medium, storage medium can comprise: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc.
The above only is embodiments of the invention, not in order to restriction the present invention, all any modifications of being made within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.