Search prompting method, electronic equipment, storage medium and program product

By displaying dynamically changing carousel prompts and color strokes in the search box, the problem of constant prompts in the search box is solved, improving the interactive potential and visual experience of the user interface, and meeting the personalized needs of users.

CN120448006APending Publication Date: 2025-08-08HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411496797.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The prompts of the search box in the prior art are fixed and cannot meet the user's personalized needs and improve the interactive experience.

Method used

By displaying dynamically changing carousel prompts in the search box, including switching of the first and second styles, combining color strokes and streaming display effects, dynamic display and personalized adaptation of multiple prompts is achieved.

Benefits of technology

It improves the interactive potential and richness of the user interface, attracts user attention, provides richer information and visual experience, and meets users' needs for personalized and diversified interactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448006A_ABST
    Figure CN120448006A_ABST
Patent Text Reader

Abstract

The invention provides a search prompting method, electronic equipment, a storage medium and a program product, and the method comprises the steps that in response to a first operation on a target application, a first interface of the target application is displayed, the first interface comprises a search box, the search box comprises a first carousel prompting word displayed in a first style, and the first carousel prompting word is displayed in the first style; the target application has at least one preset carousel prompt and default prompt; the first style comprises that the first carousel prompt is displayed in a dynamically changing color, and / or the border of the search box is provided with a colored stroke; after the first carousel prompt word is displayed for a preset duration, displaying a default prompt word in a second style in the search box; by implementing the carousel function of the prompt words, the search box can dynamically display a plurality of different types of prompt words, thereby implementing dynamic change and personalized adaptation, meeting the requirements of users for personalized and diversified interactive experience, and improving the interactive experience of the users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a search prompt method, electronic device, storage medium, and program product. Background Art

[0002] With the rapid development of information technology, user interface (UI) design plays an increasingly important role in improving user experience. Especially in search engines and applications, the search box, as a key medium for user interaction with the system, has a direct impact on user convenience and satisfaction.

[0003] In conventional search box designs, a prompt is usually displayed. Prompts (Placeholders) are used to inform users in advance of the expected input format or content, thereby reducing user hesitation and errors during search, thereby improving the usability of the entire application.

[0004] However, in conventional technical implementations, once the prompts are set, they remain unchanged throughout the user's interaction with the search box, lacking dynamism and interactivity. This fixed display method cannot achieve dynamic changes and personalized adaptation, failing to meet users' demand for personalized and diverse interactive experiences, limiting the interactive potential of the user interface and the richness of the user experience. Summary of the Invention

[0005] The present application provides a search prompt method, electronic device, storage medium and program product to solve the problem in the prior art that the prompt language of the search box is fixed and difficult to meet the personalized needs of users and improve the interactive experience. The method aims to enhance the interactive potential of the user interface and enrich the user experience by dynamically changing the prompt language of the search box.

[0006] This application provides a search prompt method, including: In response to a first operation on a target application, a first interface of the target application is displayed, the first interface including a search box, the search box including a first carousel prompt displayed in a first style, wherein the target application has at least one pre-set carousel prompt and a default prompt; the first style includes: the first carousel prompt being displayed in a dynamically changing color, and / or the border of the search box having a colored stroke; After the first carousel prompt is displayed for a preset time, the default prompt is displayed in the search box in a second style; The first style is different from the second style.

[0007] The search prompt method provided in the embodiment of the present application displays a first carousel prompt in a first style in the search box, and after the first carousel prompt is displayed for a preset time, displays a default prompt in a second style in the search box. By implementing the carousel function of the prompt, the search box can dynamically display multiple prompts of different types, thereby achieving dynamic changes and personalized adaptation, meeting users' needs for personalized and diversified interactive experience, and improving users' interactive experience.

[0008] According to the search prompt method provided in the present application, after the first carousel prompt is displayed for a preset time, the method further includes: displaying the second carousel prompt in the first style in the search box, and after the second carousel prompt is displayed for a preset time, displaying the default prompt in the second style in the search box.

[0009] The search prompt method provided in this application displays the first carousel prompt and the second carousel prompt in sequence in the search box, and switches to the default prompt after the second carousel prompt is displayed. This method can continuously attract the user's attention and provide richer information and visual experience.

[0010] According to the search prompt method provided in the present application, before displaying the default prompt in the search box in the second style, the method further includes: displaying all the carousel prompts in sequence in the search box, wherein the display preset durations of the multiple carousel prompts are the same.

[0011] The search prompt method provided in this application sets the display preset duration of multiple carousel prompts to be the same. Since all carousel prompts have the same display duration, users can obtain a consistent visual experience when interacting with the search box, which helps users better understand and predict interface behavior.

[0012] According to the search prompt method provided in the present application, the first carousel prompt is displayed in the first style in the search box, including: the first carousel prompt is displayed in multiple colors in sequence from the starting position to the ending position, and the color displayed at each position changes continuously to form a flowing display effect moving from the starting position to the ending position.

[0013] The search prompt method provided in the present application forms a streamer display effect that moves from a starting position to an end position. The streamer display effect makes the search box prompt more eye-catching, attracts the user's attention, and increases the user's attention to the search box.

[0014] According to the search prompt method provided in the present application, after the first carousel prompt is displayed for a preset time, the second carousel prompt is displayed in the search box in the first style, including: when the first carousel prompt is displayed for the preset time, the entrance animation of the first carousel prompt is displayed; after the exit animation of the first carousel prompt is completed, the entrance animation of the second carousel prompt is displayed, and the second carousel prompt is displayed in the search box in the first style.

[0015] The search prompt method provided in this application achieves a smooth visual effect transition by adding an exit animation at the end of the first carousel prompt and adding an entry animation at the beginning of the second carousel prompt.

[0016] According to the search prompt method provided in the present application, the exit animation and the entrance animation are played through an animation playback tool, and the carousel prompt is displayed through the carousel prompt control of the search box control; the exit animation of the first carousel prompt and the entrance animation of the second carousel prompt are played in the search box by calling the animation playback tool through the carousel prompt control.

[0017] The search prompt method provided in this application centrally manages the carousel prompts in the carousel prompt control, and displays the carousel prompts one by one through the search box control, which simplifies the code logic and improves maintenance efficiency.

[0018] According to the search prompt method provided by the present application, the multiple colors are added to the carousel prompt by a first coloring tool, and the first coloring tool includes a first brush tool, a first shader, and a transformation matrix; The first carousel prompt is displayed in multiple colors from the starting position to the ending position, and the color displayed at each position changes continuously to form a streamer display effect of moving from the starting position to the ending position, specifically including: Setting a transformation matrix for the first shader, wherein the transformation matrix is used to control the movement offset of multiple colors relative to a starting position; Setting color values of multiple colors and positions of multiple color points by using the first shader, and setting the first shader to the first brush tool; wherein the color values of the multiple colors are arranged in a preset order to form a highlight area; The first brush tool is used to render a first carousel prompt that displays multiple colors in sequence from a starting position to an ending position based on the color values of multiple colors and the positions of the multiple color points, and the color of each display area is controlled to change continuously according to the movement offset, forming a flowing display effect in which the highlighted area moves from the starting position to the ending position.

[0019] The search prompt method provided in the present application uses a first coloring tool to enable the carousel prompt to display multiple colors in sequence from the starting position to the end position, and the display areas of multiple colors continuously change to form a flowing display effect, which can attract the user's attention and improve the visibility and attractiveness of the prompt.

[0020] The search prompt method provided in the present application controls the color of each display area to change continuously according to the moving offset, specifically including: determining the changing rate of the moving offset according to the preset duration and the length of the first carousel prompt; through the transformation matrix, controlling the change of the moving offset according to the changing rate to control the color of each display area to change continuously.

[0021] The search prompt method provided in this application can achieve a smooth transition of color on the carousel prompt by precisely controlling the rate of change of the moving offset, forming a continuous highlight display effect from the starting position to the end position, thereby enhancing the smoothness of the visual effect.

[0022] According to the search prompt method provided by the present application, the colored stroke is added by a second coloring tool, and the second coloring tool includes: a second brush tool, a second shader, and a stroke tool; Obtaining a stroke background of the search box by using the stroke tool, and setting a second shader on the second brush tool; the stroke background includes a stroke width and a fillet radius; Obtaining a stroke color through the second shader, and setting the second shader to the second brush tool; The stroke color is added to the border of the search box by the second brush tool according to the stroke width and the fillet radius, so that the search box displays the colored stroke.

[0023] The search prompt method provided in this application can make the search box more prominent on the interface by adding a colored stroke to the search box, attracting the user's attention, thereby enhancing the user's visual focus on the search box.

[0024] According to the search prompt method provided by the present application, before displaying the default prompt in the search box in the second style, the method further includes: canceling the colored stroke.

[0025] This application reduces visual interference and provides users with a clean visual environment by canceling the colored border when all carousel prompts are displayed.

[0026] The present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the search prompt method described above is implemented.

[0027] The present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which implements any of the above-described search prompt methods when executed by a processor.

[0028] The present application also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the above-mentioned search prompt methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0030] Figure 1 It is a flowchart of the search prompt method provided in an embodiment of the present application.

[0031] Figure 2a-2d This is a schematic diagram of the interface changes of the search prompt method provided in an embodiment of the present application.

[0032] Figure 3a-3d This is a schematic diagram of the color change of the first carousel prompt provided in an embodiment of the present application.

[0033] Figure 4 This is a schematic diagram of a control for implementing a search prompt method provided in an embodiment of the present application.

[0034] Figure 5 Schematic diagram of the search box provided in an embodiment of the present application.

[0035] Figure 6a-6d This is the switching process from the first carousel prompt to the second carousel prompt provided in the embodiment of the present application.

[0036] Figure 7a-7b This is a schematic diagram of the interface for clicking on the carousel prompt provided in an embodiment of the present application.

[0037] Figure 8 This is a timing flow chart of the search prompt method provided in an embodiment of the present application.

[0038] Figure 9 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] To make the objectives, technical solutions, and advantages of each embodiment of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0040] In the embodiments of this application, "at least one" refers to one or more, and "plurality" refers to two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, "at least one of a, b, or c" can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.

[0041] The terms used in the various embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in the specification and appended claims of this application, the singular expressions "a," "an," "said," "above," "the," and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in this application refers to and encompasses any and all possible combinations of one or more of the listed items.

[0042] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0043] The search box described in the embodiment of the present application is used in multiple applications, such as photo album applications, shopping applications, browser applications, etc. The prompts in the search box will vary depending on the actual application usage scenario.

[0044] For example, during specific holidays or events, users expect the search box of the browser application to display prompts related to the holiday or event to enhance the festive atmosphere or sense of participation in the event; for example, based on the usage habits or preferences of different users, users expect the prompts of the shopping application to be automatically adjusted to provide more considerate services.

[0045] In order to achieve the above effect, the embodiment of the present application discloses a search prompt method that can be used in a terminal device. Figure 1 ,include: Step 101: In response to a first operation on a target application, a first interface of the target application is displayed, where the first interface includes a search box, and the search box includes a first carousel prompt displayed in a first style.

[0046] The first style includes: displaying the first carousel prompt in a dynamically changing color and / or having a colored border around the search box. Displaying the carousel prompt in the first style not only improves the aesthetics of the user interface but also adds a dynamic visual effect when users interact with the search box, thereby increasing user engagement and satisfaction.

[0047] The target application may be of various types, such as an e-commerce application, a travel booking application, or a system application, such as an album application, a note application, and the like.

[0048] See also Figure 2a and Figure 2b Taking the Gallery app as an example, a user can click Gallery app icon 200 displayed on the system desktop (the system desktop may also include other application icons or controls, not shown here). The electronic device receives the user's click on icon 200 and displays the first interface of the Gallery app—"Album" interface 201a. A search box 202 is displayed at the top of album interface 201a. Search box 202 includes a first carousel prompt 203—"Try searching for photos of 'playing at the beach'."

[0049] The first operation can be a user clicking an application icon on the system desktop to open the application and display the first interface of the target application. The first operation can also be any other operation in the target application that returns to the first interface with the search bar.

[0050] The target application has at least one pre-set carousel prompt and a default prompt. The default prompt and the carousel prompt can be statically defined in the application or dynamically generated based on user behavior, context information, or server-side data.

[0051] Default prompts can be generated based on the user's search history and behavior patterns. For example, if the user frequently searches for information related to "travel," the target app can set the default prompt to "Search for your next travel destination." Alternatively, the default prompt can be statically defined, such as "Search for places."

[0052] For example, an app could integrate with a dynamic content management system, allowing administrators to add, edit, or delete carousel prompts through a single interface. These prompts could be based on current marketing campaigns, seasonal events, or trending topics. The app could use algorithms to automatically generate carousel prompts based on current search trends, user behavior, or pop culture events. For example, if a particular movie is trending, the algorithm might suggest "Search for the latest movie reviews" as one of the carousel prompts.

[0053] Additionally, in some apps, users can create their own carousel prompts and upload them through the app’s settings interface, which increases user engagement and personalized experience.

[0054] Step 102: After the first carousel prompt is displayed for a preset time, a default prompt is displayed in the search box in a second style.

[0055] The first style is different from the second style. In this embodiment, the second style can be a style different from the first style, for example, a default style without display effects, specifically as follows: Figure 2c shown.

[0056] exist Figure 2c In the "Album" interface 201b, the search box 202 displays a default prompt 205 - "Photos, People, Places...". Figure 2c and Figure 2b As can be seen from the comparison, the display styles of the default prompt 205 and the first carousel prompt 203 are different.

[0057] A timer can be set or the animation framework's delay function can be used to ensure that the first carousel prompt 203 is displayed for a sufficient duration. For example, the preset duration can be set to 3 seconds. Of course, the duration can be dynamically adjusted based on user behavior or feedback, such as reducing the display time of unpopular prompts or increasing the display time of popular prompts.

[0058] When the display duration of the first carousel prompt 203 ends, the display of the default prompt is automatically triggered by the programming logic of the carousel prompt control. The triggering mechanism can be an event listener that monitors the animation end of the first carousel prompt or the timer timeout event.

[0059] Specifically, the first style may include a specific font, color, size, or animation effect, such as text color gradient, underline, or text jump.

[0060] The search prompt method provided in the embodiment of the present application displays a first carousel prompt in a first style in the search box, and after the first carousel prompt is displayed for a preset time, displays a default prompt in a second style in the search box. By implementing the carousel function of the prompt, the search box can dynamically display multiple prompts of different types, thereby achieving dynamic changes and personalized adaptation, meeting users' needs for personalized and diversified interactive experience, and improving users' interactive experience.

[0061] Optionally, there may be multiple carousel prompts. After all the carousel prompts are displayed in sequence in the search box, a default prompt is displayed in the search box in the second style.

[0062] Correspondingly, after the first carousel prompt is displayed for a preset time, the method further includes: displaying a second carousel prompt in a first style in the search box, and after the second carousel prompt is displayed for a preset time, displaying a default prompt in a second style in the search box.

[0063] The preset display duration for multiple carousel prompts is the same. For this preset duration, you can set a timer or use the animation framework's delay function to ensure that the first carousel prompt is displayed for a sufficient length of time. For example, set the preset duration to 3 seconds. Of course, the duration can be dynamically adjusted based on user behavior or feedback, such as reducing the display time of unpopular prompts or increasing the display time of popular prompts.

[0064] When the first carousel prompt ends, the second carousel prompt is automatically triggered by the programming logic of the carousel prompt control. The triggering mechanism can be an event listener that listens for the end of the animation of the first carousel prompt or the timer timeout event.

[0065] See also Figure 2d ,exist Figure 2d In the "Album" interface 201c, a second carousel prompt 204 is displayed in the search box 202, namely, "Try searching for photos of 'Jungle Exploration'". Then, after the second carousel prompt 204 is displayed for a preset time, a default prompt 205, namely, "Photos, People, Places", is displayed in the search box 202 in a second style. Figure 2c shown.

[0066] In addition, when the first carousel prompt is displayed in the search box in the first style, the first carousel prompt is displayed in multiple colors from the starting position to the ending position, and the color displayed at each position changes continuously to form a streamer display effect of moving from the starting position to the ending position.

[0067] The embodiment of the present application adds multiple colors of mobile display to the starting position and end position of the first carousel prompt within a preset display duration, thereby ensuring the synchronization of the color change of the first carousel prompt and the display of the first carousel prompt in time, creating a smooth and coordinated visual effect and avoiding jumps or disconnections in the visual effect.

[0068] Specifically, by setting the color values of multiple colors, a highlight area is formed. The color value can be an RGB value, and the highlight area is formed by the color difference between the color values. For example, the color values of the multiple colors are set to (0, 0, 255), (128, 0, 128), (255, 255, 0) and (255, 165, 0), which correspond to blue, purple, yellow and orange respectively. Then the display areas corresponding to yellow and orange form highlight areas. By setting the display areas of multiple colors to change continuously, a display effect is formed in which the highlight area moves from the starting position to the end position.

[0069] See also Figure 3a-3d , Figure 3a-3d The first carousel prompt 203 in the search box 202, "Try searching for 'photos of playing at the beach'," shows a light effect. The gradient colors of red, yellow, blue, and purple form a highlight area 2031, with the red and yellow colors forming a highlight area 2031. The highlight area 2031 moves from the start position of the carousel prompt to the end position.

[0070] It should also be noted that Figure 3a-3d It is just a hint of the light effect on the carousel prompt at a certain moment. Figure 3a to Figure 3b ,as well as Figures 3b to 3c There is a continuous transformation between them.

[0071] In the above example, when the search box displays the carousel prompt, the search box displays a colored stroke, such as Figure 3a-3d As shown in , the search box is made more prominent on the interface, attracting the user's attention and thus enhancing the user's visual focus on the search box.

[0072] The following is a schematic description of the controls involved in the embodiment of the present invention. In order to realize the carousel function of the carousel prompt, see Figure 4 This feature involves the HwSearchView control within the search box. HwSearchView is a UI component used to implement search functionality. The HwSearchView control provides an integrated text input box, a search button, and optional search suggestions within the interface. It allows users to easily enter queries and submit search requests.

[0073] This solution adds a corresponding carousel prompt control, ViewFlipper, to the search box control to implement the carousel prompt's rotation function. The carousel prompt control ViewFlipper is a native control that includes multiple subviews, each of which carries a corresponding carousel prompt. Furthermore, the carousel prompt control ViewFlipper provides the ability to flip the subviews up and down, enabling the carousel prompt to enter and exit.

[0074] Specifically, the carousel prompts are added to the carousel prompt control of the search box control, and the carousel prompts in the carousel prompt control are displayed one by one in the search box through the search box control; the carousel prompts displayed in the search box are flipped and switched through the carousel prompt control.

[0075] This application centrally manages carousel prompts in a carousel prompt control, displays carousel prompts one by one through a search box control, and flips and switches carousel prompts through a carousel prompt control, thereby achieving efficient organization and control of carousel prompts, simplifying code logic and improving maintenance efficiency.

[0076] The coloring function of the carousel prompt in this embodiment involves the SearchView control in the search box control, which is derived from the SearchView of the Android framework, such as Figure 4 As shown in the figure, the carousel prompt text is colored by adding the first coloring tool to the search box control.

[0077] The first coloring tool includes a first brush tool, a first shader, and a transformation matrix, and is used to add multiple colors to the carousel prompt.

[0078] A transformation matrix is set for the first shader LinearGradient, and the transformation matrix is used to control the movement offset of multiple colors relative to the starting position. The offset is in pixels and changes over time.

[0079] The color values of the multiple colors and the positions of the multiple color points are set by a first shader LinearGradient, and the first shader is set in a first brush tool Paint, wherein the color values of the multiple colors are arranged in a preset order to form a highlight area.

[0080] The first brush tool Paint is a brush for drawing. The first brush tool Paint is used to render a first carousel prompt that displays multiple colors in sequence from a starting position to an end position based on the color values of multiple colors and the positions of the multiple color points. The color of each display area is controlled to change continuously according to the movement offset, forming a flowing display effect in which the highlighted area moves from the starting position to the end position.

[0081] It should be noted that the position of each color's dot is not absolute, but relative to the start of the carousel prompt. For example, a dot position of 0 indicates that the color is displayed at the start of the carousel prompt; a dot position of 1 indicates that the color is displayed at the end of the carousel prompt.

[0082] For example, there are four colors, namely 1, 2, 3, and 4. By setting the color values of colors 1-4, colors 3 and 4 form a highlight area. For example, colors 1-4 can be set to represent purple, blue, red, and yellow respectively.

[0083] By setting the movement offset of each color through the transformation matrix, the color corresponding to the starting position is 3, then the colors corresponding to the first carousel prompt are (3, 4, 2, 1), and the corresponding points of the various colors are (0, 0.4, 0.8, 1). Figure 3a shown.

[0084] Among them, 0 represents the stake point position corresponding to the starting position of the carousel prompt, 1 represents the stake point position corresponding to the ending position of the carousel prompt, and 0.2, 0.4, 0.6, and 0.8 below represent the middle position between the starting position and the ending position of the carousel prompt, respectively.

[0085] Then, to achieve the moving effect of the highlighted area, the color changes corresponding to the first carousel prompt are as follows: The colors corresponding to the first carousel prompt are (2, 3, 4, 2, 1), and the corresponding point positions of the various colors are (0, 0.2, 0.4, 0.8, 1).

[0086] The colors corresponding to the first carousel prompt are (1, 2, 3, 4, 2, 1), and the corresponding points of the various colors are (0, 0.2, 0.4, 0.6, 0.8, 1). Figure 3b shown.

[0087] The colors corresponding to the first carousel prompt are (1, 2, 3, 4, 2), and the corresponding point positions of the various colors are (0, 0.4, 0.6, 0.8, 1).

[0088] The colors corresponding to the first carousel prompt are (1, 2, 3, 4), and the corresponding points of the various colors are (0, 0.2, 0.4, 0.8, 1). Figure 3c shown.

[0089] The color corresponding to the first carousel prompt is (1, 2, 3), and the position of the points corresponding to the various colors are (0, 0.4, 1). Figure 3d shown.

[0090] In order to achieve the flowing light effect of the carousel prompt during the carousel process, in an embodiment of the present invention, the change rate of the movement offset is determined according to the preset duration and the length of the first carousel prompt, and the change of the movement offset is controlled according to the change rate through the transformation matrix to control the continuous change of the color of each display area.

[0091] For example, the preset duration of the first carousel prompt is 3 seconds, and the length of the first carousel prompt is 10 characters. If you want to achieve dynamic transformation of the highlighted area from the starting position to the end position within 3 seconds, you need to determine the change rate of the moving offset based on the length of the first carousel prompt and the preset duration.

[0092] Furthermore, the first style also includes a colored border around the search box. In this embodiment, the function of displaying a colored border around the search box is implemented using a second coloring tool. The second coloring tool includes: a second brush tool, Paint; a second shader, LinearGradient; and a GradientDrawable, a stroke tool.

[0093] The principle behind color strokes differs from that used to color the carousel prompts: color strokes can be static, implemented using the GradientDrawable tool. This doesn't require color position transformation, and therefore doesn't require a transformation matrix. The GradientDrawable tool provides rounded-corner strokes. By assigning a second shader, LinearGradient, to the Paint brush tool, based on the GradientDrawable, the search box border is colored when the carousel prompt begins and hidden when the carousel prompt ends.

[0094] Specifically, see Figure 5 , obtain the stroke background of the search box 202 through the stroke tool, the stroke background includes the stroke width 2021 and the corner radius 2022; obtain the stroke color through the second shader; use the second brush tool to add the stroke color to the border of the search box 202 according to the stroke width 2021 and the corner radius 2022, so that the search box 202 displays a colored stroke.

[0095] This application uses a second coloring tool, including a second brush tool, a second shader, and a stroke tool, to customize a personalized color stroke for the search box. The color stroke increases the visual layering of the search box. By setting the stroke width and corner radius, the outline of the search box can be highlighted, making it more eye-catching in the interface.

[0096] When all the carousel prompts are displayed, the color stroke is canceled accordingly to reduce visual interference and provide users with a clean visual environment.

[0097] After the first carousel prompt is displayed for a preset time, the second carousel prompt is displayed in the search box in the first style, including: when the first carousel prompt is displayed for the preset time, the entrance animation of the first carousel prompt is displayed; after the entrance animation of the first carousel prompt is completed, the entrance animation of the second carousel prompt is displayed, and the second carousel prompt is displayed in the search box in the first style.

[0098] After the second carousel prompt is displayed for the preset time, the default prompt is displayed in the search box in the second style, specifically including: when the second carousel prompt is displayed, the entrance animation of the second carousel prompt is played in the search box; after the entrance animation of the second carousel prompt is completed, the entrance animation of the default prompt is displayed.

[0099] Among them, there are many kinds of exit and entrance effects of the carousel prompts, as well as the entrance effects of the default prompts, such as fade in and fade out, scroll up or down, rotation and disappearance, etc. Figure 6 shows the switching process from the first carousel prompt to the second carousel prompt. Figure 6a The first carousel prompt is shown. When the first carousel prompt is displayed for the preset duration, it will show an upward scrolling appearance effect. Figure 6b ; Then, after the first carousel prompt's entrance animation is completed, the second carousel prompt's entrance animation is displayed. Figure 6c ; After the second carousel prompt's entrance animation is completed, the second carousel prompt will be displayed in the first style. Figure 6d .

[0100] The exit and entrance animations in this embodiment are played through the animation playback tool, the carousel prompts are displayed through the carousel prompt control of the search box control, and the default prompts are displayed through the default prompt control.

[0101] Among them, the entrance and exit animations of the second carousel prompt are played in the search box by calling the animation playback tool Animator through the carousel prompt control, and the entrance animation of the default prompt is played in the search box by calling the animation playback tool Animator through the default prompt control.

[0102] The embodiment of the present application uses a carousel prompt control + an animation playback tool + a default prompt control to realize switching display between carousel prompts and switching display between carousel prompts and default prompts.

[0103] In addition, it should be noted that in order to ensure the smooth connection between the appearance animation of the first carousel prompt and the entrance animation of the second carousel prompt, it is necessary to set the flipping time and the flipping animation curve in this embodiment. Among them, the flipping time can be set to a fixed value, for example, it is set to 150 milliseconds, and the appearance special effects of the first carousel prompt and the entrance special effects of the second carousel prompt need to be played within the flipping time. The flipping animation curve is used to change the speed when playing the appearance animation and the entrance animation during the flipping process, so that the animation is no longer a monotonous uniform motion, but can be accelerated or decelerated as needed, so that the appearance animation and the entrance animation look more natural and smoother.

[0104] For example, in a specific implementation, there are a total of 5 carousel prompts, the preset display time of each carousel prompt is 3 seconds, the flip time between two adjacent carousel prompts is 150 milliseconds, and the total time taken for the carousel of 5 carousel prompts is 5*3+0.15*4=15.6 seconds.

[0105] Furthermore, if the user clicks any position in the search box 202 during the display of the carousel prompt, the search keyword corresponding to the carousel prompt will be switched and displayed in the search box. Figure 7a As shown, during the display of the second carousel prompt, the user clicks on the second carousel prompt 204 in the search box 202 - "Try to search for photos of 'Jungle Exploration'", and the search box switches to display the search keyword 206 "Jungle Exploration" corresponding to the second carousel prompt 204, and an input method interface 207 pops up, as shown in FIG. Figure 7b If the user does not modify the search keyword 206, they click the search button 208 in the input method interface 207 to perform a search operation using the keyword 206 "Jungle Exploration". If the user modifies the search keyword 206, they can modify the keyword 206 in the search box 202 through the input method interface 207 and then perform a search operation using the modified keyword.

[0106] In order to further understand the technical solutions of the embodiments of the present application, Figure 8 The following is a schematic diagram showing the timing flow of the search prompt method according to an embodiment of the present application. 801. The user clicks a target application icon on the desktop to open the target application.

[0107] The target application has a plurality of pre-set carousel prompts and a default prompt.

[0108] 802. Display a first interface of a target application.

[0109] Among them, the first interface includes a search box.

[0110] 803. Use the search box control to add multiple carousel prompts as multiple subviews (views) of the carousel prompt control to the carousel prompt control.

[0111] 804. Start the carousel prompt control (viewFlipper) through the search box control to rotate the carousel prompts.

[0112] 805. Call a second coloring tool through the search box control to add a colored stroke to the border of the search box.

[0113] 806. Display a first carousel prompt in a first style within a preset time period through a carousel prompt control.

[0114] During the display of the first carousel prompt, multiple colors are added to the first carousel prompt through the first coloring tool, and the color displayed at each position changes continuously to form a streamer display effect that moves from the starting position to the ending position.

[0115] 807. When the first carousel prompt is displayed for a preset time, an appearance animation is displayed for the first carousel prompt.

[0116] The preset duration of the first carousel prompt may be 3 seconds.

[0117] 808. After the entrance animation of the first carousel prompt is completed, the entrance animation of the second carousel prompt is displayed.

[0118] The first carousel prompt's exit animation can be scrolling out from the search box; after the first carousel prompt exits, the second carousel prompt enters with an entry animation, such as scrolling in from the bottom of the search box. Figure 6a-6d shown.

[0119] 809. Display a second carousel prompt in the first style in the search box through the carousel prompt control.

[0120] During the process of displaying the first carousel prompt, a first color is added to the second carousel prompt by a first coloring tool, and a second color is added to the second carousel prompt to move from a starting position to an ending position.

[0121] 810. When the second carousel prompt ends, the appearance animation of the second carousel prompt is played in the search box.

[0122] 811. After the first carousel prompt's entrance animation is completed, the default prompt's entrance animation is displayed.

[0123] The second carousel prompt's appearance animation can be scrolling up from the search box; after the second carousel prompt exits, the default prompt enters with an entrance animation, such as scrolling in from the bottom of the search box.

[0124] 812. Display the default prompt in the search box in the second style through the default prompt control.

[0125] The default prompt is displayed as Figure 2d shown.

[0126] Through steps 801-812, a search box function with a dynamic carousel prompt and a dynamically changing color for the carousel prompt is provided, thereby enhancing the interactive potential of the user interface and enriching the user experience.

[0127] Figure 9 This is a schematic diagram of the structure of an electronic device embodiment of the present application, such as Figure 9 As shown, an embodiment of the present application also provides an electronic device 900, including: one or more processors 901 and one or more memories 902; the one or more processors 901 are coupled to the one or more memories 902, and the one or more memories are used to store computer programs, and the computer programs include computer instructions. When the one or more processors 901 execute the computer instructions, the electronic device implements the various processes of the above-mentioned search prompt method embodiment when executing, and can achieve the same technical effect. To avoid repetition, they will not be repeated here.

[0128] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0129] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium includes one or more computer programs. When the computer program is run on an electronic device, the electronic device executes the method in the above embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.

[0130] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium designed to carry or store the desired program code in the form of instructions or data structures and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, the terms disk and optical disk include disks, laser disks, optical disks, digital versatile disks (DVDs), floppy disks and Blu-ray discs, as well as semiconductor media (such as solid-state drives). Disks typically reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above are also included within the scope of computer-readable media.

[0131] The computer program product includes one or more computer programs. When the computer program is run on an electronic device, the electronic device is caused to generate, in whole or in part, the process or function described in the embodiments of the present application. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer program may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method.

[0132] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to produce a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.

[0133] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a more preferred embodiment. Based on this understanding, the technical solution of this application, or the part that contributes to the existing technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of this application.

[0134] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0135] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for example, the division of the units is merely a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection of some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0136] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0137] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0138] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the present application is not limited to the above specific implementation methods. The above specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims. For example, any modifications, equivalent replacements, improvements, etc. made are all within the protection of the present application.

Claims

1. A search prompt method, characterized in that: Used in electronic equipment, including: In response to a first operation on a target application, a first interface of the target application is displayed, the first interface including a search box, the search box including a first carousel prompt displayed in a first style, wherein the target application has at least one pre-set carousel prompt and a default prompt; the first style includes: the first carousel prompt being displayed in a dynamically changing color, and / or the border of the search box having a colored stroke; After the first carousel prompt is displayed for a preset time, the default prompt is displayed in the search box in a second style; The first style is different from the second style.

2. The search prompt method according to claim 1, wherein: After the first carousel prompt is displayed for a preset time, the method further includes: A second carousel prompt is displayed in the search box in a first style. After the second carousel prompt is displayed for a preset time period, the default prompt is displayed in the search box in a second style.

3. The search prompt method according to claim 1 or 2, characterized in that: Before displaying the default prompt in the search box in the second style, the method further includes: sequentially displaying all of the carousel prompts in the search box, wherein the preset display durations of the multiple carousel prompts are the same.

4. The search prompt method according to claim 1, wherein: Displaying the first carousel prompt in the search box in the first style includes: the first carousel prompt is displayed in multiple colors in sequence from the starting position to the ending position, and the color displayed at each position changes continuously to form a flowing display effect moving from the starting position to the ending position.

5. The search prompt method according to claim 2, wherein: After the first carousel prompt is displayed for a preset time, a second carousel prompt is displayed in the search box in the first style, including: When the first carousel prompt is displayed for the preset time period, an appearance animation effect is displayed for the first carousel prompt; After the first carousel prompt's entrance animation is completed, the second carousel prompt's entrance animation is displayed, and the second carousel prompt is displayed in the search box in the first style.

6. The search prompt method according to claim 5, characterized in that: The exit animation and the entrance animation are played through an animation playback tool, and the carousel prompt is displayed through a carousel prompt control of a search box control; The entrance animation of the first carousel prompt and the entrance animation of the second carousel prompt are played in the search box by calling an animation playback tool through the carousel prompt control.

7. The search prompt method according to claim 4, characterized in that: The multiple colors are added to the carousel prompt by a first coloring tool, wherein the first coloring tool includes a first brush tool, a first shader, and a transformation matrix; The first carousel prompt is displayed in multiple colors from the starting position to the ending position, and the color displayed at each position changes continuously to form a streamer display effect of moving from the starting position to the ending position, specifically including: Setting a transformation matrix for the first shader, wherein the transformation matrix is used to control the movement offset of multiple colors relative to a starting position; Setting color values of multiple colors and positions of multiple color points by using the first shader, and setting the first shader to the first brush tool; wherein the color values of the multiple colors are arranged in a preset order to form a highlight area; The first brush tool is used to render a first carousel prompt that displays multiple colors in sequence from a starting position to an ending position based on the color values of multiple colors and the positions of the multiple color points, and the color of each display area is controlled to change continuously according to the movement offset, forming a flowing display effect in which the highlighted area moves from the starting position to the ending position.

8. The search prompt method according to claim 7, characterized in that: Control the color of each display area to change continuously according to the moving offset, including: Determining a rate of change of the movement offset according to the preset duration and the length of the first carousel prompt; The movement offset is controlled to change according to the change rate through the transformation matrix, so as to control the color of each display area to change continuously.

9. The search prompt method according to claim 1, wherein: The colored stroke is added by a second coloring tool, the second coloring tool comprising: a second brush tool, a second shader, and a stroke tool; Obtaining a stroke background of the search box by using the stroke tool, and setting a second shader on the second brush tool; the stroke background includes a stroke width and a fillet radius; Obtaining a stroke color through the second shader, and setting the second shader to the second brush tool; The stroke color is added to the border of the search box by the second brush tool according to the stroke width and the fillet radius, so that the search box displays the colored stroke.

10. The search prompt method according to claim 1, 2 or 9, characterized in that: Before displaying the default prompt in the search box in the second style, the method further includes: Cancels the colored stroke.

11. An electronic device, characterized in that: include: One or more processors and one or more memories; the one or more processors are coupled to the one or more memories, the one or more memories are used to store a computer program, the computer program includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method according to any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium includes one or more computer programs. When the computer programs are run on an electronic device, the electronic device is enabled to perform the method according to any one of claims 1 to 10.

13. A computer program product, characterized in that The computer program product comprises one or more computer programs, and when the computer program is run on an electronic device, the electronic device is enabled to perform the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Character gradual change effect implementation method and device, equipment and storage medium

    CN112329386A

  • Search page display method and device, equipment, medium and product

    CN115238156A