Method and device for generating search hints
A technology of search prompt and search box, which is applied in the field of search prompt, can solve the problem of inconvenient use of search prompt and achieve the effect of convenient search
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0050] An embodiment of the present invention provides a method for generating a search prompt, see figure 1 , the method includes:
[0051] Step 101: Obtain a cursor movement instruction, which is used to control the position of the cursor in the search box.
[0052] Step 102: Move the cursor according to the cursor movement instruction.
[0053] Step 103: Obtain the keyword before the cursor in the search box.
[0054] Step 104: Obtain a search hint matching the keyword before the cursor, where the search hint is a matching result obtained by performing prefix matching on the keyword before the cursor.
[0055] In the embodiment of the present invention, after obtaining the keyword before the cursor, a search prompt matching the keyword before the cursor is obtained; therefore, when the user moves the cursor, the keyword before the cursor is changed, thereby changing the matching result, That is, the search prompt is changed, which solves the problem in the prior art that...
Embodiment 2
[0057] Taking a search engine as an example, a method for generating a search prompt provided by an embodiment of the present invention is further described below, see figure 2 , the method includes:
[0058] Step 201: Obtain a cursor movement instruction, which is used to control the position of the cursor in the search box.
[0059] Specifically, obtaining the cursor movement instruction includes: obtaining the cursor movement instruction by monitoring the user's mouse click event and keyboard input event.
[0060] Step 202: Move the cursor according to the cursor movement instruction.
[0061] Step 203: Obtain the keyword before the cursor in the search box.
[0062] Specifically, step 203 includes: obtaining the position of the cursor in the search box, and obtaining the keyword before the cursor according to the position of the cursor in the search box.
[0063] Specifically, obtaining the position of the cursor in the search box may be implemented through HTML (Hyper...
Embodiment 3
[0077] An embodiment of the present invention provides a device for generating search hints, see image 3 , the device consists of:
[0078] An instruction acquiring module 301, configured to acquire a cursor movement instruction, the cursor movement instruction is used to control the position of the cursor in the search box;
[0079] The moving module 302 is configured to move the cursor according to the cursor moving instruction acquired by the instruction acquiring module 301;
[0080] Get the word module 303, be used for obtaining the keyword before the cursor in the search box;
[0081] The result acquisition module 304 is configured to acquire a search prompt matching the keyword before the cursor obtained by the word extraction module 303 , and the search prompt is a matching result obtained by performing prefix matching on the keyword before the cursor.
[0082] In the embodiment of the present invention, after obtaining the keyword before the cursor, a search prompt...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 