Method, device, equipment and medium for generating rewritten words of point of interest query words
By analyzing users' historical search click logs and calculating the similarity between query terms, rewritten terms are generated, which solves the problem of inaccurate retrieval caused by the difference between query terms and point of interest names, achieving high recall and high precision search results and reducing the number of secondary searches for users.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NAVINFO
- Filing Date
- 2023-04-21
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, the query terms entered by users differ significantly from the names of points of interest stored in the search system's database, making it impossible to accurately retrieve the points of interest that users want. Users need to perform multiple searches to obtain the correct results.
By analyzing users' historical search click logs, the similarity between query terms is calculated. Based on the number of common interest pairs and the number of query terms, more appropriate rewritten terms are generated to improve the accuracy of retrieval.
The generated rewritten terms can significantly improve the recall and precision of retrieval, reduce the number of secondary searches by users, and provide search results that better meet user needs.
Smart Images

Figure CN116467508B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of map retrieval technology, and in particular to a method, apparatus, device, and medium for generating rewritten terms for point-of-interest (POI) query terms. Background Technology
[0002] A Point of Interest (POI) is a term in Geographic Information Systems (GIS) that broadly refers to any geographic object that can be abstracted as a point. A POI can be a tourist attraction, a shopping mall, a parking lot, a school, etc. When users search for POIs using map or navigation search systems, they need to enter query terms for the search system to perform a search and return results. Due to various reasons, the query terms entered by the user may differ significantly from the POI names stored in the search system's database, resulting in the inability to retrieve the desired POI. To address this, the search system includes a query term rewriting module. This module rewrites the user's entered query terms, generating rewritten terms. These rewritten terms are then used to search the database to return the desired POI, reducing the number of times users need to re-enter their query terms for a second search. For example, a user might search for "China Jiliang Institute," but "China Jiliang Institute" has been renamed "China Jiliang University," and the database might store related POI names such as "China Jiliang University" and "China Jiliang University - East Gate." If the rewritten query term "China Jiliang University" is generated at this point, and a search is performed based on "China Jiliang University," the probability of finding relevant points of interest about "China Jiliang University" that the user actually wants is much higher. The appropriateness of the rewritten query term plays a crucial role in accurately retrieving and returning the user's desired points of interest.
[0003] Therefore, how to generate more appropriate rewritten terms so that search results based on rewritten terms are more accurate has become an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0004] To address the aforementioned technical problems, embodiments of this specification provide a method, apparatus, device, and medium for generating rewritten terms for point-of-interest (POI) queries. This method can generate more appropriate rewritten terms, enabling more accurate retrieval of user-desired POIs when searching a database based on these rewritten terms. This allows the search system to provide search results that better match the user's needs, reducing the number of secondary searches required.
[0005] This specification provides an embodiment of a method for generating rewritten terms for point-of-interest (POI) queries, comprising:
[0006] Obtain search click logs that record historical search click information; the historical search click information specifically includes query terms and points of interest selected by the user after entering the query terms.
[0007] Based on the historical search click information, the similarity between all two query terms that meet the first condition is calculated. The similarity between the two query terms is calculated based on the number of interest point pairs that the two query terms share, the number of query terms that each interest point in each interest point pair corresponds to, and the number of query terms that the interest points in each interest point pair share. The first condition is that the two query terms share at least one interest point pair. The interest point pair includes two interest points, and each of the two interest points corresponds to each of the two query terms.
[0008] One of the two query terms with a similarity of not less than a first threshold is identified as a rewritten word of the other query term.
[0009] This specification provides an embodiment of a computer device, comprising:
[0010] The first acquisition module is used to acquire search click logs that record historical search click information; the historical search click information specifically includes query terms and interest information selected by the user after entering the query terms.
[0011] The first calculation module is used to calculate the similarity between all two query terms that meet the first condition based on the historical search click information. The similarity between the two query terms is calculated based on the number of interest point pairs that the two query terms commonly correspond to, the number of query terms that each interest point in each interest point pair corresponds to, and the number of query terms that the interest points in each interest point pair commonly correspond to. The first condition is that the two query terms commonly correspond to at least one interest point pair. The interest point pair includes two interest points, and each of the two interest points has a corresponding relationship with each of the two query terms.
[0012] The first determining module is used to determine one of the two query terms with a similarity of not less than a first threshold as a rewritten word of the other query term.
[0013] This specification provides an embodiment of a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described above.
[0014] This specification provides an embodiment of a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the method described above.
[0015] The at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects: Historical search click information is extracted from the user's search click logs; the correspondence between query terms and points of interest is determined based on this information; and the similarity between the two query terms is calculated using the relevant parameters of the points of interest pairs that correspond to both query terms. The rewritten terms are then determined based on the similarity. This fully utilizes the relationship between query terms and user click behavior to construct a more stable relationship between query terms. In existing technologies, query terms are rewritten based on certain matching rules such as semantic similarity to generate rewritten terms. The rewritten terms generated in existing technologies have a one-sided structural relationship with the query terms, considering only the relationship between the query terms and the rewritten terms, without considering the relationship between the query terms and the finally selected points of interest. This method comprehensively considers the relationship between query terms and the finally selected points of interest to establish the rewriting relationship between query terms. The generated rewritten terms are more appropriate and reasonable. Retrieval based on the rewritten terms generated by this method can return search results with high recall and high precision, reducing the number of secondary searches by the user. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating a method for generating rewritten terms for point-of-interest (POI) query terms, as provided in an embodiment of this specification.
[0018] Figure 2 This is a schematic diagram illustrating the correspondence between query terms and points of interest, provided as an embodiment of this specification.
[0019] Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of this specification;
[0020] Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of this specification. Detailed Implementation
[0021] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0022] The embodiments described below are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
[0023] To address the shortcomings of existing technologies, this solution provides the following embodiments:
[0024] Figure 1 This is a flowchart illustrating a method for generating rewritten terms for point-of-interest (POI) query terms, as provided in an embodiment of this specification.
[0025] From a hardware perspective, the entity executing this process can be a device or server; from a program perspective, it can be an application running on that device or server. For example... Figure 1 As shown, the process may include the following steps:
[0026] Step 101: Obtain the search click log containing historical search click information; the historical search click information specifically includes the query terms and the points of interest selected by the user after entering the query terms.
[0027] When users search for points of interest (POIs) using map or navigation search systems, they enter query terms. The first query term entered is called the first query term. The search system searches based on the first query term and returns search results or a list of search results to the user. Taking the search results list as an example, the first list of returned search results is called the first search results list. If the user finds a POI in the first search results list, they will click on it, indicating that they have selected the POI. This allows the search system to display map information for the POI or provide a planned route to it. If the user does not find the POI in the first search results list, they will modify their first query term to form a second query term, or re-enter the second query term for a second search. If the user finds the POI in the second search results list, they will click on it. It's important to note that in the case of a second search, the POI selected after entering both the first and second query terms. This POI corresponds to both the first and second query terms. It should be noted that when a user makes three or more queries, the user's final selected point of interest corresponds to each of the entered query terms.
[0028] For example, some users might enter "Peking University" as a search term and ultimately select "Peking University - East Gate" as a point of interest; others might enter "Peking University" and select "Peking University - West Gate"; still others might search for "Peking University East Gate" and select "Peking University - East Gate," and so on. These search records are logged by the search system or by the user's client. After acquiring a certain number of search click logs, historical search click information for multiple search terms and points of interest can be extracted. Based on this historical search click information, a correspondence between search terms and points of interest can be constructed. If a user searches using a search term and ultimately selects a point of interest, it indicates that the search term corresponds to that point of interest.
[0029] Step 103: Based on the historical search click information, calculate the similarity between all two query terms that meet the first condition. The similarity between the two query terms is calculated based on the number of interest point pairs that the two query terms share, the number of query terms that each interest point in each interest point pair corresponds to, and the number of query terms that the interest points in each interest point pair share. The first condition is that the two query terms share at least one interest point pair. The interest point pair includes two interest points, and each of the two interest points corresponds to each of the two query terms.
[0030] When a user enters a query term to search and then selects a point of interest, the query term corresponds to that point of interest. Figure 2 This diagram illustrates the correspondence between query terms and points of interest, as provided in an embodiment of this specification. Figure 2 In the text, points of interest and query terms connected by solid lines indicate a correspondence between them. (See reference...) Figure 2 The query term `queryA` corresponds to points of interest (POIa), `POIb`, and `POIc`, respectively. Similarly, points of interest `POIa` correspond to queries `queryA`, `queryB`, `queryC`, and `queryD`, respectively. The fact that `queryA` corresponds to a point of interest `POIa` indicates that, based on the obtained click logs, one or more users, after entering `queryA`, ultimately selected a point of interest `POIa`. It should be noted that when establishing the correspondence between query terms and points of interest, the occurrence of a search using a particular query term and the selection of a specific point of interest can be termed the "first event." A correspondence is established between query terms and points of interest when the number of occurrences of the first event is at least a preset number. The preset number can be set to 50. In other words, if 50 users each enter a specific query term and all ultimately select a particular point of interest, or if a single user performs 50 searches using a specific query term and all ultimately selects a particular point of interest, or if multiple users each perform one or more searches using a specific query term, accumulating 50 searches and all ultimately selecting a particular point of interest, then the first event has occurred 50 times. If the first event occurs 50 times or more, a correspondence is established between the query term and the point of interest. That is, if the first event occurs 50 times or more, in... Figure 2 Only then will the point of interest be connected with the query term.
[0031] Figure 2In the example, query terms A and C correspond to three points of interest (POIs): (POIa, POIb), (POIa, POIc), and (POIb, POIc). When determining the common POIs for two queries, if two points of interest correspond to both queries, then these two points form a single POI pair. For example, when determining the common POIs for queries A and C, point POIa corresponds to both queries A and C; point POIb corresponds to both queries A and C. Therefore, points POIa and POIb form a single POI pair. Similarly, we can derive the POIa and POIc pair, and the POIb and POIc pair. The query terms queryA and queryC together correspond to three pairs of points of interest, with a total of one or more, which meets the first condition.
[0032] When calculating the similarity between query A and query C, the number of interest point pairs that query A and query C share is 3. In the interest point pair (POIa, POIb), the query terms corresponding to interest point POIa are query A, query B, query C, and query D, and the number of query terms corresponding to interest point POIa is 4. The query terms corresponding to interest point POIb are query A, query C, query E, and query F, and the number of query terms corresponding to interest point POIb is 4. The query terms that interest points POIa and POIb share are query A and query C, and the number of query terms that interest points POIa and POIb share is 2. Similarly, the calculation can be performed for interest point pairs (POIa, POIc) and (POIb, POIc).
[0033] If two query terms share a common pair of points of interest, it indicates that the user's desired points of interest when searching with one query term are likely based on the points of interest returned by the other query term. This signifies a certain degree of similarity between the two query terms. The more pairs of points of interest that two query terms share, the higher their similarity.
[0034] However, for individual pairs of points of interest (POIs), the similarity between the two query terms indicated by each POI is not entirely the same. For example, if the query terms corresponding to the points of interest in a POI pair include not only the two query terms mentioned above but also other query terms, it indicates that the intention of this POI pair to indicate a similarity between the two query terms is not very clear. This POI pair may also indicate a similarity between multiple query terms, meaning that the user's final selection of these two POIs may be due to their high popularity, with little relevance to the user's input query terms themselves. In other words, the more query terms that the points of interest in a POI pair commonly correspond to, the lower the similarity between the two query terms it indicates.
[0035] For a single pair of points of interest (POIs), the more query terms a POI corresponds to, the higher its popularity, indicating a weaker correlation between the POI and the query terms themselves. The number of query terms corresponding to each POI affects the similarity between the two query terms represented by that POI pair. The more query terms a POI corresponds to, the lower the similarity between the two query terms represented by that POI pair.
[0036] Step 105: Determine one of the two query terms with a similarity of not less than the first threshold as the rewritten term of the other query term.
[0037] After calculating the pairwise similarity between multiple query terms using the above steps, if the similarity between two query terms is not less than the first threshold, then one query term can be identified as a rewritten term of the other query term. Taking one query term as the target query term as an example, if several query terms among the multiple query terms have a similarity with the target query term that is not less than the first threshold, then these several query terms are all identified as rewritten terms of the target query term.
[0038] Furthermore, a rewritten correspondence can be established between the target query term and several query terms. Similarly, each query term is sequentially used as the target query term to determine the rewritten terms and establish a rewritten correspondence. The data recording the rewritten correspondence between query terms and rewritten terms is called the rewritten dictionary. After loading the rewritten dictionary into the query term rewriting module of the search system, the query terms can be rewritten so that the search system can perform retrieval based on the rewritten terms. For example, in the rewritten dictionary, the rewritten terms corresponding to query term A are B, C, and D. When the user enters query term A, the rewritten module rewrites query term A as B, C, and D, performs searches based on A, B, C, and D respectively, and returns a list of search results after sorting and other steps.
[0039] Figure 1The method described above extracts historical search click information from user search click logs, determines the correspondence between query terms and points of interest (POIs) based on this information, and calculates the similarity between the two query terms using relevant parameters of the POI pairs they correspond to. The rewritten terms are then determined based on this similarity. This approach fully leverages the relationship between query terms and user click behavior to build a more stable relationship between query terms. Existing technologies rewrite query terms based on certain matching rules, such as semantic similarity, to generate rewritten terms. However, existing technologies generate rewritten terms with a one-sided relationship between the query terms and the query terms, considering only the relationship between the query terms and the rewritten terms, without considering the relationship between the query terms and the ultimately selected POIs. This method, on the other hand, comprehensively considers the relationship between query terms and the ultimately selected POIs to establish the rewriting relationship between query terms. The generated rewritten terms are more appropriate and reasonable. Retrieving results based on the rewritten terms generated by this method can return high recall and high precision search results, reducing the number of secondary searches required by users.
[0040] Optionally, the similarity between the two query terms is the sum of the first similarities of each pair of interest points that the two query terms commonly correspond to; the method for calculating the first similarity of the pair of interest points specifically includes:
[0041] The first weight of the interest point pair is determined based on the number of query terms that are common to the two interest points in the interest point pair.
[0042] A first penalty coefficient for the interest point pair is determined based on the number of query terms corresponding to one interest point in the interest point pair; a second penalty coefficient for the interest point pair is determined based on the number of query terms corresponding to the other interest point in the interest point pair.
[0043] The first similarity of the interest point pair is determined based on the product of the first weight, the first penalty coefficient, and the second penalty coefficient.
[0044] As described above, for a single pair of interest points, the number of query terms corresponding to each individual interest point and the number of query terms commonly corresponding to the interest points in the pair both affect the similarity between the two query terms indicated by the pair. In this method, the influence of the number of query terms commonly corresponding to the two interest points in the pair, the number of query terms corresponding to one interest point in the pair, and the number of query terms corresponding to the other interest point in the pair on the similarity between the two query terms indicated by the pair are considered independent. Their respective influence weights are first determined: the first weight, the first penalty coefficient, and the second penalty coefficient. Then, based on a product operation, the combined influence of these three factors on the similarity between the two query terms indicated by a single pair of interest points is expressed. Here, the similarity between the two query terms indicated by a single pair of interest points is referred to as the first similarity. As described above, the number of interest point pairs that two query terms share can also reflect their similarity to some extent. In this method, after calculating the first similarity of a single interest point pair, the first similarities of all interest point pairs that the two query terms share are summed to obtain the final similarity of the two query terms. In other words, this method uses summation to reflect the influence of the number of interest point pairs that the two query terms share on their similarity.
[0045] Optionally, determining the first similarity of the pair of interest points specifically includes:
[0046] The first similarity of the interest point pairs is calculated using the following formula:
[0047]
[0048]
[0049] Among them, Q u Q is the set of query terms formed by the query terms corresponding to one of the interest points in the pair of interest points. v The set of query terms formed by query terms corresponding to another point of interest, where α is a smoothing factor. As the first weight, The first penalty coefficient, This is the second penalty coefficient. |Q u ∩Q v | represents the number of query terms in the intersection of the query term sets corresponding to two points of interest, that is, the number of query terms that both points of interest share. |Q u | represents the number of query terms in the query term set corresponding to a single point of interest in a point of interest pair, that is, the number of query terms corresponding to a single point of interest. |Q v| represents the number of query terms in the query term set corresponding to the other interest point in the interest point pair, that is, the number of query terms corresponding to the other interest point. S u,v The first similarity score is given.
[0050] Building upon the previous method, the first weight of the interest point pair is determined based on the number of query terms commonly corresponding to the two interest points. Specifically, this can be achieved by calculating the sum of a smoothing factor α and the number of query terms commonly corresponding to the two interest points, and then taking the reciprocal of the sum to obtain the first weight. The smoothing factor can be set as needed; if the similarity between the two query terms does not accurately reflect reality after verification, the smoothing factor can be adjusted. The first penalty coefficient of the interest point pair is determined based on the number of query terms corresponding to one interest point. Specifically, this can be achieved by taking the square root of the number of query terms corresponding to one interest point, and then taking the reciprocal of the square root to obtain the first penalty coefficient. The calculation method for the second penalty coefficient is the same as that for the first penalty coefficient and will not be repeated here.
[0051] After calculating the first similarity, the first similarity of each pair of interest points is summed using the following formula.
[0052]
[0053] Among them, D i D is the set of points of interest (POIs) corresponding to one of the two query terms. j It is the set of points of interest formed by the points of interest corresponding to the other query term among two query terms.
[0054] Optionally, calculating the similarity between all two query terms that meet the first condition based on the historical search click information specifically includes:
[0055] Construct a set of points of interest corresponding to each query term, wherein each point of interest in the set corresponds to the query term; construct a set of query terms corresponding to each point of interest, wherein each query term in the set corresponds to the point of interest.
[0056] Each query term in the query terms is sequentially identified as the target query term;
[0057] For each target query term, iterate through any two interest points in the set of interest points corresponding to the target query term to form a first pair of interest points, and generate a first query term intersection of the query term sets corresponding to the two interest points in each first pair of interest points;
[0058] For each first query term intersection that contains at least one query term other than the target query term, calculate the first similarity of the first interest point pair corresponding to the first query term intersection;
[0059] For each query word in the intersection of all first query words except the target query word, calculate the sum of the first similarities of the first interest point pairs corresponding to all first query word intersections to which the query word belongs, and obtain the similarity between the target query word and the query word.
[0060] Based on historical search click information, construct a set of points of interest corresponding to the query terms, and construct a set of query terms corresponding to the points of interest. See also Figure 2 In order to Figure 2 Taking the construction of corresponding sets based on points of interest (POIa) and query terms as an example, the set of query terms corresponding to POIa is: Q a ={queryA, queryB, queryC, queryD}; The set of query terms corresponding to the point of interest (POIb): Q b ={queryA, queryC, queryE, queryF}; The set of query terms corresponding to the point of interest (POIc): Q c ={queryA, queryC, queryF}.
[0061] The set of points of interest corresponding to query A: D A = {POIa, POIb, POIc}; The set of points of interest corresponding to query B: D B ={POIb}; The set of points of interest corresponding to query C: D C = {POIa, POIb, POIc}; The set of points of interest corresponding to the query term queryD: D D ={POIa}; The set of points of interest corresponding to query term queryE: D E ={POIb}; The set of points of interest corresponding to the query term queryF: D F ={POIb, POIc}.
[0062] There are several methods for calculating pairwise similarity among the numerous query terms obtained from click logs. This method first identifies one query term as the target query term, calculates the pairwise similarity between the target query term and other query terms, and then repeats the above steps, identifying other query terms as target query terms and calculating similarity, until all query terms have been calculated.
[0063] In this method, the process of identifying the target query term from a query term and calculating the similarity between the target query term and other query terms is as follows:
[0064] Let's take queryA as the target query as an example. We iterate through the set of points of interest D corresponding to queryA. A For any two points of interest in the set D = {POIa, POIb, POIc}, generate the first query term intersection of the query term sets corresponding to the two points of interest in each first point of interest pair. It should be noted that in the set of points of interest D... A In this context, any two points of interest can form a pair of first points of interest, and the two points of interest do not need to satisfy the first condition. Therefore, the set of points of interest, D... A This will create three pairs of primary points of interest: (POIa, POIb), (POIa, POIc), and (POIb, POIc). We then iterate through these three pairs of primary points of interest: First, based on the pair (POIa, POIb), we generate a first set of query terms. In this set, the set of query terms corresponding to the point of interest POIa is Q. a ={queryA, queryB, queryC, queryD}; The set of query terms corresponding to the point of interest (POIb): Q b = {queryA, queryC, queryE, queryF}. The intersection of the first query terms is Q. a ∩Q b = {queryA, queryC}, where the intersection of the first set of queries includes queryC (excluding the target queryA). The first similarity of this first pair of interest points can be calculated using the formula from the previous method. The first similarity of this pair of interest points is calculated as follows: For the target query term queryA and the query term queryC, the first similarity of their common interest point pair is calculated, which is... Then, for the next pair of interest points (POIa, POIc), the above steps are followed to calculate S. a,c , and S a,c (A, C). At this point, the two first similarity scores can be summed to obtain S(A, C) = S a,b (A, C) + S a,c (A, C); and so on, process the interest point pair (POIb, POIc) using the above steps. Since the first query term set formed by this interest point pair includes both query term queryC and query term queryF, S can be calculated. b,c S b,c (A, C) and S b,c (A, F). At this point, we can continue to accumulate the first similarity scores to obtain S(A, C) = S a,b(A, C) + S a,c (A, C) + S b,c (A, C). Since the traversal has been completed, the final result is: the similarity between the target query term queryA and the query term queryC is S(A, C) = S a,b (A, C) + S a,c (A, C) + S b,c (A, C); The similarity between the target query term queryA and the query term queryF is: S(A, F) = S b,c (A, F). It should be noted that, by Figure 2 As can be seen, the target query term `queryA` and query term `queryB` do not share a common pair of interests, thus failing the first condition. Therefore, their similarity does not need to be calculated; they are considered to have no similarity or very low similarity. In this method's calculation, query term `queryB` will not exist in the first query term set formed by this method, so there is no need to calculate their similarity. Similarly, for other query terms `queryD` and `queryE` that were not calculated, it is considered that the target query term `queryA` has no similarity to them, or very low similarity.
[0065] The pseudocode implementation for calculating the similarity between the target query term and the query term is as follows:
[0066] Input: The input is a click mapping dictionary obtained from user click logs.
[0067] The click mapping dictionary from point of interest to query term is D = [Q1:{D1, ...,D...]. N}, Q2:{D′1,...,D′ N}...]
[0068] The query term to point of interest click mapping dictionary Q = [D1:{Q1, ...,Q] N}, D2:{Q′1,...,Q′ N}...]
[0069] Smoothing coefficient: α.
[0070] Output: Similarity between the target query term and the query term (Sim) i =(Sim i [1], ..., Sim i [n]).
[0071]
[0072] Optionally, the method further includes:
[0073] A rewriting dictionary is generated based on the rewriting terms of the query terms;
[0074] A second query term rewriting module is added to the query system, and the second query term rewriting module is loaded with the rewriting dictionary;
[0075] An A / B experiment was conducted using query terms rewritten by the second query term rewriting module as the experimental group and query terms rewritten by the first query term rewriting module as the control group; wherein the first query term rewriting module did not load the rewriting dictionary;
[0076] Based on the search results of the AB experiment, it is determined whether the experimental group has a positive benefit compared to the control group, and a first judgment result is obtained;
[0077] If the first judgment result indicates no positive benefit, then the similarity calculation parameters of the two query terms are adjusted.
[0078] For example, an A / B experiment can be conducted using 10% of online traffic as the experimental group and 90% as the control group. That is, for the user-input query terms, 10% are rewritten using the second query term rewriting module, and 90% are rewritten using the first query term rewriting module. The search results are then compared. This determines whether the experimental group brings positive benefits such as reducing the secondary search rate. If there are no positive benefits, it indicates that the generated rewritten terms are not appropriate or reasonable, and the parameters related to similarity calculation need to be adjusted, the similarity recalculated, and new rewritten terms generated.
[0079] Optionally, the similarity between the two query terms can be corrected based on their semantic and phonetic similarity.
[0080] Building upon the similarity calculation based on the common interest pairs corresponding to two query terms, factors such as semantic similarity and pronunciation similarity can be added to refine the similarity score. For example, if a user inputs the query term "Baiwangshan," the ultimately selected interest points might be "Baiwangshan Forest Park - East Gate" and "Baiwangshan Forest Park - South Gate," both related to "Baiwangshan." Similarly, if a user inputs the query term "Baiwangshan," the ultimately selected interest points might also be "Baiwangshan Forest Park - East Gate" and "Baiwangshan Forest Park - South Gate," both related to "Baiwangshan." After calculating the similarity between the two query terms based on their common interest pairs, since "Baiwangshan" and "Baiwangshan" have the same pronunciation, the similarity score can be appropriately increased, and this increased similarity score can be used as the overall similarity score between the two query terms.
[0081] Based on the same idea, embodiments of this specification also provide computer devices corresponding to the above methods.
[0082] Figure 3This is a schematic diagram of the structure of a computer device provided as an embodiment of this specification. Figure 3 As shown, it includes:
[0083] The first acquisition module 301 is used to acquire a search click log that records historical search click information; the historical search click information specifically includes query terms and interest information selected by the user after entering the query terms.
[0084] The first calculation module 302 is used to calculate the similarity between all two query terms that meet the first condition based on the historical search click information. The similarity between the two query terms is calculated based on the number of interest point pairs that the two query terms commonly correspond to, the number of query terms that each interest point in each interest point pair corresponds to, and the number of query terms that the interest points in each interest point pair commonly correspond to. The first condition is that the two query terms commonly correspond to at least one interest point pair. The interest point pair includes two interest points, and each of the two interest points has a corresponding relationship with each of the two query terms.
[0085] The first determining module 303 is used to determine one of the two query terms with a similarity of not less than a first threshold as a rewritten word of the other query term.
[0086] Optionally, the first calculation module specifically includes a first summation module and a first similarity calculation module.
[0087] The first summation module is used to calculate the similarity between the two query terms as the sum of the first similarities of each pair of interest points that the two query terms share.
[0088] The first similarity calculation module specifically includes:
[0089] The second determining module is used to determine the first weight of the interest point pair based on the number of query terms that are common to the two interest points in the interest point pair;
[0090] The third determining module is used to determine a first penalty coefficient for the interest point pair based on the number of query terms corresponding to one interest point in the interest point pair; and to determine a second penalty coefficient for the interest point pair based on the number of query terms corresponding to the other interest point in the interest point pair.
[0091] The fourth determining module is used to determine the first similarity of the interest point pair based on the product of the first weight, the first penalty coefficient, and the second penalty coefficient.
[0092] Optionally, the first similarity calculation module is specifically used to calculate the first similarity of the interest point pairs using the following formula:
[0093]
[0094]
[0095] Among them, Q u Q is the set of query terms formed by the query terms corresponding to one of the interest points in the pair of interest points. v The set of query terms formed by the query terms corresponding to another point of interest, where α is a smoothing factor.
[0096] Optionally, the first calculation module specifically includes:
[0097] The first construction module is used to construct a set of points of interest corresponding to each query term, wherein all points of interest in the set of points of interest correspond to the query term; and to construct a set of query terms corresponding to each point of interest, wherein all query terms in the set of query terms correspond to the point of interest.
[0098] The fifth determining module is used to sequentially determine each query term in the query terms as the target query term;
[0099] The first generation module is used to, for each target query term, traverse any two interest points in the set of interest points corresponding to the target query term to form a first interest point pair, and generate a first query term intersection of the query term sets corresponding to the two interest points in each first interest point pair;
[0100] The second calculation module is used to calculate the first similarity of the first interest point pairs corresponding to each first query term intersection that contains at least one query term other than the target query term.
[0101] The second summation module is used to calculate the sum of the first similarities of the first interest point pairs corresponding to all first query word intersections to which the target query word belongs for each query word in all first query word intersections except for the target query word, so as to obtain the similarity between the target query word and the query word.
[0102] Optionally, the computer device further includes:
[0103] The second generation module is used to generate a rewritten dictionary based on the rewritten words of the query term;
[0104] The first loading module is used to add a second query term rewriting module to the query system, wherein the second query term rewriting module is loaded with the rewriting dictionary;
[0105] The first experimental module is used to conduct an A / B experiment using query terms rewritten by the second query term rewriting module as the experimental group and query terms rewritten by the first query term rewriting module as the control group; wherein the first query term rewriting module does not load the rewriting dictionary;
[0106] The first judgment module is used to determine, based on the search results of the AB experiment, whether the experimental group has a positive benefit compared to the control group, and to obtain the first judgment result;
[0107] The first adjustment module is used to adjust the similarity calculation parameters of the two query terms if the first judgment result indicates that there is no positive benefit.
[0108] Optionally, the computer device further includes:
[0109] The first correction module is used to correct the similarity between the two query terms based on their semantic and phonetic similarity.
[0110] Based on the same idea, the embodiments of this specification also provide computer devices corresponding to the above methods.
[0111] Figure 4 This is a schematic diagram of the structure of a computer device provided as an embodiment of this specification. Figure 4 As shown, computer device 400 may include memory 430, processor 410, and computer program 420 stored in memory, wherein the processor executes the computer program to implement the steps of any of the methods described above.
[0112] Based on the same idea, embodiments of this specification also provide a computer-readable storage medium corresponding to the above methods, which stores computer instructions that, when executed by a processor, implement the steps of any of the methods described above.
[0113] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, for... Figure 4 As the device shown is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0114] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program a digital system themselves to "integrate" it onto a PLD, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0115] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means that can be included within it to implement various functions can also be considered as structures within the hardware component. Alternatively, the means that can be used to implement various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0116] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0117] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0118] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (which may include, but are not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0119] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of 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, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce a machine that can be used to implement the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0120] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture that may include instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0121] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that can be used to implement a process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0122] In a typical configuration, a computing device may include one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0123] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0124] Computer-readable media can include both permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media can include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital character versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media cannot include transient computer-readable media, such as modulated data signals and carrier waves.
[0125] It should also be noted that the terms "may include," "comprise," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that may include a list of elements may include not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "may include a…" does not exclude the presence of other identical elements in the process, method, article, or apparatus that may include said element.
[0126] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (which may include, but are not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0127] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules can include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0128] The above description is merely an embodiment of this application and should not be construed as limiting the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for generating rewritten terms for point-of-interest (POI) query terms, characterized in that, include: Obtain search click logs that record historical search click information; the historical search click information specifically includes query terms and points of interest selected by the user after entering the query terms. Based on the historical search click information, the similarity between all two query terms that meet the first condition is calculated. The similarity between the two query terms is calculated based on the number of interest point pairs that the two query terms share, the number of query terms that each interest point in each interest point pair corresponds to, and the number of query terms that the interest points in each interest point pair share. The number of interest point pairs that the two query terms share is directly proportional to the similarity; the number of query terms that each interest point in each interest point pair corresponds to is inversely proportional to the similarity; and the number of query terms that the interest points in each interest point pair share is inversely proportional to the similarity. The first condition is that the two query terms correspond to at least one pair of points of interest; the pair of points of interest includes two points of interest, and each of the two points of interest corresponds to each of the two query terms; One of the two query terms with a similarity of not less than a first threshold is identified as a rewritten word of the other query term.
2. The method as described in claim 1, characterized in that, The similarity between the two query terms is the sum of the first similarities of each pair of interest points that the two query terms share; the method for calculating the first similarity of the pair of interest points specifically includes: The first weight of the interest point pair is determined based on the number of query terms that are common to the two interest points in the interest point pair. A first penalty coefficient for the interest point pair is determined based on the number of query terms corresponding to one interest point in the interest point pair; a second penalty coefficient for the interest point pair is determined based on the number of query terms corresponding to the other interest point in the interest point pair. The first similarity of the interest point pair is determined based on the product of the first weight, the first penalty coefficient, and the second penalty coefficient.
3. The method as described in claim 2, characterized in that, Determining the first similarity of the interest point pair specifically includes: The first similarity of the interest point pairs is calculated using the following formula: ; , ; Among them, Q u Q is the set of query terms formed by the query terms corresponding to one of the interest points in the pair of interest points. v The set of query terms formed by the query terms corresponding to another point of interest, where α is a smoothing factor.
4. The method as described in claim 2, characterized in that, The step of calculating the similarity between all two query terms that meet the first condition based on the historical search click information specifically includes: Construct a set of points of interest corresponding to each query term, wherein each point of interest in the set corresponds to the query term; construct a set of query terms corresponding to each point of interest, wherein each query term in the set corresponds to the point of interest. Each query term in the query terms is sequentially identified as the target query term; For each target query term, iterate through any two interest points in the set of interest points corresponding to the target query term to form a first pair of interest points, and generate a first query term intersection of the query term sets corresponding to the two interest points in each first pair of interest points; For each first query term intersection that contains at least one query term other than the target query term, calculate the first similarity of the first interest point pair corresponding to the first query term intersection; For each query word in the intersection of all first query words except the target query word, calculate the sum of the first similarities of the first interest point pairs corresponding to all first query word intersections to which the query word belongs, and obtain the similarity between the target query word and the query word.
5. The method as described in claim 1, characterized in that, The method further includes: A rewriting dictionary is generated based on the rewriting terms of the query terms; A second query term rewriting module is added to the query system, and the second query term rewriting module is loaded with the rewriting dictionary; An A / B experiment was conducted using query terms rewritten by the second query term rewriting module as the experimental group and query terms rewritten by the first query term rewriting module as the control group; wherein the first query term rewriting module did not load the rewriting dictionary; Based on the search results of the AB experiment, it is determined whether the experimental group has a positive benefit compared to the control group, and a first judgment result is obtained; If the first judgment result indicates no positive benefit, then the similarity calculation parameters of the two query terms are adjusted.
6. The method as described in claim 1, characterized in that, The method further includes correcting the similarity between the two query terms based on their semantic and phonetic similarity.
7. A computer device, characterized in that, include: The first acquisition module is used to acquire search click logs that record historical search click information; the historical search click information specifically includes query terms and interest information selected by the user after entering the query terms. The first calculation module is used to calculate the similarity between all two query terms that meet the first condition based on the historical search click information. The similarity between the two query terms is calculated based on the number of interest point pairs that the two query terms commonly correspond to, the number of query terms that each interest point in each interest point pair corresponds to, and the number of query terms that the interest points in each interest point pair commonly correspond to. The number of interest point pairs that the two query terms commonly correspond to is directly proportional to the similarity. The number of query terms that each interest point in each interest point pair corresponds to is inversely proportional to the similarity. The number of query terms that the interest points in each interest point pair commonly correspond to is inversely proportional to the similarity. The first condition is that the two query terms commonly correspond to at least one interest point pair. The interest point pair includes two interest points, and each of the two interest points corresponds to each of the two query terms. The first determining module is used to determine one of the two query terms with a similarity of not less than a first threshold as a rewritten word of the other query term.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by a processor, the computer instructions implement the steps of the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Query processing method and device, equipment and storage medium
CN115391678A