CN117112930A - Point-of-interest recall method, point-of-interest recall device, computer equipment and storage medium - Google Patents

Point-of-interest recall method, point-of-interest recall device, computer equipment and storage medium Download PDF

Info

Publication number
CN117112930A
CN117112930A CN202311148440.7A CN202311148440A CN117112930A CN 117112930 A CN117112930 A CN 117112930A CN 202311148440 A CN202311148440 A CN 202311148440A CN 117112930 A CN117112930 A CN 117112930A
Authority
CN
China
Prior art keywords
training
model
interest
query text
interest point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311148440.7A
Other languages
Chinese (zh)
Inventor
李祥歌
沈奇
赵骥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yishi Huolala Technology Co Ltd
Original Assignee
Shenzhen Yishi Huolala Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Yishi Huolala Technology Co Ltd filed Critical Shenzhen Yishi Huolala Technology Co Ltd
Priority to CN202311148440.7A priority Critical patent/CN117112930A/en
Publication of CN117112930A publication Critical patent/CN117112930A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Human Resources & Organizations (AREA)
  • Remote Sensing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a point-of-interest recall method, a point-of-interest recall device, computer equipment and a storage medium. The method comprises the following steps: constructing a training sample set and distribution information of a bill city according to a plurality of historical user bill journals; dividing the training sample set into a plurality of groups, and performing first-stage training and second-stage training on a multi-task comparison search model comprising a first model and a second model according to the plurality of groups of training samples; generating corresponding interest point embedments for each interest point in the interest point library through a first model offline in the trained multi-task comparison search model, and carrying out vector indexing according to the obtained interest point embedments to obtain a vector index library; and deducing the corresponding query text embedding for the real-time query text and the real-time city parameters carried by the position search request on line through the second model, and recalling a plurality of interest points as relevance recall results according to the query text embedding and the vector index library. The method and the device can avoid the condition of missing recall of the interest points and provide more accurate interest points for users.

Description

Point-of-interest recall method, point-of-interest recall device, computer equipment and storage medium
Technical Field
The present application relates to the field of address searching technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for recall of points of interest.
Background
In the freight service scenario, when a user places a freight order, a search text may be entered on a search page on the user terminal, thereby searching for a start point or an end point of the freight order. After receiving the search request initiated by the user terminal, the server extracts the query text and city information in the search request, recalls some interest points based on the extracted information and returns the interest points to the user terminal for display, and the user can see the interest points returned by the server on the page so as to select addresses.
At present, when the interest point is recalled, the interest point is usually recalled directly based on the query text input by the user, and the interest point is missed to be recalled due to the fact that the query text is too simple, so that the user cannot select a desired address.
Disclosure of Invention
Aiming at the defects or shortcomings, the application provides an interest point recall method, an interest point recall device, computer equipment and a storage medium.
The present application provides, according to a first aspect, a point of interest recall method, in one embodiment, comprising:
constructing a training sample set and distribution information of a bill city according to a plurality of historical user bill journals in a preset time period in the past; each training sample in the training sample set comprises a history query text, a history city parameter and a list of interest point information, wherein the list of interest point information comprises the name, address and category of the list of interest point; the distribution information of the issuing list cities comprises the distribution proportion of each issuing list city corresponding to each historical query text;
dividing the training sample set into a plurality of groups, and performing first-stage training and second-stage training on a multi-task comparison search model comprising a first model and a second model according to the plurality of groups of training samples; in the first stage of training, taking a single interest point in each training sample as a positive sample, and taking each other training sample in the same group as each training sample as a negative sample; in the second stage training, the single interest point in each training sample is taken as a positive sample, and other training samples which are the same group as each training sample and have the highest similarity are taken as negative samples;
generating corresponding interest point embedments for each interest point in the interest point library through a first model offline in the trained multi-task comparison search model, and carrying out vector indexing according to the obtained interest point embedments to obtain a vector index library;
responding to a position searching request from a user terminal, deducing a corresponding query text embedding for a real-time query text and real-time city parameters carried by the position searching request through a second model in the trained multi-task comparison searching model on line, and recalling a plurality of interest points as correlation recall results according to the query text embedding and a vector index library.
In some embodiments, when the multi-task comparative search model is trained according to the plurality of sets of training samples in the first stage, each set of training samples is sequentially input into the multi-task comparative search model twice;
when the multi-task comparison search model is trained in the second stage according to the plurality of groups of training samples, each group of training samples is input into the multi-task comparison search model once.
In some embodiments, at L stage1 Performing a first-stage training as a loss function of the multi-task comparison search 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 number of all cities,is the distribution proportion of the ith city in the distribution information of the issuing single city,/the distribution proportion of the ith city in the issuing single city distribution information>Is the predicted distribution ratio of the ith city; />True probabilities predicted for the masked characters; q emb1 And q emb2 Two embedded information obtained by the same historical query text through a second model; p is p emb1 And p emb2 Two pieces of embedded information obtained by the same bill-issuing interest point information through a first model;
L cl n in (2) refers to the number of training samples in each group during training; q emb Is embedded information of the history query text currently used,is embedded information of the point of interest of the bill corresponding to the historical query text,/item>Is embedded information of other ith issuing interest point information in the same group of training samples; p is p emb Is the embedded information of the currently input list interest point information,>is embedded information of the history inquiry text corresponding to the single interest point information,/>Is embedded information of other ith historical query texts in the same group of training samples; τ is the temperature coefficient, set to 0.05.
In some embodiments, at L stage2 Training the second stage as a loss function of the multi-task comparison search model;
wherein q emb Is embedded information of the currently input historical query text,is embedded information of the point of interest of the bill corresponding to the historical query text, and +.>Is the same group training sample except +.>External and q emb Embedding information of the single interest point information with the highest similarity, wherein the margin is set to 0.15.
In some embodiments, recalling multiple points of interest as relevance recall results from a query text embedding and vector index library includes:
embedding the query text into an input vector index library to obtain a plurality of embedded interest points;
embedding the plurality of interest points into corresponding interest points to serve as a correlation recall result.
In some embodiments, when the multi-task comparison search model is trained, the single interest point information is used as the input of a first model, and the historical query text and the historical city parameters in each training sample are used as the input of a second model;
the output of the first model is interest point embedding, and the output of the second model is query text embedding; the interest point embedding refers to the embedding information of the interest point information, and the query text embedding refers to the embedding information of the query text.
In some embodiments, the above method further comprises:
performing conventional recall according to the real-time query text and the real-time city parameters to obtain a conventional recall result;
and carrying out de-duplication processing on the conventional recall result and the correlation recall result, and responding the processing result as a search result to the user terminal.
The present application provides, according to a second aspect, a point of interest recall device, in one embodiment, comprising:
the construction module is used for constructing a training sample set and distribution information of the bill city according to a plurality of historical user bill journals in the past preset time period; each training sample in the training sample set comprises a history query text, a history city parameter and a list of interest point information, wherein the list of interest point information comprises the name, address and category of the list of interest point; the distribution information of the issuing list cities comprises the distribution proportion of each issuing list city corresponding to each historical query text;
the training module is used for dividing the training sample set into a plurality of groups, and carrying out first-stage training and second-stage training on the multi-task comparison search model comprising the first model and the second model according to the plurality of groups of training samples; in the first stage of training, taking a single interest point in each training sample as a positive sample, and taking each other training sample in the same group as each training sample as a negative sample; in the second stage training, the single interest point in each training sample is taken as a positive sample, and other training samples which are the same group as each training sample and have the highest similarity are taken as negative samples;
the off-line production module is used for producing corresponding interest point embedding for each interest point in the interest point library through the off-line of the first model in the trained multi-task comparison search model, and carrying out vector indexing according to the obtained interest point embedding to obtain a vector index library;
and the online response module is used for responding to the position search request from the user terminal, deducing the corresponding query text embedding for the real-time query text and the real-time city parameter carried by the position search request on line through a second model in the trained multi-task comparison search model, and recalling a plurality of interest points as correlation recall results according to the query text embedding and the vector index library.
According to a third aspect the present application provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of an embodiment of any of the methods described above when the computer program is executed.
According to a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of an embodiment of any of the methods described above.
In the embodiment of the application, aiming at the defects of the related technology, a multi-task comparison search model is built, the model comprises a first model and a second model, a first-stage training and a second-stage training are needed during training, after the multi-task comparison search model is trained, interest point embedding can be produced offline by utilizing the first model, vector indexing is carried out according to the produced interest point embedding, and a vector index library is built; the second model is used for deducing the corresponding query text embedding for the real-time query text and the real-time city parameters in the position search request received by the server on line, so that a plurality of interest points can be recalled as relevance recall results according to the query text embedding and the vector index library.
Drawings
FIG. 1 is a flow diagram of a method for recall of points of interest in one embodiment;
FIG. 2 is a flow diagram of an example of point-of-interest recall in one embodiment;
FIG. 3 is a schematic diagram of a model design of a multi-tasking comparative search model in one embodiment;
FIG. 4 is a block diagram of a point of interest recall device in one embodiment;
fig. 5 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The application provides an interest point recall method. In some embodiments, the point-of-interest recall method may be applied to a server, which may be a stand-alone server or a cluster of servers, for responding to a user's location search request. The method comprises the steps as shown in fig. 1, the individual steps of the method being explained below.
S110: and constructing a training sample set and the distribution information of the bill city according to a plurality of historical user bill journals in the past preset time.
The method provided by the application can be used for a scene of searching the freight address in real time by a user, and the user can send a position searching request to a server through a user terminal, wherein the request carries real-time query text (comprising at least one character) and real-time city parameters (specifically, city codes or names of cities) which are input by the user. The user terminal is a computing device used by a user and can be intelligent mobile devices such as a smart phone, a tablet computer and the like. In the application, the text of the query, which is commonly called query, can be translated into the query.
The user issuing log records important information such as a query text, city parameters and issuing interest point information corresponding to a freight order initiated by a user, namely names, addresses, categories and the like of selected interest points among a plurality of searched interest points by the user through the query text and the city parameters, and the historical user issuing log refers to the user issuing log with the operation time before the current time.
Each history user issue log may be structured to obtain a corresponding training sample. Each training sample in the training sample set comprises a historical query text, a historical city parameter and a list of interest point information, wherein the list of interest point information comprises the name, address and category of the list of interest point.
The distribution information of the issuing list cities comprises the distribution proportion of each issuing list city corresponding to each historical query text. Considering that the user may have city parameters when searching for the starting point and/or the ending point of the freight scene, the user may have a city-crossing intention, for example, the starting point is in "Guangzhou", and the searching ending point is in "Nanjing", so that the embodiment further marks the city, that is, counts the distribution proportion of different single cities under the same query text, and uses the distribution proportion as the true value of the multiple labels. Wherein the same historical query text in different historical user issue logs would be considered the same historical query text. For example, assuming that a certain historical query text is "national trade center", and that the cities of the orders corresponding to the historical query text have a total of "marten", "Chongqing city", "Shenzhen city" and "Chengdu city", and the orders corresponding to the cities are "6", "3", "4" and "5", the distribution ratio corresponding to each city can be calculated to be [0.3333, 0.1667, 0.2222 and 0.2778].
S120: dividing the training sample set into a plurality of groups, and performing first-stage training and second-stage training on a multi-task comparison search model comprising a first model and a second model according to the plurality of groups of training samples.
In constructing the training sample set, the positive samples selected for the first stage training and the second stage training are the same, while the negative samples employ different strategies. Specifically, when the first-stage training is performed, the single interest point in each training sample is taken as a positive sample, and each other training sample in the same group as each training sample is taken as a negative sample; and in the second stage of training, the single interest point in each training sample is taken as a positive sample, and other training samples which are the same as each training sample in group and have the highest similarity are taken as negative samples.
When the multi-task comparison search model is trained, single interest point information is used as input of a first model, and historical query texts and historical city parameters in each training sample are used as input of a second model; the output of the first model is interest point embedding, and the output of the second model is query text embedding; the interest point embedding refers to the embedding information of the interest point information, and the query text embedding refers to the embedding information of the query text.
The embodiment focuses on designing the loss function in training, wherein, L is stage1 Performing a first-stage training as a loss function of the multi-task comparison search model; with L stage2 And performing second-stage training as a loss function of the multi-task comparison retrieval model. Below the pair L stage1 And L stage2 Detailed description will be made.
The following is L stage1 Is calculated according to the formula:
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 number of all cities,is the distribution proportion of the ith city in the distribution information of the issuing single city,/the distribution proportion of the ith city in the issuing single city distribution information>Is the predicted distribution ratio of the ith city; />True probabilities predicted for the masked characters; q emb1 And q emb2 Two embedded information obtained by the same historical query text through a second model; q emb1 And q emb2 Two pieces of embedded information obtained by the same bill-issuing interest point information through a first model;
L cl n in (2) refers to the number of training samples in each group during training; q emb Is embedded information of the history query text currently used,is embedded information of the point of interest of the bill corresponding to the historical query text,/item>Is embedded information of other ith issuing interest point information in the same group of training samples; p is p emb Is the embedded information of the currently input list interest point information,>is embedded information of the history inquiry text corresponding to the single interest point information,/or%>Is embedded information of other ith historical query texts in the same group of training samples; τ is the temperature coefficient, set to 0.05.
The following is L stage2 Is calculated according to the formula:
wherein q emb Is embedded information of the currently input historical query text,is embedded information of the point of interest of the bill corresponding to the historical query text, and +.>Is the same group training sample except +.>External and q emb Embedding information of the single interest point information with the highest similarity, wherein the margin is set to 0.15.
S130: and generating corresponding interest point embedments for each interest point in the interest point library through the first model offline in the trained multi-task comparison search model, and carrying out vector indexing according to the obtained interest point embedments to obtain a vector index library.
Vector indexing can be performed by a vector search engine such as Milvus, and a vector index library can be built, which can help users easily cope with retrieval of massive unstructured data (e.g., pictures/video/voice/text).
S140: responding to a position searching request from a user terminal, deducing a corresponding query text embedding for a real-time query text and real-time city parameters carried by the position searching request through a second model in the trained multi-task comparison searching model on line, and recalling a plurality of interest points as correlation recall results according to the query text embedding and a vector index library.
After the trained multitasking comparative search model, a second model thereof can be deployed to a cloud server, such as an OSS (Object Storage Service ) server, so that the server can load the second model on-line and use it to make real-time inferences, i.e. infer real-time query text input by a user and query text embedding corresponding to real-time city parameters, and then use the query text embedding to make relevance recall.
In some implementations, recalling multiple points of interest as relevance recall results from a query text embedding and vector index library includes: embedding the query text into an input vector index library to obtain a plurality of embedded interest points; embedding the plurality of interest points into corresponding interest points to serve as a correlation recall result.
In some embodiments, the above method further comprises: performing conventional recall according to the real-time query text and the real-time city parameters to obtain a conventional recall result; and carrying out de-duplication processing on the conventional recall result and the correlation recall result, and responding the processing result as a search result to the user terminal. The conventional recall described above may be an existing way of performing point of interest recall on a word or literal basis. The embodiment adds a path of relevance recall based on the conventional recall, so that the condition of missed recall of the interest points can be avoided, and more accurate interest points can be provided for users.
The training data construction and model training in the above embodiments is described below by way of a flowchart of some point-of-interest recall examples shown in fig. 2. In this example, the pre-form list, that is, the data list for storing the user form log, collects the history user form log in the preset time period in the past, and utilizes the collected log to construct training data, and aggregate statistics form city distribution information (that is, city multi-label distribution), wherein when constructing the training data, the positive sample selects the form interest point corresponding to the history query text and city parameters in the currently used training sample, and the negative sample adopts different strategies according to different stages of training, wherein in the first stage training, an easy negative sample, particularly, each training sample except the positive samples in the same group (same batch), is used, and in the second stage training, a hard negative sample is used, that is, the training sample with the highest vector cosine similarity between the positive samples in the same group is used.
In the following, the training of the multi-task comparative search model in this example is described, referring to fig. 3, fig. 3 is a schematic diagram of the model design of the multi-task comparative search model. As can be seen from fig. 3, the multi-task comparison search model integrally includes two parts, namely, a poi power (i.e., a first model) and a Query power (i.e., a second model), wherein the Query power is initialized by using a 4-layer 12-head pre-training model, the poi power is initialized by using a 6-layer 6-head pre-training model, the input of the Query power is Query text and city parameters, and Query text embedding can be obtained after passing through a Query Encoder (Encoder); the input of poi tower is the name, address and category of the point of interest, and the output is poi embedding. The pre-training model may be Bert (Bidirectional Encoder Representation from Transformers), ernie (Enhanced Representation through Knowledge Integration), roberta (Robustly optimized BERT approach), sibert (a model based on the art of the UniLM concept of microsoft corporation) or the like.
In the first training stage, the above L is used stage1 As a loss function, during the second stage training, the method uses L stage2 As a loss function. Wherein L is stage1 Specifically includes 4 partial losses, which correspond to 4 classes of learning tasks, i.e., L city (i.e. city multi-label Loss in the figure) is a query-side cross-city intention training task, L mlm (i.e., MLMLMLoss in the figure) is the mask language model (Mask Language Model) learning task on the query side, L rdrop (i.e., R-Loss in the figure) is a robust learning task of query and poi ebedding, L cl (i.e., batch Negative Loss in the figure) is the most important learning task, i.e., the learning task of similarity between query and poi ebedding is accomplished by means of contrast learning (Contrastive Learning).
In this example, since there is a dropout layer in the multi-tasking comparative search model, there is a distribution difference, but it is theoretically required to be uniform, so that L is used for the search rdrop To make query and poi queuing more robust. At L rdrop In relation to q emb1 、q emb2 、p emb1 And p emb2 Therefore, when the first stage training is performed, each group of training samples is sequentially input into the multi-task comparison search model twice, and the relevant information of the 4 parameters can be obtained.
In the first stage of training, L stage1 When the training is stable, the training of the second stage can be started, the second stage training focus is to learn how to distinguish more difficult negative samples, and the training is about L stage2 The description of the above embodiments is visible, and will not be repeated here. When the second stage training is performed, each group of training samples is only required to be input into the multi-task comparison search model once.
Various deep learning frameworks such as tensorflow can be used in model training, v100 graphics can be used for GPU, and in parameter setting of the model, the first stage can set the batch size (used for specifying the number of training samples) to 196, the second stage can set to 400, an AdamW optimizer is used, and the loss sets early stopping, if the first stage training iterates a preset number of times such as 15 times, L stage1 Terminating training without drop; then starts training in the second stage, and iterates for a preset number of times, such as 15 times, L stage2 Training is terminated without drop.
Note that, in the first stage training, when a set of training samples is input to the model, the set of training samples needs to be sequentially input twice, so the batch size in the first stage training is 196, but the batch size actually received by the model is 196×2; furthermore, in optimizing L cl When the negative samples are negative samples in the same batch except for the positive samples, all other samples are negative samples, which means positive samples: negative example = 1:195. In the second stage training, when a group of training samples are transmitted to the model, the group of training samples are sequentially input once, so that the batch size of the second stage training is 400, and the batch size actually received by the model is 400; furthermore, in optimizing L stage2 When the negative sample is selected to be a hard negative sample, the positive sample is then: negative example = 1:1.
In this example, MTCRM (Multi-Task Contrastive Retrieval Model), i.e., a Multi-tasking comparative search model, was built specifically for the freight business scenario, and a two-stage training was designed, in which 4 learning tasks were designed in the first stage training (e.g., through L city To learn the user's cross city intent) to more closely follow the freight business scenario, a learning task was designed to learn how to distinguish hard negative examples in the second stage training. After the multi-task comparison search model is trained, the query tower is utilized, namelyThe second model carries out online real-time query relevance recall, and after online relevance recall is added on the basis of conventional recall, the restriction of the existing Boolean retrieval recall frame can be eliminated, so that the defect of recall based on words or characters in the prior art can be overcome, and the recall missing caused by simple text matching is avoided.
FIG. 1 is a flow diagram of an interest point recall method in one embodiment. It should be understood that, although the steps in the flowchart of fig. 1 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of other steps or sub-steps of other steps.
Based on the same inventive concept, the application also provides an interest point recall device. In this embodiment, as shown in fig. 4, the apparatus includes the following modules:
a construction module 110, configured to construct a training sample set and distribution information of a bill city according to a plurality of historical user bill journals within a preset time period in the past; each training sample in the training sample set comprises a history query text, a history city parameter and a list of interest point information, wherein the list of interest point information comprises the name, address and category of the list of interest point; the distribution information of the issuing list cities comprises the distribution proportion of each issuing list city corresponding to each historical query text;
the training module 120 is configured to divide the training sample set into a plurality of groups, and perform a first-stage training and a second-stage training on the multi-task comparison search model including the first model and the second model according to the plurality of groups of training samples; in the first stage of training, taking a single interest point in each training sample as a positive sample, and taking each other training sample in the same group as each training sample as a negative sample; in the second stage training, the single interest point in each training sample is taken as a positive sample, and other training samples which are the same group as each training sample and have the highest similarity are taken as negative samples;
the offline production module 130 is configured to produce, for each interest point in the interest point library, a corresponding interest point embedding through offline of a first model in the trained multi-task comparison search model, and perform vector indexing according to the obtained interest point embedding, so as to obtain a vector index library;
and the online response module 140 is configured to respond to a location search request from the user terminal, infer, on line, by using a second model in the trained multitask comparison search model, a corresponding query text embedding for a real-time query text and a real-time city parameter carried by the location search request, and recall a plurality of interest points as relevance recall results according to the query text embedding and the vector index library.
In some embodiments, when the training module 120 performs the first stage training on the multi-task comparative search model according to the multiple sets of training samples, each set of training samples is sequentially input into the multi-task comparative search model twice; and inputting each group of training samples into the multi-task comparison search model once when the multi-task comparison search model is trained in the second stage according to the plurality of groups of training samples.
In some embodiments, training module 120 is in L stage1 Performing a first-stage training as a loss function of the multi-task comparison search model;
L stage1 =L city +L mlm +L rdrop +L ct
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 number of all cities,is the distribution proportion of the ith city in the distribution information of the issuing single city,/the distribution proportion of the ith city in the issuing single city distribution information>Is the predicted distribution ratio of the ith city; />True probabilities predicted for the masked characters; q emb1 And q emb2 Two embedded information obtained by the same historical query text through a second model; p is p emb1 And q emb2 Two pieces of embedded information obtained by the same bill-issuing interest point information through a first model;
L cl n in (2) refers to the number of training samples in each group during training; q emb Is embedded information of the history query text currently used,is embedded information of the point of interest of the bill corresponding to the historical query text,/item>Is embedded information of other ith issuing interest point information in the same group of training samples; p is p emb Is the embedded information of the currently input list interest point information,>is embedded information of the history inquiry text corresponding to the single interest point information,/or%>Is embedded information of other ith historical query texts in the same group of training samples; τ is the temperature coefficient, set to 0.05.
In some embodiments, training module 120 is in L stage2 Training the second stage as a loss function of the multi-task comparison search model;
wherein q emb Is embedded information of the currently input historical query text,is embedded information of the point of interest of the bill corresponding to the historical query text, and +.>Is the same group training sample except +.>External and q emb Embedding information of the single interest point information with the highest similarity, wherein the margin is set to 0.15.
In some embodiments, the online response module 140 is configured to embed the query text into the input vector index library to obtain a plurality of point of interest embeddings when recall a plurality of points of interest as a relevance recall result according to the query text embedment and the vector index library; embedding the plurality of interest points into corresponding interest points to serve as a correlation recall result.
In some embodiments, the training module 120 uses the single point of interest information as input of the first model and uses the historical query text and the historical city parameters in each training sample as input of the second model when training the multi-task comparative search model; the output of the first model is interest point embedding, and the output of the second model is query text embedding; the interest point embedding refers to the embedding information of the interest point information, and the query text embedding refers to the embedding information of the query text.
In some embodiments, the apparatus further comprises:
the conventional recall module is used for performing conventional recall according to the real-time query text and the real-time city parameters to obtain a conventional recall result;
and the terminal response module is used for carrying out de-duplication processing on the conventional recall result and the correlation recall result, and responding the processing result as a search result to the user terminal.
For specific limitations of the point of interest recall device, reference is made to the above limitation of the point of interest recall method, and no further description is given here. The various modules in the point of interest recall device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, the internal structure of which may be as shown in FIG. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an 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 media. The database of the computer device is used for storing data such as historical user bill logs, training data sets and the like, and the specific stored data can also be referred to the limitation in the embodiment of the method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a point of interest recall method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 5 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
The present embodiment also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method provided in any of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of a method as provided in any of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the method embodiments described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile 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 a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (10)

1. A method of recall of points of interest, the method comprising:
constructing a training sample set and distribution information of a bill city according to a plurality of historical user bill journals in a preset time period in the past; each training sample in the training sample set comprises a history query text, a history city parameter and a list of interest point information, wherein the list of interest point information comprises names, addresses and categories of list of interest points; the distribution information of the issuing list cities comprises the distribution proportion of each issuing list city corresponding to each historical query text;
dividing the training sample set into a plurality of groups, and performing first-stage training and second-stage training on a multi-task comparison search model comprising a first model and a second model according to the plurality of groups of training samples; when the first-stage training is carried out, taking a single interest point in each training sample as a positive sample, and taking each other training sample in the same group as each training sample as a negative sample; when the second stage training is carried out, taking the single interest point in each training sample as a positive sample, and taking other training samples which are the same group as each training sample and have the highest similarity as negative samples;
generating corresponding interest point embedding for each interest point in the interest point library through a first model offline in the trained multi-task comparison search model, and carrying out vector indexing according to the obtained interest point embedding to obtain a vector index library;
responding to a position search request from a user terminal, deducing a corresponding query text embedding for a real-time query text and real-time city parameters carried by the position search request on line through a second model in the trained multi-task comparison search model, and recalling a plurality of interest points as correlation recall results according to the query text embedding and the vector index library.
2. The method of claim 1, wherein each set of training samples is sequentially input twice into the multi-task comparative search model when the multi-task comparative search model is first-stage trained according to the plurality of sets of training samples;
and when the multi-task comparison retrieval model is trained in the second stage according to the plurality of groups of training samples, inputting each group of training samples into the multi-task comparison retrieval model once.
3. The method of claim 2, wherein L is stage1 Performing the first stage training as a loss function of the multi-task comparative search 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 number of all cities,is the distribution proportion of the ith city in the distribution information of the issuing single city,/the distribution proportion of the ith city in the issuing single city distribution information>Is the predicted distribution ratio of the ith city; />True probabilities predicted for the masked characters; q emb1 And q emb2 Two pieces of embedded information obtained by the same historical query text through the second model; p is p emb1 And p emb2 Two pieces of embedded information obtained by the same bill-issuing interest point information through the first model;
L cl n in (2) refers to the number of training samples in each group during training; q emb Is embedded information of the history query text currently used,is embedded information of the point of interest of the bill corresponding to the historical query text,/item>Is embedded information of other ith issuing interest point information in the same group of training samples; p is p emb Is the embedded information of the currently input list-issuing interest point information,is embedded information of the history inquiry text corresponding to the single interest point information,/or%>Is embedded information of other ith historical query texts in the same group of training samples; τ is the temperature coefficient, set to 0.05.
4. The method of claim 3, wherein L is stage2 Performing the second stage training as a loss function of the multi-task comparative search model;
wherein q emb Is embedded information of the currently input historical query text,is embedded information of the point of interest of the bill corresponding to the historical query text, and +.>Is the same group training sample except +.>External and q emb Embedding information of the single interest point information with the highest similarity, wherein the margin is set to 0.15.
5. The method of claim 1, wherein recalling a plurality of points of interest as relevance recall results from the query text embedding and the vector index library comprises:
embedding the query text into the vector index library to obtain a plurality of embedded interest points;
embedding the interest points into corresponding interest points to serve as a relevance recall result.
6. The method of claim 1, wherein the point of interest information is used as input to the first model and historical query text and historical city parameters in each training sample are used as input to the second model when training the multi-tasking comparative retrieval model;
the output of the first model is interest point embedding, and the output of the second model is query text embedding; the interest point embedding refers to embedding information of interest point information, and the query text embedding refers to embedding information of query text.
7. The method of claim 1, wherein the method further comprises:
performing conventional recall according to the real-time query text and the real-time city parameters to obtain a conventional recall result;
and carrying out de-duplication processing on the conventional recall result and the correlation recall result, and responding the processing result as a search result to the user terminal.
8. A point of interest recall device, the device comprising:
the construction module is used for constructing a training sample set and distribution information of the bill city according to a plurality of historical user bill journals in the past preset time period; each training sample in the training sample set comprises a history query text, a history city parameter and a list of interest point information, wherein the list of interest point information comprises names, addresses and categories of list of interest points; the distribution information of the issuing list cities comprises the distribution proportion of each issuing list city corresponding to each historical query text;
the training module is used for dividing the training sample set into a plurality of groups, and carrying out first-stage training and second-stage training on a multi-task comparison search model comprising a first model and a second model according to the plurality of groups of training samples; when the first-stage training is carried out, taking a single interest point in each training sample as a positive sample, and taking each other training sample in the same group as each training sample as a negative sample; when the second stage training is carried out, taking the single interest point in each training sample as a positive sample, and taking other training samples which are the same group as each training sample and have the highest similarity as negative samples;
the offline production module is used for producing corresponding interest point embedding for each interest point in the interest point library through a first model offline in the trained multi-task comparison search model, and carrying out vector indexing according to the obtained interest point embedding to obtain a vector index library;
and the online response module is used for responding to a position search request from a user terminal, deducing a corresponding query text embedding for a real-time query text and real-time city parameters carried by the position search request on line through a second model in the trained multi-task comparison search model, and recalling a plurality of interest points as a correlation recall result according to the query text embedding and the vector index library.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 7 when the computer program is executed by the processor.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202311148440.7A 2023-09-06 2023-09-06 Point-of-interest recall method, point-of-interest recall device, computer equipment and storage medium Pending CN117112930A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311148440.7A CN117112930A (en) 2023-09-06 2023-09-06 Point-of-interest recall method, point-of-interest recall device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311148440.7A CN117112930A (en) 2023-09-06 2023-09-06 Point-of-interest recall method, point-of-interest recall device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117112930A true CN117112930A (en) 2023-11-24

Family

ID=88805429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311148440.7A Pending CN117112930A (en) 2023-09-06 2023-09-06 Point-of-interest recall method, point-of-interest recall device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117112930A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117573856A (en) * 2024-01-15 2024-02-20 中国科学技术大学 Building field content multi-interest recall method based on memory network
CN117725324A (en) * 2024-02-08 2024-03-19 腾讯科技(深圳)有限公司 Map searching method and device, electronic equipment, storage medium and program product

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117573856A (en) * 2024-01-15 2024-02-20 中国科学技术大学 Building field content multi-interest recall method based on memory network
CN117725324A (en) * 2024-02-08 2024-03-19 腾讯科技(深圳)有限公司 Map searching method and device, electronic equipment, storage medium and program product
CN117725324B (en) * 2024-02-08 2024-05-24 腾讯科技(深圳)有限公司 Map searching method and device, electronic equipment, storage medium and program product

Similar Documents

Publication Publication Date Title
CN117112930A (en) Point-of-interest recall method, point-of-interest recall device, computer equipment and storage medium
CN109086303B (en) Intelligent conversation method, device and terminal based on machine reading understanding
CN111797210A (en) Information recommendation method, device and equipment based on user portrait and storage medium
CN109543007A (en) Put question to data creation method, device, computer equipment and storage medium
CN106250369B (en) Voice interactive method, device and terminal
CN109960722B (en) Information processing method and device
JP2019512764A (en) Method and apparatus for identifying the type of user geographical location
CN107832291B (en) Man-machine cooperation customer service method, electronic device and storage medium
CN110765348B (en) Hot word recommendation method and device, electronic equipment and storage medium
CN112131261B (en) Community query method and device based on community network and computer equipment
CN112559895B (en) Data processing method and device, electronic equipment and storage medium
CN111177568A (en) Object pushing method based on multi-source data, electronic device and storage medium
JP2023506087A (en) Voice Wakeup Method and Apparatus for Skills
CN113297269A (en) Data query method and device
CN110727769A (en) Corpus generation method and device, and man-machine interaction processing method and device
CN112182107B (en) List data acquisition method, device, computer equipment and storage medium
CN117077668A (en) Risk image display method, apparatus, computer device, and readable storage medium
CN111506717A (en) Question answering method, device, equipment and storage medium
CN116226553A (en) Track query method and device and storage medium
CN113641897B (en) Recommendation method and device based on session text, electronic equipment and storage medium
CN113065354B (en) Method for identifying geographic position in corpus and related equipment thereof
CN112463920A (en) Information response method and device
CN112818084A (en) Information interaction method, related device, equipment and computer readable medium
CN117390127A (en) Point-of-interest recall method, device, equipment and storage medium in freight scene
CN113886629B (en) Course picture retrieval model establishing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination