WO2018176843A1 - Method and apparatus for searching for focus across boundary, intelligent device and readable storage medium - Google Patents

Method and apparatus for searching for focus across boundary, intelligent device and readable storage medium Download PDF

Info

Publication number
WO2018176843A1
WO2018176843A1 PCT/CN2017/110501 CN2017110501W WO2018176843A1 WO 2018176843 A1 WO2018176843 A1 WO 2018176843A1 CN 2017110501 W CN2017110501 W CN 2017110501W WO 2018176843 A1 WO2018176843 A1 WO 2018176843A1
Authority
WO
WIPO (PCT)
Prior art keywords
search box
search
boundary
box
view
Prior art date
Application number
PCT/CN2017/110501
Other languages
French (fr)
Chinese (zh)
Inventor
尹成
张文明
陈少杰
Original Assignee
武汉斗鱼网络科技有限公司
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 武汉斗鱼网络科技有限公司 filed Critical 武汉斗鱼网络科技有限公司
Publication of WO2018176843A1 publication Critical patent/WO2018176843A1/en

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • 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/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • 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/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • 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/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content

Definitions

  • the present invention relates to the field of focus processing technologies, and in particular, to a focus out-of-bounds search method, apparatus, smart device, and readable storage medium.
  • the interactive mode of the Android TV or the Android box needs to rely on a remote control device such as a remote controller or a mobile phone.
  • a remote control device such as a remote controller or a mobile phone.
  • the television device analyzes the signal source as the button event instruction set after receiving the remote controller button signal; then, the system performs a focus search operation according to the button event instruction set; Finally, the view control that gets the focus makes a response to the updated view.
  • a preferred embodiment of the present invention provides a focus out-of-bounds search method, the method comprising:
  • the size of the search box being calculated by the positional relationship of each view control located in the visible range of the user interface with respect to the direct parent control;
  • a boundary search is performed to determine a search boundary of the out-of-bounds focus.
  • Another preferred embodiment of the present invention provides a focus out-of-bounds search device, the device comprising:
  • An instruction receiving module configured to receive a focus search trigger instruction
  • a search box building module configured to add all the view controls included in the current user interface into the search box, the size of the search box is calculated by the positional relationship of each view control located in the visible range of the user interface relative to the direct parent control ;
  • a meshing module configured to mesh the search box according to a pixel density corresponding to the user interface
  • a search box division module configured to classify and mark the unit search box included in the search box after the mesh division to divide the boundary empty unit search box and the critical non-empty unit search box;
  • a boundary determining module configured to perform a boundary search based on the segmented result, and determine a search boundary of the out-of-bounds focus.
  • Another preferred embodiment of the present invention further provides a smart device, including a processor and a non-volatile memory storing a plurality of computer instructions, wherein the smart device performs the above implementation when the computer instructions are executed by the processor
  • a smart device including a processor and a non-volatile memory storing a plurality of computer instructions, wherein the smart device performs the above implementation when the computer instructions are executed by the processor
  • readable storage medium comprising a computer program, the computer program controlling the electronic device where the readable storage medium is located to perform the operations described in the above embodiments Focus out of bounds search method.
  • the focus out-of-bounds search method, apparatus, smart device, and readable storage medium provided by the preferred embodiment of the present invention, after receiving the focus search trigger instruction, add all view controls included in the current user interface to the search box, and according to the The search box is meshed by the pixel density corresponding to the user interface, and then the unit search box included in the search box after the mesh division is classified to mark the boundary empty unit search box and the critical non-empty unit search box. Finally, based on the above-mentioned divided results, a boundary search is performed to determine a search boundary of the out-of-bounds focus.
  • the embodiment of the present invention applies the improved search box algorithm to perform out-of-bounds search of the focus, and can effectively avoid the problem of losing focus compared with the existing borderless search mechanism. Moreover, the borderless search function of the borderless search mechanism traverses the entire view tree corresponding to the user interface, the search direction is disordered, and the search efficiency is low.
  • the search method provided in this embodiment can be used to determine the search boundary. Search, search efficiency and accuracy have improved significantly.
  • FIG. 1 is a schematic block diagram of a smart device for performing a focus out-of-bounds search method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for searching for a focus out of bounds according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a positional relationship between a view control and a direct parent control thereof according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a search box after mesh division in an embodiment according to an embodiment of the present invention.
  • FIG. 5 is a diagram of a result obtained after performing a boundary search based on the search box shown in FIG. 4 according to an embodiment of the present invention
  • FIG. 6 is a flowchart of another focus out-of-bounds search method according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of functional modules of a focus out-of-bounds search device according to an embodiment of the present invention.
  • Icon 100-smart device; 110-memory; 120-processor; 130-focal out-of-bounds search device; 1302-instruction Receive module; 1304-search box construction module; 1306-mesh division module; 1308-search box division module; 1310-judgment module; 1312-size adjustment module; 1314-boundary determination module.
  • FIG. 1 is a block diagram of a smart device 100 for performing a focus out-of-bounds search method according to an embodiment of the present invention.
  • the smart device 100 can be, but is not limited to, an Android TV or an Android set top box equipped with an Android operating system.
  • the smart device 100 includes a memory 110, a processor 120, and a focus out-of-bounds search device 130.
  • the memory 110 is electrically connected to the processor 120 to implement transmission or interaction of data.
  • the out of focus search device 130 includes at least one software function module that may be stored in the memory 110 or in an operating system of the smart device 100 in the form of software or firmware.
  • the processor 120 is configured to execute executable modules stored in the memory 110, such as a computer program included by the focus out-of-bounds search device 130.
  • the processor 120 executes the program after receiving the execution instruction, and the method executed by the smart device 100 defined by the flow process disclosed in any embodiment of the present invention may be applied to the processor 120 or by the processor. 120 implementation.
  • FIG. 2 it is a flowchart of a method for searching for a focus out of bounds according to an embodiment of the present invention. It should be noted that the method provided in this embodiment is not limited to the specific order described in FIG. 2 and the following. The steps shown in Fig. 2 will be explained in detail below.
  • Step S101 receiving a focus search trigger instruction.
  • the focus may refer to an Android TV that, after receiving a button signal of a remote control device such as a remote controller or a mobile phone, processes a corresponding command to perform a display effect on the user interface level, such as zooming and biasing. Shift, background switching, etc.
  • the focus search may refer to the Android system relocating the focus according to the above instruction, to specify a specific view control (View control) to accept the focus, or the system to perform focus relocation according to the default algorithm.
  • the focus search trigger instruction may be an instruction or a set of instructions obtained by the smart device 100 parsing the received control signal.
  • the control signal may be sent by a remote control device such as a remote controller or a mobile phone after being operated by a user.
  • the remote control signal may be sent by a remote control device such as a remote controller or a mobile phone after being operated by a user.
  • the Android TV or the Android set top box receives the button signal of the remote controller and parses the button signal as a button event instruction set, so that the system performs the button event instruction set according to the button event instruction set.
  • Focus search operation It can be understood that, in general, the foregoing operation of parsing the button signal may be performed by a processor executing a corresponding application in an Android architecture layer (Framework layer); subsequent focus search operations may be performed by the processor to execute an Android application layer ( The corresponding application in the Application layer) is completed.
  • Step S103 adding all view controls included in the current user interface to the search box, the size of the search box is calculated by the coordinate position of each view control located in the visible range of the user interface and its positional relationship with respect to the direct parent control. get.
  • the direct parent control of the view control (View control) is a ViewGroup control directly containing the View control.
  • each view control is dynamically added to the search box during the Layout phase of the view control.
  • the traversal view tree is traversed according to a preset traversal method (such as preorder, middle or post traversal, etc.), and when traversing to the view control, it is added to the search box, so that the view control is dynamically added to the search box. process.
  • the size of the search box is calculated from the coordinate position of the view control in the visible range and its positional relationship with respect to the direct parent control. Since the number of view controls under the view tree is not certain, it is necessary to continuously calculate and update the size of the search box during the process of dynamically adding the view controls to the search box.
  • the initial size of the search box may be calculated from the currently known coordinate positions of one or more view controls located within the visible range and their positional relationships with respect to respective direct parent controls; Then, the other view controls in the view tree are gradually added to the search box, and during the joining process, it is judged whether the view control is in the visible range, and if it is in the visible range, it is re-based according to the currently known visible range.
  • the coordinate positions of all view controls within them and their positional relationship with respect to their respective direct parent controls calculate the size of the search box and update until all view controls under the view tree have been added to the search box.
  • a specific manner of calculating the size of the search box according to the coordinate position of each view control currently in the search box and located within the visible range of the user interface and its positional relationship with respect to the direct parent control Can be:
  • n is the total number of the respective view controls
  • w is the width value of the view control
  • h is the height value of the view control
  • l is the left margin of the view control from the immediate parent control
  • r is The view control is from the right margin of its immediate parent control.
  • the size of the search box is calculated.
  • d aver represents the diameter of the search box.
  • the size of the search box calculated according to the above manner may be the rough size of the search box in actual operation.
  • the calculated size of the diameter is not an integer.
  • the actual operation may perform rounding processing or approximation processing.
  • the size of the search box can be roughly estimated in other ways.
  • the size of the root node ViewGroup control in the view tree can be directly estimated as the size of the search box.
  • the preferred embodiment in this embodiment still uses the average center point distance of each view control within the visible range to calculate the size of the search box.
  • the reason is that directly estimating the size of the above ViewGroup control as the size of the search box usually causes the search box to be too large or too small, which is generally not conducive to the determination of subsequent search boundaries.
  • the set set in the process of adding the view control to the search box, in order to avoid the situation that the same view control is repeatedly added, the set set may be used to store the view control information.
  • the Set collection is one of the Java collection frameworks, and the elements stored therein have unique attributes, that is, the Set collection does not repeatedly store the same element.
  • Step S105 meshing the search box according to a pixel density corresponding to the user interface.
  • the meshing of the search box is to divide the search box constructed by the view tree by using a grid unit having a certain side length.
  • the meshing may be performed from the inside to the outside direction.
  • the meshing may be performed by using an existing paving method.
  • a design for determining the side length of a mesh unit by pixel density (Pixels Per Inch, PPI) is proposed.
  • PPI Pixel Per Inch
  • S represents the minimum value of the font in the text view specified by the system
  • P represents the pixel density of the interface displayed by the smart device 100.
  • a smart device 100 equipped with an Android operating system having a resolution of 1080 ⁇ 1920 and a pixel density of 320 is taken as an example.
  • the Android system specifies that the minimum value of the font TextView is 12 sp, and the area of the single font TextView is 24 px.
  • 48px is the minimum unit size of the view control that can be focused on the smart device 100, and the focus direction of each subview in the ViewGroup has 4 directions, thereby determining that the side length of the grid unit is 96px.
  • FIG. 4 it is a schematic diagram of the search box after meshing in a certain embodiment provided by this embodiment.
  • the black marker points of the scattered distribution in the figure represent the discrete points of the view control (View) added to the search box.
  • a peripheral circle containing the discrete points represents the search box.
  • Each square represents a grid cell.
  • Step S107 classifying the unit search boxes included in the meshed search box to classify the boundary empty unit search box and the critical non-empty unit search box.
  • the cell search box included in the meshed search box is critically marked. If the cell search box near the boundary is empty and there is no cell search box or cell search box in the direction that is still empty, mark the cell search box as Boundary Cell Search Box (SCSB). That is, the boundary has been reached.
  • SCSB Boundary Cell Search Box
  • the non-empty unit search box adjacent to the boundary empty cell search box is labeled as Critical Nonempty Cell Search Box (CNCSB).
  • Step S109 performing a boundary search based on the divided result to determine a search boundary of the out-of-bounds focus.
  • the boundary empty cell search box is searched starting along the top direction of the starting point. If the boundary empty cell search box is searched, the search in the current direction is stopped, and the search direction is adjusted clockwise to continue searching for the next boundary empty cell search box. After the 360-degree search is completed clockwise, the center points of all the boundary empty cell search boxes are connected to form an irregular polygon, which is the search boundary.
  • FIG. 5 it is a result graph obtained by performing a boundary search based on the search box shown in FIG. 4 provided by this embodiment.
  • the cell search box filled with dark gray in the figure indicates that it is a boundary empty cell search box, and the cell search box filled with light gray indicates that it is a critical non-empty cell search box.
  • An irregular polygon surrounded by black lines is the resulting search boundary. Wherein, "o" on the polygon indicates the starting point selected during the search, and the arrow indicates that the search is sequentially performed in the clockwise direction.
  • the multi-dimensional space search of the cross-border search can be converted into a one-dimensional search, which can improve the search efficiency, search accuracy, and effectively avoid the phenomenon of losing focus.
  • FIG. 6 is a flowchart of another method for out-of-focus search according to an embodiment of the present invention.
  • the focus out-of-bounds search method includes:
  • Step S201 receiving a focus search trigger instruction.
  • Step S203 adding all the view controls included in the current user interface to the search box, the size of the search box is calculated by the coordinate position of each view control located in the visible range of the user interface and its positional relationship with respect to the direct parent control. get.
  • Step S205 meshing the search box according to a pixel density corresponding to the user interface.
  • Step S207 classifying the unit search boxes included in the meshed search box to classify the boundary empty unit search box and the critical non-empty unit search box.
  • Step S209 determining whether there is a coordinate position located in the boundary empty unit search box and the critical non-empty unit search A view control at the adjacent boundary of the cable box.
  • the coordinate positions of the individual View discrete points often appear in the adjacent boundary of the boundary empty unit search box and the critical non-empty unit search box. At this time, if no processing is done, the View discrete point has the possibility of being classified into the boundary empty cell search box.
  • step S211 If there is a View discrete point located at the boundary between the boundary empty cell search box and the critical non-empty cell search box, the following step S211 is performed. Otherwise, go to step S213.
  • step S211 the size of the grid unit is reduced by a preset scale, and the process goes to step S205 to re-mesh the search box according to the reduced grid unit.
  • the reduction ratio may be based on 12px.
  • Step S213 performing a boundary search based on the divided result to determine a search boundary of the out-of-bounds focus.
  • FIG. 7 is a schematic diagram of functional blocks of a focus crossing search device 130 according to an embodiment of the present invention.
  • the apparatus includes an instruction receiving module 1302, a search box building module 1304, a meshing module 1306, a search box dividing module 1308, a determining module 1310, a resizing module 1312, and a boundary determining module 1314.
  • the instruction receiving module 1302 is configured to receive a focus search trigger instruction.
  • the instruction receiving module 1302 can be used to perform step S101 described in FIG. 2 and step S201 described in FIG. 6.
  • step S101 and S201 described in FIG. 6.
  • the search box building module 1304 is configured to add all the view controls included in the current user interface into the search box, the size of the search box is determined by the coordinate position of each view control located within the visible range of the user interface and relative to The positional relationship of the direct parent control is calculated.
  • the search box construction module 1304 can be used to perform step S103 shown in FIG. 2 and step S203 shown in FIG. 6.
  • step S103 shown in FIG. 2
  • step S203 shown in FIG. 6.
  • the meshing module 1306 is configured to perform meshing on the search box according to a pixel density corresponding to the user interface, and further, after the size adjustment module 1312 reduces the size of the grid unit by a preset ratio, The search box is re-divided according to the reduced grid unit.
  • the mesh dividing module 1306 can be used to perform step S105 shown in FIG. 2 and step S205 shown in FIG. 6.
  • step S105 shown in FIG. 2
  • step S205 shown in FIG. 6.
  • the search box dividing module 1308 is configured to classify the unit search boxes included in the meshed search box to divide the boundary empty unit search box and the critical non-empty unit search box.
  • the search box division module 1308 can be used to perform step S107 shown in FIG. 2 and step S207 shown in FIG. 6.
  • step S107 shown in FIG. 2
  • step S207 shown in FIG. 6.
  • the determining module 1310 is configured to determine whether a view control exists, and the coordinate position of the view control is located at an adjacent boundary of the boundary empty cell search box and the critical non-empty cell search box.
  • the determining module 1310 can be used to perform the process shown in FIG. Step S209.
  • the judging module 1310 For a detailed description of the judging module 1310, reference may be made to the description of step S209 above.
  • the size adjustment module 1312 is configured to reduce the size of the grid unit by a preset ratio if the coordinate position of the view control is located at an adjacent boundary of the boundary empty unit search box and the critical non-empty unit search box.
  • the resizing module 1312 can be used to perform step S211 shown in FIG.
  • the judging module 1310 For a detailed description of the judging module 1310, reference may be made to the description of step S211 above.
  • the boundary determining module 1314 is configured to perform a boundary search based on the segmented result to determine a search boundary of the out-of-bounds focus.
  • the boundary determining module 1314 can be used to perform step S109 shown in FIG. 2 and step S213 shown in FIG. 6.
  • search box partitioning module 1308 For a detailed description of the search box partitioning module 1308, reference may be made to the description of steps S109 and S213 above.
  • each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur in a different order than those illustrated in the drawings.
  • each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • each functional module in each embodiment of the present invention may be integrated to form a separate part, or each module may exist separately, or two or more modules may be integrated to form a separate part.
  • the functions, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk. It is to be understood that the terms “comprises” or “comprising” or “comprising” or “comprising” or “the” Other elements that are explicitly listed, or are included for this process, method, The elements inherent in the item or device.
  • the focus out-of-bounds search method, device, smart device and readable storage medium can effectively improve search efficiency and search accuracy, and better avoid the problem of losing focus.
  • the method and apparatus provided by the embodiment can satisfy most complex focus processing business scenarios, and the system-based borderless-based cross-border search mechanism cannot meet the growing demand scene of smart devices such as Android TVs and Android set-top boxes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

Provided are a method and apparatus for searching for a focus across a boundary, an intelligent device and a readable storage medium. The method comprises the following specific steps: after a focus search trigger instruction is received, adding all the view controls included in a current user interface to a search box, meshing the search box according to the pixel density corresponding to the user interface, then labelling cell search boxes comprised in the meshed search box according to category so as to obtain a boundary empty cell search box and a critical non-empty cell search box by means of partitioning, and finally carrying out a boundary search based on a result after the partitioning to determine a search boundary of a focus across the boundary. Compared with existing no-boundary cross-boundary search mechanisms, the method and the apparatus can effectively prevent the problem of focus loss and improve the search efficiency and accuracy.

Description

一种焦点越界搜索方法、装置、智能设备及可读存储介质Focus out-of-bounds search method, device, smart device and readable storage medium
本申请要求于2017年03月30日提交中国专利局的申请号为CN201710200925.4名称为“一种焦点越界搜索方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims the priority of the Chinese Patent Application No. CN201710200925.4 entitled "A Focus Over-Bound Search Method and Apparatus" filed on March 30, 2017, the entire contents of which is hereby incorporated by reference. in.
技术领域Technical field
本发明涉及焦点处理技术领域,具体而言,涉及一种焦点越界搜索方法、装置、智能设备及可读存储介质。The present invention relates to the field of focus processing technologies, and in particular, to a focus out-of-bounds search method, apparatus, smart device, and readable storage medium.
背景技术Background technique
与手机、平板等智能设备的触摸交互模式不同,安卓电视或安卓盒子的交互模式中需要依赖于遥控器或手机等遥控设备。以安卓电视的交互模式为例,用户按下遥控器按键后,电视设备接收到遥控器按键信号后解析信号源为按键事件指令集;然后,系统根据按键事件指令集做出焦点的搜索操作;最后,获得焦点的视图控件会做出更新视图的响应。Unlike the touch interaction mode of smart devices such as mobile phones and tablets, the interactive mode of the Android TV or the Android box needs to rely on a remote control device such as a remote controller or a mobile phone. Taking the interactive mode of the Android TV as an example, after the user presses the remote control button, the television device analyzes the signal source as the button event instruction set after receiving the remote controller button signal; then, the system performs a focus search operation according to the button event instruction set; Finally, the view control that gets the focus makes a response to the updated view.
但是在焦点搜索过程中,经常会遇到需要处理焦点越界搜索的情形。越界搜索的搜索空间是多维的,焦点的搜索边界难以确定,不但搜索耗时长,而且成功率低,还易出现焦点丢失的搜索结果,用户体验差。However, in the focus search process, there are often situations in which it is necessary to deal with out-of-focus search. The search space of the cross-border search is multi-dimensional, and the search boundary of the focus is difficult to determine. Not only the search takes a long time, but also the success rate is low, and the search result with the focus loss is easy to occur, and the user experience is poor.
发明内容Summary of the invention
有鉴于此,本发明的目的在于提供一种焦点越界搜索方法、装置、智能设备及可读存储介质,以改善上述问题。In view of the above, it is an object of the present invention to provide a focus out-of-bounds search method, apparatus, smart device, and readable storage medium to improve the above problems.
本发明较佳实施例提供一种焦点越界搜索方法,该方法包括:A preferred embodiment of the present invention provides a focus out-of-bounds search method, the method comprising:
接收焦点搜索触发指令;Receiving a focus search trigger instruction;
将当前用户界面包含的所有视图控件加入搜索盒中,该搜索盒的尺寸由位于所述用户界面可视范围内的各视图控件相对于直接父控件的位置关系计算得到;Adding all the view controls included in the current user interface into the search box, the size of the search box being calculated by the positional relationship of each view control located in the visible range of the user interface with respect to the direct parent control;
根据所述用户界面对应的像素密度对所述搜索盒进行网格划分;Dividing the search box according to a pixel density corresponding to the user interface;
对网格划分后的搜索盒中包括的单元搜索盒进行分类标记,以划分出边界空单元搜索盒和临界非空单元搜索盒;Sorting the unit search boxes included in the search box after the meshing to classify the boundary empty unit search box and the critical non-empty unit search box;
基于上述划分后的结果进行边界搜索,确定越界焦点的搜索边界。Based on the above-described divided results, a boundary search is performed to determine a search boundary of the out-of-bounds focus.
本发明另一较佳实施例提供一种焦点越界搜索装置,该装置包括:Another preferred embodiment of the present invention provides a focus out-of-bounds search device, the device comprising:
指令接收模块,用于接收焦点搜索触发指令;An instruction receiving module, configured to receive a focus search trigger instruction;
搜索盒构建模块,用于将当前用户界面包含的所有视图控件加入搜索盒中,该搜索盒的尺寸由位于所述用户界面可视范围内的各视图控件相对于直接父控件的位置关系计算得到; a search box building module, configured to add all the view controls included in the current user interface into the search box, the size of the search box is calculated by the positional relationship of each view control located in the visible range of the user interface relative to the direct parent control ;
网格划分模块,用于根据所述用户界面对应的像素密度对所述搜索盒进行网格划分;a meshing module, configured to mesh the search box according to a pixel density corresponding to the user interface;
搜索盒划分模块,用于对网格划分后的搜索盒中包括的单元搜索盒进行分类标记,以划分出边界空单元搜索盒和临界非空单元搜索盒;a search box division module, configured to classify and mark the unit search box included in the search box after the mesh division to divide the boundary empty unit search box and the critical non-empty unit search box;
边界确定模块,用于基于上述划分后的结果进行边界搜索,确定越界焦点的搜索边界。And a boundary determining module, configured to perform a boundary search based on the segmented result, and determine a search boundary of the out-of-bounds focus.
本发明另一较佳实施例还提供一种智能设备,包括处理器及存储有若干计算机指令的非易失性存储器,所述计算机指令被所述处理器执行时,所述智能设备执行上面实施例中所述的焦点越界搜索方法。Another preferred embodiment of the present invention further provides a smart device, including a processor and a non-volatile memory storing a plurality of computer instructions, wherein the smart device performs the above implementation when the computer instructions are executed by the processor The focus out of bounds search method described in the example.
本发明其他较佳实施例还提供一种可读存储介质,所述可读存储介质包括计算机程序,所述计算机程序运行时控制所述可读存储介质所在电子设备执行上面实施例中所述的焦点越界搜索方法。Other preferred embodiments of the present invention further provide a readable storage medium, the readable storage medium comprising a computer program, the computer program controlling the electronic device where the readable storage medium is located to perform the operations described in the above embodiments Focus out of bounds search method.
本发明较佳实施例提供的焦点越界搜索方法、装置、智能设备及可读存储介质,在接收到焦点搜索触发指令后,将当前用户界面包含的所有视图控件加入搜索盒中,并根据所述用户界面对应的像素密度对所述搜索盒进行网格划分,然后对网格划分后的搜索盒中包括的单元搜索盒进行分类标记,以划分出边界空单元搜索盒和临界非空单元搜索盒,最后基于上述划分后的结果进行边界搜索,确定越界焦点的搜索边界。本发明实施例应用改进的搜索盒算法进行焦点的越界搜索,与现有的无边界越界搜索机制相比,可有效规避丢焦问题。而且,无边界越界搜索机制每进行一次焦点搜索会遍历用户界面所对应的整个视图树,搜索方向存在无序性,搜索效率低下,应用本实施例提供的搜索方法确定搜索边界后可进行一维搜索,搜索效率和准确性明显提升。The focus out-of-bounds search method, apparatus, smart device, and readable storage medium provided by the preferred embodiment of the present invention, after receiving the focus search trigger instruction, add all view controls included in the current user interface to the search box, and according to the The search box is meshed by the pixel density corresponding to the user interface, and then the unit search box included in the search box after the mesh division is classified to mark the boundary empty unit search box and the critical non-empty unit search box. Finally, based on the above-mentioned divided results, a boundary search is performed to determine a search boundary of the out-of-bounds focus. The embodiment of the present invention applies the improved search box algorithm to perform out-of-bounds search of the focus, and can effectively avoid the problem of losing focus compared with the existing borderless search mechanism. Moreover, the borderless search function of the borderless search mechanism traverses the entire view tree corresponding to the user interface, the search direction is disordered, and the search efficiency is low. The search method provided in this embodiment can be used to determine the search boundary. Search, search efficiency and accuracy have improved significantly.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly described below. It should be understood that the following drawings show only certain embodiments of the present invention, and therefore It should be seen as a limitation on the scope, and those skilled in the art can obtain other related drawings according to these drawings without any creative work.
图1为本发明实施例提供的一种执行焦点越界搜索方法的智能设备的方框示意图;FIG. 1 is a schematic block diagram of a smart device for performing a focus out-of-bounds search method according to an embodiment of the present invention;
图2为本发明实施例提供的一种焦点越界搜索方法的流程图;2 is a flowchart of a method for searching for a focus out of bounds according to an embodiment of the present invention;
图3本发明实施例提供的一种视图控件与其直接父控件的位置关系示意图;FIG. 3 is a schematic diagram of a positional relationship between a view control and a direct parent control thereof according to an embodiment of the present invention;
图4为本发明实施例提供的在某一实施方式中搜索盒进行网格划分后的示意图;4 is a schematic diagram of a search box after mesh division in an embodiment according to an embodiment of the present invention;
图5为本发明实施例提供的基于图4中所示的搜索盒进行边界搜索后得到的结果图;FIG. 5 is a diagram of a result obtained after performing a boundary search based on the search box shown in FIG. 4 according to an embodiment of the present invention;
图6为本发明实施例提供的另一种焦点越界搜索方法的流程图;FIG. 6 is a flowchart of another focus out-of-bounds search method according to an embodiment of the present invention;
图7为本发明实施例提供的一种焦点越界搜索装置的功能模块示意图。FIG. 7 is a schematic diagram of functional modules of a focus out-of-bounds search device according to an embodiment of the present invention.
图标:100-智能设备;110-存储器;120-处理器;130-焦点越界搜索装置;1302-指令接 收模块;1304-搜索盒构建模块;1306-网格划分模块;1308-搜索盒划分模块;1310-判断模块;1312-尺寸调整模块;1314-边界确定模块。Icon: 100-smart device; 110-memory; 120-processor; 130-focal out-of-bounds search device; 1302-instruction Receive module; 1304-search box construction module; 1306-mesh division module; 1308-search box division module; 1310-judgment module; 1312-size adjustment module; 1314-boundary determination module.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. The components of the embodiments of the invention, which are generally described and illustrated in the figures herein, may be arranged and designed in various different configurations. It should be noted that similar reference numerals and letters indicate similar items in the following figures, and therefore, once an item is defined in a drawing, it is not necessary to further define and explain it in the subsequent drawings.
因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。Therefore, the following detailed description of the embodiments of the invention in the claims All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
请参阅图1,是本发明实施例提供的一种执行焦点越界搜索方法的智能设备100的方框示意图。该智能设备100可以是,但不限于,搭载了安卓操作系统的安卓电视机或者安卓机顶盒。如图1所示,该智能设备100包括存储器110、处理器120以及焦点越界搜索装置130。Please refer to FIG. 1 , which is a block diagram of a smart device 100 for performing a focus out-of-bounds search method according to an embodiment of the present invention. The smart device 100 can be, but is not limited to, an Android TV or an Android set top box equipped with an Android operating system. As shown in FIG. 1, the smart device 100 includes a memory 110, a processor 120, and a focus out-of-bounds search device 130.
所述存储器110与所述处理器120之间电性连接以实现数据的传输或交互。所述焦点越界搜索装置130包括至少一个可以软件或固件的形式存储于所述存储器110中或固化在所述智能设备100的操作系统中的软件功能模块。所述处理器120用于执行存储器110中存储的可执行模块,例如所述焦点越界搜索装置130包括的计算机程序。所述处理器120在接收到执行指令后,执行所述程序,下述本发明任一实施例揭示的流过程定义的智能设备100所执行的方法可以应用于处理器120中,或者由处理器120实现。The memory 110 is electrically connected to the processor 120 to implement transmission or interaction of data. The out of focus search device 130 includes at least one software function module that may be stored in the memory 110 or in an operating system of the smart device 100 in the form of software or firmware. The processor 120 is configured to execute executable modules stored in the memory 110, such as a computer program included by the focus out-of-bounds search device 130. The processor 120 executes the program after receiving the execution instruction, and the method executed by the smart device 100 defined by the flow process disclosed in any embodiment of the present invention may be applied to the processor 120 or by the processor. 120 implementation.
请参阅图2,是本发明实施例提供的一种焦点越界搜索方法的流程图。所应说明的是,本实施例提供的方法不以图2及以下所述的具体顺序为限制。下面将对图2中示出的各步骤进行详细阐述。Referring to FIG. 2, it is a flowchart of a method for searching for a focus out of bounds according to an embodiment of the present invention. It should be noted that the method provided in this embodiment is not limited to the specific order described in FIG. 2 and the following. The steps shown in Fig. 2 will be explained in detail below.
步骤S101,接收焦点搜索触发指令。Step S101, receiving a focus search trigger instruction.
本实施例中,以安卓电视为例,所述焦点可以是指安卓电视在接收到遥控器或手机等遥控设备的按键信号后,处理对应指令做出用户界面层面的显示特效,例如缩放、偏移、背景切换等。所述焦点搜索可以是指安卓系统根据上述指令对焦点进行重定位,以指定具体的视图控件(View控件)接受焦点,或者是系统按照默认算法进行焦点重定位。In this embodiment, taking the Android TV as an example, the focus may refer to an Android TV that, after receiving a button signal of a remote control device such as a remote controller or a mobile phone, processes a corresponding command to perform a display effect on the user interface level, such as zooming and biasing. Shift, background switching, etc. The focus search may refer to the Android system relocating the focus according to the above instruction, to specify a specific view control (View control) to accept the focus, or the system to perform focus relocation according to the default algorithm.
本实施例中,所述焦点搜索触发指令可以是智能设备100对接收到的控制信号进行解析得到的指令或指令集。所述控制信号可以是遥控器或手机等遥控设备被用户操作后所发 出的遥控信号。In this embodiment, the focus search trigger instruction may be an instruction or a set of instructions obtained by the smart device 100 parsing the received control signal. The control signal may be sent by a remote control device such as a remote controller or a mobile phone after being operated by a user. The remote control signal.
作为一种实施方式,用户按下遥控器的操作按键后,安卓电视机或者安卓机顶盒接收到遥控器的按键信号并解析所述按键信号为按键事件指令集,以使系统根据按键事件指令集进行焦点搜索操作。可以理解,通常情况下,上述解析所述按键信号的操作可以由处理器执行安卓架构层(Framework层)中相应的应用程序来完成;后续的焦点搜索操作可以由处理器执行安卓应用程序层(Application层)中相应的应用程序来完成。As an implementation manner, after the user presses the operation button of the remote controller, the Android TV or the Android set top box receives the button signal of the remote controller and parses the button signal as a button event instruction set, so that the system performs the button event instruction set according to the button event instruction set. Focus search operation. It can be understood that, in general, the foregoing operation of parsing the button signal may be performed by a processor executing a corresponding application in an Android architecture layer (Framework layer); subsequent focus search operations may be performed by the processor to execute an Android application layer ( The corresponding application in the Application layer) is completed.
步骤S103,将当前用户界面包含的所有视图控件加入搜索盒中,该搜索盒的尺寸由位于所述用户界面可视范围内的各视图控件的坐标位置及其相对于直接父控件的位置关系计算得到。Step S103, adding all view controls included in the current user interface to the search box, the size of the search box is calculated by the coordinate position of each view control located in the visible range of the user interface and its positional relationship with respect to the direct parent control. get.
本实施例中,所述视图控件(View控件)的直接父控件为直接包含该View控件的ViewGroup控件。In this embodiment, the direct parent control of the view control (View control) is a ViewGroup control directly containing the View control.
作为一种实施方式,由于所述当前用户界面对应的视图树(ViewTree)下的视图控件的数量并不确定,尤其是可视范围以外的越界区域内所包含的视图控件的数目,因此可以选择在视图控件的布局(Layout)阶段将各视图控件动态加入搜索盒中。例如,按照预设的遍历方式(如先序、中序或后序遍历等)遍历视图树,当遍历到视图控件时,则将其加入到搜索盒中,如此实现视图控件动态加入搜索盒的过程。As an implementation manner, since the number of view controls under the view tree corresponding to the current user interface is not determined, especially the number of view controls included in the out-of-bounds area outside the visible range, the number of view controls may be selected. Each view control is dynamically added to the search box during the Layout phase of the view control. For example, the traversal view tree is traversed according to a preset traversal method (such as preorder, middle or post traversal, etc.), and when traversing to the view control, it is added to the search box, so that the view control is dynamically added to the search box. process.
本实施例中,所述搜索盒的尺寸由可视范围内的视图控件的坐标位置及其相对于直接父控件的位置关系计算得到。由于视图树下的视图控件的数量并不确定,因此需要在将各视图控件动态加入搜索盒的过程中不断计算并更新搜索盒的尺寸。例如,在一实施方式中,所述搜索盒的初始尺寸可以由当前已知的位于可视范围内的一个或多个视图控件的坐标位置及其相对于各自直接父控件的位置关系计算得到;然后,将视图树中其他的视图控件逐步加入搜索盒中,并在加入过程中判断该视图控件是否在可视范围内,若位于可视范围内,则重新根据当前已知的位于可视范围内的所有视图控件的坐标位置及其相对于各自直接父控件的位置关系计算搜索盒的尺寸并进行更新,直至视图树下的所有视图控件全部加入到了所述搜索盒为止。In this embodiment, the size of the search box is calculated from the coordinate position of the view control in the visible range and its positional relationship with respect to the direct parent control. Since the number of view controls under the view tree is not certain, it is necessary to continuously calculate and update the size of the search box during the process of dynamically adding the view controls to the search box. For example, in an embodiment, the initial size of the search box may be calculated from the currently known coordinate positions of one or more view controls located within the visible range and their positional relationships with respect to respective direct parent controls; Then, the other view controls in the view tree are gradually added to the search box, and during the joining process, it is judged whether the view control is in the visible range, and if it is in the visible range, it is re-based according to the currently known visible range. The coordinate positions of all view controls within them and their positional relationship with respect to their respective direct parent controls calculate the size of the search box and update until all view controls under the view tree have been added to the search box.
作为一种实施方式,根据当前处于该搜索盒中且位于所述用户界面可视范围内的各视图控件的坐标位置及其相对于直接父控件的位置关系计算所述搜索盒的尺寸的具体方式可以是:As an implementation manner, a specific manner of calculating the size of the search box according to the coordinate position of each view control currently in the search box and located within the visible range of the user interface and its positional relationship with respect to the direct parent control Can be:
首先,根据
Figure PCTCN2017110501-appb-000001
计算所述各视图控件的平均中心点距。其中,n为所述各视图控件的总数目,w为所述视图控件的宽度值,h为所述视图控件的高度值,l为所述视图控件距离其直接父控件的左边距,r为所述视图控件距离其直接父控件的右边 距。关于上述参数w、h、l及r的解释具体可以参见图3中提供的某一位于可视范围内的视图控件及其直接父控件的示意图。
First, according to
Figure PCTCN2017110501-appb-000001
Calculate the average center point distance of each view control. Where n is the total number of the respective view controls, w is the width value of the view control, h is the height value of the view control, and l is the left margin of the view control from the immediate parent control, r is The view control is from the right margin of its immediate parent control. For the explanation of the above parameters w, h, l and r, please refer to the schematic view of a view control and its direct parent control in the visible range provided in FIG.
然后,根据计算式:
Figure PCTCN2017110501-appb-000002
计算所述搜索盒的尺寸。其中,daver表示所述搜索盒的直径。
Then, according to the calculation formula:
Figure PCTCN2017110501-appb-000002
The size of the search box is calculated. Where d aver represents the diameter of the search box.
这里需要说明的是,根据上述方式计算出的搜索盒的尺寸可以是实际操作时的搜索盒的粗略大小。例如,计算出的所述直径的大小非整数,如小数点后包含多位小数的数值时,实际操作时可以进行取整处理或者近似处理。It should be noted here that the size of the search box calculated according to the above manner may be the rough size of the search box in actual operation. For example, the calculated size of the diameter is not an integer. For example, when the decimal point includes a multi-digit decimal value, the actual operation may perform rounding processing or approximation processing.
可以理解,在其他实施例中,并不排除可以采用其他方式粗略估计搜索盒的大小。例如,作为一种实施方式,可以将视图树中的根节点ViewGroup控件的大小直接估计为所述搜索盒的大小。It will be appreciated that in other embodiments, it is not excluded that the size of the search box can be roughly estimated in other ways. For example, as an embodiment, the size of the root node ViewGroup control in the view tree can be directly estimated as the size of the search box.
不过,本实施例中较优的实施方式仍是采用可视范围内的各视图控件的平均中心点距来计算搜索盒的尺寸。原因在于,直接将上述ViewGroup控件的大小估计为所述搜索盒的大小通常会导致搜索盒过大或过小的问题,这样通常不利于后续搜索边界的确定。However, the preferred embodiment in this embodiment still uses the average center point distance of each view control within the visible range to calculate the size of the search box. The reason is that directly estimating the size of the above ViewGroup control as the size of the search box usually causes the search box to be too large or too small, which is generally not conducive to the determination of subsequent search boundaries.
此外,本实施例中,在所述视图控件加入所述搜索盒的过程中,为规避同一视图控件重复加入的情形,通常可以采用Set集合存储视图控件信息。所述Set集合是Java集合框架中的一种,其内部存储的元素具备唯一属性,即Set集合不会重复存储同一元素。In addition, in this embodiment, in the process of adding the view control to the search box, in order to avoid the situation that the same view control is repeatedly added, the set set may be used to store the view control information. The Set collection is one of the Java collection frameworks, and the elements stored therein have unique attributes, that is, the Set collection does not repeatedly store the same element.
步骤S105,根据所述用户界面对应的像素密度对所述搜索盒进行网格划分。Step S105, meshing the search box according to a pixel density corresponding to the user interface.
可以理解,对所述搜索盒进行网格划分就是采用具有一定边长的网格单元对由所述视图树构建的搜索盒进行划分。本实施例中,所述网格划分可以采用由内向外的方向进行,例如,可以采用已有的铺路法进行网格的剖分。It can be understood that the meshing of the search box is to divide the search box constructed by the view tree by using a grid unit having a certain side length. In this embodiment, the meshing may be performed from the inside to the outside direction. For example, the meshing may be performed by using an existing paving method.
特别地,本实施例中,提出了通过像素密度(Pixels Per Inch,PPI)确定网格单元边长的设计。作为一种实施方式,可以根据计算式:
Figure PCTCN2017110501-appb-000003
确定网格单元的边长。其中S表示系统规定的文本视图中字体的最小值,P表示所述智能设备100所显示的界面具备的像素密度。例如,以一分辨率为1080×1920、像素密度为320的搭载有安卓操作系统的智能设备100为例,安卓系统规定字体TextView中的最小值为12sp,单个字体TextView所占面积为24px。48px为该智能设备100上可获得焦点的视图控件的最小单元尺寸,而ViewGroup的中每个子View的焦点方向有4个方向,由此可确定网格单元的边长为96px。
In particular, in the present embodiment, a design for determining the side length of a mesh unit by pixel density (Pixels Per Inch, PPI) is proposed. As an implementation manner, according to the calculation formula:
Figure PCTCN2017110501-appb-000003
Determine the side length of the grid cell. Where S represents the minimum value of the font in the text view specified by the system, and P represents the pixel density of the interface displayed by the smart device 100. For example, a smart device 100 equipped with an Android operating system having a resolution of 1080×1920 and a pixel density of 320 is taken as an example. The Android system specifies that the minimum value of the font TextView is 12 sp, and the area of the single font TextView is 24 px. 48px is the minimum unit size of the view control that can be focused on the smart device 100, and the focus direction of each subview in the ViewGroup has 4 directions, thereby determining that the side length of the grid unit is 96px.
如图4所示,是本实施例提供的在某一实施方式中,对搜索盒进行网格划分后的示意图。图中散落分布的黑色标注点代表加入搜索盒中的视图控件(View)离散点。包含所述离散点的外周圆圈代表所述搜索盒。每一个方形格代表一个网格单元。 As shown in FIG. 4, it is a schematic diagram of the search box after meshing in a certain embodiment provided by this embodiment. The black marker points of the scattered distribution in the figure represent the discrete points of the view control (View) added to the search box. A peripheral circle containing the discrete points represents the search box. Each square represents a grid cell.
步骤S107,对网格划分后的搜索盒中包括的单元搜索盒进行分类标记,以划分出边界空单元搜索盒和临界非空单元搜索盒。Step S107, classifying the unit search boxes included in the meshed search box to classify the boundary empty unit search box and the critical non-empty unit search box.
本实施例中,对网格划分后的搜索盒中包括的单元搜索盒进行临界标记。靠近边界的单元搜索盒如果为空且其所在方向没有其余的单元格搜索盒或单元搜索盒依然为空时,将该单元搜索盒标记为边界空单元搜索盒(Boundary Cell Search Box,SCSB),即已经到达边界。与边界空单元搜索盒临近的非空单元搜索盒标记为临界非空单元搜索盒(Critical Nonempty Cell Search Box,CNCSB)。In this embodiment, the cell search box included in the meshed search box is critically marked. If the cell search box near the boundary is empty and there is no cell search box or cell search box in the direction that is still empty, mark the cell search box as Boundary Cell Search Box (SCSB). That is, the boundary has been reached. The non-empty unit search box adjacent to the boundary empty cell search box is labeled as Critical Nonempty Cell Search Box (CNCSB).
步骤S109,基于上述划分后的结果进行边界搜索,确定越界焦点的搜索边界。Step S109, performing a boundary search based on the divided result to determine a search boundary of the out-of-bounds focus.
本实施例中,进行所述边界搜索时,首先需要选取搜索的起始点。通常地,可以选择所述搜索盒中的任意一个单元搜索盒作为所述起始点。然后,沿着该起始点的上方向(Top Direction)开始搜索边界空单元搜索盒。如果搜索到边界空单元搜索盒则停止在当前方向的搜索,并沿着顺时针调整搜索方向继续搜索下一个边界空单元搜索盒。顺时针360度搜索完成后,所有边界空单元搜索盒的中心点连接形成一个不规则的多边形,该不规则多边形即为所述搜索边界。In this embodiment, when performing the boundary search, it is first necessary to select a starting point of the search. Generally, any one of the search boxes in the search box can be selected as the starting point. Then, the boundary empty cell search box is searched starting along the top direction of the starting point. If the boundary empty cell search box is searched, the search in the current direction is stopped, and the search direction is adjusted clockwise to continue searching for the next boundary empty cell search box. After the 360-degree search is completed clockwise, the center points of all the boundary empty cell search boxes are connected to form an irregular polygon, which is the search boundary.
如图5所示,是本实施例提供的基于图4中所示的搜索盒进行边界搜索后得到的结果图。图中由深灰色填充的单元搜索盒表示其为边界空单元搜索盒,由浅灰色填充的单元搜索盒表示其为临界非空单元搜索盒。由黑色线条围成的不规则多边形即为得到的搜索边界。其中,该多边形上的“o”表示搜索时选择的起始点,箭头表示沿顺时针方向依次搜索。As shown in FIG. 5, it is a result graph obtained by performing a boundary search based on the search box shown in FIG. 4 provided by this embodiment. The cell search box filled with dark gray in the figure indicates that it is a boundary empty cell search box, and the cell search box filled with light gray indicates that it is a critical non-empty cell search box. An irregular polygon surrounded by black lines is the resulting search boundary. Wherein, "o" on the polygon indicates the starting point selected during the search, and the arrow indicates that the search is sequentially performed in the clockwise direction.
在确定焦点越界搜索的边界后,即可将越界搜索的多维空间搜索转化为一维搜索,如此便可以提升搜索效率、搜索准确性,有效规避丢焦现象。After determining the boundary of the out-of-focus search, the multi-dimensional space search of the cross-border search can be converted into a one-dimensional search, which can improve the search efficiency, search accuracy, and effectively avoid the phenomenon of losing focus.
请参阅图6,是本发明实施例提供的另一种焦点越界搜索方法的流程图。如图6所示,该种焦点越界搜索方法包括:Please refer to FIG. 6 , which is a flowchart of another method for out-of-focus search according to an embodiment of the present invention. As shown in FIG. 6, the focus out-of-bounds search method includes:
步骤S201,接收焦点搜索触发指令。Step S201, receiving a focus search trigger instruction.
步骤S203,将当前用户界面包含的所有视图控件加入搜索盒中,该搜索盒的尺寸由位于所述用户界面可视范围内的各视图控件的坐标位置及其相对于直接父控件的位置关系计算得到。Step S203, adding all the view controls included in the current user interface to the search box, the size of the search box is calculated by the coordinate position of each view control located in the visible range of the user interface and its positional relationship with respect to the direct parent control. get.
步骤S205,根据所述用户界面对应的像素密度对所述搜索盒进行网格划分。Step S205, meshing the search box according to a pixel density corresponding to the user interface.
步骤S207,对网格划分后的搜索盒中包括的单元搜索盒进行分类标记,以划分出边界空单元搜索盒和临界非空单元搜索盒。Step S207, classifying the unit search boxes included in the meshed search box to classify the boundary empty unit search box and the critical non-empty unit search box.
本方法中步骤S201~步骤S207的具体描述及实施方式可参照上述相应步骤S101~S107,在此不再赘述。For detailed descriptions and implementations of the steps S201 to S207 in the method, reference may be made to the corresponding steps S101 to S107, and details are not described herein again.
步骤S209,判断是否存在坐标位置位于所述边界空单元搜索盒和所述临界非空单元搜 索盒的相邻边界处的视图控件。Step S209, determining whether there is a coordinate position located in the boundary empty unit search box and the critical non-empty unit search A view control at the adjacent boundary of the cable box.
本实施例中,考虑到通过网格将搜索盒划分为多个单元搜索盒后,往往会出现个别View离散点的坐标位置出现在边界空单元搜索盒与临界非空单元搜索盒的相邻边界处,此时若不做任何处理,该View离散点存在被划入到边界空单元搜索盒中的可能。In this embodiment, after the search box is divided into multiple unit search boxes by the grid, the coordinate positions of the individual View discrete points often appear in the adjacent boundary of the boundary empty unit search box and the critical non-empty unit search box. At this time, if no processing is done, the View discrete point has the possibility of being classified into the boundary empty cell search box.
如果存在位于边界空单元搜索盒与临界非空单元搜索盒相邻边界处的View离散点,则执行下述步骤S211。否则,转至步骤S213。If there is a View discrete point located at the boundary between the boundary empty cell search box and the critical non-empty cell search box, the following step S211 is performed. Otherwise, go to step S213.
步骤S211,按预设比例缩小网格单元的尺寸,并转至步骤S205,以根据缩小后的网格单元重新对所述搜索盒进行网格划分。In step S211, the size of the grid unit is reduced by a preset scale, and the process goes to step S205 to re-mesh the search box according to the reduced grid unit.
本实施例中,作为一种实施方式,缩小比例可以12px为基准。In this embodiment, as an embodiment, the reduction ratio may be based on 12px.
步骤S213,基于上述划分后的结果进行边界搜索,确定越界焦点的搜索边界。Step S213, performing a boundary search based on the divided result to determine a search boundary of the out-of-bounds focus.
请参阅图7,是本发明实施例提供的一种焦点越界搜索装置130的功能模块示意图。该装置包括指令接收模块1302、搜索盒构建模块1304、网格划分模块1306、搜索盒划分模块1308、判断模块1310、尺寸调整模块1312以及边界确定模块1314。FIG. 7 is a schematic diagram of functional blocks of a focus crossing search device 130 according to an embodiment of the present invention. The apparatus includes an instruction receiving module 1302, a search box building module 1304, a meshing module 1306, a search box dividing module 1308, a determining module 1310, a resizing module 1312, and a boundary determining module 1314.
所述指令接收模块1302,用于接收焦点搜索触发指令。本实施例中,该指令接收模块1302可用于执行图2所述的步骤S101以及图6中所述的步骤S201。关于该指令接收模块1302的详细描述,可参上述对步骤S101及S201的描述。The instruction receiving module 1302 is configured to receive a focus search trigger instruction. In this embodiment, the instruction receiving module 1302 can be used to perform step S101 described in FIG. 2 and step S201 described in FIG. 6. For a detailed description of the instruction receiving module 1302, reference may be made to the description of steps S101 and S201 above.
所述搜索盒构建模块1304,用于将当前用户界面包含的所有视图控件加入搜索盒中,该搜索盒的尺寸由位于所述用户界面可视范围内的各视图控件的坐标位置及其相对于直接父控件的位置关系计算得到。本实施例中,该搜索盒构建模块1304可用于执行图2所示的步骤S103以及图6所示的步骤S203。关于该搜索盒构建模块1304的详细描述,可参上述对步骤S103及S203的描述。The search box building module 1304 is configured to add all the view controls included in the current user interface into the search box, the size of the search box is determined by the coordinate position of each view control located within the visible range of the user interface and relative to The positional relationship of the direct parent control is calculated. In this embodiment, the search box construction module 1304 can be used to perform step S103 shown in FIG. 2 and step S203 shown in FIG. 6. For a detailed description of the search box construction module 1304, reference may be made to the description of steps S103 and S203 above.
所述网格划分模块1306,用于根据所述用户界面对应的像素密度对所述搜索盒进行网格划分,还用于在下述尺寸调整模块1312按预设比例缩小网格单元的尺寸后,根据缩小后的网格单元重新对所述搜索盒进行网格划分。本实施例中,该网格划分模块1306可用于执行图2所示的步骤S105以及图6所示的步骤S205。关于该网格划分模块1306的详细描述,可参上述对步骤S105及S205的描述。The meshing module 1306 is configured to perform meshing on the search box according to a pixel density corresponding to the user interface, and further, after the size adjustment module 1312 reduces the size of the grid unit by a preset ratio, The search box is re-divided according to the reduced grid unit. In this embodiment, the mesh dividing module 1306 can be used to perform step S105 shown in FIG. 2 and step S205 shown in FIG. 6. For a detailed description of the meshing module 1306, reference may be made to the description of steps S105 and S205 above.
所述搜索盒划分模块1308,用于对网格划分后的搜索盒中包括的单元搜索盒进行分类标记,以划分出边界空单元搜索盒和临界非空单元搜索盒。本实施例中,该搜索盒划分模块1308可用于执行图2所示的步骤S107以及图6所示的步骤S207。关于该搜索盒划分模块1308的详细描述,可参上述对步骤S107及S207的描述。The search box dividing module 1308 is configured to classify the unit search boxes included in the meshed search box to divide the boundary empty unit search box and the critical non-empty unit search box. In this embodiment, the search box division module 1308 can be used to perform step S107 shown in FIG. 2 and step S207 shown in FIG. 6. For a detailed description of the search box partitioning module 1308, reference may be made to the description of steps S107 and S207 above.
所述判断模块1310,用于判断是否存在视图控件,该视图控件的坐标位置位于边界空单元搜索盒和临界非空单元搜索盒的相邻边界处。该判断模块1310可用于执行图6所示的 步骤S209。关于该判断模块1310的详细描述,可参上述对步骤S209的描述。The determining module 1310 is configured to determine whether a view control exists, and the coordinate position of the view control is located at an adjacent boundary of the boundary empty cell search box and the critical non-empty cell search box. The determining module 1310 can be used to perform the process shown in FIG. Step S209. For a detailed description of the judging module 1310, reference may be made to the description of step S209 above.
所述尺寸调整模块1312,用于若存在视图控件的坐标位置位于边界空单元搜索盒和临界非空单元搜索盒的相邻边界处时,按预设比例缩小网格单元的尺寸。该尺寸调整模块1312可用于执行图6所示的步骤S211。关于该判断模块1310的详细描述,可参上述对步骤S211的描述。The size adjustment module 1312 is configured to reduce the size of the grid unit by a preset ratio if the coordinate position of the view control is located at an adjacent boundary of the boundary empty unit search box and the critical non-empty unit search box. The resizing module 1312 can be used to perform step S211 shown in FIG. For a detailed description of the judging module 1310, reference may be made to the description of step S211 above.
所述边界确定模块1314,用于基于上述划分后的结果进行边界搜索,确定越界焦点的搜索边界。本实施例中,该边界确定模块1314可用于执行图2所示的步骤S109以及图6所示的步骤S213。关于该搜索盒划分模块1308的详细描述,可参上述对步骤S109及S213的描述。The boundary determining module 1314 is configured to perform a boundary search based on the segmented result to determine a search boundary of the out-of-bounds focus. In this embodiment, the boundary determining module 1314 can be used to perform step S109 shown in FIG. 2 and step S213 shown in FIG. 6. For a detailed description of the search box partitioning module 1308, reference may be made to the description of steps S109 and S213 above.
本实施例中各功能模块的具体操作方法可参照上述方法实施例中相应步骤的描述,在此不再一一赘述。For the specific operation method of each function module in this embodiment, reference may be made to the description of the corresponding steps in the foregoing method embodiments, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本发明的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may also be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and functionality of possible implementations of apparatus, methods, and computer program products according to various embodiments of the invention. operating. In this regard, each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur in a different order than those illustrated in the drawings. For example, two consecutive blocks may be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts, can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions.
另外,在本发明各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, each functional module in each embodiment of the present invention may be integrated to form a separate part, or each module may exist separately, or two or more modules may be integrated to form a separate part.
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、 物品或者设备所固有的要素。The functions, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including The instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk. It is to be understood that the terms "comprises" or "comprising" or "comprising" or "comprising" or "the" Other elements that are explicitly listed, or are included for this process, method, The elements inherent in the item or device.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the appended claims.
工业实用性Industrial applicability
本发明实施例提供的焦点越界搜索方法、装置、智能设备及可读存储介质,与现有的无边界越界搜索机制相比,可有效提升搜索效率和搜索准确性,较好的规避丢焦问题。另外,应用本实施例提供的方法及装置可以满足大多数的复杂焦点处理业务场景,而基于系统无边界的越界搜索机制则无法满足安卓电视、安卓机顶盒等智能设备端日益增长的需求场景。 Compared with the existing borderless cross-border search mechanism, the focus out-of-bounds search method, device, smart device and readable storage medium can effectively improve search efficiency and search accuracy, and better avoid the problem of losing focus. . In addition, the method and apparatus provided by the embodiment can satisfy most complex focus processing business scenarios, and the system-based borderless-based cross-border search mechanism cannot meet the growing demand scene of smart devices such as Android TVs and Android set-top boxes.

Claims (16)

  1. 一种焦点越界搜索方法,其特征在于,该方法包括:A focus out-of-bounds search method, characterized in that the method comprises:
    接收焦点搜索触发指令;Receiving a focus search trigger instruction;
    将当前用户界面包含的所有视图控件加入搜索盒中,该搜索盒的尺寸由位于所述用户界面可视范围内的各视图控件的坐标位置及其相对于直接父控件的位置关系计算得到;Adding all the view controls included in the current user interface into the search box, the size of the search box is calculated by the coordinate position of each view control located within the visible range of the user interface and its positional relationship with respect to the direct parent control;
    根据所述用户界面对应的像素密度对所述搜索盒进行网格划分;Dividing the search box according to a pixel density corresponding to the user interface;
    对网格划分后的搜索盒中包括的单元搜索盒进行分类标记,以划分出边界空单元搜索盒和临界非空单元搜索盒;Sorting the unit search boxes included in the search box after the meshing to classify the boundary empty unit search box and the critical non-empty unit search box;
    基于上述划分后的结果进行边界搜索,确定越界焦点的搜索边界。Based on the above-described divided results, a boundary search is performed to determine a search boundary of the out-of-bounds focus.
  2. 根据权利要求1所述的方法,其特征在于,所述将当前用户界面包含的所有视图控件加入搜索盒中,该搜索盒的尺寸由位于所述用户界面可视范围内的各视图控件的坐标位置及其相对于直接父控件的位置关系计算得到的步骤,包括:The method according to claim 1, wherein all the view controls included in the current user interface are added to the search box, and the size of the search box is determined by the coordinates of each view control located within the visible range of the user interface. The steps calculated by the location and its positional relationship relative to the immediate parent control, including:
    将用户界面所包含的视图控件动态加入搜索盒中,所述动态加入搜索盒的方式包括在所述视图控件的布局阶段动态加入所述搜索盒中;Adding a view control included in the user interface dynamically into the search box, the manner of dynamically joining the search box includes dynamically adding the search box in a layout phase of the view control;
    当有新的视图控件加入所述搜索盒中时,根据当前处于该搜索盒中且位于所述用户界面可视范围内的各视图控件的坐标位置及其相对于直接父控件的位置关系计算并更新所述搜索盒的尺寸,直至该用户界面所包含的全部视图控件加入到所述搜索盒中。When a new view control is added to the search box, the coordinate position of each view control currently in the search box and located within the visible range of the user interface and its positional relationship with respect to the direct parent control are calculated and The size of the search box is updated until all view controls contained in the user interface are added to the search box.
  3. 根据权利要求2所述的方法,其特征在于,所述根据当前处于该搜索盒中且位于所述用户界面可视范围内的各视图控件的坐标位置及其相对于直接父控件的位置关系计算并更新所述搜索盒的尺寸的步骤,包括:The method according to claim 2, wherein said calculating a coordinate position of each view control currently in the search box and located within a visible range of said user interface and its positional relationship with respect to a direct parent control And updating the size of the search box, including:
    根据计算式:
    Figure PCTCN2017110501-appb-100001
    计算所述各视图控件的平均中心点距,其中,n为所述各视图控件的总数目,w为所述视图控件的宽度值,h为所述视图控件的高度值,l为所述视图控件距离其直接父控件的左边距,r为所述视图控件距离其直接父控件的右边距;及
    According to the calculation formula:
    Figure PCTCN2017110501-appb-100001
    Calculating an average center point distance of each view control, where n is the total number of the view controls, w is a width value of the view control, h is a height value of the view control, and l is the view The control is from the left margin of its immediate parent control, and r is the right margin of the view control from its immediate parent control;
    根据计算式:
    Figure PCTCN2017110501-appb-100002
    计算所述搜索盒的尺寸,其中,daver表示所述搜索盒的直径。
    According to the calculation formula:
    Figure PCTCN2017110501-appb-100002
    The size of the search box is calculated, where d aver represents the diameter of the search box.
  4. 根据权利要求1-3中任意一项所述的方法,其特征在于,所述根据所述用户界面对应的像素密度对所述搜索盒进行网格划分的步骤,包括:The method according to any one of claims 1 to 3, wherein the step of meshing the search box according to a pixel density corresponding to the user interface comprises:
    根据计算式:
    Figure PCTCN2017110501-appb-100003
    确定网格单元的边长,其中S表示系统规定的文本 视图中字体的最小值,P表示所述像素密度;
    According to the calculation formula:
    Figure PCTCN2017110501-appb-100003
    Determining the side length of the grid unit, where S represents the minimum value of the font in the text view specified by the system, and P represents the pixel density;
    通过具有上述边长的正方形网格单元对所述搜索盒进行网格划分。The search box is meshed by a square grid unit having the above-described side lengths.
  5. 根据权利要求1-3中任意一项所述的方法,其特征在于,在所述基于上述划分后的结果进行边界搜索,确定越界焦点的搜索边界的步骤之前,该方法还包括:The method according to any one of claims 1 to 3, wherein before the step of performing a boundary search based on the segmented result and determining a search boundary of the out-of-bounds focus, the method further comprises:
    判断是否存在坐标位置位于所述边界空单元搜索盒和所述临界非空单元搜索盒的相邻边界处的视图控件;Determining whether there is a view control whose coordinate position is located at an adjacent boundary of the boundary empty cell search box and the critical non-empty cell search box;
    若存在,则按预设比例缩小网格单元的尺寸,并根据缩小后的网格单元重新对所述搜索盒进行网格划分。If yes, the size of the grid unit is reduced by a preset ratio, and the search box is re-divided according to the reduced grid unit.
  6. 根据权利要求1-3中任意一项所述的方法,其特征在于,所述对网格划分后的搜索盒中包括的单元搜索盒进行分类标记,以划分出边界空单元搜索盒和临界非空单元搜索盒的步骤,包括:The method according to any one of claims 1 to 3, wherein the unit search box included in the meshed search box is classified and marked to define a boundary empty unit search box and a critical non- The steps of the empty unit search box include:
    在靠近边界的单元搜索盒如果为空且其所在方向没有其余的单元格搜索盒或单元搜索盒依然为空时,将该单元搜索盒标记为边界空单元搜索盒;If the unit search box near the boundary is empty and there is no other cell search box or the unit search box in the direction is still empty, the unit search box is marked as a boundary empty unit search box;
    将与边界空单元搜索盒临近的非空单元搜索盒标记为临界非空单元搜索盒。A non-empty cell search box adjacent to the boundary empty cell search box is marked as a critical non-empty cell search box.
  7. 根据权利要求1-3中任意一项所述的方法,其特征在于,所述基于上述划分后的结果进行边界搜索,确定越界焦点的搜索边界的步骤,包括:The method according to any one of claims 1 to 3, wherein the step of performing a boundary search based on the segmented result and determining a search boundary of the out-of-bounds focus comprises:
    选取搜索的起点;Select the starting point of the search;
    沿着该起始点的上方向开始搜索边界空单元搜索盒;Searching for the boundary empty cell search box along the upper direction of the starting point;
    如果搜索到边界空单元搜索盒则停止在当前方向的搜索,并沿着顺时针调整搜索方向继续搜索下一个边界空单元搜索盒;If the boundary empty cell search box is searched, the search in the current direction is stopped, and the search direction is adjusted clockwise to continue searching for the next boundary empty cell search box;
    在顺时针360度搜索完成后,所有边界空单元搜索盒的中心点连接形成一个不规则的多边形,该不规则多边形即为所述搜索边界。After the 360-degree search is completed clockwise, the center points of all boundary empty cell search boxes are connected to form an irregular polygon, which is the search boundary.
  8. 一种焦点越界搜索装置,其特征在于,该装置包括:A focus out-of-bounds search device, characterized in that the device comprises:
    指令接收模块,配置成接收焦点搜索触发指令;An instruction receiving module configured to receive a focus search trigger instruction;
    搜索盒构建模块,配置成将当前用户界面包含的所有视图控件加入搜索盒中,该搜索盒的尺寸由位于所述用户界面可视范围内的各视图控件的坐标位置及其相对于直接父控件的位置关系计算得到;a search box building module configured to add all view controls included in the current user interface to a search box, the size of the search box being determined by coordinate positions of respective view controls located within a viewable range of the user interface and relative to the direct parent control The positional relationship is calculated;
    网格划分模块,配置成根据所述用户界面对应的像素密度对所述搜索盒进行网格划分;a meshing module configured to mesh the search box according to a pixel density corresponding to the user interface;
    搜索盒划分模块,配置成对网格划分后的搜索盒中包括的单元搜索盒进行分类标记,以划分出边界空单元搜索盒和临界非空单元搜索盒;a search box division module configured to classify and mark the unit search box included in the search box after the mesh division to divide the boundary empty unit search box and the critical non-empty unit search box;
    边界确定模块,配置成基于上述划分后的结果进行边界搜索,确定越界焦点的搜 索边界。a boundary determination module configured to perform a boundary search based on the segmented result and determine a search for an out-of-bounds focus Cable boundary.
  9. 根据权利要求8所述的装置,其特征在于,所述搜索盒构建模块进一步配置成:The apparatus of claim 8, wherein the search box construction module is further configured to:
    将用户界面所包含的视图控件动态加入搜索盒中,所述动态加入搜索盒的方式包括在所述视图控件的布局阶段动态加入所述搜索盒中;Adding a view control included in the user interface dynamically into the search box, the manner of dynamically joining the search box includes dynamically adding the search box in a layout phase of the view control;
    当有新的视图控件加入所述搜索盒中时,根据当前处于该搜索盒中且位于所述用户界面可视范围内的各视图控件的坐标位置及其相对于直接父控件的位置关系计算并更新所述搜索盒的尺寸,直至该用户界面所包含的全部视图控件加入到所述搜索盒中。When a new view control is added to the search box, the coordinate position of each view control currently in the search box and located within the visible range of the user interface and its positional relationship with respect to the direct parent control are calculated and The size of the search box is updated until all view controls contained in the user interface are added to the search box.
  10. 根据权利要求8所述的装置,其特征在于,所述搜索盒构建模块进一步配置成:The apparatus of claim 8, wherein the search box construction module is further configured to:
    根据计算式:
    Figure PCTCN2017110501-appb-100004
    计算所述各视图控件的平均中心点距,其中,n为所述各视图控件的总数目,w为所述视图控件的宽度值,h为所述视图控件的高度值,l为所述视图控件距离其直接父控件的左边距,r为所述视图控件距离其直接父控件的右边距;及
    According to the calculation formula:
    Figure PCTCN2017110501-appb-100004
    Calculating an average center point distance of each view control, where n is the total number of the view controls, w is a width value of the view control, h is a height value of the view control, and l is the view The control is from the left margin of its immediate parent control, and r is the right margin of the view control from its immediate parent control;
    根据计算式:
    Figure PCTCN2017110501-appb-100005
    计算所述搜索盒的尺寸,其中,daver表示所述搜索盒的直径。
    According to the calculation formula:
    Figure PCTCN2017110501-appb-100005
    The size of the search box is calculated, where d aver represents the diameter of the search box.
  11. 根据权利要求8-10中任意一项所述的装置,其特征在于,所述网格划分模块进一步配置成:The apparatus according to any one of claims 8 to 10, wherein the mesh dividing module is further configured to:
    根据计算式:
    Figure PCTCN2017110501-appb-100006
    确定网格单元的边长,其中S表示系统规定的文本视图中字体的最小值,P表示所述像素密度;
    According to the calculation formula:
    Figure PCTCN2017110501-appb-100006
    Determining the side length of the grid unit, where S represents the minimum value of the font in the text view specified by the system, and P represents the pixel density;
    通过具有上述边长的正方形网格单元对所述搜索盒进行网格划分。The search box is meshed by a square grid unit having the above-described side lengths.
  12. 根据权利要求8-10中任意一项所述的装置,其特征在于,该装置还包括:The device according to any one of claims 8 to 10, further comprising:
    判断模块,配置成判断是否存在坐标位置位于所述边界空单元搜索盒和所述临界非空单元搜索盒的相邻边界处的视图控件;a determining module, configured to determine whether there is a view control whose coordinate position is located at an adjacent boundary of the boundary empty cell search box and the critical non-empty cell search box;
    尺寸调整模块,配置成若存在坐标位置位于边界空单元搜索盒和临界非空单元搜索盒的相邻边界处的视图控件时,按预设比例缩小网格单元的尺寸;The size adjustment module is configured to reduce the size of the grid unit by a preset ratio if there is a view control where the coordinate position is located at an adjacent boundary of the boundary empty unit search box and the critical non-empty unit search box;
    其中,所述网格划分模块,进一步配置成根据缩小后的网格单元重新对所述搜索盒进行网格划分。The meshing module is further configured to re-mesh the search box according to the reduced grid unit.
  13. 根据权利要求8-10中任意一项所述的装置,其特征在于,所述搜索盒划分模块进一步配置成:The apparatus according to any one of claims 8 to 10, wherein the search box division module is further configured to:
    在靠近边界的单元搜索盒如果为空且其所在方向没有其余的单元格搜索盒或单元搜索盒依然为空时,将该单元搜索盒标记为边界空单元搜索盒; If the unit search box near the boundary is empty and there is no other cell search box or the unit search box in the direction is still empty, the unit search box is marked as a boundary empty unit search box;
    将与边界空单元搜索盒临近的非空单元搜索盒标记为临界非空单元搜索盒。A non-empty cell search box adjacent to the boundary empty cell search box is marked as a critical non-empty cell search box.
  14. 根据权利要求8-10中任意一项所述的装置,其特征在于,所述边界确定模块进一步配置成:The apparatus of any of claims 8-10, wherein the boundary determination module is further configured to:
    选取搜索的起点;Select the starting point of the search;
    沿着该起始点的上方向开始搜索边界空单元搜索盒;Searching for the boundary empty cell search box along the upper direction of the starting point;
    如果搜索到边界空单元搜索盒则停止在当前方向的搜索,并沿着顺时针调整搜索方向继续搜索下一个边界空单元搜索盒;If the boundary empty cell search box is searched, the search in the current direction is stopped, and the search direction is adjusted clockwise to continue searching for the next boundary empty cell search box;
    在顺时针360度搜索完成后,所有边界空单元搜索盒的中心点连接形成一个不规则的多边形,该不规则多边形即为所述搜索边界。After the 360-degree search is completed clockwise, the center points of all boundary empty cell search boxes are connected to form an irregular polygon, which is the search boundary.
  15. 一种智能设备,包括处理器及存储有若干计算机指令的非易失性存储器,其特征在于,所述计算机指令被所述处理器执行时,所述智能设备执行权利要求1-7中任意一项所述的焦点越界搜索方法。A smart device comprising a processor and a non-volatile memory storing a plurality of computer instructions, wherein the smart device performs any one of claims 1-7 when the computer instructions are executed by the processor The focus out-of-bounds search method described in the item.
  16. 一种可读存储介质,所述可读存储介质包括计算机程序,其特征在于:A readable storage medium, the readable storage medium comprising a computer program, characterized by:
    所述计算机程序运行时控制所述可读存储介质所在电子设备执行权利要求1-7中任意一项所述的焦点越界搜索方法。 The computer program controlling the electronic device in which the readable storage medium is located to perform the focus out-of-bounds search method according to any one of claims 1-7.
PCT/CN2017/110501 2017-03-30 2017-11-10 Method and apparatus for searching for focus across boundary, intelligent device and readable storage medium WO2018176843A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710200925.4A CN106998489B (en) 2017-03-30 2017-03-30 A kind of focus is crossed the border searching method and device
CN201710200925.4 2017-03-30

Publications (1)

Publication Number Publication Date
WO2018176843A1 true WO2018176843A1 (en) 2018-10-04

Family

ID=59434016

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/110501 WO2018176843A1 (en) 2017-03-30 2017-11-10 Method and apparatus for searching for focus across boundary, intelligent device and readable storage medium

Country Status (2)

Country Link
CN (1) CN106998489B (en)
WO (1) WO2018176843A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106998489B (en) * 2017-03-30 2018-07-06 武汉斗鱼网络科技有限公司 A kind of focus is crossed the border searching method and device
CN109343923B (en) * 2018-09-20 2023-04-07 聚好看科技股份有限公司 Method and equipment for zooming user interface focus frame of intelligent television
CN109508128B (en) * 2018-11-09 2021-05-18 北京微播视界科技有限公司 Search control display method, device and equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1592881A (en) * 2001-09-13 2005-03-09 松下电器产业株式会社 GUI part focus movement destination setter and focus moving device
JP2010128567A (en) * 2008-11-25 2010-06-10 Nec Corp Cursor movement control method and device, and program
CN104768045A (en) * 2015-03-26 2015-07-08 百视通网络电视技术发展有限责任公司 Cursor control method and system based on television application program
CN105812944A (en) * 2014-12-29 2016-07-27 深圳Tcl新技术有限公司 Interface focus movement control method and device
CN106060616A (en) * 2016-06-07 2016-10-26 青岛海信电器股份有限公司 Operation processing method and device
CN106998489A (en) * 2017-03-30 2017-08-01 武汉斗鱼网络科技有限公司 A kind of focus is crossed the border searching method and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5805165A (en) * 1995-08-31 1998-09-08 Microsoft Corporation Method of selecting a displayed control item
CN101980191B (en) * 2010-10-14 2014-03-05 优视科技有限公司 Method and device for locking focus element in webpage browsing process
CN102830958B (en) * 2011-06-16 2017-11-24 奇智软件(北京)有限公司 A kind of method and system for obtaining interface control information
CN102547463B (en) * 2011-12-15 2015-04-22 Tcl集团股份有限公司 Method and device for locating interface focus of TV set, and TV set
CN103677496A (en) * 2012-09-07 2014-03-26 腾讯科技(深圳)有限公司 Interface control method and control device
CN103618955A (en) * 2013-11-08 2014-03-05 天津三星电子有限公司 Method and system for achieving television interface configuration
CN103596062A (en) * 2013-11-29 2014-02-19 华为技术有限公司 Method and device for moving focus and television set
CN104301796A (en) * 2014-09-26 2015-01-21 四川长虹电器股份有限公司 Method for automatically controlling focus of master shot of smart television
CN105630468B (en) * 2014-10-30 2020-05-05 腾讯科技(武汉)有限公司 Focal point moving method and device of UI (user interface) frame

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1592881A (en) * 2001-09-13 2005-03-09 松下电器产业株式会社 GUI part focus movement destination setter and focus moving device
JP2010128567A (en) * 2008-11-25 2010-06-10 Nec Corp Cursor movement control method and device, and program
CN105812944A (en) * 2014-12-29 2016-07-27 深圳Tcl新技术有限公司 Interface focus movement control method and device
CN104768045A (en) * 2015-03-26 2015-07-08 百视通网络电视技术发展有限责任公司 Cursor control method and system based on television application program
CN106060616A (en) * 2016-06-07 2016-10-26 青岛海信电器股份有限公司 Operation processing method and device
CN106998489A (en) * 2017-03-30 2017-08-01 武汉斗鱼网络科技有限公司 A kind of focus is crossed the border searching method and device

Also Published As

Publication number Publication date
CN106998489B (en) 2018-07-06
CN106998489A (en) 2017-08-01

Similar Documents

Publication Publication Date Title
US10984169B2 (en) Systems, methods, and computer-readable media for providing a dynamic loupe for displayed information
US10037593B2 (en) Dynamic image presentation
US20210349615A1 (en) Resizing graphical user interfaces
US10599311B2 (en) Layout constraint manipulation via user gesture recognition
US20140215365A1 (en) Image display apparatus, image displaying method and program
CN112099686B (en) Icon display control method and device and electronic equipment
US20090327965A1 (en) Selection of items in a virtualized view
WO2018176843A1 (en) Method and apparatus for searching for focus across boundary, intelligent device and readable storage medium
KR20150083651A (en) Electronic apparatus and data displaying method thereof
US20190243536A1 (en) Method for interacting with one or more software applications using a touch sensitive display
KR101747299B1 (en) Method and apparatus for displaying data object, and computer readable storage medium
KR20150019064A (en) Method of displaying classfied information and device of displaying classfied information using the same
CN113538623B (en) Method, device, electronic equipment and storage medium for determining target image
CN112214156B (en) Touch screen magnifier calling method and device, electronic equipment and storage medium
CN113407075A (en) Icon sorting method and device and electronic equipment
US9047707B2 (en) Graph display device
JP6995208B2 (en) Image panning method
CN113093961B (en) Window switching method, storage medium and related equipment
US11132821B1 (en) Providing graphical user interface tools for efficiently selecting handles in vector artwork on touch-based devices
US20180260091A1 (en) Drag and drop insertion control object
CN110533742B (en) Image color filling method, device, equipment and storage medium
JP2009199456A (en) Information processing device, display method, and program
US20140331180A1 (en) Graphical user interface that presents selectable items in a user-traversable passageway
EP3521990A1 (en) Method for interacting with one or more of software applications using a touch sensitive display
US11182955B1 (en) Utilizing dynamic filtering to adaptively generate control points of a vector object for display in a graphical user interface

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17902616

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17902616

Country of ref document: EP

Kind code of ref document: A1