CN114139075A - Display method, device and terminal of search interface, storage medium and product - Google Patents

Display method, device and terminal of search interface, storage medium and product Download PDF

Info

Publication number
CN114139075A
CN114139075A CN202111302065.8A CN202111302065A CN114139075A CN 114139075 A CN114139075 A CN 114139075A CN 202111302065 A CN202111302065 A CN 202111302065A CN 114139075 A CN114139075 A CN 114139075A
Authority
CN
China
Prior art keywords
option
recommended
recommendation
options
character length
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111302065.8A
Other languages
Chinese (zh)
Inventor
张超然
王华林
陈晓南
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202111302065.8A priority Critical patent/CN114139075A/en
Publication of CN114139075A publication Critical patent/CN114139075A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Abstract

The application discloses a display method, a display device, a terminal, a storage medium and a product of a search interface, and belongs to the technical field of computers. The embodiment of the application provides a display method of a search interface, which comprises the steps of obtaining a recommended option sequence, wherein the recommended option sequence comprises a plurality of recommended options; determining the character length of each recommended option based on the screen resolution of the terminal; and displaying the first N recommended options based on the sequence of the plurality of recommended options, when the (N + 1) th recommended option is displayed, if the character length of the (N + 1) th recommended option is larger than the remaining character length which can be displayed in the current row, determining a target recommended option from the recommended options positioned after the (N + 1) th recommended option in the recommended option sequence, wherein the character length of the target recommended option is not larger than the remaining character length, and displaying the target recommended option in the current row. The method fills the blank area of the current row by the target recommendation option, thereby improving the interface display effect.

Description

Display method, device and terminal of search interface, storage medium and product
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a terminal, a storage medium, and a product for displaying a search interface.
Background
Currently, a plurality of applications are generally installed on a terminal of a user, and the plurality of applications may be a shopping application, an instant distribution application, a video application, or the like. Taking a shopping application as an example for explanation, when a user wants to search for an item, the terminal displays a search interface, and a plurality of recommendation options are displayed in the search interface, where the plurality of recommendation options may be options of items searched by the user history, and may also be options of items recommended for the user by a server of the shopping application.
In the related art, a terminal displays a plurality of recommendation options in a streaming layout manner, that is, sequentially displays the plurality of recommendation options according to a predetermined display sequence.
However, because the character length of the recommended option is uncertain, and the terminal screen is limited in width, if the character length of the recommended option to be displayed at the end of a line is too long and is not displayed, the line is displayed in a changed manner, so that a large blank area exists in the line, and the interface display effect is poor.
Disclosure of Invention
The embodiment of the application provides a display method, a display device, a terminal, a storage medium and a product of a search interface, which can improve the display effect of the interface. The technical scheme is as follows:
in one aspect, a method for displaying a search interface is provided, and the method includes:
acquiring a recommendation option sequence, wherein the recommendation option sequence comprises a plurality of recommendation options;
determining the character length of each recommended option based on the screen resolution of the terminal;
displaying the first N recommended options based on the sequence of the plurality of recommended options, wherein the total character length of the first N recommended options is not more than the total character length which can be displayed by the current row;
when an (N + 1) th recommended option is presented, if the character length of the (N + 1) th recommended option is greater than the remaining character length that can be presented in the current line, determining a target recommended option from recommended options located after the (N + 1) th recommended option in the recommended option sequence, wherein the character length of the target recommended option is not greater than the remaining character length;
and displaying the target recommendation option on the current row.
In a possible implementation manner, the determining a target recommendation option from recommendation options located after the N +1 th recommendation option in the recommendation option sequence includes:
traversing character lengths of a plurality of candidate recommended options located after the N +1 th recommended option from the recommended option sequence;
and determining the target recommended option based on the character lengths of the candidate recommended options and the residual character length.
In another possible implementation manner, the determining the target recommendation option based on the character lengths of the candidate recommendation options and the remaining character lengths includes:
and determining the candidate recommended option with the position closest to the front and the character length smaller than the residual character length in the plurality of candidate recommended options as the target recommended option.
In another possible implementation manner, the determining the target recommendation option based on the character lengths of the candidate recommendation options and the remaining character lengths includes:
determining the difference value between the character length of each candidate recommended option and the remaining character length to obtain a plurality of first difference values;
and determining the candidate recommendation option corresponding to the smallest first difference value in the plurality of first difference values as the target recommendation option.
In another possible implementation manner, the presenting the target recommendation option on the current row includes:
and adjusting the positions of the (N + 1) th recommended option and the target recommended option, displaying the target recommended option on the current line, and displaying the (N + 1) th recommended option in a line-feed manner.
In another possible implementation manner, the method further includes:
executing the step of displaying the (N + 1) th recommended option in a line-changing manner under the condition that the line number of the current line does not reach the maximum line number;
discarding the (N + 1) th recommended option when the number of rows of the current row reaches the maximum number of rows.
In another possible implementation manner, the method further includes:
and under the condition that the line number of the current line does not reach the maximum line number, the (N + 1) th recommendation option is displayed in a line changing way.
In another possible implementation manner, the method further includes:
and when the (N + 1) th recommended option is not the last recommended option in the recommended option sequence, executing the step of determining a target recommended option from the recommended options located after the (N + 1) th recommended option in the recommended option sequence.
In another possible implementation manner, the determining the remaining character length includes:
and determining the difference between the total length of the characters which can be displayed on the current line and the total length of the characters of the first N recommended options to obtain the remaining character length.
In another possible implementation manner, the obtaining of the recommendation option sequence includes:
responding to a triggering operation triggered by a first search entry in the instant delivery application program, and acquiring a recommendation option sequence of a historical search block in a search interface; and/or acquiring a recommendation option sequence of the search recommendation block in the search interface.
In another possible implementation manner, the obtaining of the recommendation option sequence includes:
responding to a trigger operation triggered by a second search entry in the shopping application program, and acquiring the recommendation option sequence, wherein the recommendation option sequence comprises a plurality of item recommendation options; alternatively, the first and second electrodes may be,
responding to a triggering operation triggered by a third search entry in a video application program, and acquiring the recommendation option sequence, wherein the recommendation option sequence comprises a plurality of video recommendation options; alternatively, the first and second electrodes may be,
and acquiring the recommendation option sequence in response to a trigger operation of triggering a fourth search entry in the search application program, wherein the recommendation option sequence comprises a plurality of search recommendation options.
In one aspect, a display apparatus of a search interface is provided, the apparatus including:
the acquisition module is used for acquiring a recommended option sequence, and the recommended option sequence comprises a plurality of recommended options;
the first determination module is used for determining the character length of each recommended option based on the screen resolution of the terminal;
the first display module is used for displaying the first N recommended options based on the sequence of the plurality of recommended options, wherein the total character length of the first N recommended options is not more than the total character length which can be displayed in the current row;
a second determining module, configured to, when an (N + 1) th recommended option is presented, if the character length of the (N + 1) th recommended option is greater than the remaining character length that can be presented in the current line, determine a target recommended option from recommended options located after the (N + 1) th recommended option in the recommended option sequence, where the character length of the target recommended option is not greater than the remaining character length;
and the second display module is used for displaying the target recommendation option on the current row.
In a possible implementation manner, the second determining module is configured to traverse character lengths of a plurality of candidate recommended options located after the N +1 th recommended option from the recommended option sequence; and determining the target recommended option based on the character lengths of the candidate recommended options and the residual character length.
In another possible implementation manner, the second determining module is configured to determine, as the target recommendation option, a candidate recommendation option that is located at the top among the plurality of candidate recommendation options and has a character length smaller than the remaining character length.
In another possible implementation manner, the second determining module is configured to determine a difference between the character length of each candidate recommended option and the remaining character length, so as to obtain a plurality of first differences; and determining the candidate recommendation option corresponding to the smallest first difference value in the plurality of first difference values as the target recommendation option.
In another possible implementation manner, the second presentation module is configured to adjust positions of the (N + 1) th recommendation option and the target recommendation option, present the target recommendation option in the current row, and present the (N + 1) th recommendation option in a new row.
In another possible implementation manner, the apparatus further includes:
the third display module is used for displaying the (N + 1) th recommended option in a line changing way under the condition that the line number of the current line does not reach the maximum line number;
a discarding module, configured to discard the (N + 1) th recommendation option when the number of rows of the current row reaches the maximum number of rows.
In another possible implementation manner, the apparatus further includes:
and the fourth display module is used for displaying the (N + 1) th recommended option in a line-changing manner under the condition that the line number of the current line does not reach the maximum line number.
In another possible implementation manner, the apparatus further includes:
a third determining module, configured to determine a target recommended option from recommended options located after the (N + 1) th recommended option in the recommended option sequence when the (N + 1) th recommended option is not the last recommended option in the recommended option sequence.
In another possible implementation manner, the apparatus further includes:
a fourth determining module, configured to determine a difference between a total length of characters that can be displayed in the current line and a total length of characters of the first N recommended options, so as to obtain the remaining character length.
In another possible implementation manner, the obtaining module is configured to obtain a recommended option sequence of a historical search block in a search interface in response to a trigger operation that a first search entry in an instant delivery application is triggered; and/or acquiring a recommendation option sequence of the search recommendation block in the search interface.
In another possible implementation manner, the obtaining module is configured to obtain the recommendation option sequence in response to a triggering operation that a second search entry in the shopping application is triggered, where the recommendation option sequence includes a plurality of item recommendation options; or, in response to a triggering operation triggered by a third search entry in a video application program, acquiring the recommendation option sequence, where the recommendation option sequence includes a plurality of video recommendation options; or, in response to a trigger operation that a fourth search entry in the search application is triggered, acquiring the recommendation option sequence, where the recommendation option sequence includes a plurality of search recommendation options.
In one aspect, a terminal is provided and includes one or more processors and one or more memories, where at least one instruction is stored in the one or more memories, and the at least one instruction is loaded and executed by the one or more processors to implement the operations performed by the display method of the search interface according to any one of the possible implementations described above.
In one aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the operations performed by the display method of the search interface according to any one of the above possible implementation manners.
In one aspect, a computer program product is provided, which includes at least one instruction stored in a computer-readable storage medium, and a processor of a terminal reads the at least one instruction from the computer-readable storage medium, and executes the at least one instruction, so that the terminal loads and executes operations performed to implement the display method of a search interface according to any one of the above possible implementations.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
the embodiment of the application provides a display method of a search interface, the method includes firstly displaying the first N recommended options on a current line, when displaying the (N + 1) th recommended option, if the character length of the (N + 1) th recommended option is larger than the remaining character length which can be displayed on the current line, determining a target recommended option, displaying the target recommended option on the current line, and filling a blank area of the current line through the target recommended option, so that the interface display effect is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of an implementation environment of a display method of a search interface provided in an embodiment of the present application;
FIG. 2 is a flowchart of a display method of a search interface according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of a display method of a search interface according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating a recommendation option presented in a search interface according to an embodiment of the present application;
FIG. 5 is a diagram illustrating a recommended options sequence provided by an embodiment of the present application;
FIG. 6 is a diagram illustrating a recommendation option in a search interface according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a search interface showing recommended options before and after applying the method according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a display device of a search interface provided in an embodiment of the present application;
fig. 9 is a block diagram of a terminal according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of an implementation environment of a display method of a search interface provided in an embodiment of the present application, where the implementation environment includes: a terminal 101 and a server 102. The terminal 101 and the server 102 may be connected through a wireless or wired network. The terminal 101 may be installed with a plurality of applications, such as a shopping application, an instant distribution application, a video application, a search application, etc., and the server 102 is the server 102 for the instant distribution application.
When the method is applied to an instant delivery scene, a user can log in an instant delivery application program through the terminal 101 to search for the food, the terminal 101 detects a trigger operation triggered by a first search entry and sends an acquisition request to the server 102, the server 102 receives the acquisition request, a food recommendation option sequence is determined according to historical search records of the user, and/or a food recommendation option sequence is determined according to historical search records of other users, the food recommendation option sequence comprises a plurality of food recommendation options, and then the food recommendation option sequence is sent to the terminal 101. The terminal 101 receives the food recommendation option sequence sent by the server 102, and displays a plurality of food recommendation options on a search interface.
The search interface may be divided into one section or a plurality of sections, when the search interface is divided into a plurality of sections, the search interface may include a history search section, a search recommendation section, a hot search section, and the like, and for different sections, the server 102 may obtain different recommendation option sequences. For example, for the history search section, the server 102 may obtain a series of food recommendation options according to history search records of the user and from near to far according to history search time, and then the terminal 101 displays a plurality of food recommendation options of history search in an interface area corresponding to the history search section. For the search recommendation block, the server 102 may obtain a food recommendation option sequence according to the historical search records of the user and the historical search records of other users from a large number to a small number of search times, and then the terminal 101 displays a plurality of recommended food recommendation options in an interface area corresponding to the search recommendation block.
When the method is applied to a shopping scene, a user can log in a shopping application program through the terminal 101 to search for an item, at this time, the terminal 101 detects a trigger operation triggered by a first search entry, sends an acquisition request to the server 102, the server 102 receives the acquisition request, determines an item recommendation option sequence, the item recommendation option sequence comprises a plurality of item recommendation options, and then sends the item recommendation option sequence to the terminal 101. The terminal 101 receives the item recommendation option sequence sent by the server 102, and displays a plurality of item recommendation options on a search interface. The article may be a garment, a daily necessity, a household appliance, or the like, which is not particularly limited in the embodiments of the present application.
When the method is applied to a video application, the server 102 may determine a video recommendation option sequence including a plurality of video recommendation options and then send the video recommendation option sequence to the terminal 101. The terminal 101 receives the video recommendation option sequence sent by the server 102, and displays a plurality of video recommendation options on a search interface.
When the method is applied to a search application, the server 102 may determine a search recommendation option sequence including a plurality of search recommendation options and then transmit the search recommendation option sequence to the terminal 101. The terminal 101 receives the search recommendation option sequence sent by the server 102, and displays a plurality of search recommendation options on a search interface.
It should be noted that the application program may also be another application program having a search function, for example, a map application program or a game application program. Accordingly, the method may also be applied to a scene of a search place or a game scene. In the embodiment of the present application, an application scenario of the method is not particularly limited.
The terminal 101 is at least one of a mobile phone, a tablet computer, and a pc (personal computer) device. The server 102 is at least one of a server, a server cluster composed of a plurality of servers, a cloud server, a cloud computing platform, and a virtualization center.
Fig. 2 is a flowchart of a display method of a search interface provided in an embodiment of the present application, and referring to fig. 2, the method includes:
step 201: and acquiring a recommendation option sequence, wherein the recommendation option sequence comprises a plurality of recommendation options.
Step 202: the character length of each recommended option is determined based on the screen resolution of the terminal.
Step 203: and displaying the first N recommended options based on the sequence of the plurality of recommended options, wherein the total length of the characters of the first N recommended options is not more than the total length of the characters which can be displayed on the current line.
Step 204: when the (N + 1) th recommended option is displayed, if the character length of the (N + 1) th recommended option is larger than the remaining character length which can be displayed in the current line, determining a target recommended option from the recommended options positioned after the (N + 1) th recommended option in the recommended option sequence, wherein the character length of the target recommended option is not larger than the remaining character length.
Step 205: and displaying a target recommendation option on the current row.
In a possible implementation manner, determining a target recommendation option from recommendation options located after the (N + 1) th recommendation option in the recommendation option sequence includes:
traversing character lengths of a plurality of candidate recommended options positioned after the (N + 1) th recommended option from the recommended option sequence;
and determining the target recommendation option based on the character lengths and the residual character lengths of the candidate recommendation options.
In another possible implementation manner, determining the target recommendation option based on the character lengths and the remaining character lengths of the candidate recommendation options includes:
and determining the candidate recommended option with the position closest to the front and the character length smaller than the residual character length in the plurality of candidate recommended options as the target recommended option.
In another possible implementation manner, determining the target recommendation option based on the character lengths and the remaining character lengths of the candidate recommendation options includes:
determining the difference value between the character length of each candidate recommended option and the remaining character length to obtain a plurality of first difference values;
and determining the candidate recommendation option corresponding to the minimum first difference value in the plurality of first difference values as the target recommendation option.
In another possible implementation, presenting the target recommendation option on the current row includes:
and adjusting the positions of the (N + 1) th recommended option and the target recommended option, displaying the target recommended option on the current line, and displaying the (N + 1) th recommended option in a line-changing manner.
In another possible implementation manner, the method further includes:
under the condition that the number of lines of the current line does not reach the maximum number of lines, executing a step of displaying the (N + 1) th recommended option in a line-changing way;
and in the case that the row number of the current row reaches the maximum row number, discarding the (N + 1) th recommendation option.
In another possible implementation manner, the method further includes:
and under the condition that the line number of the current line does not reach the maximum line number, the (N + 1) th recommendation option is displayed in a line changing way.
In another possible implementation manner, the method further includes:
and under the condition that the (N + 1) th recommended option is not the last recommended option in the recommended option sequence, the step of determining the target recommended option from the recommended options positioned after the (N + 1) th recommended option in the recommended option sequence is executed.
In another possible implementation, the process of determining the remaining character length includes:
and determining the difference between the total length of the characters which can be displayed on the current line and the total length of the characters of the first N recommended options to obtain the remaining character length.
In another possible implementation manner, obtaining the recommended option sequence includes:
responding to a trigger operation triggered by a second search entry in the shopping application program, and acquiring a recommendation option sequence, wherein the recommendation option sequence comprises a plurality of item recommendation options; alternatively, the first and second electrodes may be,
responding to a triggering operation triggered by a third search entry in the video application program, and acquiring a recommendation option sequence, wherein the recommendation option sequence comprises a plurality of video recommendation options; alternatively, the first and second electrodes may be,
and acquiring a recommendation option sequence in response to a trigger operation of triggering a fourth search entry in the search application program, wherein the recommendation option sequence comprises a plurality of search recommendation options.
The embodiment of the application provides a display method of a search interface, the method includes firstly displaying the first N recommended options on a current line, when displaying the (N + 1) th recommended option, if the character length of the (N + 1) th recommended option is larger than the remaining character length which can be displayed on the current line, determining a target recommended option, displaying the target recommended option on the current line, and filling a blank area of the current line through the target recommended option, so that the interface display effect is improved.
Fig. 3 is a flowchart of a display method of a search interface, which is executed by a terminal according to an embodiment of the present application, and referring to fig. 3, the method includes:
step 301: and the terminal acquires the recommended option sequence.
The recommendation option sequence comprises a plurality of recommendation options. The plurality of recommended options may be options corresponding to search terms of historical search, or may be options recommended by the server to the terminal according to search records of other users or click rate, exposure rate, and the like of the search terms. In the embodiments of the present application, the plurality of recommended options are not particularly limited.
In this embodiment of the application, the terminal may obtain the recommendation option sequence when detecting a trigger operation that a search entry is triggered, where the search entry may be a search entry of an instant delivery application, a search entry of a shopping application, a search entry of a video application, or a search entry of a search application.
In a possible implementation manner, when the search entry is a search entry of an instant delivery application program, a terminal responds to a trigger operation triggered by a first search entry in the instant delivery application program, and obtains a recommendation option sequence of a historical search block in a search interface; and/or acquiring a recommendation option sequence of searching the recommendation block in the search interface.
The search interface of the instant delivery application program can comprise one layout or a plurality of layouts, when the search interface comprises a plurality of layouts, the plurality of layouts can comprise a historical search layout and a search recommendation layout, and different layouts correspond to different recommendation option sequences. And when detecting the triggering operation triggered by the first search entry, the terminal sends an acquisition request to the server. The server receives the acquisition request, acquires a plurality of recommended options, then determines a recommended option sequence of the plurality of recommended options, and sends the recommended option sequence to the terminal. The terminal receives a recommended option sequence sent by the server, wherein the recommended option sequence can be a recommended option sequence of a historical search plate, can be a recommended option sequence of a search recommended plate, and can also comprise the recommended option sequence of the historical search plate and the recommended option sequence of the search recommended plate.
In another possible implementation manner, when the search entry is a search entry of a shopping application program, the terminal acquires a recommendation option sequence in response to a trigger operation that a second search entry in the shopping application program is triggered, wherein the recommendation option sequence comprises a plurality of item recommendation options.
In this implementation, the recommended option sequence is an item recommended option sequence. The search interface of the shopping application program may also include a history search section and a search recommendation section, and correspondingly, the item recommendation options may be options of items searched historically or options of items recommended by the server for the terminal.
In another possible implementation manner, when the search entry is a search entry of a video application, the terminal acquires a recommendation option sequence in response to a trigger operation that a third search entry in the video application is triggered, where the recommendation option sequence includes a plurality of video recommendation options.
In this implementation, the recommendation option sequence is a video recommendation option sequence. Correspondingly, the plurality of video recommendation options can be options of videos which are watched or searched by the user in history, and can also be options of videos which are recommended to the terminal by the server.
In another possible implementation manner, when the search entry is a search entry of a search application, the terminal acquires a recommendation option sequence in response to a trigger operation that a fourth search entry in the search application is triggered, where the recommendation option sequence includes a plurality of search recommendation options.
In this implementation, the recommended option sequence is a search recommended option sequence. Correspondingly, the plurality of search recommendation options can be search word options searched by the user history, and can also be search word options recommended by the server for the terminal.
It should be noted that the search entry may also be a search entry of another application having a search function, for example, a map application or a game application, and the application having a search function is not particularly limited herein.
In addition, the plurality of recommended options in the recommended option sequence are arranged according to a certain sequence, the sequence may be an order arranged from near to far according to time, an order arranged from a large number of search times to a small number of search times, or an order arranged from a large number of click times to a small number of click times, and the order is not particularly limited herein.
Step 302: the terminal determines the character length of each recommended option based on the screen resolution of the terminal.
The screen resolution represents the pixel values in the length and width directions of the screen, and characters and images displayed in the screen are all composed of pixel points, so that the resolution can reflect the amount of display contents in the screen and the display precision. The lower the resolution, the less the display content and the lower the display accuracy, and the higher the resolution, the more the display content and the higher the display accuracy, for the same screen size.
Because different recommended options contain different numbers of characters and types of characters, the character lengths are different. Therefore, for each recommended option, the terminal may determine the character length of each character included in the recommended option according to the screen resolution of the terminal, and then determine the sum of the character lengths of each character to obtain the character length of the recommended option.
Because the screen width and the screen length of the terminal are limited, if the terminal displays the recommendation option in the width direction of the screen, the terminal can determine the character length of each character in the width direction of the screen according to the screen resolution and the screen width. The process is as follows: and the terminal determines the character type of each character included in the recommended option, and determines the character length corresponding to each character type under the screen resolution and the screen width of the terminal according to the corresponding relation among the screen resolution, the screen width, the character type and the character length.
The characters in the embodiment of the application can be one or more of Chinese characters, lower case letters, upper case letters and punctuation marks, and correspondingly, the character types can be Chinese character types, lower case letter types, upper case letter types and punctuation marks. Different character types correspond to different character lengths, for example, the character length of the kanji type is longer than that of other types, and the character length of the capital letter type is longer than that of the small letter type.
Before step 302, the terminal may pre-establish a correspondence between a screen resolution, a screen width, a character type, and a character length, where the character type is different and the corresponding character length is different for the same screen resolution and the same screen width. The same screen resolution and the same character type, different screen widths and different corresponding character lengths. The same screen width, the same character type, different screen resolutions and corresponding character lengths are also different.
For a certain terminal, the screen resolution and the screen width are known fixed constants, so that when a recommended option displayed on the terminal is determined, the character length of each character included in the recommended option is determined according to the corresponding relationship between the character type and the character length included in the recommended option.
In addition, the font size of the characters also has an effect on the character length of the recommended options displayed on the terminal. The above contents are that the character length of each recommended option is determined under the condition of fixed font size, and if the font size is changed, the character length of each recommended option is also changed. Accordingly, the terminal may also incorporate the font size when determining the character length of each character. The process may be: the terminal determines the font size corresponding to the font setting option, determines the character type of each character included in the recommended option, and determines the character length corresponding to each character type under the screen resolution, the screen width and the font size of the terminal according to the corresponding relation among the screen resolution, the screen width, the character type, the font size and the character length.
If the terminal displays the recommended option in the length direction of the screen, the terminal can determine the character length of each character in the length direction of the screen according to the resolution of the screen and the length of the screen, and then determine the sum of the character lengths of each character in the length direction of the screen to obtain the character length of the recommended option in the length direction of the screen. The process is similar to the above process for determining the character length of the recommended option in the width direction of the screen, and is not described herein again.
Step 303: and the terminal displays the first N recommended options based on the sequence of the plurality of recommended options.
The total character length of the N recommended options is not more than the total character length which can be shown in the current line. In step 303, the terminal may display the first N recommendation options in any of the following implementation manners.
In a first implementation manner, when a terminal displays a recommended option, the length of the remaining characters that can be displayed in the current row is determined, and if the length of the characters of the recommended option to be displayed is smaller than the length of the remaining characters, the recommended option is displayed in the current row, so that the first N recommended options are displayed in the current row.
Because the current row does not present other recommended options when presenting the 1 st recommended option, the remaining character length of the current row does not need to be determined when presenting the 1 st recommended option. When the terminal displays the 2 nd recommended option, determining the remaining character length of the current line, if the character length of the 2 nd recommended option is smaller than the remaining character length, displaying the second recommended option on the current line, when the 3 rd recommended option is displayed, re-determining the remaining character length of the current line, if the character length of the 3 rd recommended option is smaller than the re-determined remaining character length, displaying the 3 rd recommended option on the current line, and so on until the first N recommended options are displayed.
In the second implementation manner, because the remaining character length of the current line is larger when the first few recommended options are displayed, the terminal may display a preset number of recommended options first, and determine the remaining character length that can be displayed in the current line every time one recommended option is displayed when the recommended options after the preset number are displayed. For example, if the preset number is 2, the terminal may present the previous 2 recommendation options first, and when the 3 rd recommendation option is presented, determine the length of the remaining characters that can be presented in the current row. If the character length of the 3 rd recommended option is smaller than the redetermined remaining character length, the 3 rd recommended option is displayed on the current row, and so on until the first N recommended options are displayed.
Step 304: when the (N + 1) th recommended option is presented, the terminal determines the length of the remaining characters which can be presented in the current line.
And after the terminal displays the first N recommended options, determining the length of the remaining characters which can be displayed on the current line.
In a possible implementation manner, the terminal determines a difference value between a total length of characters that can be displayed on the current line and a total length of characters of the first N recommended options, so as to obtain the remaining character length.
The current line may be any line in the width direction or any line in the length direction. If any line in the width direction of the current line is selected, the terminal can determine the total length of the characters which can be displayed in the current line in the width direction according to the resolution and the screen width in the width direction. And then determining the difference between the total length of the characters which can be displayed on the current line and the total length of the characters of the first N recommended options, and obtaining the remaining character length.
In another possible implementation manner, the terminal further obtains a first distance between every two adjacent recommended options in the previous N recommended options, and determines a product of (N-1) and the first distance to obtain a first distance. And then determining the difference value of the total length of the characters which can be displayed by the current line minus the total length of the characters of the first N recommended options and the first distance to obtain the remaining character length.
Here, an example of a behavior in the width direction of the current behavior is described. The total length of the characters that can be displayed in the current line can be equal to the screen width of the terminal screen or smaller than the screen width of the terminal screen. If the total length of the displayable characters on the current line is smaller than the screen width of the terminal screen, the terminal can determine the total length of the displayable characters on the current line in the width direction according to the resolution and the screen width in the width direction. The process may be: and the terminal determines the total length of the characters which can be displayed currently in the width direction of the terminal according to the corresponding relation among the screen resolution, the screen width and the total length of the characters. The total length of the characters which can be displayed is different for the same screen resolution and different screen widths. The total length of the characters which can be displayed is different for the same screen width and different screen resolutions. Or, the terminal may also determine the total length of the characters that can be displayed on the current line according to the distance between the head and the tail of the line and the two boundaries of the terminal screen. The process is as follows: and the terminal determines a second distance between the head of the line and the left boundary of the terminal screen and a third distance between the tail of the line and the right boundary of the terminal screen, and then determines the difference value obtained by subtracting the second distance and the third distance from the screen width of the terminal screen to obtain the total length of the characters which can be displayed on the current line.
If any line in the length direction of the current line is selected, the terminal can determine the total length of the characters which can be displayed in the current line in the length direction according to the resolution and the screen length in the length direction. This is similar to the way of determining the total length of the displayable characters of the current row in the width direction, and is not described herein again.
Step 305: if the character length of the (N + 1) th recommended option is larger than the remaining character length which can be displayed in the current line, the terminal traverses the character lengths of a plurality of candidate recommended options positioned after the (N + 1) th recommended option from the recommended option sequence.
The terminal determines whether the character length of the (N + 1) th recommended option is greater than the remaining character length.
In a possible implementation manner, if the character length of the (N + 1) th recommended option is greater than the remaining character length, which indicates that the current line cannot show the (N + 1) th recommended option, the terminal determines whether the (N + 1) th recommended option is the last recommended option, and if the (N + 1) th recommended option is not the last recommended option, the terminal traverses the character lengths of a plurality of candidate recommended options located after the (N + 1) th recommended option from the recommended option sequence. If the (N + 1) th recommended option is the last recommended option, determining whether the line number of the current line reaches the maximum line number, if the current line number reaches the maximum line number, discarding the (N + 1) th recommended option, and if the current line number does not reach the maximum line number, performing line feed display on the (N + 1) th recommended option, see fig. 4.
In another possible implementation manner, if the character length of the (N + 1) th recommended option is greater than the remaining character length, the terminal determines whether the line number of the current line reaches the maximum line number, and if the line number of the current line does not reach the maximum line number, the terminal may display the (N + 1) th recommended option in a line change manner regardless of whether the (N + 1) th recommended option is the last recommended option in the recommended option sequence. The specific process is as follows: and if the line number of the current line does not reach the maximum line number and the (N + 1) th recommended option is not the last recommended option, the terminal traverses the character lengths of a plurality of candidate recommended options positioned after the (N + 1) th recommended option from the recommended option sequence. If the number of lines of the current line does not reach the maximum number of lines, and the (N + 1) th recommended option is the last recommended option, the terminal does not need to traverse the character lengths of the multiple candidate recommended options, and the (N + 1) th recommended option is directly displayed in a line changing manner.
And if the row number of the current row reaches the maximum row number, the terminal discards the (N + 1) th recommended option no matter whether the (N + 1) th recommended option is the last recommended option in the recommended option sequence. The specific process is as follows: and if the line number of the current line reaches the maximum line number and the (N + 1) th recommended option is the last recommended option, the terminal discards the (N + 1) th recommended option. If the number of rows in the current row reaches the maximum number of rows and the N +1 th recommended option is not the last recommended option, the terminal displays the target recommended option in the current row after determining the target recommended option in steps 305 and 306, and discards the N +1 th recommended option.
Step 306: and the terminal determines a target recommendation option based on the character lengths of the candidate recommendation options and the residual character length.
This step may be implemented by any of the following implementations.
In a first implementation manner, the terminal determines the candidate recommended option with the highest position among the candidate recommended options and the character length smaller than the remaining character length as the target recommended option.
In this implementation manner, the terminal may first determine whether the character length of a first candidate recommended option located after the (N + 1) th recommended option in the recommended option sequence is greater than the remaining character length, and if the character length of the first candidate recommended option is not greater than the remaining character length, determine that the first candidate recommended option is the target recommended option.
If the character length of the first candidate recommended option is larger than the residual character length, determining whether the character length of the second candidate recommended option is larger than the residual character length, and if the character length of the second candidate recommended option is not larger than the residual character length, determining that the second candidate recommended option is the target recommended option.
And if the character length of the second candidate recommended option is greater than the residual character length, determining whether the character length of the third candidate recommended option is greater than the residual character length, and repeating the steps until the candidate recommended option with the character length not greater than the residual character length is determined. And if the character lengths of all the candidate recommended options are larger than the residual character length, the terminal directly displays the (N + 1) th recommended option in a line-changing manner.
In the embodiment of the application, because the plurality of recommended options in the recommended option sequence are arranged according to a certain sequence, and the position is earlier, the higher the priority of the recommended option is, therefore, the terminal takes the candidate recommended option with the position closest to the front and the character length smaller than the remaining character length as the target recommended option, fills the blank area, improves the interface display effect, and simultaneously can give consideration to the priority of the target recommended option, so that a user can find and click the target recommended option more conveniently, and the click rate and the exposure rate of the target recommended option are improved.
In a second implementation mode, the terminal determines the difference value between the character length of each candidate recommended option and the remaining character length to obtain a plurality of first difference values; and determining the candidate recommendation option corresponding to the minimum first difference value in the plurality of first difference values as the target recommendation option.
In the implementation mode, the terminal selects the candidate recommendation option with the smallest difference between the third character length and the remaining character length from the plurality of candidate recommendation options as the target recommendation option, so that the blank area can be filled to the maximum extent, the size of the blank area is reduced to the minimum, and the interface display effect is improved.
It should be noted that, if the character lengths of all candidate recommended options after the (N + 1) th recommended option are greater than the remaining character lengths, the terminal displays the (N + 1) th recommended option in a line feed manner, that is, switches the (N + 1) th recommended option to the next line for display. The next row is then considered the current row and step 304 is re-executed.
Step 307: and the terminal adjusts the positions of the (N + 1) th recommended option and the target recommended option, displays the target recommended option on the current line and displays the (N + 1) th recommended option in a line feed manner.
After the terminal determines the target recommendation option, the position of the (N + 1) th recommendation option and the target recommendation option is adjusted, the target recommendation option is displayed on the current line, and the (N + 1) th recommendation option is displayed in a line changing way under the condition that the line number of the current line does not reach the maximum line number. And in the case that the number of rows of the current row reaches the maximum number of rows, discarding the (N + 1) th recommended option.
With continued reference to fig. 4, the first implementation of determining the target recommendation option in step 306 is described as an example. The terminal determines whether the character length of the candidate recommended option is larger than the residual character length in sequence, and under the condition that the candidate recommended option with the character length not larger than the residual character length is determined, the sequence of the two recommended options is exchanged, the target recommended option is displayed on the current line, and the (N + 1) th recommended option is displayed in a line changing manner.
In the embodiment of the application, because the number of the recommended options returned by the server is possibly large, and all the recommended options may not be displayed in the search interface, the terminal continues to search downwards when the current row does not display the (N + 1) th recommended option until the recommended options which can be displayed in the remaining space are found, and positions of the recommended options and the terminal are adjusted after the recommended options are found, so that the recommended options returned by the server are displayed as many as possible under the limited number of rows, and the display effect of the interface is improved.
If the sequence of each recommended option in the recommended option sequence is shown in fig. 5, the number of letters in the drawing represents the number of words contained in the recommended option, the maximum number of lines can be set and changed as needed, and only 2 is described here, the layout behavior of the terminal is shown in fig. 6, and the dashed box in fig. 6 is the display area of the terminal screen. As can be seen in fig. 6: and when the first line shows the recommendation option A, the character length of the recommendation option A is less than the total character length which can be shown in the first line, and then the recommendation option A is determined to be shown in the current line. And for the recommended option B, the character length is smaller than the remaining character length of the first line, and the remaining character length is the remaining character length after the recommended option A is presented in the first line, and then the recommended option B is determined to be presented in the current line. Similarly, the terminal determines to present a recommendation option C on the current row. And for the recommended option D, since the character length of the recommended option D is greater than the remaining character lengths after the first line shows the recommended options A, B and C, the terminal determines whether the character length of the recommended option E is less than the remaining character lengths after the first line shows the recommended options A, B and C according to the order of the recommended options in fig. 5. And if the character length of the recommendation option E is smaller than the remaining character length after the recommendation options A, B and C are displayed in the first row, adjusting the sequence of the recommendation options D and E, displaying the recommendation option E in the first row, and displaying the recommendation option D at the head of the second row. And sequentially determining the recommended options F, G and H displayed in the second row according to the method, and discarding the recommended option I and the recommended options behind the recommended option I as the character length of the recommended option I is greater than the remaining character length after the recommended options D, F, G and H are displayed in the second row and the current row number reaches the maximum row number.
In the embodiment of the application, the terminal determines the character length of each recommended option through the screen resolution of the terminal in a limited display area, and dynamically adjusts the sequence of part of recommended options during layout, so that the blank of the streaming layout can be filled up, the user experience is optimized, and the screen utilization rate is improved.
It should be noted that the terminal may determine the display order of each recommendation option in the search interface by the above method, and then display a plurality of recommendation options on the search interface together according to the display order. For example, the terminal determines that the display sequence of the recommended options is A, B, C, E, D, F, G and H, and then displays the recommended options A, B, C, E, D, F, G and H on the search interface in sequence.
The terminal can also determine the size relationship between the character length of the recommended option and the remaining character length and display the recommended option on the search interface. That is, the terminal determines that the character length of the recommended option a is smaller than the remaining character length, the recommended option a is displayed in the first row of the search interface, then it is determined whether the character length of the recommended option B is smaller than the remaining character length, if the character length of the recommended option B is smaller than the remaining character length, the recommended option B is displayed in the first row of the search interface, and so on until the last recommended option H is displayed on the search interface.
Referring to fig. 7, the left and right diagrams of fig. 7 are respectively a comparison between before and after applying the method provided by the embodiment of the present application, and it can be seen that: according to the method provided by the embodiment of the application, two additional data can be displayed while the blank area is filled, so that the click rate and the exposure rate of the data are improved.
The embodiment of the application provides a display method of a search interface, the method includes firstly displaying the first N recommended options on a current line, when displaying the (N + 1) th recommended option, if the character length of the (N + 1) th recommended option is larger than the remaining character length which can be displayed on the current line, determining a target recommended option, displaying the target recommended option on the current line, and filling a blank area of the current line through the target recommended option, so that the interface display effect is improved.
In addition, under the condition of the same line number, more recommendation options can be displayed, and the click rate and the exposure rate of the recommendation options are improved. In addition, for a search interface of the instant distribution application program, an online statistical result shows that after the method is applied, the number of clicks of the recommended option is increased from 19 ten thousand to about 20 ten thousand, and the number of clicks is increased by 1.2 ten thousand.
Fig. 8 is a schematic structural diagram of a display device of a search interface provided in an embodiment of the present application, and referring to fig. 8, the display device includes:
an obtaining module 801, configured to obtain a recommended option sequence, where the recommended option sequence includes multiple recommended options;
a first determining module 802, configured to determine a character length of each recommended option based on a screen resolution of the terminal;
a first presentation module 803, configured to present, based on the order of the multiple recommendation options, the top N recommendation options, where a total length of characters of the top N recommendation options is not greater than a total length of characters that can be presented in a current row;
a second determining module 804, configured to, when the (N + 1) th recommended option is presented, if the character length of the (N + 1) th recommended option is greater than the remaining character length that can be presented in the current line, determine a target recommended option from recommended options located after the (N + 1) th recommended option in the recommended option sequence, where the character length of the target recommended option is not greater than the remaining character length;
a second presentation module 805, configured to present the target recommendation option on the current row.
In a possible implementation manner, the second determining module 804 is configured to traverse character lengths of a plurality of candidate recommended options located after the (N + 1) th recommended option from the recommended option sequence; and determining the target recommendation option based on the character lengths and the residual character lengths of the candidate recommendation options.
In another possible implementation manner, the second determining module 804 is configured to determine, as the target recommendation option, a candidate recommendation option that is located at the top among the plurality of candidate recommendation options and has a character length smaller than the remaining character length.
In another possible implementation manner, the second determining module 804 is configured to determine a difference between a character length of each candidate recommended option and a remaining character length, so as to obtain a plurality of first differences; and determining the candidate recommendation option corresponding to the minimum first difference value in the plurality of first difference values as the target recommendation option.
In another possible implementation manner, the second presenting module 805 is configured to adjust positions of the (N + 1) th recommendation option and the target recommendation option, present the target recommendation option in the current row, and present the (N + 1) th recommendation option in a new row.
In another possible implementation manner, the apparatus further includes:
the third display module is used for displaying the (N + 1) th recommended option in a line changing way under the condition that the line number of the current line does not reach the maximum line number;
and the discarding module is used for discarding the (N + 1) th recommendation option under the condition that the row number of the current row reaches the maximum row number.
In another possible implementation manner, the apparatus further includes:
and the fourth display module is used for displaying the (N + 1) th recommended option in a line changing way under the condition that the line number of the current line does not reach the maximum line number.
In another possible implementation manner, the apparatus further includes:
and the third determining module is used for determining the target recommendation option from the recommendation options positioned after the (N + 1) th recommendation option in the recommendation option sequence under the condition that the (N + 1) th recommendation option is not the last recommendation option in the recommendation option sequence.
In another possible implementation manner, the apparatus further includes:
and the fourth determining module is used for determining the difference value between the total length of the characters which can be displayed on the current line and the total length of the characters of the first N recommended options to obtain the remaining character length.
In another possible implementation manner, the obtaining module 801 is configured to obtain, in response to a trigger operation that a first search entry in an instant distribution application is triggered, a recommendation option sequence of a history search block in a search interface; and/or acquiring a recommendation option sequence of searching the recommendation block in the search interface.
In another possible implementation manner, the obtaining module 801 is configured to obtain, in response to a triggering operation that a second search entry in the shopping application is triggered, a recommendation option sequence, where the recommendation option sequence includes a plurality of item recommendation options; or, in response to a triggering operation triggered by a third search entry in the video application program, acquiring a recommendation option sequence, wherein the recommendation option sequence comprises a plurality of video recommendation options; or, in response to a triggering operation that a fourth search entry in the search application is triggered, acquiring a recommendation option sequence, where the recommendation option sequence includes a plurality of search recommendation options.
The embodiment of the application provides a display device of a search interface, the device firstly displays the first N recommended options on a current line, when displaying the (N + 1) th recommended option, if the character length of the (N + 1) th recommended option is larger than the remaining character length which can be displayed on the current line, a target recommended option is determined, the target recommended option is displayed on the current line, and a blank area of the current line is filled through the target recommended option, so that the display effect of the interface is improved.
It should be noted that: in the display device of the search interface provided in the foregoing embodiment, when the search interface is displayed, only the division of each function module is illustrated, and in practical applications, the function distribution may be completed by different function modules according to needs, that is, the internal structure of the terminal is divided into different function modules, so as to complete all or part of the functions described above. In addition, the display device of the search interface and the display method embodiment of the search interface provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 9 shows a block diagram of a terminal 900 according to an exemplary embodiment of the present application. The terminal 900 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 900 may also be referred to by other names such as user equipment, portable terminals, laptop terminals, desktop terminals, and the like.
In general, terminal 900 includes: a processor 901 and a memory 902.
Processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 901 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 901 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 902 is used to store at least one instruction for execution by processor 901 to implement a method of displaying a search interface provided by method embodiments herein.
In some embodiments, terminal 900 can also optionally include: a peripheral interface 903 and at least one peripheral. The processor 901, memory 902, and peripheral interface 903 may be connected by buses or signal lines. Various peripheral devices may be connected to the peripheral interface 903 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 904, a display screen 905, a camera assembly 906, an audio circuit 907, a positioning assembly 908, and a power supply 909.
The peripheral interface 903 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 901 and the memory 902. In some embodiments, the processor 901, memory 902, and peripheral interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902 and the peripheral interface 903 may be implemented on a separate chip or circuit board, which is not limited by this embodiment.
The Radio Frequency circuit 904 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 904 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 904 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 904 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 904 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 904 may also include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 905 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 905 is a touch display screen, the display screen 905 also has the ability to capture touch signals on or over the surface of the display screen 905. The touch signal may be input to the processor 901 as a control signal for processing. At this point, the display 905 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 905 may be one, disposed on the front panel of the terminal 900; in other embodiments, the number of the display panels 905 may be at least two, and each of the display panels is disposed on a different surface of the terminal 900 or is in a foldable design; in other embodiments, the display 905 may be a flexible display disposed on a curved surface or a folded surface of the terminal 900. Even more, the display screen 905 may be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The Display panel 905 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and other materials.
The camera assembly 906 is used to capture images or video. Optionally, camera assembly 906 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 906 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
Audio circuit 907 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 901 for processing, or inputting the electric signals to the radio frequency circuit 904 for realizing voice communication. For stereo sound acquisition or noise reduction purposes, the microphones may be multiple and disposed at different locations of the terminal 900. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 901 or the radio frequency circuit 904 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuit 907 may also include a headphone jack.
The positioning component 908 is used to locate the current geographic Location of the terminal 900 for navigation or LBS (Location Based Service). The Positioning component 908 may be a Positioning component based on the GPS (Global Positioning System) in the united states, the beidou System in china, the graves System in russia, or the galileo System in the european union.
Power supply 909 is used to provide power to the various components in terminal 900. The power source 909 may be alternating current, direct current, disposable or rechargeable. When power source 909 comprises a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 900 can also include one or more sensors 910. The one or more sensors 910 include, but are not limited to: acceleration sensor 911, gyro sensor 912, pressure sensor 913, fingerprint sensor 914, optical sensor 915, and proximity sensor 916.
The acceleration sensor 911 can detect the magnitude of acceleration in three coordinate axes of the coordinate system established with the terminal 900. For example, the acceleration sensor 911 may be used to detect the components of the gravitational acceleration in three coordinate axes. The processor 901 can control the display screen 905 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 911. The acceleration sensor 911 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 912 may detect a body direction and a rotation angle of the terminal 900, and the gyro sensor 912 may cooperate with the acceleration sensor 911 to acquire a 3D motion of the user on the terminal 900. The processor 901 can implement the following functions according to the data collected by the gyro sensor 912: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 913 may be disposed on a side bezel of the terminal 900 and/or underneath the display 905. When the pressure sensor 913 is disposed on the side frame of the terminal 900, the user's holding signal of the terminal 900 may be detected, and the processor 901 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 913. When the pressure sensor 913 is disposed at a lower layer of the display screen 905, the processor 901 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 905. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 914 is used for collecting a fingerprint of the user, and the processor 901 identifies the user according to the fingerprint collected by the fingerprint sensor 914, or the fingerprint sensor 914 identifies the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, processor 901 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 914 may be disposed on the front, back, or side of the terminal 900. When a physical key or vendor Logo is provided on the terminal 900, the fingerprint sensor 914 may be integrated with the physical key or vendor Logo.
The optical sensor 915 is used to collect ambient light intensity. In one embodiment, the processor 901 may control the display brightness of the display screen 905 based on the ambient light intensity collected by the optical sensor 915. Specifically, when the ambient light intensity is high, the display brightness of the display screen 905 is increased; when the ambient light intensity is low, the display brightness of the display screen 905 is reduced. In another embodiment, the processor 901 can also dynamically adjust the shooting parameters of the camera assembly 906 according to the ambient light intensity collected by the optical sensor 915.
Proximity sensor 916, also known as a distance sensor, is typically disposed on the front panel of terminal 900. The proximity sensor 916 is used to collect the distance between the user and the front face of the terminal 900. In one embodiment, when the proximity sensor 916 detects that the distance between the user and the front face of the terminal 900 gradually decreases, the processor 901 controls the display 905 to switch from the bright screen state to the dark screen state; when the proximity sensor 916 detects that the distance between the user and the front surface of the terminal 900 gradually becomes larger, the display 905 is controlled by the processor 901 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 9 does not constitute a limitation of terminal 900, and may include more or fewer components than those shown, or may combine certain components, or may employ a different arrangement of components.
In an exemplary embodiment, there is also provided a computer-readable storage medium, such as a memory, including instructions executable by a processor in a terminal to perform the method of displaying a search interface in the above-described embodiments. For example, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is further provided, where the computer program product includes at least one instruction, where the at least one instruction is stored in a computer-readable storage medium, and a processor of the terminal reads the at least one instruction from the computer-readable storage medium, and executes the at least one instruction, so that the terminal is loaded and executed to complete the display method of the search interface in the foregoing embodiments.
In some embodiments, the computer program according to the embodiments of the present application may be deployed to be executed on one computer device or on multiple computer devices located at one site, or may be executed on multiple computer devices distributed at multiple sites and interconnected by a communication network, and the multiple computer devices distributed at the multiple sites and interconnected by the communication network may constitute a block chain system.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (15)

1. A display method of a search interface is characterized by comprising the following steps:
acquiring a recommendation option sequence, wherein the recommendation option sequence comprises a plurality of recommendation options;
determining the character length of each recommended option based on the screen resolution of the terminal;
displaying the first N recommended options based on the sequence of the plurality of recommended options, wherein the total character length of the first N recommended options is not more than the total character length which can be displayed by the current row;
when an (N + 1) th recommended option is presented, if the character length of the (N + 1) th recommended option is greater than the remaining character length that can be presented in the current line, determining a target recommended option from recommended options located after the (N + 1) th recommended option in the recommended option sequence, wherein the character length of the target recommended option is not greater than the remaining character length;
and displaying the target recommendation option on the current row.
2. The method of claim 1, wherein the determining a target recommended option from recommended options located after the N +1 th recommended option in the recommended option sequence comprises:
traversing character lengths of a plurality of candidate recommended options located after the N +1 th recommended option from the recommended option sequence;
and determining the target recommended option based on the character lengths of the candidate recommended options and the residual character length.
3. The method of claim 2, wherein determining the target recommendation option based on the character lengths of the candidate recommendation options and the remaining character lengths comprises:
and determining the candidate recommended option with the position closest to the front and the character length smaller than the residual character length in the plurality of candidate recommended options as the target recommended option.
4. The method of claim 2, wherein determining the target recommendation option based on the character lengths of the candidate recommendation options and the remaining character lengths comprises:
determining the difference value between the character length of each candidate recommended option and the remaining character length to obtain a plurality of first difference values;
and determining the candidate recommendation option corresponding to the smallest first difference value in the plurality of first difference values as the target recommendation option.
5. The method of any of claims 1-4, wherein the presenting the target recommendation option on the current row comprises:
and adjusting the positions of the (N + 1) th recommended option and the target recommended option, displaying the target recommended option on the current line, and displaying the (N + 1) th recommended option in a line-feed manner.
6. The method of claim 5, further comprising:
executing the step of displaying the (N + 1) th recommended option in a line-changing manner under the condition that the line number of the current line does not reach the maximum line number;
discarding the (N + 1) th recommended option when the number of rows of the current row reaches the maximum number of rows.
7. The method according to any one of claims 1 to 4, further comprising:
and under the condition that the line number of the current line does not reach the maximum line number, the (N + 1) th recommendation option is displayed in a line changing way.
8. The method according to any one of claims 1 to 4, further comprising:
and when the (N + 1) th recommended option is not the last recommended option in the recommended option sequence, executing the step of determining a target recommended option from the recommended options located after the (N + 1) th recommended option in the recommended option sequence.
9. The method according to any one of claims 1 to 4, wherein the step of determining the remaining character length comprises:
and determining the difference between the total length of the characters which can be displayed on the current line and the total length of the characters of the first N recommended options to obtain the remaining character length.
10. The method according to any one of claims 1 to 4, wherein the obtaining of the recommended option sequence comprises:
responding to a triggering operation triggered by a first search entry in the instant delivery application program, and acquiring a recommendation option sequence of a historical search block in a search interface; and/or acquiring a recommendation option sequence of the search recommendation block in the search interface.
11. The method according to any one of claims 1 to 4, wherein the obtaining of the recommended option sequence comprises:
responding to a trigger operation triggered by a second search entry in the shopping application program, and acquiring the recommendation option sequence, wherein the recommendation option sequence comprises a plurality of item recommendation options; alternatively, the first and second electrodes may be,
responding to a triggering operation triggered by a third search entry in a video application program, and acquiring the recommendation option sequence, wherein the recommendation option sequence comprises a plurality of video recommendation options; alternatively, the first and second electrodes may be,
and acquiring the recommendation option sequence in response to a trigger operation of triggering a fourth search entry in the search application program, wherein the recommendation option sequence comprises a plurality of search recommendation options.
12. A display device for a search interface, the device comprising:
the acquisition module is used for acquiring a recommended option sequence, and the recommended option sequence comprises a plurality of recommended options;
the first determination module is used for determining the character length of each recommended option based on the screen resolution of the terminal;
the first display module is used for displaying the first N recommended options based on the sequence of the plurality of recommended options, wherein the total character length of the first N recommended options is not more than the total character length which can be displayed in the current row;
a second determining module, configured to, when an (N + 1) th recommended option is presented, if the character length of the (N + 1) th recommended option is greater than the remaining character length that can be presented in the current line, determine a target recommended option from recommended options located after the (N + 1) th recommended option in the recommended option sequence, where the character length of the target recommended option is not greater than the remaining character length;
and the second display module is used for displaying the target recommendation option on the current row.
13. A terminal, comprising one or more processors and one or more memories having stored therein at least one instruction, the at least one instruction being loaded and executed by the one or more processors to perform operations performed by a display method of a search interface of any one of claims 1 to 11.
14. A computer-readable storage medium having stored therein at least one instruction, which is loaded and executed by a processor to perform operations performed by a display method of a search interface according to any one of claims 1 to 11.
15. A computer program product, characterized in that the computer program product comprises at least one instruction, the at least one instruction is stored in a computer-readable storage medium, a processor of a terminal reads the at least one instruction from the computer-readable storage medium, and the processor executes the at least one instruction, so that the terminal is loaded and executed to implement the operations executed by the display method of the search interface according to any one of claims 1 to 11.
CN202111302065.8A 2021-11-04 2021-11-04 Display method, device and terminal of search interface, storage medium and product Pending CN114139075A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111302065.8A CN114139075A (en) 2021-11-04 2021-11-04 Display method, device and terminal of search interface, storage medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111302065.8A CN114139075A (en) 2021-11-04 2021-11-04 Display method, device and terminal of search interface, storage medium and product

Publications (1)

Publication Number Publication Date
CN114139075A true CN114139075A (en) 2022-03-04

Family

ID=80392694

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111302065.8A Pending CN114139075A (en) 2021-11-04 2021-11-04 Display method, device and terminal of search interface, storage medium and product

Country Status (1)

Country Link
CN (1) CN114139075A (en)

Similar Documents

Publication Publication Date Title
US11250090B2 (en) Recommended content display method, device, and system
CN108449641B (en) Method, device, computer equipment and storage medium for playing media stream
CN110602321A (en) Application program switching method and device, electronic device and storage medium
CN108196755B (en) Background picture display method and device
CN109948581B (en) Image-text rendering method, device, equipment and readable storage medium
CN111880712B (en) Page display method and device, electronic equipment and storage medium
WO2022134632A1 (en) Work processing method and apparatus
CN111753784A (en) Video special effect processing method and device, terminal and storage medium
CN110442521B (en) Control unit detection method and device
CN109634688B (en) Session interface display method, device, terminal and storage medium
CN108734662B (en) Method and device for displaying icons
CN110968815B (en) Page refreshing method, device, terminal and storage medium
CN111105474B (en) Font drawing method, font drawing device, computer device and computer readable storage medium
CN113609358B (en) Content sharing method, device, electronic equipment and storage medium
CN114546545B (en) Image-text display method, device, terminal and storage medium
CN108664300B (en) Application interface display method and device in picture-in-picture mode
CN111949341A (en) Method, device and equipment for displaying information and storage medium
CN113301422B (en) Method, terminal and storage medium for acquiring video cover
CN111464829B (en) Method, device and equipment for switching media data and storage medium
CN111694535B (en) Alarm clock information display method and device
CN111369434B (en) Method, device, equipment and storage medium for generating spliced video covers
CN110996115B (en) Live video playing method, device, equipment, storage medium and program product
CN110097619B (en) Animation effect implementation method, device and equipment in application program
CN109189525B (en) Method, device and equipment for loading sub-page and computer readable storage medium
CN114139075A (en) Display method, device and terminal of search interface, storage medium and product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination