Display device and interface focus moving method
By analyzing the remote control signals and element hierarchy, and unifying the focus element search logic, the problem of conflicting focus element search logic in traditional technologies is solved, and the expected interface focus jump is achieved.
Patent Information
- Application Number
- CN202511063595.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-18
AI Technical Summary
In traditional technologies, the focus element search logic cannot work together, resulting in abrupt jumps in the interface focus when some focus elements have the tabindex attribute set, failing to achieve the interface focus jump that meets the user's expectations.
By analyzing the button signals of the remote control, the current element of the interface focus is determined, and the available element that is closest to the current element in the direction of the button is searched according to the element hierarchy, or the target focus element is searched under the element of the partition, so as to unify the search logic of the focus element and avoid conflicts.
This feature ensures that the focus transitions are as expected, avoiding abrupt jumps during the focus movement process when the remote control moves the interface focus.
Smart Images

Figure CN120980276A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of display devices, in particular to a display device and a method for moving an interface focus. BACKGROUND
[0002] With the development of television devices (such as smart televisions), a display device can display an HTML5 (Hypertext Markup Language 5) page through a display, and during the display of the HTML5 page, a user can press a direction key in a remote controller to control the display device to locate a next focus element to be focused in the displayed HTML5 page, and move an interface focus to the next focus element to achieve focusing on the next focus element.
[0003] In the prior art, when locating the next focus element to be focused, the focus element search is by default performed in priority through a tabindex attribute of the focus element, and in the case where the focus element is not provided with the tabindex attribute, only the focus element closest to the current focus element of the interface focus is searched in the direction indicated by the direction key pressed by the user to serve as the next focus element to be focused.
[0004] However, the focus element search logics in the above two prior arts cannot work in coordination, and in the case where only part of the focus elements are provided with the tabindex attribute, there may be a sudden "jump" in the movement of the interface focus, and the interface focus cannot be switched as expected by the user. SUMMARY
[0005] The present application provides a display device and a method for moving an interface focus, which can unify the search logic of the focus elements in the movement of the interface focus, and achieve the expected switching of the interface focus in the case where the interface focus is moved through a remote controller.
[0006] In a first aspect, some embodiments provide a display device, comprising:
[0007] a display and a controller;
[0008] the controller is configured to:
[0009] after receiving a key signal sent by the remote controller, analyze the key signal to obtain a key direction, and determine a current element focused by an interface focus in a display interface of the display; wherein the display interface is an HTML5 interface;
[0010] According to the element hierarchical relationship corresponding to the display interface, from the same level elements of the current element, search the available elements closest to the current element in the button direction to obtain a first element; wherein the element hierarchical relationship is determined according to the search path of each element corresponding to the display interface, and each element includes a focusable focus element and a non-focusable partition element;
[0011] In the case that the first element is the focus element, the interface focus is moved to the first element;
[0012] In the case that the first element is the partition element, according to the element hierarchical relationship, search the target focus element from each hierarchical element under the first element, and in the case that the target focus element is searched, the interface focus is moved to the target focus element.
[0013] In the above embodiment, the element hierarchical relationship corresponding to the display interface can be generated in advance according to the search path of each element corresponding to the display interface to be displayed by the display of the display device. After receiving the key signal sent by the remote controller, the key signal is parsed to obtain the key direction and determine the current element on which the interface focus of the display interface is focused. Then, according to the element hierarchical relationship, the first element is searched from the same hierarchical elements of the current element, which is the closest available element to the current element in the key direction. Since the display interface includes focusable focus elements and non-focusable partition elements, when the first element is a focus element, the first element can be used as the next focus element to be focused, so that the interface focus can be directly moved to the first element. When the first element is a partition element, the first element cannot be used as the next focus element to be focused, so that the target focus element is searched from the hierarchical elements under the first element according to the element hierarchical relationship. When the target focus element is searched, since the target focus element can be used as the next focus element to be focused, the interface focus can be moved to the target focus element to realize the jump of the interface focus. In this way, on the one hand, after receiving the key signal sent by the remote controller, the search logic of the focus element in the interface focus moving process can be unified, and the conflict between the two search logics of the tabindex attribute of the focus element and the direction indicated by the user pressing the direction key can be avoided. On the other hand, the next focus element to be focused is searched according to the element hierarchical relationship corresponding to the display interface and the key direction, so that the next focus element to be focused searched is predictable, thereby avoiding the abrupt "jump" in the moving process of the interface focus, and realizing the expected interface focus jump. Therefore, compared with the prior art, the search logic of the focus element in the interface focus moving process can be unified, and the abrupt "jump" in the moving process of the interface focus can be avoided when the interface focus is moved by the remote controller, and the expected interface focus jump is realized.
[0014] In a second aspect, some embodiments further provide an interface moving method applied to a display device, comprising:
[0015] After receiving the key signal sent by the remote controller, the key signal is parsed to obtain the key direction and determine the current element on which the interface focus of the display interface is focused. Then, according to the element hierarchical relationship, the first element is searched from the same hierarchical elements of the current element, which is the closest available element to the current element in the key direction. Since the display interface includes focusable focus elements and non-focusable partition elements, when the first element is a focus element, the first element can be used as the next focus element to be focused, so that the interface focus can be directly moved to the first element. When the first element is a partition element, the first element cannot be used as the next focus element to be focused, so that the target focus element is searched from the hierarchical elements under the first element according to the element hierarchical relationship. When the target focus element is searched, since the target focus element can be used as the next focus element to be focused, the interface focus can be moved to the target focus element to realize the jump of the interface focus. In this way, on the one hand, after receiving the key signal sent by the remote controller, the search logic of the focus element in the interface focus moving process can be unified, and the conflict between the two search logics of the tabindex attribute of the focus element and the direction indicated by the user pressing the direction key can be avoided. On the other hand, the next focus element to be focused is searched according to the element hierarchical relationship corresponding to the display interface and the key direction, so that the next focus element to be focused searched is predictable, thereby avoiding the abrupt "jump" in the moving process of the interface focus, and realizing the expected interface focus jump. Therefore, compared with the prior art, the search logic of the focus element in the interface focus moving process can be unified, and the abrupt "jump" in the moving process of the interface focus can be avoided when the interface focus is moved by the remote controller, and the expected interface focus jump is realized.
[0016] According to the element hierarchical relationship corresponding to the display interface, from the same hierarchical element of the current element, search for the closest available element in the key direction from the current element to obtain a first element; wherein the element hierarchical relationship is determined according to the search path of each element corresponding to the display interface, and each element includes a focusable focus element and a non-focusable partition element;
[0017] In the case where the first element is a focus element, the interface focus is moved to the first element;
[0018] In the case where the first element is a partition element, according to the element hierarchical relationship, search for a target focus element from each hierarchical element under the first element, and in the case where the target focus element is searched, move the interface focus to the target focus element.
[0019] In the above embodiment, the element hierarchical relationship corresponding to the display interface to be displayed by the display of the display device can be generated in advance according to the search path of each element corresponding to the display interface. After receiving the key signal sent by the remote controller, the key signal is first parsed to obtain the key direction and determine the current element on which the interface focus of the display interface is focused. Then, according to the element hierarchical relationship, the first element is searched from the same hierarchical elements of the current element, which is the closest available element to the current element in the key direction. Since the display interface corresponds to each element including the focusable focus element and the non-focusable partition element, in the case that the first element is the focus element, the first element can be used as the next focus element to be focused, so that the interface focus can be directly moved to the first element. In the case that the first element is the partition element, the first element cannot be used as the next focus element to be focused, so that the target focus element is searched from the hierarchical elements under the first element according to the element hierarchical relationship. When the target focus element is searched, since the target focus element can be used as the next focus element to be focused, the interface focus can be moved to the target focus element to realize the jump of the interface focus. In this way, on the one hand, after receiving the key signal sent by the remote controller, the search logic of the focus element in the process of moving the interface focus can be unified, and the conflict between the two search logics of the tabindex attribute of the focus element and the direction indicated by the direction key pressed by the user can be avoided. On the other hand, the next focus element to be focused is searched according to the element hierarchical relationship corresponding to the display interface and the key direction, so that the next focus element to be focused searched is predictable, thereby avoiding the abrupt "jump" in the process of moving the interface focus, and realizing the expected jump of the interface focus. Based on this, in the above embodiment, compared with the prior art, the search logic of the focus element in the process of moving the interface focus can be unified, and in the case of moving the interface focus by the remote controller, the abrupt "jump" in the process of moving the interface focus can be avoided, and the expected jump of the interface focus is realized.
[0020] In a third aspect, some embodiments further provide an interface focus moving device applied to a display device, comprising:
[0021] A signal parsing module is configured to parse the key signal to obtain the key direction and determine the current element on which the interface focus of the display interface of the display of the display device is focused after receiving the key signal sent by the remote controller; wherein the display interface is an HTML5 interface.
[0022] The first search module is used to search for the nearest available element in the direction of the key from the elements of the same level as the current element, based on the element hierarchy relationship corresponding to the display interface, so as to obtain the first element; wherein, the element hierarchy relationship is determined according to the search path of each element corresponding to the display interface, and each element includes focusable focus elements and non-focusable partition elements.
[0023] The first moving module is used to move the focus of the interface to the first element when the first element is the focused element;
[0024] The second search module is used to search for the target focus element from each level of elements under the first element when the first element is a partition element, based on the element hierarchy, and to move the interface focus to the target focus element when the target focus element is found.
[0025] In the above embodiments, the element hierarchy of the display interface can be generated in advance based on the search paths of each element corresponding to the display interface to be displayed on the display device's screen. After receiving the button signal sent by the remote control, the button signal is first parsed to obtain the button direction and determine the current element focused on by the interface focus in the display interface. Then, according to the above element hierarchy, the available element closest to the current element in the button direction is searched from the elements of the same level as the current element to obtain the first element. Since the elements corresponding to the aforementioned display interface include focusable elements and non-focusable partition elements, when the first element is the focus element, it can be used as the next focus element to be focused on, thus allowing the interface focus to be directly moved to the first element. However, when the first element is a partition element, it cannot be used as the next focus element to be focused on. Therefore, based on the element hierarchy, a target focus element can be searched from the elements under the first element. Once the target focus element is found, it can be used as the next focus element to be focused on, thus allowing the interface focus to be moved to the target focus element, achieving a jump in interface focus. In this way, upon receiving the button signal from the remote control, the search logic for focus elements during interface focus movement can be unified, avoiding conflicts between two search logics: one based on the focus element's tabbed attributes and the other based on the direction indicated by the user's pressed directional keys. On the other hand, by jointly searching for the next focus element based on the element hierarchy and button direction on the display interface, the found next focus element is predictable. This avoids abrupt "jumps" during focus movement, ensuring a smooth and expected focus transition. Therefore, in the above embodiment, compared to traditional technologies, the focus element search logic is unified during focus movement, preventing abrupt "jumps" when the focus is moved via remote control and achieving a smooth and expected focus transition.
[0026] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the methods provided in some embodiments of the second aspect.
[0027] Fifthly, a computer program product is provided, comprising: a computer program that, when executed by a processor, implements the steps of the methods provided in some embodiments of the second aspect. Attached Figure Description
[0028] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a control device provided in some embodiments of this application;
[0030] Figure 2 This is a schematic diagram of the hardware configuration of a display device provided in some embodiments of this application;
[0031] Figure 3 This is a schematic diagram of the hardware configuration of the control device provided in some embodiments of this application;
[0032] Figure 4 This is a schematic diagram of the software configuration of a display device provided in some embodiments of this application;
[0033] Figure 5 A flowchart illustrating a method for moving the interface focus provided in some embodiments of this application;
[0034] Figure 6 A flowchart illustrating the search for a target focus element provided in some embodiments of this application;
[0035] Figure 7 A flowchart illustrating the search for a target focus element provided in other embodiments of this application;
[0036] Figure 8 A flowchart illustrating the process of determining element hierarchy relationships provided in some embodiments of this application;
[0037] Figure 9 A flowchart illustrating the interface focus movement method provided in other embodiments of this application;
[0038] Figure 10 A flowchart illustrating a method for moving the interface focus provided in some embodiments of this application;
[0039] Figure 11 This is a schematic diagram of the structure of an interface focus moving device provided in some embodiments of this application. Detailed Implementation
[0040] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described below do not represent all embodiments consistent with this application. They are merely examples of systems and methods consistent with some aspects of this application as detailed in the claims.
[0041] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0042] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0043] The terms “include” and “have”, and any variations thereof, are intended to cover but not exclusively include, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0044] The term "module" refers to any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0045] In this embodiment, the display device 200 generally refers to a device with screen display and data processing capabilities. For example, the display device 200 includes, but is not limited to, smart TVs, mobile terminals, computers, monitors, advertising screens, wearable devices, virtual reality devices, augmented reality devices, etc.
[0046] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a control device provided in some embodiments of this application. For example... Figure 1 As shown, users can operate the display device 200 via touch operation, mobile terminal 300, and control device 100. For example, control device 100 can be a remote control, stylus, gamepad, etc.
[0047] The mobile terminal 300 can serve as a control device for human-computer interaction between the user and the display device 200. The mobile terminal 300 can also serve as a communication device for establishing a communication connection with the display device 200 for data interaction. In some embodiments, the mobile terminal 300 can install software applications with the display device 200 to establish a connection and communication via network communication protocols, achieving one-to-one control operations and data communication. It can also transmit audio and video content displayed on the mobile terminal 300 to the display device 200 to achieve synchronous display.
[0048] like Figure 1 The diagram also shows that the display device 200 communicates with the server 400 via various communication methods. This allows the display device 200 to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks.
[0049] Display device 200 can provide broadcast television reception function, and can also be equipped with intelligent network television function that provides computer support, including but not limited to network television, smart television, Internet Protocol television (IPTV), etc.
[0050] Figure 2 Provided for some embodiments of this application Figure 1 Hardware configuration block diagram of display device 200.
[0051] In some embodiments, the display device 200 may include at least one of a tuner 210, a communication device 220, a detector 230, a device interface 240, a controller 250, a display 260, an audio output device 270, a memory, a power supply, and a user input interface.
[0052] In some embodiments, detector 230 is used to acquire signals from the external environment or to interact with the outside world. For example, detector 230 includes a light receiver, a sensor for acquiring ambient light intensity; or, detector 230 includes an image acquisition device, such as a camera, which can be used to acquire external environmental scenes, user attributes, or user interaction gestures; or, detector 230 includes a sound acquisition device, such as a microphone, for receiving external sounds.
[0053] In some embodiments, the display 260 includes display function components for presenting images and driving components for driving image display. The display 260 is used to receive and display image signals output from the controller 250. For example, the display 260 can be used to display video content, image content, menu control interface components, and user control UI interfaces, etc.
[0054] In some embodiments, the communication device 220 is a component used to communicate with external devices or the server 400 according to various communication protocol types. The display device 200 may have multiple communication devices 220 depending on the supported communication methods. For example, when the display device 200 supports wireless network communication, it may have a communication device 220 with WiFi functionality. When the display device 200 supports Bluetooth connectivity, it needs to have a communication device 220 with Bluetooth functionality.
[0055] The communication device 220 enables the display device 200 to communicate with external devices or the server 400 via wireless or wired connections. Wired connections utilize data cables, interfaces, or other components to connect the display device 200 to external devices. Wireless connections utilize wireless signals or wireless networks. The display device 200 can directly establish a connection with external devices or indirectly through gateways, routers, or other connection devices.
[0056] In some embodiments, the controller 250 may include at least one of a central processing unit, a video processor, an audio processor, a graphics processor, and a power processor, and a first to an nth interface for input / output. The controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in memory. The controller 250 controls the overall operation of the display device 200.
[0057] In some embodiments, the controller 250 and the tuner 210 may be located in different separate devices, that is, the tuner 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
[0058] In some embodiments, a user can input user commands through a graphical user interface (GUI) displayed on a display 260, and the user input interface receives user input commands through the graphical user interface (GUI).
[0059] In some embodiments, the audio output device 270 can be a built-in speaker of the display device 200 or an external audio output device connected to the display device 200. For the external audio output device connected to the display device 200, the display device 200 may also be provided with an external audio output terminal, through which the audio output device can be connected to the display device 200 to output sound from the display device 200.
[0060] In some embodiments, the user input interface 280 can be used to receive instructions from user input.
[0061] Figure 3 Provided for some embodiments of this application Figure 1 Hardware configuration block diagram of the central control device. (Example) Figure 3 As shown, the control device 100 may include: a controller 110, a communication interface 130, a user input / output interface, a memory, and a power supply.
[0062] The control device 100 is configured to control the display device 200, and to receive user input operation commands and convert the operation commands into commands that the display device 200 can recognize and respond to, thus acting as an intermediary for interaction between the user and the display device 200.
[0063] In some embodiments, the control device 100 may be an intelligent device. For example, the control device 100 may be equipped with various applications for controlling the display device 200 according to user needs.
[0064] In some embodiments, such as Figure 1 As shown, the mobile terminal 300 or other smart electronic devices can perform similar functions to the control device 100 after installing the application of the control display device 200.
[0065] The controller 110 includes a processor 112, RAM (Random Access Memory) 113, ROM (Read-Only Memory) 114, a communication interface 130, and a communication bus. The controller 110 is used to control the operation of the control device 100, as well as the communication and cooperation between internal components and the external and internal data processing functions.
[0066] Under the control of the controller 110, the communication interface 130 enables communication of control signals and data signals with the display device 200. The communication interface 130 may include at least one of other near-field communication modules such as WiFi chip 131, Bluetooth module 132, and NFC (Near Field Communication) module 133.
[0067] User input / output interface 140, wherein the input interface includes at least one of other input interfaces such as microphone 141, touchpad 142, sensor 143, and button 144.
[0068] In some embodiments, the control device 100 includes at least one of a communication interface 130 and an input / output interface 140. The control device 100 is configured with the communication interface 130, such as a WiFi, Bluetooth, or NFC module, which can encode user input commands via WiFi, Bluetooth, or NFC protocols and send them to the display device 200.
[0069] The memory 190 is used to store various operating programs, data, and applications for driving and controlling the control device 100 under the control of the controller. The memory 190 can also store various control signal instructions input by the user.
[0070] The power supply 180 is used to provide operating power support for the various components of the control device 100 under the control of the controller.
[0071] In some embodiments, to enable user interaction, the display device 200 may run an operating system. The operating system is a computer program used to manage and control the hardware and software resources of the display device 200. The operating system can (control the display device) provide a user interface, allowing users to interact with the display device 200 and supporting the running of various applications.
[0072] It should be noted that the operating system can be a native operating system based on a specific operating platform, a third-party operating system that is deeply customized based on a specific operating platform, or an independent operating system specifically developed for display devices.
[0073] An operating system can be divided into different modules or levels based on the functions it performs.
[0074] For example, such as Figure 4 As shown, in some embodiments, the system is divided into four layers, from top to bottom: the Applications layer (referred to as the "Application Layer"), the Application Framework layer (referred to as the "Framework Layer"), the System Library layer, and the Kernel layer.
[0075] In some embodiments, the application layer provides services and interfaces for applications, enabling the display device 200 to run applications and interact with the user based on the applications. The application layer may contain at least one application, which may be a built-in Windows program, system settings program, or clock program of the operating system; or it may be an application developed by a third-party developer. In specific implementations, the application packages in the application layer are not limited to the examples above.
[0076] The framework layer provides application programming interfaces (APIs) and a programming framework for applications. The application framework layer includes predefined functions. It acts as a central processing unit, determining the actions taken by applications within the application layer. Through the API, applications can access system resources and obtain system services during execution.
[0077] like Figure 4As shown, the application framework layer in this embodiment includes a view system, managers, and content providers. The view system designs and implements the application's interface and interactions, and includes lists, grids, text boxes, and buttons. The managers include at least one of the following modules: an activity manager for interacting with all running activities in the system; a location manager for providing system services or applications with access to system location services; a package manager for retrieving various information related to application packages currently installed on the device; a notification manager for controlling the display and clearing of notification messages; and a window manager for managing icons, windows, toolbars, wallpapers, and desktop widgets on the user interface.
[0078] In some embodiments, the Activity Manager manages the lifecycle of individual applications and common navigation and back functions, such as controlling application exit, opening, and back actions. The Window Manager manages all window programs, such as obtaining the screen size, determining if a status bar is present, locking the screen, capturing the screen, and controlling changes to the display window, such as shrinking the display window, shaking the display, or distorting the display.
[0079] In some embodiments, the system runtime library layer can provide support for the framework layer. When the framework layer is used, the operating system runs the instruction library contained in the system runtime library layer, such as the C / C++ instruction library, to implement the functions to be performed by the framework layer.
[0080] In some embodiments, the kernel layer is a functional layer situated between the hardware and software of the display device 200. The kernel layer can implement functions such as hardware abstraction, multitasking, and memory management. For example, ... Figure 4 As shown, hardware drivers can be configured in the kernel layer. The kernel layer can contain at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB (Universal Serial Bus) driver, HDMI (High Definition Multimedia Interface) driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.
[0081] It should be noted that the above examples are merely a simple division of operating system functions and do not limit the specific form of the operating system of the display device 200 in this application embodiment. Depending on the function of the display device, the type of operating system, and other factors, the number of levels and the specific level type of the operating system may be expressed in other forms.
[0082] With the development of television devices (such as smart TVs), display devices can display HTM L5 (Hypertext Markup Language 5) pages on the screen. During the display of the HTM L5 page, users can use the directional keys on the remote control to control the display device to locate the next focus element on the displayed HTM L5 page and move the interface focus to that next focus element to achieve focus on that next focus element.
[0083] In traditional techniques, when locating the next element to focus on, the default priority is to search for the element using its `tabindex` property. The `tabindex` property is an HTML attribute used to control whether elements in the HTML interface are focusable, and the focusing order of different focusable elements (i.e., the navigation order when the user presses the Tab key or the directional keys on a remote control). The `tabindex` property has an integer value, and different values correspond to different focusing behaviors. Specifically:
[0084] First, the `tabindex` property has a positive integer value (such as 1, 2, 3, etc.). When an element's `tabindex` property is set to this value, the element will be included in the focus navigation flow (i.e., the sequence of elements that can be focused), and the focus order strictly follows the numerical order from smallest to largest; that is, the element with the smaller value will be focused first. For example, an element with `tabindex="1"` will gain focus (i.e., the focus moves to the element) earlier than an element with `tabindex="2"`, even if the latter is located earlier in the DOM (Document Object Model). Second, the `tabindex` property has a value of 0. When an element's `tabindex` property is set to 0, the element with `tabindex="0"` can be focused, but its focus order does not depend on the numerical value, but follows the order in which the elements appear in the DOM. Finally, the `tabindex` property has a value of -1. When an element's `tabindex` property is set to -1, the element with `tabindex="-1"` cannot be focused using the Tab key or arrow keys, or other default navigation methods.
[0085] Thus, when an element in the display interface has its tabindex attribute set, and the focus of the interface is currently on a certain element, pressing the down button on the remote control will cause the display device to respond to the down button press operation and search for the next element to which the focus of the interface will move. This search process can then be as follows:
[0086] First, identify the currently focused element (i.e., the element where the focus is located). This is the starting point for focusing. For example, if there are multiple focusable elements such as buttons and input boxes on the current display, and a button is currently focused, it is the current focused element. Next, collect all elements on the display that have the `tabindex` property set and whose property value is 0 or a positive integer. These elements constitute the candidate set of focusable elements. Elements with a `tabindex` of -1 are not included because they do not participate in the focus movement process of the default navigation method. Then, sort the elements in the candidate set. Elements with a `tabindex` property value of a positive integer are sorted in ascending order of their property value; elements with a `tabindex` property value of 0 are sorted according to their position in the DOM. For example, if there are elements A (tabindex="2"), B (tabindex="1"), C (tabindex="0"), and D (tabindex="0"), the sorted order will be B, A, C, D. Finally, starting with the current element, search for the next element sequentially within the sorted set. If there is an element after the current element, and that element meets the focus condition (the tabindex property value is 0 or a positive integer), then it is the next element to be focused. For example, if the current element is element A, and the element following element A is element C, then element C is the next element to be focused, and the focus is moved to element C.
[0087] Building upon the above, in traditional technology, when the focused element on the display interface does not have a tabindex attribute set, it can only search for the element closest to the currently focused element in the direction indicated by the user's pressed arrow keys, and then use that element as the next element to focus on. Simply put, it's about "looking at the direction and finding the nearest." Specifically:
[0088] First, identify the currently focused element, such as a highlighted button or input box on the display screen. This is the starting point for moving the interface focus and also the starting point for searching the next element the interface node wants to move to. Next, determine the search direction based on the user's pressed arrow keys (up, down, left, right). For example, if the user presses the down arrow key, the search is limited to the area "below" the current element. Then, on the display screen, filter all focusable elements (such as buttons, links, etc.) located in the specified direction of the current element (i.e., the search direction defined above, as below), excluding elements in the opposite direction or not in that area. Next, among the filtered elements in the same direction, calculate the visual distance between each element and the current element (usually determined by coordinate differences; for example, pressing the down arrow key prioritizes elements with the closest Y-axis distance and the smallest X-axis deviation), and filter out the closest element. Finally, move the interface focus to the filtered "closest in the same direction" element, completing one directional navigation. For example, suppose the current element is on the "OK" button in the middle of the page, and the user presses the right arrow key. The display device will first look for all focusable elements to the right of the "OK" button. For example, if there is a "Cancel" button (100px away) and a "Help" link (200px away) on the right, then the "Cancel" button, being on the right and closer, will become the next element to be focused, thus moving the interface focus to the "Cancel" button.
[0089] However, the focus element search logic in the two traditional technologies mentioned above cannot work together. When only some focus elements have the tabindex attribute set, there may be abrupt "jumps" during the movement of the interface focus, which cannot achieve the interface focus jump that meets the user's expectations.
[0090] Based on this, in some embodiments, a method for moving the interface focus is provided. This method can be applied to a controller in a display device.
[0091] In an exemplary embodiment, taking the application of the interface focus movement method to the controller of a display device as an example, the display device includes a monitor and a controller. The communication connection between the monitor and the controller can be a wired communication connection or a wireless communication connection. The display interface displayed by the monitor is an HTML L5 interface, including the interface focus and the corresponding elements of the display interface. The elements include focusable focus elements and non-focusable partition elements. In this embodiment, for each element in the display interface, each element does not have a tabindex attribute set, but uses a category attribute to identify the type of the element. The attribute value of the category attribute is used to characterize whether the element is a focusable focus element or a non-focusable partition element. For example, the attribute value of the category attribute of a focusable focus element can be Button, while the attribute value of the category attribute of a non-focusable partition element can be div(division, partition).
[0092] The so-called interface focus refers to a visual marker used to indicate the focused element, also known as a focus indicator. Examples include a colored border around the focus element (such as a solid blue line or a dashed line), a darkened or changed background color, a slightly enlarged focus element, added shadows or halos, or a flashing vertical line within a text box. The interface focus is a "visual carrier" of the focused state of the element, allowing users to perceive the position and range of the currently focused element.
[0093] A focusable element refers to a UI element that can receive the user's current interaction command and serves as the "target point" for the user's operation. These elements clearly inform the user of the "currently operable object" through visual feedback (such as highlighted borders and color changes) and support interaction triggered by input devices (keyboard, mouse, remote control, etc.). Examples include volume control buttons, application icons, menu navigation items, and input boxes in the display interface. When the UI focus moves to a focusable element, that element becomes the currently focused element, and thus, the object the user is currently interacting with. It can receive the user's current interaction command and perform the corresponding operation.
[0094] A non-focusable element refers to a structural container within the display interface that cannot be focused on by the interface itself, but contains at least one focusable element (such as a button, input box, or link). Its core function is to organize the content and layout of the display interface without interfering with the focus logic of the internal focusable element. Examples include navigation bars and program lists. Furthermore, non-focusable elements can also contain lower-level non-focusable elements.
[0095] For the sake of brevity, the focusable elements mentioned above will be referred to as focus elements, and the non-focusable partition elements will be referred to as partition elements.
[0096] like Figure 5 As shown, the interface focus movement method applied to the controller of a display device may include the following steps:
[0097] S 501, after receiving the button signal sent by the remote control, parses the button signal to obtain the button direction, and determines the current element focused on by the interface focus in the display interface.
[0098] The display device may include a communication device, and the communication device is connected to a remote controller. Thus, the controller of the display device (hereinafter referred to as the controller) can receive key signals sent by the remote controller through the aforementioned communication device.
[0099] A button signal is an coded electrical signal sent by a remote control to a receiving device (such as a TV, set-top box, or smart device) via a specific communication method (such as infrared, radio frequency, or Bluetooth) when a user presses a button. It is the physical carrier of the user's intention to press a specific button. Typically, button signals contain specific codes (such as preamble, address code, data code, and checksum) to distinguish different buttons on the remote control (such as the up button, left button, and confirmation button). Each button on the remote control corresponds to a unique code to ensure that the receiving device can accurately identify the user's operation.
[0100] The so-called button direction refers to the spatial direction command that the receiving device ultimately resolves when the "direction keys" (usually including four buttons: up, down, left, and right) on the remote control are pressed. This command is used to control the receiving device to perform operations in the corresponding direction. It is bound one-to-one with the physical "direction keys" on the remote control and is a logical command that the device can directly execute, rather than the original code.
[0101] Optionally, when the user presses a directional key (e.g., the left key) on the remote control, the key matrix circuit inside the remote control is activated, triggering the microcontroller unit (MCU) to generate the corresponding key's encoded signal (e.g., binary data "0010" representing the left key). Subsequently, the encoded signal is modulated (e.g., an infrared remote control modulates the signal onto a 38kHz carrier wave, while an RF remote control modulates it to a specific frequency band) into a transmittable physical signal (infrared light, radio waves), which is then transmitted by the transmitting module (infrared LED (Light-Emitting Diode), RF antenna). The display device's signal receiver (infrared receiver head, RF receiver module) monitors the signals in the space in real time. When it receives a signal from the remote control, it converts the physical signal (e.g., infrared light pulses) into an electrical signal (voltage fluctuations) and transmits it to the device's main controller (e.g., a CPU (Central Processing Unit)). The original electrical signal may contain noise (e.g., ambient light interference, electromagnetic interference). The display device performs filtering, amplification, and shaping preprocessing to convert the original electrical signal into a standard digital signal to eliminate interference and ensure signal purity. The display device parses the aforementioned digital signals according to the remote control's encoding protocol (such as the infrared RC5 (Remote Control 5) protocol or the radio frequency rolling code protocol) to extract the data codes representing the buttons. The display device then maps the extracted data codes to specific button identifiers using an internal key value table (a preset "code-button" correspondence). If the button identifier is determined to be a direction key, the display device outputs the direction indicated by the corresponding direction key.
[0102] If the above button directions are obtained through analysis, it can be explained that the current user expects to switch the position of the interface focus in the display interface according to the above button directions, so as to move the display interface to another focus element. Therefore, it is also possible to determine the current element focused by the interface focus in the display interface of the monitor, where the current element is the focus element in the display interface.
[0103] Optionally, the display device is equipped with a focus state variable, which is used to uniquely identify the focus element of the interface (such as control ID (ldentifier), memory address, etc.). When the interface focus is moved by the remote control, the controller can update the value of the above focus state variable in real time according to the remote control operation. Thus, the controller can directly locate the current element focused by the interface focus by reading the value of the above focus state variable.
[0104] Optionally, the controller can listen for focus events (such as signals indicating gaining or losing focus) of each focused element on the display interface. When a focused element receives a "gained focus" event signal, the controller can mark that element as the current focused element; if the focused element receives a "lost focus" event signal, the controller will remove the mark and dynamically update the position of the focus elements. The controller can then iterate through each focused element, checking whether each element is marked as the current focused element, to determine the element currently focused by the interface focus.
[0105] Optionally, the controller can iterate through each focus element of the display interface, and filter out the focus elements whose focus attribute is "focused" by checking the "focus attribute" of each focus element (such as whether it is marked as "focused"), and use them as the current focus element of the interface.
[0106] S502, based on the element hierarchy of the display interface, search for the available element that is closest to the current element in the direction of the button from the elements of the same level as the current element, so as to obtain the first element.
[0107] The element hierarchy is determined by the search path of each element on the display interface. Each element includes focusable elements and non-focusable partition elements.
[0108] The element hierarchy in the display interface refers to the tree-like structure between all elements in the display interface, based on nesting and being nested. A parent element can include one or more child elements, each child element belongs to only one parent element, the topmost element is the root element, and for each element, elements at the same level can be called its sibling elements.
[0109] The search path for each element refers to the complete sequence identifier that starts from the root element of the display interface, passes through each level of parent elements, and finally points to the element. It is a hierarchical string used to describe the position of the element in the display interface, similar to the path of "folder-subfolder-file" in a file system.
[0110] Based on this, the controller can determine the search path for each element on the display interface according to the business code of the display interface, and then generate the element hierarchy relationship of the display interface according to the above search path.
[0111] In cases where multiple different elements share a common prefix element in their search paths, the common prefix element becomes the parent element of the multiple different elements, and the multiple different elements become the child elements of the parent element. Therefore, by analyzing the nesting relationships of elements in the search paths of each element, the root element of the display interface can be determined, and then the parent elements at each level below the root element can be determined layer by layer until the bottom-most child element of each branch is determined. This completes the construction of the hierarchical relationship between elements belonging to that branch, and finally yields a complete tree structure relationship, which serves as the element hierarchy relationship corresponding to the display interface.
[0112] Available elements refer to elements that are in a state where they can respond to user interactions. For available focus elements, the screen focus can be moved to that focus element. For available partition elements, the controller can search for the nested lower-level elements within that partition element. Correspondingly, considering the needs of practical applications, in some cases, there are unavailable elements in the display interface. Unavailable elements refer to elements that exist in the display interface but cannot be operated or triggered by the user due to specific restrictions (such as inactive functions, insufficient permissions, or inapplicable current scenarios). Examples include grayed-out buttons, dimmed icons, and grayed-out partitions; users can see them but cannot interact with them.
[0113] Therefore, after parsing the above-mentioned key direction and determining the above-mentioned current element, the elements at the same level as the current element (i.e., the sibling elements of the current element) can be determined according to the element hierarchy relationship corresponding to the display interface; then, according to the positional relationship between the current element and the elements at the same level as the current element in the display interface, the available element that is closest to the current element in the above-mentioned key direction can be searched from the elements at the same level as the current element.
[0114] Optionally, the controller searches for the element closest to the current element in the same level as the current element along the aforementioned key direction, and determines whether the element is available. If the element is available, it is designated as the first element; if the element is not available, the search continues for the element closest to the current element in the aforementioned key direction, and the availability of the searched element is determined again. This process is repeated until the available element closest to the current element in the aforementioned key direction is found, thus obtaining the first element.
[0115] Optionally, the controller searches for available elements from the same level of the current element, and then searches for the element that is closest to the current element in the direction of the key from among the available elements, and uses it as the first element.
[0116] Furthermore, as mentioned earlier, the elements in the display interface do not have a tabindex attribute set. Instead, they are identified by category attributes. Therefore, when the focus moves, the search for the next element to which the focus will move is based on the element hierarchy and the element type. This eliminates the need to set the tabindex attribute for each focused element individually, thus reducing the amount of code related to the focus movement search logic in the display interface's business logic. This reduces the workload of generating the display interface's business logic and improves its efficiency.
[0117] S 503, when the first element is the focus element, moves the focus of the interface to the first element.
[0118] If the first element is the focus element, then since the first element is a focusable element, the focus of the interface can be directly moved to the first element to complete the interface focus movement.
[0119] S504, if the first element is a partition element, search for the target focus element from the elements at each level under the first element according to the element hierarchy, and if the target focus element is found, move the interface focus to the target focus element.
[0120] The so-called elements under the first element refer to the set of elements nested layer by layer according to the logic of "nesting and being nested", starting from the first element (i.e., the top level or root node of the hierarchical structure). In other words, the elements under the first element are the elements nested by the first element.
[0121] As mentioned earlier, the display interface can include focus elements and partition elements. Each partition element contains at least one focus element. In some cases, a partition element can also contain a lower-level partition element. Therefore, when the first element is a partition element, the first element can contain at least one lower-level element. Based on the element hierarchy of the display interface, the target focus element can be searched for level by level from each level of the first element. Once the target focus element is found, the interface focus is moved to the target focus element to complete the interface focus movement.
[0122] In the above embodiments, the element hierarchy of the display interface can be generated in advance based on the search paths of each element corresponding to the display interface to be displayed on the display device's screen. After receiving the button signal sent by the remote control, the button signal is first parsed to obtain the button direction and determine the current element focused on by the interface focus in the display interface. Then, according to the above element hierarchy, the available element closest to the current element in the button direction is searched from the elements of the same level as the current element to obtain the first element. Since the elements corresponding to the above-mentioned display interface include focusable elements and non-focusable partition elements, when the first element is the focus element, it can be used as the next focus element to be focused on, thus allowing the interface focus to be directly moved to the first element. However, when the first element is a partition element, it cannot be used as the next focus element to be focused on. Therefore, based on the element hierarchy, the target focus element can be searched from the elements under the first element. Once the target focus element is found, it can be used as the next focus element to be focused on, thus allowing the interface focus to be moved to the target focus element, achieving a jump in interface focus. In this way, upon receiving the button signal sent by the remote control, the search logic for focus elements during the interface focus movement can be unified, avoiding conflicts between the two search logics: one based on the tabindex attribute of the focus element and the other based on the direction indicated by the user's pressed directional keys. On the other hand, by jointly searching for the next focus element based on the element hierarchy and button direction on the display interface, the found next focus element is predictable. This avoids abrupt "jumps" during focus movement, ensuring a smooth and expected focus transition. Therefore, in the above embodiment, compared to traditional technologies, the focus element search logic is unified during focus movement, preventing abrupt "jumps" when the focus is moved via remote control and achieving a smooth and expected focus transition.
[0123] Based on the above embodiments, in an exemplary embodiment, the search for the target focus element is further refined. Optionally, such as... Figure 6 As shown, it includes the following steps:
[0124] S601, the first element is determined as the initial element.
[0125] If the first element found in the search is a partition element, the focus of the interface cannot be directly moved to the first element. It is necessary to search for the target focus element from the elements in each level under the first element. In this case, the first element can be determined as the initial element.
[0126] S602, based on the element hierarchy, search for the available element that is closest to the current element in the direction of the key press from the next level of the initial element to obtain the second element.
[0127] Once the initial element is determined, the second element can be obtained by searching for the nearest available element in the direction of the keystroke from the next level of elements, based on the element hierarchy. The method for searching the second element is similar to the method for searching the first element from the same level of elements as the current element, and will not be elaborated further here.
[0128] S603, if the second element is the focus element, determine the second element as the target focus element.
[0129] If the second element is the focus element, then since the second element is a focusable element, it can be determined as the target focus element, and the interface focus can be directly moved to the second element to complete the interface focus movement.
[0130] S604, if the second element is a partition element, use the second element as the new initial element and return to S602.
[0131] When the second element is a partition element, it can contain at least one nested lower-level element. Similar to the first element, the search for the target focus element can continue, level by level, based on the element hierarchy of the display interface. Therefore, the second element can be used as the new initial element, and the process returns to S602 to search for a new second element. This process is repeated until the target focus element is found, at which point the interface focus is moved to that element, completing the focus shift. This iterative search process can be called a recursive search.
[0132] In this embodiment, when the first element is a partition element, the target focus element nested within the first element can be obtained through a recursive search of each level of elements under the first element. Since the first element is the available element closest to the current element in the direction of the key press among the elements at the same level of the current element, the searched target focus element is the focus element closest to the current element in the direction of the key press. Therefore, while avoiding abrupt "jumps" during the movement of the interface focus, the interface focus jump conforms to the user's expected jump of adjacent focus elements, improving the user experience.
[0133] In some cases, due to reasons such as the nested focus element being unavailable, it may be impossible to find the target focus element among the elements in each level below the first element. Therefore, in order to find the target focus element that is as close as possible to the current focus element in the aforementioned key direction and has a close hierarchical relationship, we can continue searching among the other sibling elements of the current element for the nearest available element in the key direction.
[0134] Based on this, in an exemplary embodiment, the search for the target focus element is further refined, building upon the above embodiments. Optionally, as... Figure 7 As shown, it includes the following steps:
[0135] S701, the first element is determined as the initial element.
[0136] S702, based on the element hierarchy, search for the available element that is closest to the current element in the direction of the key press from the next level of the initial element, and use it as the second element.
[0137] S703, if a second element is found and the second element is the focus element, determine the second element as the target focus element.
[0138] S704: If a second element is found and it is a partition element, use the second element as the new initial element and return to S702.
[0139] The specific implementation methods of S701-S704 are the same as those of S601-604, and will not be repeated here.
[0140] S705, if the second element is not found, search for the third element from the remaining sibling elements based on the element hierarchy, and find the available element that is closest to the current element in the direction of the key press.
[0141] Among them, the remaining sibling elements are those elements at the same level as the current element, excluding the first element, that have not been determined as the third element.
[0142] If the second element is not found, it means that the focus of the target element cannot be found among the elements at each level under the first element. Therefore, the elements at the same level as the current element that are not identified as the third element, other than the first element, can be taken as the remaining sibling elements. Then, according to the element hierarchy, the available element that is closest to the current element in the direction of the key is searched from the remaining sibling elements to obtain the third element.
[0143] Specifically, in the case of searching for a third element for the first time, if there is no element at the same level as the current element that is identified as a third element, then the remaining sibling elements are the elements at the same level as the current element other than the first element. In the case of searching for a third element for the second time, if there is an element at the same level as the current element that is identified as a third element, then the remaining sibling elements are the elements at the same level as the current element other than the first element that are not identified as a third element.
[0144] In other words, if the second element is not found, the first element that has already been found and the elements that have been identified as the third element in the same level as the current element can be considered as unavailable elements.
[0145] S706: When the third element is the focus element, move the focus of the interface to the third element.
[0146] When the third element is the focus element, since the third element is a focusable element, it can be determined as the target focus element, and the interface focus can be directly moved to the third element to complete the interface focus movement.
[0147] S707: If the third element is a partition element, use the third element as the new initial element and return to S702; if no target focus element is found among the elements at each level below the third element, return to S705.
[0148] When the third element is a partition element, it can contain at least one nested lower-level element. Similar to the first element, the search for the target focus element can continue, based on the element hierarchy of the display interface, level by level, from the elements under the third element. Therefore, the third element can be used as the new initial element, and the process returns to S702 to search for the second element among the elements under the third element. This process (S702-S704) is repeated until the target focus element is found among the elements under the third element, or until no second focus element is found. In this case, it can be concluded that the target focus element cannot be found among the elements under the third element.
[0149] In this process, if the target focus element is found among the elements at each level under the third element, the screen focus can be directly moved to that second element to complete the screen focus transfer. Conversely, if the target focus element is not found among the elements at each level under the third element, the currently found third element can be treated as an unavailable element to update the remaining sibling elements. The process then returns to step S705 to search again for the nearest available element in the button direction from the updated remaining sibling elements to obtain a new third element. This process is repeated until the target focus element is found, at which point the screen focus is moved to that element to complete the screen focus transfer. This cyclical search process can also be called a recursive search.
[0150] In this embodiment, if the target element focus cannot be found among the elements at each level under the first element, the target focus element nested in the third element at the same level as the current element can be obtained by recursively searching the remaining sibling elements of the current element. The target focus element found is the focus element that is closest to the current element in the direction of the button. Thus, while avoiding abrupt "jumps" during the movement of the interface focus, the interface focus jump conforms to the user's expectation of adjacent focus element jump, improving the user experience.
[0151] In some cases, due to reasons such as the unavailability of nested focus elements within the same level of the current element, it may be impossible to find the target element among all elements within the same level of the current element. Furthermore, due to the unavailability of elements within the same level of the current element, it may be impossible to find the first element. Therefore, to find the target focus element that is as close as possible to the current focus element in the aforementioned button direction and has a close hierarchical relationship, the search can continue from the sibling elements of the current element's parent element.
[0152] Based on this, in an exemplary embodiment, if no third element or first element is found, the interface focus movement method further includes: determining the parent element of the current element according to the element hierarchy; taking the parent element as the new current element; and returning to the step of searching for the nearest available element in the same level of the current element in the button direction from the elements corresponding to the element hierarchy of the display interface.
[0153] In this embodiment, if neither the third element nor the first element is found, it indicates that the target element cannot be found among the elements at the same level as the current element. Therefore, an upward search can be performed. First, the parent element of the current element is determined based on the element hierarchy. Then, the parent element can be used as the new current element, and the focus search process described in the above embodiments is repeated until a first element of the focus element type is found, at which point the interface focus is moved to that first element to complete the focus movement; or, a target focus element is found, at which point the interface focus is moved to that target focus element to complete the focus movement.
[0154] In one optional embodiment, if the current element is the top-level element of the display interface and no third or first element is found, since the current element no longer has a parent element, it indicates that the next focus element required for the interface focus cannot be found from the corresponding focus elements of the display interface. Therefore, the interface focus movement is determined to have failed. The controller can control information output devices such as output displays and audio output devices to output prompt information indicating the failure of the interface focus movement. For example, the controller can control the display to show text, images, or other prompt information to indicate the failure of the interface focus movement; or, for example, the controller can control the audio output device to play voice prompt information to indicate the failure of the interface focus movement.
[0155] In this embodiment, if no third element is found, or if no first element is found, the next focus element (first element or target focus element) that the interface focus needs to focus on can be searched by recursively searching the parent element of the current element. This moves the interface focus to the next focus element that the interface focus needs to focus on, thereby completing the interface focus movement and improving the user experience.
[0156] Based on the above embodiments, in an exemplary embodiment, the method of searching for the nearest available element in the direction of the key from the next level of elements of the initial element according to the element hierarchy includes, when there is no available historical focus element among the elements of each level under the initial element, searching for the nearest available element in the direction of the key from the elements of the next level under the initial element according to the element hierarchy; wherein, the historical focus element is the focus element that was most recently focused by the interface focus among the elements of each level under the initial element.
[0157] Accordingly, in this embodiment, the interface focus moving method further includes moving the interface focus to the historical focus element when there is an available historical focus element among the elements at each level under the initial element.
[0158] In this embodiment, for a partition element nested with a focus element, the focus element most recently focused by the interface focus can be determined from the focus elements focused by the interface focus history. This focus element is then used as the historical focus element of the partition element. The available historical focus element indicates the historical focus element to which the interface focus can directly jump when the partition element is found.
[0159] In this way, after obtaining the initial element, we can first determine whether there is a usable historical focus element among the elements at each level below the initial element. If there is a usable historical focus element, we can directly move the interface focus to the historical focus element to complete the interface focus movement. However, if there is no usable historical focus element, since we cannot directly move the interface focus to the historical focus element, we need to search for the usable element that is closest to the current element in the direction of the key in the next level of the initial element according to the element hierarchy, in order to determine the target focus element that the interface focus can move to and complete the interface focus movement.
[0160] In an optional embodiment, a first attribute for recording historical focus elements and a second attribute for indicating whether historical focus elements are available can be set for the partition element. When the value of the first attribute is empty, regardless of whether the value of the second attribute is empty or indicates whether the historical focus element is available or unavailable, it is determined that there are no available historical focus elements among the elements at each level under the initial element. Furthermore, when the value of the second attribute indicates that the historical focus element is unavailable, it is determined that there are no available historical focus elements among the elements at each level under the initial element. Correspondingly, when the value of the first attribute is the element identifier of a historical focus element and the value of the second attribute indicates that the historical focus element is available, it is determined that there are available historical focus elements among the elements at each level under the initial element.
[0161] Optionally, you can set the `focusChild` (focused child element) and `keepLast` (last item to stay) properties for the partition elements. The `focusChild` property records the historical focused element to remember the focus state; its value is the element identifier of the historical focused element. The `keepLast` property is a boolean control used to determine whether the historical focused element is automatically refocused when the focus leaves and returns to the partition element; it indicates whether the historical focused element is available, and its value is either `true` or `false`. A `keepLast` value of `true` indicates that the historical focused element is available, and a `keepLast` value of `false` indicates that the historical focused element is unavailable. Therefore, if the `focusChild` property is the element identifier of the historical focused element and the `keepLast` property is `true`, it is determined that there is a usable historical focused element among the elements at each level under the initial element; conversely, if the `focusChild` property is empty, or if the `keepLast` property is `false`, it is determined that there is no usable historical focused element among the elements at each level under the initial element.
[0162] In this embodiment, if there are available historical focus elements among the elements at each level under the initial element, the interface focus can be directly moved to the historical focus element. This simplifies the search process for the target focus element when the interface focus is moved to the focus element located in the aforementioned button direction of the current element. Furthermore, it saves the time required for interface focus movement and improves the efficiency of interface focus movement while achieving the interface focus jump that meets the user's expectations.
[0163] Based on the above embodiments, in an exemplary embodiment, the determination of the above element hierarchy relationship is further refined. Optionally, such as... Figure 8 As shown, the following steps may be included:
[0164] S801, in response to the power-on command of the display device, loads the display interface and constructs the initial relational architecture corresponding to the element hierarchy.
[0165] Typically, display devices power on in response to a power-on command. Therefore, upon receiving a power-on command, such as when a user presses the power button on the display device, sends a power-on signal to the display device via a remote control, or wakes up the display device via voice, the controller responds by loading the display interface and constructing the initial relational architecture corresponding to the element hierarchy.
[0166] The initial relational architecture is the element hierarchy "skeleton" of the display interface, constructed according to preset rules when the display device starts up. It is an abstract template of the nesting relationships between the elements of the display interface, and its core function is to provide a basic structural framework for subsequent display interface rendering and interaction. Furthermore, the initial relational architecture corresponding to the element hierarchy is the basic data structure used to carry the element hierarchy relationships. It is an abstract tree framework that defines the hierarchical structure template of interface elements, but does not contain the complete attributes of specific elements (such as style and state), only determining the nesting relationships and hierarchical positions between elements.
[0167] S802, read the element attributes of each element in the display interface.
[0168] The element attributes include the search path.
[0169] Element attributes are sets of parameters that describe the characteristics and behaviors of interface elements (such as buttons, text boxes, icons, etc.). Their core function is to define the element's identity, appearance, position, and interaction rules. Among these, the search path is a key attribute for locating the element's hierarchy, and together with other attributes, it constitutes a complete description of the element. Furthermore, the search path is a crucial attribute connecting elements to the initial relational structure. For example, the search path "root → status bar → time text" clearly indicates that the time text element must be nested under the "status bar" element, and the status bar belongs to the root element of the display interface.
[0170] After loading the display interface and constructing the initial relational architecture described above, the element attributes corresponding to each element in the display interface can be extracted from the display interface's configuration file. These element attributes must include at least the search path. Optionally, the element attributes may also include attributes such as element size and element offset within the display interface.
[0171] Optionally, the `getBoundingClientRect()` method can be used to obtain the coordinates and dimensions of the button (i.e., the focused element) within the view (i.e., the section element). Simultaneously, the `focusPath` attribute value (focus path, i.e., the element's search path) of the button's custom data-key can be read to generate a `VirtualButton` object. The `VirtualButton` object is represented as: `new VirtualButton({top coordinates, left coordinates, height, width, focusPath})`. `getBoundingClientRect()` is a method used to obtain the position and size of an element within the view. `focusPath` records the element's hierarchical path (i.e., the search path). The virtual focus's `focusPath` can be used in conjunction with `document.querySelector` to find the actual focused element in the displayed interface.
[0172] Optionally, when multiple focused elements belong to the same division (div), that division can be marked as a virtual view (i.e., a division element). Through a nested hierarchy mechanism, hierarchical management of the elements corresponding to the displayed interface can be achieved. The `getBoundingClientRect()` method is used to obtain the coordinates, width, and height of the div in the displayed interface, and simultaneously reads the `focusPath` attribute value of the div's custom attribute `data-key` to generate a `VirtualView` object. The `VirtualView` object is represented as: `new VirtualView({top, left, height, width, focusPath)}`.
[0173] The virtual child elements are set using the `virtualView.updateFocusChildren()` method, which supports two types of child elements: virtual focus (VirtualButton) and nested virtual views (VirtualView). For virtual focus (VirtualButton), button-level focus elements are directly added, such as `virtualButton1` and `virtualButton2`. For nested virtual views (VirtualView), view hierarchy nesting is supported, such as `virtualView1` and `virtualView2`, forming a multi-level element management structure. The `virtualView.updateFocusChildren()` method is the core operation in the virtual view (VirtualView) used to update the list of all focusable child elements under the current view. Therefore, the multi-level element management structure can be represented as follows:
[0174] irtualView.updateFocusChildren([virtualButton1, virtualView1, virtualView2, ...]).
[0175] S803: Based on the search path of each element, fill the element attributes of each element into the initial relational structure to obtain the element hierarchy relationship corresponding to the display interface.
[0176] Based on the search path of each element, the corresponding level node of the element is found in the initial relational architecture. Then, the element attributes of the element are filled into the level node so that the level node has actual content. After all elements are filled, the initial relational architecture, which does not contain the complete attributes of specific elements, is transformed into a tree-like hierarchical structure containing all elements and their attributes, so as to obtain the element hierarchy relationship corresponding to the display interface.
[0177] Optionally, the virtual view and independent virtual focus (VirtualButton) in the display interface together construct a complete virtual focus hierarchy tree (vfRootPage). This virtual focus hierarchy tree represents the element hierarchy described above, which can be expressed as vfRootPage = new VirtualFocusPage(). Furthermore, it can be generated by calling the vfRootPage.updateFocusChildren() method, as shown below:
[0178] vfRootPage.updateFocusChildren([virtualView1, virtualButton1, virtualView2, VirtualButton2, virtualButton3, ...]).
[0179] The `vfRootPage.updateFocusChildren()` method is the core method of the virtual focus system, used to update the list of all child elements on the current page that can receive focus. Furthermore, for the aforementioned virtual focus hierarchy tree, the `defaultButton` property can be set to identify the default focus element; its value is the element identifier of the default focus element, and it can be empty. Additionally, the `focusButton` property can be set to represent the current element; its value is the element identifier of the current element.
[0180] In this embodiment, the above-mentioned element hierarchy can be generated when the display device is powered on, so that during the use of the display device after it is powered on, the interface focus can be moved according to the above-mentioned element hierarchy, so as to realize the interface focus jump that meets the user's expectations and improve the user experience.
[0181] Understandably, after the display device is powered on and before receiving a button signal from the remote control, the focus of the interface will be on a certain focus element in the display interface, and this focus element can be regarded as the initial element.
[0182] Based on this, in an exemplary embodiment, before receiving the button signal sent by the remote control, the interface focus moving method further includes, if there is a default focus element among the focus elements corresponding to the display interface, moving the interface focus to the default focus element; if there is no default focus element among the focus elements corresponding to the display interface, moving the interface focus to the first focus element among the highest-level focus elements according to the element hierarchy.
[0183] In this embodiment, when constructing the configuration file for the display interface, an attribute can be set for the display interface to record the default focus element. The attribute value is the element identifier of the default focus element, and the attribute value can be empty. Therefore, after the display interface is loaded in response to the power-on command of the display device, the existence of a default focus element among the corresponding focus elements of the display interface can be determined by the attribute value of the attribute used to record the default focus element in the configuration file of the display interface.
[0184] If a default focus element exists among the focus elements on the display interface, the focus can be directly moved to that default focus element. Upon the first button signal received from the remote control, this default focus element becomes the current focus element. Conversely, if no default focus element exists among the focus elements on the display interface, it's necessary to determine the initial element to which the focus should be moved. Based on the element hierarchy described above, the highest-level focus element among the focus elements on the display interface can be determined. The first focus element from this highest-level focus element is then selected as the default focus element. The focus is then moved to this first focus element from the highest-level focus element, and upon the first button signal received from the remote control, this first focus element becomes the current focus element.
[0185] In this embodiment, after the display device is powered on and before receiving the button signal sent by the remote control, the interface focus can be focused on the initial element based on the default focus element among the corresponding focus elements on the display interface, or by moving the interface focus to the first focus element among the highest-level focus elements. This allows the user to determine the direction of movement of the interface focus based on the current initial focus when moving the interface focus, and press the direction keys in the remote control. As a result, the interface focus jump that meets the user's expectations can be quickly achieved, improving the user experience.
[0186] Based on the above embodiments, in an exemplary embodiment, such as Figure 9 As shown, the interface focus movement method may include the following steps:
[0187] S901, after receiving the button signal sent by the remote control, parses the button signal to obtain the button direction, and determines the current element focused on by the interface focus in the display interface.
[0188] S902, based on the element hierarchy of the display interface, search for the available element that is closest to the current element in the direction of the button from the elements of the same level as the current element, so as to obtain the first element.
[0189] S903: When the first element is the focus element, the interface focus is moved to the first element.
[0190] S904: When the first element is a partition element, search for the target focus element from the elements at each level under the first element according to the element hierarchy, and when the target focus element is found, move the interface focus to the target focus element.
[0191] The specific implementation methods of S901-S904 are the same as those of S501-S504, and will not be repeated here.
[0192] S905, based on the size and position offset of the focused element after the interface focus is moved, and the size and position offset of the scroll container where the focused element is located, determine the scrolling distance required to scroll the focused element to the center position of the scroll container.
[0193] When the first element is the focus element, the focus element that is focused after the interface focus is moved is the focus element. Similarly, when the first element is the partition element, the focus element that is focused after the interface focus is moved is the target focus element.
[0194] A scrollable container is a container element in a display interface whose position is fixed (its layout position on the interface does not change as its internal content scrolls), but allows its internal elements to change position within its visible range through scrolling. Essentially, it is a "visual window" in the display interface with a fixed position and scrollable internal content. Internal elements can scroll horizontally within the scrollable container, or vertically, or both.
[0195] The so-called position offset refers to the difference between the actual position of the focused element or scrolling container on the display interface and the reference position of the display interface, which is usually expressed in coordinates (such as the distance in the X-axis and Y-axis directions).
[0196] Optionally, the position offset of the scroll container refers to the fixed coordinate difference between the scroll container and the origin of the display interface (such as the upper left corner of the screen). Since the position of the scroll container in the display interface is fixed, this offset is a constant value. The position offset of the focused element refers to the fixed coordinate difference between the focused element and the origin of the display interface (such as the upper left corner of the screen). Since the focused element moves in the scroll container, this offset changes with the movement of the focused element.
[0197] In an alternative embodiment, the scrolling distance required to scroll the focused element to the center position of the scrolling container can be determined by the following formula:
[0198] S_x=
[0199] elementOffset_x-containerRectOffset_x-(containerSize_x / 2)+(elementSize_x / 2);
[0200] S_y=
[0201] elementOffset_y-containerRectOffset_y-(containerSize_y / 2)+(elementSize_y / 2).
[0202] Where S_x is the horizontal movement distance in the scrolling distance required to scroll the focused element to the center position of the scrolling container; and S_y is the vertical movement distance in the scrolling distance required to scroll the focused element to the center position of the scrolling container.
[0203] elementOffset_x is the horizontal offset in the position offset of the focused element;
[0204] containerRectOffset_x is the horizontal offset in the position offset of the scroll container;
[0205] containerSize_x is the horizontal dimension (length) of the scroll container; elementSize_x is the horizontal dimension (length) of the focused element;
[0206] elementOffset_y is the vertical offset in the position offset of the focused element;
[0207] containerRectOffset_y is the vertical offset in the position offset of the scroll container;
[0208] containerSize_y is the vertical dimension (width) of the scrolling container; elementSize_y is the vertical dimension (width) of the focused element.
[0209] Furthermore, the rolling position of the rolling container can be determined using the following formula:
[0210] position_x=containerScroll_x+elementOffset_x
[0211] -containerRectOffset_x-(containerSize_x / 2)+(elementSize_x / 2)
[0212] position_y=containerScroll_y+elementOffset_y
[0213] -containerRectOffset_y-(containerSize_y / 2)+(elementSize_y / 2)
[0214] Where `position_x` is the horizontal scroll position of the scroll container; `position_y` is the vertical scroll position of the scroll container; `containerScroll_x` is the horizontal historical scroll position of the scroll container, and `containerScroll_y` is the horizontal historical scroll position of the scroll container. The scroll position refers to the offset distance of the internal element of the scroll container relative to the scroll container.
[0215] S906, based on the scroll distance, moves the focused element to the center of the scroll container.
[0216] After determining the above scrolling distance, the focused element is moved to the center of the scrolling container according to the above scrolling distance.
[0217] Optionally, in some cases, depending on the needs of the actual application, it may be necessary to move the focused element to a position slightly off from the center of the scrolling container. After obtaining the above scrolling distance, the actual scrolling example can be determined based on the offset between the target position to which the focused element needs to be moved and the center position of the scrolling container, as well as the above scrolling distance. Then, based on the actual distance, the focused element can be moved to the target position to meet the needs of diverse interaction scenarios.
[0218] In this embodiment, after moving the interface focus to the focused element, the focused element can be further moved to the center of the scroll container so that the interface focus can be fully and clearly displayed in the display interface, thereby improving the accuracy and convenience of the user's operation on the focused element and enhancing the user experience.
[0219] Based on the above embodiments, in an exemplary embodiment, such as Figure 10 As shown, the interface focus movement method may include the following steps:
[0220] S1001, the remote control sends a power-on command to the display device.
[0221] S1002, the display device responds to the power-on command, loads the display interface, and constructs the initial relational architecture corresponding to the element hierarchy.
[0222] S1003, the display device reads the element attributes of each element on the display interface and fills the element attributes of each element into the initial relational structure according to the search path of each element, so as to obtain the element hierarchy relationship corresponding to the display interface.
[0223] S1004, if there is a default focus element among the focus elements corresponding to the display interface, the display device moves the interface focus to the default focus element; if there is no default focus element among the focus elements corresponding to the display interface, the display device moves the interface focus to the first focus element among the highest-level focus elements according to the element hierarchy.
[0224] S1005, the remote control sends button signals to the display device.
[0225] S1006, the display device parses the key signals to obtain the key direction, and determines the current element focused on by the interface focus in the display interface.
[0226] S1007, the display device searches for the nearest available element in the direction of the key from the elements of the same level as the current element, based on the element hierarchy, and selects it as the first element.
[0227] S1008, If the display device does not find the first element, it determines the parent element of the current element according to the element hierarchy relationship, and takes the parent element as the new current element, and returns to S1007.
[0228] S1009, when the display device finds the first element and the first element is the focus element, it moves the focus of the interface to the first element.
[0229] S1010, if the display device finds the first element and the first element is a partition element, it determines the first element as the initial element.
[0230] S1011, the display device searches for the available element that is closest to the current element in the direction of the key from the next level of the initial element according to the element hierarchy relationship, and uses it as the second element.
[0231] S1012, if the display device finds a second element and the second element is the focus element, it determines the second element as the target focus element.
[0232] S1013, if the display device finds a second element and the second element is a partition element, it will use the second element as the new initial element and return to S1011.
[0233] S1014, if the display device does not find a second element, it searches for the available element that is closest to the current element in the direction of the button from the remaining sibling elements according to the element hierarchy relationship, and uses it as the third element.
[0234] S1015, when the display device finds a third element and the third element is the focus element, it moves the interface focus to the third element.
[0235] S1016, if the display device finds a third element and the third element is a partition element, it takes the third element as the new initial element and returns to S1011; if no target focus element is found among the elements at each level under the third element, it returns to S1014.
[0236] S1017, if the display device does not find a third element, it determines the parent element of the current element according to the element hierarchy relationship, and takes the parent element as the new current element, and returns to S1007.
[0237] S1018, when the current element is the top-level element of the display interface and no third or first element is found, the control information output device outputs a prompt message indicating that the interface focus movement has failed.
[0238] S1019, the display device determines the scrolling distance required to scroll the focused element to the center position of the scrolling container based on the size and position offset of the focused element after the interface focus is moved, and the size and position offset of the scrolling container where the focused element is located.
[0239] S1020, the display device moves the focused element to the center of the scrolling container based on the scrolling distance.
[0240] The specific implementation methods of S1001-S1020 are the same as those in the above method embodiments, and will not be repeated here.
[0241] Based on the same inventive concept, some embodiments also provide an interface focus moving device for implementing the interface focus moving method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more interface focus moving device embodiments provided below can be found in the limitations of the interface focus moving method described above, and will not be repeated here.
[0242] In one exemplary embodiment, such as Figure 11 As shown, an interface focus moving device is provided, applied to a display device, including a signal analysis module 1110, a first search module 1120, a first moving module 1130, and a second search module 1140. Among them,
[0243] The signal parsing module 1110 is used to parse the key signal after receiving the key signal sent by the remote control to obtain the key direction, and to determine the current element focused on by the interface focus in the display interface of the display device; wherein the display interface is an HTM L5 interface.
[0244] The first search module 1120 is used to search for the nearest available element to the current element in the direction of the key from the elements of the same level of the current element according to the element hierarchy relationship corresponding to the display interface, so as to obtain the first element; wherein, the element hierarchy relationship is determined according to the search path of each element corresponding to the display interface, and each element includes focusable focus elements and non-focusable partition elements.
[0245] The first moving module 1130 is used to move the focus of the interface to the first element when the first element is the focus element;
[0246] The second search module 1140 is used to search for the target focus element from each level of the first element according to the element hierarchy when the first element is a partition element, and to move the interface focus to the target focus element when the target focus element is found.
[0247] In one exemplary embodiment, the second search module 1140 is specifically used for:
[0248] Starting with the first element, based on the element hierarchy, search for the available element that is closest to the current element in the direction of the key press from the next level of the initial element to obtain the second element;
[0249] If the second element is the focus element, then the second element is determined as the target focus element.
[0250] If the second element is a partition element, the second element is used as the new initial element, and the operation is performed to search for the nearest available element in the direction of the key from the next level of the initial element, based on the element hierarchy.
[0251] In an exemplary embodiment, if the second element is not found, the interface focus moving device further includes:
[0252] The third search module is used to search for the available element that is closest to the current element in the direction of the key from the remaining sibling elements according to the element hierarchy relationship, so as to obtain the third element; wherein, the remaining sibling elements are the elements in the same level as the current element other than the first element, and which have not been determined as the third element.
[0253] The second moving module is used to move the focus of the interface to the third element when the third element is the focus element;
[0254] The first finer module is used to take the third element as the new initial element and trigger the second search module 1140 when the third element is a partition element, and to trigger the third search module when the target focus element is not found.
[0255] In an exemplary embodiment, if no third element or first element is found, the interface focus moving device further includes:
[0256] The upper-level backtracking module is used to determine the parent element of the current element based on the element hierarchy.
[0257] The second finer module is used to take the parent element as the new current element and trigger the first search module 1120.
[0258] In one exemplary embodiment, the second search module 1140 is specifically used for:
[0259] If there is no available historical focus element among the elements at each level under the initial element, the search is conducted from the next level of elements under the initial element to find the available element that is closest to the current element in the direction of the key press; where the historical focus element is the most recently focused element among the elements at each level under the initial element.
[0260] The interface focus movement device also includes:
[0261] The third moving module is used to move the interface focus to the historical focus element when there is an available historical focus element among the elements at each level under the initial element.
[0262] In one exemplary embodiment, the interface focus moving device further includes:
[0263] The instruction response module is used to respond to the power-on instruction of the display device, load the display interface, and construct the initial relational architecture corresponding to the element hierarchy before receiving the button signal sent by the remote control;
[0264] The attribute reading module is used to read the element attributes of each element in the display interface; among them, the element attributes include the search path;
[0265] The relationship building module is used to populate the element attributes of each element into the initial relationship structure according to the search path of each element, so as to obtain the element hierarchy relationship corresponding to the display interface.
[0266] In one exemplary embodiment, the interface focus moving device further includes:
[0267] Before receiving a button signal from the remote control, the fourth moving module moves the focus of the interface to the default focus element if there is one among the focus elements on the display interface; otherwise, it moves the focus to the first focus element in the highest-level focus element according to the element hierarchy.
[0268] In one exemplary embodiment, the interface focus moving device further includes:
[0269] The distance determination module is used to determine the scrolling distance required to scroll the focused element to the center position of the scrolling container based on the size and position offset of the focused element after the interface focus is moved, as well as the size and position offset of the scrolling container in which the focused element is located.
[0270] The element scrolling module is used to move the focused element to the center of the scrolling container based on the scrolling distance.
[0271] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0272] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0273] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0274] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0275] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0276] The above embodiments merely illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application's patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A display device, characterized in that, include: Displays and controllers; The controller is configured as follows: After receiving a button signal from the remote control, the button signal is parsed to obtain the button direction, and the current element focused on by the interface focus in the display interface is determined; wherein, the display interface is an HTML5 interface; according to the element hierarchy relationship corresponding to the display interface, the available element closest to the current element in the button direction is searched from the elements of the same level as the current element to obtain the first element; wherein, the element hierarchy relationship is determined according to the search path of each element corresponding to the display interface, and each element includes focusable focus elements and non-focusable partition elements; If the first element is the focus element, the interface focus is moved to the first element; When the first element is the partition element, the target focus element is searched from each level element under the first element according to the element hierarchy, and when the target focus element is found, the interface focus is moved to the target focus element.
2. The display device according to claim 1, characterized in that, When the controller performs the search for the target focus element from each level of elements under the first element according to the element hierarchy, it is configured as follows: Using the first element as the initial element, and according to the element hierarchy, search for the available element that is closest to the current element in the direction of the key press from the next level of the initial element to obtain the second element; If the second element is the focus element, then the second element is determined to be the target focus element; If the second element is the partition element, the second element is used as the new initial element, and the operation of searching for the nearest available element to the current element in the next level of the initial element according to the element hierarchy is performed.
3. The display device according to claim 2, characterized in that, If no second element is found, the controller is also configured to: Based on the element hierarchy, from the remaining sibling elements, search for the available element that is closest to the current element in the direction of the key press to obtain the third element; wherein, the remaining sibling elements are the elements in the same level as the current element that are other than the first element and have not been determined as the third element. If the third element is the focus element, the interface focus is moved to the third element; If the third element is the partition element, the third element is used as the new initial element, and the operation of searching for the nearest available element in the direction of the key from the next level of the initial element according to the element hierarchy is performed. If no target focus element is found, the operation of searching for the nearest available element in the direction of the key from the remaining sibling elements according to the element hierarchy is performed.
4. The display device according to claim 3, characterized in that, If neither the third element nor the first element is found, the controller is also configured to: Based on the element hierarchy, determine the next-level element of the current element; The parent element is taken as the new current element, and the operation of searching for the nearest available element in the same level as the current element in the direction of the key is performed based on the element hierarchy relationship corresponding to the display interface.
5. The display device according to claim 2, characterized in that, When the controller performs the operation of searching for the nearest available element to the current element in the direction of the key press, based on the element hierarchy, it is configured as follows: If there is no available historical focus element among the elements at each level under the initial element, the available element that is closest to the current element in the direction of the key is searched from the next level of elements under the initial element according to the element hierarchy; wherein, the historical focus element is the focus element that was most recently focused by the interface focus among the elements at each level under the initial element. The controller is also configured to: If a historical focus element is available among the elements at each level under the initial element, the interface focus is moved to the historical focus element.
6. The display device according to any one of claims 1-5, characterized in that, Before receiving the button signal sent by the remote control, the controller is also configured to: In response to the power-on command of the display device, the display interface is loaded, and the initial relationship architecture corresponding to the element hierarchy is constructed; Read the element attributes of each element in the display interface; wherein, the element attributes include the search path; Based on the search path of each element, the element attributes of each element are filled into the initial relational structure to obtain the element hierarchy relationship corresponding to the display interface.
7. The display device according to claim 6, characterized in that, Before receiving the button signal sent by the remote control, the controller is also configured to: If a default focus element exists among the focus elements corresponding to the display interface, the interface focus is moved to the default focus element; If there is no default focus element among the focus elements corresponding to the display interface, the interface focus is moved to the first focus element in the highest level focus element according to the element hierarchy.
8. The display device according to any one of claims 1-7, characterized in that, The controller is also configured to: Based on the size and position offset of the focused element after the interface focus is moved, and the size and position offset of the scroll container where the focused element is located, determine the scrolling distance required to scroll the focused element to the center position of the scroll container; Based on the scrolling distance, the focused element is moved to the center of the scrolling container.
9. A method for moving interface focus, characterized in that, Applied to display devices, including: After receiving a button signal from the remote control, the button signal is parsed to obtain the button direction, and the current element focused on by the interface focus in the display interface of the display device is determined; wherein, the display interface is an HTML5 interface; Based on the element hierarchy of the display interface, from the elements of the same level as the current element, search for the available element that is closest to the current element in the direction of the button to obtain the first element; wherein, the element hierarchy is determined according to the search path of each element of the display interface, and each element includes focusable focus elements and non-focusable partition elements; If the first element is the focus element, the interface focus is moved to the first element; When the first element is the partition element, the target focus element is searched from each level element under the first element according to the element hierarchy, and when the target focus element is found, the interface focus is moved to the target focus element.
10. The method according to claim 9, characterized in that, The step of searching for the target focus element from each level of elements under the first element according to the element hierarchy includes: Using the first element as the initial element, and according to the element hierarchy, search for the available element that is closest to the current element in the direction of the key press from the next level of the initial element to obtain the second element; If the second element is the focus element, then the second element is determined to be the target focus element; If the second element is the partition element, the second element is used as the new initial element, and the operation of searching for the nearest available element to the current element in the next level of the initial element according to the element hierarchy is performed.