Recommendation word generation method and device and electronic equipment
By obtaining the target search results of long-tail search terms, performing search processing and using large language models to generate recommended words, the problem of low matching degree of long-tail search terms is solved, and the effect of providing users with relevant recommended words is achieved.
Patent Information
- Application Number
- CN202510561682.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-12
AI Technical Summary
In the prior art, long-tail search terms have low matching degree in user history search logs, resulting in the network platform being unable to provide effective recommendation words and unable to meet the user's search needs.
By obtaining the content of the target search results, searching is performed to obtain the target search results, and a large language model is used to analyze the entries related to the specified content to generate recommendation words.
In the case of long-tail search terms, users are provided with recommended words related to the target search results to meet the user's search needs and improve the relevance of user click-through rate and recommended words.
Smart Images

Figure CN120470076A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, and electronic device for generating recommendation words. Background Art
[0002] Retrieving through the search function is an effective way to obtain information. With the continuous development of technology, in addition to users entering search terms in the search box on the display interface to search, the network platform can also recommend search terms, for example, recommending terms that users may be interested in.
[0003] In the prior art, a user's historical search log is usually used as a candidate word library for recommendation. After receiving the search term input by the user, the matching degree between the search term and multiple candidate terms in the candidate word library is determined, and the recommended word corresponding to the search term is selected to use the selected recommended word to meet the user's secondary search needs. The so-called secondary search needs refer to the user's possible further search needs based on the content displayed in the search results after obtaining the search results of the current search term.
[0004] However, if the search term entered by the user is a long-tail search term, when using the above-mentioned related technologies, the probability of there being a matching term in the historical search log is low, resulting in the network platform being unable to provide corresponding recommended terms for the search term, thereby failing to meet the user's search needs. Long-tail search terms refer to search terms whose search frequency on the network platform is lower than the predetermined frequency.
[0005] Based on this, how to provide users with recommended words corresponding to their search words to meet their search needs has become a technical problem that urgently needs to be solved. Summary of the Invention
[0006] The purpose of the embodiments of the present application is to provide a method, device, and electronic device for generating recommendation words, which provide users with recommendation words corresponding to search words and meet their search needs. The specific technical solutions are as follows:
[0007] In a first aspect of the embodiments of the present application, a method for generating a recommendation word is provided, the method comprising:
[0008] In response to the user's target search term being a long-tail search term, obtaining a target search result corresponding to the target search term;
[0009] Performing a search on the content contained in the target search result to obtain the target search result;
[0010] Determining at least one target recommendation word corresponding to the target search word based on the target search result;
[0011] The at least one target recommendation word is a term related to a designated content in the target search result, and the designated content is a content that is estimated to have a search demand.
[0012] Optionally, in one implementation, determining at least one target recommendation word corresponding to the target search word based on the target search result includes:
[0013] Based on the target search result, a target question for interacting with a predetermined large language model is constructed; wherein the target question is a question for instructing the predetermined large language model to analyze terms related to specified content in the target search result;
[0014] The target question is input into a predetermined large language model to obtain at least one target recommendation word corresponding to the target search word through analysis of the predetermined large language model.
[0015] Optionally, in one implementation, constructing a target question for interacting with a predetermined large language model based on the target retrieval result includes:
[0016] A question including at least the target retrieval result and a target description content is constructed as a target question for interacting with a predetermined large language model; wherein the target description content is used to indicate the terms in the large language model that are related to the specified content in the target retrieval result.
[0017] Optionally, in one implementation, constructing a question including at least the target search result and the target description content as a target question for interacting with a predetermined large language model includes:
[0018] Constructing a question including the target retrieval result, target description content, and reference content as a target question for interacting with a predetermined large language model;
[0019] Among them, the reference content includes: first-category reference content and / or second-category reference content; the first-category reference content includes the target search terms and target search results, and the second-category reference content is: an example consisting of sample content and recommended terms corresponding to the sample content, and the recommended terms corresponding to the sample content are: entries related to the content with search needs in the sample content.
[0020] Optionally, in one implementation, performing retrieval processing on the content contained in the target search result to obtain the target search result includes:
[0021] Determining at least one keyword in the content included in the target search result;
[0022] Searching for the at least one keyword;
[0023] Based on the search results, target search results are determined.
[0024] Optionally, in one implementation, determining a target search result based on the search results includes:
[0025] The results obtained by retrieval are determined as target retrieval results; or, the results obtained by retrieval are subjected to content screening, and the screened results are determined as target retrieval results; wherein, the content screening is a method of screening according to content popularity and / or the degree of matching with the user profile of the user.
[0026] Optionally, in one implementation, identifying whether the user's target search term is a long-tail search term includes:
[0027] Determine the moment when the user enters the target search term;
[0028] Determine a time range with a specified duration and ending at the input time;
[0029] In the real-time database of search term exposure records, analyze whether the number of exposures of the target search term within the time range reaches a predetermined number. If so, determine that the target search term is a long-tail search term; if not, determine that the target search term is not a long-tail search term.
[0030] In a second aspect of the embodiments of the present application, a device for generating a recommendation word is further provided, the device comprising:
[0031] A result acquisition module, configured to, in response to a user's target search term being a long-tail search term, acquire a target search result corresponding to the target search term;
[0032] An information retrieval module is used to retrieve the content contained in the target search results to obtain the target search results;
[0033] The recommendation word determination module is used to determine at least one target recommendation word corresponding to the target search word based on the target retrieval result; wherein, the at least one target recommendation word is: an entry related to the specified content in the target retrieval result, and the specified content is the content that is estimated to have a search demand.
[0034] Optionally, in one implementation, the recommendation word determination module includes:
[0035] A construction submodule is configured to construct a target question for interacting with a predetermined large language model based on the target search result; wherein the target question is a question for instructing the predetermined large language model to analyze terms related to specified content in the target search result;
[0036] The analysis submodule is used to input the target question into a predetermined large language model to obtain at least one target recommendation word corresponding to the target search word through analysis of the predetermined large language model.
[0037] Optionally, in one implementation, the construction submodule includes:
[0038] A construction subunit is used to construct a question that at least includes the target retrieval result and a target description content as a target question for interacting with a predetermined large language model; wherein the target description content is used to instruct the large language model to analyze terms related to the specified content in the target retrieval result.
[0039] Optionally, in one implementation, the construction subunit is specifically used to:
[0040] Constructing a question including the target retrieval result, target description content, and reference content as a target question for interacting with a predetermined large language model;
[0041] Among them, the reference content includes: first-category reference content and / or second-category reference content; the first-category reference content includes the target search terms and target search results, and the second-category reference content is: an example consisting of sample content and recommended terms corresponding to the sample content, and the recommended terms corresponding to the sample content are: entries related to the content with search needs in the sample content.
[0042] Optionally, in one implementation, the information retrieval module includes:
[0043] A first determining submodule, configured to determine at least one keyword in the content contained in the target search result;
[0044] A retrieval submodule, configured to search for the at least one keyword;
[0045] The second determination submodule is used to determine the target search result based on the search results.
[0046] Optionally, in one implementation, the second determining submodule is specifically configured to:
[0047] The results obtained by retrieval are determined as target retrieval results; or, the results obtained by retrieval are subjected to content screening, and the screened results are determined as target retrieval results; wherein, the content screening is a method of screening according to content popularity and / or the degree of matching with the user profile of the user.
[0048] Optionally, an implementation method for identifying whether a user's target search term is a long-tail search term includes:
[0049] Determine the moment when the user enters the target search term;
[0050] Determine a time range with a specified duration and ending at the input time;
[0051] In the real-time database of search term exposure records, analyze whether the number of exposures of the target search term within the time range reaches a predetermined number. If so, determine that the target search term is a long-tail search term; if not, determine that the target search term is not a long-tail search term.
[0052] In the third aspect provided by the embodiment of the present application, an electronic device is also provided, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor is used to implement any method for generating recommendation words provided in the first aspect when executing the program stored in the memory.
[0053] In another aspect provided by the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, any method for generating recommendation words provided in the first aspect is implemented.
[0054] In another aspect provided by an embodiment of the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any of the methods for generating recommendation words provided in the first aspect above.
[0055] As can be seen from the above, by applying the solution provided by the embodiment of the present application, after determining that the user's target search term is a long-tail search term, the target search result corresponding to the target search term is obtained, and then the content contained in the target search result is retrieved to obtain the target retrieval result. Thus, based on the obtained target retrieval result, at least one target recommendation term corresponding to the target search term is determined. The at least one target recommendation term is an entry related to the content in the target retrieval result that is estimated to have a search demand, so as to provide a corresponding recommendation term for the target search term entered by the user when the target search term is a long-tail search term, thereby meeting the user's secondary search demand. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art.
[0057] Figure 1 A schematic diagram of a flow chart of a method for obtaining recommended words in the prior art provided in an embodiment of the present application;
[0058] Figure 2 A flowchart of a first method for generating recommendation words provided in an embodiment of the present application;
[0059] Figure 3 A flowchart of a second method for generating recommendation words provided in an embodiment of the present application;
[0060] Figure 4 A flowchart of a third method for generating recommendation words provided in an embodiment of the present application;
[0061] Figure 5 A flowchart of a specific embodiment provided in the embodiments of the present application;
[0062] Figure 6 A schematic diagram of the structure of a device for generating recommendation words provided in an embodiment of the present application;
[0063] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0065] In order to better understand the present application, the background technology involved in the embodiments of the present application is first exemplarily introduced below.
[0066] Currently, various search platforms have launched chat assistants that, through their "Guess What You're Searching For" module, provide users with potentially interesting terms during their searches, thereby increasing click-through rates. Prior art typically uses a user's historical search logs as a candidate word library for recommendation. Upon receiving a user's search term, a similarity algorithm is used to calculate the similarity between the current search term and terms in the candidate word library. Terms with higher similarity are then identified as terms likely to be of interest to the user during their search and are recommended.
[0067] For example, Figure 1The following is a flow chart of a method for obtaining recommended words in the prior art provided for an embodiment of the present application, wherein the word library is the candidate word library in the embodiment of the present application, and the user question is the target search word in the embodiment of the present application (as well as the current search word in the above example). After receiving the user question sent by the user, the similarity between the user question and each entry in the word library is calculated, and the entries with higher similarity are determined as recommended words. The determined recommended words are recalled and sorted, and finally, the sorted recommended words are displayed.
[0068] In this way, after receiving the user question sent by the user, while displaying the answer corresponding to the user question to the user, the user can also be provided with recommended words with a high degree of similarity to the user question to meet the user's possible search needs during the search process.
[0069] However, the user questions raised by users are diverse, and the entries included in the vocabulary may not meet the user's search needs. That is, if the search term entered by the user is a long-tail search term, the probability that there are recommended terms with a high degree of similarity to the search term in the vocabulary is low, resulting in the network platform being unable to provide corresponding recommended terms for the search term.
[0070] In order to solve the above technical problems, the embodiments of the present application provide a method, device and electronic device for generating recommendation words.
[0071] The method can be applied to various user search scenarios, such as searching for movies and TV series on a network platform, or searching for names on a network platform. The method can be applied to various electronic devices, such as tablet computers, smartphones, and laptop computers (hereinafter referred to as electronic devices). The present application does not limit the application scenarios or execution entities of the method.
[0072] A method for generating a recommendation word provided in an embodiment of the present application may include:
[0073] In response to the user's target search term being a long-tail search term, obtaining a target search result corresponding to the target search term;
[0074] Performing a search on the content contained in the target search result to obtain the target search result;
[0075] Determining at least one target recommendation word corresponding to the target search word based on the target search result;
[0076] The at least one target recommendation word is a term related to a designated content in the target search result, and the designated content is a content that is estimated to have a search demand.
[0077] As can be seen from the above, by applying the solution provided by the embodiment of the present application, after determining that the user's target search term is a long-tail search term, the target search result corresponding to the target search term is obtained, and then the content contained in the target search result is retrieved to obtain the target retrieval result. Thus, based on the obtained target retrieval result, at least one target recommendation term corresponding to the target search term is determined. The at least one target recommendation term is an entry related to the content in the target retrieval result that is estimated to have a search demand, so as to provide a corresponding recommendation term for the target search term entered by the user when the target search term is a long-tail search term, thereby meeting the user's secondary search demand.
[0078] A method for generating recommendation words provided in an embodiment of the present application is described below with reference to the accompanying drawings.
[0079] Figure 2 A flowchart of a method for generating a recommendation word provided in an embodiment of the present application is shown as follows: Figure 2 As shown, the method may include the following steps:
[0080] S201: In response to a user's target search term being a long-tail search term, obtaining a target search result corresponding to the target search term.
[0081] If the search term entered by the user is a long-tail search term, that is, the search frequency of the search term on the network platform is lower than the predetermined frequency, then the probability of there being an entry matching the search term in the user's historical search log is low. At this time, in order to meet the user's search needs, it is necessary to execute a method for generating recommended terms provided in an embodiment of the present application for this type of long-tail search term.
[0082] In this application, after obtaining the user's target search term, it is determined whether the target search term is a long-tail search term. If so, the target search result corresponding to the target search term is obtained.
[0083] The specific implementation method of identifying whether the user's target search term is a long-tail search term is detailed in steps C1-C3 below and will not be repeated here.
[0084] S202: Performing search processing on the content included in the target search result to obtain the target search result.
[0085] In this application, considering that the target search results are determined based on the target search terms entered by the user, that is, the target search results are the content that the user is interested in, then, there is a high possibility that the content contained in the target search results contains content that the user is interested in or has further search needs. Therefore, the recommended words determined from this type of content are more likely to arouse the user's interest in further searches, thereby increasing the user's click-through rate.
[0086] Therefore, after determining the target search result, the content contained in the target search result may be further searched to obtain the target search result.
[0087] For example, if the TV series starring XX is used as the target search term, the search results corresponding to the target search term are TV series a and the plot introduction of TV series a. Taking the plot introduction of TV series a as the target search result, searching for the content contained in "the plot introduction of TV series a" can obtain the high-energy plot b of TV series a and the cast of TV series a as the target search results.
[0088] Optionally, in one implementation, the above step S202, performing search processing on the content included in the target search result to obtain the target search result, may include the following steps:
[0089] Step A1: Determine at least one keyword in the content contained in the target search result;
[0090] Step A2: searching for at least one keyword;
[0091] Step A3: Determine the target search result based on the search results.
[0092] In this implementation, at least one keyword in the content included in the target search result is determined, and a search is performed for the determined at least one keyword, thereby determining the target search result based on the search result.
[0093] For example, the target search term is "Introduction to Series Q", and the corresponding target search results may be "Introduction to Series Q's Works", "Introduction to Series Q's Series" and "Introduction to the Movie Version of Series Q". For the target search result of "Introduction to Series Q's Works", the keywords in the content contained in the target search result include: keywords "Series Q" and "Introduction to Series Q's Works". Then, "Series Q" and "Introduction to Series Q's Works" are searched separately to obtain corresponding search results. For example, the results obtained by searching for "Series Q" include: "Cast members of Series Q", and then, based on "Cast members of Series Q", the target search results are determined; the results obtained by searching for "Introduction to Series Q's Works" include "Plot explanation of Series Q", and then, based on "Plot explanation of Series Q", the target search results are determined.
[0094] Among them, the method for determining at least one keyword in the content contained in the target search result in the above step A1 can be to perform word segmentation processing on the content contained in the target search result to obtain at least one keyword in the content contained in the target search result; or it can be based on a graph model method, and the text content contained in the target search result is constructed into a graph structure, and the nodes are sorted by importance to obtain at least one keyword in the content contained in the target search result, etc. In this regard, the embodiment of the present application does not make specific limitations, and any method of processing text content to obtain keywords can be applied to the above step A1.
[0095] In this implementation, the results obtained by searching based on at least one keyword in the content contained in the target search results are determined to have a high probability of arousing the user's interest in further searching. In this way, after the user sees the content of interest or has the need for further searching, he does not need to enter the search term again, but can directly click on the recommended term corresponding to this type of content.
[0096] Optionally, in one implementation, the above step A3, determining the target search result based on the search results, may include the following steps:
[0097] Step A31: Determine the search result as the target search result.
[0098] In this implementation, after the search results are obtained, the obtained results are directly used to determine the target search results, so as to improve the efficiency of determining the target search results.
[0099] Optionally, in one implementation, the above step A3, determining the target search result based on the search results, may include the following steps:
[0100] Step A32: screening the search results and determining the screened results as target search results;
[0101] Among them, content screening is a method of screening according to content popularity and / or the degree of matching with the user's user profile.
[0102] In this implementation, considering that the search results contain a variety of content types, are large in number and have complex contents, the results obtained can be content-filtered according to the popularity of the content and / or the degree of matching with the user's user profile, and the filtered results can be determined as the target search results.
[0103] Taking into account that the higher the popularity of the content, the higher the real-time nature of the corresponding information, the above-mentioned content screening can be a screening method based on the popularity of the content. Specifically, after the retrieval results are obtained, each result located at a predetermined popularity position can be determined as a target retrieval result according to the content popularity corresponding to each result, so as to improve the real-time nature of the determined target retrieval results and help users understand the latest information about the target search results.
[0104] Different users have different interests and preferences. Some users prefer entertainment news, some users prefer plot introductions, etc. Therefore, the above content screening can be performed according to the popularity of the content and the degree of matching with the user's user portrait. Specifically, the user's user portrait is determined in advance, and the obtained results are matched with the user's user portrait. Each result with a matching degree higher than the predetermined matching degree is used as the target retrieval result, so as to increase the user's interest in the recommended words determined based on the target retrieval result through personalized customization of the determined target retrieval result.
[0105] In order to ensure the user's interest in the determined recommended words and the real-time nature of the determined target information, the above-mentioned content screening can be performed according to the degree of matching with the user's user portrait. Specifically, according to the content popularity corresponding to the retrieved results, each result located at a predetermined popularity position is used as a candidate result. Then, each candidate result is matched with the user's user portrait, and each candidate result with a matching degree higher than the predetermined matching degree is determined as the target retrieval result. Thus, while improving the real-time nature of the determined target retrieval results, the user is provided with personalized customization of the target retrieval results to increase the user's interest in the subsequently provided recommended words.
[0106] Among them, the above-mentioned screening method of first performing a first screening according to the popularity of the content and then performing a second screening according to the degree of matching with the user's user portrait is only an example of this application. It is also possible to first perform a first screening according to the degree of matching with the user's user portrait and then perform a second screening according to the popularity of the content. This is all reasonable, and the embodiment of this application does not limit the above-mentioned screening order.
[0107] In this implementation, by screening the contents of the search results, the probability that the target search results are the contents that the user is interested in is increased, so as to improve the click rate of the recommended words determined based on the target search results.
[0108] S203: Determine at least one target recommendation word corresponding to the target search word based on the target search result;
[0109] Among them, at least one target recommendation word is: an entry related to the specified content in the target search result, and the specified content is the content that is estimated to have search demand.
[0110] In this application, the determined target retrieval results are the results obtained by further searching based on the content contained in the target search results, and the content contained in the target search results is: the content that the user is currently interested in. Therefore, the target retrieval results obtained by further searching based on the target search results are more likely to be content that the user is interested in, or has further search needs, etc. Therefore, the content contained in the target retrieval results can be estimated to estimate the specified content for which there is a search need, thereby determining at least one term related to the specified content in the target retrieval results as at least one target recommendation term corresponding to the target search term.
[0111] Among them, the above-mentioned method of estimating the content contained in the target search results to obtain the specified content can be to determine the content corresponding to the Internet hot words in the content contained in the target search results as the specified content; or to determine the content corresponding to the entries with user click-through rates greater than the predetermined click-through rate in the content contained in the target search results as the specified content, etc. This embodiment of the application does not make specific limitations on this.
[0112] For example, the target search result is the plot introduction of the film and television drama Q, and the content of the plot introduction of the film and television drama Q corresponds to the target content of the Internet hot word "black and white contest", then the target content can be determined as the designated content in the target search result; for another example, the target search result is the work in which the star XX participated, and the user click rate of the entry "Variety Show Reuters" in the content of the work in which the star XX participated is greater than the predetermined click rate, then the content corresponding to the entry is determined as the designated content.
[0113] It should be noted that the above-mentioned recommendation words can be presented in the form of words or question content. Although they are named recommendation words here, the embodiments of this application do not specifically limit their specific presentation form.
[0114] For example, the target search term is "Introduction to Drama Q", the target search result is "Introduction to Drama Q's Works", and the target retrieval result is "The Cast of Drama Q". The content that causes the user to have further search needs can be the specific information of the cast (character introduction, pictures, etc.), or other dramas in which the cast has participated, etc. Therefore, based on the obtained target retrieval results, the target recommendation words corresponding to the obtained "Introduction to Drama Q" can include: the graduate school of person W, other dramas in which person W has participated, etc.
[0115] Optionally, the information content contained in the target retrieval result is analyzed, and at least one recommendation word is extracted from the information content as at least one target recommendation word for the target search word.
[0116] Optionally, at least one keyword included in the target search result is determined as at least one target recommendation word for the target search word.
[0117] As can be seen from the above, by applying the solution provided by the embodiment of the present application, after determining that the user's target search term is a long-tail search term, the target search result corresponding to the target search term is obtained, and then the content contained in the target search result is retrieved to obtain the target retrieval result. Thus, based on the obtained target retrieval result, at least one target recommendation term corresponding to the target search term is determined. The at least one target recommendation term is an entry related to the content in the target retrieval result that is estimated to have a search demand, so as to provide a corresponding recommendation term for the target search term entered by the user when the target search term is a long-tail search term, thereby meeting the user's secondary search demand.
[0118] In addition, the above-mentioned at least one target recommendation word is determined based on the target retrieval result corresponding to the target search result, and the target retrieval result is obtained by searching and processing the content contained in the target search result. That is to say, the at least one target recommendation word determined is at least content-related to the target search result, and the target search result itself is the content that the user is interested in. Accordingly, the possibility of the user being interested in the at least one target recommendation word determined is relatively high, which can increase the possibility of the user continuing to click.
[0119] Optionally, in one implementation, Figure 3 A flow chart of another method for generating recommendation words provided in an embodiment of the present application is shown as follows: Figure 3 As shown, the above step S203, determining at least one target recommendation word corresponding to the target search word based on the target search result, may include the following steps:
[0120] S2031: Constructing a target question for interacting with a predetermined large language model based on the target search results;
[0121] The target question is: a question for instructing a predetermined large language model to analyze terms related to specified content in the target search results;
[0122] S2032: Input the target question into a predetermined large language model to obtain at least one target recommendation word corresponding to the target search word through analysis of the predetermined large language model.
[0123] In this implementation, a predetermined large language model is used to generate at least one target recommendation word corresponding to the target search term based on the target retrieval results. Therefore, before the recommendation word generation process is performed, a target question for interacting with the predetermined large language model is constructed based on the target retrieval results. The target question is used to instruct the predetermined large language model to analyze entries related to the specified content in the target retrieval results. In this way, after the constructed target question is input into the predetermined large language model, the predetermined large language model can generate recommendation words based on the instructions of the target question, and the generated recommendation words are related to the specified content in the target retrieval results, so as to analyze and obtain at least one target recommendation word corresponding to the target search term.
[0124] In this implementation, by constructing a target question, the large language model, upon receiving the target question, generates terms related to the specified content in the target search results as instructed by the target question. These terms are then used as target recommendations for the target search term, thereby increasing the relevance of the generated recommendations to the target search term and, therefore, the likelihood of users continuing to click on them. Furthermore, using the large language model to generate recommendations improves the efficiency of recommendation generation.
[0125] Among them, the above-mentioned large language model can be LLM (Large Language Model), GTP-3 (Generative Pre-trained Transfoemer3, natural language processing model), BERT (Bidirectional Encoder Representations from Transformers is a pre-trained language representation model used to improve the understanding ability of the natural language processing system), etc., and this embodiment of the application does not make specific limitations on this.
[0126] Optionally, in one implementation, Figure 4 A flow chart of another method for generating recommendation words provided in an embodiment of the present application is shown as follows: Figure 4 As shown, the above step S2031, based on the target search result, constructing a target question for interacting with the predetermined large language model, may include the following steps:
[0127] S401: Constructing a question including at least a target search result and a target description content as a target question for interacting with a predetermined large language model;
[0128] The target description content is used to instruct the large language model to analyze terms related to the specified content in the target retrieval results.
[0129] In this implementation, to enable the predefined large language model to generate terms related to the specified content in the target search results, before generating recommended terms, a model task for the large language model to analyze terms related to the specified content in the target search results is predefined. The description of this model task is then used as the target description. This target description instructs the large language model to analyze terms related to the specified content in the target search results. Thus, a question containing at least the target search results and the target description is constructed as the target question for interacting with the predefined large language model.
[0130] In this implementation, by constructing the target question, the large language model can clarify the specific content of the model task it currently needs to perform based on the target description content contained in the target question after obtaining the target question, so as to improve the generation efficiency of recommended words and the relevance of the generated recommended words with the target search words, thereby increasing the possibility of users continuing to click.
[0131] Optionally, in one implementation, step S401, constructing a question including at least the target search result and the target description content as a target question for interacting with the predetermined large language model, may include the following steps:
[0132] Step B: Construct a question containing the target retrieval result, target description content, and reference content as the target question for interacting with the predetermined large language model;
[0133] Among them, the reference content includes: first-category reference content and / or second-category reference content; the first-category reference content includes target search terms and target search results, and the second-category reference content is: an example consisting of sample content and recommended terms corresponding to the sample content, and the recommended terms corresponding to the sample content are: entries related to the content with search needs in the sample content.
[0134] In this implementation, the constructed target question, based on the target retrieval results and target description content, may also include reference content for standardizing the recommendation word generation process of the large language model. The reference content includes: first-category reference content and / or second-category reference content.
[0135] The first type of reference content includes target search terms and target search results. When the reference content includes the first type of reference content, the constructed target question includes target information, target description content, and the first type of reference content consisting of the target search terms and target search results. This first type of reference content provides sufficient feature information for the model to generate recommended terms, thereby reducing the problem of hallucination during model operation.
[0136] The so-called hallucination problem for large language models means that the information generated by the model may be inaccurate or untrue, and conflict with user input or factual knowledge. In other words, the hallucination problem manifests itself in large language models as the text generated by the model does not follow the original text or is inconsistent with the facts. For example, the model may incorrectly generate the time of occurrence of a certain historical event, or, without sufficient information, create a fact that does not exist.
[0137] The second type of reference content is an example consisting of sample content and the recommended terms corresponding to the sample content. When the reference content includes the second type of reference content, the constructed target question includes target information, target description content, and the above examples. Thus, through the above examples, the large language model can determine the mapping relationship between the content and the corresponding recommended terms by learning the feature vectors of the sample content and its corresponding recommended terms. Based on the determined mapping relationship, the target information and target description content, it generates entries related to the specified content in the target search results, resulting in the recommended terms of the type shown in the examples.
[0138] When the reference content includes first-category reference content and second-category reference content, the constructed target question includes target information, target description content, first-category reference content, and second-category reference content. Thus, the predetermined large language model uses the first-category reference content to provide sufficient feature information for the model to generate recommended terms. Based on the mapping relationship learned based on the second-category reference content, the model generates terms related to the specified content in the target search results, resulting in recommended terms of the type shown in the example.
[0139] In this implementation, through the construction of the target question, after obtaining the target question, the large language model can clarify the correspondence between the recommended words to be generated and the corresponding target retrieval results based on the reference content contained in the target question, while clarifying the model task it currently needs to perform. This improves the efficiency of generating recommended words, as well as the relevance of the generated recommended words to the target search words, and further increases the possibility of users continuing to click.
[0140] Optionally, in order to standardize the format of the search terms output by the large language model, the constructed question also includes a predetermined field for standardizing the output content format of the predetermined large language model.
[0141] Optionally, in one embodiment, identifying whether the user's target search term is a long-tail search term may include the following steps:
[0142] Step C1: Determine the time when the user inputs the target search term;
[0143] Step C2: determining a time range with a specified duration and ending at the input time;
[0144] Step C3: In the real-time database of search term exposure records, analyze whether the number of exposures of the target search term within the time range reaches the predetermined number. If so, determine that the target search term is a long-tail search term; if not, determine that the target search term is not a long-tail search term.
[0145] So-called long-tail search terms refer to search terms whose search frequency on a network platform is lower than a predetermined frequency. Therefore, in this embodiment, a real-time database of search term exposure records is pre-determined. This real-time database records each searched or displayed term, as well as the exposure time of each term. In this way, the number of exposures for each term can be determined based on each term recorded in the real-time database and its corresponding exposure time. The exposure times mentioned above include: the number of times the term was displayed and / or the number of times it was searched, which is not specifically limited in this embodiment of the application.
[0146] However, considering that the amount of data recorded in the real-time database is too large and the time range spans a large range, the time range can be defined in the real-time database using the input moment of the user's target search term as the benchmark, and the number of exposures of the target search term within a period of time in the real-time database can be selected, thereby greatly reducing the amount of data required to be screened and improving the recognition efficiency of long-tail search terms.
[0147] Based on this, when judging whether the user's target search term is a long-tail search term, the input time of the target search term can be determined, and a time range with a specified duration and the input time as the end time can be determined. Thus, in the above-mentioned real-time database, it is analyzed whether the number of exposures of the target search term within the above-mentioned time range reaches the predetermined number of times.
[0148] If the number of exposures reaches the predetermined number, it indicates that the target search term has been searched or displayed a small number of times within the above time range, and the target search term is a long-tail search term.
[0149] If the number of exposures does not reach the predetermined number, it indicates that the target search term has been searched or displayed a large number of times within the above time range, and the target search term does not belong to the long-tail search term.
[0150] In this embodiment, the input moment of the target search term is used as the benchmark for determining the time range, a time range with a specified duration and the input moment as the end moment is selected, and each term within the above time range is analyzed, which greatly reduces the number of terms that need to be analyzed, thereby improving the recognition efficiency of long-tail search terms, and further improving the timeliness of generating recommended terms.
[0151] Optionally, in one embodiment, after determining at least one target recommendation word for the target search word, each determined target recommendation word is filtered using a predetermined sensitive word library, and target recommendation words that do not contain any sensitive words in the sensitive word library are retained, and the filtered target recommendation words are displayed to the user to improve the compliance of the displayed target recommendation words.
[0152] Optionally, in one implementation, taking into account the timeliness of the target search results when displayed, at least one target recommendation word and the target search results are displayed at the same time. Therefore, after filtering each target recommendation word using a predetermined sensitive word library, if each target recommendation word contains sensitive words, at least one entry can be randomly selected from the predetermined word library as at least one target recommendation word for the target search word.
[0153] It should be understood that after the user clicks on the displayed target recommendation word, if the target recommendation word belongs to a long-tail search word, then accordingly, the target recommendation word can continue to be used as a new target search word to execute a recommendation word generation method provided in an embodiment of the present application.
[0154] In order to facilitate understanding of a method for generating a recommendation word provided in an embodiment of the present application, a specific embodiment is described below. For example, Figure 5 This is a flowchart of a specific embodiment provided by the present application. The user question is the target search term in the present application, the long-tail user question is the long-tail search term in the present application, the hook information is the target search result in the present application, and the answer is the target search result in the present application.
[0155] After obtaining the user question, first determine whether the user question is a long-tail user question, that is, calculate the exposure data of the user question (also called historical display data, that is, the number of exposures in the embodiment of the present application) by counting the historical log data (that is, the real-time database in the embodiment of the present application). Among them, for user questions with exposures not less than the threshold, it is considered that the user question belongs to the medium-high frequency user question. At this time, you can execute Figure 1 The method of obtaining recommended words in the prior art shown above, and obtaining the recommended words corresponding to the user question, will not be repeated here. For user questions with exposure less than the threshold, the user question is considered to be a long-tail user question. At this time, the downstream generation process for long-tail user questions is triggered, specifically:
[0156] Utilize the semantic understanding ability of the large language model to construct a suitable prompt (prompt word, i.e., the target question in the embodiment of this application) to be input into the large language model. The prompt includes: query (user question), answer (answer, i.e., the target search result in the embodiment of this application), ppc meta (hook information), system (system, used to characterize the detailed description content of the entire model task, i.e., the target description content in the embodiment of this application) and few shot (few sample prompts, i.e., the second type of reference content in the embodiment of this application).
[0157] Among them, PPC meta is the hanging information hung based on the answer, that is, the target information that is content-related to the answer. For example, if the user's question is to find some movies suitable for watching on rainy days, the answer will be many movies and TV series. At this time, the user may want to ask for basic information such as the plot summary of these movies and TV series. This basic information is the target information.
[0158] Few shots are used to normalize the model's output and provide the model with sample examples during reasoning to stimulate the model's underlying reasoning capabilities.
[0159] It should be noted that in order to avoid hallucination problems in the model, the large language model must generate recommended words based on the query and answer (the query and answer together constitute the first type of reference content in the embodiment of this application). If there is no answer, the recommended words generated by the model can be discarded. In this way, the results generated by the RAG method (Retrieval-Augmented Generation, a method that combines retrieval and generation technologies) are more controllable.
[0160] In addition, in order to ensure the accuracy and quality of the recommended words output by the large language model, a posteriori logic is used to check whether the recommended words generated by the model contain sensitive words. Specifically, each recommended word is filtered according to the sensitive word library currently possessed by the search engine, and finally, the retained recommended words are displayed to the user.
[0161] In this specific embodiment, by using the RAG method and utilizing a large language model, corresponding follow-up words (i.e., the target recommendation words in the embodiment of the present application) are generated for long-tail user questions to overcome the problem of no follow-up words in long-tail user questions, thereby meeting the user's secondary needs for further searches after the search is completed, thereby reducing the user's input cost and improving the user's usage experience.
[0162] Based on the above method embodiment, the present application embodiment also provides a device for generating recommendation words, such as Figure 6FIG. 1 is a schematic diagram of a device for generating recommendation words according to an embodiment of the present application, wherein the device includes:
[0163] The result acquisition module 610 is configured to acquire target search results corresponding to the target search term in response to the user's target search term being a long-tail search term;
[0164] The information retrieval module 620 is used to perform retrieval processing on the content contained in the target search result to obtain the target search result;
[0165] The recommendation word determination module 630 is used to determine at least one target recommendation word corresponding to the target search word based on the target retrieval result; wherein, the at least one target recommendation word is: an entry related to the specified content in the target retrieval result, and the specified content is the content that is estimated to have a search demand.
[0166] As can be seen from the above, by applying the solution provided by the embodiment of the present application, after determining that the user's target search term is a long-tail search term, the target search result corresponding to the target search term is obtained, and then the content contained in the target search result is retrieved to obtain the target retrieval result. Thus, based on the obtained target retrieval result, at least one target recommendation term corresponding to the target search term is determined. The at least one target recommendation term is an entry related to the content in the target retrieval result that is estimated to have a search demand, so as to provide a corresponding recommendation term for the target search term entered by the user when the target search term is a long-tail search term, thereby meeting the user's secondary search demand.
[0167] Optionally, in one implementation, the recommendation word determination module 630 includes:
[0168] A construction submodule is configured to construct a target question for interacting with a predetermined large language model based on the target search result; wherein the target question is a question for instructing the predetermined large language model to analyze terms related to specified content in the target search result;
[0169] The analysis submodule is used to input the target question into a predetermined large language model to obtain at least one target recommendation word corresponding to the target search word through analysis of the predetermined large language model.
[0170] Optionally, in one implementation, the construction submodule includes:
[0171] A construction subunit is used to construct a question that at least includes the target retrieval result and a target description content as a target question for interacting with a predetermined large language model; wherein the target description content is used to instruct the large language model to analyze terms related to the specified content in the target retrieval result.
[0172] Optionally, in one implementation, the construction subunit is specifically used to:
[0173] Constructing a question including the target retrieval result, target description content, and reference content as a target question for interacting with a predetermined large language model;
[0174] Among them, the reference content includes: first-category reference content and / or second-category reference content; the first-category reference content includes the target search terms and target search results, and the second-category reference content is: an example consisting of sample content and recommended terms corresponding to the sample content, and the recommended terms corresponding to the sample content are: entries related to the content with search needs in the sample content.
[0175] Optionally, in one implementation, the information retrieval module 620 includes:
[0176] A first determining submodule, configured to determine at least one keyword in the content contained in the target search result;
[0177] A retrieval submodule, configured to perform a search on the at least one keyword;
[0178] The second determination submodule is used to determine the target search result based on the search results.
[0179] Optionally, in one implementation, the second determining submodule is specifically configured to:
[0180] The results obtained by retrieval are determined as target retrieval results; or, the results obtained by retrieval are subjected to content screening, and the screened results are determined as target retrieval results; wherein, the content screening is a method of screening according to content popularity and / or the degree of matching with the user profile of the user.
[0181] Optionally, an implementation method for identifying whether a user's target search term is a long-tail search term includes:
[0182] Determine the moment when the user enters the target search term;
[0183] Determine a time range with a specified duration and ending at the input time;
[0184] In the real-time database of search term exposure records, analyze whether the number of exposures of the target search term within the time range reaches a predetermined number. If so, determine that the target search term is a long-tail search term; if not, determine that the target search term is not a long-tail search term.
[0185] The present application also provides an electronic device, such as Figure 7As shown, it includes a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.
[0186] Memory 703, for storing computer programs;
[0187] The processor 701 is configured to implement any of the methods for generating recommendation words provided in the above-mentioned embodiments of the present application when executing the program stored in the memory 703 .
[0188] The communication bus mentioned in the terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0189] The communication interface is used for communication between the above terminal and other devices.
[0190] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0191] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0192] In another embodiment provided by the present application, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for generating recommendation words described in any of the above embodiments is implemented.
[0193] In another embodiment provided by the present application, a computer program product including instructions is also provided. When the computer program product is run on a computer, the computer is enabled to execute the method for generating recommendation words described in any one of the above embodiments.
[0194] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0195] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0196] Each embodiment in this specification is described in a related manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, since the apparatus embodiments, electronic device embodiments, computer-readable storage medium embodiments, and computer program product embodiments are generally similar to the method embodiments, their descriptions are relatively simple. For related portions, reference can be made to the descriptions of the method embodiments.
[0197] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the scope of protection of the present application.
Claims
1. A method for generating a recommendation word, characterized in that: The method comprises: In response to the user's target search term being a long-tail search term, obtaining a target search result corresponding to the target search term; Performing a search on the content contained in the target search result to obtain the target search result; Determining at least one target recommendation word corresponding to the target search word based on the target search result; The at least one target recommendation word is a term related to a designated content in the target search result, and the designated content is a content that is estimated to have a search demand.
2. The method according to claim 1, characterized in that The determining, based on the target search result, at least one target recommendation word corresponding to the target search word includes: Based on the target search result, a target question for interacting with a predetermined large language model is constructed; wherein the target question is a question for instructing the predetermined large language model to analyze terms related to specified content in the target search result; The target question is input into a predetermined large language model to obtain at least one target recommendation word corresponding to the target search word through analysis of the predetermined large language model.
3. The method according to claim 2, characterized in that The step of constructing a target question for interacting with a predetermined large language model based on the target retrieval result includes: A question including at least the target retrieval result and target description content is constructed as a target question for interacting with a predetermined large language model; wherein the target description content is used to instruct the large language model to analyze terms related to specified content in the target retrieval result.
4. The method according to claim 3, characterized in that The step of constructing a question including at least the target search result and the target description content as a target question for interacting with a predetermined large language model includes: Constructing a question including the target retrieval result, target description content, and reference content as a target question for interacting with a predetermined large language model; Among them, the reference content includes: first-category reference content and / or second-category reference content; the first-category reference content includes the target search terms and target search results, and the second-category reference content is: an example consisting of sample content and recommended terms corresponding to the sample content, and the recommended terms corresponding to the sample content are: entries related to the content with search needs in the sample content.
5. The method according to any one of claims 1 to 4, characterized in that The searching and processing of the content contained in the target search results to obtain the target search results includes: Determining at least one keyword in the content included in the target search result; Searching for the at least one keyword; Based on the search results, target search results are determined.
6. The method according to claim 5, characterized in that Determining the target search result based on the search results includes: Determine the retrieved results as target retrieval results; or, The results obtained by the retrieval are subjected to content screening, and the screened results are determined as target retrieval results; wherein the content screening is a method of screening according to the popularity of the content and / or the degree of matching with the user profile of the user.
7. The method according to any one of claims 1 to 4, characterized in that Identify whether the user's target search term is a long-tail search term, including: Determine the moment when the user enters the target search term; Determine a time range with a specified duration and ending at the input time; In the real-time database of search term exposure records, analyze whether the number of exposures of the target search term within the time range reaches a predetermined number. If so, determine that the target search term is a long-tail search term; if not, determine that the target search term is not a long-tail search term.
8. A device for generating recommendation words, characterized in that: The device comprises: A result acquisition module, configured to, in response to a user's target search term being a long-tail search term, acquire a target search result corresponding to the target search term; An information retrieval module is used to retrieve the content contained in the target search results to obtain the target search results; The recommendation word determination module is used to determine at least one target recommendation word corresponding to the target search word based on the target retrieval result; wherein, the at least one target recommendation word is: an entry related to the specified content in the target retrieval result, and the specified content is the content that is estimated to have a search demand.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.