CN114942814B - Page component focusing method, system, terminal equipment and medium - Google Patents

Page component focusing method, system, terminal equipment and medium Download PDF

Info

Publication number
CN114942814B
CN114942814B CN202210618357.0A CN202210618357A CN114942814B CN 114942814 B CN114942814 B CN 114942814B CN 202210618357 A CN202210618357 A CN 202210618357A CN 114942814 B CN114942814 B CN 114942814B
Authority
CN
China
Prior art keywords
focusing
assembly
page
component
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210618357.0A
Other languages
Chinese (zh)
Other versions
CN114942814A (en
Inventor
赵洪云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
MIGU Video Technology Co Ltd
MIGU Culture Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
MIGU Video Technology Co Ltd
MIGU Culture Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, MIGU Video Technology Co Ltd, MIGU Culture Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202210618357.0A priority Critical patent/CN114942814B/en
Publication of CN114942814A publication Critical patent/CN114942814A/en
Application granted granted Critical
Publication of CN114942814B publication Critical patent/CN114942814B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/422Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
    • H04N21/42204User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
    • H04N21/42206User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor characterized by hardware details
    • H04N21/42225User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor characterized by hardware details characterized by types of remote control, e.g. universal remote control
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a focusing method, a focusing system, terminal equipment and a computer readable storage medium of a page component, wherein the focusing method of the page component comprises the following steps: performing component division on elements in a preset page to be displayed to obtain a UI component group; determining a pre-focus component group from the UI component group; and acquiring a key value triggered by a user according to the current display page, and determining a target focusing assembly meeting a preset focusing condition from the prefocusing assembly group according to the key value so as to focus the target focusing assembly. The invention can automatically search the focus aiming at the page component and realize the high-efficiency control of the page component.

Description

Page component focusing method, system, terminal equipment and medium
Technical Field
The present invention relates to the field of control technologies, and in particular, to a method, a system, a terminal device, and a computer readable storage medium for focusing a page component.
Background
At present, regarding the focus control logic of the set top box in the aspect of page control, the focus of the page is generally operated and controlled based on the true DOM operation, and each component in the page cannot be reused. Further, a path for finding focus needs to be manually defined in advance when performing focus control.
Therefore, in the related art, intelligent focus searching cannot be performed on the randomly arranged pages, so that automatic focus searching operation control cannot be performed on the pages displayed by the set top box.
Disclosure of Invention
The invention mainly aims to provide a focusing method, a focusing system, terminal equipment and a computer readable storage medium of a page component, and aims to automatically search focus for the page component and realize efficient control of the page component.
In order to achieve the above object, the present invention provides a focusing method of a page assembly, the focusing of the page assembly including:
performing component division on elements in a preset page to be displayed to obtain a UI component group;
determining a pre-focus component group from the UI component group;
and acquiring a key value triggered by a user according to the current display page, and determining a target focusing assembly meeting a preset focusing condition from the prefocusing assembly group according to the key value so as to focus the target focusing assembly.
Optionally, before the step of determining the pre-focusing element group from the UI element group, the method further comprises:
obtaining server data after page loading, and generating a virtual page node object list according to the server data;
Performing data-driven rendering on the virtual page node object list so as to display node data on a page to obtain a real page node object;
constructing virtual page node object generation logic according to a preset WEB development framework act, traversing the virtual page node object list through the virtual page node object generation logic to obtain assignment of attribute variables of the virtual page nodes, and determining a prefocusing assembly group according to the real page node objects and the attribute variable assignment.
Optionally, the step of determining a prefocusing component group from the UI component group further includes:
and acquiring a prefocusing assembly group in the UI assembly group through the virtual page node object generating logic according to the assignment of the attribute variable and the real page node object.
Optionally, the step of acquiring the key value triggered by the user according to the current display page includes:
based on the current presentation page, key values generated by the user triggering the remote control are obtained through the global event distributor.
Optionally, the key value includes: the direction key value, before the step of obtaining the target focusing assembly meeting the preset focusing condition from the prefocusing assembly group according to the key value, further comprises:
Determining a callback function bound when a UI component group registers a key event in advance, so as to acquire component information corresponding to the callback function when the callback function is called, wherein the callback function corresponds to a ref attribute pre-written through a preset WEB development framework act;
and distributing the key value to a prefocusing component group according to the callback function and the type of the focusing event pre-registered by the UI component group, so as to acquire a target focusing component meeting a preset focusing condition from the prefocusing component group based on the direction key value when the key value is the direction key value.
Optionally, before the step of acquiring the target focusing element meeting the preset focusing condition from the prefocusing element group according to the direction key value, the method further includes:
removing focused components from the pre-focused component set;
the step of obtaining the target focusing assembly meeting the preset focusing condition from the prefocusing assembly group according to the key value comprises the following steps:
and traversing and searching the prefocusing assembly group from which the focused assembly is removed according to the direction key value to obtain the target focusing assembly meeting the preset focusing condition.
Optionally, after the step of performing traversal search on the prefocusing component group array from which the focused component is removed to obtain the target focusing component satisfying the preset focusing condition according to the key value, the method further includes:
Acquiring a distance parameter between a front focusing assembly and the target focusing assembly;
storing the distance parameter and the target focusing assembly to a preset object, and storing the preset object to a preset array;
and carrying out focusing treatment on the target focusing assembly corresponding to the minimum distance parameter in the preset array.
In order to achieve the above object, the present invention further provides a focusing system of a page assembly, the focusing system of the page assembly comprising:
the component dividing module is used for carrying out component division on elements in a preset page to be displayed to obtain a UI component group;
a determining module for determining a prefocusing component group from the UI component group;
the acquisition module is used for acquiring a key value triggered by a user according to the current display page, and acquiring a target focusing assembly meeting a preset focusing condition from the prefocusing assembly group according to the key value so as to focus the target focusing assembly.
Wherein, each functional module of the focusing system of the page assembly realizes the steps of the focusing method of the page assembly when running.
To achieve the above object, the present invention also provides a terminal device including: the device comprises a memory, a processor and a focusing program of a page component stored on the memory and capable of running on the processor, wherein the focusing program of the page component realizes the steps of the focusing method of the page component when being executed by the processor.
In addition, in order to achieve the above object, the present invention also proposes a computer-readable storage medium having stored thereon a focusing program of a page assembly, which when executed by a processor, implements the steps of the focusing method of a page assembly as described above.
Furthermore, to achieve the above object, the present invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the focusing method of a page assembly as described above.
The invention provides a focusing, a system, terminal equipment, a computer readable storage medium and a computer program product of page components, which are used for obtaining a UI component group by carrying out component division on elements in a preset page to be displayed; determining a pre-focus component group from the UI component group; and acquiring a key value triggered by a user according to the current display page, and determining a target focusing assembly meeting a preset focusing condition from the prefocusing assembly group according to the key value so as to focus the target focusing assembly.
Compared with the page control mode of the set top box in the prior art, in the embodiment, after the UI components are divided to obtain UI component groups, a prefocusing component group is determined in advance from the UI component groups, and a target focusing component is determined from the prefocusing component group according to a direction key value triggered by a user so as to process the target focusing component. Therefore, the intelligent automatic focusing device and the intelligent automatic focusing method for the page component displayed by the set top box can perform intelligent automatic focusing on the page component displayed by the set top box, realize efficient and accurate focusing of the page focus, further control the focusing component correspondingly and improve user experience. On the basis, the invention can also promote the reusability of the UI component.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flow chart of an embodiment of a focusing method of a page assembly of the present invention;
FIG. 3 is a schematic diagram illustrating page component division according to an embodiment of a focusing method of a page component of the present invention;
FIG. 4 is a schematic diagram of a prefocusing assembly group acquisition process according to one embodiment of the method for focusing page assemblies of the present invention;
FIG. 5 is a schematic flow chart of the auto-search Jiao Di of the prefocus assembly according to one embodiment of the focusing method of the page assembly of the present invention;
FIG. 6 is a schematic flow chart of the auto-search Jiao Di of the prefocus assembly according to one embodiment of the focusing method of the page assembly of the present invention;
FIG. 7 is a functional block diagram of an embodiment of a focusing system of the page assembly of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic device structure of a hardware running environment according to an embodiment of the present invention.
It should be noted that, the terminal device in the embodiment of the present invention may be a terminal device for implementing focusing of a page component, where the terminal device may be a smart phone, a personal computer, a server, and the like.
As shown in fig. 1, the apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the device structure shown in fig. 1 is not limiting of the device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and a focusing program of a page component. An operating system is a program that manages and controls the hardware and software resources of the device, supporting the execution of focused programs of page components, as well as other software or programs. In the device shown in fig. 1, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing communication connection with a server; and the processor 1001 may be configured to call a focusing program of the page component stored in the memory 1005 and perform the following operations:
performing component division on elements in a preset page to be displayed to obtain a UI component group;
determining a pre-focus component group from the UI component group;
and acquiring a key value triggered by a user according to the current display page, and determining a target focusing assembly meeting a preset focusing condition from the prefocusing assembly group according to the key value so as to focus the target focusing assembly.
Further, before the step of determining the pre-focusing element group from the UI element group, the processor 1001 may be further configured to call a focusing program of the page element stored in the memory 1005, and further perform the following operations:
Obtaining server data after page loading, and generating a virtual page node object list according to the server data;
performing data-driven rendering on the virtual page node object list so as to display node data on a page to obtain a real page node object;
constructing virtual page node object generation logic according to a preset WEB development framework act, traversing the virtual page node object list through the virtual page node object generation logic to obtain assignment of attribute variables of the virtual page nodes, and determining a prefocusing assembly group according to the real page node objects and the attribute variable assignment.
Further, the processor 1001 may be further configured to call a focusing program of the page component stored in the memory 1005, and further perform the following operations:
and acquiring a prefocusing assembly group in the UI assembly group through the virtual page node object generating logic according to the assignment of the attribute variable and the real page node object.
Further, the processor 1001 may be further configured to call a focusing program of the page component stored in the memory 1005, and further perform the following operations:
based on the current presentation page, key values generated by the user triggering the remote control are obtained through the global event distributor.
Further, the key value includes: the direction key value, before the step of acquiring the target focusing element satisfying the preset focusing condition from the prefocusing element group according to the key value, the processor 1001 may be further configured to call a focusing program of the page element stored in the memory 1005, and further perform the following operations:
determining a callback function bound when a UI component group registers a key event in advance, so as to acquire component information corresponding to the callback function when the callback function is called, wherein the callback function corresponds to a ref attribute pre-written through a preset WEB development framework act;
and distributing the key value to a prefocusing component group according to the callback function and the type of the focusing event pre-registered by the UI component group, so as to acquire a target focusing component meeting a preset focusing condition from the prefocusing component group based on the direction key value when the key value is the direction key value.
Further, before the step of acquiring the target focus component satisfying the preset focus condition from the prefocusing component group according to the direction key value, the processor 1001 may be further configured to call a focus program of the page component stored in the memory 1005, and further perform the following operations:
Removing focused components from the pre-focused component set;
the processor 1001 may also be used to call a focusing program of the page component stored in the memory 1005, and also perform the following operations:
and traversing and searching the prefocusing assembly group from which the focused assembly is removed according to the direction key value to obtain the target focusing assembly meeting the preset focusing condition.
Further, after the step of performing a traversal search for the prefocusing component group array from which the focused component is removed to obtain the target focusing component satisfying the preset focusing condition according to the key value, the processor 1001 may be further configured to call a focusing program of the page component stored in the memory 1005, and further perform the following operations:
acquiring a distance parameter between a front focusing assembly and the target focusing assembly;
storing the distance parameter and the target focusing assembly to a preset object, and storing the preset object to a preset array;
and carrying out focusing treatment on the target focusing assembly corresponding to the minimum distance parameter in the preset array.
Referring to fig. 2, fig. 2 is a flowchart illustrating a focusing method of a page component according to a first embodiment of the present invention.
In the present embodiment, an embodiment of an interface switching method is provided, and it should be noted that although a logic sequence is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order from that here.
The page is rendered for presentation based on the data driven mode in this embodiment. In this embodiment, the open source frame reaction is modified, and the page displayed by the set top box is subjected to data driving control through the modified reaction. According to the page operation control method based on the data driving mode, a UI layer and page control logic can be extracted, wherein the UI layer only focuses on code writing of a display layer, and at the moment, the UI component has reusability; and the page control logic is realized by data driving to control the generation of a new life cycle state in the keyboard interaction process.
On the basis, the control of the focus logic is only needed to be given to the modified compact for unified processing, and the modified compact framework integrates the focus solution and can uniformly process the control logic of the page layer. While the UI component only needs to mark the prefocus attribute on the page node. Furthermore, an automatic focus searching algorithm is performed inside the UI component group. In addition, the focus logic for page control among UI component groups can be formulated manually by the service side to improve interaction efficiency.
Step S10, carrying out component division on elements in a preset page to be displayed to obtain a UI component group;
The terminal device needs to be designed in advance for the page displayed on the set top box, including: and carrying out component division on the elements on the page, and further combining the components after division according to visual arrangement or service relevance. In this embodiment, the exact framework may be used to write code such as UI components for the components that have been divided.
Specifically, for example, as shown in fig. 3, the terminal device first acquires a product demand and designs an effect diagram. On the basis of which. On one hand, under the condition of no special rule or requirement, the UI components can be arranged from top to bottom according to visual effects; on the other hand, UI components may be grouped according to business specifications, such as component group 1, component group 2, component group 3, and the like. In this embodiment, the division manner of the UI components is not specifically limited, and flexible adjustment may be performed according to actual service conditions.
Step S20, determining a prefocusing component group from the UI component groups;
on the basis of an open source frame act, the original virtual page node service logic is reserved, and a ref mode of a virtual page node object is obtained by reconstructing a virtual page node generating method of the open source frame act, so that a prefocusing component group in a UI component group is predetermined through the ref mode of the virtual page node object.
In this embodiment, compared with the original node generation method of the open source frame act, the prefocusing assembly group is predetermined in this embodiment, so that the automatic focus searching efficiency is improved.
Step S30, obtaining a key value triggered by a user, and determining a target focusing assembly meeting a preset focusing condition from the prefocusing assembly group according to the key value so as to control the target focusing assembly.
And the terminal equipment acquires the prefocusing component groups from the UI component groups, if the key value triggered by the user is detected, the target focusing components which correspond to the key value of the user and meet the preset focusing conditions are further determined from the prefocusing component groups according to the key value, and the control processing is further carried out on the target focusing components.
It should be noted that in this embodiment, the terminal device determines, according to a key value triggered by the user through the remote controller, a component that the user actually wants to control, so as to implement custom focus searching for each component by the user, improve flexibility of interface focus control, improve user experience, and avoid limitation of set top box page control.
In this embodiment, the terminal device needs to be designed in advance for a page displayed on the set-top box, including: and carrying out component division on the elements on the page, and further combining the components after division according to visual arrangement or service relevance. On the basis of an open source frame act, the original virtual page node service logic is reserved, and a ref mode of a virtual page node object is obtained by reconstructing a virtual page node generating method of the open source frame act, so that a prefocusing component group in a UI component group is predetermined through the ref mode of the virtual page node object. If the direction key value triggered by the user is detected, determining a target focusing assembly which corresponds to the direction key value of the user and meets the preset focusing condition from all the pre-focusing assembly groups according to the direction key value, so as to further control the target focusing assembly.
Compared with the page control mode of the set top box in the prior art, in the embodiment, after the UI components are divided to obtain UI component groups, a prefocusing component group is determined in advance from the UI component groups, and a target focusing component is determined from the prefocusing component group according to a direction key value triggered by a user so as to process the target focusing component. Therefore, the invention can intelligently and automatically search the focus of the page component displayed by the set top box, and can perform manual control to focus, thereby improving the user experience. On the basis, the invention further improves the reusability of the UI component.
Based on the first embodiment of the focusing method of the page assembly of the present invention, a second embodiment of the focusing method of the page assembly of the present invention is presented.
In this embodiment, before "determining a prefocusing component group from the UI component group" in step S10 described above, it further includes:
step S40, server data are obtained after the page is loaded, and a virtual page node object list is generated according to the server data;
step S50, data-driven rendering is carried out on the virtual page node object list so as to display node data on a page to obtain a real page node object;
Step S60, constructing virtual page node object generation logic according to a preset WEB development framework, traversing the virtual page node object list according to the virtual page node object generation logic to obtain attribute variable assignment of a virtual page node, and determining a prefocusing assembly group according to the real page node object and the attribute variable assignment.
In order to realize focusing on the UI component, pre-focusing attribute variables are marked on page nodes of the UI component in advance when the component is assembled, and each attribute variable is assigned.
In this embodiment, the virtual page node generating method of the open source frame react is rewritten to obtain virtual page node object generating logic, where the virtual page node object generating logic may specifically be: and executing the ref mode of the virtual page node object, returning to the virtual page node object list for traversing after the rendering logic is executed on the virtual page node object list according to the ref mode of the virtual page node object, and collecting assignment of the attribute variable bound on the virtual page node object. In the ref mode of the virtual page node object, the two lists are used for storing real page node objects and assignment of attribute variables customized by the page node objects respectively.
Specifically, for example, as shown in fig. 4, server data is requested after a page is loaded, a virtual page node list is generated according to the server data, and then data-driven rendering is performed on the virtual page node object list to obtain a real page node object. On the basis, according to the virtual page node object list, through rewritten virtual page node generation logic, traversing is carried out on the virtual page node object list to obtain assignment of attribute variables of the virtual page node.
Further, in the above step S20, "determining a prefocusing component group from the UI component group" may include:
step S201, according to the assignment of the attribute variable and the real page node object, acquiring a prefocusing component group in the UI component group in the virtual page node object generating manner.
After determining assignment of the attribute variable of the virtual page node object in the virtual page node object list and performing data-driven rendering on the virtual page node object list to obtain a real page node object, the terminal device further determines a prefocusing assembly group from the UI assembly group according to the assignment of the attribute variable of the virtual page node object and the determination of the real page node object in a ref mode of the virtual page node object.
In this embodiment, the assignment of the attribute variable bound by the real page node object and the page node may be transmitted to the method together by the ref mode of the virtual page node object.
Further, in the above step S30, "obtaining the direction key value triggered by the user according to the current display page" may include:
step S301, based on the current display page of the set top box, a direction key value generated by triggering a remote controller by a user is acquired through a global event distributor.
After the user triggers the corresponding key value through the key of the remote controller, the terminal device captures the key value triggered by the user through the global event distributor of the page, in this embodiment, the key value includes a directional key value and a non-directional key value, and only when the key value is detected to be the directional key value, the target focusing assembly is determined from the prefocusing assembly group according to the directional key value.
Further, before "acquiring the target focusing element satisfying the preset focusing condition from the prefocusing element group according to the key value" in the above step S30, it may further include:
step S70, determining a callback function bound when a UI component group registers a key event in advance, so as to acquire component information corresponding to the callback function when the callback function is called, wherein the callback function corresponds to a ref attribute pre-written by a preset WEB development framework;
And step S80, distributing the direction key value to a prefocusing component group according to the callback function and the type of the focusing event pre-registered by the UI component group, so as to acquire a target focusing component meeting a preset focusing condition from the prefocusing component group according to the direction key value when the key value is the direction key value.
After the key value triggered by the user is obtained, in order to determine the page component actually determined by the user according to the key value, the terminal equipment further distributes the captured key value to a callback function bound when the currently locked UI component group registers a key event in advance. In this embodiment, the rendering result of the UI component may be uniformly notified to the corresponding service logic by the callback function.
Furthermore, the UI component group object can receive the key value through the pre-registered monitoring focus event type and focus losing event type, and can process the display focus state logic, focus losing state logic or service personalized processing of the UI component after recognizing that the current key value is the direction key value. Therefore, in this embodiment, the key value is distributed to the prefocusing component group according to the callback function and the type of the focusing event registered in advance by the UI component group, so that when the key value is determined to be the direction key value, the target focusing component satisfying the preset focusing condition is acquired from the prefocusing component group.
Further, before "acquiring the target focusing element satisfying the preset focusing condition from the prefocusing element group according to the key value" in the above step S30, it may further include:
step S90, removing the focused component from the prefocusing component group;
the terminal device needs to remove the focused components in the prefocusing component group in advance before performing automatic focus searching inside the prefocusing component group.
Specifically, for example, the focused component page node object is removed from the page node object list of the pre-focused component group by a subscript index value of the UI component, where the subscript index value defaults to 0.
In the above step S30, "obtaining the target focusing element satisfying the preset focusing condition from the prefocusing element group according to the key value" may include:
step S302, according to the direction key value, traversing and searching for the prefocusing assembly group from which the focused assembly is removed to obtain the target focusing assembly meeting the preset focusing condition.
After the terminal equipment determines that the key value is the direction key value, the terminal equipment further performs traversal searching on the prefocusing assembly group from which the focused assembly is removed according to the direction key value triggered by the user through the remote controller to obtain the target focusing assembly meeting the preset focusing condition. If the components meeting the preset focusing conditions cannot be found in the prefocusing component group, the terminal does not need to perform any processing, and the traversing query operation can be performed on the next prefocusing component group in a manual locking mode.
The step of traversing and searching by the terminal device for the prefocusing component group from which the focused component is removed to obtain the target focusing component meeting the preset focusing condition, as shown in fig. 6, specifically includes:
firstly, identifying a direction key value triggered by a user through a remote controller, and judging a current direction key according to the direction key value:
if the direction key is an up arrow, the bottom value of the prefocusing component is smaller than or equal to the top value of the current focusing component, and any one of the following 3 conditions is satisfied and accords with the component which moves up next in the visual range.
The method comprises the following steps that 1, the left value of a current focusing assembly is smaller than that of a prefocusing assembly, and the right value of the current focusing assembly is larger than that of the prefocusing assembly;
condition 2, the left value of the current focusing assembly is smaller than the right value of the prefocusing assembly, and the right value of the current focusing assembly is larger than the right value of the prefocusing assembly;
condition 3, the left value of the current focus element is greater than the left value of the prefocus element and the right of the current focus element is less than the right value of the prefocus element.
If the direction key is a down arrow, the top value of the prefocusing component is smaller than or equal to the bottom value of the current focusing component, and any one of the following 3 conditions is met and accords with the component which moves down next in the visual range
The method comprises the following steps that 1, the left value of a current focusing assembly is smaller than that of a prefocusing assembly, and the right value of the current focusing assembly is larger than that of the prefocusing assembly;
condition 2, the left value of the current focusing assembly is smaller than the right value of the prefocusing assembly, and the right value of the current focusing assembly is larger than the right value of the prefocusing assembly;
condition 3, the left value of the current focus element is greater than the left value of the prefocus element and the right of the current focus element is less than the right value of the prefocus element.
If the direction key is a left arrow, the right value of the prefocusing component is smaller than or equal to the left value of the current focusing component, and any one of the following 3 conditions is satisfied and accords with the component of the next left shift in the visual range:
the method comprises the following steps that 1, the top value of a current focusing assembly is smaller than that of a prefocusing assembly, and the bottom value of the current focusing assembly is larger than that of the prefocusing assembly;
the top value of the current focusing assembly is smaller than the bottom value of the prefocusing assembly, and the bottom value of the current focusing assembly is larger than the bottom value of the prefocusing assembly;
in condition 3, the top value of the current focusing element is greater than the top value of the prefocusing element and the bottom value of the current focusing element is less than the bottom value of the prefocusing element.
If the direction key is a right arrow, the left value of the prefocusing component is smaller than or equal to the right value of the current focusing component, and any of the following 3 conditions is satisfied and accords with the component in the next right movement in the visual range.
The method comprises the following steps that 1, the top value of a current focusing assembly is smaller than that of a prefocusing assembly, and the bottom value of the current focusing assembly is larger than that of the prefocusing assembly;
the top value of the current focusing assembly is smaller than the bottom value of the prefocusing assembly, and the bottom value of the current focusing assembly is larger than the bottom value of the prefocusing assembly;
in condition 3, the top value of the current focusing element is greater than the top value of the prefocusing element and the bottom value of the current focusing element is less than the bottom value of the prefocusing element.
On this basis, the terminal will acquire the target focus element satisfying the above focus condition from the prefocus element group.
Further, in the step S30, after performing the traversal search for the prefocusing component group array from which the focused component is removed to obtain the target focusing component satisfying the preset focusing condition according to the key value, the method further includes:
step A, acquiring a distance parameter between a front focusing assembly and the target focusing assembly;
step B, storing the distance parameter and the target focusing assembly to a preset object, and storing the preset object to a preset array;
And step C, focusing the target focusing assembly corresponding to the minimum distance parameter in the preset array.
After the terminal device determines the target focusing assembly meeting the focusing condition from the prefocusing assembly group, it needs to further determine the distance parameter between the front focusing assembly and the target focusing assembly, further stores the distance parameter and the corresponding target focusing assembly into a preset same object, and stores the object into a preset array, so as to obtain the target focusing assembly corresponding to the minimum distance parameter from the array, and perform focusing treatment on the target focusing assembly.
The step of acquiring the distance parameter between the front focusing assembly and the target focusing assembly specifically comprises the following steps:
if the direction key is an up key, a left key or a right key:
the corresponding positions X, Y are marked according to a cartesian coordinate system. Setting a left value of a target focusing assembly as an X1 value of the target focusing assembly, a top value of the target focusing assembly as a Y1 value of the target assembly, a left value of a current focusing assembly as an X2 value of a target prefocusing assembly, a bottom value of the current focusing assembly as a Y2 value of the prefocusing assembly, and conductingPassing through
Figure BDA0003675368990000131
And obtaining the distance between the two points and calculating the distance parameter between the two components.
If the direction key is the down key:
setting a left value of a target focusing component as an X1 value of the target component, a top value of the target focusing component as a Y1 value of the target component, a left value of a current focusing component as an X2 value of a current prefocusing component, and a top value of the current focusing component as a Y2 value of the current focusing component, wherein the focus is changed according to the focus value of the current prefocusing component
Figure BDA0003675368990000132
The distance between the two points is calculated, and the distance parameter between the two components is calculated.
On the basis, the distance parameter and the corresponding target focusing assembly are further stored in a preset same object, the object is stored in a preset array, the target focusing assembly corresponding to the minimum distance parameter is obtained from the array, and the target focusing assembly is subjected to focusing treatment.
In this embodiment, server data is requested after a page is loaded, a virtual page node list is generated according to the server data, and data-driven rendering is further performed on the virtual page node object list to obtain a real page node object. On the basis, according to the virtual page node object list, through rewritten virtual page node generation logic, traversing is carried out on the virtual page node object list to obtain assignment of attribute variables of the virtual page node. And determining a prefocusing component group from the UI component group through virtual page node object generating logic according to assignment of the attribute variable of the virtual page node object and determination of the real page node object. After the user triggers the corresponding key value through the key of the remote controller, the terminal equipment captures the key value triggered by the user through the global event distributor of the page. In order to determine the page component actually determined by the user according to the direction key value, the terminal device further distributes the captured key value to a callback function bound when the currently locked UI component group registers the key event in advance. The terminal device needs to remove the focused components in the prefocusing component group in advance before performing automatic focus searching inside the prefocusing component group. And traversing and searching the prefocusing assembly group from which the focused assembly is removed to obtain the target focusing assembly meeting the preset focusing condition. If the components meeting the preset focusing conditions cannot be found in the prefocusing component group, the terminal does not need to perform any processing, and the traversing query operation can be performed on the next prefocusing component group in a manual locking mode.
In the invention, focus logic control is carried out on the page displayed on the set top box, so that the reusability of part of display modules in the displayed page is improved, meanwhile, a unified solution is carried out on the EPG compatibility of the set top box end, intelligent focus searching is carried out on regular or irregular page components, and meanwhile, the invention has the function of manually controlling focus focusing on special service requirements. The invention can intelligently focus the irregular module, simultaneously satisfies the service scene that can automatically search focus and manually define the focus searching path, avoids the complex operation of the large-screen end set top box caused by the limitation of the remote controller, and improves the user experience.
In addition, the embodiment of the invention also provides a focusing system of the page assembly, referring to fig. 7, fig. 7 is a schematic diagram of a functional module of an embodiment of focusing of the page assembly of the invention. As shown in fig. 7, the focusing system of the page assembly of the present invention includes:
the component dividing module 10 is used for dividing the components in the preset page to be displayed into UI component groups;
a determining module 20 for determining a pre-focusing assembly group from the UI assembly group;
and the acquisition module 30 is configured to acquire a key value triggered by a user according to a current display page, and determine a target focusing assembly meeting a preset focusing condition from the prefocusing assembly group according to the key value, so as to focus the target focusing assembly.
Further, the focusing system of the page component comprises:
the virtual page node object list generation module is used for acquiring server data after the page is loaded and generating a virtual page node object list according to the server data;
the data driving rendering module is used for performing data driving rendering on the virtual page node object list so as to display the node data on the page to obtain a real page node object;
the traversing module is used for constructing virtual page node object generating logic according to a preset WEB development framework, traversing the virtual page node object list through the virtual page node object generating logic to obtain assignment of attribute variables of the virtual page nodes, and determining a prefocusing assembly group according to the real page node objects and the attribute variable assignment.
Further, the determining module 20 includes:
and the prefocusing component group acquisition unit is used for acquiring the prefocusing component group in the UI component group in the virtual page node object generation mode according to the assignment of the attribute variable and the real page node object.
Further, the obtaining module 30 includes:
And the key value acquisition module is used for acquiring the key value generated by triggering the remote controller by the user through the global event distributor based on the current display page.
Further, the key value includes: a direction key value, a focusing system of the page component, comprising:
a callback function determining module, configured to obtain component information corresponding to the callback function when the callback function is called, where the callback function corresponds to a ref attribute pre-written by a preset WEB development framework reaction;
and the key value distribution module is used for distributing the key value to the prefocusing assembly group according to the callback function and the focusing event type pre-registered by the UI assembly group so as to acquire a target focusing assembly meeting a preset focusing condition from the prefocusing assembly group based on the direction key value when the key value is the direction key value.
Further, the focusing system of the page component comprises:
a removal module for removing focused components from the pre-focused component set;
the acquisition module 30 includes:
and the traversing searching unit is used for traversing and searching the prefocusing assembly group from which the focused assembly is removed according to the direction key value to obtain the target focusing assembly meeting the preset focusing condition.
Further, the focusing system of the page component comprises:
the distance parameter acquisition module is used for acquiring a distance parameter between the front focusing assembly and the target focusing assembly;
the storage module is used for storing the distance parameter and the target focusing assembly to a preset object and storing the preset object to a preset array;
and the focusing processing module is used for focusing the target focusing assembly corresponding to the minimum distance parameter in the preset array.
The specific implementation manner of each functional module of the focusing system of the page assembly is basically the same as that of each embodiment of the focusing method of the page assembly, and is not described herein.
In addition, the embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a focusing program of the page assembly, and the focusing program of the page assembly realizes the steps of the focusing method of the page assembly when being executed by a processor.
Embodiments of the focusing system and the computer readable storage medium of the page assembly of the present invention may refer to embodiments of the focusing method of the page assembly of the present invention, and are not described herein.
Furthermore, embodiments of the present invention provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of focusing a page assembly as described in any of the embodiments of the method of focusing a page assembly above.
The specific embodiments of the computer program product of the present invention are substantially the same as the embodiments of the focusing method of the page component described above, and will not be described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. The focusing method of the page assembly is characterized in that the focusing method of the page assembly is applied to a set top box and comprises the following steps:
Performing component division on elements in a preset page to be displayed to obtain a UI component group;
determining a pre-focus component group from the UI component group;
acquiring a key value triggered by a user according to a current display page, and determining a target focusing assembly meeting a preset focusing condition from the prefocusing assembly group according to the key value so as to focus the target focusing assembly;
before the step of determining the pre-focusing assembly group from the UI assembly group, the method further comprises:
constructing virtual page node object generation logic according to a preset WEB development framework act, traversing a preset virtual page node object list according to the virtual page node object generation logic to obtain attribute variable assignment of a virtual page node, and determining a prefocusing component group from the UI component group according to the attribute variable assignment.
2. The method of focusing on page components of claim 1, further comprising, prior to the step of determining a pre-focus component group from the UI component group:
server data are obtained after the page is loaded, and the virtual page node object list is generated according to the server data;
and carrying out data-driven rendering on the virtual page node object list so as to display the node data on the page to obtain a real page node object.
3. The method of focusing on page components of claim 2, wherein the step of determining a pre-focus component group from the UI component group comprises:
and according to the attribute variable assignment and the real page node object, acquiring a prefocusing assembly group in the UI assembly group through the virtual page node object generation logic.
4. The method for focusing on a page assembly according to claim 1, wherein the step of acquiring the key value triggered by the user according to the currently displayed page comprises the steps of:
and acquiring a key value generated by triggering a remote controller by a user through a preset global event distributor based on the current display page of the set top box.
5. The method of focusing on a page assembly of claim 4, wherein the key values include: the direction key value, before the step of obtaining the target focusing assembly meeting the preset focusing condition from the prefocusing assembly group according to the key value, further comprises:
callback function binding when determining UI component group pre-registered key event Acquiring component information corresponding to the callback function when the callback function is called, wherein the callback function corresponds to a ref attribute pre-written through a preset WEB development framework;
And distributing the key value to a prefocusing component group according to the callback function and the type of the focusing event pre-registered by the UI component group, so as to acquire a target focusing component meeting a preset focusing condition from the prefocusing component group based on the direction key value when the key value is the direction key value.
6. The method for focusing page components according to claim 5, further comprising, before said step of acquiring a target focusing component satisfying a preset focusing condition from said prefocusing component group according to said direction key value:
removing focused components from the pre-focused component set;
the step of obtaining the target focusing assembly meeting the preset focusing condition from the prefocusing assembly group according to the key value comprises the following steps:
and traversing and searching the prefocusing assembly group from which the focused assembly is removed according to the direction key value to obtain the target focusing assembly meeting the preset focusing condition.
7. The method for focusing page components according to claim 6, further comprising, after said step of performing a traversal search for a prefocusing component group array from which focused components are removed according to said key value, to obtain a target focusing component satisfying a preset focusing condition:
Acquiring a distance parameter between a current focusing assembly and the target focusing assembly;
storing the distance parameter and the target focusing assembly to a preset object, and storing the preset object to a preset array;
and carrying out focusing treatment on the target focusing assembly corresponding to the minimum distance parameter in the preset array.
8. A focusing system for a page assembly, the focusing system comprising:
the component dividing module is used for carrying out component division on elements in a preset page to be displayed to obtain a UI component group;
a determining module for determining a prefocusing component group from the UI component group;
the acquisition module is used for acquiring a key value triggered by a user according to a current display page, and acquiring a target focusing assembly meeting a preset focusing condition from the prefocusing assembly group according to the key value so as to focus the target focusing assembly;
the focusing system of the page assembly further comprises:
the traversing module is used for constructing virtual page node object generating logic according to a preset WEB development framework, traversing a preset virtual page node object list according to the virtual page node object generating logic to obtain attribute variable assignment of the virtual page node, and determining a prefocusing assembly group from the UI assembly group according to the attribute variable assignment.
9. A terminal device, characterized in that it comprises a memory, a processor and a focusing program of page components stored on the memory and executable on the processor, which focusing program of page components, when executed by the processor, implements the steps of the focusing method of page components according to any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a focusing program of a page assembly, which, when executed by a processor, implements the steps of the focusing method of a page assembly according to any one of claims 1 to 7.
CN202210618357.0A 2022-06-01 2022-06-01 Page component focusing method, system, terminal equipment and medium Active CN114942814B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210618357.0A CN114942814B (en) 2022-06-01 2022-06-01 Page component focusing method, system, terminal equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210618357.0A CN114942814B (en) 2022-06-01 2022-06-01 Page component focusing method, system, terminal equipment and medium

Publications (2)

Publication Number Publication Date
CN114942814A CN114942814A (en) 2022-08-26
CN114942814B true CN114942814B (en) 2023-07-11

Family

ID=82908277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210618357.0A Active CN114942814B (en) 2022-06-01 2022-06-01 Page component focusing method, system, terminal equipment and medium

Country Status (1)

Country Link
CN (1) CN114942814B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103595979A (en) * 2012-08-14 2014-02-19 佳能株式会社 Image processing device, image capturing device, and image processing method
CN107071583A (en) * 2017-05-03 2017-08-18 四川易迅通健康医疗技术发展有限公司 A kind of EPG page focus control methods for IPTV platforms
CN108156510A (en) * 2017-12-27 2018-06-12 深圳Tcl数字技术有限公司 The method, apparatus and computer readable storage medium of page focus processing
CN111103979A (en) * 2019-12-11 2020-05-05 炫彩互动网络科技有限公司 Partition rendering method and device based on visual focus
CN111639287A (en) * 2020-04-29 2020-09-08 深圳壹账通智能科技有限公司 Page processing method and device, terminal equipment and readable storage medium
CN112995517A (en) * 2021-03-12 2021-06-18 湖南国科智瞳科技有限公司 High-precision microscopic image automatic focusing method and system, and computer equipment
CN113010170A (en) * 2021-03-31 2021-06-22 中国建设银行股份有限公司 Page rendering method, device, medium and electronic equipment based on Vue3 component
CN113535039A (en) * 2021-07-02 2021-10-22 北京三快在线科技有限公司 Method and device for updating page, electronic equipment and computer readable storage medium
CN113645489A (en) * 2021-08-26 2021-11-12 帕科视讯科技(杭州)股份有限公司 IPTV platform EPG dynamic focus configuration and moving method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9418035B2 (en) * 2012-10-22 2016-08-16 Intel Corporation High performance interconnect physical layer

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103595979A (en) * 2012-08-14 2014-02-19 佳能株式会社 Image processing device, image capturing device, and image processing method
CN107071583A (en) * 2017-05-03 2017-08-18 四川易迅通健康医疗技术发展有限公司 A kind of EPG page focus control methods for IPTV platforms
CN108156510A (en) * 2017-12-27 2018-06-12 深圳Tcl数字技术有限公司 The method, apparatus and computer readable storage medium of page focus processing
CN111103979A (en) * 2019-12-11 2020-05-05 炫彩互动网络科技有限公司 Partition rendering method and device based on visual focus
CN111639287A (en) * 2020-04-29 2020-09-08 深圳壹账通智能科技有限公司 Page processing method and device, terminal equipment and readable storage medium
CN112995517A (en) * 2021-03-12 2021-06-18 湖南国科智瞳科技有限公司 High-precision microscopic image automatic focusing method and system, and computer equipment
CN113010170A (en) * 2021-03-31 2021-06-22 中国建设银行股份有限公司 Page rendering method, device, medium and electronic equipment based on Vue3 component
CN113535039A (en) * 2021-07-02 2021-10-22 北京三快在线科技有限公司 Method and device for updating page, electronic equipment and computer readable storage medium
CN113645489A (en) * 2021-08-26 2021-11-12 帕科视讯科技(杭州)股份有限公司 IPTV platform EPG dynamic focus configuration and moving method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
熊俊漉."基于React的Web前端组件化研究与应用".《中国优秀硕士学位论文全文数据库 信息科技辑》.2020,I139-167. *

Also Published As

Publication number Publication date
CN114942814A (en) 2022-08-26

Similar Documents

Publication Publication Date Title
CN108566564B (en) Page focus jumping method, television and computer readable storage medium
CN108388988B (en) Block chain-based collaborative office method, system and computer-readable storage medium
CN105760199A (en) Method and equipment for loading application resource
CN107391474B (en) Business card editing method, server and computer readable storage medium
WO2021068765A1 (en) Web page screenshot method and apparatus, device, and computer-readable storage medium
CN112436986B (en) Distribution network method, distribution network device, distribution network equipment and computer readable storage medium
CN113370229A (en) Exhibition hall intelligent explanation robot and implementation method
CN112468879A (en) Television user scene switching method, device and terminal based on fingerprint identification
CN112306437A (en) Terminal screen projection method, device, equipment, system and computer readable storage medium
CN114942814B (en) Page component focusing method, system, terminal equipment and medium
CN113505700A (en) Image processing method, device, equipment and storage medium
CN111629245B (en) Focus control method, television and storage medium
CN113887442A (en) OCR training data generation method, device, equipment and medium
CN108304104B (en) Data acquisition method and equipment, storage medium and terminal thereof
KR20160032653A (en) Method and apparatus for ranking candiate character and method and device for inputting character
CN109284097B (en) Method, device, system and storage medium for realizing complex data analysis
CN112265879A (en) Elevator control system, debugging method thereof, debugging equipment and readable storage medium
CN113411629A (en) Live video management method, device, equipment and computer readable storage medium
CN111489762A (en) Three-dimensional spectrogram generation method and device, terminal and storage medium
CN112333560A (en) Webpage video analyzing and playing method, device and equipment and readable storage medium
CN111367597A (en) Color switching method and device and electronic equipment
CN111901685B (en) File scanning method and related device
CN114398794A (en) Industrial Internet of things application construction method supporting multi-scene mapping
CN114036190A (en) Cache control method, device, equipment and readable storage medium
CN115061742A (en) Program interface calling method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant