CN112241491A - Recommended word display method and terminal equipment - Google Patents

Recommended word display method and terminal equipment Download PDF

Info

Publication number
CN112241491A
CN112241491A CN202011111500.4A CN202011111500A CN112241491A CN 112241491 A CN112241491 A CN 112241491A CN 202011111500 A CN202011111500 A CN 202011111500A CN 112241491 A CN112241491 A CN 112241491A
Authority
CN
China
Prior art keywords
displayed
recommended word
character
recommended
display area
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
CN202011111500.4A
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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202011111500.4A priority Critical patent/CN112241491A/en
Publication of CN112241491A publication Critical patent/CN112241491A/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/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • 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
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Abstract

The embodiment of the invention provides a recommended word display method and terminal equipment, and relates to the technical field of terminals. The method comprises the following steps: acquiring attribute information of recommended words to be displayed, wherein the recommended words to be displayed comprise at least one recommended word, and the attribute information is used for indicating the size of a display space required for displaying the recommended words to be displayed; determining whether the character display area of the search box can completely display the recommended words to be displayed or not according to the attribute information; under the condition that the character display area can not completely display the recommended word to be displayed, displaying the 1 st character to the nth character of the recommended word to be displayed in the character display area, and displaying at least one character behind the nth character of the recommended word to be displayed in the preset area with preset transparency; where n is the maximum number of characters that can be displayed in the character display area. The embodiment of the invention is used for solving the problem that the existing recommendation word display mode is difficult to arouse the search requirement of a user.

Description

Recommended word display method and terminal equipment
Technical Field
The invention relates to the technical field of terminals, in particular to a recommended word display method and terminal equipment.
Background
With the continuous development of internet technology, search services implemented based on the internet technology are becoming mature, and more users use the internet to search information that the users want to view. The application program generally guides the user to search by using the recommended word so as to help the user shorten a search path or stimulate the search requirement of the user, thereby providing more accurate search function for the user.
In general, in order to facilitate a user to search based on recommended words, the recommended words recommended for the user are directly displayed in a search box of a search interface, and the user can browse recommended contents corresponding to the recommended words only by triggering the search of the contents in the search box, so that the method is very convenient and fast. However, the existing recommended word display mode is difficult to stimulate the search requirement of the user, and the user is likely not to trigger searching based on the recommended word, so that the aim of shortening the search path cannot be achieved.
Disclosure of Invention
In view of the above, the invention provides a recommended word display method and terminal equipment, which are used for solving the problem that the existing recommended word display mode is difficult to excite the search requirement of a user.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
in a first aspect, an embodiment of the present invention provides a recommended word display method, including:
acquiring attribute information of recommended words to be displayed, wherein the recommended words to be displayed comprise at least one recommended word, and the attribute information is used for indicating the size of a display space required by displaying the recommended words to be displayed;
determining whether the character display area of the search box can completely display the recommended word to be displayed or not according to the attribute information;
under the condition that the character display area cannot completely display the recommended word to be displayed, displaying the 1 st character to the nth character of the recommended word to be displayed in the character display area, and displaying at least one character behind the nth character of the recommended word to be displayed in a preset area by using a preset transparency;
wherein n is the maximum number of characters that can be displayed in the character display area.
As an optional implementation manner of the embodiment of the present invention, the attribute information is the number of characters of the recommended word to be displayed;
the determining whether the character display area of the search box can completely display the recommended word to be displayed according to the attribute information includes:
judging whether the number of characters of the recommended word to be displayed is less than or equal to n;
if the number of the characters of the recommended word to be displayed is less than or equal to n, determining that the recommended word to be displayed can be completely displayed in the character display area;
and if the number of the characters of the recommended word to be displayed is larger than n, determining that the recommended word to be displayed cannot be completely displayed in the character display area.
As an optional implementation manner of the embodiment of the present invention, the attribute information is a display length of the recommended word to be displayed;
the determining whether the character display area of the search box can completely display the recommended word to be displayed according to the attribute information includes:
judging whether the display length of the recommended word to be displayed is smaller than or equal to the length of the character display area;
if the display length of the recommended word to be displayed is larger than the length of the character display area, determining that the character display area cannot completely display the recommended word;
and if the display length of the recommended word to be displayed is less than or equal to the length of the character display area, determining that the character display area can completely display the recommended word to be displayed.
As an optional implementation manner of the embodiment of the present invention, displaying at least one character after the nth character of the recommended word to be displayed in a preset region with a preset transparency includes:
generating a target layer;
displaying at least one character behind the nth character of the recommended word to be displayed in a target layer;
and covering and displaying the target layer in the preset area by using a preset transparency.
As an optional implementation manner of the embodiment of the present invention, displaying at least one character after the nth character of the recommended word to be displayed in a preset region with a preset transparency includes:
displaying at least one character behind the nth character of the recommended word to be displayed in the preset area, and updating the transparency of the preset area to the preset transparency.
As an optional implementation manner of the embodiment of the present invention, before displaying the 1 st character to the nth character of the recommended word to be displayed in the character display area, the method further includes:
acquiring the length of the character display area and attribute information of the terminal equipment;
acquiring the number of pixel columns contained in the character display area according to the length of the character display area and the attribute information of the terminal equipment;
and determining the value of n according to the pixel column number and the pixel column number required for displaying one character.
As an optional implementation manner of the embodiment of the present invention, along an arrangement direction of recommended words in the character display area when the recommended words are displayed, the preset area is located behind the character display area;
the pixel column number contained in the preset area is positively correlated with the pixel column number contained in the screen of the terminal equipment.
As an optional implementation manner of the embodiment of the present invention, the method further includes:
and displaying the recommended word to be displayed in the character display area under the condition that the character display area can completely display the recommended word to be displayed.
As an optional implementation manner of the embodiment of the present invention, in a case that the character display area can completely display the recommended word to be displayed, the method further includes:
acquiring a first recommended word, wherein the first recommended word comprises at least one recommended word, and the recommended content corresponding to the first recommended word is not overlapped with the recommended content corresponding to the recommended word to be displayed;
displaying the recommended word to be displayed and the first recommended word in the character display area, or displaying at least one character of the recommended word to be displayed and the first recommended word in the character display area, and displaying the at least one character of the first recommended word in the preset area with the preset transparency, or displaying the recommended word to be displayed in the character display area, and displaying the at least one character of the first recommended word in the preset area with the preset transparency.
As an optional implementation manner of the embodiment of the present invention, in a case that the character display area can completely display the recommended word to be displayed, the method further includes:
acquiring a second recommended word, wherein the recommended content corresponding to the second recommended word is the same as the recommended content corresponding to the recommended word to be displayed, and the number of characters of the second recommended word is greater than that of the recommended word to be displayed;
and displaying the second recommended word in the character display area, or displaying the 1 st character to the nth character of the second recommended word in the character display area, and displaying at least one character behind the nth character of the second recommended word in a preset area by using a preset transparency.
In a second aspect, an embodiment of the present invention provides a terminal device, including:
the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring attribute information of recommended words to be displayed, the recommended words to be displayed comprise at least one recommended word, and the attribute information is used for indicating the size of a display space required by the recommended words to be displayed;
the processing unit is used for determining whether the character display area of the search box can completely display the recommended word to be displayed according to the attribute information;
the display unit is used for displaying the 1 st character to the nth character of the recommended word to be displayed in the character display area under the condition that the recommended word to be displayed cannot be completely displayed in the character display area, and displaying at least one character behind the nth character of the recommended word to be displayed in the preset area with preset transparency;
wherein n is the maximum number of characters that can be displayed in the character display area.
As an optional implementation manner of the embodiment of the present invention, the attribute information is the number of characters of the recommended word to be displayed;
the processing unit is specifically configured to determine whether the number of characters of the recommended word to be displayed is less than or equal to n; if the number of the characters of the recommended word to be displayed is less than or equal to n, determining that the recommended word to be displayed can be completely displayed in the character display area; and if the number of the characters of the recommended word to be displayed is larger than n, determining that the recommended word to be displayed cannot be completely displayed in the character display area.
As an optional implementation manner of the embodiment of the present invention, the attribute information is a display length of the recommended word to be displayed;
the processing unit is specifically configured to determine whether the display length of the recommended word to be displayed is less than or equal to the length of the character display area; if the display length of the recommended word to be displayed is larger than the length of the character display area, determining that the character display area cannot completely display the recommended word; and if the display length of the recommended word to be displayed is less than or equal to the length of the character display area, determining that the character display area can completely display the recommended word to be displayed.
As an optional implementation manner of the embodiment of the present invention, the display unit is specifically configured to generate a target layer; displaying at least one character behind the nth character of the recommended word to be displayed in the target layer; and covering and displaying the target layer in the preset area according to a preset transparency.
As an optional implementation manner of the embodiment of the present invention, the display unit is specifically configured to display at least one character after the nth character of the recommended word to be displayed in the preset area, and update the transparency of the preset area to the preset transparency.
As an optional implementation manner of the embodiment of the present invention, the display unit is further configured to obtain the length of the character display area and attribute information of the terminal device before displaying the 1 st character to the nth character of the recommended word to be displayed in the character display area; acquiring the number of pixel columns contained in the character display area according to the length of the character display area and the attribute information of the terminal equipment; and determining the value of n according to the pixel column number and the pixel column number required for displaying one character.
As an optional implementation manner of the embodiment of the present invention, along an arrangement direction of recommended words in the character display area when the recommended words are displayed, the preset area is located behind the character display area;
the pixel column number contained in the preset area is positively correlated with the pixel column number contained in the screen of the terminal equipment.
As an optional implementation manner of the embodiment of the present invention, the display unit is further configured to display the recommended word to be displayed in the character display area when the character display area can completely display the recommended word to be displayed.
As an alternative implementation of the embodiment of the present invention,
the obtaining unit is further configured to obtain a first recommended word, where the first recommended word includes at least one recommended word, and recommended content corresponding to the first recommended word is not overlapped with recommended content corresponding to the recommended word to be displayed;
the display unit is further configured to display the recommended word to be displayed and the first recommended word in the character display area, or display at least one character of the recommended word to be displayed and the first recommended word in the character display area, and display the at least one character of the first recommended word in the preset area with the preset transparency, or display the recommended word to be displayed in the character display area, and display the at least one character of the first recommended word in the preset area with the preset transparency.
As an alternative implementation of the embodiment of the present invention,
the obtaining unit is further configured to obtain a second recommended word, recommended content corresponding to the second recommended word is the same as recommended content corresponding to the recommended word to be displayed, and the number of characters of the second recommended word is greater than the number of characters of the recommended word to be displayed;
the display unit is further configured to display the second recommended word in the character display area, or display the 1 st character to the nth character of the second recommended word in the character display area, and display at least one character after the nth character of the second recommended word in a preset area with a preset transparency.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory for storing a computer program and a processor; the processor is configured to execute the method for displaying a recommended word according to the first aspect or any one of the optional embodiments of the first aspect when the computer program is called.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the recommended word display method according to the first aspect or any one of the optional embodiments of the first aspect.
The recommended word display method provided by the embodiment of the invention includes the steps of firstly obtaining attribute information for indicating the size of a display space required for displaying recommended words to be displayed, then determining whether a character display area of a search box can completely display the recommended words to be displayed or not according to the attribute information of the recommended words to be displayed, displaying the recommended words with the maximum number of characters capable of being displayed by the search box in the search box under the condition that the character display area of the search box cannot completely display the recommended words to be displayed, and displaying at least one character of which the recommended words to be displayed exceed the character display area in a preset area by preset transparency. According to the recommendation word display method provided by the embodiment of the invention, when the to-be-displayed recommendation word cannot be completely displayed in the character display area of the search box, the whole or part of the content of the to-be-displayed recommendation word beyond the part can be displayed in the preset area with the preset transparency, so that the embodiment of the invention can avoid or reduce the phenomenon that the recommendation word cannot be completely displayed, further, the search requirement of a user can be better excited, and the purpose of shortening the search path can be achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart illustrating a method for displaying recommended word according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a character display area in a search box according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an application scenario provided in the embodiment of the present invention;
FIG. 4 is a diagram illustrating a comparison of an application scenario provided by an embodiment of the present invention with an existing application scenario;
fig. 5 is a second schematic view of an application scenario provided by the embodiment of the present invention;
FIG. 6 is a second flowchart illustrating steps of a recommended word display method according to an embodiment of the present invention;
fig. 7 is a third flowchart illustrating steps of a recommended word display method according to a third embodiment of the present invention;
FIG. 8 is a flowchart illustrating a fourth step of a recommended word display method according to an embodiment of the present invention;
FIG. 9 is a flowchart illustrating a fifth step of a recommended word display method according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a preset area according to an embodiment of the present invention;
FIG. 11 is a second schematic diagram of a preset area according to an embodiment of the present invention;
FIG. 12 is a third schematic diagram of a default region according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 14 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention may be more clearly understood, a solution of the present invention will be further described below. It should be noted that the embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, but the present invention may be practiced in other ways than those described herein; it is to be understood that the embodiments described in this specification are only some embodiments of the invention, and not all embodiments.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone.
The terms "first" and "second," and the like, in the description and in the claims of the present invention are used for distinguishing between synchronized objects, and are not used to describe a particular order of objects. For example, the first retrieval unit and the second retrieval unit, etc. are for distinguishing different functional units, not for a specific order of the functional units.
In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion. Further, in the description of the embodiments of the present invention, "a plurality" means two or more unless otherwise specified.
An execution main body of the recommended word display method provided by the embodiment of the application can be terminal equipment. Specifically, the terminal device may be a mobile phone, a tablet computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), an intelligent watch, an intelligent bracelet, or other types of terminal devices, and the embodiment of the present application is not limited.
An embodiment of the present invention provides a recommended word display method, which, as shown in fig. 1, includes the following steps S101 to S104:
and S101, acquiring attribute information of the recommended word to be displayed.
The recommended words to be displayed comprise at least one recommended word, and the attribute information is used for indicating the size of a display space required for displaying the recommended words to be displayed.
Optionally, the attribute information of the recommended word to be displayed may be the number of characters of the recommended word to be displayed.
Specifically, the number of characters of the recommended word to be displayed is the sum of the number of characters included in the recommended word to be displayed, and includes: the number of characters contained in each recommended word in the recommended words to be displayed and the number of characters of separators between adjacent recommended words. Wherein, one Chinese character is 2 characters, and English letters, Arabic numerals, punctuation marks and operation symbols are all 1 characters.
Optionally, when the attribute information of the recommended word to be displayed may be the number of characters of the recommended word to be displayed, the implementation manner of the step S101 (obtaining the attribute information of the recommended word to be displayed) may include the following step a and step b.
Step a, the terminal equipment respectively obtains the number of Chinese characters, English letters, Arabic numerals and punctuation marks in the recommended words to be displayed.
For example: the recommendation word to be displayed is' big data omnibearing comparison C Roumexie: 6 pictures telling you who is the most great in history! "the number of the Chinese characters in the recommended word to be displayed is 23, the number of the English letters is 1, the number of the Arabic numerals is 1, the number of the punctuation marks is 3, and the number of the operation symbols is 0.
For another example: if the recommended word to be displayed is "man misturns 2.8 ten thousand of subsequent loving-mingxiang acid weight-reducing history", the number of Chinese characters, the number of English letters, the number of Arabic numerals, the number of punctuation marks and the number of operation symbols in the recommended word to be displayed can be 15, 0, 2 and 1.
And step b, the terminal equipment acquires the number of the characters of the recommended word to be displayed according to a formula m of 2v + w + x + y + z.
The method comprises the steps that m is the number of characters of recommended words to be displayed, v is the number of Chinese characters in the recommended words to be displayed, w is the number of English letters in the recommended words to be displayed, x is the number of Arabic numerals in the recommended words to be displayed, y is the number of punctuation marks in the recommended words to be displayed, and z is the number of operation marks in the recommended words to be displayed.
As described in the above example, when the recommendation word to be displayed is "big data full-azimuth contrast C romaze: 6 pictures tell you who is the most great in history! When the number of the chinese characters in the recommended word to be displayed is 23, the number of the english alphabets is 1, the number of the arabic numerals is 1, the number of the punctuation marks is 3, and the number of the operation symbols is 0, therefore, when the recommended word to be displayed is "man turn by 2.8 ten thousand yellow dawn heart acid losing history", the number of the chinese characters in the recommended word to be displayed is 15, the number of the english alphabets is 0, the number of the arabic numerals is 2, the number of the punctuation marks is 1, and the number of the operation symbols is 1, therefore, the number of the characters m of the recommended word to be displayed is 2+ 15+0+2+1+ 34 according to the formula m 2v + w + x + y + z.
Optionally, when the attribute information of the recommended word to be displayed may be the number of characters of the recommended word to be displayed, the implementation manner of the step S101 (obtaining the attribute information of the recommended word to be displayed) may also be: and receiving the number of the characters of the recommended words to be displayed, which are sent by the recommendation server.
The recommendation server is a server recommending recommendation words to the user. After acquiring the recommended word to be displayed according to the recommendation algorithm, the recommendation server may calculate the number of characters of the recommended word to be displayed first, and then send the recommended word to be displayed and the number of characters of the recommended word to be displayed to the terminal device at the same time. The method for calculating the number of characters of the recommended word to be displayed by the recommendation server may be the same as the method for calculating the number of characters of the recommended word to be displayed by the terminal device, which is not limited in the embodiment of the present invention.
And S102, determining whether the character display area of the search box can completely display the recommended word to be displayed or not according to the attribute information.
The character display area in the embodiment of the present invention refers to an area for displaying characters in the search box. As shown in fig. 2, the search box 20 includes a search control 21 and a region 22 that can be used to display characters, i.e., the region 22 in fig. 2 for displaying characters.
In the above step S102, if the character display area cannot completely display the recommended word to be displayed, the following step S103 is performed, and if the character display area can completely display the recommended word to be displayed, the following step S104 is performed.
S103, displaying the 1 st character to the nth character of the recommended word to be displayed in the character display area, and displaying at least one character behind the nth character of the recommended word to be displayed in a preset area with preset transparency.
Wherein n is the maximum number of characters that can be displayed in the character display area.
The preset transparency in the embodiment of the present invention may be set by a developer according to an empirical value, or by a user according to a usage habit. Illustratively, the preset transparency may be 30%, 45%, 60%, etc.
Illustratively, referring to fig. 3, the recommendation words to be displayed in fig. 3 include two recommendation words, which are respectively "how often the mask is applied" and "dry skin care" search boxes, and the maximum number of characters that can be displayed in the character display area 31 is shown as 27. Since the recommendation word to be displayed cannot be completely displayed in the character display area 31 of the search box, the recommendation word to be displayed is divided into two parts, one part is the 1 st character to the 27 th character of the recommendation word to be displayed, specifically, "how often the facial mask is attached once is one dry skin", and the other part is the character after the 27 th character, specifically, "care". After dividing the recommended word to be displayed into two parts, the first part is displayed in the character display area 31 of the search box, and at least one character of the second part is displayed in the preset area 32 with a preset transparency (fig. 3 illustrates that the whole content of the second part is displayed in the preset area 32).
It should be noted that, on the basis of the above embodiment, before the second part is displayed in the preset area in a divided manner with the preset transparency, it may be determined whether the second part can be completely displayed in the preset area, if the second part can be completely displayed in the preset area, the entire content of the second part is displayed in the preset area with the preset transparency, and if the second part cannot be completely displayed in the preset area, the partial content of the second part is displayed in the preset area with the preset transparency. When the second portion cannot be completely displayed in the preset area, one or more characters ranked in the first portion may be displayed according to the maximum number of characters that can be displayed in the preset area, or one or more keywords in the second portion may be extracted according to the maximum number of characters that can be displayed in the preset area for display.
In the above step S103, an implementation manner of displaying at least one character after the nth character of the recommended word to be displayed in the preset region with the preset transparency is described below, and an implementation manner of displaying at least one character after the nth character of the recommended word to be displayed in the preset region with the preset transparency in the embodiment of the present invention may include the following two manners:
a first kind,
As an optional implementation manner of the embodiment of the present invention, an implementation manner of displaying at least one character after the nth character of the recommended word to be displayed in a preset region with a preset transparency in step S103 may include the following steps:
step 1, generating a target layer.
For example, the size and shape of the target layer may be the same as the size and shape of the preset area.
And 2, displaying at least one character behind the nth character of the recommended word to be displayed in the target layer.
And step 3, covering and displaying the target layer in the preset area by using a preset transparency.
A second kind,
As an optional implementation manner of the embodiment of the present invention, an implementation manner of displaying at least one character after the nth character of the recommended word to be displayed in a preset region with a preset transparency in step S103 may include:
displaying at least one character behind the nth character of the recommended word to be displayed in the preset area, and updating the transparency of the preset area to the preset transparency.
It should be noted that, in the embodiment of the present invention, a sequence of the step of displaying at least one character after the nth character of the recommended word to be displayed in the preset region and the step of updating the transparency of the preset region to the preset transparency is not limited, at least one character after the nth character of the recommended word to be displayed may be displayed in the preset region first, and then the transparency of the preset region is updated to the preset transparency, or the transparency of the preset region may be updated to the preset transparency first, and then at least one character after the nth character of the recommended word to be displayed is displayed in the preset region, or both steps may be performed simultaneously.
Illustratively, referring to fig. 4, the recommended word to be displayed in fig. 4 includes a recommended word that is "most authentic sliced fish meat practice, easy to learn" and the maximum number of characters that can be displayed in the character display area 41 of the search box is 27. As shown in the interface fig. 4a of fig. 4, in the prior art, since the maximum number of characters that can be displayed in the character display area 41 of the search box is 27, only the "most authentic fish-flavored shredded meat practice in the recommended word can be displayed, and the last word" study "in the simple and easy" recommended word cannot be displayed. As shown in the interface fig. 4b in fig. 4, based on the technical solution provided by the foregoing embodiment, the 1 st character to the nth character (most authentic fish-flavor shredded meat practice) of the recommended word to be displayed are displayed in the character display area 41, at least one character (study) after the nth character of the recommended word to be displayed is displayed in the preset area 42, and the transparency of the preset area 42 is updated to 100%, so that the recommended word "most authentic fish-flavor shredded meat practice, simple study" can be completely certified to be displayed in the interface shown in fig. 4.
And S104, displaying the recommended word to be displayed in the character display area.
Illustratively, referring to fig. 5, the recommended words to be displayed in fig. 5 include two recommended words, which are respectively "fish-flavor shredded meat recipe" and "curve-driving skill" search boxes, and the maximum number of characters that can be displayed in the character display area 51 is shown as 27. Since the search box 51 can completely display the recommended word to be displayed, the recommended word "fish-flavor pork si profile i curve driving skill" to be displayed is displayed in the character display area 51 of the search box.
The recommended word display method provided by the embodiment of the invention includes the steps of firstly obtaining attribute information for indicating the size of a display space required for displaying recommended words to be displayed, then determining whether a character display area of a search box can completely display the recommended words to be displayed or not according to the attribute information of the recommended words to be displayed, displaying the recommended words with the maximum number of characters capable of being displayed by the search box in the search box under the condition that the character display area of the search box cannot completely display the recommended words to be displayed, and displaying at least one character of which the recommended words to be displayed exceed the character display area in a preset area by preset transparency. According to the recommendation word display method provided by the embodiment of the invention, when the to-be-displayed recommendation word cannot be completely displayed in the character display area of the search box, the whole or part of the content of the to-be-displayed recommendation word beyond the part can be displayed in the preset area with the preset transparency, so that the embodiment of the invention can avoid or reduce the phenomenon that the recommendation word cannot be completely displayed, further, the search requirement of a user can be better excited, and the purpose of shortening the search path can be achieved.
Another embodiment of the present invention provides a recommended word display method, which is applied to a terminal device. Referring to fig. 6, the recommended word display method includes the following steps S601 to S607:
s601, acquiring the number of characters of the recommended word to be displayed.
S602, determining the maximum number of characters (the value of n) which can be displayed in the character display area of the search box.
Specifically, the implementation manner of step S602 (determining the maximum number of characters that can be displayed in the character display area of the search box) may include the following steps 1 to 3:
step 1, acquiring the length of the character display area and the attribute information of the terminal equipment.
Specifically, in the embodiment of the present invention, the length of the character display area of the search box refers to the physical length of the area for displaying characters in the search box. Illustratively, the length of the character display area may be 5cm, 7cm, 10cm, or the like.
For example, the attribute information of the terminal device may include information of a screen length of the terminal device, a screen width of the terminal device, a screen resolution of the terminal device, and the like. The screen resolution of the terminal device may be 720p (720 × 1280), 1080p (1080 × 1920), 2k (2560 × 1440), and the like.
And 2, acquiring the number of pixel columns contained in the character display area according to the length of the character display area and the attribute information of the terminal equipment.
Specifically, the number of pixel columns in a unit distance may be acquired according to the attribute information of the terminal device, and then the number of pixel columns included in the character display area of the search box may be acquired according to the length of the character display area of the search box and the number of pixel columns in the unit distance.
For example: the screen resolution of the terminal device is 720 × 1280, the screen width is 10cm, the length of the character display area of the search box is 5cm, the number of pixel columns in 1cm is 72, and the number of pixel columns included in the character display area of the search box is 72 × 5 — 360.
And 3, determining the maximum number of characters (the value of n) which can be displayed in the character display area of the search frame according to the pixel column number and the pixel column number required for displaying one character.
The number of pixel columns required for displaying one character is related to the font size, font format and word pitch of the recommended word in the character display area, and the correlation between the font size, font format and word pitch of the recommended word in the character display area is set by the application program to which the search box belongs during development, so that the number of pixel columns required for displaying one character can be obtained based on the setting of the font size, font format and word pitch in the character display area by the application program to which the search box belongs.
For example, if the number of pixel columns required to display one character is 20, the maximum number of characters that can be displayed in the search box (the value of n) may be determined to be 350/20 — 17.5.
S603, judging whether the number of the characters of the recommended word to be displayed is less than or equal to n.
In the previous step S503, if the number of characters of the recommended word to be displayed is greater than n, the following steps S504 and S505 are performed.
S604, determining that the character display area can not completely display the recommended word to be displayed.
S605, displaying the 1 st character to the nth character of the recommended word to be displayed in the character display area, and displaying at least one character behind the nth character of the recommended word to be displayed in a preset area with a preset transparency.
In the above step S603, if the number of characters of the recommended word to be displayed is less than or equal to n, the following steps S606 and S607 are performed.
And S606, determining that the character display area can completely display the recommended word to be displayed.
And S607, displaying the recommended word to be displayed in the character display area.
The method for displaying recommended words provided in this embodiment is a step flow refinement of the recommended word display manner shown in fig. 1, and the implementation principle and the technical effect are similar, and are not described herein again.
Another embodiment of the present invention provides a recommended word display method, which is applied to a terminal device. Referring to fig. 7, the recommended word display method includes the following steps S701 to S706:
and S701, acquiring the display length of the recommended word to be displayed.
Specifically, the length required for displaying one character may be determined according to the screen resolution of the terminal device, and then the product of the length required for displaying one character and the number of characters of the recommended word to be displayed is used as the display length of the recommended word to be displayed.
Illustratively, the number of characters of the recommended word to be displayed is 27, and the distance required for displaying one character is determined to be 0.2cm according to the attribute information of the terminal device, so that the display length of the recommended word to be displayed may be determined to be 0.2cm × 27 — 5.4 cm.
S702, judging whether the display length of the recommended word to be displayed is smaller than or equal to the length of the character display area.
In the step S702, if the display length of the recommended word to be displayed is greater than the length of the character display area, the following steps S703 and S704 are performed.
And S703, determining that the character display area can not completely display the recommended word to be displayed.
S704, displaying the 1 st character to the nth character of the recommended word to be displayed in the character display area, and displaying at least one character behind the nth character of the recommended word to be displayed in a preset area with preset transparency.
In the above step S702, if the display length of the recommended word is smaller than or equal to the length of the character display area of the search box, the following steps S605 and S606 are performed.
S705, determining that the character display area can completely display the recommended word to be displayed.
And S706, displaying the recommended word to be displayed in the character display area.
The method for displaying recommended words provided in this embodiment is also a step flow refinement of the recommended word display manner shown in fig. 1, and the implementation principle and the technical effect are similar, and are not described herein again.
As an optional implementation manner of the embodiment of the present invention, referring to fig. 8, in the embodiment shown in fig. 1, 5, or 6, if the character display area can completely display the recommended word to be displayed, the recommended word display method provided in the embodiment of the present invention further includes:
s801, obtaining a first recommended word.
The first recommended word comprises at least one recommended word, and the recommended content corresponding to the first recommended word is not overlapped with the recommended content corresponding to the recommended word to be displayed.
That is, when the character display area of the search box can completely display the recommended word to be displayed, the recommended words other than the recommended word to be displayed are acquired.
Optionally, the manner of obtaining the first recommended word may be: the method comprises the steps that terminal equipment sends first request information to a recommendation server, then receives a first recommended word sent by the recommendation server, or when the recommendation server sends the recommended word to the terminal equipment, the recommended word with a first priority and the recommended word with a second priority are sent, the terminal equipment extracts the recommended word with the first priority as the recommended word to be displayed, and if the recommended word to be displayed can be completely displayed in a character display area, the recommended word with the second priority is continuously extracted as the first recommended word.
Illustratively, the recommendation to be displayed is "how often the mask is applied i care of dry skin", and the first recommendation is "skin care technique".
S802, displaying the recommended word to be displayed and the first recommended word in the character display area, or displaying at least one character of the recommended word to be displayed and the first recommended word in the character display area, and displaying the at least one character of the first recommended word in the preset area with the preset transparency, or displaying the recommended word to be displayed in the character display area, and displaying the at least one character of the first recommended word in the preset area with the preset transparency.
Optionally, the implementation manner of step S802 may be: under the condition that n is larger than or equal to x + y, displaying the recommended word to be displayed and the first recommended word in the character display area; under the condition that n is larger than x and smaller than x + y, displaying at least one character of the recommended word to be displayed and the first recommended word in the character display area, displaying at least one character of the first recommended word in the preset area with the preset transparency, under the condition that n is equal to x, displaying the recommended word to be displayed in the character display area, and displaying at least one character of the first recommended word in the preset area with the preset transparency;
wherein n is the maximum number of characters that can be displayed in the character display area, x is the number of characters of the recommended word to be displayed, and y is the number of characters of the first recommended word.
In the embodiment, the first recommended word is acquired and the recommended word to be displayed and the first recommended word are displayed under the condition that the character display area can completely display the recommended word to be displayed, and the number of the recommended words is increased, so that the possibility of hitting the search requirement of the user is increased, and the search requirement of the user can be further stimulated.
As another optional implementation manner of the embodiment of the present invention, referring to fig. 9, in the embodiment shown in fig. 1, 5, or 6, if the character display area can completely display the recommended word to be displayed, the recommended word display method provided in the embodiment of the present invention further includes:
and S901, acquiring a second recommended word.
And the recommended content corresponding to the second recommended word is the same as the recommended content corresponding to the recommended word to be displayed, and the number of characters of the second recommended word is greater than that of the recommended word to be displayed.
Optionally, the manner of obtaining the first recommended word may be: the terminal equipment sends second request information to the recommendation server, then receives a second recommended word sent by the recommendation server, or when the recommendation server sends the recommended word to the terminal equipment, the recommended word with the first priority and the recommended word with the second priority are sent, the number of characters of the recommended word with the second priority is larger than that of the recommended word with the second priority, the terminal equipment extracts the recommended word with the first priority as the recommended word to be displayed, and if the recommended word to be displayed can be completely displayed in the character display area, the recommended word with the second priority is re-extracted as the second recommended word.
Illustratively, the recommendation words to be displayed are 'how often the facial mask is pasted once' | dry skin care ', and the second recommendation word is' how often the facial mask is pasted once most scientifically '| dry skin care in autumn and winter'.
S902, displaying the second recommended word in the character display area, or displaying the 1 st character to the nth character of the second recommended word in the character display area, and displaying at least one character behind the nth character of the second recommended word in a preset area by using a preset transparency.
Optionally, the implementation manner of step S902 may be: displaying the second recommended word in the character display area when n is larger than or equal to z; under the condition that n is smaller than z, displaying the 1 st character to the nth character of the second recommended word in the character display area, and displaying at least one character behind the nth character of the second recommended word in a preset area at a preset transparency;
and z is the number of characters of the second recommended word.
In the embodiment, the second recommended word is obtained and displayed under the condition that the character display area can completely display the recommended word to be displayed, and the number of characters of the second recommended word is greater than that of characters of the recommended word to be displayed, so that the recommended content can be more accurately described by the second recommended word, and the search requirement of the user is further stimulated.
Further, the shape, size, and position of the predetermined region in the embodiment of the present invention are exemplified below.
As an optional implementation manner of the embodiment of the present invention, referring to fig. 10, along an arrangement direction of recommended words in the character display area when the recommended words are displayed (shown by an arrow in fig. 10), the preset area 102 is located behind the character display area 101 of the search box;
the number of pixel columns contained in the preset area 102 is positively correlated with the number of pixel columns contained in the screen of the terminal device.
For example, the length of the preset region 102 may be a preset ratio of the screen width of the terminal device. For example: the length of the preset area 102 may be one tenth of the screen width of the terminal device. The width of the preset area 102 may be the same as the width of the search box 101.
It should be noted that the preset region 102 may be located outside the search box, may also be partially located inside the search box, partially located outside the search box, or both located inside the search box, and the position relationship between the preset region and the search box is not limited in this embodiment of the present invention.
As an optional implementation manner of the embodiment of the present invention, referring to fig. 11, along a width direction of the recommended word when the recommended word is displayed (shown by an arrow in fig. 11), the preset area 112 is located below the character display area 111 of the search box;
the number of pixel lines included in the preset area 112 is positively correlated with the number of pixel lines included in the screen of the terminal device.
That is, the preset area 112 is located below the character display area 111 of the search box, and the width of the preset area 112 is positively correlated with the screen length of the terminal device.
For example, the width of the preset area 112 may be a length of the screen of the terminal device proportional to the preset value. For example: the length of the preset area 112 may be one-fifteenth of the screen width of the terminal device. The width length of the preset region 112 may be the same as the length of the character display region 111 of the search box.
As an optional implementation manner of the embodiment of the present invention, referring to fig. 12, the preset area 120 is located at a preset position on a screen of a terminal device; the length and width of the preset region 120 are preset values.
Illustratively, the shape of the preset region 120 is similar to the shape of the screen of the terminal device, the area of the preset region 120 is one-thirtieth of the area of the screen of the terminal device, and the preset region 120 is located at the upper right corner of the screen.
Of course, on the basis of the above embodiments, the preset region in the embodiments of the present invention may also be disposed at other positions, and the size and the shape may also be set at other sizes or shapes, and the size, the shape and the position of the preset region may also be adjusted by a user according to a use requirement during a use process, and it is obvious for a person skilled in the art that the change of the size, the shape and the position of the preset region is obvious, so that no matter how the size, the shape and the position of the preset region are adjusted, the preset region is within the protection scope of the present invention.
Based on the same inventive concept, as an implementation of the foregoing method, an embodiment of the present invention further provides a terminal device, where the terminal device embodiment corresponds to the foregoing method embodiment, and details in the foregoing method embodiment are not repeated in this apparatus embodiment for convenience of reading.
Fig. 13 is a schematic structural diagram of a terminal device according to an embodiment of the present invention, and as shown in fig. 13, a terminal device 1300 according to this embodiment includes:
the obtaining unit 131 is configured to obtain attribute information of recommended words to be displayed, where the recommended words to be displayed include at least one recommended word, and the attribute information is used to indicate the size of a display space required for displaying the recommended words to be displayed;
the processing unit 132 is configured to determine whether the character display area of the search box can completely display the recommended word to be displayed according to the attribute information;
the display unit 133 is configured to display the 1 st character to the nth character of the recommended word to be displayed in the character display area under the condition that the character display area cannot completely display the recommended word to be displayed, and display at least one character after the nth character of the recommended word to be displayed in a preset area with a preset transparency;
wherein n is the maximum number of characters that can be displayed in the character display area.
As an optional implementation manner of the embodiment of the present invention, the attribute information is the number of characters of the recommended word to be displayed;
the processing unit 132 is specifically configured to determine whether the number of characters of the recommended word to be displayed is less than or equal to n; if the number of the characters of the recommended word to be displayed is less than or equal to n, determining that the recommended word to be displayed can be completely displayed in the character display area; and if the number of the characters of the recommended word to be displayed is larger than n, determining that the recommended word to be displayed cannot be completely displayed in the character display area.
As an optional implementation manner of the embodiment of the present invention, the attribute information is a display length of the recommended word to be displayed;
the processing unit 132 is specifically configured to determine whether the display length of the recommended word to be displayed is smaller than or equal to the length of the character display area; if the display length of the recommended word to be displayed is larger than the length of the character display area, determining that the character display area cannot completely display the recommended word; and if the display length of the recommended word to be displayed is less than or equal to the length of the character display area, determining that the character display area can completely display the recommended word to be displayed.
As an optional implementation manner of the embodiment of the present invention, the display unit 133 is specifically configured to generate a target layer; displaying at least one character after the nth character of the recommended word to be displayed in the target layer; and displaying the target layer in the preset area in a covering manner according to a preset transparency.
As an optional implementation manner of the embodiment of the present invention, the display unit 133 is specifically configured to display at least one character after the nth character of the recommended word to be displayed in the preset area, and update the transparency of the preset area to the preset transparency.
As an optional implementation manner of the embodiment of the present invention, the display unit 133 is further configured to, before the 1 st character to the nth character of the recommended word to be displayed are displayed in the character display area, obtain the length of the character display area and attribute information of the terminal device; acquiring the number of pixel columns contained in the character display area according to the length of the character display area and the attribute information of the terminal equipment; and determining the value of n according to the pixel column number and the pixel column number required for displaying one character.
As an optional implementation manner of the embodiment of the present invention, along an arrangement direction of recommended words in the character display area when the recommended words are displayed, the preset area is located behind the character display area;
the pixel column number contained in the preset area is positively correlated with the pixel column number contained in the screen of the terminal equipment.
As an optional implementation manner of the embodiment of the present invention, the display unit 133 is further configured to display the recommended word to be displayed in the character display area when the character display area can completely display the recommended word to be displayed.
As an alternative implementation of the embodiment of the present invention,
the obtaining unit 131 is further configured to obtain a first recommended word, where the first recommended word includes at least one recommended word, and recommended content corresponding to the first recommended word is not overlapped with recommended content corresponding to the recommended word to be displayed;
the display unit 133 is further configured to display the recommended word to be displayed and the first recommended word in the character display area, or display at least one character of the recommended word to be displayed and the first recommended word in the character display area, and display the at least one character of the first recommended word in the preset area with the preset transparency, or display the recommended word to be displayed in the character display area, and display the at least one character of the first recommended word in the preset area with the preset transparency.
As an alternative implementation of the embodiment of the present invention,
the obtaining unit 131 is further configured to obtain a second recommended word, where recommended content corresponding to the second recommended word is the same as recommended content corresponding to the recommended word to be displayed, and the number of characters of the second recommended word is greater than the number of characters of the recommended word to be displayed;
the display unit 133 is further configured to display the second recommended word in the character display area, or display the 1 st character to the nth character of the second recommended word in the character display area, and display at least one character after the nth character of the second recommended word in a preset area with a preset transparency.
The terminal device provided in this embodiment may execute the method for displaying a recommended word provided in the above method embodiment, and the implementation principle and the technical effect are similar, which are not described herein again.
Based on the same inventive concept, the embodiment of the invention also provides electronic equipment. Fig. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 14, the electronic device according to the embodiment includes: a memory 141 and a processor 142, the memory 141 being for storing computer programs; the processor 142 is configured to execute each step in the recommended word display method provided by the above method embodiment when the computer program is called.
In particular, the memory 141 may be used to store software programs as well as various data. The memory 141 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 141 may include a high speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 142 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 141 and calling data stored in the memory 141, thereby integrally monitoring the electronic device. Processor 142 may include one or more processing units.
In addition, it should be understood that the electronic device provided by the embodiment of the present invention may further include: the device comprises a radio frequency unit, a network module, an audio output unit, a receiving unit, a sensor, a display unit, a user receiving unit, an interface unit, a power supply and the like. It will be appreciated by those skilled in the art that the above-described configuration of the electronic device does not constitute a limitation of the electronic device, and that the electronic device may include more or less components, or some components may be combined, or a different arrangement of components may be provided. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The radio frequency unit may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink data from a base station and then process the received downlink data to the processor 142; in addition, the uplink data is sent to the base station. Typically, the radio frequency units include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access for the user through the network module, such as helping the user send and receive e-mails, browse webpages, access streaming media and the like.
The audio output unit may convert audio data received by the radio frequency unit or the network module or stored in the memory 141 into an audio signal and output as sound. Also, the audio output unit may also provide audio output related to a specific function performed by the electronic device (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit comprises a loudspeaker, a buzzer, a receiver and the like.
The receiving unit is used for receiving audio or video signals. The receiving Unit may include a Graphics Processing Unit (GPU) that processes image data of still pictures or video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode, and a microphone. The processed image frames may be displayed on a display unit. The image frames processed by the graphic processor may be stored in a memory (or other storage medium) or transmitted via a radio frequency unit or a network module. The microphone may receive sound and be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit in case of the phone call mode.
The electronic device also includes at least one sensor, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that turns off the display panel and/or the backlight when the electronic device is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., and will not be described herein.
The display unit is used for displaying information input by a user or information provided to the user. The Display unit may include a Display panel, and the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user receiving unit may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user receiving unit includes a touch panel and other input devices. A touch panel, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel (e.g., operations by a user on or near the touch panel using a finger, a stylus, or any suitable object or attachment). The touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 142, and receives and executes commands sent by the processor 142. In addition, the touch panel may be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel, the user receiving unit may include other input devices. In particular, other input devices may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, which are not described in detail herein.
Further, the touch panel may be overlaid on the display panel, and when the touch panel detects a touch operation thereon or nearby, the touch panel transmits the touch operation to the processor 142 to determine the type of the touch event, and then the processor 142 provides a corresponding visual output on the display panel according to the type of the touch event. Generally, the touch panel and the display panel are two independent components to implement the input and output functions of the electronic device, but in some embodiments, the touch panel and the display panel may be integrated to implement the input and output functions of the electronic device, and the implementation is not limited herein.
The interface unit is an interface for connecting an external device and the electronic equipment. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements in the electronic equipment or may be used to transmit data between the electronic equipment and the external device.
The electronic device may further include a power source (e.g., a battery) for supplying power to the various components, and optionally, the power source may be logically connected to the processor 142 via a power management system, so that the power management system may manage charging, discharging, and power consumption.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when being executed by a processor, the computer program realizes the recommended word display method provided by the method embodiment.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied in the medium.
Computer readable media include both permanent and non-permanent, removable and non-removable storage media. Storage media may implement information storage by any method or technology, and the information may be computer-readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transmyedia) such as modulated data signals and carrier waves.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely exemplary of the invention, which can be understood and carried into effect by those skilled in the art. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A recommended word display method, comprising:
acquiring attribute information of recommended words to be displayed, wherein the recommended words to be displayed comprise at least one recommended word, and the attribute information is used for indicating the size of a display space required by displaying the recommended words to be displayed;
determining whether the character display area of the search box can completely display the recommended word to be displayed or not according to the attribute information;
under the condition that the character display area cannot completely display the recommended word to be displayed, displaying the 1 st character to the nth character of the recommended word to be displayed in the character display area, and displaying at least one character behind the nth character of the recommended word to be displayed in a preset area by using a preset transparency;
wherein n is the maximum number of characters that can be displayed in the character display area.
2. The method according to claim 1, wherein the attribute information is the number of characters of the recommended word to be displayed;
the determining whether the character display area of the search box can completely display the recommended word to be displayed according to the attribute information includes:
judging whether the number of characters of the recommended word to be displayed is less than or equal to n;
if the number of the characters of the recommended word to be displayed is less than or equal to n, determining that the recommended word to be displayed can be completely displayed in the character display area;
and if the number of the characters of the recommended word to be displayed is larger than n, determining that the recommended word to be displayed cannot be completely displayed in the character display area.
3. The method according to claim 1, wherein the attribute information is a display length of the recommended word to be displayed;
the determining whether the character display area of the search box can completely display the recommended word to be displayed according to the attribute information includes:
judging whether the display length of the recommended word to be displayed is smaller than or equal to the length of the character display area;
if the display length of the recommended word to be displayed is smaller than or equal to the length of the character display area, determining that the character display area can completely display the recommended word to be displayed;
and if the display length of the recommended word to be displayed is greater than the length of the character display area, determining that the character display area cannot completely display the recommended word.
4. The method according to claim 1, wherein the displaying at least one character after the nth character of the recommended word to be displayed in a preset area with a preset transparency comprises:
generating a target layer;
displaying at least one character behind the nth character of the recommended word to be displayed in the target layer;
and covering and displaying the target layer in the preset area by using a preset transparency.
5. The method according to claim 1, wherein the displaying at least one character after the nth character of the recommended word to be displayed in a preset area with a preset transparency comprises:
displaying at least one character after the nth character of the recommended word to be displayed in the preset area, and updating the transparency of the preset area to the preset transparency.
6. The method according to claim 1, wherein before the 1 st to nth characters of the recommended word to be displayed are displayed in the character display area, the method further comprises:
acquiring the length of the character display area and attribute information of the terminal equipment;
acquiring the number of pixel columns contained in the character display area according to the length of the character display area and the attribute information of the terminal equipment;
and determining the value of n according to the pixel column number and the pixel column number required for displaying one character.
7. The method according to claim 1, wherein the preset area is located behind the character display area along an arrangement direction of the recommended word in the character display area when the recommended word is displayed;
the pixel column number contained in the preset area is positively correlated with the pixel column number contained in the screen of the terminal equipment.
8. The method according to any one of claims 1 to 7, wherein in a case where the character display area is capable of completely displaying the recommended word to be displayed, the method further comprises:
acquiring a first recommended word, wherein the first recommended word comprises at least one recommended word, and the recommended content corresponding to the first recommended word is not overlapped with the recommended content corresponding to the recommended word to be displayed;
displaying the recommended word to be displayed and the first recommended word in the character display area, or displaying at least one character of the recommended word to be displayed and the first recommended word in the character display area, and displaying the at least one character of the first recommended word in the preset area with the preset transparency, or displaying the recommended word to be displayed in the character display area, and displaying the at least one character of the first recommended word in the preset area with the preset transparency.
9. The method according to any one of claims 1 to 7, wherein in a case where the character display area is capable of completely displaying the recommended word to be displayed, the method further comprises:
acquiring a second recommended word, wherein the recommended content corresponding to the second recommended word is the same as the recommended content corresponding to the recommended word to be displayed, and the number of characters of the second recommended word is greater than that of the recommended word to be displayed;
and displaying the second recommended word in the character display area, or displaying the 1 st character to the nth character of the second recommended word in the character display area, and displaying at least one character behind the nth character of the second recommended word in a preset area with preset transparency.
10. A terminal device, comprising:
the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring attribute information of recommended words to be displayed, the recommended words to be displayed comprise at least one recommended word, and the attribute information is used for indicating the size of a display space required by the recommended words to be displayed;
the processing unit is used for determining whether the character display area of the search box can completely display the recommended word to be displayed or not according to the attribute information;
the display unit is used for displaying the 1 st character to the nth character of the recommended word to be displayed in the character display area under the condition that the character display area cannot completely display the recommended word to be displayed, and displaying at least one character behind the nth character of the recommended word to be displayed in a preset area at a preset transparency;
wherein n is the maximum number of characters that can be displayed in the character display area.
11. An electronic device, comprising: a memory for storing a computer program and a processor; the processor is configured to execute the recommended word display method according to any one of claims 1 to 9 when the computer program is called.
12. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the recommended word display method according to any one of claims 1 to 9.
CN202011111500.4A 2020-10-16 2020-10-16 Recommended word display method and terminal equipment Pending CN112241491A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011111500.4A CN112241491A (en) 2020-10-16 2020-10-16 Recommended word display method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011111500.4A CN112241491A (en) 2020-10-16 2020-10-16 Recommended word display method and terminal equipment

Publications (1)

Publication Number Publication Date
CN112241491A true CN112241491A (en) 2021-01-19

Family

ID=74168894

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011111500.4A Pending CN112241491A (en) 2020-10-16 2020-10-16 Recommended word display method and terminal equipment

Country Status (1)

Country Link
CN (1) CN112241491A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035966A (en) * 2014-05-16 2014-09-10 百度在线网络技术(北京)有限公司 Method and device for providing extended search terms
CN104156405A (en) * 2014-03-11 2014-11-19 百度在线网络技术(北京)有限公司 Searching method, system and device
CN104598542A (en) * 2014-12-30 2015-05-06 广州酷狗计算机科技有限公司 Display method and device for multimedia information
US20150331962A1 (en) * 2012-12-20 2015-11-19 Uc Mobile Limited Method and device for scaling font size of page in mobile terminal
CN106201518A (en) * 2016-07-12 2016-12-07 腾讯科技(深圳)有限公司 A kind of method for information display and electronic equipment
CN109597934A (en) * 2018-11-23 2019-04-09 北京字节跳动网络技术有限公司 Determine method, apparatus, storage medium and the electronic equipment clicked and recommend word
CN109977130A (en) * 2019-03-29 2019-07-05 珠海豹好玩科技有限公司 A kind of hot word methods of exhibiting and system
CN110737826A (en) * 2019-09-06 2020-01-31 拉扎斯网络科技(上海)有限公司 Search recommendation method and device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150331962A1 (en) * 2012-12-20 2015-11-19 Uc Mobile Limited Method and device for scaling font size of page in mobile terminal
CN104156405A (en) * 2014-03-11 2014-11-19 百度在线网络技术(北京)有限公司 Searching method, system and device
CN104035966A (en) * 2014-05-16 2014-09-10 百度在线网络技术(北京)有限公司 Method and device for providing extended search terms
CN104598542A (en) * 2014-12-30 2015-05-06 广州酷狗计算机科技有限公司 Display method and device for multimedia information
CN106201518A (en) * 2016-07-12 2016-12-07 腾讯科技(深圳)有限公司 A kind of method for information display and electronic equipment
CN109597934A (en) * 2018-11-23 2019-04-09 北京字节跳动网络技术有限公司 Determine method, apparatus, storage medium and the electronic equipment clicked and recommend word
CN109977130A (en) * 2019-03-29 2019-07-05 珠海豹好玩科技有限公司 A kind of hot word methods of exhibiting and system
CN110737826A (en) * 2019-09-06 2020-01-31 拉扎斯网络科技(上海)有限公司 Search recommendation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108073343B (en) display interface adjusting method and mobile terminal
CN110891144A (en) Image display method and electronic equipment
CN110764666B (en) Display control method and electronic equipment
CN107943390B (en) Character copying method and mobile terminal
CN110109604B (en) Application interface display method and mobile terminal
CN107734170B (en) Notification message processing method, mobile terminal and wearable device
CN107783747B (en) Interface display processing method and mobile terminal
CN108628985B (en) Photo album processing method and mobile terminal
CN107748640B (en) Screen-off display method and mobile terminal
CN110866038A (en) Information recommendation method and terminal equipment
CN107734172B (en) Information display method and mobile terminal
CN109901761B (en) Content display method and mobile terminal
CN110703972B (en) File control method and electronic equipment
US20150089431A1 (en) Method and terminal for displaying virtual keyboard and storage medium
CN109684107B (en) Information reminding method and device
CN109815462B (en) Text generation method and terminal equipment
CN108984066B (en) Application icon display method and mobile terminal
CN108874906B (en) Information recommendation method and terminal
CN108196781B (en) Interface display method and mobile terminal
WO2019076377A1 (en) Image viewing method and mobile terminal
US20220321120A1 (en) Touch button, control method, and electronic device
WO2020125405A1 (en) Control method for terminal apparatus, and terminal apparatus
CN110012152B (en) Interface display method and terminal equipment
CN109063076B (en) Picture generation method and mobile terminal
CN111061446A (en) Display method and electronic equipment

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