Control locating method, electronic device, and storage medium
By enumerating the control position boxes on the smart terminal interface, obtaining control information and responding to user search operations, automatic positioning controls are realized, solving the problem of users' difficulty in finding in the multi-control interface and improving the user experience.
Patent Information
- Application Number
- PCT/CN2024/097342
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-15
- Filing Date
- 2024-06-04
- Publication Date
- 2025-05-22
AI Technical Summary
When there are many controls on the smart terminal interface, users need to manually search on page by page, resulting in poor user experience and lack of efficient and accurate positioning methods.
By enumerating the predetermined control position box of the current interface, the selected target position box is obtained, the corresponding first control information is obtained, the search information of the second control to be found in response to the user's search operation, and the second control is positioned in the current interface based on the search information and control information.
It realizes automatic positioning of the controls that the user wants, reduces the number of manual searches, and improves the user experience.
Smart Images

Figure CN2024097342_22052025_PF_FP_ABST
Abstract
Description
Control positioning method, electronic device, and storage medium
[0001] Related applications
[0002] This application claims priority to Chinese patent application No. 202311525118.1 filed on November 15, 2023, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of communications, and in particular to a control positioning method, an electronic device, and a storage medium. Background Art
[0004] Currently, only a limited number of controls can be displayed on the interface of smart terminals. In related technologies, users need to manually search page by page to locate the desired target control. When there are a large number of controls, users have to repeat operations many times, resulting in a poor user experience.
[0005] For the above-mentioned problems existing in related technologies, no efficient and accurate solutions have been found yet.
[0006] Summary of the Invention
[0007] The present application provides a control positioning method, an electronic device, and a storage medium to solve the above-mentioned technical problems existing in the related art.
[0008] According to one embodiment of the present application, a control positioning method is provided, including: enumerating location boxes of predetermined controls on a current interface of a target terminal, and obtaining a target location box selected in the predetermined location box; obtaining control information of a first control corresponding to the target location box; responding to a user search operation, obtaining search information of a second control to be found; and positioning the second control in the current interface based on the search information and the control information.
[0009] According to another embodiment of the present application, a storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above-mentioned device embodiments when running.
[0010] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above device embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0012] FIG1 is a block diagram of the hardware structure of a mobile phone according to an embodiment of the present application;
[0013] FIG2 is a flow chart of a method for positioning a control according to an embodiment of the present application;
[0014] FIG3 is a schematic diagram of a location box of a predetermined control in an interface according to an embodiment of the present application;
[0015] FIG4 is an implementation flow chart of an embodiment of the present application;
[0016] FIG5 is a structural block diagram of a positioning device for a control according to an embodiment of the present application. DETAILED DESCRIPTION
[0017] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of this application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
[0018] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0019] Example 1
[0020] The method embodiment provided in the first embodiment of the present application can be executed in a mobile phone, a tablet, a smart head-mounted device or a similar computing device. Taking running on a mobile phone as an example, Figure 1 is a hardware structure block diagram of a mobile phone in an embodiment of the present application. As shown in Figure 1, the mobile phone may include one or more (only one is shown in Figure 1) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. In one embodiment, the above-mentioned mobile phone may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that the structure shown in Figure 1 is only for illustration and does not limit the structure of the above-mentioned mobile phone. For example, the mobile phone may also include more or fewer components than those shown in Figure 1, or have a configuration different from that shown in Figure 1.
[0021] The memory 104 can be used to store mobile phone programs, for example, software programs and modules of application software, such as a mobile phone program corresponding to a positioning method of a control in an embodiment of the present application. The processor 102 executes various functional applications and data processing by running the mobile phone program stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the mobile phone via a network. Examples of the above-mentioned network include but are not limited to the Internet, corporate intranet, local area network, mobile communication network and combinations thereof.
[0022] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by the mobile phone's telecommunications provider. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0023] In this embodiment, a method for positioning a control is provided. FIG2 is a flow chart of a method for positioning a control according to an embodiment of the present application. As shown in FIG2 , the flow chart includes the following steps.
[0024] Step S10: enumerate the location boxes of predetermined controls on the current interface of the target terminal, and obtain the target location box selected from the predetermined location boxes.
[0025] Step S20: Acquire control information of a first control corresponding to the target position box.
[0026] In this embodiment, the predetermined controls may be all controls in the current interface. The predetermined controls may also be pre-set to specified controls in the current interface. For example, the predetermined controls may be controls that provide a scrolling area in the current interface, and all controls that can be scrolled within the scrolling area. In this embodiment, taking all controls in the current interface as an example, as shown in FIG3 , the location boxes of all controls in the current interface of the target terminal are enumerated, and the target location box selected in all the location boxes is obtained.
[0027] In one implementation of this embodiment, enumerating the location boxes of predetermined controls on the current interface of the target terminal includes: determining the parent node control on the current interface of the target terminal; determining the child node control corresponding to each parent node control based on the parent-child relationship, traversing the predetermined controls on the current interface, and displaying the location boxes of the predetermined controls on the current interface, wherein the predetermined controls include parent node controls and child node controls.
[0028] In this embodiment, the user can trigger the control information analysis function of the current interface of the target terminal by voice command triggering or touch gesture triggering, so as to enumerate the location boxes of the predetermined controls of the current interface.
[0029] In this embodiment, obtaining the selected target position frame within the predetermined position frame includes: receiving user touch information within the predetermined position frame area; and determining the selected target position frame within the predetermined position frame in response to the touch information. For example, if a user clicks the target position frame corresponding to "Clock" in Figure 3, the first control corresponding to the target position frame is determined to be a clock control, and control information for the clock control is obtained. In this embodiment, in response to the touch information, the pre-selected position frame corresponding to the touch information is highlighted, and a check is performed to determine whether a user confirmation instruction has been received; if a user confirmation instruction has been received, the pre-selected position frame is determined to be the selected target position frame.
[0030] Step S30: In response to the user's search operation, obtain search information of the second control to be found.
[0031] Step S40: locating the second control in the current interface according to the search information and the control information.
[0032] In an example of this embodiment, the user's search operation can be voice input or text input. In response to the user's voice input or text input, the search information of the second control to be found is obtained according to the input voice data or text data. For example, the search information of the second control is "locate to hot search". According to the search information, it can be determined that the second control the user wants to find is a hot search control, and then the second control can be located in the current interface according to the search information and control information.
[0033] In this embodiment, each control corresponds to a location box, and the control information includes but is not limited to the control ID, the package name, and the text attribute text.
[0034] Through the above steps, the position box of the predetermined controls of the current interface of the target terminal is enumerated, and the target position box selected in the predetermined position box is obtained; the control information of the first control corresponding to the target position box is obtained; in response to the user's search operation, the search information of the second control to be found is obtained; based on the search information and the control information, the second control is located in the current interface, and the position layout of the predetermined controls is displayed by enumerating the predetermined controls of the current interface. According to the user's selection of the currently enumerated predetermined controls and the user's search operation, the control that the user wants to find is determined, and according to the search information and the control information of the selected control, the control that the user wants to find is automatically located, which solves the trouble of manually searching for controls page by page in the related technology and improves the user experience.
[0035] In one implementation of this embodiment, locating the second control in the current interface according to the search information and the control information includes the following steps.
[0036] S41, extracting the control ID of the control information.
[0037] S42, determining the target control sequence where the control ID is located.
[0038] S43: Searching for a target control corresponding to the search information in the target control sequence, and using the target control as the second control.
[0039] Enumerate the location boxes of the predetermined controls of the current interface (as shown in Figure 3), obtain the target location box selected in the predetermined location box, determine the first control corresponding to the target location box, and obtain the control information of the first control. In this embodiment, the first control is a clock control, and the control information is the control information corresponding to the clock control. Extract the control id in the control information, and determine the target control sequence where the control id is located. For example, the target control sequence includes a clock control, a weather control, a calendar control, and a hot search control, etc. Search the target control sequence for the search information "locate to hot search" and use the target control as the second control.
[0040] In this embodiment, the control IDs in the target control sequence are associated, and it is possible to simply determine in the enumerated predetermined controls whether the second control to be found is a control of a related type. Referring to Figure 3, for example, it is determined that the second control (hot search control) is most likely to be at a certain position after the clock control. The user selects the target position box corresponding to the clock control in the enumerated predetermined position box, thereby determining the location of the second control to be found in the control sequence where the clock control is located, thereby improving the accuracy of positioning.
[0041] In this embodiment, searching for a target control corresponding to the search information in the target control sequence includes: extracting keywords from the search information; traversing the text attributes corresponding to each control in the attribute information of the target control sequence to search for a target text attribute that matches the keyword; and using the control corresponding to the target text attribute as the target control.
[0042] In an example of this embodiment, the search information is "locate to hot search", the keyword "hot search" in the search information is extracted, the text attribute text corresponding to each control in the attribute information of the target control sequence is traversed, and the target text attribute that matches the keyword "hot search" is found, and the control corresponding to the target text attribute is used as the target control.
[0043] In another implementation of this embodiment, traversing the text attributes corresponding to each control in the attribute information of the target control sequence, and searching for the target text attribute that matches the keyword includes: obtaining the scrolling direction of the target control sequence; determining the control list contained in the target control sequence; starting from the first control in the control list, performing the following search operation on each control in the control list in sequence along the scrolling direction until the target text attribute that matches the keyword is found, or traversing to the last control in the control list: extracting the current text attribute of the current control; determining whether the current text attribute matches the keyword; if the current text attribute matches the keyword, determining the current text attribute as the target text attribute; if the current text attribute does not match the keyword, updating the next control in the control list as the current control.
[0044] Due to the limited display space of the current interface, not all controls in the target control sequence may be displayed in the current interface, that is, the second control to be found may be in the hidden controls of the target control sequence, and a page-turning search is required. In this embodiment, the scrolling direction of the target control sequence is obtained, the control list contained in the target control sequence is determined, and the following search operation is performed on each control in the control list in sequence along the scrolling direction starting from the first control in the control list until the target text attribute matching the keyword is found or the last control in the control list is traversed: the current text attribute of the current control is extracted. If the current text attribute matches the keyword, the current text attribute is determined as the target text attribute. When the target text attribute matching the keyword is found, it means that the target control has been found, and the search process ends; if the current text attribute does not match the keyword, the search continues to the next control until the last control in the control list is reached, that is, all controls in the control list are searched. If the target text attribute matching the keyword is not found in the control list, a prompt is output to prompt the user that the content the user is looking for is not in the target control sequence.
[0045] In one embodiment, obtaining the scrolling direction of the target control sequence includes: monitoring a touch screen sliding event or an air gesture sliding event; obtaining the sliding direction corresponding to the touch screen sliding event or the air gesture sliding event; and determining whether the scrolling direction of the target control sequence is up and down scrolling or left and right scrolling based on the sliding direction.
[0046] The target control sequence can scroll up and down or left and right. Since different control sequences have different scrolling directions, if the scrolling direction is set to a fixed target direction, some control sequences with scrolling directions different from the target direction will not be applicable. Therefore, in order to improve versatility, this embodiment monitors touch screen sliding events or air gesture sliding events; obtains the sliding direction corresponding to the touch screen sliding event or the air gesture sliding event; determines whether the scrolling direction of the target control sequence is up and down or left and right according to the sliding direction. In one example, the touch screen sliding event is that the touch screen point moves from the first horizontal coordinate to the second horizontal coordinate, and the vertical coordinate remains unchanged. Then, it can be determined that the sliding direction corresponding to the touch screen sliding event is left and right, and the pages are scrolled in the left and right directions.
[0047] In one implementation of this embodiment, obtaining search information of the second control to be found includes: obtaining a search instruction for the second control to be found; parsing text data in the search instruction, and using the text data as search information.
[0048] In this embodiment, the search instruction can be a voice instruction or a touch instruction, or other search instructions for searching for the second control to be found. In one example, the search instruction is a voice instruction, which receives the user's voice instruction, parses the audio data corresponding to the voice instruction, and converts the audio data into text data, and uses the text data as search information.
[0049] The solution of this embodiment provides a method for locating a control. Figure 4 is an implementation flow chart of an embodiment of the present application, including: starting user interface analysis through voice or touch menu, and displaying layout information of predetermined controls on the current interface; receiving a touch instruction from the user within the predetermined position box area, and highlighting the first selected control; judging whether the user confirms operating the control; if the user does not confirm operating the control, re-receiving the user's touch instruction, highlighting the second selected control, and again judging whether the user confirms operating the second control; if the user confirms operating the highlighted control, obtaining the search key information input by the user; obtaining page turning gesture information; determining the target control sequence where the selected control is located, traversing the sequence list of the target control sequence, and searching for controls that match the search key information, that is, searching for controls required by the user.
[0050] The control positioning method provided in this embodiment enumerates the predetermined controls of the current interface and displays the position layout of the predetermined controls. Based on the user's selection of the currently enumerated predetermined controls and the user's search operation, the control that the user wants to find is determined. Based on the search information and the control information of the selected control, the control that the user wants to find is automatically positioned, which solves the trouble of manually searching page by page in related technologies and improves the user experience.
[0051] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0052] Example 2
[0053] This embodiment also provides a control positioning device, which is used to implement the above-mentioned embodiments and some implementation methods. Details that have already been described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0054] Figure 5 is a structural block diagram of a control positioning device according to an embodiment of the present application. As shown in Figure 5, the device includes: an enumeration module 50, which is used to enumerate the location boxes of predetermined controls in the current interface of the target terminal and obtain the target location box selected in the predetermined location box; a first acquisition module 51, which is used to obtain control information of the first control corresponding to the target location box; a second acquisition module 52, which is used to respond to a user search operation and obtain search information of a second control to be found; and a positioning module 53, which is used to locate the second control in the current interface based on the search information and the control information.
[0055] The above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: all the above modules are located in the same processor; or the above modules are located in different processors in any combination.
[0056] Example 3
[0057] An embodiment of the present application further provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0058] In one embodiment, in this embodiment, the above-mentioned storage medium may be configured to store a computer program for executing the following steps.
[0059] S1, enumerating the location boxes of predetermined controls on the current interface of the target terminal, and acquiring the target location box selected in the predetermined location boxes.
[0060] S2: Acquire control information of a first control corresponding to the target position box.
[0061] S3: In response to the user's search operation, obtain search information of the second control to be found.
[0062] S4. Locate the second control in the current interface according to the search information and the control information.
[0063] In one embodiment, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0064] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0065] In one embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0066] In this embodiment, the processor may be configured to execute the following steps through a computer program.
[0067] S1, enumerating the location boxes of predetermined controls on the current interface of the target terminal, and acquiring the target location box selected in the predetermined location boxes.
[0068] S2: Acquire control information of a first control corresponding to the target position box.
[0069] S3: In response to the user's search operation, obtain search information of the second control to be found.
[0070] S4. Locate the second control in the current interface according to the search information and the control information.
[0071] In one embodiment, the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be repeated here.
[0072] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0073] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0074] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0075] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0076] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0077] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0078] The above are only some embodiments of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as within the scope of protection of the present application.
Claims
1. A method for positioning a control, wherein: The method comprises: Enumerate the location boxes of the predetermined controls on the current interface of the target terminal, and obtain the target location box selected in the predetermined location box; Acquire control information of a first control corresponding to the target position box; In response to a user search operation, obtaining search information of a second control to be found; The second control is located in the current interface according to the search information and the control information.
2. The method according to claim 1, wherein: Locating the second control in the current interface according to the search information and the control information includes: Extract the control ID of the control information; Determine the target control sequence where the control id is located; A target control corresponding to the search information is searched in the target control sequence, and the target control is used as the second control.
3. The method according to claim 2, wherein: Searching for a target control corresponding to the search information in the target control sequence includes: Extracting keywords of the search information; Traversing the text attributes corresponding to each control in the attribute information of the target control sequence, and searching for the target text attribute matching the keyword; The control corresponding to the target text attribute is used as the target control.
4. The method according to claim 3, wherein: Traversing the text attributes corresponding to each control in the attribute information of the target control sequence to find the target text attribute matching the keyword includes: Get the scroll direction of the target control sequence; Determine a list of controls included in the target control sequence; According to the scrolling direction, starting from the first control in the control list, a search operation of the target text attribute is performed on each control in the control list until a target text attribute matching the keyword is found, or the last control in the control list is traversed.
5. The method according to claim 4, wherein: Performing a search operation of a target text attribute on each control in the control list includes: Extract the current text attribute of the current control; Determining whether the current text attribute matches the keyword; If the current text attribute matches the keyword, determining the current text attribute as the target text attribute; If the current text attribute does not match the keyword, the next control in the control list is updated as the current control.
6. The method according to claim 4, wherein: Get the scroll direction of the target control sequence, including: Monitor touch screen sliding events or mid-air gesture sliding events; Obtaining a sliding direction corresponding to the touch screen sliding event or the mid-air gesture sliding event; The scrolling direction of the target control sequence is determined according to the sliding direction.
7. The method according to claim 1, wherein: Obtain search information of the second control to be found, including: Obtaining a search instruction for a second control to be found; The text data in the search instruction is parsed, and the text data is used as search information.
8. The method according to claim 1, wherein: Enumerate the location box of the predetermined controls of the current interface of the target terminal, including: Determine the parent node control on the current interface of the target terminal; Determine the child node control corresponding to each parent node control according to the parent-child relationship, traverse the predetermined controls on the current interface, and display the position box of the predetermined control on the current interface, wherein the predetermined control includes a parent node control and a child node control.
9. An electronic device, wherein: The system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: Memory, used to store computer programs; A processor, configured to execute the steps of the control positioning method according to any one of claims 1 to 8 by running a program stored in a memory.
10. A storage medium, wherein: The storage medium includes a stored program, wherein the program executes the steps of the control positioning method according to any one of claims 1 to 8 when the program is run.
Citation Information
Patent Citations
Touch electronic device and icon management method thereof
CN103513903A
Web element positioning method, application thereof and storage medium
CN113094617A
Icon display control method and device, electronic equipment and medium
CN116450008A
Control positioning method, electronic equipment and storage medium
CN117555988A
Search method and electronic device
WO2023029993A1