WO2022242302A1 - Text search method and apparatus, readable medium, and electronic device - Google Patents

Text search method and apparatus, readable medium, and electronic device Download PDF

Info

Publication number
WO2022242302A1
WO2022242302A1 PCT/CN2022/082421 CN2022082421W WO2022242302A1 WO 2022242302 A1 WO2022242302 A1 WO 2022242302A1 CN 2022082421 W CN2022082421 W CN 2022082421W WO 2022242302 A1 WO2022242302 A1 WO 2022242302A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
searchable
trigger operation
search
search box
Prior art date
Application number
PCT/CN2022/082421
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 WO2022242302A1 publication Critical patent/WO2022242302A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • 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
    • 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/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Definitions

  • the present disclosure relates to the technical field of the Internet, in particular, to a text search method, device, readable medium and electronic equipment.
  • search box In most information application software, a search box is usually provided to provide users with an interface for quickly retrieving interesting information.
  • the search box often displays hot words that are currently being searched for more frequently.
  • searchable text 1 and Multiple searchable texts such as “Searchable Text 2” represent the most popular search keywords at present, and are available for interested users to click to view.
  • two clicks are required, that is, first click on the search box A, and then click on the evoked text On the search page as shown in FIG.
  • the present disclosure provides a text search method, the method comprising: displaying a search box, wherein one or more searchable texts are displayed in the search box; receiving a user's trigger operation on the search box; If the trigger operation is a preset trigger operation, according to the trigger operation, the target text is determined in the searchable text; the target text is searched, and a search result page of the target text is displayed.
  • the present disclosure provides a text search device, the device comprising:
  • a display module configured to display a search box, wherein one or more searchable texts are displayed in the search box;
  • a receiving module configured to receive a user's trigger operation on the search box
  • a determination module configured to determine target text in the searchable text according to the trigger operation when the trigger operation is a preset trigger operation
  • a search module configured to search the target text and display a search result page of the target text.
  • the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the method described in the first aspect are realized.
  • an electronic device including:
  • a processing device configured to execute the computer program in the storage device to implement the steps of the method in the first aspect.
  • the search results can be displayed to the user more quickly, and the text search function is improved by improving the efficiency of the user's search for the text displayed in the search box interactive experience.
  • Fig. 1a and Fig. 1b are schematic diagrams of display interfaces for text search respectively shown according to the prior art.
  • Fig. 2 is a flowchart showing a text search method according to an exemplary embodiment of the present disclosure.
  • Fig. 3 is a schematic diagram of a display interface for displaying search results in a text search method according to yet another exemplary embodiment of the present disclosure.
  • Fig. 4 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure.
  • Fig. 5 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure.
  • Fig. 6 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure.
  • Fig. 7 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure.
  • Fig. 8 is a structural block diagram of a text search device according to an exemplary embodiment of the present disclosure.
  • Fig. 9 is a structural block diagram of a text search device according to yet another exemplary embodiment of the present disclosure.
  • Fig. 10 is a structural block diagram of a text search device according to yet another exemplary embodiment of the present disclosure.
  • FIG. 11 shows a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure.
  • the term “comprise” and its variations are open-ended, ie “including but not limited to”.
  • the term “based on” is “based at least in part on”.
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one further embodiment”; the term “some embodiments” means “at least some embodiments.” Relevant definitions of other terms will be given in the description below.
  • Fig. 2 is a flowchart showing a text search method according to an exemplary embodiment of the present disclosure. As shown in FIG. 2 , the method includes step 201 to step 204 .
  • step 201 a search box is displayed, wherein one or more searchable texts are displayed in the search box.
  • the search box can be displayed on any display interface of an intelligent terminal device, such as a display interface of a mobile terminal.
  • the search box is used for the user to input keywords to search for relevant information.
  • the keywords entered by the user through voice or text will be displayed in the search box, and the search button can be used to search in the library according to the keywords .
  • the search box may be, for example, a news information search box in news information application software, or may be, for example, a short video information search box in short video application software.
  • the news and information application software can provide the search box in its display interface, and the user can input keywords through the search box to search for news and information.
  • the search box can display hotspot keywords that have been searched more times, that is, the searchable text, so as to push the current hotspot significantly and intuitively, as shown in the search box A in Figure 1a shown.
  • the searchable text There can be many ways to display the searchable text in the search box. For example, as shown in FIG. Each text is scrolled and displayed in the search box in a fixed order in turn, or the current most popular text is directly displayed in the search box, etc.
  • the method of displaying the selectable text in the search box is not limited in the present disclosure.
  • step 202 a user's trigger operation on the search box is received.
  • the trigger operation can be different according to the smart terminal device.
  • the trigger operation can be input by the user operating an input device such as a mouse or a keyboard. operations, such as double-clicking the left button of the mouse, clicking the left button, etc.; when the display screen of the smart terminal device is a touch screen display screen, the triggering operation can be a click operation, a double-click operation, or a user input directly through the touch screen. Long press operation and so on.
  • the trigger operation can be identified.
  • step 203 if the trigger operation is a preset trigger operation, the target text is determined in the searchable text according to the trigger operation.
  • the preset trigger operation may be a long-press operation or a double-click operation.
  • the target text is determined from the searchable text displayed in the search box.
  • the searchable text displayed in the search box can be determined as the target text; two searchable texts as shown in Figure 1a are displayed in the search box
  • one of them can be determined as the target text according to the trigger operation.
  • the trigger operation is a long press operation
  • the searchable text corresponding to the press point position of the long press operation can be determined as The target text.
  • step 204 the target text is searched, and a search result page of the target text is displayed.
  • the target text can be directly searched without the user needing to re-enter keywords in the search box and trigger the search button to search, and there is no need to click twice as shown in Figure 1b
  • search box as shown in Figure 1a, is provided in the news information display interface of a news information application software of a mobile terminal with a touch screen function, and what is currently displayed in the search box A is "searchable text 1" and "Searchable text 2" has two searchable texts, and the default trigger operation is a long press operation, and the long press time is not less than 1s.
  • the trigger operation of the search box A by the user is received at this time, and after the trigger operation is identified, the trigger operation satisfies the preset trigger operation, and the two searchable texts in the search box A according to the trigger operation Determine the target text; if the corresponding searchable text is determined to be "searchable text 1" according to the trigger operation, then the searchable text 1 can be determined as the target text, and the target text can be searched directly, and it will be displayed as shown in Figure 3 The search results page shown. The user can directly view the search results of the target text after inputting the trigger operation.
  • the search results can be displayed to the user more quickly, and the text search function is improved by improving the efficiency of the user's search for the text displayed in the search box interactive experience.
  • Fig. 4 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure. As shown in FIG. 4 , the method further includes steps 401 to 403 .
  • step 401 it is judged whether the trigger operation is a preset trigger operation, if yes, go to step 402, if not, return to step 202, and continue to receive the trigger operation.
  • step 402 determine the position of the pressing point corresponding to the trigger operation
  • step 403 the target text is determined in the searchable text according to the position of the pressing point.
  • one or more searchable texts displayed in the search box can be selected through the position of the pressing point corresponding to the trigger operation , to determine the target text.
  • the determining the target text in the searchable text according to the position of the pressing point includes: determining display position ranges corresponding to one or more searchable texts currently displayed in the search box ; determining the target text according to the positional relationship between the pressed point position and the display position range corresponding to the searchable text.
  • the display position ranges corresponding to one or more searchable texts currently displayed in the search box may be determined first;
  • the positional relationship determines the target text, for example, when the position of the pressed point is within the display position range corresponding to the searchable text, the searchable text can be determined as the target text.
  • the target text can also be determined according to the position of the pressing point in the search box.
  • searchable text on the left side in the horizontal direction is determined as the target text; when the pressing point is in the right area of the search box, the searchable text on the right side in the horizontal direction is The search text is determined as the target text and so on.
  • the position of the pressing point is determined by the offset of the pressing point in the horizontal direction and/or the vertical direction; the corresponding display range of the searchable text is determined by the offset range of each searchable text in the horizontal direction and/or Or the offset range in the vertical direction is determined.
  • the position of the pressing point and the display position range corresponding to the searchable text can also be determined in various ways, for example, the position of the pressing point is determined by the offset of the pressing point in the horizontal direction and/or vertical direction, and the possible The corresponding display ranges of the search texts may also be determined by the horizontal offset range and/or the vertical offset range of each searchable text.
  • the offset can be an offset value relative to the search box, or an offset value relative to the boundary of the display interface, as long as the position of the pressed point and the searchable text are offset relative to the same reference position What is determined can be obtained.
  • the one or more searchable texts are displayed horizontally in the search box, the display position range includes a horizontal position range, and the searchable texts are respectively Determining the target text based on the positional relationship between the corresponding display position ranges includes: calculating the horizontal offset of the press point position in the search box; based on the horizontal display position where the horizontal offset is located Scope determines the target text.
  • Fig. 5 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure. It shows an example of how to determine the target text when the position of the pressing point is determined through the offset in the horizontal direction and the display position range corresponding to the searchable text is determined according to the offset range in the horizontal direction, wherein the one or more A searchable text is displayed horizontally in the search box, and the display position range includes a horizontal position range. As shown in FIG. 5 , the method further includes step 501 to step 403 .
  • step 501 the horizontal offset of the press point position in the search box is calculated.
  • step 502 the target text is determined based on the horizontal display position range where the horizontal offset is located.
  • the coordinates (xt, yt) of the pressed point position and the horizontal starting coordinate xs of the search box can be obtained first, and the pressed point is
  • the corresponding horizontal display position ranges of the searchable text can be (bx1, ex1), (bx2, ex2), ..., (bxN , exN), where bx1, bx2, bxN, etc. are the start coordinates of each searchable text horizontal display range, ex1, ex2, exN, etc.
  • the horizontal display range where xpress is located can determine the target text corresponding to the trigger operation.
  • the horizontal display range corresponding to the searchable text is within the search box, and may or may not coincide with the boundary of the search box. For example, if the horizontal display range corresponding to the searchable text closest to the horizontal boundary of the search box The position range is (bx1, ex1), then bx1 and xs can be unequal or equal, and can be set according to actual application requirements.
  • the method for determining the position of the pressing point and the range of display positions corresponding to the searchable text can be set according to the manner in which the searchable text is displayed in the search box. For example, if the search box is a horizontal search box, and the searchable text displayed in it is also displayed in the horizontal direction, then the horizontal offset of the press point position and the corresponding display position range of the searchable text in the horizontal direction can be used to determine the target text, etc. If the searchable text in the search box is not only displayed in the horizontal direction, but also displayed in the vertical direction, it can be based on the horizontal and vertical The target text is determined by corresponding display position ranges in the horizontal direction and the vertical direction.
  • the font and font size of the one or more searchable texts currently displayed in the search box may be Font size, which determines the display position ranges corresponding to one or more searchable texts currently displayed in the search box. That is, if the fonts and font sizes of the searchable text displayed in the search box are different, the display position ranges corresponding to each searchable text may also be different. This enables more accurate targeting of text based on the trigger action.
  • the preset trigger operation may be, for example, a long-press operation or a double-click operation.
  • the preset trigger operation is a long press operation
  • the press point of the long press is the position of the press point corresponding to the trigger operation
  • the position of the click or the position of the second click is used as the position of the pressing point corresponding to the trigger operation.
  • the manner of determining the position of the pressing point corresponding to the trigger operation may also be correspondingly different.
  • the preset trigger operation is a pressure trigger operation
  • determining the target text in the searchable text includes: determining the pressing force corresponding to the trigger operation; according to the Pressing pressure determines the target text in the searchable text.
  • Fig. 6 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure. As shown in FIG. 6 , the method further includes step 601 and step 602 . Wherein, the preset trigger operation is a pressure trigger operation.
  • step 601 the pressing force corresponding to the triggering operation is determined.
  • step 602 the target text is determined in the searchable text according to the pressing force.
  • the method for determining whether the trigger operation is the pressure-triggered operation may be to obtain the pressing force corresponding to the triggering operation, and if the pressing force of the triggering operation is higher than a certain pressure threshold, determine that the triggering operation is the pressure-triggered operation operate.
  • the pressing duration and pressing force of the triggering operation can also be judged at the same time, and when the pressing duration and pressing force of the triggering operation meet preset conditions, the triggering operation is determined to be the pressure triggering operation.
  • the method for determining the pressure-triggered operation is not limited in the present disclosure, and conditions can be set according to actual conditions.
  • the target text in the searchable text can be determined according to the pressing force corresponding to the pressure triggering operation.
  • one or more searchable texts displayed in the search box can be assigned corresponding sorting numbers, and the pressing pressure that can be obtained by the pressure trigger operation can be used to determine the number of pressure intervals that need to be divided according to the number of searchable texts
  • the target text can be determined.
  • the first pressure interval corresponds to the searchable text with the serial number 1
  • the second pressure interval corresponds to the searchable text with the serial number 2
  • the trigger operation input by the user corresponds to
  • the searchable text whose sequence number is 1 can be determined as the target text
  • the sequence number is 2's searchable text is determined as the target text.
  • the user can press any position in the search box to input the pressure trigger operation, and after determining that the trigger operation is a pressure trigger operation, a corresponding searchable text displayed in the search box can be directly determined according to the corresponding pressing force as The target text.
  • a threshold that can determine the trigger operation as a pressure-triggered operation, and keep holding on The case of changing the pressing pressure.
  • the target text obtained by determining the pressing force obtained last before the input is completed is determined as the actual text to be searched, and then the search is performed.
  • the target text determined according to the pressing force of the trigger operation obtained in real time can be displayed in a highlighted manner such as highlighting, so that the user can clearly obtain Know the currently selected searchable text.
  • the method further includes: when the trigger operation is not the preset trigger operation, providing a text input interface on the search page where the search box is located.
  • Fig. 7 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure. As shown in FIG. 7 , the method further includes step 701 .
  • step 701 that is, if the trigger operation is not a preset trigger operation, a text input interface is provided on the page where the search box is located.
  • the text input interface can be a voice input interface, or a text input interface, or both are provided.
  • the voice input interface is used to obtain the keyword that the user needs to search through the user's voice input
  • the text input interface is used to obtain the keyword that the user needs to search through the user's text input.
  • the text input interface can be, for example, a virtual keyboard displayed on the display interface, and the voice input interface can be in the form of a button to enable voice input. After the user clicks the button, the user's voice input is received to determine the keywords to be searched. .
  • the search efficiency with the searchable text displayed in the search box can be improved while ensuring the normal keyword input function of the search box, and the user's search experience is guaranteed.
  • Fig. 8 is a structural block diagram of a text search device according to an exemplary embodiment of the present disclosure.
  • the device includes: a display module 10, configured to display a search box, wherein one or more searchable texts are displayed in the search box; a receiving module 20, configured to receive the user's search query The trigger operation of the box; the determination module 30 is used to determine the target text in the searchable text according to the trigger operation when the trigger operation is a preset trigger operation; the search module 40 is used to search for all The target text is searched, and the search result page of the target text is displayed through the display module.
  • the search results can be displayed to the user more quickly, and the text search function is improved by improving the efficiency of the user's search for the text displayed in the search box interactive experience.
  • Fig. 9 is a structural block diagram of a text search device according to yet another exemplary embodiment of the present disclosure.
  • the determining module 30 includes: a first determining submodule 301, configured to determine the position of the pressing point corresponding to the trigger operation; The target text is determined from the searchable text.
  • the second determination submodule 302 further includes: a text display position range determination submodule, configured to determine the display position ranges corresponding to one or more searchable texts currently displayed in the search box;
  • the target text determination submodule is configured to determine the target text according to the positional relationship between the position of the pressing point and the display position range corresponding to the searchable text.
  • the position of the pressing point is determined by the offset of the pressing point in the horizontal direction and/or the vertical direction; the corresponding display range of the searchable text is determined by the offset range of each searchable text in the horizontal direction and/or Or the offset range in the vertical direction is determined.
  • the one or more searchable texts are displayed horizontally in the search box
  • the range of display positions includes a range of positions in the horizontal direction
  • the target text determining submodule is further configured to: calculate the pressed The horizontal offset of the point position in the search box; the target text is determined based on the horizontal display position range where the horizontal offset is located.
  • the text display position range determining submodule is further configured to: determine one of the currently displayed texts in the search box according to the font and font size of one or more searchable texts currently displayed in the search box or multiple searchable texts corresponding to display location ranges respectively.
  • the preset triggering operation is a long-press operation or a double-click operation.
  • Fig. 10 is a structural block diagram of a text search device according to yet another exemplary embodiment of the present disclosure.
  • the determining module 30 includes: a third determining submodule 303, configured to determine the pressing force corresponding to the trigger operation; The target text is identified in the search text.
  • the device further includes: a processing module, configured to provide a text input interface on the page where the search box is located when the trigger operation is not the preset trigger operation.
  • FIG. 11 it shows a schematic structural diagram of an electronic device 100 suitable for implementing the embodiments of the present disclosure.
  • the terminal equipment in the embodiment of the present disclosure may include but not limited to such as mobile phone, notebook computer, digital broadcast receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia player), vehicle terminal (such as mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers and the like.
  • the electronic device shown in FIG. 11 is only an example, and should not limit the functions and application scope of the embodiments of the present disclosure.
  • an electronic device 1100 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 1101, which may be randomly accessed according to a program stored in a read-only memory (ROM) 1102 or loaded from a storage device 1108. Various appropriate actions and processes are executed by programs in the memory (RAM) 1103 . In the RAM 1103, various programs and data necessary for the operation of the electronic device 1100 are also stored.
  • the processing device 1101, the ROM 1102, and the RAM 1103 are connected to each other through a bus 1104.
  • An input/output (I/O) interface 1105 is also connected to the bus 1104 .
  • the following devices can be connected to the I/O interface 1105: input devices 1106 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibration an output device 1107 such as a computer; a storage device 1108 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1109.
  • the communication means 1109 may allow the electronic device 1100 to perform wireless or wired communication with other devices to exchange data. While FIG. 11 shows electronic device 1100 having various means, it is to be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network via communication means 1109, or from storage means 1108, or from ROM 1102.
  • the processing device 1101 When the computer program is executed by the processing device 1101, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
  • the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer readable signal medium may include a data signal carrying computer readable program code in baseband or propagated as part of a carrier wave. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
  • the client and the server can communicate using any currently known or future network protocols such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can communicate with digital data in any form or medium
  • HTTP HyperText Transfer Protocol
  • the communication eg, communication network
  • Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: displays a search box, wherein one or more available Searching for text; receiving a user's trigger operation on the search box; in the case that the trigger operation is a preset trigger operation, according to the trigger operation, determining the target text in the searchable text; for the target text A search is performed and a search results page for said target text is displayed. .
  • Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as "C" or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer may be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, using an Internet service provider to connected via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service provider for example, using an Internet service provider to connected via the Internet.
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
  • modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the module does not constitute a limitation on the module itself under certain circumstances, for example, the module providing acquisition may also be described as "a module providing a search box".
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs System on Chips
  • CPLD Complex Programmable Logical device
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • Example 1 provides a text search method, the method includes: displaying a search box, wherein one or more searchable texts are displayed in the search box; The trigger operation of the search box; if the trigger operation is a preset trigger operation, according to the trigger operation, determine the target text in the searchable text; search the target text, and display the A search results page that describes the target text.
  • Example 2 provides the method of Example 1.
  • determining the target text in the searchable text includes: determining the position of the pressing point corresponding to the trigger operation ; Determine the target text in the searchable text according to the position of the pressing point.
  • Example 3 provides the method of Example 2, the determining the target text in the searchable text according to the position of the pressing point includes: determining the currently displayed text in the search box The display position ranges corresponding to the one or more searchable texts; the target text is determined according to the positional relationship between the press point position and the display position ranges corresponding to the searchable texts.
  • Example 4 provides the method of Example 3, the location of the pressing point is determined by the offset of the pressing point in the horizontal direction and/or vertical direction; the searchable texts are displayed correspondingly The range is determined by the horizontal offset range and/or the vertical offset range of each searchable text.
  • Example 5 provides the method of Example 3, the one or more searchable texts are displayed horizontally in the search box, the display position range includes a horizontal position range, and
  • the determining the target text according to the positional relationship between the position of the pressing point and the display position range corresponding to the searchable text includes: calculating the horizontal offset of the position of the pressing point in the search box; The range of the horizontal display position where the horizontal offset is located determines the target text.
  • Example 6 provides the method of Example 3, wherein the determining the display position ranges corresponding to one or more searchable texts currently displayed in the search box includes: according to the search The font and font size of the one or more searchable texts currently displayed in the search box determine the display position ranges corresponding to the one or more searchable texts currently displayed in the search box.
  • Example 7 provides the method of any one of Examples 1-6, wherein the preset trigger operation is a long-press operation or a double-click operation.
  • Example 8 provides the method of Example 1, the preset trigger operation is a pressure trigger operation, and according to the trigger operation, determining the target text in the searchable text includes : Determine the pressing force corresponding to the trigger operation; determine the target text in the searchable text according to the pressing force.
  • Example 9 provides the method of any one of Examples 1-6, and the method further includes: when the trigger operation is not the preset trigger operation, at A text input interface is provided on the search page where the search box is located.
  • Example 10 provides a text search device, the device includes: a display module for displaying a search box, wherein one or more searchable Text; a receiving module, configured to receive a user's trigger operation on the search box; a determination module, configured to, in the case of the preset trigger operation, according to the trigger operation, in the searchable text Determining the target text; a search module, configured to search the target text, and display a search result page of the target text through the display module.
  • Example 11 provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of any one of the methods described in Examples 1-9 are implemented .
  • Example 12 provides an electronic device, including: a storage device, on which a computer program is stored; a processing device, configured to execute the computer program in the storage device, to Implement the steps of any one of the methods described in Examples 1-9.

Abstract

The present disclosure relates to a text search method and apparatus, a readable medium, and an electronic device. The method comprises: displaying a search box, wherein one or more searchable texts are displayed in the search box; receiving a trigger operation of a user on the search box; when the trigger operation is a preset trigger operation, determining a target text among searchable texts according to the trigger operation; and searching for the target text, and displaying a search result page of the target text.

Description

文本搜索方法、装置、可读介质及电子设备Text search method, device, readable medium and electronic device
本公开要求于2021年05月17日提交的,申请名称为“文本搜索方法、装置、可读介质及电子设备”的、中国专利申请号为“202110536580.6”的优先权,该中国专利申请的全部内容通过引用结合在本公开中。This disclosure claims the priority of the Chinese patent application number "202110536580.6" filed on May 17, 2021, with the application name "Text Search Method, Device, Readable Medium, and Electronic Equipment". The entirety of the Chinese patent application The contents are incorporated by reference in this disclosure.
技术领域technical field
本公开涉及互联网技术领域,具体地,涉及一种文本搜索方法、装置、可读介质及电子设备。The present disclosure relates to the technical field of the Internet, in particular, to a text search method, device, readable medium and electronic equipment.
背景技术Background technique
当前,大多数资讯类应用软件中,通常都会设置有搜索框用于为用户提供快速检索感兴趣的资讯的接口。而搜索框中经常会显示当前搜索得比较多的热词,比如图1a中所示的移动终端中某应用软件的资讯搜索框A中,在水平方向上并列显示了“可搜索文本1”和“可搜索文本2”等多个可搜索文本,代表当前最热门的搜索关键字,供有兴趣的用户点击查看。但在用户被搜索框中的热词引发兴趣,比如向查看与热词“可搜索文本1”相关的资讯时,需要进行两次点击,即先点击该搜索框A,随后在点击唤出的如图1b所示的搜索页面中再次点击在该搜索框A下展示的热词B“可搜索文本1”这个热词之后,才能真正触发搜索该热词的功能。因此,在当前场景下,用户搜索热词的操作比较繁琐,影响了用户搜索热词的效率。Currently, in most information application software, a search box is usually provided to provide users with an interface for quickly retrieving interesting information. The search box often displays hot words that are currently being searched for more frequently. For example, in the information search box A of an application software in a mobile terminal shown in FIG. 1a, "searchable text 1" and Multiple searchable texts such as "Searchable Text 2" represent the most popular search keywords at present, and are available for interested users to click to view. However, when the user is interested in the hot words in the search box, for example, to view information related to the hot word "searchable text 1", two clicks are required, that is, first click on the search box A, and then click on the evoked text On the search page as shown in FIG. 1 b , the hot word B displayed under the search box A, the hot word "searchable text 1", is clicked again, and the function of searching for the hot word can be actually triggered. Therefore, in the current scenario, the operation of users searching for hot words is cumbersome, which affects the efficiency of users searching for hot words.
发明内容Contents of the invention
提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。This Summary is provided to introduce a simplified form of concepts that are described in detail later in the Detailed Description. This summary of the invention is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.
第一方面,本公开提供一种文本搜索方法,所述方法包括:显示搜索框,其中,所述搜索框中显示有一个或多个可搜索文本;接收用户对所述搜索框的触发操作;在所述触发操作为预设触发操作的情况下,根据所述触发操作,在所述可搜索文本中确定目标文本;对所述目标文本进行搜索,并显示所述目标文本的搜索结果页。In a first aspect, the present disclosure provides a text search method, the method comprising: displaying a search box, wherein one or more searchable texts are displayed in the search box; receiving a user's trigger operation on the search box; If the trigger operation is a preset trigger operation, according to the trigger operation, the target text is determined in the searchable text; the target text is searched, and a search result page of the target text is displayed.
第二方面,本公开提供一种文本搜索装置,所述装置包括:In a second aspect, the present disclosure provides a text search device, the device comprising:
显示模块,用于显示搜索框,其中,所述搜索框中显示有一个或多个可搜索文本;A display module, configured to display a search box, wherein one or more searchable texts are displayed in the search box;
接收模块,用于接收用户对所述搜索框的触发操作;A receiving module, configured to receive a user's trigger operation on the search box;
确定模块,用于在所述触发操作为预设触发操作的情况下,根据所述触发操作,在所述可搜索文本中确定目标文本;A determination module, configured to determine target text in the searchable text according to the trigger operation when the trigger operation is a preset trigger operation;
搜索模块,用于对所述目标文本进行搜索,并显示所述目标文本的搜索结果页。A search module, configured to search the target text and display a search result page of the target text.
第三方面,本公开提供一种计算机可读介质,其上存储有计算机程序,该程序被处 理装置执行时实现第一方面中所述方法的步骤。In a third aspect, the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the method described in the first aspect are realized.
第四方面,本公开提供一种电子设备,包括:In a fourth aspect, the present disclosure provides an electronic device, including:
存储装置,其上存储有计算机程序;a storage device on which a computer program is stored;
处理装置,用于执行所述存储装置中的所述计算机程序,以实现第一方面中所述方法的步骤。A processing device configured to execute the computer program in the storage device to implement the steps of the method in the first aspect.
通过上述技术方案,能够在用户对搜索框中显示的可搜索文本感兴趣时,更加快捷地向用户展示搜索结果,通过提高用户对搜索框中显示的文本进行搜索的效率,改善了文本搜索功能的交互体验。Through the above technical solution, when the user is interested in the searchable text displayed in the search box, the search results can be displayed to the user more quickly, and the text search function is improved by improving the efficiency of the user's search for the text displayed in the search box interactive experience.
本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。Other features and advantages of the present disclosure will be described in detail in the detailed description that follows.
附图说明Description of drawings
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。在附图中:The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale. In the attached picture:
图1a和图1b是根据现有技术分别示出的用于文本搜索的显示界面示意图。Fig. 1a and Fig. 1b are schematic diagrams of display interfaces for text search respectively shown according to the prior art.
图2是根据本公开一示例性实施例示出的一种文本搜索方法的流程图。Fig. 2 is a flowchart showing a text search method according to an exemplary embodiment of the present disclosure.
图3是根据本公开又一示例性实施例示出的一种文本搜索方法中显示搜索结果的显示界面示意图。Fig. 3 is a schematic diagram of a display interface for displaying search results in a text search method according to yet another exemplary embodiment of the present disclosure.
图4是根据本公开又一示例性实施例示出的一种文本搜索方法的流程图。Fig. 4 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure.
图5是根据本公开又一示例性实施例示出的一种文本搜索方法的流程图。Fig. 5 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure.
图6是根据本公开又一示例性实施例示出的一种文本搜索方法的流程图。Fig. 6 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure.
图7是根据本公开又一示例性实施例示出的一种文本搜索方法的流程图。Fig. 7 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure.
图8是根据本公开一示例性实施例示出的一种文本搜索装置的结构框图。Fig. 8 is a structural block diagram of a text search device according to an exemplary embodiment of the present disclosure.
图9是根据本公开又一示例性实施例示出的一种文本搜索装置的结构框图。Fig. 9 is a structural block diagram of a text search device according to yet another exemplary embodiment of the present disclosure.
图10是根据本公开又一示例性实施例示出的一种文本搜索装置的结构框图。Fig. 10 is a structural block diagram of a text search device according to yet another exemplary embodiment of the present disclosure.
图11示出了适于用来实现本公开实施例的电子设备的结构示意图。FIG. 11 shows a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the drawings, it should be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein; A more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for exemplary purposes only, and are not intended to limit the protection scope of the present disclosure.
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本 公开的范围在此方面不受限制。It should be understood that the various steps described in the method implementations of the present disclosure may be executed in different orders, and/or executed in parallel. Additionally, method embodiments may include additional steps and/or omit performing illustrated steps. The scope of the present disclosure is not limited in this respect.
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。As used herein, the term "comprise" and its variations are open-ended, ie "including but not limited to". The term "based on" is "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one further embodiment"; the term "some embodiments" means "at least some embodiments." Relevant definitions of other terms will be given in the description below.
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。It should be noted that concepts such as "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the sequence of functions performed by these devices, modules or units or interdependence.
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that unless the context clearly indicates otherwise, it should be understood as "one or more" multiple".
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。The names of messages or information exchanged between multiple devices in the embodiments of the present disclosure are used for illustrative purposes only, and are not used to limit the scope of these messages or information.
图2是根据本公开一示例性实施例示出的一种文本搜索方法的流程图。如图2所示,所述方法包括步骤201至步骤204。Fig. 2 is a flowchart showing a text search method according to an exemplary embodiment of the present disclosure. As shown in FIG. 2 , the method includes step 201 to step 204 .
在步骤201中,显示搜索框,其中,所述搜索框中显示有一个或多个可搜索文本。In step 201, a search box is displayed, wherein one or more searchable texts are displayed in the search box.
该搜索框可以被显示在任意形式的智能终端设备的显示界面中,例如移动终端的显示界面。该搜索框用于用户输入关键词以对相关资讯进行搜索,用户通过语音或者文字输入的关键词会在搜索框中显示出来,通过预置的搜索按钮就可以根据该关键词在库中进行搜索。该搜索框可以是例如在新闻资讯应用软件中的新闻资讯搜索框,也可以是例如短视频应用软件中的短视频资讯搜索框。用户在打开例如新闻资讯类应用软件时,该新闻资讯类应用软件就可以在其显示界面中提供该搜索框,用户可以通过该搜索框输入关键词以进行新闻资讯的搜索。The search box can be displayed on any display interface of an intelligent terminal device, such as a display interface of a mobile terminal. The search box is used for the user to input keywords to search for relevant information. The keywords entered by the user through voice or text will be displayed in the search box, and the search button can be used to search in the library according to the keywords . The search box may be, for example, a news information search box in news information application software, or may be, for example, a short video information search box in short video application software. When the user opens, for example, news and information application software, the news and information application software can provide the search box in its display interface, and the user can input keywords through the search box to search for news and information.
为了更加直观地为用户推送热点资讯,该搜索框中可以显示被搜索次数较多的热点关键词,也即该可搜索文本,从而显著且直观地推送当前热点,如图1a中的搜索框A所示。在该搜索框中显示该可搜索文本的方式可以为多种,例如,可以如图1a中所示,将两个文本作为一组,按照固定顺序轮流滚动地显示在搜索框中,也可以单独将每个文本按照固定顺序轮流滚动地显示在搜索框中,或者直接将当前热度最高的文本显示在该搜索框中等等。本公开中对该搜索框中显示该可选择文本的方式不进行限定。In order to push hotspot information for users more intuitively, the search box can display hotspot keywords that have been searched more times, that is, the searchable text, so as to push the current hotspot significantly and intuitively, as shown in the search box A in Figure 1a shown. There can be many ways to display the searchable text in the search box. For example, as shown in FIG. Each text is scrolled and displayed in the search box in a fixed order in turn, or the current most popular text is directly displayed in the search box, etc. The method of displaying the selectable text in the search box is not limited in the present disclosure.
在步骤202中,接收用户对所述搜索框的触发操作。In step 202, a user's trigger operation on the search box is received.
该触发操作可以根据该智能终端设备的不同而不同,例如,在该智能终端设备的显示屏不为触屏显示屏的情况下,该触发操作可以是通过用户操作鼠标、键盘等输入设备所输入的操作,例如鼠标左键双击、左键单击等;在该智能终端设备的显示屏为触屏显 示屏的情况下,该触发操作可以是用户直接通过触屏输入的点击操作、双击操作、长按操作等等。The trigger operation can be different according to the smart terminal device. For example, if the display screen of the smart terminal device is not a touch screen display screen, the trigger operation can be input by the user operating an input device such as a mouse or a keyboard. operations, such as double-clicking the left button of the mouse, clicking the left button, etc.; when the display screen of the smart terminal device is a touch screen display screen, the triggering operation can be a click operation, a double-click operation, or a user input directly through the touch screen. Long press operation and so on.
在接收到该触发操作的情况下,便可以对该触发操作进行识别。When the trigger operation is received, the trigger operation can be identified.
在步骤203中,在所述触发操作为预设触发操作的情况下,根据所述触发操作,在所述可搜索文本中确定目标文本。In step 203, if the trigger operation is a preset trigger operation, the target text is determined in the searchable text according to the trigger operation.
在一些实施例中,该预设触发操作可以为长按操作或者双击操作。In some embodiments, the preset trigger operation may be a long-press operation or a double-click operation.
在该触发操作为该预设触发操作的情况下,在该搜索框中显示的可搜索文本中确定目标文本。在该搜索框中仅显示有一个可搜索文本的情况下,可以将该搜索框中显示的可搜索文本确定为该目标文本;在该搜索框中显示有如图1a中所示的两个可搜索文本的情况下,则可以根据该触发操作来确定其中一个为目标文本,例如,在该触发操作为长按操作的情况下,可以将该长按操作的按压点位置对应的可搜索文本确定为该目标文本。If the trigger operation is the preset trigger operation, the target text is determined from the searchable text displayed in the search box. In the case where only one searchable text is displayed in the search box, the searchable text displayed in the search box can be determined as the target text; two searchable texts as shown in Figure 1a are displayed in the search box In the case of text, one of them can be determined as the target text according to the trigger operation. For example, if the trigger operation is a long press operation, the searchable text corresponding to the press point position of the long press operation can be determined as The target text.
在步骤204中,对所述目标文本进行搜索,并显示所述目标文本的搜索结果页。In step 204, the target text is searched, and a search result page of the target text is displayed.
在确定了目标文本的情况下,可以直接对该目标文本进行搜索,无需用户再重新在搜索框中输入关键词,并触发搜索按钮进行搜索,也无需按照如图1b中所示,二次点击显示在搜索框下方的文本以进行文本搜索。When the target text is determined, the target text can be directly searched without the user needing to re-enter keywords in the search box and trigger the search button to search, and there is no need to click twice as shown in Figure 1b The text displayed below the search box for text searches.
下面举例对本公开进行说明。The following examples illustrate the present disclosure.
若搜索框如图1a中所示,被提供在带有触屏功能的移动终端的某新闻资讯应用软件的新闻资讯显示界面中,且搜索框A中当前显示的是“可搜索文本1”和“可搜索文本2”两个可搜索文本,预设该预设触发操作为长按操作,长按时长为不小于1s。若此时接收到用户对该搜索框A的触发操作,对该触发操作进行识别后,该触发操作满足该预设触发操作,则根据该触发操作在该搜索框A中的两个可搜索文本中确定目标文本;若根据该触发操作确定对应的可搜索文本为“可搜索文本1”,则可将该可搜索文本1确定为目标文本,直接对该目标文本进行搜索,并显示如图3所示的搜索结果页。用户便可以在输入该触发操作之后,直接对目标文本的搜索结果进行查看。If the search box, as shown in Figure 1a, is provided in the news information display interface of a news information application software of a mobile terminal with a touch screen function, and what is currently displayed in the search box A is "searchable text 1" and "Searchable text 2" has two searchable texts, and the default trigger operation is a long press operation, and the long press time is not less than 1s. If the trigger operation of the search box A by the user is received at this time, and after the trigger operation is identified, the trigger operation satisfies the preset trigger operation, and the two searchable texts in the search box A according to the trigger operation Determine the target text; if the corresponding searchable text is determined to be "searchable text 1" according to the trigger operation, then the searchable text 1 can be determined as the target text, and the target text can be searched directly, and it will be displayed as shown in Figure 3 The search results page shown. The user can directly view the search results of the target text after inputting the trigger operation.
通过上述技术方案,能够在用户对搜索框中显示的可搜索文本感兴趣时,更加快捷地向用户展示搜索结果,通过提高用户对搜索框中显示的文本进行搜索的效率,改善了文本搜索功能的交互体验。Through the above technical solution, when the user is interested in the searchable text displayed in the search box, the search results can be displayed to the user more quickly, and the text search function is improved by improving the efficiency of the user's search for the text displayed in the search box interactive experience.
图4是根据本公开又一示例性实施例示出的一种文本搜索方法的流程图。如图4所示,所述方法还包括步骤401至步骤403。Fig. 4 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure. As shown in FIG. 4 , the method further includes steps 401 to 403 .
在步骤401中,判断所述触发操作是否为预设触发操作,若是,则转至步骤402,若否,则返回步骤202,继续对触发操作进行接收。In step 401, it is judged whether the trigger operation is a preset trigger operation, if yes, go to step 402, if not, return to step 202, and continue to receive the trigger operation.
在步骤402中,确定所述触发操作对应的按压点位置;In step 402, determine the position of the pressing point corresponding to the trigger operation;
在步骤403中,根据所述按压点位置在所述可搜索文本中确定所述目标文本。In step 403, the target text is determined in the searchable text according to the position of the pressing point.
也即,在确定用户输入的触发操作为该预设触发操作的情况下,可以通过所述触发操作对应的按压点位置来在该搜索框中所显示的一个或多个可搜索文本中进行选择,以确定该目标文本。That is, when it is determined that the trigger operation input by the user is the preset trigger operation, one or more searchable texts displayed in the search box can be selected through the position of the pressing point corresponding to the trigger operation , to determine the target text.
在一些实施例中,所述根据所述按压点位置在所述可搜索文本中确定所述目标文本包括:确定所述搜索框中当前显示的一个或多个可搜索文本分别对应的显示位置范围;根据所述按压点位置和所述可搜索文本分别对应的显示位置范围之间的位置关系确定所述目标文本。In some embodiments, the determining the target text in the searchable text according to the position of the pressing point includes: determining display position ranges corresponding to one or more searchable texts currently displayed in the search box ; determining the target text according to the positional relationship between the pressed point position and the display position range corresponding to the searchable text.
例如,可以先分别确定所述搜索框中当前显示的一个或多个可搜索文本分别对应的显示位置范围;然后根据所述按压点位置和所述可搜索文本分别对应的显示位置范围之间的位置关系确定所述目标文本,例如可以在该按压点位置在该可搜索文本对应的显示位置范围之内时,将该可搜索文本确定为该目标文本。或者,也可以根据该按压点位置在该搜索框中所在的位置来确定该目标文本,例如,在该搜索框中在水平方向上依次显示有两个可搜索文本的情况下,可以设置为在该按压点位置处于搜索框左侧区域内时,将水平方向上左侧的可搜索文本确定为该目标文本,在该按压点位置处于搜索框右侧区域时,将水平方向上右侧的可搜索文本确定为该目标文本等等。For example, the display position ranges corresponding to one or more searchable texts currently displayed in the search box may be determined first; The positional relationship determines the target text, for example, when the position of the pressed point is within the display position range corresponding to the searchable text, the searchable text can be determined as the target text. Alternatively, the target text can also be determined according to the position of the pressing point in the search box. For example, in the case where two searchable texts are sequentially displayed in the horizontal direction in the search box, it can be set as When the pressing point is in the left area of the search box, the searchable text on the left side in the horizontal direction is determined as the target text; when the pressing point is in the right area of the search box, the searchable text on the right side in the horizontal direction is The search text is determined as the target text and so on.
在一些实施例中,所述按压点位置通过按压点在水平方向和/或垂直方向的偏移确定;所述可搜索文本分别对应的显示范围通过各个可搜索文本水平方向的偏移范围和/或垂直方向的偏移范围确定。In some embodiments, the position of the pressing point is determined by the offset of the pressing point in the horizontal direction and/or the vertical direction; the corresponding display range of the searchable text is determined by the offset range of each searchable text in the horizontal direction and/or Or the offset range in the vertical direction is determined.
另外,该按压点位置和该可搜索文本对应的显示位置范围还可以通过多种方式确定,例如,所述按压点位置通过按压点在水平方向和/或垂直方向的偏移确定,所述可搜索文本分别对应的显示范围也可以通过各个可搜索文本水平方向的偏移范围和/或垂直方向的偏移范围确定。该偏移可以是相对于该搜索框的偏移值,也可以是相对于显示界面边界的偏移值,只要该按压点位置和该可搜索文本所对应的而偏移时相对于同一参考位置所确定得到的即可。In addition, the position of the pressing point and the display position range corresponding to the searchable text can also be determined in various ways, for example, the position of the pressing point is determined by the offset of the pressing point in the horizontal direction and/or vertical direction, and the possible The corresponding display ranges of the search texts may also be determined by the horizontal offset range and/or the vertical offset range of each searchable text. The offset can be an offset value relative to the search box, or an offset value relative to the boundary of the display interface, as long as the position of the pressed point and the searchable text are offset relative to the same reference position What is determined can be obtained.
在一些实施例中,所述一个或多个可搜索文本在所述搜索框中水平显示,所述显示位置范围包括水平方向位置范围,所述根据所述按压点位置和所述可搜索文本分别对应的显示位置范围之间的位置关系确定所述目标文本包括:计算所述按压点位置在所述搜索框中的水平方向偏移;基于所述水平方向偏移所在的所述水平方向显示位置范围确定所述目标文本。In some embodiments, the one or more searchable texts are displayed horizontally in the search box, the display position range includes a horizontal position range, and the searchable texts are respectively Determining the target text based on the positional relationship between the corresponding display position ranges includes: calculating the horizontal offset of the press point position in the search box; based on the horizontal display position where the horizontal offset is located Scope determines the target text.
图5是根据本公开又一示例性实施例示出的一种文本搜索方法的流程图。其中示出 了通过水平方向的偏移确定该按压点位置以及根据水平方向的偏移范围确定所述可搜索文本对应的显示位置范围时,如何确定目标文本的示例,其中,所述一个或多个可搜索文本在所述搜索框中水平显示,所述显示位置范围包括水平方向位置范围。如图5所示,所述方法还包括步骤501至步骤403。Fig. 5 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure. It shows an example of how to determine the target text when the position of the pressing point is determined through the offset in the horizontal direction and the display position range corresponding to the searchable text is determined according to the offset range in the horizontal direction, wherein the one or more A searchable text is displayed horizontally in the search box, and the display position range includes a horizontal position range. As shown in FIG. 5 , the method further includes step 501 to step 403 .
在步骤501中,计算所述按压点位置在所述搜索框中的水平方向偏移。In step 501, the horizontal offset of the press point position in the search box is calculated.
在步骤502中,基于所述水平方向偏移所在的所述水平方向显示位置范围确定所述目标文本。In step 502, the target text is determined based on the horizontal display position range where the horizontal offset is located.
在计算该按压点位置在该搜索框中的水平方向偏移时,可以先获取该按压点位置的坐标(xt,yt),以及搜索框的水平方向的起始坐标xs,该按压点为之在该搜索框中的水平方向偏移则可以为xpress=xt-xs;该可搜索文本的对应的水平方向显示位置范围可以分别为(bx1,ex1),(bx2,ex2),…,(bxN,exN),其中bx1、bx2、bxN等为各可搜索文本水平方向显示范围的起始坐标,ex1、ex2、exN等为各可搜索文本水平方向显示范围的结束坐标,判断该水平方向偏移xpress所在的水平方向显示范围,即可确定该触发操作对应的目标文本。其中,可搜索文本对应的水平方向显示范围在该搜索框内,且可以与该搜索框的边界重合也可以不重合,例如,若最靠近该搜索框水平边界的可搜索文本对应的水平方向显示位置范围为(bx1,ex1),则该bx1可以与xs不相等也可以相等,可以根据实际应用的需求进行设置。When calculating the horizontal offset of the pressed point position in the search box, the coordinates (xt, yt) of the pressed point position and the horizontal starting coordinate xs of the search box can be obtained first, and the pressed point is The horizontal offset in the search box can be xpress=xt-xs; the corresponding horizontal display position ranges of the searchable text can be (bx1, ex1), (bx2, ex2), ..., (bxN , exN), where bx1, bx2, bxN, etc. are the start coordinates of each searchable text horizontal display range, ex1, ex2, exN, etc. are the end coordinates of each searchable text horizontal display range, and determine the horizontal offset The horizontal display range where xpress is located can determine the target text corresponding to the trigger operation. Wherein, the horizontal display range corresponding to the searchable text is within the search box, and may or may not coincide with the boundary of the search box. For example, if the horizontal display range corresponding to the searchable text closest to the horizontal boundary of the search box The position range is (bx1, ex1), then bx1 and xs can be unequal or equal, and can be set according to actual application requirements.
具体的,确定该按压点位置和该可搜索文本对应的显示位置范围的方法可以根据该搜索框中显示该可搜索文本的方式来进行设置。例如,在该搜索框为水平搜索框,其中显示的可搜索文本也按照水平方向进行显示,则可以根据该按压点位置在水平方向的偏移和该可搜索文本在水平方向对应的显示位置范围来确定该目标文本等。若该搜索框中的可搜索文本除了按照水平方向进行显示的同时,也按照垂直方向进行显示,则可以同时根据该按压点位置在水平方向和垂直方向上的偏移,以及该可搜索文本在水平方向和垂直方向上分别对应的显示位置范围来确定该目标文本。Specifically, the method for determining the position of the pressing point and the range of display positions corresponding to the searchable text can be set according to the manner in which the searchable text is displayed in the search box. For example, if the search box is a horizontal search box, and the searchable text displayed in it is also displayed in the horizontal direction, then the horizontal offset of the press point position and the corresponding display position range of the searchable text in the horizontal direction can be used to determine the target text, etc. If the searchable text in the search box is not only displayed in the horizontal direction, but also displayed in the vertical direction, it can be based on the horizontal and vertical The target text is determined by corresponding display position ranges in the horizontal direction and the vertical direction.
在一些实施例中,确定所述搜索框中当前显示的一个或多个可搜索文本分别对应的显示位置范围时,可以根据所述搜索框中当前显示的一个或多个可搜索文本的字体和字号,确定所述搜索框中当前显示的一个或多个可搜索文本分别对应的显示位置范围。也即,在该搜索框中所显示的可搜索文本的字体和字号不同的情况下,各个可搜索文本对应的显示位置范围也可能会不相同。这样能够更加准确地根据触发操作确定目标文本。In some embodiments, when determining the display position ranges corresponding to the one or more searchable texts currently displayed in the search box, the font and font size of the one or more searchable texts currently displayed in the search box may be Font size, which determines the display position ranges corresponding to one or more searchable texts currently displayed in the search box. That is, if the fonts and font sizes of the searchable text displayed in the search box are different, the display position ranges corresponding to each searchable text may also be different. This enables more accurate targeting of text based on the trigger action.
该预设触发操作可以是例如长按操作或双击操作等。在该预设触发操作为长按操作的情况下,长按的按压点即为该触发操作对应的按压点位置,而在该预设触发操作为双击操作的情况下,则可以选择第一次点击的位置或者第二次点击的位置作为该触发操作 对应的按压点位置。根据该预设触发操作设置的不同,确定该触发操作对应的按压点位置的方式也可以相应不同。The preset trigger operation may be, for example, a long-press operation or a double-click operation. In the case that the preset trigger operation is a long press operation, the press point of the long press is the position of the press point corresponding to the trigger operation, and in the case that the preset trigger operation is a double-click operation, you can select the first time The position of the click or the position of the second click is used as the position of the pressing point corresponding to the trigger operation. According to different settings of the preset trigger operation, the manner of determining the position of the pressing point corresponding to the trigger operation may also be correspondingly different.
在一些实施例中,所述预设触发操作为压力触发操作,所述根据所述触发操作,在所述可搜索文本中确定目标文本包括:确定所述触发操作对应的按压力度;根据所述按压力度在所述可搜索文本中确定所述目标文本。In some embodiments, the preset trigger operation is a pressure trigger operation, and according to the trigger operation, determining the target text in the searchable text includes: determining the pressing force corresponding to the trigger operation; according to the Pressing pressure determines the target text in the searchable text.
图6是根据本公开又一示例性实施例示出的一种文本搜索方法的流程图。如图6所示,所述方法还包括步骤601和步骤602。其中,所述预设触发操作为压力触发操作。Fig. 6 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure. As shown in FIG. 6 , the method further includes step 601 and step 602 . Wherein, the preset trigger operation is a pressure trigger operation.
在步骤601中,确定所述触发操作对应的按压力度。In step 601, the pressing force corresponding to the triggering operation is determined.
在步骤602中,根据所述按压力度在所述可搜索文本中确定所述目标文本。In step 602, the target text is determined in the searchable text according to the pressing force.
确定该触发操作是否为该压力触发操作的方法可以为获取该触发操作对应的按压力度,在所述触发操作的按压力度高于某一压力阈值的情况下,确定该触发操作为所述压力触发操作。或者,也可以为同时判断该触发操作的按压时长和按压力度,当该触发操作的按压时长和按压力度都满足预设条件的情况下,确定该触发操作为该压力触发操作。本公开中对该压力触发操作的确定方法不做限制,可以根据实际情况来进行条件设置。The method for determining whether the trigger operation is the pressure-triggered operation may be to obtain the pressing force corresponding to the triggering operation, and if the pressing force of the triggering operation is higher than a certain pressure threshold, determine that the triggering operation is the pressure-triggered operation operate. Alternatively, the pressing duration and pressing force of the triggering operation can also be judged at the same time, and when the pressing duration and pressing force of the triggering operation meet preset conditions, the triggering operation is determined to be the pressure triggering operation. The method for determining the pressure-triggered operation is not limited in the present disclosure, and conditions can be set according to actual conditions.
在确定该预设触发操作为该压力触发操作之后,则就可以根据该压力触发操作对应的按压力度来在该可搜索文本中确定那个该目标文本。例如,可以对搜索框中显示的一个或多个可搜索文本分配相应的排序序号,并对压力触发操作能够获取到的按压力度根据该可搜索文本的个数来确定需要划分的压力区间的个数,将各个压力区间与各个可搜索文本对应的排序序号进行对应,进而,根据用户所输入的触发操作对应的按压力度所在的压力区间,即可确定得到该目标文本。After determining that the preset triggering operation is the pressure triggering operation, the target text in the searchable text can be determined according to the pressing force corresponding to the pressure triggering operation. For example, one or more searchable texts displayed in the search box can be assigned corresponding sorting numbers, and the pressing pressure that can be obtained by the pressure trigger operation can be used to determine the number of pressure intervals that need to be divided according to the number of searchable texts Corresponding each pressure interval with the sorting sequence number corresponding to each searchable text, and then, according to the pressure interval where the pressing pressure corresponding to the trigger operation input by the user is located, the target text can be determined.
下面通过一个实例来描述根据按压力度确定目标文本的方案。在搜索框中显示了两个可搜索文本的情况下,令其中一个可搜索文本对应的序号为1,另一个可搜索文本对应的序号为2,然后可以通过一个分区阈值将该压力触发操作对应的按压力度划分为压力值连续的两个压力区间,第一个压力区间对应序号为1的可搜索文本,第二个压力区间对应序号为2的可搜索文本;在用户输入的该触发操作对应的按压力度处于第一个压力区间的情况下,可以将序号为1的可搜索文本确定为该目标文本,在该触发操作对应的按压力度处于第二个压力区间的情况下,可以将序号为2的可搜索文本确定为该目标文本。An example is used below to describe the scheme of determining the target text according to the pressing pressure. In the case where two searchable texts are displayed in the search box, let the serial number corresponding to one of the searchable texts be 1, and the serial number corresponding to the other searchable text be 2, and then use a partition threshold to correspond to the pressure trigger operation According to the pressure degree, it is divided into two pressure intervals with continuous pressure values. The first pressure interval corresponds to the searchable text with the serial number 1, and the second pressure interval corresponds to the searchable text with the serial number 2; the trigger operation input by the user corresponds to In the case that the pressing pressure of is in the first pressure range, the searchable text whose sequence number is 1 can be determined as the target text; in the case that the pressing pressure corresponding to the trigger operation is in the second pressure range, the sequence number is 2's searchable text is determined as the target text.
用户可以在按压该搜索框中的任意位置输入该压力触发操作,在判定该触发操作为压力触发操作之后即可直接根据相应的按压力度来将搜索框中显示的一个对应的可搜索文本确定为该目标文本。其中,用户在输入该压力触发操作之后,可能存在持续输入 该触发操作的情况,也即用户可以在按压该搜索框并达到能够将该触发操作判定为压力触发操作的阈值之后,在保持不松手的情况下改变按压力度的情况。因此,在根据该触发操作对应的按压力度确定目标文本之后,在对该目标文本执行搜索之前,还需要判断该触发操作是否已经输入结束,也即用户是否已经松手,结束了该触发操作的输入。判定该触发操作已经输入结束的情况下,再将输入结束之前最后获取到的按压力度确定得到的目标文本确定为实际需要进行搜索的文本进而进行搜索。另外,再该触发操作并未输入结束的情况下,可以通过高亮显示等突出显示的方式对根据实时获取到的触发操作的按压力度确定得到的目标文本进行显示,以便于用户能够清楚地得知当前选中地可搜索文本。The user can press any position in the search box to input the pressure trigger operation, and after determining that the trigger operation is a pressure trigger operation, a corresponding searchable text displayed in the search box can be directly determined according to the corresponding pressing force as The target text. Wherein, after the user inputs the pressure-triggered operation, there may be situations in which the user continues to input the trigger operation, that is, the user may press the search box and reach a threshold that can determine the trigger operation as a pressure-triggered operation, and keep holding on The case of changing the pressing pressure. Therefore, after determining the target text according to the pressing force corresponding to the trigger operation, before performing a search on the target text, it is necessary to determine whether the input of the trigger operation has been completed, that is, whether the user has let go of the input of the trigger operation . When it is determined that the input of the trigger operation has been completed, the target text obtained by determining the pressing force obtained last before the input is completed is determined as the actual text to be searched, and then the search is performed. In addition, when the trigger operation has not been input, the target text determined according to the pressing force of the trigger operation obtained in real time can be displayed in a highlighted manner such as highlighting, so that the user can clearly obtain Know the currently selected searchable text.
在一些实施例中,所述方法还包括:在所述触发操作不为所述预设触发操作的情况下,在所述搜索框所在的搜索页面中提供文本输入接口。In some embodiments, the method further includes: when the trigger operation is not the preset trigger operation, providing a text input interface on the search page where the search box is located.
图7是根据本公开又一示例性实施例示出的一种文本搜索方法的流程图。如图7所示,所述方法还包括步骤701。Fig. 7 is a flow chart showing a text search method according to yet another exemplary embodiment of the present disclosure. As shown in FIG. 7 , the method further includes step 701 .
在步骤701中,也即在所述触发操作不为预设触发操作的情况下,在所述搜索框所在的页面中提供文本输入接口。In step 701, that is, if the trigger operation is not a preset trigger operation, a text input interface is provided on the page where the search box is located.
该文本输入接口可以为语音输入接口,也可以为文字输入接口,或者二者都被提供。语音输入接口用于通过用户的语音输入得到用户所需要搜索的关键词,文字输入接口即用于通过用户的文字输入得到用户所需要搜索的关键词。该文字输入接口可以为例如显示在显示界面上的虚拟键盘,语音输入接口的形式则可以为开启语音输入的按钮,在用户点击该按钮之后,接收用户的语音输入,以确定需要搜索的关键词。The text input interface can be a voice input interface, or a text input interface, or both are provided. The voice input interface is used to obtain the keyword that the user needs to search through the user's voice input, and the text input interface is used to obtain the keyword that the user needs to search through the user's text input. The text input interface can be, for example, a virtual keyboard displayed on the display interface, and the voice input interface can be in the form of a button to enable voice input. After the user clicks the button, the user's voice input is received to determine the keywords to be searched. .
通过上述技术方法,能够在保证搜索框正常关键词输入功能的情况下提高与搜索框中显示的可搜索文本的搜索效率,保障了用户的搜索体验。Through the above technical method, the search efficiency with the searchable text displayed in the search box can be improved while ensuring the normal keyword input function of the search box, and the user's search experience is guaranteed.
图8是根据本公开一示例性实施例示出的一种文本搜索装置的结构框图。如图8所示,所述装置包括:显示模块10,用于显示搜索框,其中,所述搜索框中显示有一个或多个可搜索文本;接收模块20,用于接收用户对所述搜索框的触发操作;确定模块30,用于在所述触发操作为预设触发操作的情况下,根据所述触发操作,在所述可搜索文本中确定目标文本;搜索模块40,用于对所述目标文本进行搜索,并通过所述显示模块显示所述目标文本的搜索结果页。Fig. 8 is a structural block diagram of a text search device according to an exemplary embodiment of the present disclosure. As shown in FIG. 8 , the device includes: a display module 10, configured to display a search box, wherein one or more searchable texts are displayed in the search box; a receiving module 20, configured to receive the user's search query The trigger operation of the box; the determination module 30 is used to determine the target text in the searchable text according to the trigger operation when the trigger operation is a preset trigger operation; the search module 40 is used to search for all The target text is searched, and the search result page of the target text is displayed through the display module.
通过上述技术方案,能够在用户对搜索框中显示的可搜索文本感兴趣时,更加快捷地向用户展示搜索结果,通过提高用户对搜索框中显示的文本进行搜索的效率,改善了文本搜索功能的交互体验。Through the above technical solution, when the user is interested in the searchable text displayed in the search box, the search results can be displayed to the user more quickly, and the text search function is improved by improving the efficiency of the user's search for the text displayed in the search box interactive experience.
图9是根据本公开又一示例性实施例示出的一种文本搜索装置的结构框图。如图9 所示,所述确定模块30包括:第一确定子模块301,用于确定所述触发操作对应的按压点位置;第二确定子模块302,用于根据所述按压点位置在所述可搜索文本中确定所述目标文本。Fig. 9 is a structural block diagram of a text search device according to yet another exemplary embodiment of the present disclosure. As shown in FIG. 9 , the determining module 30 includes: a first determining submodule 301, configured to determine the position of the pressing point corresponding to the trigger operation; The target text is determined from the searchable text.
在一些实施例中,所述第二确定子模块302还包括:文本显示位置范围确定子模块,用于确定所述搜索框中当前显示的一个或多个可搜索文本分别对应的显示位置范围;目标文本确定子模块,用于根据所述按压点位置和所述可搜索文本分别对应的显示位置范围之间的位置关系确定所述目标文本。In some embodiments, the second determination submodule 302 further includes: a text display position range determination submodule, configured to determine the display position ranges corresponding to one or more searchable texts currently displayed in the search box; The target text determination submodule is configured to determine the target text according to the positional relationship between the position of the pressing point and the display position range corresponding to the searchable text.
在一些实施例中,所述按压点位置通过按压点在水平方向和/或垂直方向的偏移确定;所述可搜索文本分别对应的显示范围通过各个可搜索文本水平方向的偏移范围和/或垂直方向的偏移范围确定。In some embodiments, the position of the pressing point is determined by the offset of the pressing point in the horizontal direction and/or the vertical direction; the corresponding display range of the searchable text is determined by the offset range of each searchable text in the horizontal direction and/or Or the offset range in the vertical direction is determined.
在一些实施例中,所述一个或多个可搜索文本在所述搜索框中水平显示,所述显示位置范围包括水平方向位置范围,所述目标文本确定子模块还用于:计算所述按压点位置在所述搜索框中的水平方向偏移;基于所述水平方向偏移所在的所述水平方向显示位置范围确定所述目标文本。In some embodiments, the one or more searchable texts are displayed horizontally in the search box, the range of display positions includes a range of positions in the horizontal direction, and the target text determining submodule is further configured to: calculate the pressed The horizontal offset of the point position in the search box; the target text is determined based on the horizontal display position range where the horizontal offset is located.
在一些实施例中,所述文本显示位置范围确定子模块还用于:根据所述搜索框中当前显示的一个或多个可搜索文本的字体和字号,确定所述搜索框中当前显示的一个或多个可搜索文本分别对应的显示位置范围。In some embodiments, the text display position range determining submodule is further configured to: determine one of the currently displayed texts in the search box according to the font and font size of one or more searchable texts currently displayed in the search box or multiple searchable texts corresponding to display location ranges respectively.
在一些实施例中,所述预设触发操作为长按操作或双击操作。In some embodiments, the preset triggering operation is a long-press operation or a double-click operation.
图10是根据本公开又一示例性实施例示出的一种文本搜索装置的结构框图。如图10所示,所述确定模块30包括:第三确定子模块303,用于确定所述触发操作对应的按压力度;第四确定子模块304,用于根据所述按压力度在所述可搜索文本中确定所述目标文本。Fig. 10 is a structural block diagram of a text search device according to yet another exemplary embodiment of the present disclosure. As shown in FIG. 10 , the determining module 30 includes: a third determining submodule 303, configured to determine the pressing force corresponding to the trigger operation; The target text is identified in the search text.
在一些实施例中,所述装置还包括:处理模块,用于在所述触发操作不为所述预设触发操作的情况下,在所述搜索框所在的页面中提供文本输入接口。In some embodiments, the device further includes: a processing module, configured to provide a text input interface on the page where the search box is located when the trigger operation is not the preset trigger operation.
下面参考图11,其示出了适于用来实现本公开实施例的电子设备100的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图11示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring now to FIG. 11 , it shows a schematic structural diagram of an electronic device 100 suitable for implementing the embodiments of the present disclosure. The terminal equipment in the embodiment of the present disclosure may include but not limited to such as mobile phone, notebook computer, digital broadcast receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia player), vehicle terminal (such as mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers and the like. The electronic device shown in FIG. 11 is only an example, and should not limit the functions and application scope of the embodiments of the present disclosure.
如图11所示,电子设备1100可以包括处理装置(例如中央处理器、图形处理器等)1101,其可以根据存储在只读存储器(ROM)1102中的程序或者从存储装置1108加载 到随机访问存储器(RAM)1103中的程序而执行各种适当的动作和处理。在RAM 1103中,还存储有电子设备1100操作所需的各种程序和数据。处理装置1101、ROM 1102以及RAM 1103通过总线1104彼此相连。输入/输出(I/O)接口1105也连接至总线1104。As shown in FIG. 11, an electronic device 1100 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 1101, which may be randomly accessed according to a program stored in a read-only memory (ROM) 1102 or loaded from a storage device 1108. Various appropriate actions and processes are executed by programs in the memory (RAM) 1103 . In the RAM 1103, various programs and data necessary for the operation of the electronic device 1100 are also stored. The processing device 1101, the ROM 1102, and the RAM 1103 are connected to each other through a bus 1104. An input/output (I/O) interface 1105 is also connected to the bus 1104 .
通常,以下装置可以连接至I/O接口1105:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置1106;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置1107;包括例如磁带、硬盘等的存储装置1108;以及通信装置1109。通信装置1109可以允许电子设备1100与其他设备进行无线或有线通信以交换数据。虽然图11示出了具有各种装置的电子设备1100,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Typically, the following devices can be connected to the I/O interface 1105: input devices 1106 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibration an output device 1107 such as a computer; a storage device 1108 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1109. The communication means 1109 may allow the electronic device 1100 to perform wireless or wired communication with other devices to exchange data. While FIG. 11 shows electronic device 1100 having various means, it is to be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置1109从网络上被下载和安装,或者从存储装置1108被安装,或者从ROM 1102被安装。在该计算机程序被处理装置1101执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 1109, or from storage means 1108, or from ROM 1102. When the computer program is executed by the processing device 1101, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
需要说明的是,本公开上述计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer readable signal medium may include a data signal carrying computer readable program code in baseband or propagated as part of a carrier wave. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任 意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, the client and the server can communicate using any currently known or future network protocols such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can communicate with digital data in any form or medium The communication (eg, communication network) interconnections. Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:显示搜索框,其中,所述搜索框中显示有一个或多个可搜索文本;接收用户对所述搜索框的触发操作;在所述触发操作为预设触发操作的情况下,根据所述触发操作,在所述可搜索文本中确定目标文本;对所述目标文本进行搜索,并显示所述目标文本的搜索结果页。。The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: displays a search box, wherein one or more available Searching for text; receiving a user's trigger operation on the search box; in the case that the trigger operation is a preset trigger operation, according to the trigger operation, determining the target text in the searchable text; for the target text A search is performed and a search results page for said target text is displayed. .
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言——诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as "C" or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, using an Internet service provider to connected via the Internet).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定,例如,提供获取模块还可以被描述为“提供搜索框的模块”。The modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the module does not constitute a limitation on the module itself under certain circumstances, for example, the module providing acquisition may also be described as "a module providing a search box".
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、 专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described herein above may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), System on Chips (SOCs), Complex Programmable Logical device (CPLD) and so on.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
根据本公开的一个或多个实施例,示例1提供了一种文本搜索方法,所述方法包括:显示搜索框,其中,所述搜索框中显示有一个或多个可搜索文本;接收用户对所述搜索框的触发操作;在所述触发操作为预设触发操作的情况下,根据所述触发操作,在所述可搜索文本中确定目标文本;对所述目标文本进行搜索,并显示所述目标文本的搜索结果页。According to one or more embodiments of the present disclosure, Example 1 provides a text search method, the method includes: displaying a search box, wherein one or more searchable texts are displayed in the search box; The trigger operation of the search box; if the trigger operation is a preset trigger operation, according to the trigger operation, determine the target text in the searchable text; search the target text, and display the A search results page that describes the target text.
根据本公开的一个或多个实施例,示例2提供了示例1的方法,所述根据所述触发操作,在所述可搜索文本中确定目标文本包括:确定所述触发操作对应的按压点位置;根据所述按压点位置在所述可搜索文本中确定所述目标文本。According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1. According to the trigger operation, determining the target text in the searchable text includes: determining the position of the pressing point corresponding to the trigger operation ; Determine the target text in the searchable text according to the position of the pressing point.
根据本公开的一个或多个实施例,示例3提供了示例2的方法,所述根据所述按压点位置在所述可搜索文本中确定所述目标文本包括:确定所述搜索框中当前显示的一个或多个可搜索文本分别对应的显示位置范围;根据所述按压点位置和所述可搜索文本分别对应的显示位置范围之间的位置关系确定所述目标文本。According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, the determining the target text in the searchable text according to the position of the pressing point includes: determining the currently displayed text in the search box The display position ranges corresponding to the one or more searchable texts; the target text is determined according to the positional relationship between the press point position and the display position ranges corresponding to the searchable texts.
根据本公开的一个或多个实施例,示例4提供了示例3的方法,所述按压点位置通过按压点在水平方向和/或垂直方向的偏移确定;所述可搜索文本分别对应的显示范围通过各个可搜索文本水平方向的偏移范围和/或垂直方向的偏移范围确定。According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 3, the location of the pressing point is determined by the offset of the pressing point in the horizontal direction and/or vertical direction; the searchable texts are displayed correspondingly The range is determined by the horizontal offset range and/or the vertical offset range of each searchable text.
根据本公开的一个或多个实施例,示例5提供了示例3的方法,所述一个或多个可搜索文本在所述搜索框中水平显示,所述显示位置范围包括水平方向位置范围,所述根据所述按压点位置和所述可搜索文本分别对应的显示位置范围之间的位置关系确定所述目标文本包括:计算所述按压点位置在所述搜索框中的水平方向偏移;基于所述水平方向偏移所在的所述水平方向显示位置范围确定所述目标文本。According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 3, the one or more searchable texts are displayed horizontally in the search box, the display position range includes a horizontal position range, and The determining the target text according to the positional relationship between the position of the pressing point and the display position range corresponding to the searchable text includes: calculating the horizontal offset of the position of the pressing point in the search box; The range of the horizontal display position where the horizontal offset is located determines the target text.
根据本公开的一个或多个实施例,示例6提供了示例3的方法,所述确定所述搜索框中当前显示的一个或多个可搜索文本分别对应的显示位置范围包括:根据所述搜索框 中当前显示的一个或多个可搜索文本的字体和字号,确定所述搜索框中当前显示的一个或多个可搜索文本分别对应的显示位置范围。According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 3, wherein the determining the display position ranges corresponding to one or more searchable texts currently displayed in the search box includes: according to the search The font and font size of the one or more searchable texts currently displayed in the search box determine the display position ranges corresponding to the one or more searchable texts currently displayed in the search box.
根据本公开的一个或多个实施例,示例7提供了示例1-6中任一示例的方法,所述预设触发操作为长按操作或双击操作。According to one or more embodiments of the present disclosure, Example 7 provides the method of any one of Examples 1-6, wherein the preset trigger operation is a long-press operation or a double-click operation.
根据本公开的一个或多个实施例,示例8提供了示例1的方法,所述预设触发操作为压力触发操作,所述根据所述触发操作,在所述可搜索文本中确定目标文本包括:确定所述触发操作对应的按压力度;根据所述按压力度在所述可搜索文本中确定所述目标文本。According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 1, the preset trigger operation is a pressure trigger operation, and according to the trigger operation, determining the target text in the searchable text includes : Determine the pressing force corresponding to the trigger operation; determine the target text in the searchable text according to the pressing force.
根据本公开的一个或多个实施例,示例9提供了示例1-6中任一示例的方法,所述方法还包括:在所述触发操作不为所述预设触发操作的情况下,在所述搜索框所在的搜索页面中提供文本输入接口。According to one or more embodiments of the present disclosure, Example 9 provides the method of any one of Examples 1-6, and the method further includes: when the trigger operation is not the preset trigger operation, at A text input interface is provided on the search page where the search box is located.
根据本公开的一个或多个实施例,示例10提供了一种文本搜索装置,所述装置包括:显示模块,用于显示搜索框,其中,所述搜索框中显示有一个或多个可搜索文本;接收模块,用于接收用户对所述搜索框的触发操作;确定模块,用于在所述触发操作为预设触发操作的情况下,根据所述触发操作,在所述可搜索文本中确定目标文本;搜索模块,用于对所述目标文本进行搜索,并通过所述显示模块显示所述目标文本的搜索结果页。According to one or more embodiments of the present disclosure, Example 10 provides a text search device, the device includes: a display module for displaying a search box, wherein one or more searchable Text; a receiving module, configured to receive a user's trigger operation on the search box; a determination module, configured to, in the case of the preset trigger operation, according to the trigger operation, in the searchable text Determining the target text; a search module, configured to search the target text, and display a search result page of the target text through the display module.
根据本公开的一个或多个实施例,示例11提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现示例1-9中任一项所述方法的步骤。According to one or more embodiments of the present disclosure, Example 11 provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of any one of the methods described in Examples 1-9 are implemented .
根据本公开的一个或多个实施例,示例12提供了一种电子设备,包括:存储装置,其上存储有计算机程序;处理装置,用于执行所述存储装置中的所述计算机程序,以实现示例1-9中任一项所述方法的步骤。According to one or more embodiments of the present disclosure, Example 12 provides an electronic device, including: a storage device, on which a computer program is stored; a processing device, configured to execute the computer program in the storage device, to Implement the steps of any one of the methods described in Examples 1-9.
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an illustration of the applied technical principles. Those skilled in the art should understand that the disclosure scope involved in this disclosure is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, but also covers the technical solutions formed by the above-mentioned technical features or Other technical solutions formed by any combination of equivalent features. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任 何合适的子组合的方式实现在多个实施例中。In addition, while operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or performed in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while the above discussion contains several specific implementation details, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

Claims (12)

  1. 一种文本搜索方法,其包括:A text search method comprising:
    显示搜索框,其中,所述搜索框中显示有一个或多个可搜索文本;displaying a search box, wherein one or more searchable texts are displayed in the search box;
    接收用户对所述搜索框的触发操作;receiving a user's trigger operation on the search box;
    在所述触发操作为预设触发操作的情况下,根据所述触发操作,在所述可搜索文本中确定目标文本;If the trigger operation is a preset trigger operation, according to the trigger operation, determine the target text in the searchable text;
    对所述目标文本进行搜索,并显示所述目标文本的搜索结果页。The target text is searched, and a search result page of the target text is displayed.
  2. 根据权利要求1所述的方法,其中,所述根据所述触发操作,在所述可搜索文本中确定目标文本包括:The method according to claim 1, wherein said determining target text in said searchable text according to said trigger operation comprises:
    确定所述触发操作对应的按压点位置;Determine the position of the pressing point corresponding to the trigger operation;
    根据所述按压点位置在所述可搜索文本中确定所述目标文本。The target text is determined in the searchable text according to the position of the pressing point.
  3. 根据权利要求2所述的方法,其中,所述根据所述按压点位置在所述可搜索文本中确定所述目标文本包括:The method according to claim 2, wherein said determining the target text in the searchable text according to the position of the pressing point comprises:
    确定所述搜索框中当前显示的一个或多个可搜索文本分别对应的显示位置范围;determining the display position ranges corresponding to one or more searchable texts currently displayed in the search box;
    根据所述按压点位置和所述可搜索文本分别对应的显示位置范围之间的位置关系确定所述目标文本。The target text is determined according to the positional relationship between the position of the pressing point and the display position range corresponding to the searchable text.
  4. 根据权利要求3所述的方法,其中,所述按压点位置通过按压点在水平方向和/或垂直方向的偏移确定;所述可搜索文本分别对应的显示范围通过各个可搜索文本水平方向的偏移范围和/或垂直方向的偏移范围确定。The method according to claim 3, wherein the position of the pressing point is determined by the offset of the pressing point in the horizontal direction and/or vertical direction; the display range corresponding to the searchable text is determined by the horizontal direction of each searchable text The offset range and/or the offset range determination in the vertical direction.
  5. 根据权利要求3所述的方法,其中,所述一个或多个可搜索文本在所述搜索框中水平显示,所述显示位置范围包括水平方向位置范围,所述根据所述按压点位置和所述可搜索文本分别对应的显示位置范围之间的位置关系确定所述目标文本包括:The method according to claim 3, wherein the one or more searchable texts are displayed horizontally in the search box, the range of display positions includes a range of positions in the horizontal direction, and the Determining the target text by determining the positional relationship between the display position ranges corresponding to the searchable texts respectively includes:
    计算所述按压点位置在所述搜索框中的水平方向偏移;calculating the horizontal offset of the press point position in the search box;
    基于所述水平方向偏移所在的所述水平方向显示位置范围确定所述目标文本。The target text is determined based on the horizontal display position range where the horizontal offset is located.
  6. 根据权利要求3所述的方法,其中,所述确定所述搜索框中当前显示的一个或多个可搜索文本分别对应的显示位置范围包括:The method according to claim 3, wherein the determining the display position ranges corresponding to one or more searchable texts currently displayed in the search box comprises:
    根据所述搜索框中当前显示的一个或多个可搜索文本的字体和字号,确定所述搜索框中当前显示的一个或多个可搜索文本分别对应的显示位置范围。According to the font and font size of the one or more searchable texts currently displayed in the search box, determine the display position ranges corresponding to the one or more searchable texts currently displayed in the search box.
  7. 根据权利要求1-6中任一权利要求所述的方法,其中,所述预设触发操作为长按操作或双击操作。The method according to any one of claims 1-6, wherein the preset trigger operation is a long-press operation or a double-click operation.
  8. 根据权利要求1所述的方法,其中,所述预设触发操作为压力触发操作,所述根据所述触发操作,在所述可搜索文本中确定目标文本包括:The method according to claim 1, wherein the preset trigger operation is a pressure trigger operation, and according to the trigger operation, determining the target text in the searchable text comprises:
    确定所述触发操作对应的按压力度;determining the pressing force corresponding to the trigger operation;
    根据所述按压力度在所述可搜索文本中确定所述目标文本。The target text is determined in the searchable text according to the pressing force.
  9. 根据权利要求1-6中任一权利要求所述的方法,其中,所述方法还包括:The method according to any one of claims 1-6, wherein the method further comprises:
    在所述触发操作不为所述预设触发操作的情况下,在所述搜索框所在的搜索页面中提供文本输入接口。If the trigger operation is not the preset trigger operation, a text input interface is provided on the search page where the search box is located.
  10. 一种文本搜索装置,其包括:A text search device comprising:
    显示模块,用于显示搜索框,其中,所述搜索框中显示有一个或多个可搜索文本;A display module, configured to display a search box, wherein one or more searchable texts are displayed in the search box;
    接收模块,用于接收用户对所述搜索框的触发操作;A receiving module, configured to receive a user's trigger operation on the search box;
    确定模块,用于在所述触发操作为预设触发操作的情况下,根据所述触发操作,在所述可搜索文本中确定目标文本;A determination module, configured to determine target text in the searchable text according to the trigger operation when the trigger operation is a preset trigger operation;
    搜索模块,用于对所述目标文本进行搜索,并通过所述显示模块显示所述目标文本的搜索结果页。A search module, configured to search the target text, and display a search result page of the target text through the display module.
  11. 一种计算机可读介质,其上存储有计算机程序,其中,该程序被处理装置执行时实现权利要求1-9中任一项所述方法的步骤。A computer-readable medium, on which a computer program is stored, wherein, when the program is executed by a processing device, the steps of the method according to any one of claims 1-9 are implemented.
  12. 一种电子设备,其包括:An electronic device comprising:
    存储装置,其上存储有计算机程序;a storage device on which a computer program is stored;
    处理装置,用于执行所述存储装置中的所述计算机程序,以实现权利要求1-9中任一项所述方法的步骤。A processing device configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1-9.
PCT/CN2022/082421 2021-05-17 2022-03-23 Text search method and apparatus, readable medium, and electronic device WO2022242302A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110536580.6A CN113127718A (en) 2021-05-17 2021-05-17 Text search method and device, readable medium and electronic equipment
CN202110536580.6 2021-05-17

Publications (1)

Publication Number Publication Date
WO2022242302A1 true WO2022242302A1 (en) 2022-11-24

Family

ID=76782085

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/082421 WO2022242302A1 (en) 2021-05-17 2022-03-23 Text search method and apparatus, readable medium, and electronic device

Country Status (2)

Country Link
CN (1) CN113127718A (en)
WO (1) WO2022242302A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127718A (en) * 2021-05-17 2021-07-16 北京字节跳动网络技术有限公司 Text search method and device, readable medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104850614A (en) * 2015-05-14 2015-08-19 百度在线网络技术(北京)有限公司 Showing method and device for recommendation query word
WO2016101768A1 (en) * 2014-12-26 2016-06-30 北京奇虎科技有限公司 Terminal and touch operation-based search method and device
CN109933275A (en) * 2019-02-12 2019-06-25 努比亚技术有限公司 A kind of knowledge screen method, terminal and computer readable storage medium
CN112579854A (en) * 2019-09-30 2021-03-30 北京京东尚科信息技术有限公司 Information processing method, device, equipment and storage medium
CN113127718A (en) * 2021-05-17 2021-07-16 北京字节跳动网络技术有限公司 Text search method and device, readable medium and electronic equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105069013B (en) * 2015-07-10 2019-03-12 百度在线网络技术(北京)有限公司 The control method and device of input interface are provided in search interface
CN105824552B (en) * 2015-07-29 2019-05-17 维沃移动通信有限公司 A kind of recognition methods of text information and device
CN106445947A (en) * 2015-08-06 2017-02-22 阿里巴巴集团控股有限公司 Data searching method and system
CN107179835A (en) * 2016-03-11 2017-09-19 北京搜狗科技发展有限公司 A kind of input method and device, a kind of device for being used to input
CN106775378B (en) * 2016-11-25 2020-05-12 维沃移动通信有限公司 Method for determining candidate words of input method and mobile terminal
CN109033296A (en) * 2018-07-13 2018-12-18 网易传媒科技(北京)有限公司 For the method for search, system, medium and electronic equipment
CN109271574A (en) * 2018-08-28 2019-01-25 麒麟合盛网络技术股份有限公司 A kind of hot word recommended method and device
CN111400625B (en) * 2020-03-25 2023-03-28 抖音视界有限公司 Page processing method and device, electronic equipment and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016101768A1 (en) * 2014-12-26 2016-06-30 北京奇虎科技有限公司 Terminal and touch operation-based search method and device
CN104850614A (en) * 2015-05-14 2015-08-19 百度在线网络技术(北京)有限公司 Showing method and device for recommendation query word
CN109933275A (en) * 2019-02-12 2019-06-25 努比亚技术有限公司 A kind of knowledge screen method, terminal and computer readable storage medium
CN112579854A (en) * 2019-09-30 2021-03-30 北京京东尚科信息技术有限公司 Information processing method, device, equipment and storage medium
CN113127718A (en) * 2021-05-17 2021-07-16 北京字节跳动网络技术有限公司 Text search method and device, readable medium and electronic equipment

Also Published As

Publication number Publication date
CN113127718A (en) 2021-07-16

Similar Documents

Publication Publication Date Title
CN111414498B (en) Multimedia information recommendation method and device and electronic equipment
CN111368185B (en) Data display method and device, storage medium and electronic equipment
WO2021218519A1 (en) Page switching method and apparatus for application, and electronic device and non-transitory readable storage medium
WO2021135626A1 (en) Method and apparatus for selecting menu items, readable medium and electronic device
US20230385350A1 (en) Feedback method and apparatus based on online document comment, and non-transitory computer-readable storage medium
US11714866B2 (en) Method and device for page processing, electronic device, and computer-readable storage medium
US11720235B2 (en) Method and apparatus for browsing table in document, and electronic device and storage medium
WO2019218688A1 (en) Method and device for displaying information and searching information
WO2023279843A1 (en) Content search method, apparatus and device, and storage medium
CN112287206A (en) Information processing method and device and electronic equipment
WO2023030224A1 (en) Information presentation method and apparatus, and electronic device and storage medium
WO2023125161A1 (en) Control method for livestreaming room, apparatus, electronic device, medium, and program product
WO2022233311A1 (en) Display method and apparatus, and electronic device
WO2022242302A1 (en) Text search method and apparatus, readable medium, and electronic device
CN110825481A (en) Method and device for displaying page information corresponding to page tag and electronic equipment
CN110806834A (en) Information processing method and device based on input method, electronic equipment and medium
CN111723309A (en) Method and device for searching web page
WO2024032413A1 (en) Book information display method and apparatus, device, and storage medium
WO2023088172A1 (en) Interaction method and apparatus, and electronic device and storage medium
WO2023143071A2 (en) Content display method and apparatus, electronic device and storage medium
WO2023001276A1 (en) Information display method and apparatus, terminal, and storage medium
CN116644089A (en) Query statement generation method, device, equipment and storage medium
WO2022184013A1 (en) Document editing method and apparatus, device, and storage medium
WO2023024716A1 (en) Query result display method and apparatus, medium, and electronic device
WO2022184034A1 (en) Document processing method and apparatus, device, and medium

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: 22803628

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE