Point of interest recall method, apparatus, computer device and storage medium

By constructing a multi-task comparison retrieval model and a vector index library, the problem of inaccurate point of interest recall was solved, achieving more accurate point of interest recall and meeting user needs.

CN117112930BActive Publication Date: 2026-04-14SHENZHEN YISHIHUOLALA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-06
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing technologies sometimes miss points of interest when recalling points of interest because the query text is too simple, preventing users from selecting the addresses they want.

Method used

A multi-task comparative retrieval model is constructed. The model is trained using a training sample set and city distribution information. Interest point embeddings are generated and a vector index library is established. Relevant interest points are recalled using query text embeddings and the vector index library.

Benefits of technology

To avoid missing points of interest in search results, retrieve points of interest that better meet user needs and improve the accuracy of address searches.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117112930B_ABST
    Figure CN117112930B_ABST
Patent Text Reader

Abstract

The application relates to a point-of-interest recall method and device, computer equipment and a storage medium. The method comprises the following steps: constructing a training sample set and order placing city distribution information according to a plurality of historical user order placing logs; dividing the training sample set into a plurality of groups, and performing first-stage training and second-stage training on a multi-task contrast retrieval model comprising a first model and a second model according to the plurality of groups of training samples; producing corresponding point-of-interest embeddings for each point of interest in a point-of-interest library through the first model in the trained multi-task contrast retrieval model, performing vector indexing according to the obtained point-of-interest embeddings, and obtaining a vector index library; and inferring corresponding query text embeddings for real-time query text and real-time city parameters carried by a location search request through the second model, and recalling a plurality of points of interest as relevance recall results according to the query text embeddings and the vector index library. The application can avoid the situation of missing point-of-interest recall, and provide more accurate points of interest for users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of address search technology, and in particular to a method, apparatus, computer device, and storage medium for recalling points of interest. Background Technology

[0002] In freight transportation scenarios, when placing a freight order, users can enter query text on the search page of their terminal to search for the origin or destination of the freight order. After receiving the search request from the user terminal, the server extracts the query text and city information from the search request, and based on the extracted information, retrieves some points of interest and returns them to the user terminal for display. Users can see the points of interest returned by the server on this page and then select a location.

[0003] Currently, when recalling points of interest, it is usually done directly based on the query text entered by the user. This method may lead to missed points of interest due to the overly simple query text, thus preventing users from selecting the address they want. Summary of the Invention

[0004] To address the aforementioned deficiencies or shortcomings, this application provides a method, apparatus, computer device, and storage medium for recalling points of interest. The embodiments of this application can avoid the situation of missed recall of points of interest and can recall points of interest that better meet the user's needs for the user to select.

[0005] This application provides a point-of-interest (POI) recall method according to a first aspect. In one embodiment, the method includes:

[0006] A training sample set and order distribution information for each city are constructed based on multiple historical user order logs within a preset time period. Each training sample in the training sample set includes historical query text, historical city parameters, and order point of interest information. The order point of interest information includes the name, address, and category of the order point of interest. The order distribution information for each city includes the distribution ratio of each type of historical query text for each order city.

[0007] The training sample set is divided into multiple groups. Based on the above multiple groups of training samples, the multi-task comparison retrieval model, including the first model and the second model, is trained in the first stage and the second stage. During the first stage of training, the order placement interest points in each training sample are used as positive samples, and each other training sample in the same group as each training sample is used as a negative sample. During the second stage of training, the order placement interest points in each training sample are used as positive samples, and the other training samples in the same group as each training sample with the highest similarity are used as negative samples.

[0008] The first model in the trained multi-task comparison retrieval model generates corresponding interest point embeddings for each interest point in the interest point library offline. Vector indexing is performed based on the obtained interest point embeddings to obtain a vector index library.

[0009] In response to a location search request from a user terminal, the second model in the pre-trained multi-task comparison retrieval model is used to infer the corresponding query text embedding for the real-time query text and real-time city parameters carried in the location search request online. Based on the query text embedding and the vector index library, multiple points of interest are recalled as relevance recall results.

[0010] In some embodiments, when training the multi-task comparison retrieval model in the first stage based on the multiple sets of training samples, each set of training samples is sequentially input into the multi-task comparison retrieval model twice.

[0011] When training the multi-task comparison retrieval model using the above multiple sets of training samples in the second stage, each set of training samples is input into the multi-task comparison retrieval model once.

[0012] In some embodiments, L stage1 The loss function of the aforementioned multi-task comparison retrieval model is used for the first stage of training;

[0013] L stage1 =L city +L mlm +L rdrop +L cl

[0014]

[0015]

[0016] L rdrop =1 / 2*(KL(q) emb1 ||q emb2 )+KL(q emb2 ||q emb1 )+1 / 2*(KL(p emb1 ||p emb2 )+KL(p emb2 ||P emb1 ))

[0017]

[0018] Where n in Lcity is the total number of cities. It represents the distribution ratio of the i-th city in the order placement city distribution information. It is the predicted distribution ratio of the i-th city; q represents the true probability predicted from the masked character. emb1 and q emb2 These are two embedded pieces of information obtained from the same historical query text through the second model; p emb1 and p emb2 These are two embedded pieces of information obtained by processing the same order placement interest point information through the first model;

[0019] L cl In this context, N refers to the number of training samples in each group during training; q emb It is embedded information of the currently used historical query text. This is the embedded information of the order placement interest information corresponding to the historical query text. It is the embedding information of the i-th single-transmitter interest point information in the same set of training samples; p emb It is the embedded information of the currently input order placement point of interest information. It is the embedded information of the historical query text corresponding to the point of interest information of this order. It is the embedding information of the i-th historical query text in the same training sample group; τ is the temperature coefficient, set to 0.05.

[0020] In some embodiments, L stage2 The loss function of the aforementioned multi-task comparison retrieval model is used for the second stage of training;

[0021]

[0022] Where, q emb It is embedded information of the currently entered historical query text. It is the embedded information of the order placement interest information corresponding to the historical query text, and Except for the same group of training samples outside and q emb The embedding information of the most similar order interest points, with a margin set to 0.15.

[0023] In some embodiments, multiple points of interest are retrieved as relevance retrieval results based on query text embeddings and a vector index library, including:

[0024] The query text is embedded into the input vector index library to obtain multiple interest point embeddings;

[0025] The above multiple points of interest are embedded into the corresponding points of interest as the relevance recall result.

[0026] In some embodiments, when training the multi-task comparative retrieval model described above, the point of interest information is used as the input of the first model, and the historical query text and historical city parameters in each training sample are used as the input of the second model.

[0027] The output of the first model is the interest point embedding, and the output of the second model is the query text embedding. The interest point embedding refers to the embedding information of interest point information, and the query text embedding refers to the embedding information of query text.

[0028] In some embodiments, the above method further includes:

[0029] A routine recall is performed based on the real-time query text and real-time city parameters to obtain routine recall results.

[0030] The regular recall results and the relevant recall results are deduplicated, and the processed results are used as search results to respond to the user terminal.

[0031] This application provides a point-of-interest recall device according to a second aspect. In one embodiment, the device includes:

[0032] The construction module is used to construct a training sample set and order distribution information based on multiple historical user order logs within a preset time period. Each training sample in the training sample set includes historical query text, historical city parameters, and order point of interest information. The order point of interest information includes the name, address, and category of the order point of interest. The order distribution information includes the distribution ratio of each order city corresponding to each type of historical query text.

[0033] The training module is used to divide the training sample set into multiple groups, and to perform first-stage training and second-stage training on the multi-task comparison retrieval model, including the first model and the second model, based on the above multiple groups of training samples. During the first-stage training, the order placement interest points in each training sample are used as positive samples, and each other training sample in the same group as each training sample is used as a negative sample. During the second-stage training, the order placement interest points in each training sample are used as positive samples, and the other training samples in the same group as each training sample with the highest similarity are used as negative samples.

[0034] The offline production module is used to generate corresponding interest point embeddings for each interest point in the interest point library offline using the first model in the trained multi-task comparison retrieval model. Vector indexing is performed based on the obtained interest point embeddings to obtain a vector index library.

[0035] The online response module is used to respond to location search requests from user terminals. It uses the second model in the pre-trained multi-task comparison retrieval model to infer the corresponding query text embedding for the real-time query text and real-time city parameters carried in the location search request. Based on the query text embedding and the vector index library, it recalls multiple points of interest as relevance recall results.

[0036] 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.

[0037] 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.

[0038] In this embodiment, to address the shortcomings of related technologies, a multi-task comparison retrieval model is constructed. This model includes a first model and a second model. During training, a first-stage training and a second-stage training are required. After the multi-task comparison retrieval model is trained, the first model can be used to generate point-of-interest (POI) embeddings offline, and vector indexing can be performed based on the generated POI embeddings to build a vector index library. The second model is used to infer the corresponding query text embeddings online for the real-time query text and real-time city parameters in the location search request received by the server. Subsequently, multiple POIs can be recalled as relevance recall results based on the query text embeddings and the vector index library. This embodiment can avoid the situation of missed POI recall and can recall POIs that better meet the user's needs for location selection. Attached Figure Description

[0039] Figure 1 This is a flowchart illustrating a point-of-interest (POI) retrieval method in one embodiment.

[0040] Figure 2 A flowchart illustrating an example of point-of-interest (POI) recall in one embodiment;

[0041] Figure 3 This is a schematic diagram of the model design for a multi-task comparison retrieval model in one embodiment;

[0042] Figure 4 This is a structural block diagram of a point-of-interest recall device in one embodiment;

[0043] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0044] 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.

[0045] This application provides a point-of-interest (POI) retrieval method. In some embodiments, this POI retrieval method can be applied to a server responding to a user's location search request; the server can be a standalone server or a server cluster. The method includes, for example: Figure 1 The steps shown are described below, and each step of the method will be explained in detail below.

[0046] S110: Construct a training sample set and order distribution information based on multiple historical user order logs within a preset time period.

[0047] The method provided in this application can be used in scenarios where users search for freight addresses in real time. Users can send a location search request to a server via a user terminal. This request carries real-time query text input by the user (including at least one character) and real-time city parameters (specifically, a city code or city name). The user terminal is a computing device used by the user, which can be a smartphone, tablet, or other smart mobile device. The query text in this application is typically referred to as a query in English.

[0048] User order logs record the query text, city parameters, and point of interest information corresponding to the freight orders initiated by users. This includes important information such as the name, address, and category of the point of interest selected by the user from multiple searched points of interest based on the query text and city parameters. Historical user order logs refer to user order logs whose operation time is before the current time.

[0049] Each historical user order log can be used to construct a corresponding training sample. Each training sample in the training sample set includes historical query text, historical city parameters, and order placement interest point information, which includes the name, address, and category of the order placement interest point.

[0050] The order placement city distribution information includes the distribution ratio of each order placement city corresponding to each type of historical query text. Considering that users may include city parameters when searching for origin and / or destination in freight scenarios, and users may have cross-city intentions, such as originating in "Guangzhou" but searching for destination in "Nanjing", this embodiment also labels cities, that is, it counts the distribution ratio of different order placement cities under the same query text, and uses this as the truth value of multi-label. Among them, the same historical query text in different historical user order placement logs is considered to be the same historical query text. For example, assuming that a certain historical query text is "Guomao Center", the order placement cities corresponding to this historical query text are "Wuhan", "Chongqing", "Shenzhen" and "Chengdu", and the number of orders for each city are "6", "3", "4" and "5" respectively, then the distribution ratios of each city can be calculated as [0.3333, 0.1667, 0.2222, 0.2778].

[0051] S120: Divide the training sample set into multiple groups, and perform the first stage training and the second stage training on the multi-task comparison retrieval model, including the first model and the second model, based on the above multiple groups of training samples.

[0052] When constructing the training sample set, the positive samples selected in the first and second training phases are the same, while the negative samples employ different strategies. Specifically, in the first training phase, the points of interest in each training sample are used as positive samples, and each other training sample in the same group as each training sample is used as a negative sample; in the second training phase, the points of interest in each training sample are used as positive samples, and the other training samples in the same group with the highest similarity to each training sample are used as negative samples.

[0053] When training the above multi-task comparative retrieval model, the point of interest information is used as the input of the first model, and the historical query text and historical city parameters in each training sample are used as the input of the second model. The output of the first model is the point of interest embedding, and the output of the second model is the query text embedding. Point of interest embedding refers to the embedding information of point of interest information, and query text embedding refers to the embedding information of query text.

[0054] This embodiment focuses on the design of the loss function during training, where L... stage1 The loss function of the aforementioned multi-task comparison retrieval model is used for the first stage of training; with L stage2 The loss function of the aforementioned multi-task comparative retrieval model is used for the second stage of training. The following section discusses L... stage1 and L stage2 Please provide a detailed explanation.

[0055] The following is L stage1 The calculation formula is as follows:

[0056] L stage1 =L city +L mlm +L rdrop +L cl

[0057]

[0058]

[0059] L rdrop =1 / 2*(KL(q) emb1 ||q emb2 )+KL(q emb2 ||q emb1 )+1 / 2*(KL(p emb1 ||p emb2 )+KL(p emb2 ||pemb1 ))

[0060]

[0061] Where n in Lcity is the total number of cities. It represents the distribution ratio of the i-th city in the order placement city distribution information. It is the predicted distribution ratio of the i-th city; q represents the true probability predicted from the masked character. emb1 and q emb2 These are two embedded pieces of information obtained from the same historical query text through the second model; q emb1 and q emb2 These are two embedded pieces of information obtained by processing the same order placement interest point information through the first model;

[0062] L cl In this context, N refers to the number of training samples in each group during training; q emb It is embedded information of the currently used historical query text. This is the embedded information of the order placement interest information corresponding to the historical query text. It is the embedding information of the i-th single-transmitter interest point information in the same set of training samples; p emb It is the embedded information of the currently input order placement point of interest information. It is the embedded information of the historical query text corresponding to the point of interest information of this order. It is the embedding information of the i-th historical query text in the same training sample group; τ is the temperature coefficient, set to 0.05.

[0063] The following is L stage2 The calculation formula is as follows:

[0064]

[0065] Where, q emb It is embedded information of the currently entered historical query text. It is the embedded information of the order placement interest information corresponding to the historical query text, and Except for the same group of training samples outside and q emb The embedding information of the most similar order interest points, with a margin set to 0.15.

[0066] S130: The first model in the trained multi-task comparison retrieval model generates corresponding interest point embeddings for each interest point in the interest point library offline. Vector indexing is performed based on the obtained interest point embeddings to obtain a vector index library.

[0067] Vector indexing and the construction of vector index libraries can be achieved through vector search engines such as Milvus. Vector search engines can help users easily handle the retrieval of massive amounts of unstructured data (such as images / videos / audio / text).

[0068] S140: In response to a location search request from a user terminal, the second model in the pre-trained multi-task comparison retrieval model above is used to infer the corresponding query text embedding for the real-time query text and real-time city parameters carried in the location search request online. Based on the query text embedding and the vector index library, multiple points of interest are recalled as relevance recall results.

[0069] After the multi-task comparison retrieval model is trained, the second model can be deployed to a cloud server, such as an OSS (Object Storage Service) server. The server can then load the second model online and use it for real-time inference, that is, infer the real-time query text input by the user and the query text embedding corresponding to the real-time city parameters. Then, the query text embedding is used to perform relevance retrieval.

[0070] In some implementations, multiple points of interest are retrieved as relevance retrieval results based on query text embeddings and a vector index library, including: inputting query text embeddings into a vector index library to obtain multiple points of interest embeddings; embedding the aforementioned multiple points of interest into corresponding points of interest as relevance retrieval results.

[0071] In some embodiments, the method further includes: performing a regular recall based on the real-time query text and real-time city parameters to obtain a regular recall result; deduplicating the regular recall result and the relevance recall result, and responding to the user terminal with the processed result as a search result. The aforementioned regular recall can be an existing method of recalling points of interest based on words or literal meaning. This embodiment adds a relevance recall path to the regular recall, thereby avoiding missed recalls of points of interest and providing users with more accurate points of interest.

[0072] The following is through Figure 2The flowcharts illustrating some examples of point-of-interest (POI) retrieval explain the training data construction and model training in the above embodiments. In this example, historical user order logs within a preset time period are collected from the order log table (a data table used to store user order logs). The collected logs are used to construct training data and aggregate statistical information on the distribution of order cities (i.e., city multi-label distribution). When constructing training data, positive samples are selected from the historical query text and city parameters corresponding to the POIs in the currently used training samples. Negative samples are selected using different strategies depending on the training stage. In the first stage of training, easy negative samples are used, specifically every training sample other than the positive samples in the same batch. In the second stage of training, hard negative samples are used, that is, the training sample with the highest vector cosine similarity score with the positive samples in the same batch.

[0073] The training of the multi-task comparison retrieval model in this example is explained below. Please refer to [link / reference]. Figure 3 , Figure 3 The diagram shows the design of a multi-task comparison retrieval model. Figure 3 As can be seen, the multi-task comparison retrieval model consists of two parts: the POI tower (the first model) and the query tower (the second model). The query tower is initialized using a 4-layer, 12-head pre-trained model, while the POI tower is initialized using a 6-layer, 6-head pre-trained model. The input to the query tower is the query text and city parameters, which, after passing through the query encoder, yield the query embedding. The input to the POI tower is the name, address, and category of the point of interest, and the output is the POI embedding. The pre-trained models mentioned above can be BERT (Bidirectional Encoder Representation from Transformers), Ernie (Enhanced Representation through Knowledge Integration), Roberta (Robustly optimized BERT approach), Simbert (a model based on the BERT model and designed using Microsoft's UniLM concept), etc.

[0074] During the first phase of training, the aforementioned L... stage1 As the loss function, during the second stage of training, the aforementioned L... stage2 Let L be the loss function. stage1Specifically, it includes four parts of loss, which correspond to four types of learning tasks, namely L city (i.e., the city multi-label loss in the diagram) is the cross-city intent training task on the query side, L mlm (i.e., MMLLoss in the diagram) is the query-side mask language model learning task. rdrop (i.e., R-Loss in the diagram) is the robust learning task for query embedding and POI embedding, L cl The most important learning task is Batch Negative Loss (as shown in the diagram), which uses contrastive learning to learn the similarity between query embedding and poiembedding.

[0075] In this example, because the multi-task comparison retrieval model has a dropout layer, there are distribution differences, but theoretically they need to be consistent. Therefore, L... rdrop To make query embedding and POI embedding more robust. In L rdrop The middle involves q emb1 q emb2 p emb1 and p emb2 Therefore, during the first stage of training, each training sample must be sequentially input into the multi-task comparison retrieval model twice in order to obtain the relevant information of the above four parameters.

[0076] In the first phase of training, L stage1 Once the training has stabilized, the second phase of training can begin. The focus of the second phase is learning how to distinguish more difficult negative samples. Regarding L... stage2 The explanation can be found in the description of the above embodiments, and will not be repeated here. During the second stage of training, each group of training samples only needs to be input into the multi-task comparison retrieval model once.

[0077] During model training, various deep learning frameworks such as TensorFlow can be used, and a V100 graphics card can be used. In the model parameter settings, the batch size (specifying the number of training samples in a set) can be set to 196 in the first stage and 400 in the second stage. The AdamW optimizer is used, and early stopping is set for the loss function. If the first stage training iterations are preset to 15 times, L... stage1 If there is no decrease, training is terminated; then the second phase of training begins, iterating the same number of times as preset, such as 15 times, until L... stage2Stop training if there is no decline.

[0078] It should be noted that during the first stage of training, when feeding a set of training samples to the model, these samples need to be input twice in sequence. Therefore, the batch size for the first stage of training is set to 196, but the actual batch size received by the model is 196 * 2. Furthermore, in optimizing L... cl In the first stage, negative samples are defined as all samples in the same batch except for positive samples, meaning the ratio of positive to negative samples is 1:195. However, in the second stage of training, when a set of training samples is fed into the model, it only needs to be input sequentially once. Therefore, the batch size for the second stage of training is set to 400, and the actual batch size received by the model is also 400. Furthermore, in optimizing L... stage2 When the selected negative sample is a hard negative sample, the ratio of positive sample to negative sample is 1:1.

[0079] In this example, a Multi-Task Contrastive Retrieval Model (MTCRM) was specifically built for the freight business scenario. A two-stage training approach was designed, with the first stage including four learning tasks (e.g., through L...). city To better align with freight business scenarios and learn users' cross-city intentions, a learning task was designed in the second stage of training to learn how to distinguish hard negative samples. After training multiple task-based comparative retrieval models, the query tower (the second model) was used for online real-time query relevance recall. By adding online relevance recall to the conventional recall, the limitations of the existing Boolean retrieval framework can be overcome, helping to address the shortcomings of previous word- or literal-based recall, and thus avoiding missed recalls due to simple text matching.

[0080] Figure 1 This is a flowchart illustrating a point-of-interest (POI) retrieval method in one embodiment. It should be understood that, although... Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process 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 executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0081] Based on the same inventive concept, this application also provides a point-of-interest recall device. In this embodiment, such as Figure 4 As shown, the device includes the following modules:

[0082] The construction module 110 is used to construct a training sample set and order distribution information based on multiple historical user order logs within a preset time period. Each training sample in the training sample set includes historical query text, historical city parameters, and order point of interest information. The order point of interest information includes the name, address, and category of the order point of interest. The order distribution information includes the distribution ratio of each order city corresponding to each type of historical query text.

[0083] The training module 120 is used to divide the training sample set into multiple groups, and to perform first-stage training and second-stage training on the multi-task comparison retrieval model, including the first model and the second model, based on the multiple groups of training samples. During the first-stage training, the order placement interest points in each training sample are used as positive samples, and each other training sample in the same group as each training sample is used as a negative sample. During the second-stage training, the order placement interest points in each training sample are used as positive samples, and the other training samples in the same group as each training sample with the highest similarity are used as negative samples.

[0084] The offline production module 130 is used to generate corresponding interest point embeddings for each interest point in the interest point library offline using the first model in the trained multi-task comparison retrieval model, and to perform vector indexing based on the obtained interest point embeddings to obtain a vector index library.

[0085] The online response module 140 is used to respond to location search requests from user terminals. It uses the second model in the pre-trained multi-task comparison retrieval model to infer the corresponding query text embedding for the real-time query text and real-time city parameters carried in the location search request online. Based on the query text embedding and the vector index library, it recalls multiple points of interest as relevance recall results.

[0086] In some embodiments, when the training module 120 performs the first stage training of the multi-task comparison retrieval model based on the multiple sets of training samples, it sequentially inputs each set of training samples twice into the multi-task comparison retrieval model; and when it performs the second stage training of the multi-task comparison retrieval model based on the multiple sets of training samples, it inputs each set of training samples once into the multi-task comparison retrieval model.

[0087] In some embodiments, the training module 120 uses L stage1 The loss function of the aforementioned multi-task comparison retrieval model is used for the first stage of training;

[0088] L stage1 =Lcity +L mlm +L rdrop +L ct

[0089]

[0090]

[0091] L rdrop =1 / 2*(KL(q) emb1 ||q emb2 )+KL(q emb2 ||q emb1 )+1 / 2*(KL(p emb1 ||p emb2 )+KL(p emb2 ||P emb1 ))

[0092]

[0093] Where n in Lcity is the total number of cities. It represents the distribution ratio of the i-th city in the order placement city distribution information. It is the predicted distribution ratio of the i-th city; q represents the true probability predicted from the masked character. emb1 and q emb2 These are two embedded pieces of information obtained from the same historical query text through the second model; p emb1 and q emb2 These are two embedded pieces of information obtained by processing the same order placement interest point information through the first model;

[0094] L cl In this context, N refers to the number of training samples in each group during training; q emb It is embedded information of the currently used historical query text. This is the embedded information of the order placement interest information corresponding to the historical query text. It is the embedding information of the i-th single-transmitter interest point information in the same set of training samples; p emb It is the embedded information of the currently input order placement point of interest information. It is the embedded information of the historical query text corresponding to the point of interest information of this order. It is the embedding information of the i-th historical query text in the same training sample group; τ is the temperature coefficient, set to 0.05.

[0095] In some embodiments, the training module 120 uses L stage2 The loss function of the aforementioned multi-task comparison retrieval model is used for the second stage of training;

[0096]

[0097] Where, q emb It is embedded information of the currently entered historical query text. It is the embedded information of the order placement interest information corresponding to the historical query text, and Except for the same group of training samples outside and q emb The embedding information of the most similar order interest points, with a margin set to 0.15.

[0098] In some embodiments, when the online response module 140 recalls multiple points of interest as relevance recall results based on the query text embedding and the vector index library, it is used to input the query text embedding into the vector index library to obtain multiple points of interest embeddings; and to embed the above multiple points of interest into the corresponding points of interest as relevance recall results.

[0099] In some embodiments, when training the multi-task comparison retrieval model, the training module 120 uses the point of interest information as the input of the first model and the historical query text and historical city parameters in each training sample as the input of the second model; wherein, the output of the first model is the point of interest embedding and the output of the second model is the query text embedding; point of interest embedding refers to the embedding information of point of interest information, and query text embedding refers to the embedding information of query text.

[0100] In some embodiments, the above-described apparatus further includes:

[0101] The routine recall module is used to perform routine recall based on real-time query text and real-time city parameters to obtain routine recall results.

[0102] The terminal response module is used to deduplicatize the regular recall results and the relevant recall results, and then respond to the user terminal with the processed results as search results.

[0103] For specific limitations regarding the point-of-interest (POI) retrieval device, please refer to the limitations on the POI retrieval method above, which will not be repeated here. Each module in the aforementioned POI retrieval 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 a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0104] In one embodiment, a computer device is provided, the internal structure of which can be shown as follows: Figure 5As shown, 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 the operating system, computer programs, and the 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 historical user order logs, training datasets, and other data; the specific data stored may also be as defined in the above method embodiments. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a point-of-interest (POI) recall method.

[0105] Those skilled in the art will understand that Figure 5 The structure shown 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.

[0106] 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.

[0107] 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.

[0108] 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.

[0109] 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.

[0110] 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 recalling points of interest, characterized in that, The method includes: A training sample set and order distribution information for each city are constructed based on multiple historical user order logs within a preset time period. Each training sample in the training sample set includes historical query text, historical city parameters, and order point of interest information. The order point of interest information includes the name, address, and category of the order point of interest. The order distribution information for each city includes the distribution ratio of each type of historical query text for each order city. The training sample set is divided into multiple groups, and a multi-task comparison retrieval model including a first model and a second model is trained in the first stage and the second stage according to the multiple groups of training samples. In the first stage of training, the order placement interest points in each training sample are used as positive samples, and each other training sample in the same group as each training sample is used as a negative sample. In the second stage of training, the order placement interest points in each training sample are used as positive samples, and the other training samples in the same group as each training sample with the highest similarity are used as negative samples. The first model in the trained multi-task comparison retrieval model generates corresponding interest point embeddings for each interest point in the interest point library offline, and performs vector indexing based on the obtained interest point embeddings to obtain a vector index library. In response to a location search request from a user terminal, the second model in the trained multi-task comparison retrieval model infers the corresponding query text embedding online for the real-time query text and real-time city parameters carried by the location search request, and recalls multiple points of interest as relevance recall results based on the query text embedding and the vector index library.

2. The method as described in claim 1, characterized in that, When training the multi-task comparison retrieval model based on the multiple sets of training samples in the first stage, each set of training samples is sequentially input into the multi-task comparison retrieval model twice. When training the multi-task comparison retrieval model in the second stage based on the multiple sets of training samples, each set of training samples is input into the multi-task comparison retrieval model once.

3. The method as described in claim 2, characterized in that, With L stage1 The first stage of training is performed using the loss function of the multi-task comparison retrieval model. L stage1 =L city +L mlm +L rdrop +L cl L rdrop =1 / 2*(KL(q emb1 ||q emb2 )+KL(q emb2 ||q emb1 ))+1 / 2*(KL(p emb1 ||p emb2 )+KL(p emb2 ||p emb1 )) Where n in Lcity is the total number of cities. It represents the distribution ratio of the i-th city in the order placement city distribution information. It is the predicted distribution ratio of the i-th city; q represents the true probability predicted from the masked character. emb1 and q emb2 These are two embedded pieces of information obtained from the same historical query text through the second model; p emb1 and p emb2 These are two embedded information pieces obtained by processing the same order placement interest point information through the first model; L cl In this context, N refers to the number of training samples in each group during training; q emb It is embedded information of the currently used historical query text. This is the embedded information of the order placement interest information corresponding to the historical query text. It is the embedding information of the i-th single-transmitter interest point information in the same set of training samples; p emb It is the embedded information of the currently input order placement point of interest information. It is the embedded information of the historical query text corresponding to the point of interest information of this order. It is the embedding information of the i-th historical query text in the same training sample group; τ is the temperature coefficient, set to 0.

05.

4. The method as described in claim 3, characterized in that, With L stage2 The second stage of training is performed using the loss function of the multi-task comparison retrieval model. Where, q emb It is embedded information of the currently entered historical query text. It is the embedded information of the order placement interest information corresponding to the historical query text, and Except for the same group of training samples outside and q emb The embedding information of the most similar order interest points, with a margin set to 0.

15.

5. The method as described in claim 1, characterized in that, Based on the query text embedding and the vector index, multiple points of interest are retrieved as relevance retrieval results, including: The query text is embedded and input into the vector index library to obtain multiple interest point embeddings; The multiple points of interest are embedded into the corresponding points of interest as the relevance recall result.

6. The method as described in claim 1, characterized in that, When training the multi-task comparison retrieval model, the order placement interest information is used as the input of the first model, and the historical query text and historical city parameters in each training sample are used as the input of the second model. The output of the first model is the interest point embedding, and the output of the second model is the query text embedding; the interest point embedding refers to the embedding information of interest point information, and the query text embedding refers to the embedding information of query text.

7. The method as described in claim 1, characterized in that, The method further includes: Based on the real-time query text and the real-time city parameters, a routine recall is performed to obtain the routine recall results; The regular recall results and the relevant recall results are deduplicated, and the deduplicated results are used as search results to respond to the user terminal.

8. A point-of-interest recall device, characterized in that, The device includes: The construction module is used to construct a training sample set and order distribution information based on multiple historical user order logs within a preset time period. Each training sample in the training sample set includes historical query text, historical city parameters, and order point of interest information. The order point of interest information includes the name, address, and category of the order point of interest. The order distribution information includes the distribution ratio of each order city corresponding to each type of historical query text. The training module is used to divide the training sample set into multiple groups, and to perform a first-stage training and a second-stage training on the multi-task comparison retrieval model, which includes a first model and a second model, based on the multiple groups of training samples. During the first-stage training, the order placement interest points in each training sample are used as positive samples, and each other training sample in the same group as each training sample is used as a negative sample. During the second-stage training, the order placement interest points in each training sample are used as positive samples, and the other training samples in the same group as each training sample with the highest similarity are used as negative samples. The offline production module is used to generate corresponding interest point embeddings for each interest point in the interest point library offline using the first model in the trained multi-task comparison retrieval model, and to perform vector indexing based on the obtained interest point embeddings to obtain a vector index library. The online response module is used to respond to location search requests from user terminals. It uses the second model in the trained multi-task comparison retrieval model to infer the corresponding query text embedding for the real-time query text and real-time city parameters carried in the location search request online. Based on the query text embedding and the vector index library, it recalls multiple points of interest as relevance recall results.

9. 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 7.

10. 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 7.

Citation Information

Patent Citations

  • Recall model training method and device, search recall method and device and computer equipment

    CN113505204A