Query information rewriting method and device, computer device, and storage medium

By acquiring user behavior log data to generate a generalized total set and aggregated statistical data, the problem of insufficient generalization and controllability of query rewriting in existing technologies is solved, enabling real-time rewriting of query information and improving the real-time performance and accuracy of rewriting.

CN116821152BActive Publication Date: 2026-05-01SHENZHEN YISHIHUOLALA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN YISHIHUOLALA TECH CO LTD
Filing Date
2023-06-14
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing query rewriting technologies are insufficient in terms of generalization and controllability, and the real-time nature of rewriting query information is also inadequate.

Method used

By periodically acquiring user behavior log data, a generalized total set and aggregated statistical data are generated to determine the candidate rewrite set, which is then pushed to an online remote dictionary service. When querying information in real time, the candidate rewrite set is read from the dictionary service.

Benefits of technology

It improves the generalizability and controllability of query information, while also enhancing the real-time rewriting of query information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116821152B_ABST
    Figure CN116821152B_ABST
Patent Text Reader

Abstract

The application relates to a query information rewriting method and device, computer equipment and a storage medium. The method comprises the following steps: obtaining user behavior log data at a fixed time; obtaining a generalization total set comprising a plurality of historical generalization query information and aggregation statistical data according to the user behavior log data; determining a candidate rewriting set corresponding to each historical generalization query information according to the generalization total set and the aggregation statistical data; pushing all historical generalization query information and the candidate rewriting set corresponding to each historical generalization query information to an online remote dictionary service; and reading the corresponding candidate rewriting set from the online remote dictionary service according to real-time query information input by a user when the real-time query information is received. The embodiment of the application can improve the generalization of query information, ensure the controllability of query results, and improve the real-time performance of rewritten query information.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, computer equipment and storage media for rewriting query information Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer device, and storage medium for rewriting query information. Background Technology

[0002] Query rewriting (also known as query expansion) is a method used in search engines to rewrite user search query input, thereby improving the accuracy of search engine results. Taking some comprehensive search engines as an example, a merchant or product often has multiple expressions; for example, "hot pot" is also called "shabu-shabu." Sometimes different words express the same user intent, such as "wedding photography" and "wedding photos," or "glasses" and "opticians." Search engine query rewriting can be a form of search engine recall optimization, aiming to retrieve as many search results as possible that match the user's search intent without altering the user's actual intent.

[0003] Currently, query rewriting mainly employs the following methods:

[0004] 1. Query rewriting based on log statistical mining can, based on different cities searched, analyze historical clicks of point of interest names for the same query or the pinyin of the same query within the same city, sort the frequency in descending order, and push the top 5 to the current user, with relatively accurate results. However, this approach lacks generalization, fails to cover long-tail traffic, cannot uncover deeper relationships, and is only triggered when the query or its pinyin has a search history.

[0005] 2. A Chinese rewriting method based on a seq2seq model. This method requires implementing an encoder-decoder model architecture. This model can model query pairs constructed from massive amounts of historical user behavior data, and the model can learn to represent them well, possessing superior generalization ability. However, in this approach, the semantic representation of the query information (i.e., the query itself) depends on the vector representation learned by the model, resulting in poor model interpretability and uncontrollable decoded queries. Summary of the Invention

[0006] To address the aforementioned deficiencies or disadvantages, this application provides a method, apparatus, computer device, and storage medium for rewriting query information. The embodiments of this application can improve the generalizability of query information, ensure the controllability of query results, and also improve the real-time performance of rewriting query information.

[0007] This application provides a query information rewriting method according to a first aspect. In one embodiment, the method includes:

[0008] Periodically retrieve user behavior log data;

[0009] Based on user behavior log data, obtain the generalized total set and aggregated statistical data, which include multiple historical generalized query information;

[0010] The candidate rewrite set corresponding to each historical generalized query is determined based on the total generalized set and aggregated statistical data.

[0011] All historical generalized query information and the corresponding candidate rewrite sets for each historical generalized query information are pushed to the online remote dictionary service;

[0012] Upon receiving real-time query information from the user, the system retrieves the corresponding candidate rewrite set from the online remote dictionary service based on the real-time query information.

[0013] In some embodiments, user behavior log data includes historical query information entered by multiple users each time they made a query within a preset time period, as well as the corresponding clicked points of interest and search city information;

[0014] Based on user behavior log data, we obtain a generalized aggregate set and aggregated statistics, including information from multiple historical generalized queries, including:

[0015] Each historical query in the user behavior log data is processed into a corresponding generalized historical query, resulting in a generalized set.

[0016] The aggregated statistical data is obtained by performing multi-dimensional aggregation statistics based on user behavior log data and the generalized total set.

[0017] In some embodiments, each historical query in the user behavior log data is processed into a corresponding historical generalized query, including:

[0018] Identify the core and omitted components in each historical query;

[0019] By removing omitted components from each historical query, the corresponding generalized historical query information is obtained.

[0020] In some embodiments, multi-dimensional aggregation statistics are performed based on user behavior log data and a generalized total set to obtain aggregated statistical data, including:

[0021] Based on user behavior log data and a generalized set, multiple first combinations and multiple second combinations are generated. Each first combination includes historical query information and search city information; each second combination includes a clicked point of interest and search city information.

[0022] The click frequency and click-through rate of each point of interest corresponding to each first group, and the click frequency and click-through rate of each historical query information corresponding to each second group are counted. The collected data are used as aggregated statistical data.

[0023] In some embodiments, the candidate rewrite set corresponding to each historical generalized query information is determined based on the total generalization set and aggregated statistics, including:

[0024] The similarity value between any two historical generalized query messages in the generalized set is calculated based on the optimized Swing algorithm to obtain similarity data;

[0025] Based on similarity data, determine the candidate rewrite set corresponding to each historical generalized query information;

[0026] The optimized Swing algorithm is as follows:

[0027]

[0028] in,

[0029] Q1 and Q2 represent any two historical generalized query messages, and sim(Q1, Q2) represents the similarity value between Q1 and Q2; U i U represents the set of clicked points of interest corresponding to Q1. j U represents the set of clicked interest points corresponding to Q2, and U i and U j There is an intersection between them; I u U i and U j The set of click history query information corresponding to clicked points of interest u in the intersection of |I u | represents set I u The number of; I v U i and U j The set of click history query information corresponding to clicked interest points v in the intersection of |I v | represents set I v The number of; r u This represents the click-through rate (CTR) of clicking on point of interest u when a user inputs Q1; r v This represents the click-through rate corresponding to the point of interest v when the user inputs Q2; α is set to 1.

[0030] In some embodiments, all historical generalized query information and the candidate rewrite sets corresponding to each historical generalized query information are pushed to an online remote dictionary service, including:

[0031] Retrieve the search city information corresponding to each historical generalized query;

[0032] Generate key information using each historical generalized query information and its corresponding search city information, and use the candidate rewrite set corresponding to the historical generalized query information as the value information corresponding to the key information to obtain multiple sets of key-value pair information;

[0033] The above sets of key-value pairs are pushed to the online remote dictionary service.

[0034] In some embodiments, the corresponding candidate rewrite set is read from an online remote dictionary service based on real-time query information, including:

[0035] Process real-time query information into real-time generalized query information;

[0036] Generate key information based on the generalized query information and the corresponding search city information;

[0037] Read the set of candidate rewrites corresponding to the key information from the online remote dictionary service.

[0038] According to a second aspect, this application provides a query information rewriting apparatus. In one embodiment, the apparatus includes:

[0039] The log acquisition module is used to periodically acquire user behavior log data;

[0040] The first processing module is used to obtain a generalized total set and aggregated statistical data, including multiple historical generalized query information, based on user behavior log data.

[0041] The second processing module is used to determine the candidate rewrite set corresponding to each historical generalized query information based on the total generalization set and aggregated statistical data.

[0042] The push module is used to push all historical generalized query information and the candidate rewrite set corresponding to each historical generalized query information to the online remote dictionary service.

[0043] The real-time rewrite module is used to read the corresponding candidate rewrite set from the online remote dictionary service based on the real-time query information received from the user.

[0044] This application provides a computer device according to a third aspect, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the above-described methods.

[0045] According to a fourth aspect, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods.

[0046] In the above embodiments of this application, user behavior log data is acquired periodically, and a generalized set and aggregated statistical data, including multiple historical generalized query information, are obtained based on the user behavior log data. Then, a candidate rewriting set corresponding to each historical generalized query information is determined based on the generalized set and aggregated statistical data. Finally, all historical generalized query information and the candidate rewriting set corresponding to each historical generalized query information are pushed to an online remote dictionary service. Thus, when real-time query information input by the user is received, the corresponding candidate rewriting set can be read from the online remote dictionary service based on the real-time query information, which can improve the generalization of query information, ensure the controllability of query results, and improve the real-time performance of rewriting query information. Attached Figure Description

[0047] Figure 1 is an application environment diagram of a query information rewriting method in one embodiment;

[0048] Figure 2 is a flowchart illustrating a query information rewriting method in one embodiment;

[0049] Figure 3 is a flowchart illustrating the process of generating the generalized total set and aggregated statistics in one embodiment;

[0050] Figure 4 is a schematic diagram of the process of pushing each historical generalized query information and its corresponding candidate rewrite set in one embodiment;

[0051] Figure 5 is a schematic diagram of the process for generating aggregated statistical data in one embodiment;

[0052] Figure 6 is a structural block diagram of a query information rewriting device in one embodiment;

[0053] Figure 7 is an internal structure diagram of a computer device in one embodiment. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0055] This application provides a query information rewriting method. In this embodiment, the query information rewriting method can be applied to the application environment shown in Figure 1. The query service platform periodically acquires user behavior log data, then obtains a generalized total set and aggregated statistical data, including multiple historical generalized query information, based on the user behavior log data. Next, it determines the candidate rewriting set corresponding to each historical generalized query information based on the generalized total set and aggregated statistical data. Finally, it pushes all historical generalized query information and the corresponding candidate rewriting sets to an online remote dictionary service. Thus, when receiving real-time query information input by the user terminal, the platform reads the corresponding candidate rewriting set from the online remote dictionary service based on the real-time query information.

[0056] User terminal 10 can be various smart hardware devices such as personal computers, laptops, smartphones, tablets and desktop computers, and query service platform 20 can be implemented using a standalone server or a server cluster composed of multiple servers.

[0057] The query information rewriting method provided in this application includes steps S110-S150 as shown in Figure 2. The following description takes the application of this method to the query service platform in Figure 1 as an example. In some embodiments, the query service platform includes an offline module and an online module. The offline module is used to execute steps S110-S140, and the online module is used to execute step S150.

[0058] S110: Periodically retrieve user behavior log data.

[0059] The offline module will execute steps S110-S140 periodically. The time interval can be set according to the specific application scenario, for example, once a day.

[0060] User behavior log data includes historical query information entered by multiple users (e.g., all users of the query service platform) during each query within a preset time period, as well as the corresponding clicked points of interest and search city information.

[0061] Historical query information refers to query information entered by users in the past. The content of the query information varies in different scenarios. In a freight scenario, the query information can be address information. For example, when a user enters address information on their terminal, the query service platform will return multiple matching Points of Interest (POIs) to the user. The user selects the desired POI, which is called a clicked POI. Search city information refers to the city corresponding to the address information. For example, if the user enters the query information "4th Floor, No. 124, Bubugao Avenue, Dongguan Yiben Industrial Park", then the search city information is "Dongguan".

[0062] S120: Obtain the generalized total set and aggregated statistics, including multiple historical generalized query information, based on user behavior log data.

[0063] The process of obtaining a generalized aggregate set and aggregated statistical data, including multiple historical generalized query information, based on user behavior log data includes the steps shown in Figure 3, namely:

[0064] S121: Process each historical query information in the user behavior log data into the corresponding historical generalized query information to obtain the generalized total set;

[0065] S122: Perform multi-dimensional aggregation statistics based on user behavior log data and the generalized total set to obtain aggregated statistical data.

[0066] In the above steps, the historical query information in the user behavior log data is first generalized to obtain the corresponding historical generalized query information. The historical generalized query information corresponding to all historical query information is the generalized set.

[0067] When processing each historical query in user behavior log data into corresponding generalized historical query information, one can identify the core components and omitted components in each historical query, and then remove the omitted components to obtain the corresponding generalized historical query information. Specifically, a component model can be pre-trained, and then the component module can be used to extract the core components and remove the omitted components from the historical query information.

[0068] Core components can include information such as "location, business district, development zone", "POI", "house number", and "building number", while omitted components can include "province", "city", "person's name", "mobile phone number", and "floor number". For example, suppose query information A is "4th floor, No. 124, Bubugao Avenue, Yiben Industrial Park, Dongguan", and query information B is "5th floor, No. 124, Bubugao Avenue, Yiben Industrial Park, Dongguan City, Guangdong Province". After removing the omitted information, we can obtain the same query information C, namely "No. 124, Bubugao Avenue, Yiben Industrial Park". By removing the omitted components in the query information, the problem of insufficient generalization can be alleviated.

[0069] S130: Determine the candidate rewrite set corresponding to each historical generalized query information based on the generalized total set and aggregated statistical data.

[0070] In freight scenarios, the accuracy requirements for rewritten query information are high, and current solutions cannot meet these requirements. Therefore, this embodiment performs multi-dimensional aggregation statistics based on user behavior log data and generalized total set to obtain aggregated statistical data. Then, the aggregated statistical data is used to determine the candidate rewriting set corresponding to each historical generalized query information, thereby improving the accuracy of the rewritten query information.

[0071] S140: Push all historical generalized query information and the candidate rewrite set corresponding to each historical generalized query information to the online remote dictionary service.

[0072] In some embodiments, all historical generalized query information and the candidate rewrite set corresponding to each historical generalized query information are pushed to an online remote dictionary service, specifically including the steps shown in Figure 4, namely:

[0073] S141: Obtain the search city information corresponding to each historical generalized query;

[0074] S142: Generate key information with each historical generalized query information and its corresponding search city information, and use the candidate rewrite set corresponding to the historical generalized query information as the value information corresponding to the key information to obtain multiple sets of key-value pair information;

[0075] S143: Push the above multiple sets of key-value pairs to the online remote dictionary service.

[0076] Specifically, when generating key information for each historical generalized query and its corresponding search city information, each historical generalized query and its corresponding search city information is hashed to obtain the corresponding hash value, which is the key information. Then, the candidate rewrite set corresponding to the historical generalized query information is used as the value information corresponding to the key information. Finally, each key-value pair is pushed to the online remote dictionary service.

[0077] The online remote dictionary service is implemented using Redis.

[0078] S150: Upon receiving real-time query information input by the user, read the corresponding candidate rewrite set from the online remote dictionary service based on the real-time query information.

[0079] In this embodiment, the offline module pushes the key-value pair information generated periodically to Redis. When the online module receives the real-time query information input by the user, it does not need to rewrite the query information in real time, but can directly read the cached information. This enables faster query rewriting online and improves the real-time performance of query rewriting.

[0080] Specifically, the process involves retrieving the corresponding candidate rewrite set from an online remote dictionary service based on real-time query information. This includes: processing the real-time query information into real-time generalized query information; generating key information based on the generalized query information and the corresponding search city information; and retrieving the candidate rewrite set corresponding to the key information from the online remote dictionary service. In other words, the online module needs to generalize the real-time query information to obtain real-time generalized query information, then hash the real-time generalized query information and the search city information, and finally use the resulting hash value as the key information to retrieve the candidate rewrite set corresponding to that key information. The related operations of the generalization process can be found in the above embodiments and will not be elaborated upon here.

[0081] For example, if a user inputs "Yilong Road 100, Guangdong" as the real-time query information and "Dongguan" as the search city, the generalized real-time query information obtained after generalization processing is "Yilong Road 100". Then, based on the real-time generalized query information "Yilong Road 100" and the search city information "Dongguan", Redis can be read to obtain the corresponding candidate rewrite set, such as ["Shunxin Jetta", "Yilong Road Shunjie"].

[0082] In some embodiments, multi-dimensional aggregation statistics are performed based on user behavior log data and a generalized total set to obtain aggregated statistical data, specifically including the steps shown in Figure 5, namely:

[0083] S1221: Generate multiple first combinations and multiple second combinations based on user behavior log data and generalized total set.

[0084] S1222: Calculate the click frequency and click-through rate of each point of interest corresponding to each first group, and the click frequency and click-through rate of each historical query information corresponding to each second group, and use the statistical data as aggregated statistical data.

[0085] Each first combination includes a historical query information and a search city information; each second combination includes a clicked point of interest and a search city information.

[0086] The final aggregated statistics include the frequency and click-through rate of clicked points of interest under the same historical generalized query information and search city information, as well as the frequency and click-through rate of clicked historical generalized query information under the same clicked points of interest and search city information.

[0087] Accordingly, based on the total generalization set and aggregate statistics, a candidate rewrite set corresponding to each historical generalized query is determined, including:

[0088] The similarity value between any two historical generalized query messages in the generalized set is calculated based on the optimized Swing algorithm to obtain similarity data;

[0089] Based on similarity data, determine the candidate rewrite set corresponding to each historical generalized query information;

[0090] The optimized Swing algorithm is as follows:

[0091]

[0092] in,

[0093] Q1 and Q2 represent any two historical generalized query messages, and sim(Q1, Q2) represents the similarity value between Q1 and Q2; U i U represents the set of clicked points of interest corresponding to Q1. j U represents the set of clicked interest points corresponding to Q2, and U i and U j There is an intersection between them; I u U i and U j The set of click history query information corresponding to clicked points of interest u in the intersection of |I u | represents set I u The number of; I υ U i and U j The set of click history query information corresponding to clicked interest points v in the intersection of |I υ | represents set I υ The number of; r u This represents the click-through rate (CTR) of clicking on point of interest u when a user inputs Q1; r υ This represents the click-through rate corresponding to the point of interest v when the user inputs Q2; α is set to 1.

[0094] Specifically, the original calculation formula of the Swing algorithm is as follows:

[0095]

[0096] in,

[0097] The definitions of the parameters in the formula can be found in the above introduction to the optimized Swing algorithm.

[0098] The original Swing algorithm can also be used to calculate the similarity value between any two historical generalized query messages in the generalized set. However, this embodiment optimizes the existing Swing algorithm to better suit the freight transportation scenario, thereby improving the accuracy of rewriting query information.

[0099] It should be noted that similarity calculation is only necessary when the click interest sets corresponding to two historical generalized query pieces of information overlap. When calculating similarity, Apache's Spark computing engine can be used for large-scale computation to obtain a candidate rewrite set for each historical generalized query piece of information, which includes the multiple historical generalized query pieces of information with the highest similarity.

[0100] Specifically, suppose we randomly select two historical generalized query records from the generalized set, denoted as Q1 and Q2. After multi-dimensional aggregation and statistical operations, we can obtain the click interest point sets corresponding to Q1 and Q2, denoted as U. i and U j .

[0101] Large-scale computations using Spark can yield U i The number of click history query information rewritten for each clicked point of interest (i.e., frequency) is denoted as |I u |, and you can also get U i The click-through rate r of the u-th point of interest in Q1 u Similarly, we can also obtain U. j The number of click history query information rewritten for each clicked point of interest is denoted as |I υ |, and you can also get U j The click-through rate r of the j-th click interest point in Q2 υ .

[0102] Then, the similarity value between Q1 and Q2 can be calculated according to the formula of the optimized Swing algorithm.

[0103] Based on the above operations, the similarity value between Q1 and each other historical generalized query information (denoted as Qi) can be calculated.

[0104] After obtaining the similarity value between Q1 and each other historical generalized query information, the scores can be sorted in descending order to obtain the candidate rewrite set of Q1. The earlier Qi appears, the more similar it is.

[0105] Figure 2-5 is a flowchart illustrating the query information rewriting method in one embodiment. It should be understood that although the steps in the flowchart of Figure 2-5 are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Furthermore, at least some of the steps in Figure 2-5 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0106] Based on the same inventive concept, this application also provides a query information rewriting device. In this embodiment, as shown in FIG6, the query information rewriting device includes the following modules:

[0107] Log acquisition module 110 is used to periodically acquire user behavior log data;

[0108] The first processing module 120 is used to obtain a generalized total set and aggregated statistical data, including multiple historical generalized query information, based on user behavior log data.

[0109] The second processing module 130 is used to determine the candidate rewrite set corresponding to each historical generalized query information based on the generalized total set and aggregated statistical data.

[0110] The push module 140 is used to push all historical generalized query information and the candidate rewrite set corresponding to each historical generalized query information to the online remote dictionary service.

[0111] The real-time rewriting module 150 is used to read the corresponding candidate rewriting set from the online remote dictionary service based on the real-time query information received from the user.

[0112] In some embodiments, user behavior log data includes historical query information entered by multiple users during each query within a preset time period, as well as corresponding clicked points of interest and search city information; correspondingly, the first processing module 120 includes:

[0113] The generalization processing submodule is used to process each historical query information in the user behavior log data into corresponding historical generalized query information to obtain the generalized total set.

[0114] The aggregation processing submodule is used to perform multi-dimensional aggregation statistics based on user behavior log data and a generalized total set to obtain aggregated statistical data.

[0115] In some embodiments, the generalization processing submodule is specifically used for:

[0116] Identify the core and omitted components in each historical query;

[0117] By removing omitted components from each historical query, the corresponding generalized historical query information is obtained.

[0118] In some embodiments, the aggregation processing submodule is specifically used for:

[0119] Based on user behavior log data and a generalized set, multiple first combinations and multiple second combinations are generated. Each first combination includes historical query information and search city information; each second combination includes a clicked point of interest and search city information.

[0120] The click frequency and click-through rate of each point of interest corresponding to each first group, and the click frequency and click-through rate of each historical query information corresponding to each second group are counted. The collected data are used as aggregated statistical data.

[0121] In some embodiments, the second processing module 130 includes:

[0122] The similarity calculation submodule is used to calculate the similarity value between any two historical generalized query messages in the generalized set based on the optimized Swing algorithm, and obtain similarity data.

[0123] The rewrite set determination submodule is used to determine the candidate rewrite set corresponding to each historical generalized query information based on similarity data;

[0124] The optimized Swing algorithm is as follows:

[0125]

[0126] in,

[0127] Q1 and Q2 represent any two historical generalized query messages, and sim(Q1, Q2) represents the similarity value between Q1 and Q2; U i U represents the set of clicked points of interest corresponding to Q1. j U represents the set of clicked interest points corresponding to Q2, and U i and U j There is an intersection between them; I u U i and U j The set of click history query information corresponding to clicked points of interest u in the intersection of |I u | represents set I u The number of; I υU i and U j The set of click history query information corresponding to clicked interest points v in the intersection of |I υ | represents set I υ The number of; r u This represents the click-through rate (CTR) of clicking on point of interest u when a user inputs Q1; r υ This represents the click-through rate corresponding to the point of interest v when the user inputs Q2; α is set to 1.

[0128] In some embodiments, the push module 140 is specifically used for:

[0129] Retrieve the search city information corresponding to each historical generalized query;

[0130] Generate key information using each historical generalized query information and its corresponding search city information, and use the candidate rewrite set corresponding to the historical generalized query information as the value information corresponding to the key information to obtain multiple sets of key-value pair information;

[0131] The above sets of key-value pairs are pushed to the online remote dictionary service.

[0132] In some embodiments, the real-time rewrite module 150 is specifically used for:

[0133] Process real-time query information into real-time generalized query information;

[0134] Generate key information based on the generalized query information and the corresponding search city information;

[0135] Read the set of candidate rewrites corresponding to the key information from the online remote dictionary service.

[0136] Specific limitations regarding the query information rewriting device can be found in the limitations of the query information rewriting method described above, and will not be repeated here. Each module in the aforementioned query information rewriting device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0137] In one embodiment, a computer device is provided, the internal structure of which can be shown in Figure 7. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores user behavior logs and other data; the specific data stored may also be as defined in the above method embodiments. The network interface of the computer device communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a query information rewriting method.

[0138] Those skilled in the art will understand that the structure shown in Figure 7 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0139] This embodiment also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method provided in any of the above method embodiments.

[0140] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method provided in any of the above method embodiments.

[0141] Those skilled in the art will understand that implementing all or part of the processes in the above method embodiments can be accomplished by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0142] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0143] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for rewriting query information, characterized in that, The method includes: periodically acquiring user behavior log data, the user behavior log data including historical query information entered by multiple users during each query within a preset time period, as well as corresponding clicked points of interest and search city information; obtaining a generalized total set and aggregated statistical data including multiple historical generalized query information based on the user behavior log data; determining a candidate rewrite set corresponding to each historical generalized query information based on the generalized total set and the aggregated statistical data; pushing all historical generalized query information and the candidate rewrite sets corresponding to each historical generalized query information to an online remote dictionary service; and reading the corresponding candidate rewrite set from the online remote dictionary service based on the real-time query information received from the user; the step of obtaining the generalized total set and aggregated statistical data including multiple historical generalized query information based on the user behavior log data includes: processing each historical query information in the user behavior log data into a corresponding historical generalized query information to obtain the generalized total set. The process involves: first, performing multi-dimensional aggregation statistics based on the user behavior log data and the generalized set to obtain aggregated statistical data; second, determining the candidate rewrite set corresponding to each historical generalized query information based on the generalized set and the aggregated statistical data, including: calculating the similarity value between any two historical generalized query information in the generalized set using the optimized Swing algorithm to obtain similarity data; third, determining the candidate rewrite set corresponding to each historical generalized query information based on the similarity data; and fourth, pushing all historical generalized query information and the candidate rewrite sets corresponding to each historical generalized query information to an online remote dictionary service, including: obtaining the search city information corresponding to each historical generalized query information; generating key information using each historical generalized query information and its corresponding search city information, and using the candidate rewrite set corresponding to the historical generalized query information as the value information corresponding to the key information to obtain multiple sets of key-value pairs; and finally, pushing the multiple sets of key-value pairs to an online remote dictionary service.

2. The method as described in claim 1, characterized in that, Each historical query in the user behavior log data is processed into a corresponding historical generalized query, including: identifying the core components and omitted components in each historical query; removing the omitted components in each historical query to obtain the corresponding historical generalized query.

3. The method as described in claim 1 or 2, characterized in that, Multi-dimensional aggregation statistics are performed based on the user behavior log data and the generalized set to obtain aggregated statistical data, including: generating multiple first combinations and multiple second combinations based on the user behavior log data and the generalized set, each first combination including a historical query information and a search city information; each second combination including a clicked point of interest and a search city information; counting the click frequency and click rate of each clicked point of interest corresponding to each first combination, and the click frequency and click rate of each clicked historical query information corresponding to each second combination, and using the statistically obtained data as aggregated statistical data.

4. The method as described in claim 3, characterized in that, The optimized Swing algorithm is as follows: in, , Q1 and Q2 represent any two historical generalized query results. This represents the similarity value between Q1 and Q2; This represents the set of clicked points of interest corresponding to Q1. This represents the set of clicked interest points corresponding to Q2, and and There is an intersection between them; express and The set of click history query information corresponding to clicked points of interest u in the intersection of the two sets of data. Represents a set The number of; express and The set of click history query information corresponding to clicked points of interest v in the intersection of the two sets of data. Represents a set The number of; This represents the click-through rate corresponding to the point of interest u when the user inputs Q1; This represents the click-through rate corresponding to the point of interest v when the user inputs Q2; Set it to 1.

5. The method as described in claim 1, characterized in that, The process of retrieving a candidate rewrite set from the online remote dictionary service based on the real-time query information includes: processing the real-time query information into real-time generalized query information; generating key information based on the generalized query information and the corresponding search city information; and retrieving a candidate rewrite set corresponding to the key information from the online remote dictionary service.

6. A query information rewriting device, characterized in that, The device includes: a log acquisition module, configured to periodically acquire user behavior log data, the user behavior log data including historical query information entered by multiple users during each query within a preset time period, as well as corresponding clicked points of interest and search city information; a first processing module, configured to obtain a generalized total set and aggregated statistical data including multiple historical generalized query information based on the user behavior log data; a second processing module, configured to determine a candidate rewrite set corresponding to each historical generalized query information based on the generalized total set and the aggregated statistical data; a push module, configured to push all the historical generalized query information and the candidate rewrite set corresponding to each historical generalized query information to an online remote dictionary service; and a real-time rewrite module, configured to read the corresponding candidate rewrite set from the online remote dictionary service based on the real-time query information input by the user when receiving real-time query information input by the user; the step of obtaining the generalized total set and aggregated statistical data including multiple historical generalized query information based on the user behavior log data includes: processing each historical query information in the user behavior log data... The information is processed into corresponding historical generalized query information to obtain a generalized set; multi-dimensional aggregation statistics are performed based on the user behavior log data and the generalized set to obtain aggregated statistical data; determining the candidate rewrite set corresponding to each historical generalized query information based on the generalized set and the aggregated statistical data includes: calculating the similarity value between any two historical generalized query information in the generalized set according to the optimized Swing algorithm to obtain similarity data; determining the candidate rewrite set corresponding to each historical generalized query information based on the similarity data; pushing all historical generalized query information and the candidate rewrite set corresponding to each historical generalized query information to an online remote dictionary service includes: obtaining the search city information corresponding to each historical generalized query information; generating key information with each historical generalized query information and its corresponding search city information, and using the candidate rewrite set corresponding to the historical generalized query information as the value information corresponding to the key information to obtain multiple sets of key-value pairs; pushing the multiple sets of key-value pairs to an online remote dictionary service.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Deep question answering-based questions and answers clarifying method and device

    CN106649768A

  • Query processing method and device

    CN110442696A