The navigation control method of the IPTV set box browser pageTechnical field
The present invention relates to IPTV set-top box technique field, particularly relate to a kind of navigation control method of the IPTV set box browser page.
Background technology
IPTV is IPTV, is take the telecommunications broadband network as transmission channel, take television set as terminal, provides the technology of the multiple interactive services that comprises television content to the domestic consumer, can watch by the mode of general television set+network machine top box.The integrated digital home terminal that IPTV makes television set become to have communication, the Internet, TV functions.The main feature of IPTV is in its interactivity, has given the user with initiative, directly clicks to select program and broadcast mode by remote controller by the user.Compare with the PC operation, the IPTV set-top box mainly supports by browser, show and also present with form web page, because browser does not have the mouse-keyboard output equipment, the user uses a teleswitch and operates, can not be as random clicking mouse, therefore, EPG (Electronic Program Guide for IPTV, electric program menu) Navigation Control of the page, movement and the page turning demonstration of controlling the focus element node on the EPG page according to the directionkeys of remote controller become extremely important.The sequencing of the logical AND element node of the moving focal point element node of browser engine appearance at present is relevant, be equivalent to only have both direction-front and rear, irrelevant with concrete typesetting display position, therefore, present focus element node can only move forward and backward, can not by to the remote controller reasonable control of directionkeys up and down, realize the focus element node is moved on the adjacent element node of correspondence direction flexibly.
Summary of the invention
The objective of the invention is in order to overcome the deficiency of above-mentioned background technology, a kind of navigation control method of the IPTV set box browser page is provided, can pass through the remote controller reasonable control of directionkeys up and down, realization moves to the focus element node on the adjacent element node of correspondence direction flexibly, good browse displays effect is provided, strengthens the user and experience.
The navigation control method of the IPTV set box browser page provided by the invention comprises the following steps:
The electric program menu EPG page loaded of A, IPTV set box browser but when not showing, analyze the element node on the EPG page, sort and locate the element node element node that direction is adjacent up and down that can obtain focus:
Element node on A1, the analysis EPG page, obtain the node information of the element node of focus: element node upper left corner abscissa, element node upper left corner ordinate, element node width, element node height, currentElement node, and sequentially deposit in an array of pointers;
A2, analyze the node information of each element node in described array of pointers, calculate centre distance and the center angle of each element node and other element nodes of periphery: described node information comprises the Cascading Style Sheet CSS information of element node: the upper left corner coordinate (X of element node, Y), width a, height b, described centre distance is the distance between the center of two element nodes, described center angle is the connecting line and the formed angle of horizontal line that is compared the node element place at two node element centers, when computer center's distance and center angle, with the center of element node (X ', Y ') conduct is with reference to initial point, X '=X+a/2 wherein, Y '=Y+b/2,
A3, according to centre distance and the center angle calculated, determine described each element node element node that direction is adjacent up and down:
Other element nodes in element node to be determined and array of pointers are compared one by one, if judge element node to be determined and be compared between the element node the center angle 0~30 the degree between, determine to be compared the element node that the element node is element node left and right directions to be determined; Otherwise, determine to be compared the element node that the element node is element node above-below direction to be determined;
Further, Correlation Centre distance again: will be compared respectively that on element node and same direction, the centre distance of other element nodes and element node to be determined compares, be the nearest element node of distance element node to be determined if be compared the element node, determining to be compared the element node is the neighborhood of nodes that element node to be determined makes progress the party; Be not the nearest element node of distance element node to be determined if be compared the element node, the node that will be compared on element node and element node other direction to be determined compares;
One by one relatively after, determine the neighborhood of nodes of the four direction up and down of each element node, fill the information of array of pointers corresponding element: the node information of the node information of the adjacent upper direction of currentElement node, the adjacent lower direction of currentElement node, the adjacent left of currentElement node to node information, the node information of the adjacent right of currentElement node;
After B, the described EPG page show, according to the operation of user to the direction key up and down of remote controller, remote controller triggers corresponding button navigation information, after browser receives described button navigation information, the adjacent element node or the page turning that the focus element node are moved to button navigation information correspondence direction show, realize the Navigation Control to EPG page elements node:
B1, browser receive the button navigation information that remote controller triggers;
B2, browser obtain the focus element node on the current EPG page, and determine its position in array of pointers, and whether judgement exists the node information of the adjacent element node of focus element node on button navigation information correspondence direction in array of pointers;
If judging the focus element node, B3 upwards there is no the adjacent element node the party, according to this direction page turning display page content; If there is effective element node after the judgement page turning in the viewing area, determine that first node of this viewing area is the object element node; Otherwise only show the content of pages after page turning;
Upwards there is the adjacent element node in node the party if B4 judges focus element, and this adjacent element node is on current viewing area, with this adjacent element node as the object element node; If judge described adjacent element node not on current viewing area, show according to the content of pages after this direction page turning; If judge described adjacent element node on the viewing area that page turning shows, just with it as the object element node, otherwise only show according to the content of pages after this direction page turning.
The navigation control method of the IPTV set box browser page provided by the invention, by being analyzed with direction, the element node on the EPG page locates, make when the focus element node of the Navigation Control EPG page that uses a teleswitch moves, reach optimum browsing and display effect, even make IPTV user in the situation that do not have mouse arbitrarily to click, also can be by the directionkeys of remote controller, controlling the focus element node rationally moves on each element node of the EPG page, browse displays effect preferably is provided, has strengthened the user and experience.
Description of drawings
Fig. 1 is the flow chart of method step in the embodiment of the present invention;
Fig. 2 is the flow chart that in the embodiment of the present invention, the element node of the EPG page is sorted, locates;
Fig. 3 carries out the flow chart of Navigation Control to the EPG page according to the button navigation information in the embodiment of the present invention.
Embodiment
The present invention is described in further detail below in conjunction with drawings and Examples.
Shown in Figure 1, the embodiment of the present invention provides a kind of navigation control method of the IPTV set box browser page, comprises the following steps:
The EPG page loaded of A, IPTV set box browser but when not showing, first do the preparation of Navigation Control: analyze the element node on the EPG page, the element node element node that direction is adjacent up and down that can obtain focus is sorted and locates;
After B, the EPG page show, according to the operation of user to the direction key up and down of remote controller, remote controller triggers corresponding button navigation information, after browser receives the button navigation information, the adjacent element node or the page turning that the focus element node are moved to button navigation information correspondence direction show, realize the Navigation Control to EPG page elements node.
Shown in Figure 2, steps A specifically comprises the following steps:
Element node on A1, the analysis EPG page, the node information that can obtain the element node of focus sequentially deposits in an array of pointers.
Element information in array of pointers is a structure, and its node information that can store is as follows, and this step has only been filled five of fronts information:
A2, analyze the node information of each element node in array of pointers, calculate centre distance and the center angle of each element node and other element nodes of periphery.
Node information comprises CSS (Cascading Style Sheets, the Cascading Style Sheet) information of element node: the upper left corner coordinate (X, Y) of element node, width a, height b.When computer center's distance and center angle, with the center of element node (X ', Y ') as with reference to initial point, X '=X+Width/2 wherein, Y '=Y+Height/2, i.e. X '=X+a/2, Y '=Y+b/2.Centre distance refers to the distance between the center of two element nodes, and the center angle refers to the connecting line and the formed angle of horizontal line that is compared the node element place at two node element centers.
A3, according to centre distance and the center angle calculated, determine described each element node element node that direction is adjacent up and down.
for example, suppose to determine the adjacent element node of the four direction up and down of element node i, will with array of pointers in other element nodes compare one by one, suppose that one of them element node that is compared is j, the center angle of i and two element nodes of j is between 0 to N °, N can be between 0~45, select N to equal 30 better, for example i is connected with j after the center of a node element connects, this connecting line and the formed angle of i node place horizontal line are less than or equal to 30 °, the line of centres that so just can determine i and j is relatively near the horizontal direction at i place, so just compare these two element nodes on left and right directions, at first element node j is defined as the node on element node i left and right directions, otherwise, at first element node j is defined as the node on element node i above-below direction.Further, Correlation Centre distance again, centre distance with other element nodes on element node j and same direction and element node i compares respectively, if element node j is the element node nearest apart from element node i, element node j is exactly the neighborhood of nodes that element node i makes progress the party; If element node j is not the element node nearest apart from element node i, just the node on element node j and element node i other direction is compared.
One by one relatively after, just can determine the neighborhood of nodes of the four direction up and down of each element node, filled the information of array of pointers corresponding element: upList, downList, leftList, RightList.
Shown in Figure 3, step B specifically comprises the following steps:
B1, browser receive the button navigation information that remote controller triggers.
B2, browser obtain the focus element node on the current EPG page, and definite its position in array of pointers, judgement is in array of pointers, whether there is the node information of the adjacent element node of focus element node on button navigation information correspondence direction, because the adjacent element node that finds, very possible is exactly the next object element node that will navigate to.
Upwards there is no the adjacent element node if B3 judges the focus element node the party, content of pages is shown according to this direction page turning; If there is effective element node after the judgement page turning in the viewing area, determine that first node of this viewing area is the object element node; Otherwise only show according to the content of pages after this direction page turning.
Upwards there is the adjacent element node in node the party if B4 judges focus element, and this adjacent element node is on current viewing area, with this adjacent element node as the object element node; If judge this adjacent element node not on current viewing area, content of pages is shown according to this direction page turning; If judge this adjacent element node on the viewing area that page turning shows, just with it as the object element node, otherwise only show according to the content of pages after this direction page turning.
Obviously, those skilled in the art can carry out various changes and modification and not break away from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of claim of the present invention and equivalent technologies thereof, the present invention also is intended to comprise these changes and modification interior.The content that is not described in detail in this specification belongs to the known prior art of this area professional and technical personnel.