CN114579842B - Method for providing associated word on search interface and related equipment - Google Patents

Method for providing associated word on search interface and related equipment Download PDF

Info

Publication number
CN114579842B
CN114579842B CN202210138416.4A CN202210138416A CN114579842B CN 114579842 B CN114579842 B CN 114579842B CN 202210138416 A CN202210138416 A CN 202210138416A CN 114579842 B CN114579842 B CN 114579842B
Authority
CN
China
Prior art keywords
search
data
task
time
interface
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
CN202210138416.4A
Other languages
Chinese (zh)
Other versions
CN114579842A (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 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 CN202210138416.4A priority Critical patent/CN114579842B/en
Publication of CN114579842A publication Critical patent/CN114579842A/en
Application granted granted Critical
Publication of CN114579842B publication Critical patent/CN114579842B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/9532Query formulation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present disclosure provides a method and related device for providing associative word in a search interface, wherein the search interface includes a search bar. The method comprises the following steps: responding to the occurrence of a search event of the search interface, and generating a search task executed after a predetermined time delay; generating a search request for executing the search task based on the current data in the search bar and sending the search request to a server when the time period of the preset time length is over; and receiving an associated word generated by the server based on the data currently in the search bar and providing the associated word in the search interface.

Description

Method for providing associated word on search interface and related equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and related device for providing an associated word in a search interface.
Background
In the related art, a user inputs a search word using a search interface of a client, which typically provides a corresponding associated word based on data that the user has currently input in a search bar.
However, the inventor of the present disclosure found that this method requires determining the data change of the search bar at any time and providing new association words according to the data change, which consumes a large amount of system resources.
Disclosure of Invention
The present disclosure proposes a method and related apparatus for providing an associated word in a search interface to reduce system resource consumption due to providing the associated word to some extent.
In a first aspect of the present disclosure, there is provided a method of providing an associative word in a search interface, wherein the search interface includes a search bar, the method comprising:
Responding to the occurrence of a search event of the search interface, and generating a search task executed after a predetermined time delay;
generating a search request for executing the search task based on the current data in the search bar and sending the search request to a server when the time period of the preset time length is over; and
And receiving the association word generated by the server based on the data in the current search column and providing the association word in the search interface.
In a second aspect of the present disclosure, there is provided an apparatus for providing an associative word in a search interface, wherein the search interface includes a search bar, the apparatus comprising:
a search task creation module configured to: responding to the occurrence of a search event of the search interface, and generating a search task executed after a predetermined time delay;
A search request generation and transmission module configured to: generating a search request for executing the search task based on the current data in the search bar and sending the search request to a server when the time period of the preset time length is over; and
An associative word presentation module configured to: and receiving the association word generated by the server based on the data in the current search column and providing the association word in the search interface.
In a third aspect of the present disclosure, there is provided a system for providing an associative word, comprising:
A terminal device configured to: responding to the occurrence of a search event of the search interface, and generating a search task executed after a predetermined time delay; and generating a search request for executing the search task based on the data in the current search bar and transmitting the search request to a server when the time period of the preset time length is over; and
A server configured to: and receiving the search request, generating an association word based on the data in the current search column in the search request, and returning the association word to the terminal equipment so that the terminal equipment provides the association word in the search interface.
In a fourth aspect of the present disclosure, there is provided a terminal device including one or more processors, a memory; and one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, the programs comprising instructions for performing the method of the first aspect.
In a fifth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium containing a computer program which, when executed by one or more processors, causes the processors to perform the method of the first aspect.
In a sixth aspect of the present disclosure, there is provided a computer program product comprising computer program instructions which, when run on a computer, cause the computer to perform the method of the first aspect.
According to the method and the related equipment for providing the association words on the search interface, provided by the invention, the association words are provided relatively infrequently by delaying the sending of the search request, so that the consumption of system resources is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the present disclosure or related art, the drawings required for the embodiments or related art description will be briefly described below, and it is apparent that the drawings in the following description are only embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to those of ordinary skill in the art.
Fig. 1 shows a schematic diagram of an exemplary system provided by an embodiment of the present disclosure.
FIG. 2A shows a schematic diagram of an exemplary interface.
Fig. 2B shows a schematic diagram of another exemplary interface.
Fig. 2C shows a schematic diagram of yet another exemplary interface.
Fig. 3 shows a flow diagram of an exemplary method provided by an embodiment of the present disclosure.
Fig. 4A shows a schematic diagram of an exemplary interface according to an embodiment of the present disclosure.
Fig. 4B shows a schematic diagram of another exemplary interface according to an embodiment of the present disclosure.
Fig. 4C shows a schematic diagram of one exemplary statistic according to an embodiment of the disclosure.
Fig. 4D shows a schematic diagram of yet another exemplary interface according to an embodiment of the present disclosure.
Fig. 4E shows a schematic diagram of two search scheme comparisons according to an embodiment of the present disclosure.
Fig. 4F shows a schematic diagram of another search scheme according to an embodiment of the present disclosure.
Fig. 4G shows a schematic diagram of yet another search scheme according to an embodiment of the present disclosure.
FIG. 4H shows a comparative schematic diagram of a user employing the search scheme of FIG. 4G for two input strategies.
Fig. 5 shows a schematic hardware structure of an exemplary terminal device provided by an embodiment of the disclosure.
Fig. 6 shows a schematic diagram of an exemplary apparatus provided by an embodiment of the present disclosure.
Detailed Description
For the purposes of promoting an understanding of the principles and advantages of the disclosure, reference will now be made to the embodiments illustrated in the drawings and specific language will be used to describe the same.
It should be noted that unless otherwise defined, technical or scientific terms used in the embodiments of the present disclosure should be given the ordinary meaning as understood by one of ordinary skill in the art to which the present disclosure pertains. The terms "first," "second," and the like, as used in embodiments of the present disclosure, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also be changed when the absolute position of the object to be described is changed.
Fig. 1 shows a schematic diagram of an exemplary system 100 provided by an embodiment of the present disclosure.
As shown in fig. 1, the system 100 may include a server 102 and terminal devices 104, 106. It will be appreciated that the number of terminal devices in the system 100 may be arbitrary, and that fig. 1 shows only two types of terminal devices by way of example. The terminal device 104 may be a mobile device, such as a cell phone, tablet computer, or the like. The terminal device 106 may be a stationary device, such as a personal computer. The server 102 may be a single server or a cluster of servers. When the server 102 is a cluster of servers, a distributed architecture may be employed. Communication between the terminal devices 104 and 106 and the server 102 may be through a wired network or a wireless network.
In some embodiments, both terminal devices 104 and 106 may provide services to users through clients installed therein. Where the terminal device 104 is a mobile terminal, the service may be provided by a program client (application program); when the terminal device 106 is a fixed terminal, the service may be provided by a Web client.
Among the services provided based on the client, there may be generally a search service. In using the search service, a user may create a search task by entering search terms in a search field of a search interface. In some search services, as a search term is entered in the search bar, the terminal devices 104 and 106 will send the retrieved search term to the server 200 to provide an associated term for the search term by the server 200.
Fig. 2A-2C each illustrate a schematic diagram of an exemplary search interface 200.
As shown in fig. 2A, for example, when a user 108 opens an application using a terminal device 104 to use the search service that he provides, the terminal device 104 may provide a search interface 200 on the screen of the terminal device 104. As shown in FIG. 2A, a search bar 202 may be provided on the search interface 200 for the user 108 to input search terms. After user 108 has entered his target search term (e.g., why I have a throat pain), search button 204 on interface 200 may be clicked to send a search request to server 200 based on the target search term.
In some scenarios, in order to improve the search efficiency of the user, in the process of inputting the search term by the user 108, although the user 108 has not clicked the search button 204 yet, the terminal device 104 may generate a search task based on the search term already input by the user 108, then generate an associated term search request based on the search task and send the associated term search request to the server 200, and the server 200 may respond to the associated term search request and push the corresponding associated term to the terminal device 104.
As shown in fig. 2B, after user 108 enters "me" in search field 202, terminal device 104 may send an associated word search request to server 200 with "me" as a search term, and server 200 may determine associated words that are suggested based on "me" (which may be words or sentences that user 108 wants to search for) and then send to terminal device 104. As shown in FIG. 2B, these associative words may be displayed in a drop down list 206 below the search field 202 of the search interface 200. Thus, if the target search word of the user 108 exists in the association words, the user 108 can directly select the corresponding association word as the target search word to search without continuously inputting the search word, so that the time for inputting the search word is saved for the user.
If there is no target search term for user 108 among the suggested words based on "I" further, user 108 may continue to enter "Yes" in search field 202. Then, the terminal device 104 may send an associated word search request to the server 200 with "i am as a search word, and the server 200 may determine an associated word that is associated based on" i am "and then send it to the terminal device 104. As shown in FIG. 2C, these associated words may replace the associated words in the interface of FIG. 2B and be displayed in a drop down list 206 below the search field 202 of the search interface 200.
Similarly, when the user 108 enters words by words, for example, "i" are "" "assorted" "" how "" "throat" "" sub "", the following problems may exist if the search task is performed once every word is entered:
first, server overhead is large. Because the search task is performed once every word is input, an increase in query-per-second (QPS) rate results, resulting in an increase in the amount of computation and a greater stress on the server. In some cases, server pressure may be greater if there is black production to script.
Secondly, since a search task is executed every time a word is input, the number of searches is large, and the flow consumption increases.
Third, the client performance is poor. Because the search task is performed once every word is entered, the client needs to frequently send network requests, parse the results returned by the server, and refresh the drop-down list.
In view of this, the embodiments of the present disclosure provide a method for providing an associated word in a search interface, which delays sending a search request for providing the associated word, so that the associated word is provided relatively infrequently, thereby reducing consumption of system resources.
Fig. 3 shows a flow diagram of an exemplary method 300 provided by an embodiment of the present disclosure. The method 300 may be implemented by the terminal device 104 or 106 of the system 100. The following description will take the terminal device 104 as an example. As shown in fig. 3, the method 300 may further include the following steps.
In an initial state, the user 108 may open an application on the terminal device 104, and then the terminal device 104 may provide the service corresponding to the application to the user 108. The user 108 can use the corresponding service in the application program by a click operation or the like. When the user 108 uses each service in the application program, the user may trigger the terminal device 104 to generate corresponding tasks through an operation instruction sent by a click operation or the like, and put the tasks into a Message Queue (Message Queue), and process the tasks according to a processing rule of the Message Queue.
In step S302, in response to occurrence of a search event for the search interface, the terminal device 104 may generate a search task that is executed after a delay of a predetermined time period t 0, which may be a search task for requesting the server 200 to generate an associative word.
In some embodiments, the search event may be that the terminal device 104 entered a search interface (e.g., entered the search interface 200 shown in fig. 2A). Thus, when the terminal device 104 has just entered the search interface, the terminal device 104 automatically generates a search task that is not executed until a delay t 0.
In other embodiments, the search event may also be that the terminal device 104 is in a search interface and generates new data in a search bar in a blank state. Fig. 4A shows a schematic diagram of an exemplary search interface 400, according to an embodiment of the present disclosure. As shown in fig. 4A, for example, when user 108 enters search interface 400 and enters a word (e.g., "me") in search field 402, terminal device 104 considers that a search event is currently occurring and automatically generates a search task that is not performed until delay t 0.
In still other embodiments, the search event may also be that a previous search task of the terminal device 104 has been performed and new data continues to be generated within the search field. For example, after user 108 has entered "why me" and performed a search task that was generated by entering a search interface or entering "me" in the blank status search field, user 108 continues to enter "throat", terminal device 104 considers that a new search event is currently occurring and then automatically generates a search task that was not performed until delay t 0 again.
In some embodiments, after the search task is created based on the search event, even if the user 108 continues to enter search terms in the search field of the search interface for a predetermined period of time t 0, the terminal device 104 may no longer create a new search task for requesting the server 200 to generate associated terms until the search task is completed. Fig. 4B shows a schematic diagram of another exemplary search interface 400 according to an embodiment of the present disclosure. As shown in fig. 4B, when user 108 continues to enter subsequent search terms in the search bar (e.g., continues to enter "yes"), terminal device 104 may no longer create a new search task for requesting server 200 to generate the association term.
In some embodiments, the search task may be creating a delayed time stamped search task in a message queue of the terminal device 104. The delay time stamp is used for delaying the time sequence position of the search task in the message queue according to the preset time length t 0, and when the terminal device 104 executes the task according to the message queue, the search task which needs to be processed in time is executed after being delayed by t 0.
Since the predetermined time period t 0 determines when the search task for generating the associative word starts to be performed, it may be determined in some suitable manner. In some embodiments, for example, the predetermined length of time may be determined based on several historical search data.
In some embodiments, determining the predetermined length of time based on the number of historical search data may further comprise: a predetermined number (determined based on actual demand, without limitation) of pieces of historical search data for the user under the search interface 400 are obtained, and then a number of user input durations are determined based on the pieces of historical search data. The historical search data may include, among other things, overall process data of the user when performing a search operation, such as, for example, when the user entered the search interface 400, when entered the first word in the search field 402, when clicked on the search button 404, and so forth. Where the point in time when the user entered the search interface 400 may be set to a first time, when the user entered a first word in the search bar 402 may be set to a second time, and when the user clicked the search button 404 may be set to a third time. Here, the first time and the second time may both be used as a start time of the user input duration (selected according to an actual service requirement, without limitation, herein), and the third time may be used as an end time of the user input duration, and based on the start time and the end time, a corresponding user input duration may be determined, where the duration objectively reflects a duration consumed by the user to input the search term (abbreviated as an input duration). Finally, the statistics process is performed on all the user input durations, and the predetermined duration t 0 can be determined according to the statistics result.
In some embodiments, the user input duration with the largest value of the cumulative count may be taken as the predetermined duration t 0 by performing the cumulative count on the same user input duration of all the user input durations. Fig. 4C shows a schematic diagram of one exemplary statistic according to an embodiment of the disclosure. As shown in fig. 4C, the user input duration with the largest number of occurrences may be determined as the predetermined duration t 0.
In other embodiments, the predetermined time period t 0 may vary depending on the type of search service to which the current search interface 400 corresponds. For example, a plurality of sets of predetermined time periods t 01~t0n may be stored in the terminal device 104. The terminal device 104 may then determine the type of search service corresponding to the current search interface, then determine the expected data input in the search field 402 based on the type of search service, and then determine a predetermined time period t 0 corresponding to the expected data input from the plurality of sets of predetermined time periods t 01~t0n. For example, a smaller amount of data input is expected, and the corresponding predetermined time period t 0 is shorter. Since the number of words that the user himself needs to input is small in a scene where the expected data input amount is small, if the predetermined time period t 0 is set too long, the search task of the associated word is performed after the user has input his target search word, which loses the effect of the associated word. In some cases, for a scenario where the expected data input amount is particularly small, the predetermined time period t 0 may also be set to 0, that is, the search task is not delayed, because the disadvantage of instant association is not obvious in this case, the number of searches is small because fewer characters need to be input, and the server and client performance consumption is low.
In some embodiments, the expected data input amount corresponding to the search service type may be preset or empirically determined. For example, the music name, the person name are generally short, and thus, in a scene of searching for a service type of music and a scene of searching for a service type of a person name, the expected data input amount thereof is short, and accordingly, the predetermined time period t 0 can be set short. While most novels are generally longer, in the context of searching for a type of novice service, their expected data input is longer and accordingly, the predetermined time period t 0 may be set longer.
At the end of the period of time of the predetermined length of time t 0 (i.e., the predetermined length of time t 0 has elapsed since the occurrence of the search event), the terminal device 104 may generate a search request for performing the search task based on the data in the current search field 402 and send it to the server 200 at step S304. Fig. 4D shows a schematic diagram of yet another exemplary search interface 400 according to an embodiment of the present disclosure. As shown in fig. 4D, the data in the current search bar 402 is "why me", and the terminal device 104 may generate the search request based on the data so that the data is carried in the search request. In some embodiments, this step S304 may further include: if the latest character in the data in the current search bar does not execute the search task, the terminal device 104 generates a search request for executing the search task based on the data in the current search bar and sends the search request to the server, so that resource consumption caused by that the user does not input a new character and executes the search task is avoided.
Upon receiving the search request, the server 200 parses the search request to obtain the data in the current search bar 402 and generates corresponding associative words based on the data. It will be appreciated that the process of generating the associative word may employ some known techniques and is not specifically limited herein.
The server 200 may then return the association to the terminal device 104.
In step S306, the terminal device 104 may receive the association word generated by the server 200 based on the data in the current search field 402 and provide the association word in the search interface 400. As shown in fig. 4D, the terminal device 104 may present the association in a drop down list of the search interface 400, which is generated based on the data in the search bar 402 at the time the search request was sent.
Fig. 4E shows a schematic diagram of a comparison of two search schemes. In fig. 4E, a search scheme corresponding to the embodiment of fig. 2A to 2C is referred to by scheme one, and a search scheme embodiment corresponding to a fixed predetermined time period t 0 is referred to by scheme one.
As shown in fig. 4E, assume that the predetermined time period t 0 is 300ms. In one approach, the user performs a search task once every time the user enters an alphanumeric terminal device 104 in the search field. In the second scheme, the terminal device 104 does not immediately execute the search task each time there is a data change in the search field, but can send a message with a delay of 300ms to the message queue when the search event is just started to trigger (the trigger event is that the user inputs "a" in the search field in fig. 4E), and execute the search task by using the latest search word in the search field when the message delay is finished, so that the number of searching times is greatly reduced without affecting the normal search function.
As can be seen from fig. 4E, if the user inputs again (e.g., continues to input "E") after the search task has been performed (e.g., the search task based on "abcd" has been performed in fig. 4E), the waiting time may be longer (up to 300 ms), especially when the user has originally input only one word as the target character, the waiting time of the user may be more significant.
Fig. 4F shows a schematic diagram of another search scheme. In fig. 4F, an embodiment of a search scheme corresponding to the predetermined time period t 0 determined according to the user's history search data is referred to as scheme three.
As shown in fig. 4F, a message is sent to the message queue with a delay t 0 at the beginning of the user's entry into the search interface, and at the end of the message delay, the search task is performed using the latest search term in the search bar. Since the predetermined time period t 0 is determined by counting historical search data of the user, the search task executed after delaying the predetermined time period t 0 can hit the final search word of the user for most users, thereby ensuring the search experience of the user.
In some scenarios, the terminal device 104 may not be limited to performing a search task only once, and the user 108 may continue to enter data in the search field 402, and thus, in some embodiments, the predetermined length of time t 0 for a new search task created after performing a search task may also be adjusted.
For example, after performing step S306, the terminal device 104 may determine that the data of the search bar is changed, and if the data of the search bar 402 continues to be increased, the terminal device 104 may increase the predetermined time period t 0 by the first time period t 1 and generate a new search task to be performed with delay based on the increased predetermined time period t 0'.
Fig. 4G shows a schematic diagram of yet another search scheme. As shown in fig. 4G, taking an initial predetermined time period t 0 as an example of 50ms, after 50ms has elapsed after the search task is created, the user has input "ab" in the search field 402, at this time, the search task is executed, and the search request sent by the terminal device 104 carries "ab" as a search word. The terminal device 104 may then continue to determine the change in the data in the search field 402, and when it is found that the data in the search field 402 is still increasing, for example, the user inputs "c" after "ab", the terminal device 104 generates a new search task to be performed with a delay that is based on the increased predetermined time period t 0' after the predetermined time period t 0 is increased by the first time period t 1, for example, 50 ms+20ms=70 ms. Thus, the new search task of the terminal device 104 may be delayed by 70ms to perform the search task. In some embodiments, after the terminal device 104 again performs completing the new search task, if the user is still continuing to enter, the predetermined period of time t 0' continues to increase. The increased predetermined time length is the predetermined time length corresponding to the search task executed in the previous time plus the first time length. For example, when the search task is set for the third time, the increased predetermined time period t 0 "is the previous predetermined time period t 0' plus the first time period t 1, for example, 50ms+20ms+20ms=90 ms.
It can be seen that with the search scheme of the foregoing embodiment, the predetermined time period will be longer and longer in the case of continuous input by the user, and in order to avoid excessively long delay time periods, in some embodiments, when the predetermined time period is increased more than once, the first time period added each time is decremented in time sequence. For example, with the foregoing example, when the predetermined time period for the first time is 50ms, the predetermined time period for the second time is 70ms, and the predetermined time period for the third time may be increased by half of 20ms, i.e., 10ms instead of 20ms, so that the delay of the third search task is 50ms+20ms+10ms=80 ms. By analogy, the delay of the fourth search task may be 85ms.
FIG. 4H shows a comparative schematic diagram of a user employing the search scheme of FIG. 4G for two input strategies. For convenience of explanation, the first delay of 50ms and the subsequent 20ms increase are taken as examples.
As shown in fig. 4H, if the user a inputs only 1 character, a response can be obtained promptly after 50 ms. Considering that the latency perceived by the user also includes network time and rendering time, 50ms does not become a bottleneck for latency, so that the search scheme reaches an experience close to the existing scheme in a scenario with few characters.
If the user B inputs 5 characters, since the delay time is dynamically increased, the search times are smaller as the number of characters input by the user is larger, so that the performance optimization effect of the search scheme is also better.
In some embodiments, the aforementioned policy of dynamically adjusting the predetermined length of time may also be designed according to the user's input habits.
For example, the terminal device 104 may continuously determine a change in data of the search bar 402 and then determine an input speed (e.g., number of words input per second) of the user based on the change in data. If the input speed of the user exceeds the speed threshold or is higher than a first speed threshold (determined according to the actual requirement, without limitation here), which indicates that the input speed of the user is relatively high, in order to ensure the system performance, after executing step S306, if a new search event occurs on the search interface 400 (for example, the user is still inputting continuously), the terminal device 104 may increase the predetermined time period t 0 by the second time period t 2 and generate a new search task to be executed in a delayed manner based on the increased predetermined time period t 0'. Thus, when the user input speed is high, in order to reduce frequent interaction of the terminal device 104 with the server 200, the delay of the user may be increased to ensure system performance.
If the user's input speed does not exceed the speed threshold or is below a second speed threshold (which may be less than the first speed threshold), it is indicated that the user's input speed is relatively slow and the system performance is not significantly affected even if the delay is shortened. Thus, after performing step S306, if a new search event occurs for the search interface (e.g., the user is still continuing to input), the terminal device 104 may decrease the predetermined time period t 0 by the third time period t 3 and generate a new search task to be delayed for execution based on the increased predetermined time period t 0'. Thus, when the user input speed is slow, even if the delay of the user is shortened, the system performance can be ensured.
It follows that the predetermined length of time increases when the user input speed is high and decreases when the user input speed is low because the performance overhead of frequent searching is greater when the user input speed is high and the performance pressure is smaller when the user input time is low. As the predetermined time period becomes smaller and smaller, the effect shown in fig. 2A to 2C, that is, searching once every one character is input, can be achieved even.
In addition to dynamically adjusting the predetermined time period t 0 based on the user input time period, the predetermined time period t 0 may also be dynamically adjusted based on other input habits of the user.
For example, the predetermined length of time increases as the user inputs more characters (e.g., by counting historical search data of the user to determine if the user's search habits tend to input more characters), and decreases as the user tends to input fewer characters. Since the meaning of the intermediate character is smaller as the user inputs more characters, the user mainly expects the search result after the last character is input, more filtering of the intermediate character is needed, that is, the predetermined time length is increased, and when the user inputs fewer characters, the delay search at this time significantly increases the waiting time of the user, because the user waits in the delay process rather than inputting, and therefore the predetermined time length needs to be reduced.
It can be seen that the foregoing embodiments perform search filtering operations on fast-entry users and multi-character input users, preserving the existing experience of slow-entry users and few-character input users. In some scenarios, the former also filters the black gray producing user, which is strongly hit.
According to the method 300 for providing the association words on the search interface, provided by the embodiment of the disclosure, through delaying the search task, the pressure of the server side is reduced, the cost of the server is reduced, meanwhile, the flow consumption of a user is reduced, and the performance of the client side is improved. In addition, the client script type black product can be hit to a certain extent.
It should be noted that the method of the embodiments of the present disclosure may be performed by a single device, such as a computer or a server. The method of the embodiment can also be applied to a distributed scene, and is completed by mutually matching a plurality of devices. In the case of such a distributed scenario, one of the devices may perform only one or more steps of the methods of embodiments of the present disclosure, the devices interacting with each other to accomplish the methods.
It should be noted that the foregoing describes some embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments described above and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Fig. 5 shows a hardware architecture diagram of an exemplary electronic device 500 provided by an embodiment of the present disclosure. The electronic device 500 may be used to implement the terminal devices 104 and 106 of fig. 1, as well as the server 200 of fig. 1.
As shown in fig. 5, the electronic device 500 may include: processor 502, memory 504, network interface 506, peripheral interface 508, and bus 510. Wherein the processor 502, the memory 504, the network interface 506 and the peripheral interface 508 enable a communication connection between each other within the electronic device 500 via the bus 510.
The processor 502 may be a central processing unit (Central Processing Unit, CPU), an image processor, a neural Network Processor (NPU), a Microcontroller (MCU), a programmable logic device, a Digital Signal Processor (DSP), an Application SPECIFIC INTEGRATED Circuit (ASIC), or one or more integrated circuits. The processor 502 may be used to perform functions related to the techniques described in this disclosure. In some embodiments, processor 502 may also include multiple processors integrated as a single logical component. For example, as shown in fig. 5, the processor 502 may include a plurality of processors 502a, 502b, and 502c.
Memory 504 may be configured to store data (e.g., instructions, computer code, etc.). As shown in fig. 5, the data stored by the memory 504 may include program instructions (e.g., program instructions for implementing the method 300 of embodiments of the present disclosure) as well as data to be processed (e.g., the memory may store configuration files of other modules, etc.). The processor 502 may also access program instructions and data stored in the memory 504 and execute the program instructions to perform operations on the data to be processed. Memory 504 may include volatile storage or nonvolatile storage. In some embodiments, memory 504 may include Random Access Memory (RAM), read Only Memory (ROM), optical disks, magnetic disks, hard disks, solid State Disks (SSD), flash memory, memory sticks, and the like.
The network interface 506 may be configured to provide communications with other external devices to the electronic device 500 via a network. The network may be any wired or wireless network capable of transmitting and receiving data. For example, the network may be a wired network, a local wireless network (e.g., bluetooth, wiFi, near Field Communication (NFC), etc.), a cellular network, the internet, or a combination of the foregoing. It will be appreciated that the type of network is not limited to the specific examples described above. The network interface 506 may include any combination of any number of Network Interface Controllers (NICs), radio frequency modules, transceivers, cellular network chips, and the like.
Peripheral interface 508 may be configured to connect electronic device 500 with one or more peripheral devices to enable information input and output. For example, the peripheral devices may include input devices such as keyboards, mice, touchpads, touch screens, microphones, various types of sensors, and output devices such as displays, speakers, vibrators, and indicators.
Bus 510 may be configured to transfer information between the various components of electronic device 500 (e.g., processor 502, memory 504, network interface 506, and peripheral interface 508), such as an internal bus (e.g., processor-memory bus), an external bus (USB port, PCI-E bus), etc.
It should be noted that, although the architecture of the electronic device 500 described above only shows the processor 502, the memory 504, the network interface 506, the peripheral interface 508, and the bus 510, in a specific implementation, the architecture of the electronic device 500 may also include other components necessary to achieve normal operation. Moreover, those skilled in the art will appreciate that the architecture of the electronic device 500 described above may include only the components necessary to implement the embodiments of the present disclosure, and not all of the components shown in the figures.
Based on the same inventive concept, the present disclosure also provides a device for providing an association word at a search interface, corresponding to the method of any embodiment described above. Fig. 6 shows a schematic diagram of an exemplary apparatus 600 provided by an embodiment of the present disclosure. As shown in fig. 6, the apparatus 600 may include the following modules.
The search task creation module 602 is configured to: in response to a search event occurring with respect to the search interface, a search task is generated that is executed after a delay of a predetermined length of time.
The search request generation and transmission module 604 is configured to: at the end of the predetermined period of time, a search request for performing the search task is generated based on the data in the current search bar and sent to a server.
The associative word presentation module 606 is configured to: and receiving the association word generated by the server based on the data in the current search column and providing the association word in the search interface.
In some embodiments, the search event comprises: and entering the search interface, and generating new data in the search bar in a blank state, or performing the previous search task and continuously generating new data in the search bar.
In some embodiments, the search task creation module 602 is configured to: creating a search task with a delay time stamp in a message queue; the delay time stamp is used for delaying the time sequence position of the search task in the message queue according to the preset time length.
In some embodiments, the search task creation module 602 is configured to: during the predetermined period of time, no new search tasks are created.
In some embodiments, the predetermined length of time is determined based on a number of historical search data.
In some embodiments, the search task creation module 602 is configured to: acquiring a plurality of pieces of historical search data of a preset number of users under the search interface; determining a plurality of user input time lengths according to the plurality of pieces of historical search data; and carrying out statistical processing on all the user input time lengths, and determining the preset time length according to a statistical result.
In some embodiments, the search task creation module 602 is configured to: and carrying out accumulated count on the same user input time duration in all the user input time durations, and taking the user input time duration with the largest accumulated count value as the preset time duration.
In some embodiments, the search task creation module 602 is configured to: determining a change in data of the search bar; and generating a search task to be delayed to be executed based on the increased predetermined time length after the predetermined time length is increased by a first time length in response to the data of the search bar continuing to be increased.
In some embodiments, the increased predetermined time period is a predetermined time period corresponding to a previously executed search task plus the first time period.
In some embodiments, when the predetermined length of time is increased more than once, the first length of time for each increase is decremented in time sequence.
In some embodiments, the search task creation module 602 is configured to: determining a change in data of the search bar; determining an input speed according to the data change of the search bar; in response to determining that the input speed is higher than a first speed threshold, after receiving an associated word generated by the server based on the data currently in the search field and providing the associated word in the search interface, if a new search event occurs for the search interface, increasing the predetermined time period by a second time period and then generating a search task to be delayed for execution based on the increased predetermined time period; or in response to determining that the input speed is lower than a second speed threshold, after receiving the association word generated by the server based on the data in the current search bar and providing the association word in the search interface, if a new search event occurs for the search interface, generating a search task which is delayed to execute based on the increased predetermined time after reducing the predetermined time by a third time.
In some embodiments, the search task creation module 602 is configured to: determining a search service type corresponding to the search interface, and determining the expected data input amount in a search bar according to the search service type; and determining a predetermined length of time that is compatible with the expected data input amount.
In some embodiments, the search request generation and transmission module 604 is configured to: and generating a search request for executing the search task based on the data in the current search column and sending the search request to a server in response to the fact that the latest character in the data in the current search column does not execute the search task.
For convenience of description, the above devices are described as being functionally divided into various modules, respectively. Of course, the functions of the various modules may be implemented in the same one or more pieces of software and/or hardware when implementing the present disclosure.
The apparatus of the foregoing embodiments is configured to implement the corresponding method 300 in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described herein.
Based on the same inventive concept, corresponding to any of the above-described embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method 300 as described in any of the above-described embodiments.
The computer readable media of the present embodiments, including both permanent and non-permanent, removable and non-removable media, may be used to implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer 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 tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device.
The storage medium of the foregoing embodiments stores computer instructions for causing the computer to perform the method 300 as described in any of the foregoing embodiments, and has the advantages of the corresponding method embodiments, which are not described herein.
Based on the same inventive concept, the present disclosure also provides a computer program product, corresponding to any of the embodiment methods 300 described above, comprising a computer program. In some embodiments, the computer program is executable by one or more processors to cause the processors to perform the described method 300. Corresponding to the execution bodies corresponding to the steps in the embodiments of the method 300, the processor executing the corresponding step may belong to the corresponding execution body.
The computer program product of the above embodiment is configured to cause a processor to perform the method 300 of any of the above embodiments, and has the advantages of the corresponding method embodiments, which are not described herein.
Those of ordinary skill in the art will appreciate that: the discussion of any of the embodiments above is merely exemplary and is not intended to suggest that the scope of the disclosure, including the claims, is limited to these examples; the technical features of the above embodiments or in the different embodiments may also be combined under the idea of the present disclosure, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in details for the sake of brevity.
Additionally, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures, in order to simplify the illustration and discussion, and so as not to obscure the embodiments of the present disclosure. Furthermore, the devices may be shown in block diagram form in order to avoid obscuring the embodiments of the present disclosure, and this also accounts for the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform on which the embodiments of the present disclosure are to be implemented (i.e., such specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the disclosure, it should be apparent to one skilled in the art that embodiments of the disclosure can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative in nature and not as restrictive.
While the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of those embodiments will be apparent to those skilled in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
The disclosed embodiments are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Accordingly, any omissions, modifications, equivalents, improvements, and the like, which are within the spirit and principles of the embodiments of the disclosure, are intended to be included within the scope of the disclosure.

Claims (16)

1. A method of providing associative words at a search interface, wherein the search interface includes a search bar, the method comprising:
Responding to the occurrence of a search event of the search interface, and generating a search task executed after a predetermined time delay; the predetermined length of time is determined based on historical search data or search service types;
generating a search request for executing the search task based on the current data in the search bar and sending the search request to a server when the time period of the preset time length is over; and
And receiving the association word generated by the server based on the data in the current search column and providing the association word in the search interface.
2. The method of claim 1, wherein the search event comprises: and entering the search interface, and generating new data in the search bar in a blank state, or performing the previous search task and continuously generating new data in the search bar.
3. The method of claim 1, wherein generating the search task that is performed after a delay of a predetermined length of time comprises:
creating a search task with a delay time stamp in a message queue; the delay time stamp is used for delaying the time sequence position of the search task in the message queue according to the preset time length.
4. The method of claim 1, further comprising:
During the predetermined period of time, no new search tasks are created.
5. The method of claim 1, further comprising determining the predetermined length of time by:
acquiring a plurality of pieces of historical search data of a preset number of users under the search interface;
determining a plurality of user input time lengths according to the plurality of pieces of historical search data; and
And carrying out statistical processing on all the user input time lengths, and determining the preset time length according to a statistical result.
6. The method of claim 1, wherein after receiving the associativity word generated by the server based on the data currently within the search bar and providing the associativity word in the search interface, further comprising:
determining a change in data of the search bar; and
And generating a search task which is delayed to execute based on the increased preset time after the preset time is increased by a first time in response to the continuous increase of the data of the search bar.
7. The method of claim 6, wherein the increased predetermined length of time is a predetermined length of time corresponding to a previously executed search task plus the first length of time.
8. The method of claim 7, wherein the first time length of each increment is time-sequentially decremented when the predetermined time length is incremented more than once.
9. The method of claim 1, further comprising:
Determining a change in data of the search bar;
determining an input speed according to the data change of the search bar;
in response to determining that the input speed is higher than a first speed threshold, after receiving an associated word generated by the server based on the data currently in the search field and providing the associated word in the search interface, if a new search event occurs for the search interface, increasing the predetermined time period by a second time period and then generating a search task to be delayed for execution based on the increased predetermined time period; or alternatively
In response to determining that the input speed is below a second speed threshold, after receiving an associated word generated by the server based on the data currently in the search field and providing the associated word in the search interface, if a new search event occurs for the search interface, reducing the predetermined duration by a third duration and then generating a search task to be delayed for execution based on the increased predetermined duration.
10. The method of claim 1, wherein prior to generating the search task that is performed after a delay of a predetermined length of time, further comprising:
determining a search service type corresponding to the search interface, and determining the expected data input amount in a search bar according to the search service type; and
A predetermined time period is determined that is compatible with the expected data input amount.
11. The method of claim 1, wherein generating and sending a search request to a server for performing the search task based on data currently within the search bar comprises:
And generating a search request for executing the search task based on the data in the current search column and sending the search request to a server in response to the fact that the latest character in the data in the current search column does not execute the search task.
12. An apparatus for providing associative words in a search interface, wherein the search interface includes a search bar, the apparatus comprising:
a search task creation module configured to: responding to the occurrence of a search event of the search interface, and generating a search task executed after a predetermined time delay; the predetermined length of time is determined based on historical search data or search service types;
A search request generation and transmission module configured to: generating a search request for executing the search task based on the current data in the search bar and sending the search request to a server when the time period of the preset time length is over; and
An associative word presentation module configured to: and receiving the association word generated by the server based on the data in the current search column and providing the association word in the search interface.
13. A system for providing associative words, comprising:
A terminal device configured to: generating a search task to be executed after a delay of a predetermined time period, which is determined based on historical search data or search service types, in response to occurrence of a search event for a search interface; and generating a search request for executing the search task based on the data in the current search bar and transmitting the search request to a server when the time period of the preset time length is over; and
A server configured to: and receiving the search request, generating an association word based on the data in the current search column in the search request, and returning the association word to the terminal equipment so that the terminal equipment provides the association word in the search interface.
14. A terminal device comprising one or more processors, memory; and one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, the programs comprising instructions for performing the method of any of claims 1-11.
15. A non-transitory computer readable storage medium containing a computer program which, when executed by one or more processors, causes the processors to perform the method of any of claims 1 to 11.
16. A computer program product comprising computer program instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 11.
CN202210138416.4A 2022-02-15 2022-02-15 Method for providing associated word on search interface and related equipment Active CN114579842B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210138416.4A CN114579842B (en) 2022-02-15 2022-02-15 Method for providing associated word on search interface and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210138416.4A CN114579842B (en) 2022-02-15 2022-02-15 Method for providing associated word on search interface and related equipment

Publications (2)

Publication Number Publication Date
CN114579842A CN114579842A (en) 2022-06-03
CN114579842B true CN114579842B (en) 2024-07-02

Family

ID=81775281

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210138416.4A Active CN114579842B (en) 2022-02-15 2022-02-15 Method for providing associated word on search interface and related equipment

Country Status (1)

Country Link
CN (1) CN114579842B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965842A (en) * 2014-11-27 2015-10-07 深圳市腾讯计算机系统有限公司 Search recommending method and apparatus
CN110770716A (en) * 2017-08-31 2020-02-07 深圳市欢太科技有限公司 Association word recommendation method, mobile terminal and computer-readable storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100917458B1 (en) * 2007-03-21 2009-09-14 주식회사 케이티 Method and system of providing recommended words
KR20100129431A (en) * 2009-06-01 2010-12-09 이디엠소프트 (주) A search system using a search bar and the method thereof
KR101545653B1 (en) * 2014-03-21 2015-08-19 네이버 주식회사 Apparatus and method for providing searching service
US20160063012A1 (en) * 2014-08-29 2016-03-03 Neelakantan Sundaresan Multi-user search or recommendation
US20170024657A1 (en) * 2015-07-21 2017-01-26 Yp Llc Fuzzy autosuggestion for query processing services
CN108227954A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 A kind of method, apparatus and electronic equipment that search input associational word is provided
CN109558538B (en) * 2018-11-23 2022-02-01 北京字节跳动网络技术有限公司 Input association word construction method and device, storage medium and electronic equipment
CN113779365B (en) * 2021-08-31 2024-06-21 北京达佳互联信息技术有限公司 Search word display method, apparatus, storage medium and computer program product

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965842A (en) * 2014-11-27 2015-10-07 深圳市腾讯计算机系统有限公司 Search recommending method and apparatus
CN110770716A (en) * 2017-08-31 2020-02-07 深圳市欢太科技有限公司 Association word recommendation method, mobile terminal and computer-readable storage medium

Also Published As

Publication number Publication date
CN114579842A (en) 2022-06-03

Similar Documents

Publication Publication Date Title
EP3742306A1 (en) Data query method, apparatus and device
WO2019120037A1 (en) Model construction method, network resource preloading method and apparatus, medium, and terminal
US20170201566A1 (en) File downloading method, apparatus, and terminal device
KR102591878B1 (en) Search method, search device, electronic device, storage medium and computer program
CN112000394B (en) Method, apparatus, device and storage medium for accessing applet
CN110727605A (en) Memory recovery method and device and electronic equipment
CN113163255B (en) Video playing method, device, terminal and storage medium
CN111866101A (en) Access request processing method and device, storage medium and electronic equipment
CN114579842B (en) Method for providing associated word on search interface and related equipment
CN112363841B (en) Application process searching and killing method and device, electronic equipment and storage medium
CN114640706B (en) Data transmission method, electronic device and computer readable storage medium
CN116721007B (en) Task control method, system and device, electronic equipment and storage medium
CN111767136B (en) Process management method, terminal and device with storage function
CN111563213B (en) Page carousel method, device, computer equipment and readable storage medium
CN114691703A (en) Data updating method and device, electronic equipment and storage medium
EP2700023B1 (en) Reducing latency for served applications by anticipatory preprocessing
CN110750724A (en) Data processing method, device, equipment and storage medium
CN112328351A (en) Animation display method, animation display device and terminal equipment
CN112099736A (en) Data storage method and device, electronic equipment and storage medium
CN111090633A (en) Small file aggregation method, device and equipment of distributed file system
CN105743950B (en) Data cache method, device and electronic equipment
CN113342501B (en) System fault processing method and device
US9692702B1 (en) Automated throttling of website polling
CN113760632B (en) Thread pool performance monitoring method, device, equipment and storage medium
CN117435350B (en) Method, device, terminal and storage medium for running algorithm model

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