Summary of the invention
The technical problem to be solved in the present invention is, defects for prior art, a kind of virtual key method and television set based on the touch-screen television set is provided, the user is intended to replace traditional television set side button and operating system button with the virtual key that is suspended on the television set touch-screen, so that can finish control to intelligent TV set by touch screen operation.
The technical scheme that technical solution problem of the present invention adopts is as follows:
A kind of virtual key method based on the touch-screen television set wherein, comprises step:
A, set in advance a UI interface that is suspended on the television set touch-screen, described UI comprises one or more virtual key in the interface, sets up the mapping relations of described each virtual key and separately key assignments;
B, unlatching television set enter television set operating system, detect the touch operation instruction that the user touches described UI interface, when receiving the user to the touch operation instruction of described virtual key, be corresponding key assignments according to described mapping relations with described touch operation instruction transformation, and described key assignments is sent to the system for TV set program;
C, system for TV set program are carried out corresponding operation according to described key assignments control television set.
Described virtual key method based on the touch-screen television set, wherein, described step B comprises:
B1, unlatching television set enter television set operating system;
Whether B2, detection user touch described UI interface within the predetermined time, if, enter step B3, otherwise, re-execute step B2;
B3, reception user touch the touch operation instruction at described UI interface, judge the type of described touch operation instruction;
B4, when described touch operation instruction when dragging instruction type, control described UI Interface Moving according to described instruction; When described touch operation instruction is the button operation instruction type, is corresponding key assignments according to described mapping relations with described touch operation instruction transformation, and described key assignments is sent to the system for TV set program.
Described virtual key method based on the touch-screen television set wherein, also comprises in the described steps A:
A1, the first mode that sets in advance described UI interface, the second pattern and three-mode, wherein,
Described first mode is mode standard, comprises one or more virtual key, and the key assignments of described virtual key should with the key-value pair of control television set operating system; Comprise that also is used for controlling the action button that described UI interface enters the second pattern;
Described the second pattern is mode of extension, comprises all virtual keys under the first mode, also comprises a plurality of virtual keys of answering with the key-value pair of control functions of television set; And comprise that is used for controlling the action button that described first mode is returned at described UI interface;
Described three-mode is minimized mode, comprises the action button that the described UI of a control interface enters described first mode.
Described virtual key method based on the touch-screen television set wherein, during the system for TV set initialization, is controlled described UI interface and is entered described three-mode;
Under described three-mode, touch when control enters the action button of described first mode described in the described UI interface if detect the user, control described UI interface and enter described first mode;
At described first mode, when detect the user touch wherein be used for controlling described UI interface and entering the touch operation of action button of the second pattern the time, control described UI interface and enter the second pattern;
In described the second pattern, when detect the user touch wherein be used for controlling described UI interface and returning the touch operation of action button of first mode the time, control described UI interface and return first mode;
Under described first mode or the second pattern, if when not detecting the user in the scheduled time and touching described UI interface, automatically control described UI interface and enter three-mode.
Described virtual key method based on the touch-screen television set, wherein,
The button of described control television set operating system comprises: homepage, return and nearest working procedure;
The button of described control functions of television set is volume plus-minus, channel plus-minus, information source, menu and standby.
A kind of television set that adopts described virtual key method based on the touch-screen television set wherein, comprising:
Module is set, is used for setting in advance a UI interface that is suspended on the television set touch-screen, described UI comprises one or more virtual key in the interface, sets up the mapping relations of described each virtual key and key assignments separately;
Processing module, after being used for television set and entering operating system, detect the touch operation instruction that the user touches described UI interface, when receiving the user to the touch operation instruction of described virtual key, be corresponding key assignments according to described mapping relations with described touch operation instruction transformation, and described key assignments is sent to the system for TV set program;
Operational module is used for the system for TV set program and carries out corresponding operation according to described key assignments control television set.
Described television set, wherein, described processing module comprises:
Detecting unit after be used for opening television set and entering television set operating system, detects the user and whether touches within the predetermined time described UI interface, if, then send with control command to judging unit, otherwise, user's operational order again detected;
Judging unit is used for when receiving the control command that described detecting unit sends, and the reception user touches the touch operation instruction at described UI interface, judges the type of described touch operation instruction, and sends described touch operation instruction and type information thereof to processing unit;
Processing unit, be used for according to described touch operation instruction and type information thereof, if described touch operation instruction for dragging instruction type, is then controlled described UI Interface Moving according to described instruction; If described touch operation instruction is the button operation instruction type, is corresponding key assignments according to described mapping relations with described touch operation instruction transformation then, and described key assignments is sent to the system for TV set program.
Described television set, wherein, the described module that arranges also comprises:
Mode setting unit is for the first mode, the second pattern and the three-mode that set in advance described UI interface; Described first mode is mode standard, comprises one or more virtual key, and the key assignments of described virtual key should with the key-value pair of control television set operating system; Comprise that also is used for controlling the action button that described UI interface enters the second pattern; Described the second pattern is mode of extension, comprises all virtual keys under the first mode, also comprises a plurality of virtual keys of answering with the key-value pair of control functions of television set; And comprise that is used for controlling the action button that described first mode is returned at described UI interface;
Three-mode is minimized mode, comprises the action button that the described UI of a control interface enters described first mode.
Described television set, wherein, described processing module also comprises:
The pattern control unit, be used for when the system for TV set initialization, controlling described UI interface and entering described three-mode; And be used under described three-mode, touch when control enters the action button of described first mode described in the described UI interface if detect the user, control described UI interface and enter described first mode; And be used at described first mode, when detect the user touch wherein be used for controlling described UI interface and entering the touch operation of action button of the second pattern the time, control described UI interface and enter the second pattern; And be used in described the second pattern, when detect the user touch wherein be used for controlling described UI interface and returning the touch operation of action button of first mode the time, control described UI interface and return first mode; And be used under described first mode or the second pattern, if when not detecting the user in the scheduled time and touching described UI interface, automatically control described UI interface and enter three-mode.
Described television set is characterized in that, and is wherein described,
The button of described control television set operating system comprises: homepage, return and nearest working procedure;
The button of described control functions of television set is volume plus-minus, channel plus-minus, information source, menu and standby.
A kind of virtual key method and television set based on the touch-screen television set provided by the present invention, it arranges a UI interface that comprises some virtual keys that suspends by the touch-screen at intelligent TV set, when the user touches described virtual key, receive user's touch operation instruction and be the key assignments of correspondence with described touch operation instruction transformation by default program module, the control television set is carried out corresponding operation according to described key assignments, realized replacing the side button of conventional television and the operating system button on the remote controller with the virtual key that is suspended on the television screen, provide convenience for the user operates television set; And make intelligent television increase new function: can receive the virtual key on user's touch display screen and control the operation that television set is carried out correspondence.Reduce the hardware cost that side button and operating system button are set, also strengthened the appearance looks elegant degree of television set simultaneously.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, clear and definite, developing simultaneously referring to accompanying drawing, the present invention is described in more detail for embodiment.Should be appreciated that specific embodiment described herein only in order to explain the present invention, is not intended to limit the present invention.
See also Fig. 1, Fig. 1 is the flow chart of the embodiment of a kind of virtual key method based on the touch-screen television set of the present invention.In the present embodiment, described virtual key method based on the touch-screen television set may further comprise the steps:
Step S110, set in advance a UI interface that is suspended on the television set touch-screen, described UI comprises one or more virtual key in the interface, sets up the mapping relations of described each virtual key and separately key assignments.
During implementation, namely utilize the touch input capability of television screen, virtual key program module of design in television set; Present a Floating UI interface at the television set touch-screen.
In the present embodiment, also set in advance three kinds of display modes at described UI interface:
Described first mode is mode standard, comprises one or more virtual key, and the key assignments of described virtual key is answered with the key-value pair of control television set operating system, such as the button of the control television set operating systems such as Home, Back, Recent; Comprise that also is used for controlling the action button that described UI interface enters the second pattern; And, also can be to other settings of described virtual key according to concrete needs;
Described the second pattern is mode of extension, namely on all the virtual key bases under the described first mode, also is provided with a plurality of virtual keys of answering with the key-value pair of controlling functions of television set, such as volume plus-minus, channel plus-minus, information source, menu and standby etc.; Other expansion virtual key also can be set according to concrete needs; Comprise that also is used for controlling the action button that described first mode is returned at described UI interface.
Three-mode is minimized mode, such as being rendered as the handle state, comprises the action button that the described UI of a control interface enters described first mode.
During the system for TV set initialization, control described UI interface and enter described three-mode; Under described three-mode, if when detecting the user and touching described in the described UI interface the described UI of control interface and enter the action button of described first mode, control described UI interface and enter described first mode; At described first mode, when detect the user touch wherein be used for controlling described UI interface and entering the touch operation of action button of the second pattern the time, control described UI interface and enter the second pattern; In described the second pattern, when detect the user touch wherein be used for controlling described UI interface and returning the touch operation of action button of first mode the time, control described UI interface and return first mode; Under described first mode or the second pattern, if when not detecting the user in the scheduled time and touching described UI interface, automatically control described UI interface and enter three-mode.And, under arbitrary described pattern, all can all carry out dragging or stopping on screen to described UI interface.
Step S120, unlatching television set enter television set operating system, detect the touch operation instruction that the user touches described UI interface, when receiving that the user touches the operational order of a certain virtual key in the described UI interface, be corresponding key assignments according to described mapping relations with described touch operation instruction transformation, and described key assignments is sent to the system for TV set program.
During implementation, after the unlatching television set enters television set operating system, start a timer, detect the user and whether touch described UI interface in predetermined time at described timer, if not, then restart the touch operation that described timer also detects the user again; If, then receive the touch operation instruction that the user touches described UI interface, judge the type of described touch operation instruction; When described touch operation instruction when dragging instruction type, control described UI Interface Moving according to described instruction; When described touch operation instruction is the button operation instruction type, is corresponding key assignments according to described mapping relations with described touch operation instruction transformation, and described key assignments is sent to the system for TV set program.
Step S130, system for TV set program are carried out corresponding operation according to described key assignments control television set.
In the specific embodiment, as shown in Figure 2, in the television set of Android operating system, the virtual key method based on the touch-screen television set of the present invention can cooperate realization by two concurrent threads, namely at television boot-strap and after entering Android operating system
,Automatic active thread one, be used for controlling described UI interface, as the initialization of handle pattern, mode standard and mode of extension or switching etc. as described in carrying out, while concurrent running thread two, the operation that is used for receiving user's touch screen operation and operates the execution correspondence of control television set and Android system according to described user.Specific as follows.
Shown in Fig. 2 (1), thread one:
10, beginning;
11, default UI module corresponding to described UI interface of control background service initialization, such as the described three kinds of patterns that go out the described UI of initialization interface, to present the described UI interface of associative mode at television screen, simultaneously initialization is used for realizing the control module that drags of described UI interface drag operation;
12, start a timer; The beginning timing;
Does 13, whether the detection user touch the described UI interface on the television screen within the predetermined time? if, enter step 14, otherwise, re-execute step 13;
14, close described timer;
15, receive user's described touch operation instruction, judge the type of described touch operation instruction; If the instruction type of dragging, then execution in step 16, if the virtual key instruction type, then execution in step 18;
16, the described control module that drags touches instruction according to the user to control described UI interface mobile at television screen;
17, unclamp finger when stopping to drag described UI interface when detecting the user, play the animation at the described UI of the stop interface that sets in advance; Return step 12;
18, the virtual key information with user's touch operation sends to thread two, television set is controlled according to described touch operation instruction with notice thread two; Return step 12.
Shown in Fig. 2 (2), thread two:
20, beginning;
21, the keystroke handling module that sets in advance of initialization, described keystroke handling module are used for the key assignments control television set corresponding according to described virtual key;
22, the message of described thread one transmission of monitoring;
23, monitor the virtual key information of user's touch operation of described thread one transmission? if enter step 24, otherwise return step 22;
24, the virtual key information of described user's touch operation of receiving thread one transmission;
25, according to the mapping relations that set in advance, obtain the key assignments corresponding with described virtual key;
26, described key assignments is sent to corresponding system program, carry out corresponding operation with the control television set.Return step 22.
Therefore, when television set starts and enters the Android system, form with background service starts corresponding module and thread, no matter television set is current has moved for which kind of application, described UI interface all is suspended on this application or the video, as long as system does not close, described UI interface will exist always.And, described UI interface small and exquisite flexible, removable, open or dwindle, can automatically rest in the television screen edge, do not affect the operation of current application program.In addition, the method for the invention need not to revise the keystroke handling flow process of Android system itself, therefore can be transplanted to easily in the different television sets.
By the described virtual key method based on the touch-screen television set of above-described embodiment, based on the intelligent television that possesses touch display screen, utilize existing screen touch input capability, can replace being arranged on the physical button on the television set and realizing corresponding function in the prior art by impractical virtual key on the television set touch-screen, provide convenience for the user uses television set.
Based on above-described embodiment, the present invention also provides a kind of portable terminal that adopts the virtual key method based on the touch-screen television set described above, and as shown in Figure 3, the portable terminal of present embodiment comprises:
Module 510 is set, is used for setting in advance a UI interface that is suspended on the television set touch-screen, described UI comprises one or more virtual key in the interface, sets up the mapping relations of described each virtual key and key assignments separately; Specifically as described in the above-mentioned embodiment.
Processing module 520, be used for opening television set and enter television set operating system, detect the touch operation instruction that the user touches described UI interface, when receiving that the user touches the operational order of a certain virtual key in the described UI interface, be corresponding key assignments according to described mapping relations with described touch operation instruction transformation, and described key assignments is sent to the system for TV set journey; Specifically as described in the above-mentioned embodiment.
Operational module 530 is used for the system for TV set program and carries out corresponding operation according to described key assignments control television set; Specifically as described in the above-mentioned embodiment.
Preferably, as shown in Figure 4, described processing module 520 comprises:
Detecting unit 521 after be used for opening television set and entering television set operating system, detects the user and whether touches within the predetermined time described UI interface, if, then send with control command to judging unit, otherwise, user's operational order again detected; Specifically as described in the above-mentioned embodiment.
Judging unit 522, be used for when receiving the control command that described detecting unit sends, receive the touch operation instruction that the user touches described UI interface, judge the type of described touch operation instruction, and send described touch operation instruction and type information thereof to processing unit; Specifically as described in the above-mentioned embodiment.
Processing unit 523, be used for according to described touch operation instruction and type information thereof, if described touch operation instruction for dragging instruction type, is then controlled described UI Interface Moving according to described instruction; If described touch operation instruction is the button operation instruction type, is corresponding key assignments according to described mapping relations with described touch operation instruction transformation then, and described key assignments is sent to the system for TV set program.Specifically as described in the above-mentioned embodiment.
Preferably, the described module kind that arranges also comprises a mode setting unit, is used for setting in advance first mode, the second pattern and the three-mode at described UI interface; Wherein, described first mode is mode standard, comprises one or more virtual key, and the key assignments of described virtual key should with the key-value pair of control television set operating system; Comprise that also is used for controlling the action button that described UI interface enters the second pattern; Described the second pattern is mode of extension, comprises all virtual keys under the first mode, also comprises a plurality of virtual keys of answering with the key-value pair of control functions of television set; And comprise that is used for controlling the action button that described first mode is returned at described UI interface; Three-mode is minimized mode, comprises the action button that the described UI of a control interface enters described first mode.Specifically as described in the above-mentioned embodiment.
Better, as shown in Figure 4, described processing module 520 also comprises:
Pattern control unit 524, be used for when the system for TV set initialization, controlling described UI interface and entering described three-mode; And be used under described three-mode, touch when control enters the action button of described first mode described in the described UI interface if detect the user, control described UI interface and enter described first mode; And be used at described first mode, when detect the user touch wherein be used for controlling described UI interface and entering the touch operation of action button of the second pattern the time, control described UI interface and enter the second pattern; And be used in described the second pattern, when detect the user touch wherein be used for controlling described UI interface and returning the touch operation of action button of first mode the time, control described UI interface and return first mode; Also be used under described first mode or the second pattern, if when not detecting the user in the scheduled time and touching described UI interface, automatically control described UI interface and enter three-mode.
Wherein, the button of described control television set operating system comprises: homepage, return and nearest working procedure etc.; The button of described control functions of television set is volume plus-minus, channel plus-minus, information source, menu and standby etc.
In sum, a kind of virtual key method and television set based on the touch-screen television set provided by the present invention, it arranges a UI interface that comprises some virtual keys that suspends by the touch-screen at intelligent TV set, when the user touches described virtual key, receive user's touch operation instruction and be the key assignments of correspondence with described touch operation instruction transformation by default program module, the control television set is carried out corresponding operation according to described key assignments, realized replacing the side button of conventional television and the operating system button on the remote controller with the virtual key that is suspended on the television screen, provide convenience for the user operates television set; And make intelligent television increase new function: can receive the virtual key on user's touch display screen and control the operation that television set is carried out correspondence.Reduce the hardware cost that side button and operating system button are set, also strengthened the appearance looks elegant degree of television set simultaneously.
Should be understood that application of the present invention is not limited to above-mentioned giving an example, for those of ordinary skills, can be improved according to the above description or conversion that all these improvement and conversion all should belong to the protection range of claims of the present invention.