A method for automatically finding regional focus in EPG based on IPTV specification

By adopting an automatic regional focus search method based on IPTV specifications in the EPG page and using a threshold optimization algorithm to determine the best focus element, the problem of inflexible focus change effects in the existing technology is solved, and cross-screen focus automatic search and user experience are achieved. promote.

CN115426511BActive Publication Date: 2024-10-01PACO VIDEO TECH (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211070617.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-02
Publication Date
2024-10-01
Estimated Expiration
2042-09-02

AI Technical Summary

Technical Problem

In the existing technology, the focus change effect of the EPG page developed based on JavaScript is not flexible enough and cannot realize automated effects such as circular movement left and right or up and down, resulting in a lack of development efficiency and standardization.

Method used

A method of automatically finding the regional focus of EPG based on IPTV specifications is adopted. By initializing the EPG display area, the virtual design interface is laid out according to the x-axis and y-axis, and the starting point of the movement of the focus element and the coordinates of the looped focus element are calculated, and the threshold is used The optimization algorithm determines the best focus element, realizes the function of automatically finding focus, and supports automatic search for cross-screen focus.

Benefits of technology

It improves the flexibility and accuracy of focus movement, is compatible with absolute layout and relative layout, supports automatic search of cross-screen focus, and improves user experience and development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115426511B_ABST
    Figure CN115426511B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for automatically finding regional focus of EPG based on IPTV specification. It specifically includes the following steps: initializing the unique codes of EPG display area and all focus elements; virtually designing the interface of EPG display area to be laid out according to x-axis and y-axis; when moving upward, setting temporary storage parameters x_temp and y_temp; calculating the coordinates of the midpoint of the upper frame of the starting point of the current focus element movement, and setting the screen resolution threshold distance; looping the focus elements in the EPG display area, calculating the coordinates of the midpoint of the upper frame of the looped focus element; moving downward, left and right in the same principle as above, updating x_temp, y_temp and threshold distance through hierarchical design and nested judgment, and finally calculating the best target focus through the algorithm. The beneficial effects of the present invention are: through the automatic search focus mechanism and simple operation rules, a focus movement method calculated according to rules is realized, which can meet daily product needs and improve user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field related to EPG page processing, and in particular to a method for automatically finding a regional focus of an EPG based on an IPTV specification. Background Art

[0002] Currently, based on JavaScript development, various EPG pages are displayed on set-top boxes. In order to attract users, the requirements for user experience are getting higher and higher, and various requirements are put forward for the focus movement of various EPG elements. Set-top box browsers usually use div elements to achieve the focus element change effect, but this focus change effect is single in function and not flexible enough in IPTV, and it is also impossible to achieve some automatic effects, such as left and right or up and down circular movement effects, which all need to be implemented by writing JavaScript code separately, lacking in development efficiency and standardization. Summary of the invention

[0003] The present invention aims to overcome the deficiency of inflexible focus change effect in the prior art and provides a method for automatically finding regional focus of EPG based on IPTV specification with flexible focus change.

[0004] In order to achieve the above object, the present invention adopts the following technical solutions:

[0005] A method for automatically finding a regional focus in an EPG based on IPTV specifications specifically comprises the following steps:

[0006] (1) Initialize the EPG display area and the unique codes of all focus elements in the EPG display area; virtually design the interface of the EPG display area according to the x-axis and y-axis, take the upper left corner of the EPG display area as the origin (0,0), initialize temporary storage parameters x_temp, y_temp, id_temp, and initialize the screen resolution threshold distance;

[0007] (2) In the EPG display area, the logic of obtaining each element object array in the HTML document is to obtain the element object array from top to bottom and from left to right;

[0008] (3) When moving upward, calculate the coordinates of the midpoint of the upper frame of the starting point of the current focus element, and loop through the focus elements in the EPG display area. If the unique code of the looped focus element is the same as the unique code of the current focus, no processing is performed; otherwise, calculate the coordinates of the midpoint of the upper frame of the looped focus element;

[0009] (4) If the y value of the coordinate of the current focus element is less than or equal to the y value of the coordinate of the middle point of the upper border of the focus element that is cycled, no processing is performed; otherwise, the temporary screen resolution threshold distance_temp is calculated, and the sizes of distance_temp and distance are compared. If distance_temp is greater than or equal to distance, no update operation is performed; if distance_temp is less than distance, x_temp and y_temp are updated to the coordinate of the middle point of the upper border of the focus element that is cycled, id_temp is updated to the unique code of the focus element that is cycled, and distance is updated to distance_temp; until all the focus elements in the EPG display area are cycled, the focus element to be moved is determined, and the realization of automatic search for regional focus is completed;

[0010] (5) When moving downward, calculate the coordinates of the midpoint of the lower border of the starting point of the current focus element, and loop through the focus elements in the EPG display area. If the unique code of the looped focus element is the same as the unique code of the current focus, no processing is performed; otherwise, calculate the coordinates of the midpoint of the lower border of the looped focus element;

[0011] (6) If the y value of the coordinate of the current focus element is greater than or equal to the y value of the coordinate of the midpoint of the bottom border of the focus element that is cycled, no processing is performed; otherwise, the temporary screen resolution threshold distance_temp is calculated, and the sizes of distance_temp and distance are compared. If distance_temp is greater than or equal to distance, no update operation is performed; if distance_temp is less than distance, x_temp and y_temp are updated to the coordinate of the midpoint of the bottom border of the focus element that is cycled, id_temp is updated to the unique code of the focus element that is cycled, and distance is updated to distance_temp; until all the focus elements in the EPG display area are cycled, the focus element to be moved is determined, and the automatic search for the regional focus is completed;

[0012] (7) When moving to the left, calculate the midpoint coordinates of the left frame of the starting point of the current focus element, and loop through the focus elements in the EPG display area. If the unique code of the looped focus element is the same as the unique code of the current focus, no processing is performed; otherwise, calculate the midpoint coordinates of the left frame of the looped focus element;

[0013] (8) If the x value of the coordinate of the current focus element is less than or equal to the x value of the coordinate of the midpoint of the left frame of the focus element that is looped to, no processing is performed; otherwise, the temporary screen resolution threshold distance_temp is calculated, and the sizes of distance_temp and distance are compared. If distance_temp is greater than or equal to distance, no update operation is performed; if distance_temp is less than distance, x_temp and y_temp are updated to the coordinate of the midpoint of the left frame of the focus element that is looped to, id_temp is updated to the unique code of the focus element that is looped to, and distance is updated to distance_temp at the same time; until all the focus elements in the EPG display area are looped through, the focus element to be moved is determined, and the realization of automatically finding the regional focus is completed;

[0014] (9) When moving to the right, calculate the coordinates of the midpoint of the right frame of the starting point of the current focus element, and loop through the focus elements in the EPG display area. If the unique code of the looped focus element is the same as the unique code of the current focus, no processing is performed; otherwise, calculate the coordinates of the midpoint of the right frame of the looped focus element;

[0015] (10) If the x-value of the coordinate of the current focus element is greater than or equal to the y-value of the midpoint coordinate of the right frame of the focus element that is looped to, no processing is performed; otherwise, the temporary screen resolution threshold distance_temp is calculated, and the sizes of distance_temp and distance are compared. If distance_temp is greater than or equal to distance, no update operation is performed; if distance_temp is less than distance, x_temp and y_temp are updated to the midpoint coordinate of the right frame of the focus element that is looped to, id_temp is updated to the unique code of the focus element that is looped to, and distance is updated to distance_temp at the same time; after all the focus elements in the EPG display area are looped through, the focus element to be moved is determined, and the automatic search for the regional focus is completed.

[0016] In the above operation method, it is necessary to compare x and y first, among which left and right movement is compared with x, and up and down movement is compared with y, because this will save unnecessary calculation processes in terms of performance, and the screen resolution threshold is used as an auxiliary calculation method to enhance accuracy, and the judgment logic for movement in other directions is similar. The present application introduces and defines a method of automatically searching for focus through a mechanism and simple calculation rules, and implements nested judgments in accordance with a hierarchical design. Finally, the optimal target focus is calculated through the algorithm, and a focus movement method calculated according to rules is implemented, which can meet daily product needs and enhance user experience. This method improves the accuracy of search focus through a threshold optimization algorithm; this method is compatible with absolute layout and relative layout; this method supports automatic focus search across screens (waterfall flow, screen scrolling).

[0017] Preferably, the EPG display area refers to the area containing all focus elements; the unique coding of the focus element refers to assigning a unique id to each focus element, and the javascript specification used by the EPG supports it by default; the rule for the unique coding of the focus element is defined as: the element with a unique code is identified as the focus through the EPG tag style, and the EPG display area needs to uniformly use the same standard; the three values ​​of the temporary storage parameter variables x_temp, y_temp, and id_temp are empty or default to the current focus x, y, and id, which are used to temporarily store virtual coordinates and virtual ids, so as to facilitate comparison with other focus elements to select the target focus for the best moving solution; the initialized screen resolution threshold distance = (screen resolution width-upper left corner origin horizontal coordinate) * (screen resolution height-upper left corner origin vertical coordinate).

[0018] Preferably, in step (3), the focus element in the loop area refers to the identification of the focus element in the EPG display area through rule definition, and the x value and y value of the coordinates of the midpoint of the upper border of the current focus element are defined.

[0019] The x value of the coordinate of the middle point of the top border of the current focus element = the current focus HTMLElement.left attribute value + (the current focus HTMLElement.offsetWidth attribute value / 2);

[0020] The y value of the midpoint of the top border of the current focus element = the value of the HTMLElement.top attribute of the current focus;

[0021] Define the xn and yn coordinates of the midpoint of the top border of the focus element to be looped.

[0022] The coordinate xn value of the midpoint of the upper border of the looped focus element = the looped focus HTMLElement.left attribute value + (the looped focus HTMLElement.offsetWidth attribute value / 2);

[0023] The coordinate yn of the midpoint of the top border of the focus element looped to = the value of the HTMLElement.top attribute of the focus element looped to;

[0024] Among them, n refers to 1.2.3...N-1, N refers to the total number of all focus elements in the EPG display area, the x value of the midpoint coordinate of the upper border of the current focus element, the y value of the midpoint coordinate of the upper border of the current focus element, the xn value of the midpoint coordinate of the upper border of the focus element to be cycled, and the yn value of the midpoint coordinate of the upper border of the focus element to be cycled are all absolute values, HTMLElement.left refers to the absolute distance relative to the left border of the screen, HTMLElement.offsetWidth refers to the width of the focus element, and HTMLElement.top refers to the absolute distance relative to the top border of the screen.

[0025] Preferably, in step (4), the temporary screen resolution threshold distance_temp is calculated = the absolute value of (the x value of the midpoint coordinate of the upper border of the current focus element - the xn value of the midpoint coordinate of the upper border of the focus element that is cycled to) * (the y value of the midpoint coordinate of the upper border of the current focus element - the yn value of the midpoint coordinate of the upper border of the focus element that is cycled to).

[0026] Preferably, in step (5), the focus element in the loop area refers to the identification of the focus element in the EPG display area through rule definition, and the x value and y value of the midpoint coordinate of the lower border of the current focus element are defined.

[0027] The x value of the coordinate of the middle point of the bottom border of the current focus element = the current focus HTMLElement.left attribute value + (the current focus HTMLElement.offsetWidth attribute value / 2);

[0028] The y value of the midpoint of the bottom border of the current focus element = the current focus HTMLElement.top attribute value + the current focus HTMLElement.offsetHeight attribute value;

[0029] Define the xn and yn coordinates of the midpoint of the bottom border of the focus element to be looped.

[0030] The coordinate xn value of the midpoint of the bottom border of the looped focus element = the looped focus HTMLElement.left attribute value + (the looped focus HTMLElement.offsetWidth attribute value / 2);

[0031] The coordinate yn value of the midpoint of the bottom border of the cycled focus element = the attribute value of the cycled focus HTMLElement.top + the attribute value of the cycled focus HTMLElement.offsetHeight;

[0032] Among them, n refers to 1.2.3...N-1, N refers to the total number of all focus elements in the EPG display area, the x value of the midpoint coordinate of the bottom border of the current focus element, the y value of the midpoint coordinate of the bottom border of the current focus element, the xn value of the midpoint coordinate of the bottom border of the focus element that is cycled to, and the yn value of the midpoint coordinate of the bottom border of the focus element that is cycled to are all absolute values, HTMLElement.left refers to the absolute distance relative to the left border of the screen, HTMLElement.offsetWidth refers to the width of the focus element, HTMLElement.top refers to the absolute distance relative to the top border of the screen, and HTMLElement.offsetHeight refers to the height of the focus element.

[0033] Preferably, in step (6), the temporary screen resolution threshold distance_temp is calculated = the absolute value of (the x value of the midpoint coordinate of the bottom border of the current focus element - the xn value of the midpoint coordinate of the bottom border of the focus element that is cycled to) * the absolute value of (the y value of the midpoint coordinate of the bottom border of the current focus element - the yn value of the midpoint coordinate of the bottom border of the focus element that is cycled to).

[0034] Preferably, in step (7), the focus element in the loop area refers to identifying the focus element in the EPG display area through rule definition, defining the x value and y value of the midpoint coordinate of the left frame of the current focus element,

[0035] The x value of the midpoint of the left frame of the current focus element = the value of the current focus HTMLElement.left attribute;

[0036] The y value of the midpoint of the left frame of the current focus element = the current focus HTMLElement.top attribute value + (the current focus HTMLElement.offsetHeight attribute value / 2);

[0037] Define the xn and yn coordinates of the midpoint of the bottom border of the focus element to be looped.

[0038] The xn value of the midpoint of the bottom border of the focus element that is cycled to = the left attribute value of the focus HTMLElement that is cycled to;

[0039] The coordinate yn value of the midpoint of the bottom border of the cycled focus element = the cycled focus HTMLElement.top attribute value + (the cycled focus HTMLElement.offsetHeight attribute value / 2);

[0040] Among them, n refers to 1.2.3...N-1, N refers to the total number of all focus elements in the EPG display area, the x value of the midpoint coordinate of the left frame of the current focus element, the y value of the midpoint coordinate of the left frame of the current focus element, the xn value of the midpoint coordinate of the bottom border of the focus element that is cycled to, and the yn value of the midpoint coordinate of the bottom border of the focus element that is cycled to are all absolute values, HTMLElement.left refers to the absolute distance relative to the left border of the screen, HTMLElement.top refers to the absolute distance relative to the top border of the screen, and HTMLElement.offsetHeight refers to the height of the focus element.

[0041] Preferably, in step (8), the temporary screen resolution threshold distance_temp is calculated = the absolute value of (the x value of the midpoint coordinate of the left frame of the current focus element - the xn value of the midpoint coordinate of the lower frame of the focus element that is cycled to) * (the y value of the midpoint coordinate of the left frame of the current focus element - the yn value of the midpoint coordinate of the lower frame of the focus element that is cycled to).

[0042] Preferably, in step (9), the focus element in the loop area refers to identifying the focus element in the EPG display area through rule definition, defining the x value and y value of the midpoint coordinate of the right frame of the current focus element,

[0043] The x value of the midpoint of the right frame of the current focus element = the current focus HTMLElement.left attribute value + the current focus HTMLElement.offsetWidth attribute value;

[0044] The y value of the midpoint of the right frame of the current focus element = the current focus HTMLElement.top attribute value + (the current focus HTMLElement.offsetHeight attribute value / 2);

[0045] Define the xn and yn coordinates of the midpoint of the bottom border of the focus element to be looped.

[0046] The coordinate xn value of the midpoint of the bottom border of the cycled focus element = the attribute value of the cycled focus HTMLElement.left + the attribute value of the cycled focus HTMLElement.offsetWidth;

[0047] The coordinate yn value of the midpoint of the bottom border of the cycled focus element = the cycled focus HTMLElement.top attribute value + (the cycled focus HTMLElement.offsetHeight attribute value / 2);

[0048] Among them, n refers to 1.2.3...N-1, N refers to the total number of all focus elements in the EPG display area, the x value of the midpoint coordinate of the right frame of the current focus element, the y value of the midpoint coordinate of the right frame of the current focus element, the xn value of the midpoint coordinate of the bottom frame of the focus element that is cycled to, and the yn value of the midpoint coordinate of the bottom frame of the focus element that is cycled to are all absolute values, HTMLElement.left refers to the absolute distance relative to the left frame of the screen, HTMLElement.offsetWidth refers to the width of the focus element, HTMLElement.top refers to the absolute distance relative to the top frame of the screen, and HTMLElement.offsetHeight refers to the height of the focus element.

[0049] Preferably, in step (10), the temporary screen resolution threshold distance_temp is calculated as follows: (the absolute value of the midpoint coordinate x value of the right frame of the current focus element - the absolute value of the midpoint coordinate x value of the lower frame of the focus element that is cycled to) * (the absolute value of the midpoint coordinate y value of the right frame of the current focus element - the absolute value of the midpoint coordinate yn value of the lower frame of the focus element that is cycled to).

[0050] The beneficial effects of the present invention are: improving the accuracy of search focus through a threshold optimization algorithm; being compatible with absolute layout and relative layout; supporting automatic focus search across screens (waterfall flow, screen scrolling), and realizing a focus movement method calculated according to rules, which can meet daily product needs and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a schematic diagram of the distribution of focus elements of an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.

[0053] A method for automatically finding a regional focus in an EPG based on IPTV specifications specifically comprises the following steps:

[0054] (1) Initialize the EPG display area and the unique codes of all focus elements in the EPG display area; virtually design the interface of the EPG display area according to the x-axis and y-axis, take the upper left corner of the EPG display area as the origin (0,0), initialize temporary storage parameters x_temp, y_temp, id_temp, and initialize the screen resolution threshold distance;

[0055] The EPG display area refers to the area containing all focus elements; the unique coding of the focus element refers to assigning a unique id to each focus element, and the javascript specification used by EPG supports it by default; the rule for the unique coding of the focus element is defined as: the element with a unique code is identified as the focus through the EPG tag style, and the EPG display area needs to use the same standard (for example, class="item", the specific identification method is not limited); the three values ​​of the temporary storage parameters of the variables x_temp, y_temp, and id_temp are empty or default to the x, y, and id of the current focus, which is used to temporarily store virtual coordinates and virtual ids, so as to facilitate comparison with other focus elements to select the target focus of the best moving solution; the initialized screen resolution threshold distance = (screen resolution width-upper left corner origin horizontal coordinate) * (screen resolution height-upper left corner origin vertical coordinate).

[0056] (2) In the EPG display area, the logic of obtaining each element object array in the HTML document is to obtain the element object array from top to bottom and from left to right;

[0057] (3) When moving upward, calculate the coordinates of the midpoint of the upper frame of the starting point of the current focus element, and loop through the focus elements in the EPG display area. If the unique code of the looped focus element is the same as the unique code of the current focus, no processing is performed; otherwise, calculate the coordinates of the midpoint of the upper frame of the looped focus element;

[0058] The focus element in the loop area refers to the identification of the focus element in the EPG display area through rule definition (for example, obtaining all div elements with the style class="item" described above), defining the x value and y value of the midpoint coordinate of the top border of the current focus element,

[0059] The x value of the coordinate of the middle point of the top border of the current focus element = the current focus HTMLElement.left attribute value + (the current focus HTMLElement.offsetWidth attribute value / 2);

[0060] The y value of the midpoint of the top border of the current focus element = the value of the HTMLElement.top attribute of the current focus;

[0061] Define the xn and yn coordinates of the midpoint of the top border of the focus element to be looped.

[0062] The coordinate xn value of the midpoint of the upper border of the looped focus element = the looped focus HTMLElement.left attribute value + (the looped focus HTMLElement.offsetWidth attribute value / 2);

[0063] The coordinate yn of the midpoint of the top border of the focus element looped to = the value of the HTMLElement.top attribute of the focus element looped to;

[0064] Among them, n refers to 1.2.3...N-1, N refers to the total number of all focus elements in the EPG display area, the x value of the midpoint coordinate of the upper border of the current focus element, the y value of the midpoint coordinate of the upper border of the current focus element, the xn value of the midpoint coordinate of the upper border of the focus element to be cycled, and the yn value of the midpoint coordinate of the upper border of the focus element to be cycled are all absolute values, HTMLElement.left refers to the absolute distance relative to the left border of the screen, HTMLElement.offsetWidth refers to the width of the focus element, and HTMLElement.top refers to the absolute distance relative to the top border of the screen.

[0065] (4) If the y value of the coordinate of the current focus element is less than or equal to the y value of the coordinate of the middle point of the upper border of the focus element that is cycled to, no processing is performed; otherwise, the temporary screen resolution threshold distance_temp is calculated, and the sizes of distance_temp and distance are compared. If distance_temp is greater than or equal to distance, no update operation is performed; if distance_temp is less than distance, x_temp and y_temp are updated to the coordinate of the middle point of the upper border of the focus element that is cycled to, id_temp is updated to the unique code of the focus element that is cycled to, and distance is updated to distance_temp at the same time; after all the focus elements in the EPG display area are cycled through, the focus element to be moved is determined, and the automatic search for regional focus is completed; the temporary screen resolution threshold distance_temp is calculated = (the x value of the middle point of the upper border of the current focus element - the xn value of the middle point of the upper border of the focus element that is cycled to) * (the y value of the middle point of the upper border of the current focus element - the yn value of the middle point of the upper border of the focus element that is cycled to).

[0066] (5) When moving downward, calculate the coordinates of the midpoint of the lower border of the starting point of the current focus element, and loop through the focus elements in the EPG display area. If the unique code of the looped focus element is the same as the unique code of the current focus, no processing is performed; otherwise, calculate the coordinates of the midpoint of the lower border of the looped focus element;

[0067] The focus element in the loop area refers to the identification of the focus element in the EPG display area through rule definition, and defines the x value and y value of the midpoint coordinate of the bottom border of the current focus element.

[0068] The x value of the coordinate of the middle point of the bottom border of the current focus element = the current focus HTMLElement.left attribute value + (the current focus HTMLElement.offsetWidth attribute value / 2);

[0069] The y value of the midpoint of the bottom border of the current focus element = the current focus HTMLElement.top attribute value + the current focus HTMLElement.offsetHeight attribute value;

[0070] Define the xn and yn coordinates of the midpoint of the bottom border of the focus element to be looped.

[0071] The coordinate xn value of the midpoint of the bottom border of the looped focus element = the looped focus HTMLElement.left attribute value + (the looped focus HTMLElement.offsetWidth attribute value / 2);

[0072] The coordinate yn value of the midpoint of the bottom border of the cycled focus element = the attribute value of the cycled focus HTMLElement.top + the attribute value of the cycled focus HTMLElement.offsetHeight;

[0073] Among them, n refers to 1.2.3...N-1, N refers to the total number of all focus elements in the EPG display area, the x value of the midpoint coordinate of the bottom border of the current focus element, the y value of the midpoint coordinate of the bottom border of the current focus element, the xn value of the midpoint coordinate of the bottom border of the focus element that is cycled to, and the yn value of the midpoint coordinate of the bottom border of the focus element that is cycled to are all absolute values, HTMLElement.left refers to the absolute distance relative to the left border of the screen, HTMLElement.offsetWidth refers to the width of the focus element, HTMLElement.top refers to the absolute distance relative to the top border of the screen, and HTMLElement.offsetHeight refers to the height of the focus element.

[0074] (6) If the y value of the coordinate of the current focus element is greater than or equal to the y value of the coordinate of the midpoint of the bottom border of the focus element that is cycled to, no processing is performed; otherwise, the temporary screen resolution threshold distance_temp is calculated, and the sizes of distance_temp and distance are compared. If distance_temp is greater than or equal to distance, no update operation is performed; if distance_temp is less than distance, x_temp and y_temp are updated to the coordinate of the midpoint of the bottom border of the focus element that is cycled to, id_temp is updated to the unique code of the focus element that is cycled to, and distance is updated to distance_temp at the same time; after all the focus elements in the EPG display area are cycled through, the focus element to be moved is determined, and the automatic search for regional focus is completed; the temporary screen resolution threshold distance_temp is calculated = (the x value of the midpoint coordinate of the bottom border of the current focus element - the xn value of the midpoint coordinate of the bottom border of the focus element that is cycled to) * (the y value of the midpoint coordinate of the bottom border of the current focus element - the yn value of the midpoint coordinate of the bottom border of the focus element that is cycled to).

[0075] (7) When moving to the left, calculate the midpoint coordinates of the left frame of the starting point of the current focus element, and loop through the focus elements in the EPG display area. If the unique code of the looped focus element is the same as the unique code of the current focus, no processing is performed; otherwise, calculate the midpoint coordinates of the left frame of the looped focus element;

[0076] The focus element in the loop area refers to the identification of the focus element in the EPG display area through rule definition, and defines the x value and y value of the midpoint coordinates of the left frame of the current focus element.

[0077] The x value of the left frame midpoint coordinate of the current focus element = the value of the current focus HTMLElement.left attribute;

[0078] The y value of the midpoint of the left frame of the current focus element = the current focus HTMLElement.top attribute value + (the current focus HTMLElement.offsetHeight attribute value / 2);

[0079] Define the xn and yn coordinates of the midpoint of the bottom border of the focus element to be looped.

[0080] The xn value of the midpoint of the bottom border of the focus element looped to = the left attribute value of the focus HTMLElement looped to;

[0081] The coordinate yn value of the midpoint of the bottom border of the cycled focus element = the cycled focus HTMLElement.top attribute value + (the cycled focus HTMLElement.offsetHeight attribute value / 2);

[0082] Among them, n refers to 1.2.3...N-1, N refers to the total number of all focus elements in the EPG display area, the x value of the midpoint coordinate of the left frame of the current focus element, the y value of the midpoint coordinate of the left frame of the current focus element, the xn value of the midpoint coordinate of the bottom border of the focus element that is cycled to, and the yn value of the midpoint coordinate of the bottom border of the focus element that is cycled to are all absolute values, HTMLElement.left refers to the absolute distance relative to the left border of the screen, HTMLElement.top refers to the absolute distance relative to the top border of the screen, and HTMLElement.offsetHeight refers to the height of the focus element.

[0083] (8) If the x value of the coordinate of the current focus element is less than or equal to the x value of the midpoint coordinate of the left frame of the focus element that is cycled to, no processing is performed; otherwise, the temporary screen resolution threshold distance_temp is calculated, and the sizes of distance_temp and distance are compared. If distance_temp is greater than or equal to distance, no update operation is performed; if distance_temp is less than distance, x_temp and y_temp are updated to the midpoint coordinate of the left frame of the focus element that is cycled to, id_temp is updated to the unique code of the focus element that is cycled to, and distance is updated to distance_temp at the same time; until all the focus elements in the EPG display area are cycled through, the focus element to be moved is determined, and the automatic search for regional focus is completed; wherein, n refers to 1.2.3…N-1, N refers to the total number of all focus elements in the EPG display area, the x value of the midpoint coordinate of the left frame of the current focus element, the y value of the midpoint coordinate of the left frame of the current focus element, the xn value of the midpoint coordinate of the bottom frame of the focus element that is cycled to, and the yn value of the midpoint coordinate of the bottom frame of the focus element that is cycled to are all absolute values.

[0084] (9) When moving to the right, calculate the coordinates of the midpoint of the right frame of the starting point of the current focus element, and loop through the focus elements in the EPG display area. If the unique code of the looped focus element is the same as the unique code of the current focus, no processing is performed; otherwise, calculate the coordinates of the midpoint of the right frame of the looped focus element;

[0085] The focus element in the loop area refers to the identification of the focus element in the EPG display area through rule definition, and defines the x and y values ​​of the midpoint coordinates of the right frame of the current focus element.

[0086] The x value of the midpoint of the right frame of the current focus element = the current focus HTMLElement.left attribute value + the current focus HTMLElement.offsetWidth attribute value;

[0087] The y value of the midpoint of the right frame of the current focus element = the current focus HTMLElement.top attribute value + (the current focus HTMLElement.offsetHeight attribute value / 2);

[0088] Define the xn and yn coordinates of the midpoint of the bottom border of the focus element to be looped.

[0089] The xn value of the midpoint of the bottom border of the looped focus element = the left attribute value of the looped focus HTMLElement + the offsetWidth attribute value of the looped focus HTMLElement;

[0090] The coordinate yn value of the midpoint of the bottom border of the cycled focus element = the cycled focus HTMLElement.top attribute value + (the cycled focus HTMLElement.offsetHeight attribute value / 2);

[0091] Among them, n refers to 1.2.3...N-1, N refers to the total number of all focus elements in the EPG display area, the x value of the midpoint coordinate of the right frame of the current focus element, the y value of the midpoint coordinate of the right frame of the current focus element, the xn value of the midpoint coordinate of the bottom frame of the focus element that is cycled to, and the yn value of the midpoint coordinate of the bottom frame of the focus element that is cycled to are all absolute values, HTMLElement.left refers to the absolute distance relative to the left frame of the screen, HTMLElement.offsetWidth refers to the width of the focus element, HTMLElement.top refers to the absolute distance relative to the top frame of the screen, and HTMLElement.offsetHeight refers to the height of the focus element.

[0092] (10) If the x value of the coordinate of the current focus element is greater than or equal to the y value of the midpoint coordinate of the right frame of the focus element that is cycled to, no processing is performed; otherwise, the temporary screen resolution threshold distance_temp is calculated, and the sizes of distance_temp and distance are compared. If distance_temp is greater than or equal to distance, no update operation is performed; if distance_temp is less than distance, x_temp and y_temp are updated to the midpoint coordinate of the right frame of the focus element that is cycled to, id_temp is updated to the unique code of the focus element that is cycled to, and distance is updated to distance_temp at the same time; after all the focus elements in the EPG display area are cycled through, the focus element to be moved is determined, and the automatic search for regional focus is completed; the temporary screen resolution threshold distance_temp is calculated = (the x value of the midpoint coordinate of the right frame of the current focus element - the xn value of the midpoint coordinate of the lower frame of the focus element that is cycled to) * (the y value of the midpoint coordinate of the right frame of the current focus element - the yn value of the midpoint coordinate of the lower frame of the focus element that is cycled to).

[0093] The specific implementation example is as follows: (Define the upper left corner of the page as the origin of the coordinate axis, and the coordinate value is [0,0])

[0094] Step S1: Initialize the EPG display area, for example, the area visible to a 720p set-top box is 720*1280 pixels, set the style class="item" for the EPG display area elements (such as div, span and other elements), set the id to id="unique code (just make sure that all element codes are not repeated)"; initialize temporary storage parameters x_temp=0 (variable x_temp, used in the calculation of movement rules below), y_temp=0 (variable y_temp, used in the calculation of movement rules below), id_temp=empty (variable id_t emp, used for calculating movement rules below); initialize screen resolution threshold distance = (1280-0) * (720-0) (variable parameter, screen resolution threshold = (screen resolution width-upper left corner origin horizontal coordinate 0) * (screen resolution height-upper left corner origin vertical coordinate 0), used to calculate the relative product between the specified coordinates of two elements below, the calculation formula source: custom formula based on industry experience, the formula is used to assist in calculating the best solution for target focus); when moving, the automatic focus search algorithm (with left shift as a reference, the specific algorithm is shown in steps S2 to S4) is used to determine the movement rule.

[0095] Step S2: Take an EPG display area containing four element components as an example, and each element is virtualized as a rectangle (polygonal elements can be virtualized as rectangles). The logic of obtaining the array of each element object in the HTML document is to obtain the array of element objects from top to bottom and from left to right (a function of the HTML language). Therefore, when the focus moves to the left, the center point of the left boundary of each element is obtained to perform automatic focus search algorithm calculation, such as Figure 1 As shown, according to the document acquisition rules in the above HTML, the order of acquiring each element is element one, element two, element three, and element four. Assume that element one is the default initial focus, and the coordinates of the center point of the left border of each element are as follows Figure 1 As shown, the center point of the left boundary of element one is (x, y), the center point of the left boundary of element two is (x1, y1), the center point of the left boundary of element three is (x2, y2), and the center point of the left boundary of element four is (x3, y3), and the values ​​x_temp = x and y_temp = y are assigned.

[0096] Step S3: Get the coordinates (x, y) of the midpoint of the left boundary of the initial focus of element one. Assuming that element one is o1 (element 2 is o2, element 3 is o3, and element 4 is o4), the absolute distance of element one relative to the left boundary of the EPG display area is declared as left_o1 (the same applies to other elements below, for example, element two is declared as left_o2, and so on), the absolute distance of element one relative to the upper boundary of the EPG display area is declared as top_o1 (the same applies to other elements below, for example, element two is declared as top_o2, and so on), the height of element one is declared as offset_height_o1 (the same applies to other elements below, for example, element two is declared as offset_height_o2, and so on), and the width of element one is declared as offset_width_o1 (the same applies to other elements below, for example, element two is declared as offset_width_o2, and so on). By using the above rules, we can calculate x=left_o1, y=top_o1+(offset_height_o1 / 2). For example, the absolute distance of element 1 from the left edge of the EPG display area is declared as 120 pixels (pixels are replaced by px below), the absolute distance of element 1 from the top edge of the EPG display area is declared as 50px, the height of element 1 is declared as 40px, and the width of element 1 is declared as 90px. Then x=120px, y=50+(40 / 2)=70px, and the sound is The unique code of element one is id_o1. Similarly, if the size of other elements is the same as that of element one, then x1=230px, y1=70+(40 / 2)=90px of element two, x2=80px, y2=200+(40 / 2)=220px of element three, x3=200px, y3=200+(40 / 2)=220px of element four (the left boundary coordinates of element one, element two, element three, and element four can be obtained according to the actual scene layout. The values ​​involved in this step are Figure 1 This is a model assumption and is for calculation reference only).

[0097] Step S4: After obtaining the (x, y) coordinates according to Step S3, use the automatic focus finding method for calculation. The algorithm is as follows: Loop through the elements obtained in Step S2 in the order of Element One, Element Two, Element Three, and Element Four. If it is found through comparison that the initial element and the currently looped element are the same element, no algorithm calculation is performed, and the calculation of the next element is carried out in sequence. Whether they are the same element can be judged by the unique ID id_o1 declared in Step S3. If the elements are not the same, then compare the x of the focus element with the x1, x2... of other elements, etc., which are the abscissas of the left boundaries of the elements. If x is less than or equal to the abscissa of the midpoint of the left boundary of other elements, then loop through and compare the abscissas of the midpoints of the left boundaries of the next elements. If it is greater than the abscissa of the midpoint of the left boundary of other elements, then calculate the temporary threshold distance_temp, and compare distance_temp with distance. If distance_temp < distance, assign temporary parameters, assign x_temp = the abscissa of the midpoint of the left boundary of the corresponding element, y_temp = the ordinate of the midpoint of the corresponding element's focus, and distance = distance_temp; otherwise, no assignment operation is performed. The example is as follows: Compare the x of Element One with x1 of the looped Element Two (the value of x1 has been obtained in Step S3), x2 of Element Three (the value of x2 has been obtained in Step S3), and x3 of Element Four (the value of x3 has been obtained in Step S3). If x of Element One (120px) < x1 of Element Two (230px), it means that Element Two does not meet the condition, and directly start looping through Element Three for comparison. At this time, x (120px) > x2 (80px), then compare whether x_temp (120px) is greater than x2 (80px). If it is greater than x2 (80px), then declare the temporary threshold distance_temp = the absolute value of (x - x2) * the absolute value of (y - y2), that is, distance_temp = |120 - 80| * |70 - 220| = 6000. Because distance_temp < distance, assign temporary parameters x_temp = x2, y_temp = y2, and convert them to actual values according to Step S3, that is, x_temp = 80px, y_temp = 220px. At this time, assign id_temp = "the unique ID of Element Three", and after the assignment is completed, continue to loop through and compare the next Element Four. Since x (120px) < x3 (200px), continue to loop through the next element (that is, perform the logical operation of looping through Element Two). And because there is no next element, the algorithm at this stage is considered completed. Assume that if the abscissa of the midpoint of the left boundary of other elements is less than x, perform the logical operation of looping through Element Three as described above.

[0098] Step S5: After the automatic focus search algorithm in step S4 is calculated, the focus element to be moved is determined by the element code corresponding to id_temp. At this time, the focus element is focused by triggering the element focus style to complete the automatic focus search.

[0099] According to the above principles and defined coordinates, if you press the left key at the initial focus position, you will move to element 3. Similarly, if you press the right key at the initial focus position, you will move to element 2; if you press the up key at the initial focus position, it will not move; if you press the down key at the initial focus position, it will move to element 3.

[0100] This application introduces and defines a method of automatically searching for focus through a mechanism and simple calculation rules, implementing nested judgment according to a hierarchical design, and finally calculating the best target focus through the algorithm, realizing a focus movement method calculated according to rules, which can meet daily product needs and improve user experience. This method improves the accuracy of search focus through a threshold optimization algorithm; this method is compatible with absolute layout and relative layout; this method supports cross-screen (waterfall flow, screen scrolling) automatic focus search.

Claims

1. A method for automatically finding regional focus of EPG based on IPTV specification, characterized in that: The specific steps include: (1) Initialize the EPG display area and the unique codes of all focus elements in the EPG display area; virtually design the interface of the EPG display area according to the x-axis and y-axis layout, with the upper left corner of the EPG display area as the origin (0,0), initialize temporary storage parameters x_temp, y_temp, id_temp, and initialize the screen resolution threshold distance; (2) In the EPG display area, the logic of obtaining the array of each element object in the HTML document is from top to bottom and from left to right; (3) When moving upward, calculate the coordinates of the midpoint of the upper border of the starting point of the current focus element, and loop through the focus elements in the EPG display area. If the unique code of the looped focus element is the same as the unique code of the current focus, no processing is performed; Otherwise, calculate the coordinates of the midpoint of the top border of the focus element that is looped to; (4) If the y value of the coordinate of the current focus element is less than or equal to the y value of the coordinate of the middle point of the upper border of the focus element that is looped to, no processing is performed; otherwise, the temporary screen resolution threshold distance_temp is calculated, and the sizes of distance_temp and distance are compared. If distance_temp is greater than or equal to distance, no update operation is performed; if distance_temp is less than distance, x_temp and y_temp are updated to the coordinate of the middle point of the upper border of the focus element that is looped to, id_temp is updated to the unique code of the focus element that is looped to, and distance is updated to distance_temp; After all the focus elements in the EPG display area are cycled through, the focus element to be moved is determined, and the automatic search for the regional focus is completed; (5) When moving downward, calculate the coordinates of the midpoint of the lower border of the starting point of the current focus element, and loop through the focus elements in the EPG display area. If the unique code of the looped focus element is the same as the unique code of the current focus, no processing is performed; Otherwise, calculate the coordinates of the midpoint of the bottom border of the focus element that is looped to; (6) If the y value of the coordinate of the current focus element is greater than or equal to the y value of the coordinate of the midpoint of the bottom border of the focus element that is looped to, no processing is performed; otherwise, the temporary screen resolution threshold distance_temp is calculated, and the sizes of distance_temp and distance are compared. If distance_temp is greater than or equal to distance, no update operation is performed; if distance_temp is less than distance, x_temp and y_temp are updated to the coordinates of the midpoint of the bottom border of the focus element that is looped to, id_temp is updated to the unique code of the focus element that is looped to, and distance is updated to distance_temp; After all the focus elements in the EPG display area are cycled through, the focus element to be moved is determined, and the automatic search for the regional focus is completed; (7) When moving to the left, calculate the midpoint coordinate of the left frame of the starting point of the current focus element, and loop through the focus elements in the EPG display area. If the unique code of the looped focus element is the same as the unique code of the current focus, no processing is performed; Otherwise, calculate the coordinates of the midpoint of the left frame of the focus element that is looped to; (8) If the x-value of the coordinate of the current focus element is less than or equal to the x-value of the midpoint of the left frame of the focus element that is looped to, no processing is performed; otherwise, the temporary screen resolution threshold distance_temp is calculated, and the sizes of distance_temp and distance are compared. If distance_temp is greater than or equal to distance, no update operation is performed; if distance_temp is less than distance, x_temp and y_temp are updated to the midpoint of the left frame of the focus element that is looped to, id_temp is updated to the unique code of the focus element that is looped to, and distance is updated to distance_temp; After all the focus elements in the EPG display area are cycled through, the focus element to be moved is determined, and the automatic search for the regional focus is completed; (9) When moving to the right, calculate the coordinates of the right frame midpoint of the starting point of the current focus element, and loop through the focus elements in the EPG display area. If the unique code of the looped focus element is the same as the unique code of the current focus, no processing is performed; Otherwise, calculate the coordinates of the midpoint of the right frame of the focus element that is looped to; (10) If the x-value of the coordinate of the current focus element is greater than or equal to the y-value of the midpoint of the right frame of the focus element that is looped to, no processing is performed; otherwise, the temporary screen resolution threshold distance_temp is calculated, and the sizes of distance_temp and distance are compared. If distance_temp is greater than or equal to distance, no update operation is performed; if distance_temp is less than distance, x_temp and y_temp are updated to the midpoint of the right frame of the focus element that is looped to, id_temp is updated to the unique code of the focus element that is looped to, and distance is updated to distance_temp; After all the focus elements in the EPG display area are cycled through, the focus element to be moved is determined, and the automatic search for the regional focus is completed.

2. A method for automatically finding regional focus based on EPG of IPTV specification according to claim 1, characterized in that, In step (1), the EPG display area refers to the area containing all focus elements; the unique coding of the focus element refers to assigning a unique id to each focus element, and the javascript specification used by the EPG supports it by default; the rule for the unique coding of the focus element is defined as: the element with a unique code is identified as the focus through the EPG tag style, and the EPG display area needs to use the same standard uniformly; the three values ​​of the temporary storage parameters of the variables x_temp, y_temp, and id_temp are empty or default to the current focus x, y, and id, which are used to temporarily store virtual coordinates and virtual ids, so as to facilitate comparison with other focus elements to select the target focus for the best moving solution; The initialized screen resolution threshold distance = (screen resolution width - upper left corner origin horizontal coordinate) * (screen resolution height - upper left corner origin vertical coordinate).

3. A method for automatically finding regional focus based on EPG of IPTV specification according to claim 2, characterized in that, In step (3), the focus element in the loop area refers to the identification of the focus element in the EPG display area through rule definition, and defines the x value and y value of the midpoint coordinate of the upper border of the current focus element. The x value of the coordinate of the middle point of the top border of the current focus element = the current focus HTMLElement.left attribute value + (the current focus HTMLElement.offsetWidth attribute value / 2); The y value of the midpoint coordinate of the top border of the current focus element = the value of the current focus HTMLElement.top attribute; Define the xn and yn coordinates of the midpoint of the top border of the focus element to be looped. The xn value of the midpoint of the top border of the focus element that is cycled to = the left attribute value of the focus HTMLElement that is cycled to + (the offsetWidth attribute value of the focus HTMLElement that is cycled to / 2); The coordinate yn value of the midpoint of the top border of the focus element looped to = the value of the HTMLElement.top attribute of the focus looped to; Among them, n refers to 1, 2, 3...N-1, N refers to the total number of all focus elements in the EPG display area, the x value of the midpoint coordinate of the upper border of the current focus element, the y value of the midpoint coordinate of the upper border of the current focus element, the xn value of the midpoint coordinate of the upper border of the focus element to be cycled, and the yn value of the midpoint coordinate of the upper border of the focus element to be cycled all refer to absolute values, HTMLElement.left refers to the absolute distance relative to the left border of the screen, HTMLElement.offsetWidth refers to the width of the focus element, and HTMLElement.top refers to the absolute distance relative to the top border of the screen.

4. A method for automatically finding regional focus based on EPG of IPTV specification according to claim 3, characterized in that, In step (4), calculate the temporary screen resolution threshold distance_temp = the absolute value of (the x value of the midpoint coordinate of the upper border of the current focus element - the xn value of the midpoint coordinate of the upper border of the focus element that is cycled to) * (the y value of the midpoint coordinate of the upper border of the current focus element - the yn value of the midpoint coordinate of the upper border of the focus element that is cycled to).

5. The method for automatically finding regional focus of EPG based on IPTV specification according to claim 2, characterized in that: In step (5), the focus element in the loop area refers to the identification of the focus element in the EPG display area through rule definition, and the x value and y value of the midpoint coordinate of the bottom border of the current focus element are defined. The x value of the coordinate of the middle point of the bottom border of the current focus element = the current focus HTMLElement.left attribute value + (the current focus HTMLElement.offsetWidth attribute value / 2); The y value of the midpoint of the bottom border of the current focus element = the current focus HTMLElement.top attribute value + the current focus HTMLElement.offsetHeight attribute value; Define the xn and yn coordinates of the midpoint of the bottom border of the focus element to be looped. The xn value of the midpoint of the bottom border of the focus element that is cycled to = the left attribute value of the focus HTMLElement that is cycled to + (the offsetWidth attribute value of the focus HTMLElement that is cycled to / 2); The coordinate yn value of the midpoint of the bottom border of the focus element that is cycled to = the attribute value of the focus HTMLElement.top that is cycled to + the attribute value of the focus HTMLElement.offsetHeight that is cycled to; Among them, n refers to 1, 2, 3...N-1, N refers to the total number of all focus elements in the EPG display area, the x value of the midpoint coordinate of the bottom border of the current focus element, the y value of the midpoint coordinate of the bottom border of the current focus element, the xn value of the midpoint coordinate of the bottom border of the focus element to be cycled, and the yn value of the midpoint coordinate of the bottom border of the focus element to be cycled are all absolute values, HTMLElement.left refers to the absolute distance relative to the left border of the screen, HTMLElement.offsetWidth refers to the width of the focus element, HTMLElement.top refers to the absolute distance relative to the top border of the screen, and HTMLElement.offsetHeight refers to the height of the focus element.

6. A method for automatically finding regional focus based on EPG of IPTV specification according to claim 5, characterized in that, In step (6), calculate the temporary screen resolution threshold distance_temp = the absolute value of (the x value of the midpoint coordinate of the bottom border of the current focus element - the xn value of the midpoint coordinate of the bottom border of the focus element that is cycled to) * (the y value of the midpoint coordinate of the bottom border of the current focus element - the yn value of the midpoint coordinate of the bottom border of the focus element that is cycled to).

7. The method for automatically finding regional focus of EPG based on IPTV specification according to claim 2, characterized in that: In step (7), the focus element in the loop area refers to the identification of the focus element in the EPG display area through rule definition, and the x value and y value of the left frame midpoint coordinate of the current focus element are defined. The x value of the midpoint of the left frame of the current focus element = the value of the current focus HTMLElement.left attribute; The y value of the midpoint of the left frame of the current focus element = the current focus HTMLElement.top attribute value + (the current focus HTMLElement.offsetHeight attribute value / 2); Define the xn and yn coordinates of the midpoint of the bottom border of the focus element to be looped. The xn value of the midpoint of the bottom border of the focus element that is cycled to = the left attribute value of the focus HTMLElement that is cycled to; The coordinate yn value of the midpoint of the bottom border of the cycled focus element = the value of the HTMLElement.top attribute of the cycled focus + (the value of the HTMLElement.offsetHeight attribute of the cycled focus / 2); Among them, n refers to 1, 2, 3...N-1, N refers to the total number of all focus elements in the EPG display area, the x value of the midpoint coordinate of the left frame of the current focus element, the y value of the midpoint coordinate of the left frame of the current focus element, the xn value of the midpoint coordinate of the bottom border of the focus element that is cycled to, and the yn value of the midpoint coordinate of the bottom border of the focus element that is cycled to are all absolute values, HTMLElement.left refers to the absolute distance relative to the left border of the screen, HTMLElement.top refers to the absolute distance relative to the top border of the screen, and HTMLElement.offsetHeight refers to the height of the focus element.

8. The method for automatically finding regional focus of an EPG based on IPTV specification according to claim 7, characterized in that In step (8), the temporary screen resolution threshold distance_temp is calculated = the absolute value of (the x value of the midpoint coordinate of the left frame of the current focus element - the xn value of the midpoint coordinate of the bottom frame of the focus element that is cycled to) * (the y value of the midpoint coordinate of the left frame of the current focus element - the yn value of the midpoint coordinate of the bottom frame of the focus element that is cycled to).

9. A method for automatically finding regional focus based on EPG of IPTV specification according to claim 2, characterized in that, In step (9), the focus element in the loop area refers to the identification of the focus element in the EPG display area through rule definition, and the definition of the x value and y value of the midpoint coordinate of the right frame of the current focus element. The x value of the midpoint of the right frame of the current focus element = the current focus HTMLElement.left attribute value + the current focus HTMLElement.offsetWidth attribute value; The y value of the midpoint of the right frame of the current focus element = the current focus HTMLElement.top attribute value + (the current focus HTMLElement.offsetHeight attribute value / 2); Define the xn and yn coordinates of the midpoint of the bottom border of the focus element to be looped. The xn value of the midpoint of the bottom border of the focus element that is cycled to = the left attribute value of the focus HTMLElement that is cycled to + the offsetWidth attribute value of the focus HTMLElement that is cycled to; The coordinate yn value of the midpoint of the bottom border of the cycled focus element = the value of the HTMLElement.top attribute of the cycled focus + (the value of the HTMLElement.offsetHeight attribute of the cycled focus / 2); Among them, n refers to 1, 2, 3...N-1, N refers to the total number of all focus elements in the EPG display area, the x value of the midpoint coordinate of the right frame of the current focus element, the y value of the midpoint coordinate of the right frame of the current focus element, the xn value of the midpoint coordinate of the bottom frame of the focus element that is cycled to, and the yn value of the midpoint coordinate of the bottom frame of the focus element that is cycled to are all absolute values, HTMLElement.left refers to the absolute distance relative to the left frame of the screen, HTMLElement.offsetWidth refers to the width of the focus element, HTMLElement.top refers to the absolute distance relative to the top frame of the screen, and HTMLElement.offsetHeight refers to the height of the focus element.

10. The method for automatically finding regional focus of EPG based on IPTV specification according to claim 9, characterized in that: In step (10), the temporary screen resolution threshold distance_temp is calculated = the absolute value of (the x value of the midpoint coordinate of the right border of the current focus element - the x value of the midpoint coordinate of the bottom border of the focus element that is cycled to) * (the y value of the midpoint coordinate of the right border of the current focus element - the yn value of the midpoint coordinate of the bottom border of the focus element that is cycled to).