Disclosure of Invention
The present disclosure is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, a first objective of the present disclosure is to provide a method for displaying search prompt information, which reduces difficulty of using a product by a user, saves time of the user, and improves user experience.
A second object of the present disclosure is to provide a display device for search prompt information.
A third object of the present disclosure is to provide an electronic device.
A fourth object of the present disclosure is to propose a storage medium.
A fifth object of the present disclosure is to propose a computer program product.
In order to achieve the above object, an embodiment of a first aspect of the present disclosure provides a method for displaying search prompt information, including: monitoring a page rolling event, and determining a continuous rolling duration and a continuous rolling speed corresponding to the page rolling event when the page rolling event is monitored; and when the continuous scrolling time length is determined to be greater than a first threshold value and the continuous scrolling speed is determined to be greater than a second threshold value, displaying search prompt information in the page, wherein the search prompt information is used for indicating a triggering opening mode of a search box.
According to the display method of the search prompt information, firstly, a page rolling event is monitored, then when the page rolling event is monitored, the continuous rolling time length and the continuous rolling speed corresponding to the page rolling event are determined, and finally, when the continuous rolling time length is determined to be larger than a first threshold value and the continuous rolling speed is determined to be larger than a second threshold value, the search prompt information is displayed in the page so as to indicate the triggering starting mode of the search box. Therefore, when the continuous page scrolling time exceeds the first threshold and the continuous scrolling speed exceeds the second threshold, the method displays the search prompt information to help the user to quickly start the search function, so that the difficulty of using products by the user is reduced, the time of the user is saved, and the use experience of the user is improved.
In addition, the display method of the search prompt information according to the above embodiment of the present disclosure may further have the following additional technical features:
according to an embodiment of the present disclosure, the determining a continuous scrolling duration and a continuous scrolling speed corresponding to the page scrolling event includes: when a first time interval between the current time and the finish rolling time of the previous page rolling event is less than or equal to a third threshold, taking the sum of the continuous rolling time corresponding to the previous page rolling event and the current rolling time of the page rolling event as the continuous rolling time corresponding to the page rolling event; and determining the current continuous scrolling speed of the page according to the continuous scrolling duration and the continuous scrolling distance corresponding to the page scrolling event.
According to an embodiment of the present disclosure, the searching prompt information is shortcut key information, and after the searching prompt information is displayed in the page, the method further includes: when a keyboard pressing event is monitored, acquiring a currently triggered key value; and if the currently triggered key value is matched with the key value indicated by the shortcut key information, displaying a search box in the page.
According to an embodiment of the present disclosure, the displaying search prompt information in the page includes: and displaying the search prompt information in a blank area of the page.
According to an embodiment of the present disclosure, the displaying the search prompt information in a blank area of the page includes: acquiring a first display style of each element adjacent to the blank area of the page; and displaying the search prompt information in a second display style in a blank area of the page, wherein the second display style is different from the first display style.
According to an embodiment of the present disclosure, before displaying the search prompt information in the page, the method further includes: and setting the event point attribute of a display window for displaying the search prompt information to be null.
According to an embodiment of the present disclosure, before displaying the search prompt information in the page, the method further includes: and setting the transparency of a display window for displaying the search prompt information as a preset value.
According to an embodiment of the present disclosure, after the displaying the search prompt information in the page, the method further includes: and controlling the display duration of the search prompt information on the page to reach a fourth threshold value.
According to an embodiment of the present disclosure, the method for displaying search prompt information further includes: and when the display duration of the search prompt information on the page reaches a second threshold value, closing a display window for displaying the search prompt information.
According to an embodiment of the present disclosure, after the closing the display window for displaying the search prompt information, the method further includes: and stopping monitoring the page scrolling event.
According to an embodiment of the present invention, the determining a continuous scrolling duration and a continuous scrolling speed corresponding to the page scrolling event includes: when a first time interval between the current time and the finish rolling time of the previous page rolling event is greater than a third threshold value, taking the page rolling duration corresponding to the current page rolling event as the continuous rolling duration corresponding to the page rolling event; and determining the continuous scrolling speed according to the scrolling duration and the scrolling distance of the current page scrolling event.
In order to achieve the above object, an embodiment of a second aspect of the present disclosure provides a display device for searching for prompt information, including: a listening module configured to perform listening for a page scrolling event; the first determining module is configured to execute the determination of the continuous scrolling duration and the continuous scrolling speed corresponding to the page scrolling event when the page scrolling event is monitored; and the first display module is configured to execute displaying of search prompt information in the page when it is determined that the continuous scrolling time length is greater than a first threshold and the continuous scrolling speed is greater than a second threshold, wherein the search prompt information is used for indicating a trigger starting mode of a search box.
According to the display device for searching the prompt information, the monitoring module monitors the page rolling event, and the first determining module determines the continuous rolling time and the continuous rolling speed corresponding to the page rolling event when the page rolling event is monitored; when the continuous scrolling duration is determined to be greater than a first threshold value and the continuous scrolling speed is determined to be greater than a second threshold value, search prompt information is displayed in a page to indicate a triggering opening mode of a search box. Therefore, when the continuous page scrolling time exceeds the first threshold and the continuous scrolling speed exceeds the second threshold, the device displays the search prompt information to help the user to quickly start the search function, so that the difficulty of using a product by the user is reduced, the time of the user is saved, and the use experience of the user is improved.
In addition, the search display device of the prompt message according to the above embodiment of the present disclosure may further have the following additional technical features:
according to an embodiment of the present disclosure, the first determining module includes: the first calculation unit is configured to execute the step of taking the sum of the continuous scrolling duration corresponding to the previous page scrolling event and the current scrolling duration of the page scrolling event as the continuous scrolling duration corresponding to the page scrolling event when a first time interval between the current time and the finishing scrolling time of the previous page scrolling event is less than or equal to a third threshold; and the second calculation unit is configured to determine the current continuous scrolling speed of the page according to the continuous scrolling duration and the continuous scrolling distance corresponding to the page scrolling event.
According to an embodiment of the present disclosure, the search prompt information is shortcut key information, and the apparatus further includes: the second determination module is configured to execute acquiring a currently triggered key value when a keyboard pressing event is monitored; and the second display module is configured to execute displaying of a search box in the page if the currently triggered key value is matched with the key value indicated by the shortcut key information.
According to one embodiment of the disclosure, the first display module, when displaying the search prompt information in the page, is configured to perform: and displaying the search prompt information in a blank area of the page.
According to an embodiment of the present disclosure, the first display module includes: a first acquisition unit configured to perform acquisition of a first display style of each element adjacent to a blank area of the page; a display unit configured to perform displaying the search prompt information in a second display style in a blank area of the page, wherein the second display style is different from the first display style.
According to an embodiment of the present disclosure, the display apparatus for search prompt information further includes: a first setting module configured to perform setting of an event point attribute of a display window for displaying the search prompt information to null.
According to an embodiment of the present disclosure, the display apparatus for search prompt information further includes: and the second setting module is configured to execute setting of transparency of a prompt window for displaying the search prompt information to be a preset value.
According to an embodiment of the present disclosure, the display apparatus for search prompt information further includes: and the control module is configured to execute control on the display duration of the search prompt information on the page to reach a fourth threshold.
According to an embodiment of the present disclosure, the display apparatus for search prompt information further includes: and the closing module is configured to close a display window used for displaying the search prompt information when the display duration of the search prompt information on the page reaches a second threshold value.
According to an embodiment of the disclosure, the control module is further configured to perform: and stopping monitoring the page scrolling event.
According to an embodiment of the present invention, when determining the continuous scrolling duration and the continuous scrolling speed corresponding to the page scrolling event, the first determining module is configured to: when a first time interval between the current time and the finish rolling time of the previous page rolling event is greater than a third threshold value, taking the page rolling duration corresponding to the current page rolling event as the continuous rolling duration corresponding to the page rolling event; and determining the continuous scrolling speed according to the scrolling duration and the scrolling distance of the current page scrolling event.
To achieve the above object, an embodiment of a third aspect of the present disclosure provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; the processor is configured to call and execute the executable instructions stored in the memory to implement the method for displaying search prompt information provided by the embodiment of the first aspect of the disclosure.
According to the electronic equipment disclosed by the embodiment of the disclosure, when the processor calls and executes the executable instruction stored in the memory, the search prompt information can be displayed when the continuous page scrolling time exceeds the first threshold and the continuous scrolling speed exceeds the second threshold, so as to help a user to quickly start a search function, thereby reducing the difficulty of using a product by the user, saving the time of the user and improving the use experience of the user.
To achieve the above object, a fourth aspect of the present disclosure provides a storage medium, where instructions, when executed by a processor of an electronic device, enable the electronic device to perform the method for displaying search hint information provided in the first aspect of the present disclosure.
When the instruction stored in the storage medium is executed by the processor, the storage medium can display search prompt information when the continuous scrolling time of the page exceeds a first threshold value and the continuous scrolling speed exceeds a second threshold value so as to help a user to quickly start a search function, thereby reducing the difficulty of using a product by the user, saving the time of the user and improving the use experience of the user.
To achieve the above object, a fifth aspect of the present disclosure provides a computer program product, which when executed by a processor of an electronic device, enables the electronic device to perform the method for displaying search hint information provided in the first aspect of the present disclosure.
When the computer program of the computer program product is executed by the processor, the search prompt information can be displayed when the continuous scrolling time of the page exceeds the first threshold and the continuous scrolling speed exceeds the second threshold, so that a user can be helped to quickly start a search function, the difficulty of using the product by the user is reduced, the time of the user is saved, and the use experience of the user is improved.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the present disclosure, and should not be construed as limiting the present disclosure.
The disclosure provides a display method and device for search prompt information, an electronic device and a storage medium, mainly considering that a method for prompting an entry of a search function through guiding by a novice in the related art is too strong and abrupt, and increases the complexity of using a product for the first time by a user and the problem of poor user experience.
The method for displaying the search prompt information monitors the page rolling condition of the user in real time, namely monitors the page rolling event in real time, and displays the search prompt information when the continuous rolling time corresponding to the page rolling event is determined to be greater than a first threshold and the continuous rolling speed is determined to be greater than a second threshold, so that the user is reminded of acquiring the required content by using the search function. According to the method and the device, when the user needs to search the function currently according to the continuous rolling duration and the continuous rolling speed, the search prompt information is displayed in the page, so that the user can quickly open the search function, the difficulty of using the product by the user is reduced, the time of the user is saved, and the use experience of the user is improved.
A display method, a display apparatus, an electronic device, and a storage medium of search prompt information according to embodiments of the present disclosure are described below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a display method of search prompt information according to an embodiment of the present disclosure, where an execution subject may be an electronic device, specifically, the electronic device may be, but is not limited to, a computer and a mobile terminal, and the mobile terminal may be, but is not limited to, a personal computer, a smart phone, an IPAD, and the like.
As shown in fig. 1, the display method of the search prompt information includes the following steps S101 to S103.
S101, monitoring a page scrolling event.
S102, when the page scrolling event is monitored, determining the continuous scrolling duration and the continuous scrolling speed corresponding to the page scrolling event.
The page in the embodiment of the present disclosure refers to a page in an internet product, and correspondingly, the execution main body of the display method for the search prompt information in the present disclosure is an electronic device carrying the internet product.
In practical applications, a user may trigger a page scrolling event through a page scrolling operation, which may be, for example: the operation of clicking and dragging the scroll bar by the left mouse button may be an operation of scrolling the mouse, or may also be a sliding operation executed in the touch screen, and the like, which is not limited in this embodiment.
Therefore, in the embodiment of the present disclosure, a continuous scrolling duration and a continuous scrolling speed corresponding to a page scrolling event may be determined by monitoring the page scrolling (scroll) event in real time.
Specifically, in the embodiment of the present disclosure, the continuous scrolling duration refers to a length of time that the page is continuously and continuously scrolled. It should be noted that, since the user is influenced by the operation component, for example, if the operation component is a mouse wheel, the wheel is influenced by the action range, and a certain time interval exists between two consecutive scrolling events, the term "continuous scrolling" in the present disclosure refers to continuous scrolling in which the time interval between each scrolling event is within a certain range.
In addition, in the embodiment of the present disclosure, the speed of continuous scrolling refers to the distance that the page is scrolled in a unit time during the process of being scrolled.
In practical use, after the page scrolling event is monitored, the continuous scrolling duration and the continuous scrolling speed of the page can be determined according to the current time and the end time of the adjacent previous scrolling event.
S103, when the continuous scrolling time length is determined to be larger than the first threshold value and the continuous scrolling speed is determined to be larger than the second threshold value, displaying search prompt information in the page, wherein the search prompt information is used for indicating a triggering opening mode of the search box.
In an actual scene, a user can search for required content by scrolling a page, and if the content is not found all the time, the page is continuously scrolled. In the embodiment of the disclosure, the time spent by the user in searching for the required content or the amount of roughly browsed content is measured by the continuous scrolling time length and the continuous scrolling speed.
The size of the first threshold may be set according to a general browsing habit of a user. For example, if the user usually continuously browses 10 pieces of page content, and does not find the required content, and exits from the current page, the first threshold may be set as the page scrolling duration required for scrolling and displaying 9 or 8 pieces of page content; alternatively, if the user exits the current page, typically by scrolling the page continuously for more than 1 minute (min), without finding the desired content, the first threshold may be set to 55 seconds(s), 50s, etc.
The size of the second threshold may be set according to the amount of information contained in the current page. Generally, when the content in the page is the content desired by the user, the speed of scrolling the page will be slow during the browsing process of the user, that is, the distance that the page is scrolled in a unit time will be small, that is, the scrolling speed is relatively low, and the amount of information in the page is relatively large, and the scrolling speed will be relatively low. However, the content in the page is not the content desired by the user, so that the speed of scrolling the page is very fast during the browsing process of the user, that is, the distance that the page is scrolled in a unit time is very long, that is, the scrolling speed is relatively high, and the smaller the information amount is, the higher the scrolling speed is. That is, the second threshold value is lower as the page information amount is larger; the smaller the amount of information, the higher the second threshold value.
In the embodiment of the disclosure, after determining the continuous scrolling duration and the continuous scrolling speed corresponding to the page scrolling event, it may be determined whether the continuous scrolling duration is greater than a first threshold and the continuous scrolling speed is greater than a second threshold, and if the continuous scrolling duration is greater than the first threshold and the continuous scrolling speed is greater than the second threshold, it indicates that the user does not view the required information in the browsed page.
That is, the search prompt information in this embodiment is displayed regardless of whether the user opens the page for the first time, and regardless of the continuous scroll time length and the continuous scroll speed of the page. The display of the search prompt information does not increase the complexity of using products by the user, but helps the user to acquire the required content more quickly, saves the time of the user and improves the user experience.
According to the display method of the search prompt information, when the continuous rolling time of the page exceeds the first threshold and the continuous rolling speed exceeds the second threshold, the search prompt information is displayed to help the user to quickly start the search function, so that the difficulty of using a product by the user is reduced, the time of the user is saved, and the use experience of the user is improved.
It can be understood that, when there is an explicit need, the user will continuously scroll the page to find the desired content, and therefore, in the embodiment of the present disclosure, when it is determined that the duration of continuous scrolling of the page is greater than the first threshold and the speed of continuous scrolling is greater than the second threshold, the search prompt information is displayed to indicate the trigger start mode of the search box of the user.
In practical use, when a page scrolling operation instruction is obtained each time, whether the current scrolling operation instruction is a continuous scrolling instruction or not can be determined according to a time interval between the time of the current instruction and the time of the adjacent previous scrolling operation instruction, and when the current scrolling operation instruction is determined to be the continuous scrolling instruction, the continuous scrolling duration and the continuous scrolling speed of the page are calculated. Referring to fig. 2, a method for displaying search prompt information according to an embodiment of the present disclosure includes:
and S200, monitoring the page scrolling operation.
S201, responding to the acquired page scrolling operation instruction, judging whether a first time interval between the current time and the end scrolling time of the adjacent previous page scrolling event is smaller than or equal to a third threshold, if so, executing S202, otherwise, executing S203.
The third threshold may be determined according to the operation duration of the general user, and may be 50ms (milliseconds), for example.
Specifically, when the page scroll event function is called, a current page scroll event (which may also be referred to as a current page scroll event) may be a continuous scroll event of a previous scroll event, or may be a discontinuous scroll event independent of the previous scroll event, where a first time interval between a current time and an end scroll time of an adjacent previous page scroll event needs to be obtained, so as to determine which the current page scroll event is based on the first time interval.
S202, the sum of the continuous scrolling duration corresponding to the previous page scrolling event and the current scrolling duration of the page scrolling event is used as the continuous scrolling duration corresponding to the page scrolling event, and the step S204 is executed.
Note that the previous page scroll event in the present embodiment refers to a previous page scroll event adjacent to the current page scroll event. Correspondingly, if the previous page scrolling event is a continuous scrolling event, the continuous scrolling duration corresponding to the previous page scrolling event refers to the sum of the scrolling duration of the previous page scrolling event and the scrolling duration of the previous continuous page scrolling event. That is, during the continuous page scrolling, after the scrolling event of the scrolling page is monitored each time, the continuous scrolling duration and the continuous scrolling speed corresponding to the current page scrolling event can be calculated.
For example, if the scrolling duration (the time interval between the scrolling ending time and the scrolling starting time) is 5 milliseconds (ms) when the first scrolling event of the page is monitored, the determined continuous scrolling duration of the page is 5ms when the first scrolling event is ended; when the page is scrolled for the second time, the scrolling duration is 3ms, and the time interval between the second scrolling event and the first scrolling event is less than a third threshold, so that after the second scrolling event, the determined continuous scrolling duration of the page is: 3ms +5 ms; the scroll time corresponding to the third scroll event is 6ms, and the time interval between the third scroll event and the second scroll event is less than a third threshold, so after the third scroll event, the determined continuous scroll time of the page is: 6ms +3ms +5 ms.
In the embodiment of the present disclosure, the scrolling duration of each scrolling event of a page may be determined according to the time interval between the ending time and the starting time of the scrolling event. The continuous scrolling duration of the continuous scrolling event of the page may be determined according to a time interval between a start time of a first scrolling event and an end time of a last scrolling event. For example, in the continuous scrolling event of the page, the starting time of the first scrolling event is t1, and the ending time of the last scrolling event is t2, so that the continuous scrolling time period of the page is t2-t 1.
Specifically, after a first time interval between the current time and the end scrolling time of the previous adjacent page scrolling event is obtained, if the first time interval is less than or equal to a third threshold, the scrolling event of the current page is continuous scrolling, and in this case, the sum of the continuous scrolling duration corresponding to the previous adjacent page scrolling event and the scrolling duration of the current page scrolling event is used as the continuous scrolling duration corresponding to the page scrolling event. Taking the above scroll event as an example, since the time interval between the third scroll event and the second scroll event is smaller than the third threshold, and the continuous scroll time duration corresponding to the second scroll event is 8ms (3ms +5ms), the continuous scroll time duration corresponding to the third scroll event is: 6ms +8 ms.
S203, the page scrolling duration corresponding to the scrolling event of the page is taken as the continuous scrolling duration corresponding to the page scrolling event, and the step S205 is executed.
It can be understood that, if the first time interval is greater than the third threshold, the scrolling event of the current page is discontinuous scrolling, and since the current scrolling event may be an initial scrolling event of a subsequent continuous scrolling event, the page scrolling duration corresponding to the scrolling event of the current page may be taken as the continuous scrolling duration corresponding to the page scrolling event. That is, the time interval between the ending time and the starting time of the current scrolling event is the continuous scrolling duration of the current page continuous scrolling event.
S204, determining the current continuous scrolling speed of the page according to the continuous scrolling duration and the continuous scrolling distance corresponding to the page scrolling event, and executing the step S206.
Specifically, after a first time interval between the current time and the end scrolling time of the previous adjacent page scrolling event is obtained, if the first time interval is less than or equal to a third threshold, the scrolling event of the current page is continuous scrolling, and in this case, the current continuous scrolling speed of the page can be determined according to the determined continuous scrolling duration and the determined continuous scrolling distance of the page.
It should be noted that, in the embodiment of the present disclosure, the continuous scrolling distance of the page refers to the sum of the distances that the page scrolls in each scrolling event. For example, if the scroll distance of the first scroll event is 2 centimeters (cm), the scroll distance of the second scroll event is 3cm, and the time interval between the first scroll event and the second scroll event is less than the third threshold, the corresponding continuous scroll distance after the second scroll event ends is 5 cm.
Taking the above continuous page scrolling event as an example, the page scrolling duration corresponding to the first scrolling event is 5ms and the scrolling distance is 2cm, the page scrolling duration corresponding to the second scrolling event is 3ms and the scrolling distance is 3cm, the page scrolling duration corresponding to the third scrolling event is 6ms and the scrolling distance is 2cm, so that the continuous page scrolling duration is 14ms and the continuous page scrolling distance is: 7(2+3+2) cm, corresponding to a page scrolling speed: 0.5 (cm/ms).
S205, the reciprocal of the page scrolling duration corresponding to the scrolling event of the current page is taken as the continuous scrolling speed corresponding to the page scrolling event, and step S206 is executed.
It can be understood that, if the first time interval is greater than the third threshold, the scrolling event of the current page is discontinuous scrolling, and the reciprocal of the page scrolling duration corresponding to the scrolling event of the current page is taken as the continuous scrolling speed corresponding to the page scrolling event.
For example, if the scroll time length of the current scroll event is 6ms, the scroll distance is 2cm, and the time interval between the current scroll event and the previous scroll event is greater than the third threshold, the continuous scroll time length of the current page is 6cm, and the continuous scroll speed is 1/3 (cm/ms).
Therefore, the accuracy of the acquired continuous page scrolling time length and continuous scrolling speed can be ensured no matter the current page scrolling continues to the last scrolling event or is independent of the last scrolling event.
S206, judging whether the continuous scrolling duration corresponding to the page scrolling event is greater than a first threshold value and whether the continuous scrolling speed is greater than a second threshold value, if so, executing S207, otherwise, returning to execute S200.
And S207, displaying the search prompt information in the page.
In the embodiment of the disclosure, whether search prompt information needs to be displayed is judged according to the continuous scrolling duration and the continuous scrolling speed of the page, and the search prompt information is displayed in the page only when the continuous scrolling duration corresponding to the continuous scrolling event of the page is greater than a first threshold and the continuous scrolling speed is greater than a second threshold, so as to prompt a user to search.
Therefore, when a page scrolling operation instruction is acquired, whether a current scrolling event of a page is a continuous scrolling event is judged firstly, if yes, the sum of the continuous scrolling duration corresponding to the previous page scrolling event and the scrolling duration of the page scrolling event is used as the continuous scrolling duration, the continuous scrolling frequency is determined according to the continuous scrolling duration and the continuous scrolling distance, and if the current scrolling event is a discontinuous scrolling event, the contact scrolling duration and the contact scrolling speed of the page are determined only according to the scrolling duration and the scrolling distance corresponding to the current scrolling event, so that the accuracy of the acquired page continuous scrolling duration and the continuous scrolling speed is ensured. And when the continuous rolling distance exceeds a first threshold value and the continuous rolling distance exceeds a second threshold value, displaying search prompt information. Therefore, the searching prompt information is displayed, so that the user can be helped to quickly acquire the required content, the time of the user is saved, and the display opportunity of the searching prompt information is ensured to be proper and unobtrusive.
In practical use, in the search prompt information in the embodiment of the present disclosure, a manner of starting the search function, such as a shortcut key identifier for starting the search function, or an operation manner for starting the search function, may be displayed. That is, in an embodiment of the present disclosure, the search prompt information may be shortcut key information, and as shown in fig. 3, after the search prompt information is displayed in the page, the method may further include:
s301, when a keyboard pressing event is monitored, acquiring a currently triggered key value.
Specifically, the user triggers the keyboard pressing time by pressing the keyboard, and when the keyboard pressing event is monitored, the currently triggered key value is obtained, which may be "Ctrl + K", for example.
S302, if the key value which is triggered currently is matched with the key value indicated by the shortcut key information, a search box is displayed in the page.
After the triggered key value is determined, judging whether the value is matched with the key value indicated by the shortcut key information, if so, displaying a search box in the page; and if not, displaying the search prompt information.
For example, the currently triggered key value is "Ctrl + K", and if the key value indicated by the shortcut key information is also "Ctrl + K", a search box is displayed in the page, so that the user starts a search function to search for the required information.
Therefore, when the currently triggered key value is matched with the key value indicated by the shortcut key information, the search box is displayed, and the user is ensured to accurately trigger the starting of the search box.
In another embodiment of the present disclosure, the search prompt information is used to indicate a call-out instruction of the search box, and then the embodiment of the present disclosure further includes: and if the monitored call-out instruction is the same as the call-out instruction of the search box, displaying the search box in the page. For example, the callout instruction includes, but is not limited to, a combination of "Ctrl + K" buttons, clicking on a control in the page.
It is understood that, when the search prompt information is displayed in the page in the embodiment of the present disclosure, the search prompt information may be displayed at any position of the page as long as the user can see the search prompt information. However, in one embodiment of the present disclosure, in order to ensure that the user can clearly see the search prompt information, the search prompt information may be displayed in a blank area of the page.
In order to display the search prompt information more clearly, the user can quickly distinguish the search prompt information from the elements of the page, and the display mode of the search prompt information can be different from the elements of the page. For example, the search prompt information may be displayed in a blank area of the page in the manner shown in fig. 4.
S401, acquiring a first display style of each element adjacent to the blank area of the page.
The related elements may include characters, pictures, hyperlinks, buttons, and the like.
Specifically, display styles of elements adjacent to a blank area of a page, such as font types, sizes, colors, and the like of characters, are acquired. When there are a plurality of display patterns of each element adjacent to the blank area of the page, at least one of the display patterns may be the first display pattern.
S402, displaying the search prompt information in a second display style in the blank area of the page, wherein the second display style is different from the first display style.
For example, if the first display style is a song style (font type), the second display style may be a regular font (type of font within the search prompt window).
For another example, if the first display style is black (which may be a font color or a picture color), the second display style may be yellow (a color of the search prompt window or a color of a font within the window).
Therefore, the search prompt information is displayed in at least one different display style in the display styles of the elements adjacent to the blank area of the page, the search prompt information can be displayed more clearly, the display effectiveness is guaranteed, the user can see the search prompt information, and the prompt information is prevented from being ignored.
In addition, in order to avoid interfering with the operation of the user, the display of the search prompt information should not affect the operation on other elements in the page. Where the other elements are elements of the page other than the search prompt window. To this end, in one embodiment of the present disclosure, before displaying the search prompt information in the page, the method may include: the event point attribute of the display window for displaying the search prompt information is set to be null, so that the normal operation of other elements in the page is not influenced by the display of the subsequent search prompt information, and the normal operation of other elements in the page by a user is ensured.
It can be understood that the precondition for the user to operate other elements in the page besides the search prompt window is that the user can clearly see the other elements, and therefore, the search prompt window does not affect the normal display of the other elements besides the operation on the other elements.
In order to prevent the search prompt window from affecting the normal display of other elements, in an embodiment of the present disclosure, before the search prompt window is displayed in the page, the method may further include: the transparency of the display window used for displaying the search prompt information is set as a preset value, namely the transparency of the display window used for displaying the search prompt information is set as the preset value.
It can be understood that the value of the transparency a (alpha) is between (0-1), the corresponding transparency range is 0-100%, the higher the value of the alpha is, the higher the opacity is, the more opaque the corresponding display window of the search prompt information is, the less clear the element blocked by the display window is, and when the transparency is 0, the display window representing the search prompt information is completely transparent (hidden); when the transparency is 100%, the display window representing the search prompt information is completely opaque.
Specifically, before the search prompt information is displayed in the page, the transparency of the display window of the search prompt information is set to a preset value, and in order to ensure that the display window of the search prompt information is clearly visible and elements blocked by the display window are also clearly visible, the size range of the preset value may be greater than 0 and less than 100%, for example, the size of the preset value may be 50%, and the transparency of the display window of the search prompt information is semi-transparent.
Therefore, the transparency of the display window of the search prompt information is set to a certain value, so that the display window of the search prompt information can float on the page element as a transparent floating layer, and the covered page element is ensured to be clearly visible.
As described above, the method before the search prompt information is displayed in the page and how the search prompt information is displayed, which is to prompt the user to perform the search operation, are described, so that after the search prompt information is displayed, the search prompt information can be controlled to slowly move within the page range to attract the eyes of the user; or, the search prompt information can be set to be displayed at a fixed position of the page, and the display position of the search prompt information is unchanged along with the scrolling of the page; alternatively, the information may be controlled to remain on the page for a certain time to ensure that the user has enough time to see and perform corresponding actions, that is, in an embodiment of the present disclosure, as shown in fig. 5, after the search prompt information is displayed in the page, the method may further include:
s501, controlling the display duration of the search prompt information on the page to reach a fourth threshold.
The fourth threshold may be determined according to actual requirements, and may be, for example, 2s (seconds). The display duration of the search prompt information on the page is controlled to reach the fourth threshold value, so that the user has enough time to see the prompt information clearly, the phenomenon that the user does not see or does not react to the prompt information due to the fact that the display time is too short is avoided, and invalid display is avoided.
It is understood that within a fourth threshold time after the search prompt information is displayed, the user may perform a corresponding search according to the prompt information, where the search prompt information prompt content may be, for example, "Tips: press Ctrl + K to search project (prompt: pressing shortcut key Ctrl + K to search the project) ", at this time, the user can enter the search function by pressing shortcut key" Ctrl + K "; in the fourth threshold time, the user may not perform any search action, which indicates that the user does not have the search intention at this time, and the search prompt information automatically disappears when the display duration of the search prompt information on the page reaches the fourth threshold.
That is, with continuing reference to fig. 5, after step S501, the method may further include:
and S502, when the display duration of the search prompt information on the page reaches a fourth threshold value, closing a display window for displaying the search prompt information.
Continuing with fig. 5, after closing the display window for displaying the search prompt information, i.e. after step S502 above, the method may further include:
s503, stopping monitoring the page scrolling event.
Specifically, if the display duration of the display window of the search prompt information on the page reaches the fourth threshold, which indicates that the user does not have the search intention, the display window of the search prompt information may be controlled to disappear.
In one embodiment, after the display window disappears, since the user knows how the page search function is used, no search prompt is needed, and the monitoring of the page scrolling event can be stopped. When the page is started again, the user who starts the page may be a new user, or in order to avoid that the user has forgotten how to start the page search function, the scheme provided by the embodiment of the disclosure may be utilized to display the search prompt information. Therefore, after the page is restarted, if the continuous scrolling time length of the page is greater than the first threshold value and the continuous scrolling speed is greater than the second threshold value, the search prompt information can be displayed again.
In another embodiment, after the display window disappears, the search prompt information can be displayed again when the continuous page scrolling time length is greater than the first threshold value and the continuous scrolling speed is greater than the second threshold value.
Therefore, the user can see the search prompt information, unnecessary display of the search prompt information is avoided, and resources are saved.
The embodiment of the disclosure also provides a display device for searching for prompt information, and fig. 7 is a structural block diagram of the display device for searching for prompt information according to the embodiment of the disclosure.
As shown in fig. 7, thedisplay device 100 for search prompt information includes: a listening module 10, a first determining module 20 and a first displaying module 30.
Wherein, the monitoring module 10 is configured to execute monitoring a page scrolling event; the first determining module 20 is configured to determine a continuous scrolling duration and a continuous scrolling speed corresponding to a page scrolling event when the page scrolling event is monitored; and the first display module 30 is configured to execute displaying search prompt information in the page when it is determined that the continuous scrolling time length is greater than the first threshold and the continuous scrolling speed is greater than the second threshold, wherein the search prompt information is used for indicating a trigger starting mode of the search box.
In one embodiment, the first determining module 20 includes: the first calculation unit is configured to execute the sum of the continuous scrolling duration corresponding to the previous page scrolling event and the current scrolling duration of the page scrolling event as the continuous scrolling duration corresponding to the page scrolling event when a first time interval between the current time and the ending scrolling time of the previous page scrolling event is less than or equal to a third threshold; and the second calculation unit is configured to determine the current continuous scrolling speed of the page according to the continuous scrolling time length and the continuous scrolling distance corresponding to the page scrolling event.
In one embodiment, the search prompt information is shortcut key information, and theapparatus 100 further includes: the second determination module is configured to execute acquiring a currently triggered key value when a keyboard pressing event is monitored; and the second display module is configured to execute displaying of the search box in the page if the currently triggered key value is matched with the key value indicated by the shortcut key information.
In one example, the first display module 30, when displaying the search prompt information in the page, is configured to perform: and displaying search prompt information in a blank area of the page.
In one example, the first display module 30 may include: a first acquisition unit configured to perform acquisition of a first display style of each element adjacent to a blank area of a page; and a display unit configured to perform displaying the search message prompt information in a second display style in a blank area of the page, wherein the second display style is different from the first display style.
In one example, thedisplay apparatus 100 of search prompt information may further include: the device comprises a first setting module and a second setting module, wherein the first setting module is used for setting the event point attribute of a display window for displaying search prompt information to be null.
In one example, thedisplay apparatus 100 of search prompt information may further include: and the second setting module is configured to set the transparency of a display window for displaying the search prompt information to be a preset value.
In one example, thedisplay apparatus 100 of search prompt information may further include: and the control module is configured to execute control on the display duration of the search prompt information on the page to reach a fourth threshold.
In one example, thedisplay apparatus 100 of search prompt information may further include: and the closing module is configured to close the display window for displaying the search prompt information when the display duration of the search prompt information on the page reaches a second threshold value.
In one example, the control module may be further configured to: stopping listening for page scrolling events.
In one example, the first determining module 20, in determining the continuous scrolling duration and the continuous scrolling speed corresponding to the page scrolling event, is configured to: when a first time interval between the current time and the finish rolling time of the previous page rolling event is greater than a third threshold value, taking the page rolling duration corresponding to the current page rolling event as the continuous rolling duration corresponding to the page rolling event; and determining the continuous scrolling speed according to the scrolling duration and the scrolling distance of the current page scrolling event.
It should be noted that, for a specific implementation of the display apparatus of the search prompt information, reference may be made to the specific implementation of the display method of the search prompt information, and details are not described here again to avoid redundancy.
According to the display device for searching the prompt information, when the continuous rolling time of the page exceeds the first threshold and the continuous rolling speed exceeds the second threshold, the search prompt information is displayed to help the user to quickly start the search function, so that the difficulty of using a product by the user is reduced, the time of the user is saved, and the use experience of the user is improved.
Fig. 8 is a block diagram of an electronic device according to an embodiment of the present disclosure.
As shown in fig. 8, theelectronic apparatus 200 includes: amemory 210 and aprocessor 220, and abus 230 connecting the various components, including thememory 210 and theprocessor 220.
Wherein, thememory 210 is used for storing the executable instructions of theprocessor 220; the processor 201 is configured to call and execute the executable instructions stored in the memory 202 to implement the display method of the search prompt information proposed by the above-mentioned embodiment of the present disclosure.
Bus 230 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 200 typically includes a variety of electronic device readable media. Such media may be any available media that is accessible byelectronic device 200 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 210 may also include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)240 and/orcache memory 250. Theelectronic device 200 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only,storage system 260 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 8, and commonly referred to as a "hard drive"). Although not shown in FIG. 8, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected tobus 230 by one or more data media interfaces.Memory 210 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the disclosure.
A program/utility 280 having a set (at least one) ofprogram modules 270, including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may comprise an implementation of a network environment, may be stored in, for example, thememory 210. Theprogram modules 270 generally perform the functions and/or methodologies of the embodiments described in this disclosure.
Electronic device 200 may also communicate with one or more external devices 290 (e.g., keyboard, pointing device,display 291, etc.), with one or more devices that enable a user to interact withelectronic device 200, and/or with any devices (e.g., network card, modem, etc.) that enableelectronic device 200 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 292. Also, theelectronic device 200 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via thenetwork adapter 293. As shown, thenetwork adapter 293 communicates with the other modules of theelectronic device 200 via thebus 230. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with theelectronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Theprocessor 220 executes various functional applications and data processing by executing programs stored in thememory 210.
It should be noted that, for the implementation process of the electronic device according to the embodiment of the present disclosure, reference is made to the foregoing explanation on the display of the search prompt information according to the embodiment of the present disclosure, and details are not repeated here.
According to the electronic equipment disclosed by the embodiment of the disclosure, when the processor calls and executes the executable instruction stored in the memory, when the continuous scrolling time of the page exceeds the first threshold and the continuous scrolling speed exceeds the second threshold, the search prompt information can be displayed to help the user to quickly start the search function, so that the difficulty of using the product by the user is reduced, the time of the user is saved, and the use experience of the user is improved.
In order to implement the foregoing embodiments, the present disclosure also provides a storage medium, where instructions executed by a processor of an electronic device enable the electronic device to perform the method for displaying search prompt information as described above.
In order to implement the foregoing embodiments, the present disclosure also provides a computer program product, which, when executed by a processor of an electronic device, enables the electronic device to execute the display method of the search hint information as described above.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.