CN106843860B - Method, device and system for adjusting display style of search box - Google Patents

Method, device and system for adjusting display style of search box Download PDF

Info

Publication number
CN106843860B
CN106843860B CN201710001724.1A CN201710001724A CN106843860B CN 106843860 B CN106843860 B CN 106843860B CN 201710001724 A CN201710001724 A CN 201710001724A CN 106843860 B CN106843860 B CN 106843860B
Authority
CN
China
Prior art keywords
display style
target
input content
search box
current input
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.)
Active
Application number
CN201710001724.1A
Other languages
Chinese (zh)
Other versions
CN106843860A (en
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 Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710001724.1A priority Critical patent/CN106843860B/en
Publication of CN106843860A publication Critical patent/CN106843860A/en
Application granted granted Critical
Publication of CN106843860B publication Critical patent/CN106843860B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The invention discloses a method, a device and a system for adjusting display styles of a search box, and belongs to the technical field of computers. The method comprises the following steps: when detecting that the input content in the target search box changes, acquiring the current input content in the target search box, sending the current input content to a server, wherein the current input content is used for determining a first display style corresponding to a target word contained in the current input content according to a pre-stored corresponding relation between the word and the display style, receiving the first display style sent by the server, and adjusting the display style of the target search box to the first display style. By adopting the invention, the display flexibility of the search box can be improved.

Description

Method, device and system for adjusting display style of search box
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a system for adjusting a display style of a search box.
Background
With the development of computer technology and network technology, more and more application programs are developed and applied, and at present, application programs are generally provided with a search function, and a user can obtain related information from a server of the application program by using the search function.
The user can input the words of the information to be acquired in the search box provided by the application program, then click the search key, the terminal can send the query request carrying the words to the server of the application program, and after receiving the query request, the server can return the related information related to the words, so that the terminal can receive and display the related information.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
in the searching process of a user, a search box provided by an application program is always a static rectangular block diagram in a black and white mode, the mode of the search box is single, and the display flexibility of the search box is poor.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method, an apparatus, and a system for adjusting a display style of a search box. The technical scheme is as follows:
in a first aspect, a method for adjusting a display style of a search box is provided, the method comprising:
when detecting that the input content in the target search box changes, acquiring the current input content in the target search box;
sending the current input content to a server, wherein the current input content is used for determining a first display style corresponding to a target word contained in the current input content according to a corresponding relation between pre-stored words and display styles;
and receiving the first display style sent by the server, and adjusting the display style of the target search box to the first display style.
Optionally, the method further includes:
and when a storage instruction of the first display style is received, storing the first display style.
In this way, if the user finds himself/herself like the display style of the current search box in the input process, the display style may be manually stored.
Optionally, the method further includes:
and when the input content in the target search box is empty, setting the display style of the target search box to be the first display style.
Thus, if the user finds himself/herself like the display style of the current search box during the input process, the display style may be set as the default display style of the search box.
Optionally, when detecting that the input content in the target search box changes, acquiring the current input content in the target search box includes:
when detecting that an input cursor in a target search box moves, acquiring current input content in the target search box; alternatively, the first and second electrodes may be,
when a search confirmation instruction input by a user is detected, acquiring current input content in the target search box; alternatively, the first and second electrodes may be,
and when detecting that the number of the input characters in the target search box changes, acquiring the current input content in the target search box.
In a second aspect, a method for adjusting a display style of a search box is provided, the method comprising:
receiving current input content in a target search box sent by a terminal;
determining a first display style corresponding to a target word contained in the current input content according to a corresponding relation between pre-stored words and display styles;
and sending the first display style to the terminal, wherein the first display style is used for adjusting the display style of the target search box to the first display style.
Optionally, the method further includes:
if the corresponding relation does not have the target word contained in the current input content, acquiring a target picture corresponding to the target word;
generating a second display style according to the target picture and the display style template, and correspondingly storing the target words and the second display style to the corresponding relation;
and sending the second display style to the terminal.
Thus, even if the display style related to the input content is not stored in the server, the server can generate a new display style according to the input content and send the new display style to the terminal, and the display flexibility of the search box can be improved.
Optionally, the determining, according to a correspondence between words and display styles stored in advance, a first display style corresponding to a target word included in the current input content includes:
acquiring a first target word with highest degree in a plurality of target words contained in the current input content;
and determining a first display style corresponding to the first target word according to the corresponding relation between the pre-stored word and the display style.
In this way, if a plurality of target words exist in the input content, the server can select the display style corresponding to the most popular target word and send the selected display style to the terminal.
Optionally, the determining, according to a correspondence between words and display styles stored in advance, a first display style corresponding to a target word included in the current input content includes:
and if the current input content and the last input content in the target search box contain different target words, determining a first display style corresponding to the target words contained in the current input content according to the corresponding relation between the pre-stored words and the pre-stored display styles.
Therefore, the situation that the server continuously sends the same display style to the terminal for multiple times in the process of inputting by the user in the search box can be effectively avoided.
In a third aspect, a terminal is provided, where the terminal includes:
the acquisition module is used for acquiring the current input content in the target search box when the input content in the target search box is detected to be changed;
the sending module is used for sending the current input content to a server, wherein the current input content is used for determining a first display style corresponding to a target word contained in the current input content according to a corresponding relation between pre-stored words and display styles;
and the receiving module is used for receiving the first display style sent by the server and adjusting the display style of the target search box to the first display style.
Optionally, the terminal further includes:
and the storage module is used for storing the first display style when receiving a storage instruction of the first display style.
Optionally, the terminal further includes:
and the setting module is used for setting the display style of the target search box as the first display style when the input content in the target search box is empty.
Optionally, the obtaining module is configured to:
when detecting that an input cursor in a target search box moves, acquiring current input content in the target search box; alternatively, the first and second electrodes may be,
when a search confirmation instruction input by a user is detected, acquiring current input content in the target search box; alternatively, the first and second electrodes may be,
and when detecting that the number of the input characters in the target search box changes, acquiring the current input content in the target search box.
In a fourth aspect, a server is provided, the server comprising:
the receiving module is used for receiving the current input content in the target search box sent by the terminal;
the determining module is used for determining a first display style corresponding to a target word contained in the current input content according to a corresponding relation between a pre-stored word and a display style;
and the first sending module is used for sending the first display style to the terminal, and the first display style is used for adjusting the display style of the target search box to the first display style.
Optionally, the server further includes:
an obtaining module, configured to obtain a target picture corresponding to a target word if the target word included in the current input content does not exist in the corresponding relationship;
the generating module is used for generating a second display style according to the target picture and the display style template and correspondingly storing the target words and the second display style to the corresponding relation;
and the second sending module is used for sending the second display style to the terminal.
Optionally, the determining module includes:
the obtaining submodule is used for obtaining a first target word with the highest degree in a plurality of target words contained in the current input content;
and the determining submodule is used for determining a first display style corresponding to the first target word according to the corresponding relation between the pre-stored word and the display style.
Optionally, the determining module is configured to:
and if the current input content and the last input content in the target search box contain different target words, determining a first display style corresponding to the target words contained in the current input content according to the corresponding relation between the pre-stored words and the pre-stored display styles.
In a fifth aspect, an apparatus for adjusting a display style of a search box is provided, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when detecting that the input content in the target search box changes, acquiring the current input content in the target search box;
sending the current input content to a server, wherein the current input content is used for determining a first display style corresponding to a target word contained in the current input content according to a corresponding relation between pre-stored words and display styles;
and receiving the first display style sent by the server, and adjusting the display style of the target search box to the first display style.
In a sixth aspect, an apparatus for adjusting a display style of a search box is provided, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
receiving current input content in a target search box sent by a terminal;
determining a first display style corresponding to a target word contained in the current input content according to a corresponding relation between pre-stored words and display styles;
and sending the first display style to the terminal, wherein the first display style is used for adjusting the display style of the target search box to the first display style.
In a seventh aspect, a system for adjusting a display style of a search box is provided, where the system includes a terminal and a server, where:
the terminal is used for acquiring current input content in a target search box when detecting that the input content in the target search box changes, sending the current input content to the server, wherein the current input content is used for determining a first display style corresponding to a target word contained in the current input content according to a pre-stored corresponding relation between the word and the display style, receiving the first display style sent by the server, and adjusting the display style of the target search box to the first display style;
the server is configured to receive current input content in the target search box sent by the terminal, determine a first display style corresponding to a target word included in the current input content according to a pre-stored correspondence between the word and the display style, and send the first display style to the terminal, where the first display style is used to adjust the display style of the target search box to the first display style.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, when the change of the input content in the target search box is detected, the terminal acquires the current input content in the target search box and sends the current input content to the server, wherein the current input content is used for determining a first display style corresponding to a target word contained in the current input content according to the corresponding relation between the pre-stored word and the pre-stored display style, receiving the first display style sent by the server and adjusting the display style of the target search box to the first display style. In this way, when the user performs an input operation in the search box, the terminal can acquire the display style of the search box related to the currently input content in the search box from the server, that is, the display style of the search box can be changed according to different input contents, so that the display flexibility of the search box can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, 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 flowchart of a method for adjusting a display style of a search box according to an embodiment of the present invention;
FIG. 2 is a flowchart of a process for generating a display style according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating an effect of adjusting a display style of a search box according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a server according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a server according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a server according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The embodiment of the invention provides a method for adjusting the display style of a search box, which can be realized by a terminal and a server together. The terminal can be any terminal provided with an application program, such as a mobile phone, a computer and the like, the application program can be an application program with a search function, such as a web browsing application, a video playing application and the like, the terminal can be provided with a processor, a memory, a communication component, a display component and an input component, the processor can be used for processing the process of adjusting the display style of a search box, the memory can be used for storing data required and generated in the following processing process, the communication component can be used for receiving and sending the data, the display component can be used for displaying input content, display style and the like, can be a screen, and the input component can be used for a user to input an instruction to the terminal, and can be a keyboard or a control key and the like. The server may be the server of the application program with the search function, the server may be provided with a processor, a memory and a communication component, the processor may be configured to process input content sent by the terminal, the memory may be configured to store data required and generated in the following processes, and the communication component may be configured to perform data interaction with the terminal. In this embodiment, the terminal is taken as a computer, and the application program is taken as a web browsing application as an example, so as to perform detailed description of the scheme.
The process flow shown in fig. 1 will be described in detail below with reference to specific embodiments, and the contents may be as follows:
step 101, when detecting that the input content in the target search box changes, the terminal acquires the current input content in the target search box.
In implementation, a user may install an application program (i.e., a web browsing application) for browsing a web page on a terminal, and the user may click to open the web browsing application, and then trigger the terminal to display a main page of the web browsing application, where the main page may be provided with at least one search box, and when the user wants to search for some target information, the user may input a search term and sentence related to the target information in the search box (i.e., the target search box). At this time, the terminal may detect whether the input content in the target search box changes, specifically, when the input cursor appears in the target search box, the detection process may be triggered, and after the user inputs the text information in the target search box, the terminal may detect the change of the input content in the target search box, and may further obtain the current input content in the target search box. The input content change may be a change from null to character in the input content in the target search box, a decrease or increase in the input content, a change in at least one character in the input content, or other various situations.
Optionally, the above-mentioned manner for detecting the change of the input content and triggering the terminal to acquire the current input content is various, and three feasible manners are provided as follows:
the first method is as follows: and when the movement of the input cursor in the target search box is detected, acquiring the current input content in the target search box.
In implementation, the terminal may detect the position of the input cursor in the target search box in real time, and when the input cursor moves (i.e., the position of the input cursor changes), it may be considered that the current input content in the target search box changes, and then the terminal may obtain the current input content in the target search box.
The second method comprises the following steps: and when a search confirmation instruction input by a user is detected, acquiring the current input content in the target search box.
In implementation, after the user completes the input operation in the target search box, the user may click the confirmation key corresponding to the target search box, at this time, the terminal may detect the search confirmation instruction input by the user, may determine that the current input content in the target search box has changed, and then the terminal may obtain the current input content in the target search box.
The third method comprises the following steps: and when detecting that the number of the input characters in the target search box changes, acquiring the current input content in the target search box.
In implementation, the terminal may detect the number of characters input in the target search box in real time, and if the number of characters input changes, it may be considered that the current input content in the target search box changes, and the terminal may further obtain the current input content in the target search box.
Optionally, to avoid frequent rapid meaningless changes in the display style of the target search box, the processing of step 101 may be as follows: and periodically detecting the input content in the target search box, and if the input content in the target search box changes, acquiring the current input content in the target search box by the terminal.
In implementation, the interval duration for detecting the input content in the target search box may be set, so that after the input cursor appears in the target search, the terminal may periodically detect the input content in the target search box at the interval duration, and if the input content detected at a certain time is different from the input content detected at the last time, the input content in the target search box is changed, and the terminal may further obtain the current input content in the target search box.
Step 102, the terminal sends the current input content to the server.
In implementation, after acquiring the current input content in the target search box, the terminal may send the current input content to the server.
And 103, receiving the current input content in the target search box sent by the terminal by the server.
In implementation, after the terminal sends the current input content in the target search box to the server, the server may receive the corresponding current input content.
And 104, the server determines a first display style corresponding to the target word contained in the current input content according to the corresponding relation between the pre-stored word and the display style.
In implementation, the server may store a large number of display patterns of the search box, and the display patterns may be designed by a technician, or uploaded to the server after being designed by a user, or crawled from a network by the server. After the server obtains a certain display style of the search box, a technician may label a word for each display style, where the word may be used to describe the theme or style of the display style, and the like. Then, the server can establish the corresponding relation between the words and the display styles, so that the server can find the corresponding display styles according to the words. It should be noted that, in the above correspondence relationship, one word may correspond to a plurality of display styles, or one display style may correspond to a plurality of words. After receiving the current input content in the target search box, the server may obtain target words included in the current input content, specifically, may perform word segmentation processing on the current input content, and screen out the target words included therein that may be used for describing a theme or a style. Then, the server can search a first display style corresponding to the target word in the corresponding relation between the pre-stored word and the display style. It should be noted that, if the target word corresponds to multiple display styles, the server may randomly obtain one display style from the multiple display styles, or may obtain a latest display style from the multiple display styles.
Optionally, if there is no target word in the correspondence between the word and the display style, a new correspondence between the display style and the target word may be created, and the corresponding processing may be as follows: if the target words contained in the current input content do not exist in the corresponding relation, acquiring target pictures corresponding to the target words; generating a second display style according to the target picture and the display style template, and correspondingly storing the target words and the second display style to the corresponding relation; and sending the second display style to the terminal.
In implementation, after receiving current input content in a target search box sent by a terminal, a server may acquire a target word included in the current input content, and then may search a first display style corresponding to the target word in a correspondence between the pre-stored word and the display style, if there is no corresponding item of the target word in the correspondence, it means that no corresponding display style is stored in the current server, and then the server may first acquire a target picture corresponding to the target word, specifically, may search a target picture corresponding to the target word in a preset gallery, or may crawl a corresponding target picture over a network. Then, the server may obtain a pre-stored display style template, generate a second display style based on the target picture and the display style template, as shown in fig. 2, and correspondingly store the target word and the second display style into the corresponding relationship, so that, after input content including the target word is received again, the second display style may be returned to the terminal based on the corresponding relationship. In addition, the server may transmit the generated second presentation style to the terminal for the currently input content transmitted this time, or may choose not to transmit the generated second presentation style to the terminal, considering that the frequency of change of the input content of the target search box is generally high and the processing of generating the second presentation style takes a certain time. It can be understood that the second display style may be designed and generated by a technician, that is, after the target word that does not exist in the corresponding relationship is obtained, the server may record the target word first, and the technician may then view the target word recorded by the server, design a display style corresponding to the target word, and add the designed display style and the target word to the corresponding relationship. It should be noted that, the display style generated for the first time when the server receives the current input content containing the target word for the first time may be referred to as a second display style, and if the server receives the current input content containing the target word again, the second display style is the same as the first display style in steps 101 to 106.
Optionally, when the input content includes a plurality of target words, the server may process one of the target words, and accordingly, the process of step 104 may be as follows: the method comprises the steps of obtaining a first target word with the highest degree of heat in a plurality of target words contained in current input content, and determining a first display style corresponding to the first target word according to the corresponding relation between the pre-stored word and the display style.
In implementation, after the server receives the input content of the search box sent by the terminal and acquires the words contained in the input content, the occurrence frequency (i.e. the heat degree) of each word can be recorded. In this way, after receiving the current input content in the target search box sent by the terminal, the server may obtain a plurality of target words contained therein, then determine the heat degree of each target word, and obtain the first target word with the highest heat degree, so that the first display style corresponding to the first target word may be determined in the correspondence between the pre-stored words and the display styles. Of course, the above is only a feasible process for the case that the input content includes a plurality of target words, and the server may further determine, after acquiring the plurality of target words, a proportion of each target word in the current input content, specifically, the proportion may be determined according to the number of words and a sentence component belonging to the input content, and further, the target word with the highest proportion may be determined as the first target word. Or the first display style selected by the server may be a display style corresponding to a plurality of target words together, or the first display style may also be a display style with the largest number of corresponding target words.
Optionally, in order to avoid that the server continuously sends the same display style to the terminal, the processing of step 104 may be as follows: and if the current input content and the last input content in the target search box contain different target words, determining a first display style corresponding to the target words contained in the current input content according to the corresponding relation between the pre-stored words and the display styles.
In implementation, after receiving current input content in a target search box sent by a terminal and acquiring target words contained in the current input content, a server may compare the target words acquired this time with target words contained in last input content in the target search box, if the target words contained in the input contents of two times are not identical, the server may determine a first display style corresponding to the target words contained in the current input content according to a corresponding relationship between pre-stored words and display styles, and if the target words contained in the input contents of two times are identical, the server does not perform any processing.
Step 105, the server sends the first display style to the terminal.
In implementation, after acquiring the first display style, the server may send the first display style to the terminal. It is understood that the server may record the display pattern of the search box that has been sent to the terminal within a preset history duration, where the preset history duration may be 1 hour, and if the server has sent the first display pattern to the terminal within the past 1 hour, the sending may be cancelled this time.
And 106, the terminal receives the first display style sent by the server and adjusts the display style of the target search box into the first display style.
In implementation, the terminal may receive the first display style sent by the server, may adjust the display style of the target search box to the first display style, and may automatically cache the first display style locally, and delete the first display style after a preset duration. Fig. 3 exemplarily illustrates a technical effect of the present scheme, in which when the input content in the target search box is empty, the target search box is a static rectangular block diagram in a black and white style, and when the user inputs "flower", the display style of the target search box is changed to a display style related to "flower".
Optionally, the user may control the terminal to store the received display style, and the corresponding processing may be as follows: and when receiving a storage instruction of the first display style, the terminal stores the first display style.
In implementation, after the terminal receives the first display style sent by the server and adjusts the display style of the target search box to the first display style, the user can control the terminal to store the first display style, specifically, the user can right click the target search box to call out the function menu and click the option for storing the current display style, at this time, the terminal can receive a storage instruction of the first display style, and then can store the first display style.
Optionally, the user may set the first display style as a default display style of the target search box, and the corresponding processing may be as follows: and when the input content in the target search box is empty, setting the display style of the target search box as a first display style.
In implementation, after receiving the first display style sent by the server, the terminal may set the default display style of the target search box to the first display style, that is, when the input content in the target search box is empty, set the display style of the target search box to the first display style. It can be understood that, after receiving the first display style sent by the server, the terminal needs to store the first display style, where the storage processing may be permanent storage, or may be automatic caching (i.e. transient storage) in step 106, the terminal may be provided with two display style lists, in which the permanently stored display style and the automatically cached display style are stored respectively, and the user may view the two display style lists, so as to set the default display style of the target search box to any display style in the two lists. It should be noted that, if the user controls the terminal to store the first display style, the terminal sets the default display style of the target search box as the first display style even if the permanently stored display style list includes a plurality of display styles.
In the embodiment of the invention, when the change of the input content in the target search box is detected, the terminal acquires the current input content in the target search box and sends the current input content to the server, wherein the current input content is used for determining a first display style corresponding to a target word contained in the current input content according to the corresponding relation between the pre-stored word and the pre-stored display style, receiving the first display style sent by the server and adjusting the display style of the target search box to the first display style. In this way, when the user performs an input operation in the search box, the terminal can acquire the display style of the search box related to the currently input content in the search box from the server, that is, the display style of the search box can be changed according to different input contents, so that the display flexibility of the search box can be improved.
Based on the same technical concept, an embodiment of the present invention further provides a terminal, as shown in fig. 4, where the terminal includes:
an obtaining module 401, configured to obtain current input content in a target search box when it is detected that input content in the target search box changes;
a sending module 402, configured to send the current input content to a server, where the current input content is used to determine, according to a correspondence between a pre-stored word and a display style, a first display style corresponding to a target word included in the current input content;
a receiving module 403, configured to receive the first display style sent by the server, and adjust the display style of the target search box to the first display style.
Optionally, as shown in fig. 5, the terminal further includes:
the storage module 404 is configured to store the first display style when receiving a storage instruction of the first display style.
Optionally, as shown in fig. 6, the terminal further includes:
a setting module 405, configured to set the display style of the target search box to the first display style when the input content in the target search box is empty.
Optionally, the obtaining module 401 is configured to:
when detecting that an input cursor in a target search box moves, acquiring current input content in the target search box; alternatively, the first and second electrodes may be,
when a search confirmation instruction input by a user is detected, acquiring current input content in the target search box; alternatively, the first and second electrodes may be,
and when detecting that the number of the input characters in the target search box changes, acquiring the current input content in the target search box.
Based on the same technical concept, an embodiment of the present invention further provides a server, as shown in fig. 7, where the server includes:
a receiving module 701, configured to receive current input content in a target search box sent by a terminal;
a determining module 702, configured to determine, according to a correspondence between a pre-stored word and a display style, a first display style corresponding to a target word included in the current input content;
a first sending module 703 is configured to send the first display style to the terminal, where the first display style is used to adjust the display style of the target search box to the first display style.
Optionally, as shown in fig. 8, the server further includes:
an obtaining module 704, configured to obtain a target picture corresponding to a target word if the target word included in the current input content does not exist in the corresponding relationship;
a generating module 705, configured to generate a second display style according to the target picture and the display style template, and store the target word and the second display style in the corresponding relationship;
a second sending module 706, configured to send the second display style to the terminal.
Optionally, as shown in fig. 9, the determining module 702 includes:
an obtaining sub-module 7021, configured to obtain a first target word with the highest degree of heat in a plurality of target words included in the current input content;
the determining submodule 7022 is configured to determine, according to a correspondence between a pre-stored word and a display style, a first display style corresponding to the first target word.
Optionally, the determining module 702 is configured to:
and if the current input content and the last input content in the target search box contain different target words, determining a first display style corresponding to the target words contained in the current input content according to the corresponding relation between the pre-stored words and the pre-stored display styles.
In the embodiment of the invention, when the change of the input content in the target search box is detected, the terminal acquires the current input content in the target search box and sends the current input content to the server, wherein the current input content is used for determining a first display style corresponding to a target word contained in the current input content according to the corresponding relation between the pre-stored word and the pre-stored display style, receiving the first display style sent by the server and adjusting the display style of the target search box to the first display style. In this way, when the user performs an input operation in the search box, the terminal can acquire the display style of the search box related to the currently input content in the search box from the server, that is, the display style of the search box can be changed according to different input contents, so that the display flexibility of the search box can be improved.
It should be noted that: in the apparatus for adjusting the display style of the search box according to the foregoing embodiment, when the display style of the search box is adjusted, only the division of the function modules 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 apparatus is divided into different function modules, so as to complete all or part of the functions described above. In addition, the apparatus for adjusting the display style of the search box and the method embodiment for adjusting the display style of the search box provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
Based on the same technical concept, yet another exemplary embodiment of the present disclosure provides a system for adjusting a display style of a search box, the system including a terminal and a server, wherein:
the terminal is used for acquiring current input content in a target search box when detecting that the input content in the target search box changes, sending the current input content to the server, wherein the current input content is used for determining a first display style corresponding to a target word contained in the current input content according to a pre-stored corresponding relation between the word and the display style, receiving the first display style sent by the server, and adjusting the display style of the target search box to the first display style;
the server is configured to receive current input content in the target search box sent by the terminal, determine a first display style corresponding to a target word included in the current input content according to a pre-stored correspondence between the word and the display style, and send the first display style to the terminal, where the first display style is used to adjust the display style of the target search box to the first display style.
In the embodiment of the invention, when the change of the input content in the target search box is detected, the terminal acquires the current input content in the target search box and sends the current input content to the server, wherein the current input content is used for determining a first display style corresponding to a target word contained in the current input content according to the corresponding relation between the pre-stored word and the pre-stored display style, receiving the first display style sent by the server and adjusting the display style of the target search box to the first display style. In this way, when the user performs an input operation in the search box, the terminal can acquire the display style of the search box related to the currently input content in the search box from the server, that is, the display style of the search box can be changed according to different input contents, so that the display flexibility of the search box can be improved.
Still another exemplary embodiment of the present disclosure also shows a structure of a terminal, which may be a computer, a mobile phone, or the like.
Referring to FIG. 9, terminal 1000 can include one or more of the following components: processing component 1002, memory 1004, power component 1006, multimedia component 1008, audio component 1010, input/output (I/O) interface 1012, sensor component 1014, and communications component 1016.
Processing component 1002 generally controls overall operation of terminal 1000, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 1002 may include one or more processors 1020 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 1002 may include one or more modules that facilitate interaction between processing component 1002 and other components. For example, the processing component 1002 can include a multimedia module to facilitate interaction between the multimedia component 1008 and the processing component 1002.
Memory 1004 is configured to store various types of data to support operation at terminal 1000. Examples of such data include instructions for any application or method operating on terminal 1000, contact data, phonebook data, messages, pictures, videos, and the like. The memory 1004 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 1006 provide power to the various components of terminal 1000. The power components 1006 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the audio output device 1000.
The multimedia component 1008 includes a screen that provides an output interface between the terminal 1000 and a user, in some embodiments, the screen can include a liquid crystal display (L CD) and a Touch Panel (TP). if the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from a user.
The audio component 1010 is configured to output and/or input audio signals. For example, the audio component 1010 includes a Microphone (MIC) configured to receive external audio signals when the audio output device 1000 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 1004 or transmitted via the communication component 1016.
I/O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
Sensor assembly 1014 includes one or more sensors for providing various aspects of status assessment for terminal 1000. For example, sensor assembly 1014 can detect an open/closed state of terminal 1000, relative positioning of components such as a display and keypad of terminal 1000, sensor assembly 1014 can also detect a change in position of terminal 1000 or a component of terminal 1000, presence or absence of user contact with terminal 1000, orientation or acceleration/deceleration of terminal 1000, and a change in temperature of terminal 1000. The sensor assembly 1014 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1014 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1014 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
Communications component 1016 is configured to facilitate communications between terminal 1000 and other devices in a wired or wireless manner. Terminal 1000 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1016 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 1016 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, terminal 1000 can be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), programmable logic devices (P L D), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components for performing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as memory 1004, that are executable by processor 1020 of terminal 1000 to perform the above-described method is also provided. For example, the non-transitory 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.
A non-transitory computer-readable storage medium in which instructions, when executed by a processor of a terminal, enable the terminal to perform a method of adjusting a display style of a search box, the method comprising:
when detecting that the input content in the target search box changes, acquiring the current input content in the target search box;
sending the current input content to a server, wherein the current input content is used for determining a first display style corresponding to a target word contained in the current input content according to a corresponding relation between pre-stored words and display styles;
and receiving the first display style sent by the server, and adjusting the display style of the target search box to the first display style.
Optionally, the method further includes:
and when a storage instruction of the first display style is received, storing the first display style.
Optionally, the method further includes:
and when the input content in the target search box is empty, setting the display style of the target search box to be the first display style.
Optionally, when detecting that the input content in the target search box changes, acquiring the current input content in the target search box includes:
when detecting that an input cursor in a target search box moves, acquiring current input content in the target search box; alternatively, the first and second electrodes may be,
when a search confirmation instruction input by a user is detected, acquiring current input content in the target search box; alternatively, the first and second electrodes may be,
and when detecting that the number of the input characters in the target search box changes, acquiring the current input content in the target search box.
In the embodiment of the invention, when the change of the input content in the target search box is detected, the terminal acquires the current input content in the target search box and sends the current input content to the server, wherein the current input content is used for determining a first display style corresponding to a target word contained in the current input content according to the corresponding relation between the pre-stored word and the pre-stored display style, receiving the first display style sent by the server and adjusting the display style of the target search box to the first display style. In this way, when the user performs an input operation in the search box, the terminal can acquire the display style of the search box related to the currently input content in the search box from the server, that is, the display style of the search box can be changed according to different input contents, so that the display flexibility of the search box can be improved.
Still another exemplary embodiment of the present disclosure illustrates a server architecture, referring to fig. 11, a server 1100 includes a processing component 1122 that further includes one or more processors and memory resources, represented by memory 1132, for storing instructions, such as application programs, executable by the processing component 1122. The application programs stored in memory 1132 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1122 is configured to execute instructions to perform the above-described method of adjusting the display style of the search box.
The server 1100 may further include a power supply component 1126 configured to perform power management of the server 1100, a wired or wireless network interface 1150 configured to connect the server 1100 to a network, and an input/output (I/O) interface 1158 the server 1100 may be operatively based on an operating system stored in the memory 1132, such as windows server (tm), Mac OS XTM, UnixTM, &ltttttranslation = L "&gtttl &ltt/t &gtttinx (tm), FreeBSDTM, or the like.
The server 1100 may include memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for:
receiving current input content in a target search box sent by a terminal;
determining a first display style corresponding to a target word contained in the current input content according to a corresponding relation between pre-stored words and display styles;
and sending the first display style to the terminal, wherein the first display style is used for adjusting the display style of the target search box to the first display style.
Optionally, the method further includes:
if the corresponding relation does not have the target word contained in the current input content, acquiring a target picture corresponding to the target word;
generating a second display style according to the target picture and the display style template, and correspondingly storing the target words and the second display style to the corresponding relation;
and sending the second display style to the terminal.
Optionally, the determining, according to a correspondence between words and display styles stored in advance, a first display style corresponding to a target word included in the current input content includes:
acquiring a first target word with highest degree in a plurality of target words contained in the current input content;
and determining a first display style corresponding to the first target word according to the corresponding relation between the pre-stored word and the display style.
Optionally, the determining, according to a correspondence between words and display styles stored in advance, a first display style corresponding to a target word included in the current input content includes:
and if the current input content and the last input content in the target search box contain different target words, determining a first display style corresponding to the target words contained in the current input content according to the corresponding relation between the pre-stored words and the pre-stored display styles.
In the embodiment of the invention, when the change of the input content in the target search box is detected, the terminal acquires the current input content in the target search box and sends the current input content to the server, wherein the current input content is used for determining a first display style corresponding to a target word contained in the current input content according to the corresponding relation between the pre-stored word and the pre-stored display style, receiving the first display style sent by the server and adjusting the display style of the target search box to the first display style. In this way, when the user performs an input operation in the search box, the terminal can acquire the display style of the search box related to the currently input content in the search box from the server, that is, the display style of the search box can be changed according to different input contents, so that the display flexibility of the search box can be improved.
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, where 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 for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (18)

1. A method of adjusting a display style of a search box, the method comprising:
periodically detecting input content in a target search box, and acquiring current input content in the target search box when detecting that the input content in the target search box changes;
sending the current input content to a server, wherein the current input content is used for determining a first display style corresponding to a target word contained in the current input content according to a corresponding relation between pre-stored words and display styles, and the first display style is a display style corresponding to a first target word with the highest heat degree determined by the server from a plurality of target words obtained by the current input content, or a display style corresponding to the plurality of target words together, or a display style corresponding to the target word with the largest number;
and receiving the first display style sent by the server, and adjusting the display style of the target search box to the first display style.
2. The method of claim 1, further comprising:
and when a storage instruction of the first display style is received, storing the first display style.
3. The method of claim 1, further comprising:
and when the input content in the target search box is empty, setting the display style of the target search box to be the first display style.
4. The method of claim 1, wherein obtaining the current input content in the target search box when the input content in the target search box is detected to change comprises:
when detecting that an input cursor in a target search box moves, acquiring current input content in the target search box; alternatively, the first and second electrodes may be,
when a search confirmation instruction input by a user is detected, acquiring current input content in the target search box; alternatively, the first and second electrodes may be,
and when detecting that the number of the input characters in the target search box changes, acquiring the current input content in the target search box.
5. A method of adjusting a display style of a search box, the method comprising:
receiving current input content in a target search box sent by a terminal, wherein the current input content is input content obtained when the terminal detects that the input content in the target search box changes, and the terminal is used for periodically detecting the input content in the target search box;
determining a first display style corresponding to a target word contained in the current input content according to a corresponding relation between pre-stored words and display styles, wherein the first display style is a display style corresponding to a first target word with the highest heat degree determined in a plurality of target words obtained from the current input content, or a display style corresponding to the plurality of target words together, or a display style corresponding to the target word with the largest number;
and sending the first display style to the terminal, wherein the first display style is used for adjusting the display style of the target search box to the first display style.
6. The method of claim 5, further comprising:
if the corresponding relation does not have the target word contained in the current input content, acquiring a target picture corresponding to the target word;
generating a second display style according to the target picture and the display style template, and correspondingly storing the target words and the second display style to the corresponding relation;
and sending the second display style to the terminal.
7. The method according to claim 5, wherein the determining a first display style corresponding to a target word contained in the current input content according to a pre-stored correspondence between words and display styles comprises:
acquiring a first target word with highest degree in a plurality of target words contained in the current input content;
and determining a first display style corresponding to the first target word according to the corresponding relation between the pre-stored word and the display style.
8. The method according to claim 5, wherein the determining a first display style corresponding to a target word contained in the current input content according to a pre-stored correspondence between words and display styles comprises:
and if the current input content and the last input content in the target search box contain different target words, determining a first display style corresponding to the target words contained in the current input content according to the corresponding relation between the pre-stored words and the pre-stored display styles.
9. A terminal, characterized in that the terminal comprises:
the acquisition module is used for periodically detecting input content in a target search box and acquiring current input content in the target search box when detecting that the input content in the target search box changes;
a sending module, configured to send the current input content to a server, where the current input content is used to determine, according to a correspondence between pre-stored words and display styles, a first display style corresponding to a target word included in the current input content, where the first display style is a display style corresponding to a first target word with a highest heat degree determined by the server from multiple target words acquired by the current input content, or a display style corresponding to the multiple target words in common, or a display style corresponding to a target word with a largest number;
and the receiving module is used for receiving the first display style sent by the server and adjusting the display style of the target search box to the first display style.
10. The terminal of claim 9, wherein the terminal further comprises:
and the storage module is used for storing the first display style when receiving a storage instruction of the first display style.
11. The terminal of claim 9, wherein the terminal further comprises:
and the setting module is used for setting the display style of the target search box as the first display style when the input content in the target search box is empty.
12. The terminal of claim 9, wherein the obtaining module is configured to:
when detecting that an input cursor in a target search box moves, acquiring current input content in the target search box; alternatively, the first and second electrodes may be,
when a search confirmation instruction input by a user is detected, acquiring current input content in the target search box; alternatively, the first and second electrodes may be,
and when detecting that the number of the input characters in the target search box changes, acquiring the current input content in the target search box.
13. A server, characterized in that the server comprises:
the terminal comprises a receiving module, a searching module and a processing module, wherein the receiving module is used for receiving current input content in a target searching box sent by the terminal, the current input content is input content obtained when the terminal detects that the input content in the target searching box changes, and the terminal is used for periodically detecting the input content in the target searching box;
the determining module is configured to determine, according to a correspondence between pre-stored words and display styles, a first display style corresponding to a target word included in the current input content, where the first display style is a display style corresponding to a first target word with a highest heat degree determined from a plurality of target words acquired from the current input content, or a display style corresponding to the plurality of target words in common, or a display style corresponding to a target word with a largest number;
and the first sending module is used for sending the first display style to the terminal, and the first display style is used for adjusting the display style of the target search box to the first display style.
14. The server according to claim 13, further comprising:
an obtaining module, configured to obtain a target picture corresponding to a target word if the target word included in the current input content does not exist in the corresponding relationship;
the generating module is used for generating a second display style according to the target picture and the display style template and correspondingly storing the target words and the second display style to the corresponding relation;
and the second sending module is used for sending the second display style to the terminal.
15. The server according to claim 13, wherein the determining module comprises:
the obtaining submodule is used for obtaining a first target word with the highest degree in a plurality of target words contained in the current input content;
and the determining submodule is used for determining a first display style corresponding to the first target word according to the corresponding relation between the pre-stored word and the display style.
16. The server according to claim 13, wherein the determining module is configured to:
and if the current input content and the last input content in the target search box contain different target words, determining a first display style corresponding to the target words contained in the current input content according to the corresponding relation between the pre-stored words and the pre-stored display styles.
17. An apparatus for adjusting a display style of a search box, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
periodically detecting input content in a target search box, and acquiring current input content in the target search box when detecting that the input content in the target search box changes;
sending the current input content to a server, wherein the current input content is used for determining a first display style corresponding to a target word contained in the current input content according to a corresponding relation between pre-stored words and display styles, and the first display style is a display style corresponding to a first target word with the highest heat degree determined by the server from a plurality of target words obtained by the current input content, or a display style corresponding to the plurality of target words together, or a display style corresponding to the target word with the largest number;
and receiving the first display style sent by the server, and adjusting the display style of the target search box to the first display style.
18. An apparatus for adjusting a display style of a search box, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
receiving current input content in a target search box sent by a terminal, wherein the current input content is input content obtained when the terminal detects that the input content in the target search box changes, and the terminal is used for periodically detecting the input content in the target search box;
determining a first display style corresponding to a target word contained in the current input content according to a corresponding relation between pre-stored words and display styles, wherein the first display style is a display style corresponding to a first target word with the highest heat degree determined in a plurality of target words obtained from the current input content, or a display style corresponding to the plurality of target words together, or a display style corresponding to the target word with the largest number;
and sending the first display style to the terminal, wherein the first display style is used for adjusting the display style of the target search box to the first display style.
CN201710001724.1A 2017-01-03 2017-01-03 Method, device and system for adjusting display style of search box Active CN106843860B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710001724.1A CN106843860B (en) 2017-01-03 2017-01-03 Method, device and system for adjusting display style of search box

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710001724.1A CN106843860B (en) 2017-01-03 2017-01-03 Method, device and system for adjusting display style of search box

Publications (2)

Publication Number Publication Date
CN106843860A CN106843860A (en) 2017-06-13
CN106843860B true CN106843860B (en) 2020-07-21

Family

ID=59116972

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710001724.1A Active CN106843860B (en) 2017-01-03 2017-01-03 Method, device and system for adjusting display style of search box

Country Status (1)

Country Link
CN (1) CN106843860B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943554A (en) * 2017-12-12 2018-04-20 福建中金在线信息科技有限公司 Realize the method and device of YouTube dialog box effects

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484360A (en) * 2014-12-02 2015-04-01 百度在线网络技术(北京)有限公司 Acquiring method and device of parameter information

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9449079B2 (en) * 2013-06-28 2016-09-20 Yandex Europe Ag Method of and system for displaying a plurality of user-selectable refinements to a search query
CN104484362B (en) * 2014-12-02 2017-11-17 百度在线网络技术(北京)有限公司 Search result shows method and device
CN104484088B (en) * 2014-12-02 2017-10-27 百度在线网络技术(北京)有限公司 Search result shows method and device
US9881027B2 (en) * 2014-12-31 2018-01-30 Ebay Inc. Image appended search string
CN105138697B (en) * 2015-09-25 2018-11-13 百度在线网络技术(北京)有限公司 A kind of search result shows method, apparatus and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484360A (en) * 2014-12-02 2015-04-01 百度在线网络技术(北京)有限公司 Acquiring method and device of parameter information

Also Published As

Publication number Publication date
CN106843860A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
CN107153541B (en) Browsing interaction processing method and device
EP3561691B1 (en) Method and apparatus for displaying webpage content
EP3171270A1 (en) Method and device for information push
CN106528252B (en) Object starts method and device
CN107562349B (en) Method and device for executing processing
CN106897937B (en) Method and device for displaying social sharing information
CN109600303B (en) Content sharing method and device and storage medium
CN106775202B (en) Information transmission method and device
CN106095465B (en) Method and device for setting identity image
RU2645282C2 (en) Method and device for calling via cloud-cards
CN106896991B (en) Method and device for updating information
CN104462296B (en) File management method and device and terminal
CN109922098B (en) Content sharing method and device for content sharing
US20170316011A1 (en) Method and apparatus for searching resource
CN108629178B (en) Resource access authority configuration method and device of application program
US20210165670A1 (en) Method, apparatus for adding shortcut plug-in, and intelligent device
CN107402767B (en) Method and device for displaying push message
CN111814088A (en) Page processing method and device
CN108280342B (en) Application synchronization method and device for application synchronization
CN104951522B (en) Method and device for searching
CN105095296B (en) File management method and device
CN109842688B (en) Content recommendation method and device, electronic equipment and storage medium
CN106843860B (en) Method, device and system for adjusting display style of search box
WO2017092138A1 (en) User information push method and apparatus
CN108829473B (en) Event response method, device and storage medium

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
GR01 Patent grant
GR01 Patent grant