Display method, device and equipment of search result, storage medium and program product
By acquiring target search keywords and performing associated scoring of intent word tags and item tags, the high cost caused by the complexity of syntactic tree construction is solved, and the intent recognition retrieval effect combining user search input and behavior is achieved.
Patent Information
- Application Number
- CN202211574237.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-12-08
AI Technical Summary
The construction of mature syntax trees in existing technologies is relatively complex, resulting in high costs for intent recognition solutions.
By acquiring target search keywords and processing them based on preset word segmentation rules, the target intent word tags and their weight values are obtained from the correspondence between search keywords and intent word tags. Furthermore, the target item tags and their weight values are obtained from the correspondence between intent word tags and item tags. Finally, the item results are scored using a preset matching algorithm, and the item results are displayed in descending order of score.
It combines user search input with user behavior, improving the accuracy and efficiency of intent recognition retrieval and reducing development costs.
Smart Images

Figure CN115982482B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of Internet technology, and in particular relates to a method, apparatus, device, storage medium and program product for displaying search results. Background Technology
[0002] In recent years, natural language processing technology has become increasingly sophisticated, and internet products have become more intelligent, with the focus of technology shifting towards recognizing user intent.
[0003] In existing technologies, intent recognition is mainly achieved through dependency parsing. The principle of dependency parsing is based on a syntactic relation tree built at the bottom layer, using the correspondence between words and parts of speech as nodes to represent the sentence structure in a tree-like structure. However, building a mature syntactic tree is relatively complex and requires significant investment from developers, resulting in a high cost for this approach to intent recognition. Summary of the Invention
[0004] This application provides a method, apparatus, device, storage medium, and program product for displaying search results, which can solve the problem that the construction of mature syntax trees in the prior art is relatively complex, and developers need to invest a lot of time and effort, resulting in high costs for implementing intent recognition solutions.
[0005] In a first aspect, embodiments of this application provide a method for displaying search results, the method comprising:
[0006] Obtain target search keywords, which are obtained based on the user-input search terms and preset word segmentation rules;
[0007] Obtain the target intent word tag corresponding to the target search keyword and the weight value corresponding to the target intent word tag from the correspondence between search keywords and intent word tags;
[0008] Obtain the target item tag corresponding to the target intent word tag and the weight value corresponding to the target item tag from the correspondence between intent word tags and item tags;
[0009] Obtain the target item result corresponding to the target item label from the correspondence between item labels and item results;
[0010] The target item result is scored based on the weight value corresponding to the target intent word tag, the weight value corresponding to the target item tag, and a preset matching algorithm.
[0011] The results of the target item are displayed, sorted from highest to lowest score according to the target item's score.
[0012] In one implementation, displaying the target item results sorted from highest to lowest score includes:
[0013] The search results are obtained by performing a search based on the target search keywords.
[0014] The search results are then scored for text similarity.
[0015] The text similarity score of the search results and the score of the target item results are normalized, and the normalized text similarity score of the search results and the score of the target item results are added together to obtain the target score of the search results.
[0016] The search results are displayed in descending order of the target score.
[0017] In one implementation, before obtaining the target intent word tag corresponding to the target search keyword and the weight value corresponding to the target intent word tag from the correspondence between search keywords and intent word tags, the method further includes:
[0018] Obtain the first search term, which is a search term whose proportion in the user's search log is greater than a preset word frequency threshold;
[0019] Based on the preset association between search keywords and word tags, candidate word tags associated with the first search term are determined, and a first word tag set corresponding to the first search term is obtained;
[0020] Based on the number of times each candidate word tag appears in the first word tag set and the number of candidate word tags in the first word tag set, calculate the first relevance score between the first search term and each candidate word tag;
[0021] The candidate word label corresponding to the first relevance score that is greater than the first preset threshold is determined as the intent word label;
[0022] The correspondence between intent word tags and the first search term is determined as the correspondence between search keywords and intent word tags;
[0023] The first relevance score is determined as the weight value corresponding to the intent word tag.
[0024] In one implementation, the search log includes a set of search results corresponding to a first search term, the set of search results includes a set of items clicked by the user, the set of items includes an identifier for at least one item result, and before determining that the candidate word tag corresponding to the first relevance score greater than a first preset threshold is an intent word tag, the method further includes:
[0025] Based on the number of times the identifier of each item result in the item set appears in the item set, and the number of item results in the item set, a second relevance score between the identifier of the item result and the first search term is calculated;
[0026] Based on the preset correspondence between items and item tags, obtain the item tag set corresponding to the item result identifier, and the weight set, wherein the weight set includes the weight value corresponding to each item tag in the item tag set;
[0027] Based on the preset association between item tags and word tags, candidate word tags corresponding to each item tag in the item tag set are obtained to obtain the second word tag set;
[0028] Based on the frequency of occurrence of candidate word tags in the second word tag set, and the number of candidate word tags in the second word tag set, a third relevance score is calculated between the item tag and the candidate word tag:
[0029] Based on the weight value corresponding to the item tag, the second relevance score, and the third relevance score, a fourth relevance score between the first search term and the candidate term tag is calculated;
[0030] The determination that the candidate word label corresponding to the first relevance score that is greater than the first preset threshold is the intent word label includes:
[0031] The sum of the product of the first relevance score and the first preset weight value and the product of the fourth relevance score and the second preset weight value is determined as the target relevance score;
[0032] Candidate word labels corresponding to the target relevance scores that are greater than a first preset threshold are identified as intent word labels;
[0033] Determining the first relevance score as the weight value corresponding to the intent word tag includes:
[0034] The target relevance score is determined as the weight value corresponding to the intent word tag.
[0035] In one implementation, the step of determining candidate word tags associated with the first search term based on the preset association relationship between search keywords and word tags, and obtaining a first word tag set corresponding to the first search term, includes:
[0036] Get the search results corresponding to the first search term;
[0037] The search results are processed according to preset indexing rules to obtain index terms associated with the first search term in the search results, and the index terms represent the search keywords corresponding to the search results;
[0038] Based on the preset association between search keywords and word tags, candidate word tags associated with the search keywords are determined, and a first set of word tags corresponding to the first search term is obtained.
[0039] Secondly, embodiments of this application provide a search result display device, which includes:
[0040] The acquisition module is used to acquire target search keywords, which are obtained based on the search terms input by the user and preset word segmentation rules.
[0041] The acquisition module is further configured to acquire the target intent word tag corresponding to the target search keyword and the weight value corresponding to the target intent word tag from the correspondence between search keywords and intent word tags;
[0042] The acquisition module is further configured to acquire the target item tag corresponding to the target intent word tag and the weight value corresponding to the target item tag from the correspondence between intent word tags and item tags;
[0043] The acquisition module is also used to acquire the target item result corresponding to the target item label from the correspondence between item labels and item results;
[0044] The scoring module is used to score the target item result based on the weight value corresponding to the target intent word tag, the weight value corresponding to the target item tag, and a preset matching algorithm, so as to obtain the score of the target item result;
[0045] The display module is used to display the target item results sorted from highest to lowest according to their scores.
[0046] In one embodiment, the display device for the search results further includes a retrieval module and a processing module;
[0047] The retrieval module is used to retrieve results based on the target search keywords.
[0048] The scoring module is also used to score the text similarity of the search results;
[0049] The processing module is used to normalize the text similarity score of the search result and the score of the target item result, and add the normalized text similarity score of the search result and the score of the target item result to obtain the target score of the search result.
[0050] The display module is also used to display the search results sorted from largest to smallest according to the target score of the search results.
[0051] In one embodiment, the display device for the search results further includes a determining module and a calculating module;
[0052] The acquisition module is further configured to acquire a first search term before acquiring the target intent word tag corresponding to the target search keyword and the weight value corresponding to the target intent word tag from the correspondence between search keywords and intent word tags. The first search term is a search term whose quantity in the user's search log is greater than a preset word frequency threshold.
[0053] The determination module is used to determine candidate word tags associated with the first search term based on the preset association relationship between search keywords and word tags, and obtain the first word tag set corresponding to the first search term;
[0054] The calculation module is used to calculate the first relevance score between the first search term and each candidate word tag based on the number of times each candidate word tag appears in the first word tag set and the number of candidate word tags in the first word tag set;
[0055] The determining module is also used to determine the candidate word label corresponding to the first relevance score that is greater than the first preset threshold as the intent word label;
[0056] The determining module is further configured to determine the correspondence between the intent word tag and the first search term as the correspondence between the search keyword and the intent word tag;
[0057] The determining module is further configured to determine the first relevance score as the weight value corresponding to the intent word tag.
[0058] In one implementation, the search log includes a set of search results corresponding to a first search term, the set of search results includes a set of items that have been clicked by the user, and the set of items includes an identifier for at least one item result;
[0059] The calculation module is further configured to, before determining the candidate word tag corresponding to the first relevance score that is greater than the first preset threshold as the intent word tag, calculate the second relevance score between the identifier of the item result and the first search term based on the number of times the identifier of each item result in the item set appears in the item set and the number of item results in the item set.
[0060] The acquisition module is also used to acquire a set of item tags corresponding to the identifier of the item result and a weight set based on a preset correspondence between items and item tags. The weight set includes the weight value corresponding to each item tag in the item tag set.
[0061] The acquisition module is also used to acquire candidate word tags corresponding to each item tag in the item tag set based on the preset association relationship between item tags and word tags, and obtain a second word tag set;
[0062] The calculation module is also used to calculate a third relevance score between item tags and candidate word tags based on the number of times candidate word tags appear in the second word tag set and the number of candidate word tags in the second word tag set.
[0063] The calculation module is also used to calculate a fourth relevance score between the first search term and the candidate term tag based on the weight value corresponding to the item tag, the second relevance score, and the third relevance score;
[0064] The determining module is further configured to determine the sum of the product of the first relevance score and the first preset weight value and the product of the fourth relevance score and the second preset weight value as the target relevance score;
[0065] The determination module is also used to determine the candidate word label corresponding to the target relevance score that is greater than the first preset threshold as the intent word label;
[0066] The determination module is also used to determine the target relevance score as the weight value corresponding to the intent word tag.
[0067] In one implementation, the acquisition module is further configured to acquire the search results corresponding to the first search term;
[0068] The processing module is further configured to process the search results according to preset indexing rules to obtain index terms associated with the first search term in the search results, wherein the index terms represent the search keywords corresponding to the search results;
[0069] The determining module is also used to determine candidate word tags associated with the search keywords based on the preset association relationship between search keywords and word tags, so as to obtain the first word tag set corresponding to the first search term.
[0070] Thirdly, embodiments of this application provide an electronic device, which includes: a processor and a memory storing computer program instructions;
[0071] When the processor executes computer program instructions, it implements the method for displaying search results as described in any embodiment of the first aspect.
[0072] Fourthly, embodiments of this application provide a computer storage medium storing computer program instructions, which, when executed by a processor, implement the search result display method as described in any embodiment of the first aspect.
[0073] Fifthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform a search result display method as described in any embodiment of the first aspect.
[0074] The search result display method, apparatus, device, storage medium, and program product of this application embodiment obtains target search keywords, which are obtained based on user-input search terms and preset word segmentation rules. Then, it obtains target intent word tags corresponding to the target search keywords and their corresponding weight values from the correspondence between search keywords and intent word tags, thus associating intent tags with the user's actual search behavior. Next, it obtains target item tags corresponding to the target intent word tags and their corresponding weight values from the correspondence between intent word tags and item tags, and obtains target item results corresponding to the target item tags from the correspondence between item tags and item results. Finally, it scores the target item results based on the weight values corresponding to the target intent word tags, the weight values corresponding to the target item tags, and a preset matching algorithm, obtaining a score for the target item results, and then displays the target item results sorted from highest to lowest score. This achieves an intent-based retrieval effect that combines user search input with user behavior. Attached Figure Description
[0075] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0076] Figure 1 This is a flowchart illustrating a method for displaying search results according to an embodiment of this application;
[0077] Figure 2 This is a schematic diagram of a user keyword search process provided in one embodiment of this application;
[0078] Figure 3 This is a flowchart illustrating a classification based on user click behavior provided in one embodiment of this application;
[0079] Figure 4 This is a schematic diagram of the structure of a search result display device provided in one embodiment of this application;
[0080] Figure 5 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation
[0081] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0082] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0083] As described in the background section, the construction of mature syntax trees in existing technologies is relatively complex and requires significant investment from developers, resulting in high costs for implementing intent recognition solutions. To address these issues, embodiments of this application provide a method, apparatus, device, storage medium, and program product for displaying search results. The method for displaying search results involves obtaining target search keywords, which are derived from user-input search terms and processed using preset word segmentation rules. Target intent word tags corresponding to the target search keywords and their corresponding weight values are obtained from the correspondence between search keywords and intent word tags. This associates the intent tags with the user's actual search behavior. Next, target item tags corresponding to the target intent word tags and their corresponding weight values are obtained from the correspondence between intent word tags and item tags. Target item results corresponding to the target item tags are also obtained from the correspondence between item tags and item results. Furthermore, the target item results are scored based on the weight values of the target intent word tags, the target item tags, and a preset matching algorithm to obtain a score for the target item results. Finally, the target item results are displayed, sorted by their scores from highest to lowest. This achieves intent-based retrieval by combining user search input with user behavior. The following section first describes the method for displaying search results provided in the embodiments of this application.
[0084] Figure 1 A flowchart illustrating a method for displaying search results according to an embodiment of this application is shown.
[0085] like Figure 1 As shown, the method for displaying the search results may specifically include the following steps:
[0086] S101, Obtain the target search keywords. The target search keywords can be obtained based on the user's input search terms and preset word segmentation rules.
[0087] Users input search terms to perform a search, and preset word segmentation rules process the search terms to obtain the target search keywords. The preset word segmentation rules can be word segmentation rules set by the user in advance.
[0088] As an example, after receiving the user's search term, the search term is segmented based on preset word segmentation rules, such as obtaining the keyword "sneakers".
[0089] S102, obtain the target intent word tag corresponding to the target search keyword and the weight value corresponding to the target intent word tag from the correspondence between search keywords and intent word tags.
[0090] The relationship between intent tags and search keywords can be many-to-many. Target intent tags can be tags stored in the database that correspond to the target search keywords. The weight value corresponding to the target intent tag can be the relevance score of the target intent tag, that is, the relevance score between the target search keyword and the target intent tag, which can be pre-calculated by the user and stored in the database.
[0091] S103, obtain the target item tag corresponding to the target intent word tag and the weight value corresponding to the target item tag from the correspondence between intent word tags and item tags.
[0092] The correspondence (relationship) between intent word tags and item tags can be obtained from a knowledge graph, which can include search keywords, word tags, item tags, item results, as well as the relationship between search keywords and word tags, the relationship between word tags and item tags, and the relationship between item tags and item results.
[0093] The weight values corresponding to the target item tags can be pre-stored in the knowledge graph.
[0094] S104. Obtain the target item result corresponding to the target item label from the correspondence between item labels and item results.
[0095] The correspondence (association) between item tags and item results can be obtained from a knowledge graph, and the target item result can be the item result in the knowledge graph that corresponds to the target item tag.
[0096] S105, score the target item result based on the weight value corresponding to the target intent word tag, the weight value corresponding to the target item tag, and the preset matching algorithm to obtain the score of the target item result.
[0097] The preset matching algorithm can be an algorithm that scores based on the weight value of the intent word tag and the corresponding weight value of the item tag, such as a tag matching algorithm.
[0098] As an example, the intent word tags and weight values corresponding to the keyword "sneakers" are obtained from the database. For example, intent word tags can include sports, athletics, ball games, and footwear, with corresponding weight values of 0.1, 0.1, 0.3, and 0.5. Then, based on the intent word tags, the corresponding item results are retrieved from the knowledge graph. Specifically, this is done through the correspondence between intent word tags and item tags, and between item tags and item results. For example, sports and athletics correspond to sportswear and athletic shoes, ball games correspond to football and basketball, and footwear corresponds to football shoes and basketball shoes. The weight values corresponding to each item tag are then obtained. Finally, a matching score is performed based on the intent word tag weight values and item tag weight values. For example, the score can be the product of the intent word tag weight value and the item tag weight value, or a score can be based on a preset matching algorithm.
[0099] S106 displays the target item results sorted from highest to lowest score.
[0100] After sorting the target item results by rating from highest to lowest, the sorted target item results are displayed to present the results to the user and complete the search process.
[0101] In this embodiment, the target search keywords are obtained by processing user-input search terms and preset word segmentation rules. The target intent word tags and their corresponding weight values are then obtained from the correspondence between search keywords and intent word tags, thus associating the intent tags with the user's actual search behavior. Next, the target item tags and their corresponding weight values are obtained from the correspondence between intent word tags and item tags. Finally, the target item results corresponding to the target item tags are obtained from the correspondence between item tags and item results. The target item results are then scored based on the weight values of the target intent word tags, the target item tags, and a preset matching algorithm, resulting in a score. The target item results are then displayed, sorted by score from highest to lowest. This achieves an intent-based retrieval effect that combines user search input with user behavior.
[0102] In some embodiments, S106 may specifically include:
[0103] Search results are obtained by performing a search based on the target search keywords;
[0104] The search results are scored based on text similarity.
[0105] The text similarity scores of the search results and the scores of the target item results are normalized, and the normalized text similarity scores of the search results and the scores of the target item results are added together to obtain the target score of the search results.
[0106] The search results are displayed in descending order of the target score.
[0107] When a user enters a search term, the term is first segmented and then searched by the search engine. The search results are then scored based on text similarity (relevance). For example, the search results for the term "sneakers" include "sports shoes," "football shoes," and "basketball shoes," with text similarity scores of 0.3, 0.7, and 0.7, respectively. The text similarity scores of the search results are normalized and then added together with the scores of the target item results to obtain the final target score.
[0108] As an example, such as Figure 2 As shown, after a user's keyword search process begins, firstly, the user enters keywords into the search engine, and the search engine calculates the text similarity score of the search results corresponding to the keywords. Next, based on the word tags corresponding to the keywords, the search engine retrieves the corresponding items and their scores from the knowledge graph. The two scores are normalized and then added together to obtain the final score. The results are then sorted according to the scores and presented to the user.
[0109] In this embodiment, a search is performed based on target search keywords to obtain search results, and the search results are then scored for text similarity. Next, the text similarity scores of the search results and the scores of the target item results are normalized, and the normalized text similarity scores of the search results are added to the scores of the target item results to obtain the target score of the search results. The search results are then displayed, sorted from highest to lowest according to the target score. This approach combines traditional text retrieval with intent recognition (user click behavior), improving the accuracy of search results.
[0110] In some embodiments, prior to S102, the method for displaying the search results may further include S107 to S112:
[0111] S107, Obtain the first search term. The first search term can be a search term whose frequency in the user's search log is greater than a preset word frequency threshold.
[0112] A user's search log can include records of their historical search behavior. By collecting user search behavior logs and using the search term tracking field, the search terms are statistically analyzed to identify the first search term in the user's search log that has a higher percentage than a preset term frequency threshold. This preset term frequency threshold can be a threshold set by the user in advance. In this way, search terms with a large percentage can be filtered out, and the intent of search terms with high search frequency can be classified, avoiding the full intent classification of useless search terms.
[0113] S108: Based on the preset association between search keywords and word tags, determine the candidate word tags associated with the first search term, and obtain the first word tag set corresponding to the first search term.
[0114] S109, based on the number of times each candidate word tag appears in the first word tag set and the number of candidate word tags in the first word tag set, calculate the first relevance score between the first search term and each candidate word tag.
[0115] S110, determine the candidate word label corresponding to the first relevance score that is greater than the first preset threshold as the intent word label.
[0116] S111, determine the correspondence between intent word tags and the first search term as the correspondence between search keywords and intent word tags.
[0117] S112, determine the first relevance score as the weight value corresponding to the intent word label.
[0118] The pre-defined association between search keywords and word tags refers to the pre-defined correspondence in the knowledge graph mentioned in S103. The first word tag set may include multiple candidate word tags associated with the first search term. These candidate word tags can be word tags in the knowledge graph that correspond to the first search term. The first relevance score between the first search term and each candidate word tag is calculated based on the number of times each candidate word tag appears in the first word tag set and the total number of candidate word tags.
[0119] For example, the first search term is search term A, and the first term tag set of search term A is {k1,k2,k3,…,k n The first relevance score between search term A and the term tag is calculated using the following formula:
[0120] Score1(k n |A)=N(k n ) / N k
[0121] Wherein, N(k) n ) for label k n The number of times N appears in the candidate word labels k This represents the sum of candidate term labels corresponding to search term A.
[0122] Candidate word tags with a first relevance score greater than a first preset threshold are identified as intent word tags. Word tags with a first relevance score less than or equal to the first preset threshold are removed. The first preset threshold can be any threshold pre-set by the user. The correspondence between intent word tags and first search terms is determined as the correspondence between search keywords and intent word tags. The first relevance score is determined as the weight value corresponding to the intent word tag. This correspondence and weight value are then entered into the database to prepare for the search process.
[0123] In this embodiment, a first search term is obtained, and candidate word tags associated with the first search term are determined based on the preset association between search keywords and word tags, resulting in a first word tag set corresponding to the first search term. Next, based on the frequency of each candidate word tag in the first word tag set and the total number of candidate word tags in the first word tag set, a first relevance score is calculated between the first search term and each candidate word tag. Candidate word tags with first relevance scores greater than a first preset threshold are identified as intent word tags. The correspondence between intent word tags and the first search term is determined to be the correspondence between search keywords and intent word tags, and the first relevance score is determined to be the weight value corresponding to the intent word tag. This allows the correspondence between intent word tags and the first search term, as well as their weight values, to be entered into the database, facilitating keyword searches for users.
[0124] In some embodiments, the search log may include a set of search results corresponding to the first search term, the set of search results may include a set of items clicked by the user, and the set of items may include an identifier for at least one item result; before S110: determining that the candidate word label corresponding to the first relevance score greater than the first preset threshold is an intent word label, the method for displaying the search results may further include S113 to S117:
[0125] S113, Calculate the second relevance score between the identifier of each item result and the first search term based on the number of times the identifier of each item result appears in the item set and the number of item results in the item set.
[0126] The identifier of an item result can be a unique symbol such as letters or numbers. The second relevance score between the identifier of an item result and the first search term is calculated by the number of times the identifier of the item result appears in the item set and the number of item results.
[0127] For example, the first search term is search term A. The search results set corresponding to search term A is calculated based on the user's search logs. The search results set includes the set of all item results clicked by the user {r1, r2, r3, ..., r...} n And calculate the second relevance score between the item results and search term A:
[0128] Score r (r n |A)=N(r n ) / N r
[0129] N(r n ) represents the result r of the item n The number of times N appears in the clicked item set. r This represents the sum of the clicked item results corresponding to search term A.
[0130] S114. Based on the preset correspondence between items and item tags, obtain the set of item tags corresponding to the identifier of the item result, and the weight set. The weight set may include the weight value corresponding to each item tag in the item tag set.
[0131] Based on the item result's identifier, the corresponding item tag is retrieved from the knowledge graph. Since the knowledge graph stores weight values between item results and their corresponding item tags, representing the relevance between them, for example, the set of item tags {t1, t2, t3, ..., t...} corresponding to the item results is retrieved. n} and its corresponding weight set {ω1,ω2,ω3,…,ω n}
[0132] S115, based on the preset association between item tags and word tags, obtain the candidate word tags corresponding to each item tag in the item tag set, and obtain the second word tag set.
[0133] The pre-defined relationships between item tags and word tags are stored in a knowledge graph. Candidate word tags corresponding to each item tag in the item tag set are obtained through the knowledge graph.
[0134] S116. Calculate the third relevance score between the item tag and the candidate word tag based on the number of times the candidate word tag appears in the second word tag set and the number of candidate word tags in the second word tag set.
[0135] For example, based on the set of second word tags corresponding to the item tags {k1,k2,k3,…,k n The third relevance score between item tags and candidate word tags is calculated using the following formula:
[0136] Score k (k n |t n )=N(k n ) / N k
[0137] N(k n ) represents the candidate word label k n The number of times N appears in the second word tag set k For item label t n The sum of the corresponding candidate word tags.
[0138] S117. Based on the weight value corresponding to the item tag, the second relevance score, and the third relevance score, calculate the fourth relevance score between the first search term and the candidate term tag.
[0139] The fourth relevance score can be the product of the weight value corresponding to the item tag, the second relevance score, and the third relevance score. Furthermore, since the relationship between item results and item tags can be many-to-many, and the relationship between item tags and word tags can also be many-to-many, the fourth relevance score between the first search term and candidate word tags can be the sum of the relevance scores calculated across multiple paths.
[0140] As an example, such as Figure 3 As shown, Figure 3 For the classification results of search term A based on user click behavior, search term A and candidate term label k n The corresponding relevance is the product of the relevance of each matching element, and finally, for all final results labeled k... n Summing the paths:
[0141] Score2(k n |A)=∑Score r (r n |A)*ω n *Score k (k n |t n )
[0142] For the term tag k2 of search term A, there are two paths that link search term A to term tag k2, so we can calculate them separately and then add them together:
[0143] First, calculate the relevance score between search term A and result r1:
[0144]
[0145] After querying the knowledge graph, the weights of item result r1 and item tag t2 are:
[0146] ω=0.5
[0147] The relevance between item tag t2 and word tag k2 is calculated as follows:
[0148]
[0149] The relevance score between the search term A on route r1 and the term tag k2 can be calculated as follows:
[0150] Score r (r1|A)*ω*Score k (k2|t2)=0.33*0.5*0.5=0.0825
[0151] Using the same method, the relevance score between the search term A and the term tag k2 in the r2 route can be obtained as follows:
[0152] Score r (r2|A)*ω*Score k (k2|t3)=0.33*1*1=0.33
[0153] The relevance score between the final search term A and the term tag k2 can be calculated as follows:
[0154] Score2(k1|A)=0.0825+0.33=0.4125
[0155] S110 may specifically include:
[0156] The target relevance score is determined by summing the product of the first relevance score and the first preset weight value and the product of the fourth relevance score and the second preset weight value.
[0157] Candidate word labels corresponding to target relevance scores greater than a first preset threshold are identified as intent word labels;
[0158] The first preset weight value can be a user-defined weight value based on the correlation between keywords, meaning the first preset weight value corresponds to the first relevance score. The second preset weight value can be a weight based on user click behavior, meaning the second preset weight value corresponds to the fourth relevance score. The product of the first relevance score and the first preset weight value, and the product of the fourth relevance score and the second preset weight value are calculated, and the sum of these two products is determined as the target relevance score.
[0159] In addition, the setting of the first preset weight value and the second preset weight value is a process of continuous optimization, which helps to improve the accuracy of intent classification.
[0160] As an example, the final relevance score between search term A and candidate term tags is calculated as follows: The search term similarity and tag frequency algorithms are pre-set with weights α = 0.5, and the user behavior relevance algorithm is pre-set with weights β = 0.5. Each algorithm is then multiplied by its corresponding weight and summed to obtain the final target relevance score.
[0161] Score(k n |A)=α*Score1(k n |A)+β*Score2(k n |A)
[0162] S111 may specifically include:
[0163] The target relevance score is determined as the weight value corresponding to the intent word label.
[0164] In this embodiment, a second relevance score is calculated between the identifier of an item result and the first search term based on the frequency of occurrence of the identifier of each item result in the item set and the quantity of item results in the item set. Next, based on a preset correspondence between items and item tags, a set of item tags and a set of weights corresponding to the identifier of the item result are obtained. Based on a preset association between item tags and word tags, candidate word tags corresponding to each item tag in the item tag set are obtained, resulting in a second set of word tags. Based on the frequency of occurrence of candidate word tags in the second set of word tags and the quantity of candidate word tags in the second set of word tags, a third relevance score is calculated between item tags and candidate word tags. Finally, based on the weight value corresponding to the item tag, the second relevance score, and the third relevance score, a fourth relevance score is calculated between the first search term and the candidate word tags. In this way, intent word tags can be determined based on a combination of the classification of associations between keywords and the classification based on user click behavior, achieving an intent recognition retrieval effect that combines user search input and user behavior.
[0165] In some embodiments, S108: Based on the preset association relationship between search keywords and word tags, candidate word tags associated with the first search term are determined to obtain the first word tag set corresponding to the first search term, which may specifically include:
[0166] Get the search results corresponding to the first search term;
[0167] The search results are processed according to the preset indexing rules to obtain the index terms associated with the first search term in the search results. The index terms represent the search keywords corresponding to the search results.
[0168] Based on the preset association between search keywords and word tags, candidate word tags associated with the search keywords are determined, and the first word tag set corresponding to the first search term is obtained.
[0169] Processing search results according to preset indexing rules can specifically involve processing the search results based on an index library. This involves reverse-engineering each index field corresponding to the search result for the first search term to retrieve all related index terms. The index library can be a collection of all item results (search results) and text content. Furthermore, the index library is updated periodically at a preset frequency to avoid errors in intent classification due to missing user click results.
[0170] As an example, let's classify based on the relationships between keywords: To categorize search term A, first, query and count all search results for search term A. Then, obtain the index terms of the search results according to the indexing rules (i.e., word segmentation rules), remove duplicate index terms, use the index terms as search keywords, and obtain and count multiple word tags associated with the index terms based on the relationship between search keywords and word tags in the knowledge graph.
[0171] In this embodiment, by obtaining the search results corresponding to the first search term and processing the search results according to preset indexing rules, index terms associated with the first search term are obtained from the search results. These index terms represent the search keywords corresponding to the search results. Next, based on the preset association between search keywords and word tags, candidate word tags associated with the search keywords are determined, resulting in a first word tag set corresponding to the first search term. In this way, by statistically analyzing the word tags associated with the index terms, the accuracy of determining candidate word tags associated with the search keywords can be improved.
[0172] Figure 4 This is a schematic diagram of the structure of a search result display device 400 according to an exemplary embodiment.
[0173] like Figure 4 As shown, the display device 400 for the search results may include:
[0174] The acquisition module 401 is used to acquire the target search keywords, which are obtained based on the user-input search terms and preset word segmentation rules.
[0175] The acquisition module 401 is also used to obtain the target intent word tag corresponding to the target search keyword and the weight value corresponding to the target intent word tag from the correspondence between search keywords and intent word tags;
[0176] The acquisition module 401 is also used to obtain the target item tag corresponding to the target intent word tag and the weight value corresponding to the target item tag from the correspondence between intent word tags and item tags;
[0177] The acquisition module 401 is also used to obtain the target item result corresponding to the target item label from the correspondence between item labels and item results;
[0178] The scoring module 402 is used to score the target item results based on the weight values corresponding to the target intent word tags, the weight values corresponding to the target item tags, and a preset matching algorithm, so as to obtain the score of the target item results;
[0179] Display module 403 is used to display the target item results sorted from highest to lowest score.
[0180] In one embodiment, the search result display device 400 further includes a retrieval module and a processing module;
[0181] The search module is used to retrieve search results based on target search keywords;
[0182] The scoring module 402 is also used to score the text similarity of the search results;
[0183] The processing module is used to normalize the text similarity score of the search results and the score of the target item results, and add the normalized text similarity score of the search results to the score of the target item results to obtain the target score of the search results.
[0184] Display module 403 is also used to display the search results sorted from largest to smallest according to the target score of the search results.
[0185] In one embodiment, the display device 400 for the search results further includes a determining module and a calculating module;
[0186] The acquisition module 401 is also used to acquire the first search term before acquiring the target intent word tag corresponding to the target search keyword and the weight value corresponding to the target intent word tag from the correspondence between search keywords and intent word tags. The first search term is the search term whose quantity in the user's search log is greater than a preset word frequency threshold.
[0187] The determination module is used to determine candidate word tags associated with the first search term based on the preset association relationship between search keywords and word tags, and obtain the first word tag set corresponding to the first search term;
[0188] The calculation module is used to calculate the first relevance score between the first search term and each candidate word tag based on the number of times each candidate word tag appears in the first word tag set and the number of candidate word tags in the first word tag set;
[0189] The determination module is also used to determine the candidate word label corresponding to the first relevance score that is greater than the first preset threshold as the intent word label;
[0190] The determination module is also used to determine the correspondence between intent word tags and the first search term as the correspondence between search keywords and intent word tags;
[0191] The determination module is also used to determine the weight value corresponding to the intent word label as the first relevance score.
[0192] In one implementation, the search log includes a set of search results corresponding to the first search term, the set of search results includes a set of items that have been clicked by the user, and the set of items includes an identifier for at least one item result;
[0193] The calculation module is also used to calculate the second relevance score between the identifier of the item result and the first search term before determining the candidate word label corresponding to the first relevance score that is greater than the first preset threshold as the intent word label. This is based on the number of times the identifier of each item result in the item set appears in the item set and the number of item results in the item set.
[0194] The acquisition module is also used to acquire the set of item tags corresponding to the identifier of the item result and the weight set based on the preset correspondence between items and item tags. The weight set includes the weight value corresponding to each item tag in the item tag set.
[0195] The acquisition module 401 is also used to acquire candidate word tags corresponding to each item tag in the item tag set based on the preset association relationship between item tags and word tags, so as to obtain a second word tag set;
[0196] The calculation module is also used to calculate a third relevance score between item tags and candidate word tags based on the number of times candidate word tags appear in the second word tag set and the number of candidate word tags in the second word tag set.
[0197] The calculation module is also used to calculate the fourth relevance score between the first search term and the candidate term tag based on the weight value corresponding to the item tag, the second relevance score, and the third relevance score;
[0198] The determination module is also used to determine the sum of the product of the first relevance score and the first preset weight value and the product of the fourth relevance score and the second preset weight value as the target relevance score;
[0199] The determination module is also used to determine the candidate word labels corresponding to the target relevance scores that are greater than the first preset threshold as intent word labels;
[0200] The determination module is also used to determine the target relevance score as the weight value corresponding to the intent word label.
[0201] In one implementation, the acquisition module is further configured to acquire the search results corresponding to the first search term;
[0202] The processing module is also used to process the search results according to the preset indexing rules to obtain the index terms associated with the first search term in the search results. The index terms represent the search keywords corresponding to the search results.
[0203] The determination module is also used to determine candidate word tags associated with the search keywords based on the preset association between search keywords and word tags, so as to obtain the first word tag set corresponding to the first search term.
[0204] Therefore, by acquiring the target search keywords (obtained from user-input search terms and processed using preset word segmentation rules), and retrieving the target intent word tags and their corresponding weight values from the mapping between search keywords and intent word tags, the intent tags can be associated with the user's actual search behavior. Next, the target item tags and their corresponding weight values are retrieved from the mapping between intent word tags and item tags, and the target item results corresponding to the target item tags are retrieved from the mapping between item tags and item results. Then, the target item results are scored based on the weight values of the target intent word tags, the target item tags, and a preset matching algorithm, resulting in a score for each item. The results are then displayed in descending order of their scores. This achieves an intent-based retrieval effect that combines user search input with user behavior.
[0205] Figure 5 A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.
[0206] An electronic device may include a processor 501 and a memory 502 storing computer program instructions.
[0207] Specifically, the processor 501 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0208] Memory 502 may include mass storage for data or instructions. For example, and not limitingly, memory 502 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 502 may include removable or non-removable (or fixed) media. Where appropriate, memory 502 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 502 is non-volatile solid-state memory.
[0209] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to one aspect of this disclosure.
[0210] The processor 501 reads and executes computer program instructions stored in the memory 502 to implement any of the search result display methods in the above embodiments.
[0211] In one example, the electronic device may also include a communication interface 503 and a bus 510. Wherein, as... Figure 5 As shown, the processor 501, memory 502, and communication interface 503 are connected through bus 510 and complete communication with each other.
[0212] The communication interface 503 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0213] Bus 510 includes hardware, software, or both, that couples components of a display device for search results together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 510 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0214] This electronic device can obtain target search keywords, which are processed based on user-input search terms and preset word segmentation rules, and execute the search result display method in this embodiment of the application, thereby achieving a combination of... Figure 1 The description describes how the search results are displayed.
[0215] Furthermore, in conjunction with the search result display methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the search result display methods in the above embodiments.
[0216] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0217] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0218] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0219] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable search result display device to create a machine such that these instructions, executed via the processor of the computer or other programmable search result display device, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0220] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A method for displaying search results, characterized in that, The method includes: Obtain target search keywords, which are obtained based on the user-input search terms and preset word segmentation rules; Obtain the target intent word tag corresponding to the target search keyword and the weight value corresponding to the target intent word tag from the correspondence between search keywords and intent word tags; Obtain the target item tag corresponding to the target intent word tag and the weight value corresponding to the target item tag from the correspondence between intent word tags and item tags; Obtain the target item result corresponding to the target item label from the correspondence between item labels and item results; The target item results are scored according to a preset matching algorithm to obtain a score for the target item results; wherein, the preset matching algorithm is an algorithm that scores based on the weight value corresponding to the target intent word tag and the corresponding weight value of the target item tag; The results of the target item are displayed, sorted from highest to lowest score according to the target item's score.
2. The method according to claim 1, characterized in that, The display of target item results, sorted from highest to lowest score according to the target item results, includes: The search results are obtained by performing a search based on the target search keywords. The search results are then scored for text similarity. The text similarity score of the search results and the score of the target item results are normalized, and the normalized text similarity score of the search results and the score of the target item results are added together to obtain the target score of the search results. The search results are displayed in descending order of the target score.
3. The method according to claim 1, characterized in that, Before obtaining the target intent word tag corresponding to the target search keyword and the weight value corresponding to the target intent word tag from the correspondence between search keywords and intent word tags, the method further includes: Obtain the first search term, which is a search term whose proportion in the user's search log is greater than a preset word frequency threshold; Based on the preset association between search keywords and word tags, candidate word tags associated with the first search term are determined, and a first word tag set corresponding to the first search term is obtained; Based on the number of times each candidate word tag appears in the first word tag set and the number of candidate word tags in the first word tag set, calculate the first relevance score between the first search term and each candidate word tag; The candidate word label corresponding to the first relevance score that is greater than the first preset threshold is determined as the intent word label; The correspondence between intent word tags and the first search term is determined as the correspondence between search keywords and intent word tags; The first relevance score is determined as the weight value corresponding to the intent word tag.
4. The method according to claim 3, characterized in that, The search log includes a set of search results corresponding to the first search term, the set of search results includes a set of items clicked by the user, and the set of items includes an identifier for at least one item result. Before determining that the candidate word tag corresponding to the first relevance score greater than a first preset threshold is an intent word tag, the method further includes: Based on the number of times the identifier of each item result in the item set appears in the item set, and the number of item results in the item set, a second relevance score between the identifier of the item result and the first search term is calculated; Based on the preset correspondence between items and item tags, obtain the item tag set corresponding to the item result identifier, and the weight set, wherein the weight set includes the weight value corresponding to each item tag in the item tag set; Based on the preset association between item tags and word tags, candidate word tags corresponding to each item tag in the item tag set are obtained to obtain the second word tag set; The third relevance score between the item tag and the candidate word tag is calculated based on the number of times the candidate word tag appears in the second word tag set and the number of candidate word tags in the second word tag set. Based on the weight value corresponding to the item tag, the second relevance score, and the third relevance score, a fourth relevance score between the first search term and the candidate term tag is calculated; The determination that the candidate word label corresponding to the first relevance score that is greater than the first preset threshold is the intent word label includes: The sum of the product of the first relevance score and the first preset weight value and the product of the fourth relevance score and the second preset weight value is determined as the target relevance score; Candidate word labels corresponding to the target relevance scores that are greater than a first preset threshold are identified as intent word labels; Determining the first relevance score as the weight value corresponding to the intent word tag includes: The target relevance score is determined as the weight value corresponding to the intent word tag.
5. The method according to claim 3, characterized in that, The method involves determining candidate word tags associated with the first search term based on the preset association relationship between search keywords and word tags, thereby obtaining a first set of word tags corresponding to the first search term, including: Get the search results corresponding to the first search term; The search results are processed according to preset indexing rules to obtain index terms associated with the first search term in the search results, and the index terms represent the search keywords corresponding to the search results; Based on the preset association between search keywords and word tags, candidate word tags associated with the search keywords are determined, and a first set of word tags corresponding to the first search term is obtained.
6. A search result display device, characterized in that, The device includes: The acquisition module is used to acquire target search keywords, which are obtained based on the search terms input by the user and preset word segmentation rules. The acquisition module is further configured to acquire the target intent word tag corresponding to the target search keyword and the weight value corresponding to the target intent word tag from the correspondence between search keywords and intent word tags; The acquisition module is further configured to acquire the target item tag corresponding to the target intent word tag and the weight value corresponding to the target item tag from the correspondence between intent word tags and item tags; The acquisition module is also used to acquire the target item result corresponding to the target item label from the correspondence between item labels and item results; The scoring module is used to score the target item results according to a preset matching algorithm to obtain a score for the target item results; wherein, the preset matching algorithm is an algorithm that scores based on the weight value corresponding to the target intent word tag and the corresponding weight value of the target item tag; The display module is used to display the target item results sorted from largest to smallest according to the score of the target item results.
7. The apparatus according to claim 6, characterized in that, The display device for the search results also includes a retrieval module and a processing module; The retrieval module is used to retrieve results based on the target search keywords. The scoring module is also used to score the text similarity of the search results; The processing module is used to normalize the text similarity score of the search result and the score of the target item result, and add the normalized text similarity score of the search result and the score of the target item result to obtain the target score of the search result. The display module is also used to display the search results sorted from largest to smallest according to the target score of the search results.
8. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the method for displaying search results as described in any one of claims 1-5.
9. A computer storage medium, characterized in that, The computer storage medium stores computer program instructions, which, when executed by a processor, implement the search result display method as described in any one of claims 1-5.
10. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device causes the electronic device to perform the method for displaying search results as described in any one of claims 1-5.
Citation Information
Patent Citations
Search method and device, computer equipment and storage medium
CN110765275A
Commodity search method and device, electronic equipment and storage medium
CN115114506A