Summary of the invention
Embodiments provide a kind of control method and system, relevant device of digital television system, the transmitting of control command can be ensured and effectively save operating system internal resource.
The embodiment of the present invention provides a kind of control method of digital television system on the one hand, comprising:
The control command that mobile terminal receive transmits in User Datagram Protocol mode;
Resolve described control command, with obtain comprise in described control command starting character, contrast mark, mobile terminal identification, control command classification, byte number, additional data and check code;
Give described mobile terminal by described contrast mark by response command, with make described mobile terminal verify described contrast mark and the contrast that described mobile terminal stores identify identical after, the described control command of stopping re-transmission;
And, perform corresponding operation according to the control command content of specifying in described additional data.
The embodiment of the present invention provides a kind of control method of digital television system on the other hand, comprising:
Control command is transmitted to digital television system in User Datagram Protocol mode, obtain after making described digital television system resolve described control command comprise in described control command starting character, contrast mark, mobile terminal identification, control command classification, byte number, additional data and check code, and perform according to the control command content of specifying in described additional data and operate accordingly;
Whether receive the described contrast mark that described digital television system transmits, and verify described contrast mark and identify identical with the local contrast stored, if identical, then the described control command of stopping re-transmission is to described digital television system.
The embodiment of the present invention provides a kind of digital television system on the one hand, comprising:
Receiving element, for the control command that mobile terminal receive transmits in User Datagram Protocol mode;
Resolution unit, for resolving described control command, with obtain comprise in described control command starting character, contrast mark, mobile terminal identification, control command classification, byte number, additional data and check code;
Transmission unit, for giving described mobile terminal by described contrast mark by response command, with make described mobile terminal verify described contrast mark and the contrast that described mobile terminal stores identify identical after, the described control command of stopping re-transmission;
Performance element, for performing corresponding operation according to the control command content of specifying in described additional data.
The embodiment of the present invention provides a kind of mobile terminal on the other hand, comprising:
Transmission unit, for transmitting control command to digital television system in User Datagram Protocol mode, obtain after making described digital television system resolve described control command comprise in described control command starting character, contrast mark, mobile terminal identification, control command classification, byte number, additional data and check code, and perform according to the control command content of specifying in described additional data and operate accordingly;
Receiving element, for receiving the described contrast mark that described digital television system transmits;
Whether verification unit, identify identical for verifying described contrast mark with the contrast that this locality stores;
Control unit, for when the check results of described verification unit is for being, controls described transmission unit and stopping retransmitting described control command to described digital television system.
The embodiment of the present invention provides a kind of control system of digital television system on the other hand, comprising:
Digital television system, for the control command that mobile terminal receive transmits in User Datagram Protocol mode; Resolve described control command, with obtain comprise in described control command starting character, contrast mark, mobile terminal identification, control command classification, byte number, additional data and check code; Give described mobile terminal by described contrast mark by response command, and perform corresponding operation according to the control command content of specifying in described additional data;
Mobile terminal, for transmitting described control command in User Datagram Protocol mode to described digital television system, and receive the described contrast mark that described digital television system transmits, and verify described contrast mark and whether identically identify with the local contrast stored, if identical, then stop retransmitting described control command to described digital television system.
In the embodiment of the present invention, udp protocol mode can be adopted between mobile terminal and digital television system to carry out control command transmission, and the contrast mark of resolving the acquisition of this control command can be transferred to mobile terminal by mobile terminal, make mobile terminal verify this contrast mark and the contrast that mobile terminal stores identify identical after, stop retransmitting this control command.As can be seen here, the embodiment of the present invention not only can ensure to adopt udp protocol mode to carry out the reliability of control command transmission, and compared with transmitting with Transmission Control Protocol mode, the embodiment of the present invention can also save operating system internal resource effectively.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Embodiments provide a kind of control method and system, relevant device of digital television system, the transmitting of control command can be ensured and effectively save operating system internal resource.Below be described in detail respectively.
Refer to Fig. 1, Fig. 1 is the flow chart of the control method of a kind of digital television system that the embodiment of the present invention provides.As shown in Figure 1, the control method of this digital television system can comprise the following steps.
101, the control command that transmits in udp protocol mode of digital television system mobile terminal receive.
102, digital television system resolves above-mentioned control command, with obtain comprise in above-mentioned control command starting character, contrast mark, mobile terminal identification, control command classification, byte number, additional data and check code.
103, digital television system by above-mentioned contrast mark by response command to mobile terminal, with make mobile terminal verify above-mentioned contrast mark and the contrast that mobile terminal stores identify identical after, the above-mentioned control command of stopping re-transmission.
104, digital television system performs corresponding operation according to the control command content of specifying in additional data.
Wherein, the sequencing of above-mentioned steps 103 and step 104 is not construed as limiting.
As the optional execution mode of one, the control method of the digital television system shown in Fig. 1 before step 101, can also comprise the following steps:
1), digital television system mobile terminal receive is with the matching instruction of broadcast transmission.
2), digital television system transmission response instruction is to mobile terminal.
In the embodiment of the present invention, mobile terminal, after the response instruction obtaining digital television system transmission, can store the local ip address of digital television system.Further, because mobile terminal has learned the local ip address of digital television system, therefore mobile terminal can adopt clean culture and udp protocol mode to transmit above-mentioned control command to digital television system.
As the optional execution mode of one, the control method of the digital television system shown in Fig. 1, before step 103, can also comprise the following steps:
Digital television system judges that whether above-mentioned starting character is legal, if legal, then performs above-mentioned step 103 and step 104; Otherwise then control command mistake is described, digital television system can stop performing above-mentioned step 103 and step 104.
As the optional execution mode of one, the control method of the digital television system shown in Fig. 1 after step 104, can also comprise the following steps:
Operating result is passed through response command to mobile device by digital television system.
In the embodiment of the present invention, mobile terminal can be as shown in Figure 2 with the form of the control command that udp protocol mode transmits, wherein, control command can comprise the starting character of 16bit, the mobile terminal identification of contrast mark SYN, 256bit of 32bit, the control command classification of 8bit, the byte number of 32bit, the additional data of byte number * 8bit and the check code of 8bit.
Wherein, starting character is mainly used in digital television system and judges that whether the control command that mobile terminal transmits in udp protocol mode is legal.
Wherein, contrast mark SYN is for guaranteeing that mobile terminal carries out the transmitting of control command in udp protocol mode.
After digital television system receives the control command that mobile terminal transmits in udp protocol mode, digital television system can resolve this control command, to obtain this contrast mark SYN, and be transferred to mobile terminal by response instruction ACK, and after mobile terminal receives the contrast mark SYN that digital television system transmits, whether mobile terminal to identify SYN (contrast sent by control command before being namely mobile terminal identifies SYN) identical if can verifying the local contrast stored of this contrast mark SYN and mobile terminal, if identical, then think the control command interaction success of mobile terminal and digital television system, mobile terminal can stop retransmitting above-mentioned control command to digital television system, if not identical, then think that the control command of mobile terminal and digital television system is failed alternately, namely mobile terminal there occurs packet loss phenomenon with the control command that udp protocol mode is transmitted, mobile terminal retransmits above-mentioned control command to digital television system, until the control command interaction success of mobile terminal and digital television system.
Wherein, mobile terminal identification is for representing the identity of mobile terminal.For example, mobile terminal identification can be the sequence number etc. of the IP address of mobile terminal, multimedia access control (MediaAccessControl, MAC) address, mobile terminal.
Wherein, control command classification is that mobile terminal and digital television system both sides consult mutually and the class control command classification defined, and digital television system does different operations according to the difference of control command type.
For example, the kind of control command type can be as shown in table 1:
Table 1
| Control command type | Numerical value | Remarks |
| Response instruction | 1xxx xxxxb | |
| Matching instruction | 01h | Response instruction is 81h |
| Key command | 02h | Response instruction is 82h |
| Input method instruction | 03h | Response instruction is 83h |
| Analog sensor instruction | 04h | Response instruction is 84h |
| Mouse instructions | 05h | Nonreply instruction |
| Tangent screen instruction | 06h | Response instruction is 86h |
| The instruction of traditional method of indicating the pronunciation of a Chinese character screen | 07h | Response instruction is 87h |
| Reserved | 08h-xxh | |
Wherein, the control command content that additional data is used to specify, digital television system can do corresponding operation according to the control command content indicated in additional data.
For example, if the control command type of the control command that mobile terminal transmits in udp protocol mode is key command, the control command content of specifying in the additional data that so digital television system parses is exactly the key value of mobile terminal, correspondingly, digital television system can perform operation corresponding to this key value (as shutdown, start etc.).
Again for example, if the control command type of the control command that mobile terminal transmits in udp protocol mode is the instruction of programme televised live tangent screen, the control command content of specifying in the additional data that so digital television system parses is a json character string, and the formal definition of this json character string is as follows:
“{‘appUrl’:AppUrl,’command’:Command,’parameters’:{‘param_1’:Param_1,…,’param_n’:Param_n}}”
Wherein, digital television system can take out the frequency of program from json character string, symbol rate, modulation system, traffic ID number, video PID and Audio PID, then these fields are assembled into a live page enabling address: " http://<live_play_url>? Frequency=<freqency> & SymbolRate=<symbolRate> & ProgramNumber=<ProgramNumber> & VideoPID=<videoPID> & AudioPID=<audioPID> ", then the corresponding page is jumped to, thus realize the operation of programme televised live tangent screen.
Certainly, if digital television receives is other instruction, then can process according to the rule of other instructions, what such as receive is input method instruction, then can at the present cursor position of corresponding digital TV receiving system, the word of display input.
As can be seen here, in the control method of the digital television system shown in Fig. 1, not only can ensure to adopt udp protocol mode to carry out the reliability of control command transmission, and compared with transmitting with Transmission Control Protocol mode, can also effectively save operating system internal resource.
Refer to Fig. 3, Fig. 3 is the flow chart of the control method of the another kind of digital television system that the embodiment of the present invention provides.As shown in Figure 3, the control method of this digital television system can comprise the following steps.
301, mobile terminal transmits control command to digital television system in udp protocol mode, obtain after making digital television system resolve this control command comprise in this control command starting character, contrast mark, mobile terminal identification, control command classification, byte number, additional data and check code, and perform according to the control command content of specifying in additional data and operate accordingly.
302, the mobile terminal receiving digital television system transfers contrast mark of coming, and verify this contrast mark and whether identically identify with the local contrast stored, if identical, then the above-mentioned control command of stopping re-transmission is to digital television system.
In an embodiment, identify not identical if mobile terminal verifies this contrast mark with the contrast that this locality stores, the control command failure alternately of mobile terminal and digital television system is then described, namely mobile terminal there occurs packet loss phenomenon with the control command that udp protocol mode is transmitted, so mobile terminal can adopt udp protocol mode to pass and retransmit above-mentioned control command to digital television system, until the control command interaction success of mobile terminal and digital television system.
As the optional execution mode of one, the control method of the digital television system shown in Fig. 3, before step 301, can also comprise the following steps:
1), mobile terminal with broadcast transmission matching instruction to digital television system.
2), the mobile terminal receiving digital television system transfers response instruction of coming.
In the embodiment of the present invention, mobile terminal, after the response instruction that acquisition digital television system transmits, can store the local ip address of digital television system.Further, because mobile terminal has learned the local ip address of digital television system, therefore, in above-mentioned steps 301, mobile terminal can adopt clean culture and udp protocol mode to transmit above-mentioned control command to digital television system.
As the optional execution mode of one, the control method of the digital television system shown in Fig. 3 after step 302, can also comprise the following steps:
The response instruction of what mobile terminal receiving digital television system transfers was come carry operating result.
As can be seen here, in the control method of the digital television system shown in Fig. 3, can ensure equally to adopt udp protocol mode to carry out the reliability of control command transmission, and compared with transmitting with Transmission Control Protocol mode, can also effectively save operating system internal resource.
Refer to Fig. 4, Fig. 4 is the structure chart of a kind of digital television system that the embodiment of the present invention provides.As shown in Figure 4, this digital television system can comprise:
Receiving element 401, for the control command that mobile terminal receive transmits in udp protocol mode;
Resolution unit 402, for resolving above-mentioned control command, with obtain comprise in above-mentioned control command starting character, contrast mark, mobile terminal identification, control command classification, byte number, additional data and check code;
Transmission unit 403, for by above-mentioned contrast mark by response command to mobile terminal, with make mobile terminal verify above-mentioned contrast mark and the contrast that mobile terminal stores identify identical after, the above-mentioned control command of stopping re-transmission;
Performance element 404, for performing corresponding operation according to the control command content of specifying in additional data.
In an embodiment, above-mentioned receiving element 401, resolution unit 402, transmission unit 403 and performance element 404 can be arranged in the Set Top Box of digital television system.In another embodiment, if digital television system is the digital TV integrated machine being built-in with Set Top Box, so above-mentioned receiving element 401, resolution unit 402, transmission unit 403 and performance element 404 also can be built in digital TV integrated machine, and the embodiment of the present invention is not construed as limiting.
As the optional execution mode of one, in the digital television system shown in Fig. 4, receiving element 401 is also for before the control command that transmits in udp protocol mode at mobile terminal receive, and mobile terminal receive is with the matching instruction of broadcast transmission; Correspondingly spread out of unit 403 also for transmitting response instruction to mobile terminal.
See also Fig. 5, wherein, Fig. 5 is that the embodiment of the present invention is optimized the digital television system shown in Fig. 4 and the structure chart of the another kind of digital television system obtained.In the digital television system shown in Fig. 5, can also comprise:
Judging unit 405, for judging that whether above-mentioned starting character is legal;
Correspondingly, transmission unit 403 is specifically for when the judged result of judging unit 405 is legal, by contrast mark by response command to mobile terminal, with make mobile terminal verify contrast mark and the contrast that mobile terminal stores identify identical after, stopping Retransmission control instruction.
Correspondingly, performance element 404, specifically for when the judged result of judging unit 405 is legal, performs corresponding operation according to the control command content of specifying in additional data.
As the optional execution mode of one, in the digital television system shown in Fig. 4, Fig. 5, the operating result of performance element also for after performance element 404 is according to the corresponding operation of control command content execution of specifying in additional data, is passed through response command to mobile device by transmission unit 403.
Digital television system shown in Fig. 4, Fig. 5 can ensure to adopt udp protocol mode to carry out the reliability of control command transmission, and compared with transmitting with Transmission Control Protocol mode, can also effectively save operating system internal resource.
Refer to Fig. 6, Fig. 6 is the structure chart of a kind of mobile terminal that the embodiment of the present invention provides.As shown in Figure 6, this mobile terminal can comprise:
Transmission unit 601, for transmitting control command to digital television system in udp protocol mode, obtain after making digital television system resolve this control command comprise in this control command starting character, contrast mark, mobile terminal identification, control command classification, byte number, additional data and check code, and perform according to the control command content of specifying in additional data and operate accordingly;
Receiving element 602, for the contrast mark that receiving digital television system transfers is come;
Verification unit 603, whether the contrast stored for verifying this contrast mark and this locality identifies identical;
Control unit 604, for when the check results of verification unit is for being, controls transfer unit 601 stops retransmitting above-mentioned control command to digital television system.
As the optional execution mode of one, in the mobile terminal shown in Fig. 6, transmission unit 601 also for transmit in udp protocol mode control command to digital television system before, with broadcast transmission matching instruction to digital television system; Correspondingly, receiving element 602 is also for response instruction that receiving digital television system transfers is come.
As the optional execution mode of one, in the mobile terminal shown in Fig. 6, receiving element 602 is also with the response instruction carrying operating result that receiving digital television system transfers is come.
Mobile terminal shown in Fig. 6 can ensure to adopt udp protocol mode to carry out the reliability of control command transmission equally, and compared with transmitting with Transmission Control Protocol mode, can also effectively save operating system internal resource.
Refer to Fig. 7, Fig. 7 is the structure chart of the control system of a kind of digital television system that the embodiment of the present invention provides.As shown in Figure 7, the control system of this digital television system can comprise digital television system 701 and mobile terminal 702, wherein:
Digital television system 701, for the control command that mobile terminal receive 702 transmits in udp protocol mode; Resolve this control command, with obtain comprise in this control command starting character, contrast mark, mobile terminal identification, control command classification, byte number, additional data and check code; By contrast mark by replying command to mobile terminal 702, and perform corresponding operation according to the control command content of specifying in additional data;
Mobile terminal 702, for transmitting above-mentioned control command to digital television system 701 in udp protocol mode, and the contrast mark that receiving digital television system 701 transmits, and verify this contrast mark and whether identically identify with the local contrast stored, if identical, then stop retransmitting above-mentioned control command to digital television system 701.
In the embodiment of the present invention, the structure of above-mentioned digital television system 701 can be identical with the structure of the digital television system shown in Fig. 4, Fig. 5, and the embodiment of the present invention does not repeat.
In the embodiment of the present invention, the structure of above-mentioned mobile terminal 702 can be identical with the structure of the mobile terminal shown in Fig. 6, and the embodiment of the present invention does not repeat.Wherein, mobile terminal 702 can be the mobile terminals such as remote controller, mobile phone, Hand Personal Computer.
As the optional execution mode of one, in the control system of the digital television system shown in Fig. 7, digital television system 701 also for mobile terminal receive 702 with the matching instruction of broadcast transmission, and transmission response instruction to mobile terminal 702; Correspondingly, mobile terminal 702 also for broadcast transmission matching instruction to digital television system 701, and the above-mentioned response instruction that receiving digital television system 701 transmits.
As the optional execution mode of one, in the control system of the digital television system shown in Fig. 7, digital television system 701 is also for passing through response command to mobile device 702 by operating result; Correspondingly, mobile device 702 is also with the response instruction carrying operating result that receiving digital television system 701 transmits.
The control system of the digital television system shown in Fig. 6 can ensure to adopt udp protocol mode to carry out the reliability of control command transmission equally, and compared with transmitting with Transmission Control Protocol mode, can also effectively save operating system internal resource.
The present invention is not only confined to mobile terminal, equipment for connections all in local area network (LAN) is all applicable, as long as the equipment and the digital television system that are connected to digital television system all match, can control figure television system, digital television system in the scope that its performance allows, can support mobile terminal as much as possible.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is that the hardware that can carry out instruction relevant by program has come, this program can be stored in a computer-readable recording medium, storage medium can comprise: flash disk, read-only memory (Read-OnlyMemory, ROM), random access device (RandomAccessMemory, RAM), disk or CD etc.
Above the control method of the digital television system that the embodiment of the present invention provides and system, relevant device are described in detail, apply specific case herein to set forth principle of the present invention and execution mode, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.