A focus control method, system and application based on front-end framework

By constructing a focus control method in the front-end framework, analyzing the current focus position and movement direction, and determining the next focus element, the problem of low efficiency of the existing focus control solution is solved and a more efficient user interaction experience is achieved.

CN117311550BActive Publication Date: 2024-11-29SHENZHEN SEN5 TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311063400.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-22
Publication Date
2024-11-29
Estimated Expiration
2043-08-22

AI Technical Summary

Technical Problem

The lack of mature design in user interactions in existing focus control solutions leads to inefficient and poor experience of users when processing complex information and tasks.

Method used

Using the front-end frame-based focus control method, by traversing the control elements in the area, analyzing their shape and position, building a focus area, finding and calculating the minimum distance and area area to determine the next focus element, and adapting to different focus movement conditions and component distribution , enhance user experience and interactive efficiency.

Benefits of technology

It improves user experience and interaction efficiency, reduces cognitive load, and provides a mature focus control solution to help users quickly locate interface elements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117311550B_ABST
    Figure CN117311550B_ABST
Patent Text Reader

Abstract

The present invention proposes a focus control method, system and application based on a front-end framework, the method comprising: under the front-end framework, traversing the control elements, parsing the focus elements, marking the end positions of the focus elements in each movable direction; after receiving the instruction, selecting the edge position in the vertical direction of the moving direction that can completely encompass the focus element in the moving direction; constructing a focus area with the edge position as the starting point; finding whether there is a control element in the focus area; calculating the minimum distance between the focus element and each quasi-focus element for screening. The present invention adopts different focus control designs for different focus movement conditions and component distribution conditions, determines the element where the next focus is located by analyzing the current focus position and the moving direction of the next focus, and helps users quickly locate interface elements through reasonable focus control design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of focus control, and in particular to a focus control method, system and application based on a front-end framework. Background Art

[0002] In human-computer interaction, focus control refers to the control of the direction and concentration of attention through the interaction between the user and the computer interface in order to effectively communicate and operate with the computer system. Focus control plays an important role in user interface design, helping users to handle complex information and tasks, and improving interaction efficiency and user experience.

[0003] Focus refers to the interface element or interactive object that the user is currently focusing on. Focus can be a clickable button, an input box, a menu item, etc. Users interact with the focus through keyboard, mouse, or touch. In the display interface, visual design is usually used to guide the user's attention. For example, highlighting, color change, animation effects, etc. are used to highlight the current focus, the status of interactive elements, or important information, helping users to identify and locate the focus more quickly.

[0004] However, existing solutions lack a mature focus control solution. Summary of the invention

[0005] In view of this, the present invention proposes a focus control method, system and application based on a front-end framework, and the specific scheme is as follows:

[0006] A focus control method based on a front-end framework, based on the front-end framework, specifically includes:

[0007] Traverse all control elements in the region that belong to the current level and can be focused, set the movable direction of the focus in the region, and define the control element currently focused as the focus element;

[0008] Analyzing the shape of the focal element to select a geometric center of the focal element, and marking the end position of the focal element farthest from the geometric center in each movable direction;

[0009] When receiving an instruction about the next moving direction of the current focus, two end positions that can completely encompass the focus element in the moving direction are selected in a direction perpendicular to the moving direction to obtain two edge positions;

[0010] Taking the edge position as a starting point, constructing boundary lines parallel to the moving direction respectively in the moving direction, so that the two boundary lines and the focus element together constitute a focus area;

[0011] Finding whether there is a control element whose whole or part of the area falls within the focus area in the focus area, and if there is such a control element, treating it as a quasi-focus element;

[0012] The minimum distance between the focal element and each quasi-focal element is calculated, and a quasi-focal element is selected as the control element for the next focal concentration based on the element parameters including the minimum distance and the area falling into the focal area.

[0013] In a specific embodiment, if there is no control element in the focus area whose whole or part of the area falls within the focus area, then:

[0014] Selecting an end position farthest from the geometric center on a side close to the focal area in the moving direction as a secondary edge position;

[0015] Taking the secondary edge position as a starting point, constructing secondary boundary lines perpendicular to the boundary line in a direction perpendicular to the moving direction, so that each boundary line and the secondary boundary line together constitute a secondary focal area except the focal area;

[0016] It is checked whether there is a control element in the secondary focus area whose whole or part of the area falls within the secondary focus area, and if there is such a control element, the control element is regarded as a quasi-focus element.

[0017] In a specific embodiment, if there is no control element in the focus area whose whole or part of the area falls within the focus area, then:

[0018] The boundary line is gradually rotated with the end position on the focal element as the center and the preset angle as the step size, and it is gradually searched whether there is a control element that meets the preset distance on the boundary line that gradually deviates from the moving direction to both sides; after finding the control element that meets the preset distance, the rotation is stopped and the control element is used as the control element for the next focus.

[0019] In a specific embodiment, the boundary line is first rotated with the edge position as the center of the circle,

[0020] If, when rotating to a certain angle, the edge position is no longer the end position farthest from the geometric center in the moving direction, the current boundary line is translated to the end position farthest from the geometric center, and the rotation is performed with the end position selected as the center of the circle.

[0021] In a specific embodiment, a hierarchy is set for the main text area and the control element appearing in the main text area, and when the control element is clicked, the main text area cannot be moved.

[0022] In one specific embodiment, the focus is moved step by step via a keyboard or a joystick.

[0023] A focus control system based on a front-end framework, which constructs the following modules based on the front-end framework:

[0024] A preselection unit, used to traverse each control element in the region that belongs to the current level and can be focused, set the movable direction of the focus in the region, and define the control element currently focused as the focus element;

[0025] An analysis unit, used for analyzing the shape of the focus element to select the geometric center of the focus element, and marking the end position of the focus element farthest from the geometric center in each movable direction;

[0026] A position selection unit, for, upon receiving an instruction on the next moving direction of the current focus, selecting two end positions in a direction perpendicular to the moving direction that can completely encompass the focus element in the moving direction, so as to obtain two edge positions;

[0027] A first area unit is used to construct boundary lines parallel to the moving direction from the edge position as a starting point toward the moving direction, so that the two boundary lines and the focus element together constitute a focus area;

[0028] A first searching unit is used to search whether there is a control element whose whole or part of the area falls within the focus area in the focus area, and if there is such a control element, regard it as a quasi-focus element;

[0029] The calculation unit is used to calculate the minimum distance between the focal element and each quasi-focal element, and select a quasi-focal element as the control element for the next focal concentration by comprehensively considering the element parameters including the minimum distance and the area falling into the focal area.

[0030] In a specific embodiment, if there is no control element in the focus area whose whole or part of the area falls within the focus area, then:

[0031] Selecting an end position farthest from the geometric center on a side close to the focal area in the moving direction as a secondary edge position;

[0032] Taking the secondary edge position as a starting point, constructing secondary boundary lines perpendicular to the boundary line in a direction perpendicular to the moving direction, so that each boundary line and the secondary boundary line together constitute a secondary focal area except the focal area;

[0033] It is checked whether there is a control element in the secondary focus area whose whole or part of the area falls within the secondary focus area, and if there is such a control element, the control element is regarded as a quasi-focus element.

[0034] In a specific embodiment, if there is no control element in the focus area whose whole or part of the area falls within the focus area, then:

[0035] The boundary line is gradually rotated with the end position on the focal element as the center of the circle and the preset angle as the step length, and a control element meeting the preset distance is gradually found on the boundary line gradually deflected to both sides from the moving direction;

[0036] After finding a control element that meets the preset distance, the rotation is stopped and the control element is used as the control element for next focus concentration.

[0037] A web interface uses any of the above-mentioned focus control methods based on a front-end framework to perform focus control.

[0038] Beneficial effects: The present invention proposes a focus control method, system and application based on the front-end framework. Under the front-end framework, different focus control designs are adopted for different focus movement conditions and component distribution conditions, which enhances user experience, reduces cognitive load, improves interaction efficiency and user satisfaction, and builds a mature focus control solution for the ecology under the mainstream front-end development framework. By analyzing the current focus position and the next focus movement direction, the component where the next focus is located is determined, and through reasonable focus control design, users can quickly locate interface elements. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0040] Figure 1 is a flow chart of a focus control method according to an embodiment of the present invention;

[0041] Figure 2 A schematic diagram of a focal area according to an embodiment of the present invention;

[0042] Figure 3 Schematic diagram of a focus control system module according to an embodiment of the present invention.

[0043] Figure numerals: 1-preselection unit; 2-analysis unit; 3-position selection unit; 4-first area original; 5-first search unit; 6-calculation unit. DETAILED DESCRIPTION

[0044] In the following, various embodiments of the present disclosure will be described more fully. The present disclosure may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of the present disclosure to the specific embodiments disclosed herein, but the present disclosure should be understood to cover all adjustments, equivalents and / or alternatives that fall within the spirit and scope of the various embodiments of the present disclosure.

[0045] The terms used in the various embodiments disclosed in the present invention are only used for the purpose of describing specific embodiments and are not intended to limit the various embodiments disclosed in the present invention. As used herein, the singular form is intended to also include the plural form, unless the context clearly indicates otherwise. Unless otherwise specified, all terms used herein (including technical terms and scientific terms) have the same meaning as the meanings commonly understood by ordinary technicians in the field of the various embodiments disclosed in the present invention. The terms (such as the terms defined in the generally used dictionary) will be interpreted as having the same meaning as the contextual meaning in the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning, unless clearly defined in the various embodiments disclosed in the present invention.

[0046] Example 1

[0047] Embodiment 1 of the present invention discloses a focus control method based on a front-end framework. Focus control design is performed under the front-end framework to enhance user experience, reduce cognitive load, and improve interaction efficiency and user satisfaction. The focus control method flow chart is shown in the attached figure. Figure 1 The specific plan is as follows:

[0048] A focus control method based on a front-end framework, specifically comprising:

[0049] 101. Traverse each control element in the region that belongs to the current level and can be focused, set the movable direction of the focus in the region, and define the control element currently focused as the focus element;

[0050] 102. Analyze the shape of the focal element to select the geometric center of the focal element, and mark the end position of the focal element farthest from the geometric center in each movable direction;

[0051] 103. When receiving an instruction on the next moving direction of the current focus, two end positions that can completely encompass the focus element in the moving direction are selected in a direction perpendicular to the moving direction to obtain two edge positions;

[0052] 104. Taking the edge position as a starting point, construct boundary lines parallel to the moving direction in the moving direction, so that the two boundary lines and the focus element together constitute a focus area;

[0053] 105. Find whether there is a control element in the focus area whose whole or part of the area falls within the focus area, and if there is such a control element, use it as a quasi-focus element;

[0054] 106. Calculate the minimum distance between the focal element and each quasi-focal element, and select a quasi-focal element as the control element for the next focal concentration by comprehensively considering the element parameters including the minimum distance and the area falling into the focal area.

[0055] The focus control scheme of this embodiment determines the element where the next focus is located by analyzing the current focus position and the moving direction of the next focus, and helps users quickly locate interface elements through reasonable focus control design.

[0056] This embodiment needs to ensure that there is a strict hierarchical relationship between the various control elements to avoid confusion when the focus moves. For example, in the main text area, the control elements are divided into primary buttons and secondary buttons. The secondary buttons will be displayed only after clicking the primary buttons. At this time, the focus can only be moved up and down in the secondary button area and cannot move to the main text area. Exemplarily, the secondary buttons are all placed at the level of index=2, the primary buttons and the main text area are at the level of index=1, the upward and downward movement of the control focus can only be performed at the level of index=2, and the left and right movement does not need to be restricted by the level.

[0057] This embodiment defines the control element currently focused on as the focus element. The focus element will shift as the user's attention shifts, and the shift direction is the predicted direction of the next focus element. And based on the common properties of focus shift in various interactive interfaces, it will give priority to shifting to the control element that is closest. To this end, this embodiment divides the plane area where the focus element is located into regions, and preferentially searches for control elements in the moving direction. If there is no control element in the moving direction, it will shift angle by angle to search for control elements in directions other than the moving direction to ensure that the next focus element can be found in time, reducing user waiting time.

[0058] Considering that different devices have different control directions for focus, such as a mouse can click in any area, while a keyboard, a handle, etc. can only be fixed in four directions, it is necessary to set the movable direction of the focus in the area in advance. The movable direction is the direction in which the user can control the focus to move. The focus control scheme of this embodiment is limited to the scheme of gradually controlling the focus, and the scheme of devices such as a mouse that can click at will is not applicable.

[0059] In step 102, the shape of the focus element needs to be analyzed. The focus control scheme of this embodiment fully considers the various shapes of the control element presented in the interactive interface, such as circles, polygons, irregular shapes, etc. The geometric center of the focus element is selected, and the end position of the focus element farthest from the geometric center in each movable direction is marked. It can be understood that a coordinate system is constructed with the geometric center of the focus element as the center of the circle to measure the distance between each edge position on the element. The diversity of shapes leads to different distances between the geometric center of the element and each edge position, so the end position of the focus element farthest from the geometric center in each movable direction is marked. There are multiple end positions, which need to be selected based on the geometric center as the starting point and the direction.

[0060] 103. After receiving the instruction about the next moving direction of the current focus, two end positions that can completely encompass the focus element in the moving direction are selected in the vertical direction of the moving direction to obtain two edge positions. The edge positions can be understood as the two most edge points on the focus element, and these two points are the farthest apart. Among them, the moving direction must be selected from the movable directions and cannot exceed the moving direction that the device can control. 104. Taking the edge position as the starting point, construct boundary lines parallel to the moving direction respectively in the moving direction, so that the two boundary lines and the focus element together constitute the focus area. The focus area completely covers the entire range of the focus element in the moving direction. For example, the focus element is circular, and its end positions are various places on the edge. When the moving direction is selected to the right, the two end positions farthest apart in this direction are the two points passing through the center of the circle in the vertical direction. Take these two points as the starting point to make a boundary line to the right, and the two boundary lines combined with the focus element can form the focus area.

[0061] Focus area as attached Figure 2 As shown in the attached Figure 2 In the example, the moving direction is horizontal to the right, and the focus area is in the area to the right of the focus area. Constructing the focus area is essentially to find out whether there is a control element in the moving direction of the focus element. Considering the distribution of components, there may not be a complete component in the focus area, but only a part of the area is in the focus area. Therefore, it is necessary to find out whether there is a control element in the focus area that falls in whole or in part. In practical applications, when there are both components that fall in whole and components that fall in part in the focus area, if the other conditions of the two components are the same, the component that falls in whole can be selected preferentially.

[0062] The reason for constructing the focus area is that it is difficult to find a strictly opposite component in a certain direction because the focus element is a sheet structure. Expanding the direction into an area can expand the selection range of components and reduce the probability of not finding the component. In addition, the focus area represents the search area of ​​the focus element in the moving direction. When the component cannot be found in this area, it can be searched in other areas. Other areas are constructed based on the focus area. The components on the focus area are the alternative components for the next focus. In this embodiment, the control elements in the focus area are named quasi-focal elements. Selecting a focus element from the quasi-focal elements also needs to follow certain rules, such as distance, etc., and can also be selected according to certain customized needs of the user.

[0063] Generally speaking, the focus selection follows the principle of the closest distance, and the component closest to the focal element is given priority. However, it is also necessary to consider the area of ​​the component falling into the focal area. When only one corner of the component falls into the focal area, the component needs to be selected with caution. This embodiment sets an element parameter, and the element parameter includes the minimum distance and the area of ​​the component falling into the focal area. Specifically, the minimum distance between the focal element and each quasi-focal element is calculated, and a quasi-focal element is selected as the control element for the next focal concentration based on the element parameters including the minimum distance and the area of ​​the area falling into the focal area. When calculating the distance, it is necessary to first select the point on the quasi-focal element that is closest to the focal element, and the point on the focal element that is closest to the quasi-focal element, and calculate the distance between the two points. Preferably, the proportion of the area of ​​the component falling into the focal area to the total area of ​​the component reaches a preset percentage before the component can be included in the consideration range of the focal element.

[0064] In view of the situation that there is no control element in the focus area where all or part of the control element falls within the focus area, this embodiment lists two processing solutions.

[0065] Solution 1: If there is no control element in the focal area that is fully or partially within the focal area, then: select an end position farthest from the geometric center on the side close to the focal area in the moving direction as the secondary edge position; use the secondary edge position as the starting point to construct secondary boundary lines perpendicular to the boundary line in the vertical direction of the moving direction, so that each boundary line, the secondary boundary line adjacent to the boundary line and the focal element together constitute a secondary focal area. Find out whether there is a control element in the secondary focal area that is fully or partially within the secondary focal area, and if so, use this type of control element as a quasi-focal element. Among them, the secondary edge position is selected to construct the secondary boundary line, the secondary boundary line is perpendicular to the boundary line, and the area formed by each boundary line and the secondary boundary line can obtain the secondary focal area after excluding the focal area, as shown in the attached figure. Figure 2 As shown in the attached Figure 2In the example, the moving direction is horizontally to the right, and the secondary focus area is in the upper right and lower right areas of the focus area. This solution can be understood as searching in the nearest area outside the moving direction. When the moving direction is right, and there is no component to the right of the focus component, the component can be searched in the upper right and lower right areas.

[0066] Solution 2: If there is no control element in the focal area that falls within the focal area in whole or in part, then: take the end position on the focal element as the center of the circle and the preset angle as the step length to gradually rotate the boundary line, and gradually find whether there is a control element that meets the preset distance on the boundary line that gradually deflects from the moving direction to both sides; after finding the control element that meets the preset distance, stop rotating and use the control element as the control element for the next focus. Further, first rotate the boundary line with the edge position as the center of the circle. If the edge position is no longer the farthest end position from the geometric center in the moving direction when rotated to a certain angle, then translate the current boundary line to the farthest end position from the geometric center, and rotate with the selected end position as the center of the circle. This solution is equivalent to gradually searching to both sides along the moving direction with the boundary line as the unit until a component is found on the boundary line and the distance between the component and the focal element meets the requirements. Compared with Solution 1, it is easier to find components close to the moving direction, but the distance requirement is not as good as Solution 1.

[0067] This embodiment provides a focus control method based on the front-end framework. Under the front-end framework, different focus control designs are adopted for different focus movement situations and component distribution situations to enhance user experience, reduce cognitive load, improve interaction efficiency and user satisfaction, and build a mature focus control solution for the ecology under the mainstream front-end development framework. By analyzing the current focus position and the next focus movement direction, the component where the next focus is located is determined, and through reasonable focus control design, users can quickly locate interface elements.

[0068] Example 2

[0069] Embodiment 2 of the present invention discloses a focus control system based on a front-end framework, which systematizes a focus control method based on a front-end framework in Embodiment 1. The specific structure of the system is shown in the attached specification. Figure 3 The specific plan is as follows:

[0070] A focus control system based on a front-end framework, based on which the following modules are constructed:

[0071] A preselection unit 1 is used to traverse each control element in the region that belongs to the current level and can be focused, set the movable direction of the focus in the region, and define the control element currently focused as the focus element;

[0072] An analysis unit 2 is used to analyze the shape of the focus element to select the geometric center of the focus element, and mark the end position of the focus element farthest from the geometric center in each movable direction;

[0073] The position selection unit 3 is used for, upon receiving an instruction on the next moving direction of the current focus, selecting two end positions in a direction perpendicular to the moving direction that can completely encompass the focus element in the moving direction, so as to obtain two edge positions;

[0074] The first area unit 4 is used to construct boundary lines parallel to the moving direction from the edge position as the starting point, so that the two boundary lines and the focus element together constitute a focus area;

[0075] A first search unit 5 is used to search whether there is a control element whose whole or part of the area falls within the focus area in the focus area, and if there is such a control element, regard it as a quasi-focus element;

[0076] The calculation unit 6 is used to calculate the minimum distance between the focal element and each quasi-focal element, and select a quasi-focal element as the control element for the next focal concentration by comprehensively considering the element parameters including the minimum distance and the area falling into the focal area.

[0077] For a control element that does not have all or part of its area falling within the focus area, this embodiment proposes two solutions, namely:

[0078] Solution 1: If there is no control element in the focal area that falls entirely or partially within the focal area, then: select an end position farthest from the geometric center on the side close to the focal area in the moving direction as the secondary edge position; take the secondary edge position as the starting point and construct secondary boundary lines perpendicular to the boundary line in the direction perpendicular to the moving direction, so that each boundary line, the secondary boundary line adjacent to the boundary line and the focal element together constitute a secondary focal area.

[0079] Solution 2: If there is no control element in the focal area that falls entirely or partially within the focal area, then: gradually rotate the boundary line with the end position on the focal element as the center and the preset angle as the step size, and gradually search whether there is a control element that meets the preset distance on the boundary line that gradually deviates from the moving direction to both sides; after finding the control element that meets the preset distance, stop rotating and use the control element as the control element for the next focal focus.

[0080] Example 3

[0081] This embodiment provides a web interface to which the focus control method of Embodiment 1 is applied.

[0082] A web interface uses the focus control method based on the front-end framework described in Example 1 to perform focus control. The interface system automatically determines the position of the focus according to the user's behavior or specific rules. Through reasonable focus control design, it can help users quickly locate and operate interface elements. In the interface, the user's attention is guided by the visual design of the interface. For example, highlighting, color change, animation effects and other methods are used to highlight the current focus, the status of interactive elements or important information, helping users to identify and locate the focus more quickly. Users can use the Tab key, arrow keys or specific shortcut keys to switch focus between interface elements and trigger focus-related operations.

[0083] The present invention proposes a focus control method, system and application based on the front-end framework. Under the front-end framework, different focus control designs are adopted for different focus movement conditions and component distribution conditions to enhance user experience, reduce cognitive load, improve interaction efficiency and user satisfaction, and build a mature focus control solution for the ecology under the mainstream front-end development framework. By analyzing the current focus position and the next focus movement direction, the component where the next focus is located is determined, and through reasonable focus control design, users can quickly locate interface elements.

[0084] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for the implementation of the present invention. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenarios can be combined into one module, or can be further divided into multiple sub-modules. The above-mentioned serial numbers of the present invention are only for description and do not represent the advantages and disadvantages of the implementation scenarios. Disclosed above are only a few specific implementation scenarios of the present invention, but the present invention is not limited thereto, and any changes that can be thought of by those skilled in the art should fall within the scope of protection of the present invention.

Claims

1. A focus control method based on a front-end framework, characterized in that: Based on the front-end framework, it specifically includes: Traverse all control elements in the area that belong to the current level and can be focused, the shapes of the control elements in the interactive interface include circular, polygonal, and irregular shapes, set the movable direction of the focus in the area, and define the control element that is currently focused as the focus element; Analyzing the shape of the focal element to select a geometric center of the focal element, and marking the end position of the focal element farthest from the geometric center in each movable direction; When receiving an instruction about the next moving direction of the current focus, two end positions that can completely encompass the focus element in the moving direction are selected in a direction perpendicular to the moving direction to obtain two edge positions; Taking the edge position as a starting point, constructing boundary lines parallel to the moving direction respectively in the moving direction, so that the two boundary lines and the focus element together constitute a focus area; Finding whether there is a control element whose whole or part of the area falls within the focus area in the focus area, and if there is such a control element, treating it as a quasi-focus element; Calculating the minimum distance between the focal element and each quasi-focal element, and selecting a quasi-focal element as a control element for the next focal concentration based on the element parameters including the minimum distance and the area falling into the focal area; If there is no control element in the focus area whose whole or part of the area falls within the focus area, then: Select an end position farthest from the geometric center on the side close to the focal area in the moving direction as a secondary edge position; construct secondary boundary lines perpendicular to the boundary line in the vertical direction of the moving direction with the secondary edge position as the starting point, so that each boundary line and the secondary boundary line together constitute a secondary focal area other than the focal area; find out whether there is a control element in the secondary focal area whose whole or part of the area falls into the secondary focal area, and if there is such a control element, regard it as a quasi-focal element; or, The boundary line is gradually rotated with the end position on the focal element as the center and the preset angle as the step size, and it is gradually searched whether there is a control element that meets the preset distance on the boundary line that gradually deviates from the moving direction to both sides; after finding the control element that meets the preset distance, the rotation is stopped and the control element is used as the control element for the next focus.

2. The focus control method according to claim 1, characterized in that: First, the boundary line is rotated with the edge position as the center of the circle, If, when rotating to a certain angle, the edge position is no longer the end position farthest from the geometric center in the moving direction, the current boundary line is translated to the end position farthest from the geometric center, and the rotation is performed with the end position selected as the center of the circle.

3. The focus control method according to claim 1, characterized in that: A hierarchy is set for the main text area and the control element appearing in the main text area, and when the control element is clicked, the main text area cannot be moved.

4. The focus control method according to claim 1, characterized in that: Move focus incrementally via keyboard or gamepad.

5. A focus control system based on a front-end framework, characterized in that: The following modules are constructed based on the front-end framework: A preselection unit, used to traverse various control elements in the area that belong to the current level and can be focused, wherein the shapes of the control elements presented in the interactive interface include circular, polygonal, and irregular shapes, set the movable direction of the focus in the area, and define the control element currently focused as the focus element; An analysis unit, used for analyzing the shape of the focus element to select the geometric center of the focus element, and marking the end position of the focus element farthest from the geometric center in each movable direction; A position selection unit, for, upon receiving an instruction on the next moving direction of the current focus, selecting two end positions in a direction perpendicular to the moving direction that can completely encompass the focus element in the moving direction, so as to obtain two edge positions; A first area unit is used to construct boundary lines parallel to the moving direction from the edge position as a starting point toward the moving direction, so that the two boundary lines and the focus element together constitute a focus area; A first searching unit is used to search whether there is a control element whose whole or part of the area falls within the focus area in the focus area, and if there is such a control element, regard it as a quasi-focus element; a calculation unit, used for calculating the minimum distance between the focal element and each quasi-focal element, and selecting a quasi-focal element as a control element for the next focus focusing based on the element parameters including the minimum distance and the area of ​​the region falling into the focal region; If there is no control element in the focus area whose whole or part of the area falls within the focus area, then: Select an end position farthest from the geometric center on the side close to the focal area in the moving direction as a secondary edge position; construct secondary boundary lines perpendicular to the boundary line in the vertical direction of the moving direction with the secondary edge position as the starting point, so that each boundary line and the secondary boundary line together constitute a secondary focal area other than the focal area; Find out whether there is a control element whose whole or part of the area falls within the secondary focal area in the secondary focal area, and if there is such a control element, use it as a quasi-focal element; or, The boundary line is gradually rotated with the end position on the focal element as the center and the preset angle as the step size, and it is gradually searched whether there is a control element that meets the preset distance on the boundary line that gradually deviates from the moving direction to both sides; after finding the control element that meets the preset distance, the rotation is stopped and the control element is used as the control element for the next focus.

Citation Information

Patent Citations

  • Method and device for moving screen focus, and computer readable storage medium

    CN109271079A

  • Focus moving method and focus moving device for graphical user interface

    CN112148157A