Method, apparatus, device and computer storage medium for retrieving geographical location

文档序号:1156240 发布日期:2020-09-15 浏览:7次 中文

阅读说明:本技术 检索地理位置的方法、装置、设备和计算机存储介质 (Method, apparatus, device and computer storage medium for retrieving geographical location ) 是由 黄际洲 王海峰 范淼 于 2020-04-24 设计创作,主要内容包括:本申请公开了一种检索地理位置的方法、装置、设备和计算机存储介质,涉及人工智能领域。具体实现方案为:利用国际字符向量表示词典,分别确定检索词中各字符的向量表示;将检索词中各字符的向量表示输入第一神经网络,得到检索词的向量表示;确定检索词的向量表示与地图数据库中各地理位置的向量表示的相似度;依据相似度,确定检索得到的地理位置;其中地理位置的向量表示是利用国际字符向量表示词典确定地理位置的描述文本中各字符的向量表示后,将地理位置的描述文本中各字符的向量表示输入第二神经网络后得到的;国际字符向量表示词典用于将至少两种语种的字符映射至同一向量空间。本申请能够更好地满足跨语言的地理位置检索需求。(The application discloses a method, a device, equipment and a computer storage medium for retrieving a geographic position, and relates to the field of artificial intelligence. The specific implementation scheme is as follows: respectively determining vector representation of each character in the search word by using an international character vector representation dictionary; inputting the vector representation of each character in the search word into a first neural network to obtain the vector representation of the search word; determining similarity between vector representation of the search term and vector representation of each geographic position in the map database; determining the geographic position obtained by retrieval according to the similarity; the vector representation of the geographic position is obtained by inputting the vector representation of each character in the description text of the geographic position into a second neural network after the vector representation of each character in the description text of the geographic position is determined by using an international character vector representation dictionary; the international character vector representation dictionary is used to map characters of at least two languages to the same vector space. The method and the device can better meet the requirement of cross-language geographic position retrieval.)

1. A method of retrieving a geographic location, the method comprising:

respectively determining the vector representation of each character in the search words input by the user by using an international character vector representation dictionary;

inputting the vector representation of each character in the search word into a first neural network obtained by pre-training to obtain the vector representation of the search word;

determining similarity between the vector representation of the search term and the vector representation of each geographic position in the map database;

determining the geographic position obtained by retrieval according to the similarity;

after determining the vector representation of each character in the description text of the geographic position by using an international character vector representation dictionary, inputting the vector representation of each character in the description text of the geographic position into a pre-trained second neural network to obtain the vector representation of the geographic position; the international character vector representation dictionary is used for mapping characters of at least two languages to the same vector space.

2. The method of claim 1, wherein the descriptive text of the geographic location includes at least one of a name, a tag, an address, a rating, and a photo descriptive text.

3. The method of claim 1, wherein determining the retrieved geographic location based on the similarity comprises:

sorting the geographic positions according to the similarity from high to low, and determining the geographic position obtained by retrieval according to the sorting result; alternatively, the first and second electrodes may be,

and determining similarity characteristics by using the similarity, taking the similarity characteristics as one of input vectors of a ranking model obtained by pre-training, and determining the geographic position obtained by retrieval according to the ranking result of the ranking model to each geographic position.

4. The method according to claim 1, characterized in that it further comprises the following training procedure performed in advance:

acquiring training data from a historical click log, wherein the training data comprises search terms and clicked geographical positions corresponding to the search terms as positive samples and non-clicked geographical positions as negative samples;

training the international character vector representation dictionary, a first neural network and a second neural network with the training data to maximize a difference between a first similarity, which is a similarity between the vector representation of the search word and the vector representation of the positive sample, and a second similarity, which is a similarity between the vector representation of the search word and the vector representation of the negative sample.

5. The method of claim 4, wherein training the international character vector representation dictionary, first neural network, and second neural network using the training data comprises:

respectively determining vector representation of each character in training data by using an international character vector representation dictionary;

inputting the vector representation of each character in the search word into a first neural network to obtain the vector representation of the search word; respectively inputting the vector representation of each character in the description text of the geographical position of the positive sample and the vector representation of each character in the description text of the geographical position of the negative sample into a second neural network to obtain the vector representation of the positive sample and the vector representation of the negative sample;

determining a first similarity of a vector representation of a search term to a vector representation of a positive sample and a second similarity of a vector representation of the same search term to a vector representation of a negative sample;

the international character vector representation dictionary, the first neural network, and the second neural network are trained to maximize a difference between the first similarity and the second similarity.

6. The method according to claim 1, characterized in that it further comprises the following training procedure performed in advance:

acquiring training data from a historical click log, wherein the training data comprises search terms and clicked geographical positions corresponding to the search terms as positive samples and non-clicked geographical positions as negative samples;

expanding the positive sample and the negative sample based on a browsing co-occurrence relation between geographical positions by using a historical browsing log;

training the international character vector representation dictionary, the first neural network and the second neural network by using the expanded training data to maximize the difference between a first similarity and a second similarity, wherein the first similarity is the similarity between the vector representation of the search word and the vector representation of the positive sample, and the second similarity is the similarity between the vector representation of the search word and the vector representation of the negative sample.

7. The method of claim 6, wherein the extending the positive and negative examples based on the co-occurrence relationship of browsing between geographic locations using the historical browsing log comprises:

and respectively acquiring each first geographical position with browsing co-occurrence relation with the clicked geographical position to expand the positive sample and each second geographical position with browsing co-occurrence relation with the un-clicked geographical position to expand the negative sample from a semantic graph.

8. The method of claim 7, wherein training the international character vector representation dictionary, first neural network, and second neural network using the extended training data comprises:

respectively determining vector representation of each character in training data by using an international character vector representation dictionary;

inputting the vector representation of each character in the search word into a first neural network to obtain the vector representation of the search word; respectively inputting the vector representation of each character in the description text of the clicked geographical position and the vector representation of each character in the description text of each first geographical position into a second neural network, and performing weighting processing on the vector representations of each geographical position output by the second neural network according to the associated parameters between the corresponding geographical positions in the semantic graph to obtain the vector representation of the positive sample; respectively inputting the vector representation of each character in the description text of the un-clicked geographical position and the vector representation of each character in the description text of each second geographical position into a second neural network, and performing weighting processing on the vector representations of each geographical position output by the second neural network according to the associated parameters between the corresponding geographical positions in the semantic graph to obtain the vector representation of the negative sample;

determining a first similarity of a vector representation of a search term to a vector representation of a positive sample and a second similarity of a vector representation of the same search term to a vector representation of a negative sample;

the international character vector representation dictionary, the semantic graph, the first neural network and the second neural network are trained to maximize a difference between the first similarity and the second similarity.

9. The method according to claim 7 or 8, wherein the semantic graph is built based on a historical travel log;

the nodes in the semantic graph are geographical positions, association between corresponding nodes is established for the geographical positions with browsing co-occurrence relation, and association parameters between the geographical positions are initially determined according to co-occurrence conditions between the geographical positions and are updated in the training process.

10. An apparatus for retrieving a geographic location, the apparatus comprising:

the device comprises a first vector determining unit, a second vector determining unit and a searching unit, wherein the first vector determining unit is used for respectively determining the vector representation of each character in a search word input by a user by utilizing an international character vector representation dictionary, and the international character vector representation dictionary is used for mapping characters of at least two languages to the same vector space;

the second vector determining unit is used for inputting the vector representation of each character in the search word into a first neural network obtained by pre-training to obtain the vector representation of the search word;

the similarity determining unit is used for determining the similarity between the vector representation of the search term and the vector representation of each geographic position in the map database; after determining the vector representation of each character in the description text of the geographic position by using an international character vector representation dictionary, inputting the vector representation of each character in the description text of the geographic position into a pre-trained second neural network to obtain the vector representation of the geographic position;

and the retrieval processing unit is used for determining the geographic position obtained by retrieval according to the similarity.

11. The apparatus of claim 10, wherein the descriptive text of the geographic location comprises at least one of a name, a tag, an address, a rating, and a photo descriptive text.

12. The apparatus according to claim 10, wherein the retrieval processing unit is specifically configured to:

sorting the geographic positions according to the similarity from high to low, and determining the geographic position obtained by retrieval according to the sorting result; alternatively, the first and second electrodes may be,

and determining similarity characteristics by using the similarity, taking the similarity characteristics as one of input vectors of a ranking model obtained by pre-training, and determining the geographic position obtained by retrieval according to the ranking result of the ranking model to each geographic position.

13. The apparatus of claim 10, further comprising:

a first model training unit for performing the following training process in advance:

acquiring training data from a historical click log, wherein the training data comprises search terms and clicked geographical positions corresponding to the search terms as positive samples and non-clicked geographical positions as negative samples;

training the international character vector representation dictionary, a first neural network and a second neural network with the training data to maximize a difference between a first similarity, which is a similarity between the vector representation of the search word and the vector representation of the positive sample, and a second similarity, which is a similarity between the vector representation of the search word and the vector representation of the negative sample.

14. The apparatus according to claim 13, wherein the first model training unit, when training the international character vector representation dictionary, the first neural network, and the second neural network using the training data, specifically performs:

respectively determining vector representation of each character in training data by using an international character vector representation dictionary;

inputting the vector representation of each character in the search word into a first neural network to obtain the vector representation of the search word; respectively inputting the vector representation of each character in the description text of the geographical position of the positive sample and the vector representation of each character in the description text of the geographical position of the negative sample into a second neural network to obtain the vector representation of the positive sample and the vector representation of the negative sample;

determining a first similarity of a vector representation of a search term to a vector representation of a positive sample and a second similarity of a vector representation of the same search term to a vector representation of a negative sample;

the international character vector representation dictionary, the first neural network, and the second neural network are trained to maximize a difference between the first similarity and the second similarity.

15. The apparatus of claim 10, further comprising: a second model training unit for performing the following training process in advance:

acquiring training data from a historical click log, wherein the training data comprises search terms and clicked geographical positions corresponding to the search terms as positive samples and non-clicked geographical positions as negative samples;

expanding the positive sample and the negative sample based on a browsing co-occurrence relation between geographical positions by using a historical browsing log;

training the international character vector representation dictionary, the first neural network and the second neural network by using the expanded training data to maximize the difference between a first similarity and a second similarity, wherein the first similarity is the similarity between the vector representation of the search word and the vector representation of the positive sample, and the second similarity is the similarity between the vector representation of the search word and the vector representation of the negative sample.

16. The apparatus according to claim 15, wherein the second model training unit is specifically configured to obtain, from a semantic graph, first geographic locations having a browsing co-occurrence relationship with the clicked geographic location to expand the positive examples, and second geographic locations having a browsing co-occurrence relationship with the non-clicked geographic location to expand the negative examples.

17. The apparatus according to claim 16, wherein the second model training unit, when training the international character vector representation dictionary, the first neural network, and the second neural network using the extended training data, specifically performs:

respectively determining vector representation of each character in training data by using an international character vector representation dictionary;

inputting the vector representation of each character in the search word into a first neural network to obtain the vector representation of the search word; respectively inputting the vector representation of each character in the description text of the clicked geographical position and the vector representation of each character in the description text of each first geographical position into a second neural network, and performing weighting processing on the vector representations of each geographical position output by the second neural network according to the associated parameters between the corresponding geographical positions in the semantic graph to obtain the vector representation of the positive sample; respectively inputting the vector representation of each character in the description text of the un-clicked geographical position and the vector representation of each character in the description text of each second geographical position into a second neural network, and performing weighting processing on the vector representations of each geographical position output by the second neural network according to the associated parameters between the corresponding geographical positions in the semantic graph to obtain the vector representation of the negative sample;

determining a first similarity of a vector representation of a search term to a vector representation of a positive sample and a second similarity of a vector representation of the same search term to a vector representation of a negative sample;

the international character vector representation dictionary, the semantic graph, the first neural network and the second neural network are trained to maximize a difference between the first similarity and the second similarity.

18. The apparatus of claim 16 or 17, further comprising:

the semantic graph building unit is used for building a semantic graph based on a historical browsing log, nodes in the semantic graph are geographical positions, association between corresponding nodes is built for the geographical positions with browsing co-occurrence relation, and association parameters between the geographical positions are initially determined according to co-occurrence conditions between the geographical positions;

the second model training unit updates the association parameters between the geographic positions in the semantic graph in the training process.

19. An electronic device, comprising:

at least one processor; and

a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,

the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.

20. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-9.

Technical Field

The application relates to the technical field of computer application, in particular to the technical field of artificial intelligence.

Background

For map-like applications, geographic location retrieval is one of the most frequently used functions by users. Whether on the client side or the web page side, the user can input a search word in the form of text or voice at the search function entrance to search the geographic position.

Most of the existing methods for searching the geographic position adopt a literal matching mode of search words and geographic position names for searching, and cannot well meet the requirements of geographic position searching related to semantics and even cross-language geographic position searching.

For example, a chinese user, when searching the eiffel tower in paris, france, will probably search with chinese terms. However, as an international map service, the eiffel tower uses local characters, namely french, or international common english with a high probability. Therefore, simple literal matching does not meet the requirements of cross-language retrieval well.

Disclosure of Invention

In view of the foregoing, the present application provides a method, apparatus, device and computer storage medium for retrieving a geographic location so as to better satisfy the requirement of cross-language geographic location retrieval.

In a first aspect, the present application provides a method of retrieving a geographic location, the method comprising:

respectively determining the vector representation of each character in the search words input by the user by using an international character vector representation dictionary;

inputting the vector representation of each character in the search word into a first neural network obtained by pre-training to obtain the vector representation of the search word;

determining similarity between the vector representation of the search term and the vector representation of each geographic position in the map database;

determining the geographic position obtained by retrieval according to the similarity;

after determining the vector representation of each character in the description text of the geographic position by using an international character vector representation dictionary, inputting the vector representation of each character in the description text of the geographic position into a pre-trained second neural network to obtain the vector representation of the geographic position; the international character vector representation dictionary is used for mapping characters of at least two languages to the same vector space.

In a second aspect, the present application provides an apparatus for retrieving a geographic location, the apparatus comprising:

the device comprises a first vector determining unit, a second vector determining unit and a searching unit, wherein the first vector determining unit is used for respectively determining the vector representation of each character in a search word input by a user by utilizing an international character vector representation dictionary, and the international character vector representation dictionary is used for mapping characters of at least two languages to the same vector space;

the second vector determining unit is used for inputting the vector representation of each character in the search word into a first neural network obtained by pre-training to obtain the vector representation of the search word;

the similarity determining unit is used for determining the similarity between the vector representation of the search term and the vector representation of each geographic position in the map database; after determining the vector representation of each character in the description text of the geographic position by using an international character vector representation dictionary, inputting the vector representation of each character in the description text of the geographic position into a pre-trained second neural network to obtain the vector representation of the geographic position;

and the retrieval processing unit is used for determining the geographic position obtained by retrieval according to the similarity.

In a third aspect, the present application further provides an electronic device, including:

at least one processor; and

a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,

the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the above.

In a fourth aspect, the present application also provides a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any of the above.

According to the technical scheme, the international character vector representation dictionary is utilized to map characters of different languages to the same vector space, vector representation of the search word and vector representation of the geographic position are obtained respectively based on the vector representation of each character, and the geographic position obtained through retrieval is further determined based on the similarity between the vector representation of the search word and the vector representation of the geographic position. This approach can better meet the cross-language geographic location retrieval requirements.

Other effects of the above-described alternative will be described below with reference to specific embodiments.

Drawings

The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:

FIG. 1 illustrates an exemplary system architecture to which embodiments of the invention may be applied;

FIG. 2 is a schematic diagram of a computation framework of a similarity model provided in an embodiment of the present application;

FIG. 3 is a flowchart of a method for retrieving a geographic location according to an embodiment of the present disclosure;

FIG. 4 is a flowchart of a method for training a similarity model according to a second embodiment of the present application;

fig. 5 is a schematic diagram of a training similarity model provided in the second embodiment of the present application;

FIG. 6 is a flowchart of a method for training a similarity model according to a third embodiment of the present application;

FIG. 7 is a schematic diagram of building a semantic graph according to a third embodiment of the present application;

FIG. 8 is a schematic diagram of a training similarity model provided in the third embodiment of the present application;

fig. 9 is a block diagram of an apparatus for retrieving a geographic location according to an embodiment of the present application;

FIG. 10 is a block diagram of an electronic device used to implement an embodiment of the application.

Detailed Description

The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

FIG. 1 illustrates an exemplary system architecture to which embodiments of the invention may be applied. As shown in fig. 1, the system architecture may include terminal devices 101 and 102, a network 103, and a server 104. The network 103 serves as a medium for providing communication links between the terminal devices 101, 102 and the server 104. Network 103 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.

A user may interact with server 104 through network 103 using terminal devices 101 and 102. Various applications, such as a map-like application, a voice interaction-like application, a web browser application, a communication-like application, etc., may be installed on the terminal devices 101 and 102.

Terminal devices 101 and 102 may be various electronic devices capable of supporting and presenting map-like applications, including but not limited to smartphones, tablets, smart wearable devices, and the like. The apparatus provided by the present invention may be configured and run in the server 104 described above. It may be implemented as a plurality of software or software modules (for example, for providing distributed services), or as a single software or software module, which is not specifically limited herein.

For example, the apparatus for retrieving a geographic location is configured and operated in the server 104, and the server 104 may receive a retrieval request of the terminal device 101 or 102, where the retrieval request includes a retrieval word. The device for retrieving the geographic position retrieves the geographic position by using the method provided by the embodiment of the invention, and returns the retrieval result to the terminal equipment 101 or 102. A map database is maintained at the server 104, and the map database may be stored locally in the server 104, or may be stored in another server and called by the server 104. The server 104 can also obtain and record the related behavior of the user using the map-like application, thereby forming a log such as a history click log, a history browsing log, and the like.

The server 104 may be a single server or a server group including a plurality of servers. It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.

The method has the core idea that characters of different languages are mapped to the same vector space by using an international character vector representation dictionary, and the vector representation of the search word and the vector representation of the geographic position are respectively obtained based on the vector representation of each character, so that the geographic position obtained by searching is further determined based on the similarity between the vector representation of the search word and the vector representation of the geographic position. The method and apparatus provided by the present application are described in detail below with reference to examples.

26页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:地理位置的推荐方法、装置、设备和计算机存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!