CN110674419B - Geographic information retrieval method and device, electronic equipment and readable storage medium - Google Patents

Geographic information retrieval method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN110674419B
CN110674419B CN201910075338.6A CN201910075338A CN110674419B CN 110674419 B CN110674419 B CN 110674419B CN 201910075338 A CN201910075338 A CN 201910075338A CN 110674419 B CN110674419 B CN 110674419B
Authority
CN
China
Prior art keywords
longitude
information
latitude
candidate poi
poi information
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.)
Active
Application number
CN201910075338.6A
Other languages
Chinese (zh)
Other versions
CN110674419A (en
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.)
Ditu Beijing Technology Co Ltd
Original Assignee
Ditu Beijing 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 Ditu Beijing Technology Co Ltd filed Critical Ditu Beijing Technology Co Ltd
Priority to CN201910075338.6A priority Critical patent/CN110674419B/en
Publication of CN110674419A publication Critical patent/CN110674419A/en
Application granted granted Critical
Publication of CN110674419B publication Critical patent/CN110674419B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The application discloses a geographic information retrieval method, a geographic information retrieval device, an electronic device and a readable storage medium, wherein the method comprises the following steps: acquiring an inquiry statement input by a user at a terminal and current longitude and latitude information of the terminal; determining at least one candidate POI (point of interest) information based on the query statement, wherein the candidate POI information comprises longitude and latitude information; determining the similarity between each candidate POI information and the query statement based on the query statement, the current longitude and latitude information of the terminal and each determined candidate POI information; and selecting at least one target POI information from the at least one candidate POI information based on each similarity, and displaying the target POI information on the terminal. The geographic information retrieval method, the geographic information retrieval device, the electronic equipment and the readable storage medium can greatly improve the speed and accuracy of geographic information retrieval.

Description

Geographic information retrieval method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of retrieval technologies, and in particular, to a geographic information retrieval method, an apparatus, an electronic device, and a readable storage medium
Background
At present, a user often uses a mobile device to search point of Interest (POI) information, the number of target POIs displayed to the user is limited due to the limitation of the display size of a mobile terminal, and the user often has a clear search intention when searching for POIs. Therefore, it is desirable to determine accurate target POI information with as few query statements as possible input by the user.
The existing geographic information retrieval method only retrieves target POI information based on query sentences and POI information, and the speed and the accuracy of geographic information retrieval are poor.
Disclosure of Invention
In view of this, an object of the embodiments of the present application is to provide a geographic information retrieval method, an apparatus, an electronic device and a readable storage medium, which can greatly improve the speed and accuracy of geographic information retrieval.
In a first aspect, an embodiment of the present application provides a geographic information retrieval method, including:
acquiring an inquiry statement input by a user at a terminal and current longitude and latitude information of the terminal;
determining at least one candidate POI (point of interest) information based on the query statement, wherein the candidate POI information comprises longitude and latitude information;
determining the similarity between each candidate POI information and the query statement based on the query statement, the current longitude and latitude information of the terminal and each determined candidate POI information;
and selecting at least one target POI information from the at least one candidate POI information based on each similarity, and displaying the target POI information on the terminal.
In a possible implementation manner, after selecting at least one target POI information from the at least one candidate POI information and displaying by the terminal, the method further includes:
acquiring an updated query statement input by a user;
returning to the step of determining at least one candidate POI information based on the query statement.
In one possible embodiment of the method according to the invention,
the candidate POI information further includes: the name of the candidate POI;
the determining the similarity between each candidate POI information and the query statement based on the query statement, the current longitude and latitude information of the terminal and each determined candidate POI information comprises the following steps:
aiming at each candidate POI information, determining a first semantic feature vector corresponding to the query statement and a second semantic feature vector corresponding to the name of the candidate POI included in the candidate POI information;
determining a geographic position feature vector based on the current longitude and latitude information of the terminal and the longitude and latitude information corresponding to the candidate POI information, wherein the geographic position feature vector is used for representing the position relationship between the current position of the terminal and the position corresponding to the candidate POI information;
determining a similarity between the candidate POI information and the query statement based on the first semantic feature vector, the second semantic feature vector, and the geographic location feature vector.
In one possible embodiment, the determining the similarity between the candidate POI information and the query statement based on the first semantic feature vector, the second semantic feature vector, and the geographic location feature vector includes:
splicing the geographic position feature vector with the first semantic feature vector to obtain a third semantic feature vector;
and determining the similarity between the candidate POI information and the query statement based on the third semantic feature vector and the second semantic feature vector.
In one possible embodiment, the determining the similarity between the candidate POI information and the query statement based on the first semantic feature vector, the second semantic feature vector, and the geographic location feature vector includes:
splicing the geographic position feature vector with the second semantic feature vector to obtain a fourth semantic feature vector;
and determining the similarity between the candidate POI information and the query statement based on the first semantic feature vector and the fourth semantic feature vector.
In one possible embodiment, the determining the similarity between the candidate POI information and the query statement based on the first semantic feature vector, the second semantic feature vector, and the geographic location feature vector includes:
splicing the geographic position feature vector with the first semantic feature vector to obtain a fifth semantic feature vector;
splicing the geographic position feature vector with the second semantic feature vector to obtain a sixth semantic feature vector;
and determining the similarity between the candidate POI information and the query statement based on the fifth semantic feature vector and the sixth semantic feature vector.
In a possible implementation manner, the method further includes a step of acquiring longitude and latitude information corresponding to the candidate POI information:
acquiring longitude and latitude information obtained by actual positioning of candidate POI information;
dividing the map into grids with preset sizes, and determining a target grid into which the candidate POI information falls according to longitude and latitude information obtained by actual positioning of the candidate POI information;
and determining longitude and latitude information corresponding to the candidate POI information according to the longitude and latitude information of the preset coordinate points in the target grid.
In a possible implementation manner, the determining longitude and latitude information corresponding to the candidate POI information according to the longitude and latitude information of the preset coordinate point in the target grid includes:
acquiring longitude and latitude information of a preset coordinate point in a grid adjacent to the target grid;
and carrying out weighted calculation on the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid to obtain the longitude and latitude information corresponding to the candidate POI information.
In a possible implementation manner, the obtaining latitude and longitude information of a preset coordinate point in a grid adjacent to the target grid includes:
acquiring the longitude of a preset coordinate point in at least one grid adjacent to the target grid in the longitude direction;
the weighting calculation of the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid is performed to obtain the longitude and latitude information corresponding to the candidate POI information, and the method comprises the following steps:
and carrying out weighted calculation on the longitude of a preset coordinate point in the target grid and the longitude of a preset coordinate point in at least one grid adjacent to the target grid in the longitude direction to obtain the longitude corresponding to the candidate POI information.
In a possible implementation manner, the obtaining latitude and longitude information of a preset coordinate point in a grid adjacent to the target grid further includes:
acquiring the latitude of a preset coordinate point in at least one grid adjacent to the target grid in the latitude direction;
the weighting calculation is performed on the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid to obtain the longitude and latitude information corresponding to the candidate POI information, and the method further comprises the following steps:
and carrying out weighted calculation on the latitude of a preset coordinate point in the target grid and the latitude of a preset coordinate point in at least one grid adjacent to the target grid in the latitude direction to obtain the latitude corresponding to the candidate POI information.
In one possible embodiment, the candidate POI information further includes: addresses of candidate POIs;
the method further comprises a step of determining a second semantic feature vector corresponding to the candidate POI information:
respectively determining a first name semantic vector corresponding to the name of the candidate POI and a first address semantic vector corresponding to the address of the candidate POI;
determining the second semantic feature vector based on the first name semantic vector and the first address semantic vector.
In one possible embodiment, the determining the second semantic feature vector based on the first name semantic vector and the first address semantic vector includes:
aiming at each dimension feature in the first name semantic vector, determining a first feature association degree of the dimension feature and each dimension feature in the address semantic vector, and obtaining a second name semantic vector by using all the first feature association degrees and the first name semantic vector;
aiming at each dimension feature in the first address semantic vector, determining a second feature relevance degree of the dimension feature and each dimension feature in the name semantic vector, and obtaining a second address semantic vector by using all the second feature relevance degrees and the first address semantic vector;
determining the second semantic feature vector according to the second name semantic vector and the second address semantic vector.
In one possible embodiment, the determining the first semantic feature vector corresponding to the query statement includes:
performing word segmentation on the query sentence;
determining semantic feature vectors of the query sentences based on each vocabulary obtained by word segmentation;
aiming at each dimension characteristic in the semantic characteristic vector of the query statement, calculating first similarity between the dimension characteristic and each other dimension characteristic in the semantic characteristic vector of the query statement;
determining the first semantic feature vector based on the semantic feature vector of the query statement and all of the first similarities.
In a possible implementation manner, determining a geographic position feature vector based on the current longitude and latitude information of the terminal and the longitude and latitude information corresponding to the candidate POI information includes:
extracting the current longitude and latitude information of the terminal and the characteristics of the longitude and latitude information corresponding to the candidate POI information to obtain longitude and latitude characteristic vectors;
aiming at each dimension characteristic in the longitude and latitude characteristic vector, calculating a second similarity between the dimension characteristic and each other dimension characteristic in the longitude and latitude characteristic vector;
and determining the geographic position feature vector based on the longitude and latitude feature vector and all the second similarities.
In one possible implementation manner, the determining, based on the query statement, the current longitude and latitude information of the terminal, and each determined candidate POI information, a similarity between each candidate POI information and the query statement includes:
and inputting the query statement, the current longitude and latitude information of the terminal and the candidate POI information into a pre-trained machine learning model aiming at each candidate POI information to obtain the similarity between the candidate POI information and the query statement.
In one possible embodiment, the method further comprises the following step of training the machine learning model:
acquiring a plurality of historical query sentences input by a user at a terminal, historical longitude and latitude information of the terminal when the user inputs each historical query sentence, historical candidate POI information corresponding to each historical query sentence and historical target POI information corresponding to each historical query sentence;
and determining a training sample by using each historical query statement, historical longitude and latitude information corresponding to each historical query statement, each historical candidate POI information and each historical target POI information, and training an initial machine learning model by using the training sample to obtain the machine learning model.
In one possible embodiment, the determining a training sample by using each historical query statement, historical longitude and latitude information corresponding to each historical query statement, each historical candidate POI information, and each historical target POI information includes:
acquiring historical target POI information actually clicked by a user after the historical query statement is input by the user aiming at each historical query statement;
constructing a positive sample by using each historical query statement, the actually clicked historical target POI information corresponding to each historical query statement and the historical longitude and latitude information corresponding to each historical query statement;
and constructing a negative sample by using each historical query statement, the history candidate POI information which is not clicked and corresponds to each historical query statement and the history longitude and latitude information which corresponds to each historical query statement.
In a second aspect, an embodiment of the present application further provides a geographic information retrieval device, including:
the acquisition module is used for acquiring query sentences input by a user at the terminal and the current longitude and latitude information of the terminal;
a determining module, configured to determine, based on the query statement, at least one candidate POI information, where the candidate POI information includes latitude and longitude information;
the similarity calculation module is used for determining the similarity between each candidate POI information and the query statement based on the query statement, the current longitude and latitude information of the terminal and each determined candidate POI information;
and the result selection module is used for selecting at least one target POI information from the at least one candidate POI information based on each similarity and displaying the target POI information on the terminal.
In a possible implementation manner, the obtaining module is further configured to obtain an updated query statement input by a user;
the determining module is further configured to determine at least one candidate POI information based on the updated query statement.
In one possible embodiment, the candidate POI information further includes: the name of the candidate POI;
the similarity calculation module includes:
the semantic feature determining module is used for determining a first semantic feature vector corresponding to the query statement and a second semantic feature vector corresponding to the names of the candidate POI included in the candidate POI information aiming at each candidate POI information;
the position feature determination module is used for determining a geographic position feature vector based on the current longitude and latitude information of the terminal and the longitude and latitude information corresponding to the candidate POI information, wherein the geographic position feature vector is used for representing the position relationship between the current position of the terminal and the position corresponding to the candidate POI information;
and the similarity determining module is used for determining the similarity between the candidate POI information and the query statement based on the first semantic feature vector, the second semantic feature vector and the geographic position feature vector.
In a possible implementation manner, the similarity determining module is further configured to:
splicing the geographic position feature vector with the first semantic feature vector to obtain a third semantic feature vector;
and determining the similarity between the candidate POI information and the query statement based on the third semantic feature vector and the second semantic feature vector.
In a possible implementation manner, the similarity determining module is further configured to:
splicing the geographic position feature vector with the second semantic feature vector to obtain a fourth semantic feature vector;
and determining the similarity between the candidate POI information and the query statement based on the first semantic feature vector and the fourth semantic feature vector.
In a possible implementation manner, the similarity determining module is further configured to:
splicing the geographic position feature vector with the first semantic feature vector to obtain a fifth semantic feature vector;
splicing the geographic position feature vector with the second semantic feature vector to obtain a sixth semantic feature vector;
and determining the similarity between the candidate POI information and the query statement based on the fifth semantic feature vector and the sixth semantic feature vector.
In a possible implementation, the apparatus further includes a latitude and longitude determination module configured to:
acquiring longitude and latitude information obtained by actual positioning of candidate POI information;
dividing the map into grids with preset sizes, and determining a target grid into which the candidate POI information falls according to longitude and latitude information obtained by actual positioning of the candidate POI information;
and determining longitude and latitude information corresponding to the candidate POI information according to the longitude and latitude information of the preset coordinate points in the target grid.
In a possible implementation, the latitude and longitude determining module is further configured to:
acquiring longitude and latitude information of a preset coordinate point in a grid adjacent to the target grid;
and carrying out weighted calculation on the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid to obtain the longitude and latitude information corresponding to the candidate POI information.
In a possible implementation, the latitude and longitude determining module is further configured to:
acquiring the longitude of a preset coordinate point in at least one grid adjacent to the target grid in the longitude direction;
the weighting calculation of the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid is performed to obtain the longitude and latitude information corresponding to the candidate POI information, and the method comprises the following steps:
and carrying out weighted calculation on the longitude of a preset coordinate point in the target grid and the longitude of a preset coordinate point in at least one grid adjacent to the target grid in the longitude direction to obtain the longitude corresponding to the candidate POI information.
In a possible implementation, the latitude and longitude determining module is further configured to:
acquiring the latitude of a preset coordinate point in at least one grid adjacent to the target grid in the latitude direction;
the weighting calculation is performed on the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid to obtain the longitude and latitude information corresponding to the candidate POI information, and the method further comprises the following steps:
and carrying out weighted calculation on the latitude of a preset coordinate point in the target grid and the latitude of a preset coordinate point in at least one grid adjacent to the target grid in the latitude direction to obtain the latitude corresponding to the candidate POI information.
In one possible embodiment, the candidate POI information further includes: addresses of candidate POIs;
the semantic feature determination module is configured to:
respectively determining a first name semantic vector corresponding to the name of the candidate POI and a first address semantic vector corresponding to the address of the candidate POI;
determining the second semantic feature vector based on the first name semantic vector and the first address semantic vector.
In a possible implementation, the semantic feature determination module is further configured to:
aiming at each dimension feature in the first name semantic vector, determining a first feature association degree of the dimension feature and each dimension feature in the address semantic vector, and obtaining a second name semantic vector by using all the first feature association degrees and the first name semantic vector;
aiming at each dimension feature in the first address semantic vector, determining a second feature relevance degree of the dimension feature and each dimension feature in the name semantic vector, and obtaining a second address semantic vector by using all the second feature relevance degrees and the first address semantic vector;
determining the second semantic feature vector according to the second name semantic vector and the second address semantic vector.
In a possible implementation, the semantic feature determination module is further configured to:
performing word segmentation on the query sentence;
determining semantic feature vectors of the query sentences based on each vocabulary obtained by word segmentation;
aiming at each dimension characteristic in the semantic characteristic vector of the query statement, calculating first similarity between the dimension characteristic and each other dimension characteristic in the semantic characteristic vector of the query statement;
determining the first semantic feature vector based on the semantic feature vector of the query statement and all of the first similarities.
In a possible implementation, the location characteristic determining module is further configured to:
extracting the current longitude and latitude information of the terminal and the characteristics of the longitude and latitude information corresponding to the candidate POI information to obtain longitude and latitude characteristic vectors;
aiming at each dimension characteristic in the longitude and latitude characteristic vector, calculating a second similarity between the dimension characteristic and each other dimension characteristic in the longitude and latitude characteristic vector;
and determining the geographic position feature vector based on the longitude and latitude feature vector and all the second similarities.
In a possible implementation, the similarity calculation module is further configured to:
and inputting the query statement, the current longitude and latitude information of the terminal and the candidate POI information into a pre-trained machine learning model aiming at each candidate POI information to obtain the similarity between the candidate POI information and the query statement.
In a possible implementation, the apparatus further includes a model training module configured to:
acquiring a plurality of historical query sentences input by a user at a terminal, historical longitude and latitude information of the terminal when the user inputs each historical query sentence, historical candidate POI information corresponding to each historical query sentence and historical target POI information corresponding to each historical query sentence;
and determining a training sample by using each historical query statement, historical longitude and latitude information corresponding to each historical query statement, each historical candidate POI information and each historical target POI information, and training an initial machine learning model by using the training sample to obtain the machine learning model.
In a possible implementation, the model training module is further configured to:
acquiring historical target POI information actually clicked by a user after the historical query statement is input by the user aiming at each historical query statement;
constructing a positive sample by using each historical query statement, the actually clicked historical target POI information corresponding to each historical query statement and the historical longitude and latitude information corresponding to each historical query statement;
and constructing a negative sample by using each historical query statement, the history candidate POI information which is not clicked and corresponds to each historical query statement and the history longitude and latitude information which corresponds to each historical query statement.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the geographic information retrieval method of the first aspect or any one of the possible implementations of the first aspect.
In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the geographic information retrieval method of the first aspect or any one of the possible implementations of the first aspect.
According to the geographic information retrieval method, the geographic information retrieval device, the electronic equipment and the readable storage medium, not only are query sentences and candidate POI information input by a user at a terminal obtained, but also the current longitude and latitude information of the terminal is obtained, the longitude and latitude information is also included in the candidate POI information, and the similarity between each candidate POI information and the query sentences is determined based on the query sentences, the current longitude and latitude information of the terminal, each determined candidate POI information and the longitude and latitude information corresponding to the candidate POI information, so that at least one target POI information is selected from the at least one candidate POI information and displayed at the terminal. In the process of determining the similarity between each candidate POI information and the query statement, the current longitude and latitude information of the terminal and the longitude and latitude information and other geographic position information corresponding to the candidate POI information are added, so that the speed and the accuracy of geographic information retrieval are greatly improved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flowchart illustrating a geographic information retrieval method provided by an embodiment of the present application;
fig. 2 is a flowchart illustrating a method for determining similarity between candidate POI information and a query statement in a geographic information retrieval method provided in an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a model structure of a machine learning model in the geographic information retrieval method according to the embodiment of the present application;
fig. 4 is a schematic structural diagram of a geographic information retrieval device according to an embodiment of the present application;
fig. 5 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that in the embodiments of the present application, the term "comprising" is used to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.
The Positioning technology used in the present application may be based on a Global Positioning System (GPS), a Global Navigation Satellite System (GLONASS), a COMPASS Navigation System (COMPASS), a galileo Positioning System, a Quasi-Zenith Satellite System (QZSS), a Wireless Fidelity (WiFi) Positioning technology, or the like, or any combination thereof. One or more of the above-described positioning systems may be used interchangeably in this application.
The user often uses the mobile device to search the point of Interest (POI) information, the number of target POIs displayed to the user is limited due to the limitation of the display size of the mobile terminal, and the user often has a clear search intention when searching the POI. Therefore, it is desirable to determine accurate target POI information with as few query statements as possible input by the user.
The existing geographic information retrieval method only retrieves target POI information based on query sentences and POI information, and the speed and the accuracy of geographic information retrieval are poor. That is, the user is required to input a long query sentence to determine the target POI information, and the accuracy of the determined target POI information is low.
Based on this, the embodiment of the application provides a geographic information retrieval method, a geographic information retrieval device, an electronic device and a readable storage medium, which not only obtain query sentences and candidate POI information input by a user at a terminal, but also obtain current longitude and latitude information of the terminal, and the candidate POI information also comprises the longitude and latitude information, and based on the query sentences, the current longitude and latitude information of the terminal, each determined candidate POI information and the longitude and latitude information corresponding to the candidate POI information, the similarity between each candidate POI information and the query sentences is determined, so that at least one target POI information is selected from the at least one candidate POI information and displayed on the terminal. In the process of determining the similarity between each candidate POI information and the query statement, the current longitude and latitude information of the terminal and the longitude and latitude information and other geographic position information corresponding to the candidate POI information are added, so that the speed and the accuracy of geographic information retrieval are greatly improved.
To facilitate understanding of the present embodiment, a geographic information retrieval method disclosed in the embodiments of the present application will be described in detail first.
Example one
The geographic information retrieval method provided by the embodiment of the application can be applied to electronic equipment such as servers and the like used in various fields, for example, can be applied to various business scenes such as network appointment, express delivery, traffic, transaction service and the like. As shown in fig. 1, the method of the present embodiment includes:
s101: and acquiring the query sentence of the interest point input by the user at the terminal and the current longitude and latitude information of the terminal.
In the process of searching POI information by a terminal, a user continuously inputs a query sentence, which may also be referred to as query sentence information (query), into a search box. In the process of geographic information retrieval, query sentences input by a user at a terminal and the current longitude and latitude information of the terminal need to be acquired in real time.
S102: and determining at least one candidate POI (point of interest) information based on the query statement, wherein the candidate POI information comprises longitude and latitude information.
In a possible implementation manner, only POI information corresponding to an address actually visited by the user may be used as candidate POI information, where each candidate POI information includes latitude and longitude information. In addition, each candidate POI information further includes a name of the candidate POI and an address of the candidate POI, and both the name of the candidate POI and the address of the candidate POI are text information.
S103: and determining the similarity between each candidate POI information and the query statement based on the query statement, the current longitude and latitude information of the terminal and each determined candidate POI information.
The specific implementation steps for determining the similarity between each candidate POI information and the query statement are shown in fig. 2, and include:
s201: and aiming at each candidate POI information, determining a first semantic feature vector corresponding to the query statement and a second semantic feature vector corresponding to the names of the candidate POIs included in the candidate POI information.
Specifically, the following steps 1 to 4 are adopted to determine a first semantic feature vector corresponding to the query statement:
step 1, performing word segmentation on the query sentence.
Here, the text of the query sentence is split into at least one vocabulary, which includes: words, and/or letters. For example, one query statement is the above hualian, and splitting the query statement can obtain: upper, ground, h, u, a, l, i, a, n; and/or splitting to obtain the above, hua and lian.
Because the word segmentation is carried out by taking the single words and/or the letters as the granularity, the semantic feature information under the conditions of incomplete input, error input or mixed text input is retained, and the word segmentation is carried out by taking the words and/or the words as the strength, the context feature information of more complex languages, such as Chinese, can be obtained. Therefore, in order to extract features from the vocabulary obtained by word segmentation more comprehensively, the segmentation can be carried out based on words and also based on single characters and letters during word segmentation. Specifically, the split vocabulary obtained by taking the query statement as the above hualian as an example includes: upper, ground, h, u, a, l, i, a, n, upper, hua and lian.
And 2, determining semantic feature vectors of the query sentences based on the vocabularies obtained by word segmentation.
First, each vocabulary is embedded (Embed) into a vector at a low latitude, the vocabulary comprising: words, and/or letters. Specifically, for example, a word vector with a lower dimension, such as a 3-dimensional, 4-dimensional or 5-dimensional word vector, is used to represent each vocabulary obtained by segmenting the query sentence, for example, when a query sentence is a superior dialan, the word vector corresponding to the superior word may be {0.1, 0.6, -0.5 }.
In the prior art, each vocabulary is usually embedded into a vector by using a one-hot coding (one-hot coding) or word2vec model method, however, the dimension of the one-hot coding is very high and semantic features of the vocabulary cannot be obtained, and although the vector obtained by the word2vec model is a low-dimension vector, the word2vec model depends on a text corpus obtained by manual labeling to a great extent and needs to be trained in advance for use. To overcome the above-mentioned deficiencies in the prior art, in one possible implementation, the above-mentioned step of embedding (Embed) each word and/or letter into a feature vector at a low latitude may be implemented using a Convolutional Neural Network (CNN) obtained by pre-training. The initial parameters of the CNN model may be random real numbers, and the initial parameters are continuously adjusted along with the training process of the CNN model. The word vectors of the query sentences are d-dimensional, the word vectors of the query sentences can be spliced and stored into an embedded matrix of the query sentences, and the size of the embedded matrix is T x d if the total vocabulary number obtained after the query sentences are segmented is T.
And then, performing feature extraction on the word vectors of all the words obtained by the word segmentation to determine the feature vectors of the query sentences. Illustratively, the step of feature extraction may be implemented by convolving the embedded matrix with a CNN model. Preferably, a 3-layer CNN model can be used to extract the feature vectors of the query statement. The CNN model may use n convolution kernels with a size of 3d, and obtain T n-dimensional feature vectors after convolving the embedded matrix, where the T n-dimensional feature vectors are feature vectors of the query statement. Similarly, T feature vectors of n may be concatenated and stored in the form of a feature matrix Q of the query statement, where the size of the feature matrix Q is T × n.
And 3, aiming at each dimension characteristic in the semantic characteristic vector of the query statement, calculating the first similarity between the dimension characteristic and each other dimension characteristic in the semantic characteristic vector of the query statement.
Since some words are significantly more important than others in a query statement, and for a language, there are grammatical and semantic relationships between each word in a statement and every other word in a sentence, except for the immediate context. In order to further distinguish the semantic feature vector corresponding to the vocabulary with high importance from the semantic feature vector of the query statement and extract the syntactic relation and semantic link between each vocabulary and each other vocabulary in the sentence for each vocabulary, it is necessary to calculate a first similarity between each dimensional feature in the semantic feature vector of the query statement and each remaining dimensional feature in the semantic feature vector of the query statement.
And 4, determining the first semantic feature vector based on the semantic feature vector of the query statement and all the first similarities.
Similarly, the second semantic feature vector corresponding to the name of the candidate POI in the candidate POI information may be determined by using the above steps 1 to 4. Further, in order to better extract a second semantic feature vector of the candidate POI information, after determining the first name semantic vector corresponding to the name of the candidate POI and the first address semantic vector corresponding to the address of the candidate POI by using the addresses of the candidate POI in the candidate POI information through steps 1 to 4, respectively, the second semantic feature vector may be determined based on the first name semantic vector and the first address semantic vector. Thus, two complementary fields are known: feature dependencies and feature relevance between the names of candidate POIs and the addresses of candidate POIs.
Specifically, the determining the second semantic feature vector based on the first name semantic vector and the first address semantic vector through the following steps 1 to 4 includes:
step 1, aiming at each dimension characteristic in the first name semantic vector, determining a first characteristic association degree of the dimension characteristic and each dimension characteristic in the address semantic vector, and obtaining a second name semantic vector by using all the first characteristic association degrees and the first name semantic vector;
step 2, aiming at each dimension characteristic in the first address semantic vector, determining a second characteristic relevance degree of the dimension characteristic and each dimension characteristic in the name semantic vector, and obtaining a second address semantic vector by using all the second characteristic relevance degrees and the first address semantic vector;
and 3, determining the second semantic feature vector according to the second name semantic vector and the second address semantic vector.
S202: and determining a geographic position feature vector based on the current longitude and latitude information of the terminal and the longitude and latitude information corresponding to the candidate POI information, wherein the geographic position feature vector is used for representing the position relationship between the current position of the terminal and the position corresponding to the candidate POI information.
In order to reduce the calculation amount, the following method may be adopted to simplify the obtained current longitude and latitude information of the terminal and/or the longitude and latitude information corresponding to the candidate POI information, taking the longitude and latitude information corresponding to the candidate POI information as an example, the specific steps include the following steps 1 to 3:
step 1, longitude and latitude information obtained by actual positioning of candidate POI information is obtained.
And 2, dividing the map into grids with preset sizes, and determining a target grid into which the candidate POI information falls according to longitude and latitude information obtained by actual positioning of the candidate POI information.
For example, a digital map covering all POI information may be divided into a grid of 100m by 100m in size, which can reduce the amount of computation and not cause loss of geographic location features.
And 3, determining longitude and latitude information corresponding to the candidate POI information according to the longitude and latitude information of the preset coordinate points in the target grid.
For example, longitude and latitude information of the upper left corner in the target grid may be adopted as longitude and latitude information of all candidate POI information falling into the target grid.
In the specific implementation process, for candidate POI information located at the boundary of the target grid, the longitude and latitude information of the adjacent grid may be more similar to the longitude and latitude information of the candidate POI information, but the longitude and latitude information of the preset coordinate point in the target grid is farther from the longitude and latitude information of the candidate POI information. For example, when the longitude and latitude information of the upper left corner in the target grid is used as the longitude and latitude information of all candidate POI information falling into the target grid, for the candidate POI information of the lower back corner in the target grid, the longitude and latitude information of the upper left corner in the grid on the right side or the lower side of the target grid can represent the longitude and latitude information of the candidate POI information better than the longitude and latitude information of the upper left corner in the target grid and the longitude and latitude information of the upper left corner in the grid on the right side or the lower side of the target grid.
In this case, the following steps 1 to 2 may be adopted to determine longitude and latitude information corresponding to the candidate POI information according to the longitude and latitude information of the preset coordinate point in the target grid, including:
step 1, acquiring longitude and latitude information of a preset coordinate point in a grid adjacent to the target grid;
and 2, carrying out weighted calculation on the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid to obtain the longitude and latitude information corresponding to the candidate POI information.
For the longitude in the latitude and longitude information of the candidate POI information, acquiring the longitude of a preset coordinate point in at least one grid adjacent to the target grid in the longitude direction; and carrying out weighted calculation on the longitude of a preset coordinate point in the target grid and the longitude of a preset coordinate point in at least one grid adjacent to the target grid in the longitude direction to obtain the longitude corresponding to the candidate POI information.
For the latitude in the latitude and longitude information of the candidate POI information, the latitude of a preset coordinate point in at least one grid adjacent to the target grid in the latitude direction can be acquired; and carrying out weighted calculation on the latitude of a preset coordinate point in the target grid and the latitude of a preset coordinate point in at least one grid adjacent to the target grid in the latitude direction to obtain the latitude corresponding to the candidate POI information.
Similarly, the current longitude and latitude information of the terminal can be obtained through the steps.
After acquiring the longitude and latitude in the current longitude and latitude information of the terminal and the longitude and latitude of the longitude and latitude information corresponding to the candidate POI information, splicing the longitude and latitude in the current longitude and latitude information of the terminal and the longitude and latitude information corresponding to the candidate POI information into a first 4-dimensional longitude and latitude vector, and then determining the geographic position characteristic vector by utilizing the following steps 1 to 3.
Step 1, extracting the current longitude and latitude information of the terminal and the features of the longitude and latitude information corresponding to the candidate POI information to obtain longitude and latitude feature vectors.
For example, a 3-layer CNN model may be used to embed the first longitude and latitude vector including the longitude and latitude in the current longitude and latitude information of the terminal and the longitude and latitude information of the longitude and latitude information corresponding to the candidate POI information, so as to obtain a second longitude and latitude vector. The initial parameters of the CNN model may be random real numbers, and the initial parameters are continuously adjusted along with the training process of the CNN model.
And a 3-layer CNN model can be adopted to extract the characteristics of the second longitude and latitude vector to obtain the longitude and latitude characteristic vector, so that the position relationship between the current position of the terminal and the position corresponding to the candidate POI information is represented.
And 2, aiming at each dimension characteristic in the longitude and latitude characteristic vector, calculating a second similarity between the dimension characteristic and each other dimension characteristic in the longitude and latitude characteristic vector.
And 3, determining the geographic position feature vector based on the longitude and latitude feature vector and all the second similarities.
S203: determining a similarity between the candidate POI information and the query statement based on the first semantic feature vector, the second semantic feature vector, and the geographic location feature vector.
The following possible embodiments may be employed to determine the similarity between the candidate POI information and the query statement based on the first semantic feature vector, the second semantic feature vector, and the geographic location feature vector:
in a possible implementation manner, the geographic position feature vector and the first semantic feature vector can be spliced to obtain a third semantic feature vector; and determining the similarity between the candidate POI information and the query statement based on the third semantic feature vector and the second semantic feature vector.
B: in another possible implementation, the geographic position feature vector may be spliced with the second semantic feature vector to obtain a fourth semantic feature vector; and determining the similarity between the candidate POI information and the query statement based on the first semantic feature vector and the fourth semantic feature vector.
C: in another possible implementation, the geographic position feature vector may be spliced with the first semantic feature vector to obtain a fifth semantic feature vector; splicing the geographic position feature vector with the second semantic feature vector to obtain a sixth semantic feature vector; and determining the similarity between the candidate POI information and the query statement based on the fifth semantic feature vector and the sixth semantic feature vector.
For example, a fully-connected neural network model may be used to determine the similarity between the candidate POI information and the query statement using the fifth semantic feature vector and the sixth semantic feature vector. The cosine similarity between the fifth semantic feature vector and the sixth semantic feature vector may also be calculated as the similarity between the candidate POI information and the query sentence.
In a possible implementation manner, for each candidate POI information, the query statement, the current longitude and latitude information of the terminal, and the candidate POI information are input into a machine learning model trained in advance, so as to obtain the similarity between the candidate POI information and the query statement.
The machine learning model may be trained by:
acquiring a plurality of historical query sentences input by a user at a terminal, historical longitude and latitude information of the terminal when the user inputs each historical query sentence, historical candidate POI information corresponding to each historical query sentence and historical target POI information corresponding to each historical query sentence;
and determining a training sample by using each historical query statement, historical longitude and latitude information corresponding to each historical query statement, each historical candidate POI information and each historical target POI information, and training an initial machine learning model by using the training sample to obtain the machine learning model.
Specifically, for each historical query statement, historical target POI information actually clicked by a user after the historical query statement is input is acquired;
constructing a positive sample by using each historical query statement, the actually clicked historical target POI information corresponding to each historical query statement and the historical longitude and latitude information corresponding to each historical query statement;
and constructing a negative sample by using each historical query statement, the history candidate POI information which is not clicked and corresponds to each historical query statement and the history longitude and latitude information which corresponds to each historical query statement.
S104: and selecting at least one target POI information from the at least one candidate POI information based on each similarity, and displaying the target POI information on the terminal.
In the specific implementation process, 1-10 pieces of target POI information can be selected and displayed at the terminal.
After the terminal displays, the updated query statement input by the user can be continuously acquired. The updated query statement may include a query statement before updating and a newly added query statement; the updated query statement may also include a query statement obtained by deleting or modifying based on the query statement before updating; the updated query statement may also comprise a completely new query statement. And then, returning to the step of determining at least one candidate POI information and the corresponding longitude and latitude information based on the query statement. And clicking and selecting the target POI information position required by the user from the target POI information by the user until the target POI information is acquired and sent by the terminal.
According to the geographic information retrieval method provided by the embodiment of the application, the current longitude and latitude information of the terminal and the geographic position information such as the longitude and latitude information corresponding to the candidate POI information are added in the process of determining the similarity between each candidate POI information and the query statement, so that the speed and the accuracy of geographic information retrieval are greatly improved.
Example two
In the geographic information retrieval method provided by the embodiment of the application, the query statement, the current longitude and latitude information of the terminal and the candidate POI information are input into a pre-trained machine learning model aiming at each candidate POI information, so that the similarity between the candidate POI information and the query statement is obtained. Fig. 3 is a schematic diagram of a model structure of a machine learning model used in the geographic information retrieval method according to the embodiment of the present application.
The machine learning model described above includes six layers, from input to output, an input splitting layer 301, an embedding layer 302, a local feature extraction layer 303, a global feature extraction layer 304, a feature fusion layer 305, and an output layer 306.
The inputs to the machine learning model include: and the query statement q, the name n of the candidate POI and the address a of the candidate POI in the candidate POI information, the current longitude and latitude information of the terminal and the longitude and latitude information g corresponding to the candidate POI information.
The input to the machine learning model is split via input split layer 301. The text information is divided into words and phrases, the words and phrases comprise words, single words, words and letters, and the latitude and longitude information is divided into latitude and longitude. The text information includes: and the query statement q, the name n of the candidate POI in the candidate POI information and the address a of the candidate POI. The text information is segmented using the input splitting layer 301, and assuming that the query sentence q is divided into T words, q is { q1, q2, … …, qT }, the name n of the candidate POI in the candidate POI information is divided into K words, n is { n1, n2, … …, nK }, and the address a of the candidate POI is divided into J words, a is { a1, a2, … …, aJ }. The latitude and longitude information includes: and the current longitude and latitude information of the terminal and the longitude and latitude information corresponding to the candidate POI information. The longitude and latitude information is split by using the input splitting layer 301, the longitude of the current longitude and latitude information of the terminal is lat1 and the latitude is ng1, and the longitude of the longitude and latitude information corresponding to the candidate POI information is lat2 and the latitude is ng2, so the longitude and latitude information g is { lat1, ng1, lat2, ng2 }.
After the input splitting layer 301 is split, the query statement q, the address a of the candidate POI, the name n and the longitude and latitude information g of the candidate POI are input into the respective embedded layers 302, and a query statement vector q, an address vector a of the candidate POI, a name vector n of the candidate POI and a longitude and latitude information vector g are respectively obtained. For text information vectors, such as the query sentence q, the name n of a candidate POI in the candidate POI information, and the address a of the candidate POI, the embedded layer 302 may employ a CNN model, where the CNN employs a random real number as an initial parameter, and the initial parameter is adjusted along with a training process of the CNN model, and using the trained CNN model, the query sentence vector q, the address vector a of the candidate POI, and the name vector n of the candidate POI may be obtained based on the query sentence q, the name n of the candidate POI, and the address a of the candidate POI. For the longitude and latitude information g, a CNN model can also be used for embedding operation, and a longitude and latitude information vector g-G is obtained based on the longitude and latitude information g. The method in step S202 of the first embodiment may be adopted to simplify the latitude and longitude information. Specifically, for example, for longitude and latitude information corresponding to the candidate POI information, a map in which all longitude and latitude information is stored may be divided into grids of a size of 100m multiplied by 100m, and a target grid into which the candidate POI information falls may be obtained according to the longitude and latitude information actually located by the candidate POI information. And using the longitude and latitude information of the upper left corner coordinate of the target grid as the longitude and latitude information corresponding to all candidate POI information falling into the target grid.
In the specific implementation process, for candidate POI information located at the boundary of the target grid, the longitude and latitude information of the adjacent grid may be more similar to the longitude and latitude information of the candidate POI information, but the longitude and latitude information of the preset coordinate point in the target grid is farther from the longitude and latitude information of the candidate POI information. For example, when the longitude and latitude information of the upper left corner in the target grid is used as the longitude and latitude information of all candidate POI information falling into the target grid, for the candidate POI information of the lower back corner in the target grid, the longitude and latitude information of the upper left corner in the grid on the right side or the lower side of the target grid can represent the longitude and latitude information of the candidate POI information better than the longitude and latitude information of the upper left corner in the target grid and the longitude and latitude information of the upper left corner in the grid on the right side or the lower side of the target grid.
Therefore, the longitude and latitude information vector g ═ { lat1 ~, ng1 ~, lat2 ~, ng2} is obtained by using the kernel embedding method, and specifically, the following formula can be adopted for the longitude lat2 ~ in the longitude and latitude information of the candidate POI information:
lat2~=wi-1lat2~i-1+wilat2~i+wi+1lat2~i+1
among them, lat2i-1Lat2 for the upper left-hand coordinate of the grid to the left in the longitudinal direction of the target grid into which the candidate POI information fallsiFor the upper left coordinate of the target grid into which the candidate POI information falls, lat2i+1Coordinates of the upper left corner, w, of the grid to the right in the longitudinal direction of the target grid into which the candidate POI information fallsi-1、wiAnd wi+1Respectively lat2i-1、lat2~iAnd lat2 >i+1The corresponding weight.
The dimensions of the query statement vectors q-, the address vectors a-, the name vectors n-and the latitude and longitude information vectors g-of the candidate POIs extracted by the embedding layer 302 are all d, so that for example, for the address a of the candidate POI { a1, a2, … …, aJ }, each input vocabulary a1, a2, … … aJ is converted into a vector with the dimension d through the embedding operation of the embedding layer 302, and the d-dimension vectors of each vocabulary can be spliced into a matrix a1 with d rows and J columns for convenience of storage and calculation. Similarly, each vocabulary N1, N2, … …, nK in the name N of the candidate POI is converted into a d-dimensional vector, and the d-dimensional vectors of each vocabulary are spliced into a matrix N1 of d rows and K columns. Each vocabulary Q1, Q2, … …, qT in the query statement Q is converted into a d-dimensional vector, and the d-dimensional vectors of each vocabulary are spliced into a matrix Q1 of d rows and T columns. And converting each longitude and latitude lat1, ng1, lat2 and ng2 in the longitude and latitude information G into a d-dimensional vector, and splicing the d-dimensional vector of each vocabulary into a matrix G1 with d rows and 4 columns.
Then, local feature extraction is performed on the query statement vectors Q, the address vectors a, the name vectors N and the latitude and longitude information vectors G of the candidate POIs and the matrix A1, N1, Q1 and G1 through the local feature extraction layer 303. For example, the local feature extraction layer 303 may be implemented by using a CNN model, specifically, for the matrix a1, the CNN model may use m convolution kernels with a size of 3d to perform m convolutions on the matrix a1, each convolution may obtain a feature vector of an address of a candidate POI in J dimensions, the m convolutions may be performed to obtain m vectors in J dimensions, and the m vectors in J dimensions are also stored as a matrix a2 in J rows and m columns for convenience of storage. Similarly, the matrices N1, Q1, and G1 are all input into the CNN model, and are convolved with m convolution kernels of size 3d to obtain a matrix N2 of K rows and m columns, a matrix Q2 of T rows and m columns, and a matrix G2 of 4 rows and m columns, respectively.
The matrices a2, N2, Q2 and G2 are respectively input into the global feature extraction layer 304 for further feature extraction. First, the matrices a2, N2, Q2, and G2 were subjected to feature extraction using a self-attention mechanism. Taking a query statement q as an example, a self-attention mechanism is adopted to distinguish semantic feature vectors corresponding to words with high importance from the semantic feature vectors of the query statement q, and for each word, a grammatical relation and a semantic relation between the word and each other word in the sentence are extracted, so that for each dimension feature in the semantic feature vectors of the query statement q, a first similarity between the dimension feature and each other dimension feature in the semantic feature vectors of the query statement q needs to be calculated. And determining the first semantic feature vector Q ^ based on the semantic feature vector of the query statement Q and all the first similarities.
Specifically, for example, a self-attention (self-attention) mechanism may be adopted, and based on the semantic feature vector of the query statement, a first semantic feature vector Q ^ is obtained, and self-attention may be calculated by using the following formula:
Figure BDA0001958555720000261
wherein Q is a feature matrix Q for storing semantic feature vectors of the query statement, and m is the dimension of the semantic feature vectors of the query statement.
Further, the first semantic feature vector can be optimized by a feedforward neural network with two linear transformation and rectification linear units, and the specific formula is as follows:
Q^=max(0,Q^×Wq1+Bq1)×Wq2+Bq2
here, Wq1 and Wq2 are weight matrices of m rows and m columns, and Bq1 and Bq2 are base matrices of T rows and m columns.
Using the same algorithm, a first address semantic vector A ^ is derived from matrix A2, a first name semantic vector N ^ is derived from matrix N2, and a geographic location feature vector G ^ is derived from matrix G2. For the first address semantic vector A ^ and the first name semantic vector N ^, to learn two complementary fields: and extracting the characteristic association degree between the first address semantic vector A and the first name semantic vector N by adopting a cross attention model so as to obtain a second semantic feature vector P based on the first address semantic vector A and the first name semantic vector N.
Specifically, for example, a matrix of K rows and m columns can be obtained based on interdependent feature vectors A ^ and N ^ by the following formula
Figure BDA0001958555720000262
And J rows and m columns of matrix
Figure BDA0001958555720000263
Will matrix
Figure BDA0001958555720000264
Sum matrix
Figure BDA0001958555720000265
After the connection, the connected matrix is aligned
Figure BDA0001958555720000266
Sum matrix
Figure BDA0001958555720000267
And extracting global semantic features to obtain a second semantic feature vector P ^.
Figure BDA0001958555720000271
Figure BDA0001958555720000272
Figure BDA0001958555720000273
Wherein, Wq1 and Wq2 are weight matrixes of m rows and m columns, and Bq1 and Bq2 are basic matrixes of T rows and m columns.
Then, inputting the first semantic feature vector Q ^ and the second semantic feature vector P ^ and the geographic position feature vector G ^ into the feature fusion layer 305, splicing the geographic position feature vector G ^ and the first semantic feature vector Q ^ to obtain a fifth semantic feature vector Q ^ and splicing the geographic position feature vector G ^ and the second semantic feature vector P ^ to obtain a sixth semantic feature vector P ^ and the sixth semantic feature vector P ^ are obtained.
The following formula can be used for splicing:
P~=[P^;G^]×Wp+Bp
Q~=[Q^;G^]×Wq+Bq
wherein, Wp and Wq are weight matrixes of 2d rows and d columns, and Bp and Bq are basic matrixes of 1 row and d columns.
And using the output layer 306 to obtain the similarity between the candidate POI information and the query statement based on the fifth semantic feature vector Q-and the sixth semantic feature vector P obtained by the feature fusion layer 305. For example, a fully-connected neural network model may be used to determine the similarity between the candidate POI information and the query statement using the fifth semantic feature vector and the sixth semantic feature vector. Or calculating cosine correlation between the fifth semantic feature vector and the sixth semantic feature vector, and determining similarity between the candidate POI information and the query statement based on the cosine correlation. Further, the probability that the candidate POI information is selected by the user may also be determined based on the cosine correlation.
Specifically, the cosine correlation between the fifth semantic feature vector and the sixth semantic feature vector may be calculated using the following formula:
Figure BDA0001958555720000274
specifically, the following formula may be used to determine the probability that the candidate POI information may be selected based on the cosine correlation.
Figure BDA0001958555720000281
Where r is a smoothing factor.
When the machine learning model shown in fig. 3 is trained, the positive case P + is used when the user uses the terminal to search for geographic information, the history query sentence which is actually input and the history target POI information which is actually selected by the user through clicking. In addition, a negative case P & lt- & gt is also constructed in the embodiment of the application, so that when the user uses the terminal to search the geographic information, the history query sentence which is actually input and at least one random history candidate POI information which is not clicked by the user are provided. In training the machine learning model, the loss function used is:
Figure BDA0001958555720000282
in the geographic information retrieval method provided by the embodiment of the application, the machine learning model shown in fig. 3 is adopted, and the current longitude and latitude information of the terminal and the geographic position information such as the longitude and latitude information corresponding to the candidate POI information are added in the process of determining the similarity between each candidate POI information and the query sentence, so that the speed and the accuracy of geographic information retrieval are greatly improved.
Based on the same technical concept, embodiments of the present application further provide a geographic information retrieval device, an electronic device, a readable storage medium, and the like, and refer to the following embodiments specifically.
EXAMPLE III
The embodiment of the present application further provides a geographic information retrieving apparatus 400, which includes:
an obtaining module 401, configured to obtain an inquiry statement input by a user at a terminal and current longitude and latitude information of the terminal;
a determining module 402, configured to determine, based on the query statement, at least one candidate POI information, where the candidate POI information includes latitude and longitude information;
a similarity calculation module 403, configured to determine, based on the query statement, the current longitude and latitude information of the terminal, and each determined candidate POI information, a similarity between each candidate POI information and the query statement;
a result selecting module 404, configured to select at least one target POI information from the at least one candidate POI information based on each of the similarities, and display the target POI information on the terminal.
In a possible implementation manner, the obtaining module 401 is further configured to obtain an updated query statement input by a user;
the determining module 402 is further configured to determine at least one candidate POI information based on the updated query statement.
In one possible embodiment, the candidate POI information further includes: the name of the candidate POI;
the similarity calculation module 403 includes:
a semantic feature determining module 431, configured to determine, for each candidate POI information, a first semantic feature vector corresponding to the query statement and a second semantic feature vector corresponding to a name of a candidate POI included in the candidate POI information;
a location feature determining module 432, configured to determine a geographic location feature vector based on the current longitude and latitude information of the terminal and the longitude and latitude information corresponding to the candidate POI information, where the geographic location feature vector is used to represent a location relationship between the current location of the terminal and a location corresponding to the candidate POI information;
a similarity determining module 433, configured to determine a similarity between the candidate POI information and the query statement based on the first semantic feature vector, the second semantic feature vector, and the geographic location feature vector.
In a possible implementation manner, the similarity determining module 433 is further configured to:
splicing the geographic position feature vector with the first semantic feature vector to obtain a third semantic feature vector;
and determining the similarity between the candidate POI information and the query statement based on the third semantic feature vector and the second semantic feature vector.
In a possible implementation manner, the similarity determining module 433 is further configured to:
splicing the geographic position feature vector with the second semantic feature vector to obtain a fourth semantic feature vector;
and determining the similarity between the candidate POI information and the query statement based on the first semantic feature vector and the fourth semantic feature vector.
In a possible implementation manner, the similarity determining module 433 is further configured to:
splicing the geographic position feature vector with the first semantic feature vector to obtain a fifth semantic feature vector;
splicing the geographic position feature vector with the second semantic feature vector to obtain a sixth semantic feature vector;
and determining the similarity between the candidate POI information and the query statement based on the fifth semantic feature vector and the sixth semantic feature vector.
In a possible implementation, the apparatus further includes a latitude and longitude determination module 405 configured to:
acquiring longitude and latitude information obtained by actual positioning of candidate POI information;
dividing the map into grids with preset sizes, and determining a target grid into which the candidate POI information falls according to longitude and latitude information obtained by actual positioning of the candidate POI information;
and determining longitude and latitude information corresponding to the candidate POI information according to the longitude and latitude information of the preset coordinate points in the target grid.
In a possible implementation, the latitude and longitude determining module 405 is further configured to:
acquiring longitude and latitude information of a preset coordinate point in a grid adjacent to the target grid;
and carrying out weighted calculation on the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid to obtain the longitude and latitude information corresponding to the candidate POI information.
In a possible implementation, the latitude and longitude determining module 405 is further configured to:
acquiring the longitude of a preset coordinate point in at least one grid adjacent to the target grid in the longitude direction;
the weighting calculation of the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid is performed to obtain the longitude and latitude information corresponding to the candidate POI information, and the method comprises the following steps:
and carrying out weighted calculation on the longitude of a preset coordinate point in the target grid and the longitude of a preset coordinate point in at least one grid adjacent to the target grid in the longitude direction to obtain the longitude corresponding to the candidate POI information.
In a possible implementation, the latitude and longitude determining module 405 is further configured to:
acquiring the latitude of a preset coordinate point in at least one grid adjacent to the target grid in the latitude direction;
the weighting calculation is performed on the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid to obtain the longitude and latitude information corresponding to the candidate POI information, and the method further comprises the following steps:
and carrying out weighted calculation on the latitude of a preset coordinate point in the target grid and the latitude of a preset coordinate point in at least one grid adjacent to the target grid in the latitude direction to obtain the latitude corresponding to the candidate POI information.
In one possible embodiment, the candidate POI information further includes: addresses of candidate POIs;
the semantic feature determination module 431, configured to:
respectively determining a first name semantic vector corresponding to the name of the candidate POI and a first address semantic vector corresponding to the address of the candidate POI;
determining the second semantic feature vector based on the first name semantic vector and the first address semantic vector.
In a possible implementation, the semantic feature determining module 431 is further configured to:
aiming at each dimension feature in the first name semantic vector, determining a first feature association degree of the dimension feature and each dimension feature in the address semantic vector, and obtaining a second name semantic vector by using all the first feature association degrees and the first name semantic vector;
aiming at each dimension feature in the first address semantic vector, determining a second feature relevance degree of the dimension feature and each dimension feature in the name semantic vector, and obtaining a second address semantic vector by using all the second feature relevance degrees and the first address semantic vector;
determining the second semantic feature vector according to the second name semantic vector and the second address semantic vector.
In a possible implementation, the semantic feature determining module 431 is further configured to:
performing word segmentation on the query sentence;
determining semantic feature vectors of the query sentences based on each vocabulary obtained by word segmentation;
aiming at each dimension characteristic in the semantic characteristic vector of the query statement, calculating first similarity between the dimension characteristic and each other dimension characteristic in the semantic characteristic vector of the query statement;
determining the first semantic feature vector based on the semantic feature vector of the query statement and all of the first similarities.
In a possible implementation, the location characteristic determining module 432 is further configured to:
extracting the current longitude and latitude information of the terminal and the characteristics of the longitude and latitude information corresponding to the candidate POI information to obtain longitude and latitude characteristic vectors;
aiming at each dimension characteristic in the longitude and latitude characteristic vector, calculating a second similarity between the dimension characteristic and each other dimension characteristic in the longitude and latitude characteristic vector;
and determining the geographic position feature vector based on the longitude and latitude feature vector and all the second similarities.
In a possible implementation, the similarity calculation module 403 is further configured to:
and inputting the query statement, the current longitude and latitude information of the terminal and the candidate POI information into a pre-trained machine learning model aiming at each candidate POI information to obtain the similarity between the candidate POI information and the query statement.
In a possible implementation, the apparatus further includes a model training module 406 configured to:
acquiring a plurality of historical query sentences input by a user at a terminal, historical longitude and latitude information of the terminal when the user inputs each historical query sentence, historical candidate POI information corresponding to each historical query sentence and historical target POI information corresponding to each historical query sentence;
and determining a training sample by using each historical query statement, historical longitude and latitude information corresponding to each historical query statement, each historical candidate POI information and each historical target POI information, and training an initial machine learning model by using the training sample to obtain the machine learning model.
In a possible implementation, the model training module 406 is further configured to:
acquiring historical target POI information actually clicked by a user after the historical query statement is input by the user aiming at each historical query statement;
constructing a positive sample by using each historical query statement, the actually clicked historical target POI information corresponding to each historical query statement and the historical longitude and latitude information corresponding to each historical query statement;
and constructing a negative sample by using each historical query statement, the history candidate POI information which is not clicked and corresponds to each historical query statement and the history longitude and latitude information which corresponds to each historical query statement.
According to the geographic information retrieval device provided by the embodiment of the application, the current longitude and latitude information of the terminal and the geographic position information such as the longitude and latitude information corresponding to the candidate POI information are added in the process of determining the similarity between each candidate POI information and the query statement, so that the speed and the accuracy of geographic information retrieval are greatly improved.
Example four
Referring to fig. 5, an electronic device 500 provided in the embodiments of the present application includes a processor 501, a memory 502, and a bus 503.
The memory 502 stores machine-readable instructions (e.g., corresponding execution instructions of the obtaining module 401, the determining module 402, the similarity calculating module 403, and the result selecting module 404 in fig. 4, etc.) executable by the processor 501, when the electronic device 500 runs, the processor 501 communicates with the memory 502 through the bus 503, and the machine-readable instructions when executed by the processor 501 perform the following processes:
acquiring an inquiry statement input by a user at a terminal and current longitude and latitude information of the terminal;
determining at least one candidate POI (point of interest) information based on the query statement, wherein the candidate POI information comprises longitude and latitude information;
determining the similarity between each candidate POI information and the query statement based on the query statement, the current longitude and latitude information of the terminal and each determined candidate POI information;
and selecting at least one target POI information from the at least one candidate POI information based on each similarity, and displaying the target POI information on the terminal.
The specific processing flow of the processor 501 may refer to the description of the above embodiments, and is not described herein again.
According to the electronic equipment provided by the embodiment of the application, the current longitude and latitude information of the terminal and the longitude and latitude information and other geographic position information corresponding to the candidate POI information are added in the process of determining the similarity between each candidate POI information and the query statement, so that the speed and the accuracy of geographic information retrieval are greatly improved.
EXAMPLE five
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to perform the steps of the geographic information retrieval method in the first embodiment and/or the geographic information retrieval method in the second embodiment.
Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, or the like, and when a computer program on the storage medium is run, the geographic information retrieval method can be executed, so that the current longitude and latitude information of the terminal and the geographic position information such as the longitude and latitude information corresponding to the candidate POI information are added in the process of determining the similarity between each candidate POI information and the query statement, and the speed and accuracy of geographic information retrieval are greatly improved.
The computer program product of the geographic information retrieval method provided in the embodiment of the present application includes a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method in the foregoing method embodiment, and specific implementation may refer to the method embodiment, and details are not described here again.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this application. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (30)

1. A geographic information retrieval method, comprising:
acquiring an inquiry statement input by a user at a terminal and current longitude and latitude information of the terminal;
determining at least one candidate POI information based on the query statement, wherein the candidate POI information comprises longitude and latitude information;
determining the similarity between each candidate POI information and the query statement based on the query statement, the current longitude and latitude information of the terminal and each determined candidate POI information;
based on each similarity, selecting at least one target POI information from the at least one candidate POI information, and displaying the target POI information on the terminal;
the candidate POI information further includes: the name of the candidate POI;
the determining the similarity between each candidate POI information and the query statement based on the query statement, the current longitude and latitude information of the terminal and each determined candidate POI information comprises the following steps:
aiming at each candidate POI information, determining a first semantic feature vector corresponding to the query statement and a second semantic feature vector corresponding to the name of the candidate POI included in the candidate POI information;
determining a geographic position feature vector based on the current longitude and latitude information of the terminal and the longitude and latitude information corresponding to the candidate POI information, wherein the geographic position feature vector is used for representing the position relationship between the current position of the terminal and the position corresponding to the candidate POI information;
determining similarity between the candidate POI information and the query statement based on the first semantic feature vector, the second semantic feature vector, and the geographic location feature vector;
the candidate POI information further includes: addresses of candidate POIs;
the method further comprises a step of determining a second semantic feature vector corresponding to the candidate POI information:
respectively determining a first name semantic vector corresponding to the name of the candidate POI and a first address semantic vector corresponding to the address of the candidate POI;
determining the second semantic feature vector based on the first name semantic vector and the first address semantic vector;
the determining the second semantic feature vector based on the first name semantic vector and the first address semantic vector comprises:
aiming at each dimension feature in the first name semantic vector, determining a first feature association degree of the dimension feature and each dimension feature in the address semantic vector, and obtaining a second name semantic vector by using all the first feature association degrees and the first name semantic vector;
aiming at each dimension feature in the first address semantic vector, determining a second feature relevance degree of the dimension feature and each dimension feature in the name semantic vector, and obtaining a second address semantic vector by using all the second feature relevance degrees and the first address semantic vector;
determining the second semantic feature vector according to the second name semantic vector and the second address semantic vector.
2. The method of claim 1, wherein selecting at least one target POI information from the at least one candidate POI information, and after the displaying by the terminal, further comprises:
acquiring an updated query statement input by a user;
and returning to the step of determining at least one candidate POI information based on the query statement.
3. The method of claim 1, wherein determining the similarity between the candidate POI information and the query sentence based on the first semantic feature vector, the second semantic feature vector, and the geographic location feature vector comprises:
splicing the geographic position feature vector with the first semantic feature vector to obtain a third semantic feature vector;
and determining the similarity between the candidate POI information and the query statement based on the third semantic feature vector and the second semantic feature vector.
4. The method of claim 1, wherein determining the similarity between the candidate POI information and the query sentence based on the first semantic feature vector, the second semantic feature vector, and the geographic location feature vector comprises:
splicing the geographic position feature vector with the second semantic feature vector to obtain a fourth semantic feature vector;
and determining the similarity between the candidate POI information and the query statement based on the first semantic feature vector and the fourth semantic feature vector.
5. The method of claim 1, wherein determining the similarity between the candidate POI information and the query sentence based on the first semantic feature vector, the second semantic feature vector, and the geographic location feature vector comprises:
splicing the geographic position feature vector with the first semantic feature vector to obtain a fifth semantic feature vector;
splicing the geographic position feature vector with the second semantic feature vector to obtain a sixth semantic feature vector;
and determining the similarity between the candidate POI information and the query statement based on the fifth semantic feature vector and the sixth semantic feature vector.
6. The method according to claim 1, further comprising the step of obtaining latitude and longitude information corresponding to the candidate POI information:
acquiring longitude and latitude information obtained by actual positioning of candidate POI information;
dividing the map into grids with preset sizes, and determining a target grid into which the candidate POI information falls according to longitude and latitude information obtained by actual positioning of the candidate POI information;
and determining longitude and latitude information corresponding to the candidate POI information according to the longitude and latitude information of the preset coordinate points in the target grid.
7. The method of claim 6, wherein the determining longitude and latitude information corresponding to the candidate POI information according to the longitude and latitude information of the preset coordinate point in the target grid comprises:
acquiring longitude and latitude information of a preset coordinate point in a grid adjacent to the target grid;
and carrying out weighted calculation on the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid to obtain the longitude and latitude information corresponding to the candidate POI information.
8. The method of claim 7, wherein the obtaining latitude and longitude information of a predetermined coordinate point in a grid adjacent to the target grid comprises:
acquiring the longitude of a preset coordinate point in at least one grid adjacent to the target grid in the longitude direction;
the weighting calculation of the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid is performed to obtain the longitude and latitude information corresponding to the candidate POI information, and the method comprises the following steps:
and carrying out weighted calculation on the longitude of a preset coordinate point in the target grid and the longitude of a preset coordinate point in at least one grid adjacent to the target grid in the longitude direction to obtain the longitude corresponding to the candidate POI information.
9. The method of claim 7, wherein the obtaining latitude and longitude information of a predetermined coordinate point in a grid adjacent to the target grid further comprises:
acquiring the latitude of a preset coordinate point in at least one grid adjacent to the target grid in the latitude direction;
the weighting calculation is performed on the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid to obtain the longitude and latitude information corresponding to the candidate POI information, and the method further comprises the following steps:
and carrying out weighted calculation on the latitude of a preset coordinate point in the target grid and the latitude of a preset coordinate point in at least one grid adjacent to the target grid in the latitude direction to obtain the latitude corresponding to the candidate POI information.
10. The method of claim 1, wherein determining the first semantic feature vector corresponding to the query statement comprises:
performing word segmentation on the query sentence;
determining semantic feature vectors of the query sentences based on each vocabulary obtained by word segmentation;
aiming at each dimension characteristic in the semantic characteristic vector of the query statement, calculating first similarity between the dimension characteristic and each other dimension characteristic in the semantic characteristic vector of the query statement;
determining the first semantic feature vector based on the semantic feature vector of the query statement and all of the first similarities.
11. The method of claim 1, wherein the determining the geographic location feature vector based on the current latitude and longitude information of the terminal and the latitude and longitude information corresponding to the candidate POI information comprises:
extracting the current longitude and latitude information of the terminal and the characteristics of the longitude and latitude information corresponding to the candidate POI information to obtain longitude and latitude characteristic vectors;
aiming at each dimension characteristic in the longitude and latitude characteristic vector, calculating a second similarity between the dimension characteristic and each other dimension characteristic in the longitude and latitude characteristic vector;
and determining the geographic position feature vector based on the longitude and latitude feature vector and all the second similarities.
12. The method of claim 1, wherein the determining similarity between each candidate POI information and the query sentence based on the query sentence, the current longitude and latitude information of the terminal, and each determined candidate POI information comprises:
and inputting the query statement, the current longitude and latitude information of the terminal and the candidate POI information into a pre-trained machine learning model aiming at each candidate POI information to obtain the similarity between the candidate POI information and the query statement.
13. The method of claim 12, further comprising the step of training the machine learning model by:
acquiring a plurality of historical query sentences input by a user at a terminal, historical longitude and latitude information of the terminal when the user inputs each historical query sentence, historical candidate POI information corresponding to each historical query sentence and historical target POI information corresponding to each historical query sentence;
and determining a training sample by using each historical query statement, historical longitude and latitude information corresponding to each historical query statement, each historical candidate POI information and each historical target POI information, and training an initial machine learning model by using the training sample to obtain the machine learning model.
14. The method of claim 13, wherein determining the training sample using each historical query statement, historical longitude and latitude information corresponding to each historical query statement, each historical candidate POI information, and each historical target POI information comprises:
acquiring historical target POI information actually clicked by a user after the historical query statement is input by the user aiming at each historical query statement;
constructing a positive sample by using each historical query statement, the actually clicked historical target POI information corresponding to each historical query statement and the historical longitude and latitude information corresponding to each historical query statement;
and constructing a negative sample by using each historical query statement, the history candidate POI information which is not clicked and corresponds to each historical query statement and the history longitude and latitude information which corresponds to each historical query statement.
15. A geographic information retrieval device, comprising:
the acquisition module is used for acquiring query sentences input by a user at the terminal and the current longitude and latitude information of the terminal;
a determining module, configured to determine at least one candidate POI information based on the query statement, where the candidate POI information includes latitude and longitude information;
the similarity calculation module is used for determining the similarity between each candidate POI information and the query statement based on the query statement, the current longitude and latitude information of the terminal and each determined candidate POI information;
a result selection module, configured to select at least one piece of target POI information from the at least one piece of candidate POI information based on each of the similarities, and display the target POI information on the terminal;
the candidate POI information further includes: the name of the candidate POI;
the similarity calculation module includes:
the semantic feature determining module is used for determining a first semantic feature vector corresponding to the query statement and a second semantic feature vector corresponding to the names of the candidate POI included in the candidate POI information aiming at each candidate POI information;
the position feature determination module is used for determining a geographic position feature vector based on the current longitude and latitude information of the terminal and the longitude and latitude information corresponding to the candidate POI information, wherein the geographic position feature vector is used for representing the position relationship between the current position of the terminal and the position corresponding to the candidate POI information;
a similarity determination module, configured to determine a similarity between the candidate POI information and the query statement based on the first semantic feature vector, the second semantic feature vector, and the geographic location feature vector;
the candidate POI information further includes: addresses of candidate POIs;
the semantic feature determination module is configured to:
respectively determining a first name semantic vector corresponding to the name of the candidate POI and a first address semantic vector corresponding to the address of the candidate POI;
determining the second semantic feature vector based on the first name semantic vector and the first address semantic vector;
the semantic feature determination module is further configured to:
aiming at each dimension feature in the first name semantic vector, determining a first feature association degree of the dimension feature and each dimension feature in the address semantic vector, and obtaining a second name semantic vector by using all the first feature association degrees and the first name semantic vector;
aiming at each dimension feature in the first address semantic vector, determining a second feature relevance degree of the dimension feature and each dimension feature in the name semantic vector, and obtaining a second address semantic vector by using all the second feature relevance degrees and the first address semantic vector;
determining the second semantic feature vector according to the second name semantic vector and the second address semantic vector.
16. The apparatus of claim 15, wherein the obtaining module is further configured to obtain an updated query statement input by a user;
the determining module is further configured to determine at least one candidate POI information based on the updated query statement.
17. The apparatus of claim 15, wherein the similarity determining module is further configured to:
splicing the geographic position feature vector with the first semantic feature vector to obtain a third semantic feature vector;
and determining the similarity between the candidate POI information and the query statement based on the third semantic feature vector and the second semantic feature vector.
18. The apparatus of claim 15, wherein the similarity determining module is further configured to:
splicing the geographic position feature vector with the second semantic feature vector to obtain a fourth semantic feature vector;
and determining the similarity between the candidate POI information and the query statement based on the first semantic feature vector and the fourth semantic feature vector.
19. The apparatus of claim 15, wherein the similarity determining module is further configured to:
splicing the geographic position feature vector with the first semantic feature vector to obtain a fifth semantic feature vector;
splicing the geographic position feature vector with the second semantic feature vector to obtain a sixth semantic feature vector;
and determining the similarity between the candidate POI information and the query statement based on the fifth semantic feature vector and the sixth semantic feature vector.
20. The apparatus of claim 15, further comprising a latitude and longitude determination module to:
acquiring longitude and latitude information obtained by actual positioning of candidate POI information;
dividing the map into grids with preset sizes, and determining a target grid into which the candidate POI information falls according to longitude and latitude information obtained by actual positioning of the candidate POI information;
and determining longitude and latitude information corresponding to the candidate POI information according to the longitude and latitude information of the preset coordinate points in the target grid.
21. The apparatus of claim 20, wherein the latitude and longitude determination module is further configured to:
acquiring longitude and latitude information of a preset coordinate point in a grid adjacent to the target grid;
and carrying out weighted calculation on the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid to obtain the longitude and latitude information corresponding to the candidate POI information.
22. The apparatus of claim 21, wherein the latitude and longitude determination module is further configured to:
acquiring the longitude of a preset coordinate point in at least one grid adjacent to the target grid in the longitude direction;
the weighting calculation of the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid is performed to obtain the longitude and latitude information corresponding to the candidate POI information, and the method comprises the following steps:
and carrying out weighted calculation on the longitude of a preset coordinate point in the target grid and the longitude of a preset coordinate point in at least one grid adjacent to the target grid in the longitude direction to obtain the longitude corresponding to the candidate POI information.
23. The apparatus of claim 21, wherein the latitude and longitude determination module is further configured to:
acquiring the latitude of a preset coordinate point in at least one grid adjacent to the target grid in the latitude direction;
the weighting calculation is performed on the longitude and latitude information of the preset coordinate point in the target grid and the acquired longitude and latitude information of the preset coordinate point in the grid adjacent to the target grid to obtain the longitude and latitude information corresponding to the candidate POI information, and the method further comprises the following steps:
and carrying out weighted calculation on the latitude of a preset coordinate point in the target grid and the latitude of a preset coordinate point in at least one grid adjacent to the target grid in the latitude direction to obtain the latitude corresponding to the candidate POI information.
24. The apparatus of claim 15, wherein the semantic feature determination module is further configured to:
performing word segmentation on the query sentence;
determining semantic feature vectors of the query sentences based on each vocabulary obtained by word segmentation;
aiming at each dimension characteristic in the semantic characteristic vector of the query statement, calculating first similarity between the dimension characteristic and each other dimension characteristic in the semantic characteristic vector of the query statement;
determining the first semantic feature vector based on the semantic feature vector of the query statement and all of the first similarities.
25. The apparatus of claim 15, wherein the location characteristic determining module is further configured to:
extracting the current longitude and latitude information of the terminal and the characteristics of the longitude and latitude information corresponding to the candidate POI information to obtain longitude and latitude characteristic vectors;
aiming at each dimension characteristic in the longitude and latitude characteristic vector, calculating a second similarity between the dimension characteristic and each other dimension characteristic in the longitude and latitude characteristic vector;
and determining the geographic position feature vector based on the longitude and latitude feature vector and all the second similarities.
26. The apparatus of claim 15, wherein the similarity calculation module is further configured to:
and inputting the query statement, the current longitude and latitude information of the terminal and the candidate POI information into a pre-trained machine learning model aiming at each candidate POI information to obtain the similarity between the candidate POI information and the query statement.
27. The apparatus of claim 26, further comprising a model training module to:
acquiring a plurality of historical query sentences input by a user at a terminal, historical longitude and latitude information of the terminal when the user inputs each historical query sentence, historical candidate POI information corresponding to each historical query sentence and historical target POI information corresponding to each historical query sentence;
and determining a training sample by using each historical query statement, historical longitude and latitude information corresponding to each historical query statement, each historical candidate POI information and each historical target POI information, and training an initial machine learning model by using the training sample to obtain the machine learning model.
28. The apparatus of claim 27, wherein the model training module is further configured to:
acquiring historical target POI information actually clicked by a user after the historical query statement is input by the user aiming at each historical query statement;
constructing a positive sample by using each historical query statement, the actually clicked historical target POI information corresponding to each historical query statement and the historical longitude and latitude information corresponding to each historical query statement;
and constructing a negative sample by using each historical query statement, the history candidate POI information which is not clicked and corresponds to each historical query statement and the history longitude and latitude information which corresponds to each historical query statement.
29. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the geographic information retrieval method according to any one of claims 1 to 14.
30. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the geographical information retrieval method according to any one of claims 1 to 14.
CN201910075338.6A 2019-01-25 2019-01-25 Geographic information retrieval method and device, electronic equipment and readable storage medium Active CN110674419B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910075338.6A CN110674419B (en) 2019-01-25 2019-01-25 Geographic information retrieval method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910075338.6A CN110674419B (en) 2019-01-25 2019-01-25 Geographic information retrieval method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN110674419A CN110674419A (en) 2020-01-10
CN110674419B true CN110674419B (en) 2020-10-20

Family

ID=69065602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910075338.6A Active CN110674419B (en) 2019-01-25 2019-01-25 Geographic information retrieval method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN110674419B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111831765A (en) * 2020-03-10 2020-10-27 北京嘀嘀无限科技发展有限公司 Data processing method and device, electronic equipment and readable storage medium
CN111366150B (en) * 2020-04-20 2022-03-18 Oppo广东移动通信有限公司 Running direction detection method and device, electronic equipment and storage medium
CN111666461B (en) * 2020-04-24 2023-05-26 百度在线网络技术(北京)有限公司 Method, apparatus, device and computer storage medium for retrieving geographic location
CN111666292B (en) 2020-04-24 2023-05-26 百度在线网络技术(北京)有限公司 Similarity model establishment method and device for retrieving geographic position
CN111680873A (en) * 2020-04-30 2020-09-18 百度在线网络技术(北京)有限公司 Method for monitoring economic state and establishing economic state monitoring model and corresponding device
CN113627184B (en) * 2020-05-08 2023-09-26 北京京东振世信息技术有限公司 Data processing method and device
JP7440338B2 (en) 2020-05-11 2024-02-28 株式会社トヨタマップマスター Information processing device, information processing method, information processing program, and recording medium
CN111694919B (en) * 2020-06-12 2023-07-25 北京百度网讯科技有限公司 Method, device, electronic equipment and computer readable storage medium for generating information
CN112632406B (en) * 2020-10-10 2024-04-09 咪咕文化科技有限公司 Query method, query device, electronic equipment and storage medium
CN113204613B (en) * 2021-04-26 2022-05-03 北京百度网讯科技有限公司 Address generation method, device, equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070016556A1 (en) * 2005-07-13 2007-01-18 Ann Seong W Destination searching system and method
CN102591867B (en) * 2011-01-07 2015-05-27 清华大学 Searching service method based on mobile device position
CN104102667A (en) * 2013-04-11 2014-10-15 北京四维图新科技股份有限公司 POI (Point of Interest) information differentiation method and device
KR102128320B1 (en) * 2013-07-31 2020-06-30 팅크웨어(주) System and method for providing circumference search result
CN103955534B (en) * 2014-05-13 2017-08-04 百度在线网络技术(北京)有限公司 Map inquiry method and device
CN106997354B (en) * 2016-01-25 2020-07-28 北京四维图新科技股份有限公司 POI data retrieval method and device
CN109064249A (en) * 2018-06-28 2018-12-21 中山大学 A kind of clothes recommendation optimization method and its system based on feature personalization modification
CN109032375B (en) * 2018-06-29 2022-07-19 北京百度网讯科技有限公司 Candidate text sorting method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN110674419A (en) 2020-01-10

Similar Documents

Publication Publication Date Title
CN110674419B (en) Geographic information retrieval method and device, electronic equipment and readable storage medium
CN109145169B (en) Address matching method based on statistical word segmentation
CN109376222B (en) Question-answer matching degree calculation method, question-answer automatic matching method and device
CN110795515B (en) Point of interest (POI) processing method and device, electronic equipment and computer storage medium
CN112069276B (en) Address coding method, address coding device, computer equipment and computer readable storage medium
CN111382212B (en) Associated address acquisition method and device, electronic equipment and storage medium
CN109684625A (en) Entity handles method, apparatus and storage medium
CN110147421B (en) Target entity linking method, device, equipment and storage medium
CN110334162B (en) Address recognition method and device
CN111143588B (en) Quick retrieval method for image space-time index based on machine learning
CN108446280A (en) Data-updating method and device
CN111950280A (en) Address matching method and device
Zhao et al. Incorporating semantic similarity with geographic correlation for query-POI relevance learning
Teerarojanarat et al. Using GIS for linguistic study: a case of dialect change in the northeastern region of Thailand
CN112632406B (en) Query method, query device, electronic equipment and storage medium
CN112818666A (en) Address recognition method and device, electronic equipment and storage medium
CN103970732A (en) Mining method and device of new word translation
CN111191107B (en) System and method for recalling points of interest using annotation model
CN111831685A (en) Query statement processing method, model training method, device and equipment
CN111177585A (en) Map POI feedback method and device
US20190318014A1 (en) Facilitating identification of an intended country associated with a query
JP2008090334A (en) Location analyzer, location analyzing method, its program, and recording medium
CN107329730B (en) Voice prompt message generation method and device
CN112579713B (en) Address recognition method, address recognition device, computing equipment and computer storage medium
Gu et al. Deep learning-based image geolocation for travel recommendation via multi-task learning

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
TA01 Transfer of patent application right

Effective date of registration: 20200811

Address after: Room 217, 2nd floor, building 34, No.8 yard, Dongbei Wangxi Road, Haidian District, Beijing 100193

Applicant after: Ditu (Beijing) Technology Co.,Ltd.

Address before: 100193, No. 34, building No. 8, West flourishing road, Haidian District, Beijing

Applicant before: BEIJING DIDI INFINITY TECHNOLOGY AND DEVELOPMENT Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant