Set top box-based high-definition video system and method supporting remote mobile reservation
Technical Field
The invention relates to the technical field of communication, in particular to a set top box system supporting remote mobile reservation high-definition video recording based on a set top box.
Background
The high-definition digital television set top box, as a household appliance which provides comprehensive information service by relying on a television terminal, moves into thousands of households and provides interactive digital entertainment, education and commercial activities for users. At present, various personalized customized services provided for users through set top boxes are greatly developed, the requirements of users on household appliance entertainment are higher and higher, and diversification of the services of the set top boxes aiming at programming of the set top boxes becomes an industry trend.
The functions of the mobile phone as a mobile communication device are increasingly diversified. The remote control is realized by networking mobile terminals such as mobile phones and the like with household appliances, and the intelligent household intelligent control system is a trend of intelligent household development. The high-definition digital set-top box in the broad sense is a network terminal connected with a television, and the communication between the network and a mobile phone becomes the first step of controlling household appliances by the mobile terminal.
At present, a plurality of applications of mobile televisions appear in the market, the applications are low in cost and convenient to carry, but need the support of third-party software, and have the defects of low image resolution, few channels, instability and the like. And the flow required by the mobile phone television is large, and the wireless network bandwidth provided by the current operators in China is difficult to meet the requirements of users on high-definition televisions.
Secondly, the application of controlling the television set top box through a wireless transmission technology in the communication field at present has limitations. The wireless transmission technology mainly comprises infrared, Bluetooth, Wlan and the like, the infrared transmission needs point-to-point operation, the transmission distance is short, and no barrier can be arranged on a transmission route; the Bluetooth transmission distance is short, the safety is weak, and the Bluetooth transmission device is easily interfered by the outside; the hardware equipment of the Wlan is expensive and is not suitable for large-scale popularization. Therefore, these techniques are not suitable for remote control.
Disclosure of Invention
In view of the above, the invention realizes a high-definition video system supporting remote mobile reservation based on the set-top box based on mobile terminal communication and set-top box programming, better meets the requirement of users on high-definition digital television set-top box entertainment, and realizes household appliance intellectualization. The invention is realized in such a way
A high-definition video system supporting remote mobile reservation based on a set top box comprises:
the mobile terminal is used for communication control to realize a remote configuration function and has the function of connecting to the Internet;
and the set top box is used for receiving the control information and realizing the recording function.
Further, the mobile terminal is a remote mobile phone client, and the remote mobile phone client further includes:
the UI module is used for providing a human-computer interaction interface;
the reservation communication module is used for communication between the client and the set top box;
and the mobile phone control module is used for converting the control signal input by the user and carrying out control processing.
Further, the set-top box comprises:
the server is based on the embedded linux platform and used for realizing remote configuration with a remote mobile phone client;
10/100M self-adapting network adapter, which is used to realize connecting to Internet;
and the SATA/IDE external hard disk interface is used for supporting an external large-capacity hard disk of more than 80G to store the recorded high-definition television.
Further, the server includes:
the channel information acquisition module is used for acquiring the information of all current television channels and updating a program list of a set-top box terminal of the set-top box manager at regular time;
the set top box code stream receiving module is used for receiving the high-definition television code stream and storing the high-definition television code stream to an external hard disk;
the set-top box reservation communication module is used for communication between the set-top box and the mobile reservation client;
the video storage module is used for timing tasks of video storage;
and the error processing module is used for processing the condition when the system is abnormal.
Furthermore, the channel information acquisition module of the server is responsible for updating the program list of the set-top box end of the set-top box manager at regular time. The set top box reservation communication module is responsible for network monitoring, when the mobile phone reservation client communication module initiates a request to the set top box through the internet, the set top box reservation communication module allows a mobile phone terminal to access and return a current program list, the mobile phone terminal reservation communication module simultaneously gives the program list to a mobile phone terminal UI module for browsing, the mobile phone terminal control module monitors the setting of a user, encapsulates information corresponding to the result and sends the information to the set top box reservation communication module, the set top box reservation communication module sends the information to the video recording storage module, the video recording storage module inquires the program list, sets a timer, updates a reservation time table, and triggers video recording storage after waiting for program time. And an error processing module at the server end processes emergencies such as communication interruption, set top box control failure, power failure and the like, records error information in a log file, and remotely notifies a user and the like according to a set processing mode in the reservation time table.
Further, the set top box reservation communication module communicates with the mobile terminal through a TCP (stream control transmission protocol). The set-top box reservation communication module provides the following method interfaces for the server or the user to call: the Listen () method is used for continuously monitoring the 8008 port of the TCP by calling an API Socket () interface of the TCP/IP network, returning to true after finding that data is transmitted, and otherwise returning to false for an error processing module; the method of accept () is used for the set-top box server to set up the connection with data, when the socket that the method of accept () monitors receives the connection request, the socket () interface will set up a new socket, link this new socket and request address of the connection process at the same time, set up a input data queue for this socket at the same time, keep the service request that arrives in this queue, until other modules of server process them; the DataRecieve () method is used for receiving data in the accept () method queue; the DataSend () method is used to send the data signal sent by the control module.
Furthermore, the set-top box channel information acquisition module firstly establishes a program list file storage list on a hard disk, and the list is read by a set-top box reservation communication module according to lines and is packaged in an XML form and then returned to a user; when the set-top box reservation communication module receives a user connection request, the module calls a query () method to inquire whether a program list storage file exists, if the program list storage file exists, a file 0 is returned, otherwise, a file-1 is returned; and after receiving the return value 0 of the query () method, calling a createChannel () method, creating a first-in first-out queue by the method, reading the program list files according to lines, sending all the program lists in time sequence in the queue, sending the sequence to a set-top box reservation communication module through a ChannelSend () method, and updating and displaying the sequence to the mobile phone terminal through a UI module.
The code stream receiving module receives video code stream data of a designated program channel by connecting the program channel and stores the video code stream data into an external hard disk, and the video adopts an AVI coding compression format; when the capacity of the hard disk is insufficient, a message is sent to the error processing module.
Furthermore, after the set-top box video recording storage module receives the signal of the set-top box reservation communication module, the query () method is called to carry out the channel list file and return the result; if the query () method returns to 0, the set-top box video recording storage module adds a new task to the task queue, and sets the video recording timer to be consistent with the program time, and when the program starts, the timer is triggered, and the video recording storage module calls the code stream receiving module and starts to record; the set-top box control module is provided with a timer, when a user sends a selection to the channel and starts recording, the module acquires the duration of the video, the timer starts timing recording, and when the time period is used up, the recording is stopped; the user can also set the recording time and the channel in advance by using the mobile terminal, and when the set time is up, the timer starts to record the time.
Furthermore, the mobile phone control module monitors the control signal transmitted by the client through the UI module by a logic _ to _ response () method, and transfers the signal into a file format to be transmitted to the mobile phone reservation communication module by calling a transfer () method; when receiving the data of the communication module reserved by the mobile phone, converting the data into corresponding information through a transfer () method.
The invention has the following beneficial effects:
1. the invention realizes a set top box-based high-definition video system supporting remote mobile reservation, which effectively solves the problem that the favorite television programs cannot be watched in time due to busy modern manual work, records the favorite television programs by reservation setting in advance, has reliability and stability, and only needs small flow for communication.
2. According to the invention, through the good interaction between the mobile phone terminal and the high-definition television set top box, the function of remotely configuring the furniture electrical appliance by the mobile terminal is realized, a good foundation is established for providing more and better applications in the future, and the development direction of smart homes is met.
Drawings
FIG. 1 is an overall modular framework diagram of the system of the present invention;
FIG. 2 is a flow chart between various modules of the system of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Fig. 1 is an overall module block diagram of a set-top box-based system supporting remote mobile subscription high definition video recording according to the present invention, where the hardware architecture based on the present embodiment includes: the mobile phone terminal with the internet access function and the high-definition interactive digital television set-top box with the network interface card are arranged in the mobile phone terminal. The software architecture of the mobile phone terminal comprises: the mobile phone comprises a UI module, a mobile phone reservation communication module and a mobile phone control module; the high-definition digital set-top box is internally provided with a server platform, and the server platform comprises a code stream receiving module, a channel information acquisition module, a reservation communication module, a video recording storage module and an error information processing module.
The implementation mode of the software architecture of the mobile phone terminal is as follows: wherein,
and the UI module is used for operating an interface by a user. The module displays the information required by the user in the form of an html web page. It includes three pages: one page is used for displaying channel list information returned by the set-top box and providing a channel selection function, and then sending user selection information to the mobile phone control module; the second page is used for setting the reserved recording time, a user only needs to set the recording time and channel information in advance, the mobile phone reserved communication module sends the information to the set top box server, and the set top box can automatically record the television program after the time period is up; the third page is used to display error information.
The mobile phone control module monitors a control signal transmitted by a client through the UI module through a click _ to _ response () method, and transfers the signal into a file format to be transmitted to the mobile phone reservation communication module by calling a transfer () method; when receiving the data of the communication module reserved by the mobile phone, converting the data into corresponding information through a transfer () method.
The method comprises the steps that a Listen () method is called by a mobile phone reservation communication module, an 8008 port of a TCP is continuously monitored by calling an APISocket () interface of the TCP/IP network, data transmission is found and then true is returned, otherwise false processing is given by returning false; when a socket monitored by an accept () method receives a connection request, a socket () interface establishes a new socket, simultaneously associates the new socket with the address of a request connection process, simultaneously establishes an input data queue for the socket, and stores an arriving service request in the queue until other modules of a server process the new socket; the DataRecieve () method is used for receiving data in the accept () method queue; the DataSend () method is used to send the data signal sent by the control module.
The set-top box server component implementation is as follows: as shown in fig. 2, in which,
the set-top box reservation communication module communicates with the mobile terminal through a TCP (hypertext transfer protocol). The set-top box reservation communication module provides the following method interfaces for the server or the user to call: the Listen () method is used for continuously monitoring the 8008 port of the TCP by calling an API Socket () interface of the TCP/IP network, returning to true after finding that data is transmitted, and otherwise returning to false for an error processing module; the method of accept () is used for the set-top box server to set up the connection with data, when the socket that the method of accept () monitors receives the connection request, the socket () interface will set up a new socket, link this new socket and request address of the connection process at the same time, set up a input data queue for this socket at the same time, keep the service request that arrives in this queue, until other modules of server process them; the DataRecieve () method is used for receiving data in the accept () method queue; the DataSend () method is used to send the data signal sent by the control module.
The set-top box channel information acquisition module establishes a program list file storage list on the hard disk, and the list is read by the set-top box reservation communication module according to lines and is packaged in an XML form and then returned to a user. When the set-top box reservation communication module receives a user connection request, the module calls a query () method to inquire whether a program list storage file exists, if the program list storage file exists, a file 0 is returned, otherwise, a file-1 is returned; and after receiving the return value 0 of the query () method, calling a createChannel () method, creating a first-in first-out queue by the method, reading the program list files according to lines, sending all the program lists in time sequence in the queue, sending the sequence to a set-top box reservation communication module through a ChannelSend () method, and updating and displaying the sequence to the mobile phone terminal through a UI module.
The code stream receiving module is connected with a designated program channel, receives the television video played at the moment in real time and stores the television video into an external hard disk, and the video adopts an AVI coding compression format; when the capacity of the hard disk is insufficient, a message is sent to the error processing module.
After the video storage module receives the signal of the set-top box reservation communication module, a query () method is called to carry out on the channel list file and the result is returned; if the query () method returns to 0, the set-top box video recording storage module adds a new task to the task queue, and sets the video recording timer to be consistent with the program time, and when the program starts, the timer is triggered, and the video recording storage module calls the code stream receiving module and starts to record; the set-top box control module is provided with a timer, when a user sends a selection to the channel and starts recording, the module acquires the duration of the video, the timer starts timing recording, and when the time period is used up, the recording is stopped; the user can also set the recording time and the channel in advance by using the mobile terminal, and when the set time is up, the timer starts to record the time.
And the error processing module informs the user and reminds the user to take corresponding measures when the application program or hardware has errors, so that the robustness of the program is guaranteed. The error handling includes several errors: InvalidCommandException () user command error; channel exception () is a channel error; TimeException () time set error; ilegalsignalexception () is the set top box is powered off or cannot detect an error; nocapacityexpection () is a hard disk capacity shortage error. The error categories may also be added later depending on the application.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The above description is only exemplary of the present invention and should not be taken as limiting the invention, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present invention should be included in the scope of the present invention.