Geographical position recommendation method, device, equipment and computer storage medium

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

阅读说明:本技术 地理位置的推荐方法、装置、设备和计算机存储介质 (Geographical position recommendation method, device, equipment and computer storage medium ) 是由 范淼 黄际洲 袁春园 陈禹东 于 2020-04-28 设计创作,主要内容包括:本申请公开了一种地理位置的推荐方法、装置、设备和计算机存储介质,涉及智能搜索技术领域。具体实现方案为:获取向用户推荐地理位置的触发事件;针对各候选地理位置分别执行:将所述用户的查询历史的向量表示与候选地理位置的向量表示进行融合,得到候选地理位置的融合向量表示;至少将所述候选地理位置的融合向量表示与所述用户的画像向量表示进行拼接,将拼接后得到的向量表示经过全连接层的处理,得到该候选地理位置的推荐评分;依据各候选地理位置的推荐评分,确定向所述用户推荐的地理位置。本申请能够提高推荐的地理位置满足用户查询需求的准确性。(The application discloses a geographic position recommendation method, a geographic position recommendation device, geographic position recommendation equipment and a computer storage medium, and relates to the technical field of intelligent search. The specific implementation scheme is as follows: acquiring a trigger event for recommending a geographic position to a user; performing for each candidate geographic location: fusing the vector representation of the query history of the user with the vector representation of the candidate geographic position to obtain a fused vector representation of the candidate geographic position; at least splicing the fusion vector representation of the candidate geographic position with the portrait vector representation of the user, and processing the vector representation obtained after splicing through a full connection layer to obtain the recommendation score of the candidate geographic position; and determining the geographical position recommended to the user according to the recommendation scores of the candidate geographical positions. According to the method and the device, the accuracy that the recommended geographic position meets the query requirement of the user can be improved.)

1. A method for recommending geographical locations, the method comprising:

acquiring a trigger event for recommending a geographic position to a user;

performing for each candidate geographic location: fusing the vector representation of the query history of the user with the vector representation of the candidate geographic position to obtain a fused vector representation of the candidate geographic position; at least splicing the fusion vector representation of the candidate geographic position with the portrait vector representation of the user, and processing the vector representation obtained after splicing through a full connection layer to obtain the recommendation score of the candidate geographic position;

and determining the geographical position recommended to the user according to the recommendation scores of the candidate geographical positions.

2. The method of claim 1, wherein the vector representation of the user's query history is obtained by:

acquiring geographical positions visited by the user within a first time period, and acquiring vector representations of long-term interest geographical positions of the user by utilizing vector representations of the geographical positions visited by the user within the first time period; and/or the presence of a gas in the gas,

acquiring geographical positions visited by the user in a second time length, and acquiring vector representations of short-term interest geographical positions of the user by using vector representations of the geographical positions visited by the user in the second time length;

the first duration is greater than the second duration, and the access comprises a query or a click.

3. The method of claim 2, wherein obtaining the vector representation of the long-term geographic location of interest of the user using the vector representation of the geographic locations queried or clicked by the user within the first duration comprises:

counting the geographical positions visited by the user within the first time period in advance according to time, and determining probability distribution data of various types or various geographical positions visited by the user in various time periods;

counting the geographical positions visited by the user within the first time according to the space in advance, and determining probability distribution data of various types or various geographical positions visited by the user within each space grid;

by acquiring the current time and the current place of the trigger event, inquiring probability distribution data of various types or various geographic positions corresponding to the time period to which the current time belongs and probability distribution data of various types or various geographic positions corresponding to the spatial grid to which the current place belongs;

and obtaining the vector representation of the long-term interest geographical position of the user by utilizing the inquired probability distribution data of various types or various geographical positions.

4. The method of claim 2, wherein obtaining the vector representation of the short-term geographic location of interest of the user using the vector representation of the geographic locations queried or clicked on by the user within the second duration comprises:

and carrying out Multi-head Attention extension mechanism processing on the vector representation of each geographical position visited by the user in a second time length to obtain the vector representation of the short-term interest geographical position of the user.

5. The method of claim 1, wherein the representation of the user's portrait vector is obtained by:

encoding the portrait information of the user by adopting a neural network respectively;

and after splicing the vector representations obtained by encoding, obtaining the image vector representation of the user through the mapping of the full connection layer.

6. The method of claim 1, 2, 3 or 4, wherein the vector representation of the geographic location is obtained by:

encoding the text attribute information of the geographic position by adopting a convolutional neural network;

coding other attribute information of the geographical position by adopting a feedforward neural network;

and splicing the coding results of the same geographic position, and mapping the coding results through a full connection layer to obtain the vector representation of the geographic position.

7. The method of claim 2, wherein stitching at least the fused vector representation of the candidate geographic location with the portrait vector representation of the user comprises:

fusing the vector representation of the current time of the acquired trigger event with the time vector representation of the visiting geographic position in the second time length to obtain a fused vector representation of the time;

fusing the vector representation of the current location of the acquired trigger event with the location vector representation of the visiting geographic position in the second time length to obtain a fused vector representation of the location;

stitching the fused vector representation of the candidate geographic location, the portrait vector representation of the user, the fused vector representation of the time, and the fused vector representation of the location.

8. The method of claim 1 or 7, wherein the fusing comprises: the attention mechanism is processed.

9. A method of training a geographic location recommendation model, the method comprising:

obtaining training data from the historical query log, each training data comprising: a query history of a user, geographical location samples recommended to the user, the samples comprising positive samples and negative samples;

training a geographic position recommendation model by utilizing each training data, wherein the geographic position recommendation model at least comprises: a geographical position fusion layer and a full connection layer;

the geographic position fusion layer fuses vector representations of the query histories of the users in the training data and the vector representation of one geographic position sample to obtain fusion vector representations of the geographic position samples; splicing at least the fusion vector representation of the geographic position sample with the portrait vector representation of the corresponding user, and processing the vector representation obtained after splicing through a full connection layer to obtain the recommendation score of the geographic position sample;

the training targets are: the difference between the recommendation score for the positive exemplar and the recommendation score for the negative exemplar in the same training data is maximized.

10. The method of claim 9, wherein obtaining training data from a historical query log comprises:

acquiring a historical query sequence of a user;

and taking the first N-1 geographical positions in the historical query sequence as the query history of the user in the training data, taking the Nth geographical position as the positive sample in the training data, and selecting the geographical position which is not queried by the user as the negative sample in the training data, wherein N is a preset positive integer.

11. The method of claim 10, wherein the geographic location recommendation model further comprises: a long-term interest coding layer and/or a short-term interest coding layer;

the long-term interest coding layer acquires geographic positions visited by a user within a first time length before the positive sample, and acquires vector representation of the long-term interest geographic positions of the user by utilizing vector representation of the geographic positions visited by the user within the first time length;

the short-term interest coding layer acquires the geographical position visited by the user in a second time before the positive sample, and the vector representation of the short-term interest geographical position of the user is acquired by utilizing the vector representation of each geographical position visited by the user in the second time;

the first duration is greater than the second duration, and the access comprises a query or a click.

12. The method of claim 11, wherein the obtaining a vector representation of the geographic location of long-term interest of the user using the vector representations of the geographic locations visited by the user for the first period of time comprises:

the long-term interest coding layer counts geographical positions visited by the user within a first time before the positive sample according to time in advance, and determines probability distribution data of various types or various geographical positions visited by the user in each time period; counting the geographical positions visited by the user within the first time according to the space in advance, and determining probability distribution data of various types or various geographical positions visited by the user within each space grid; inquiring the probability distribution data of various types or various geographic positions corresponding to the time period to which the current time belongs and the probability distribution data of various types or various geographic positions corresponding to the spatial grid to which the current location belongs by inquiring the current time and the current location of the positive sample; and obtaining the vector representation of the long-term interest geographical position of the user by utilizing the inquired probability distribution data of various types or various geographical positions.

13. The method of claim 11, wherein obtaining the vector representation of the geographic location of short-term interest of the user using the vector representations of the geographic locations visited by the user for the second duration comprises:

and the short-term interest coding layer carries out Multi-head orientation mechanism processing on the vector representation of each geographic position visited by the user within a second time before the positive sample to obtain the vector representation of the short-term interest geographic position of the user.

14. The method of claim 11, wherein the geographic location recommendation model further comprises: a user portrait encoding layer;

the user portrait coding layer codes portrait information of the user by adopting a neural network respectively; and after splicing the vector representations obtained by encoding, obtaining the image vector representation of the user through the mapping of the full connection layer.

15. The method of claim 9, 11, 12 or 13, wherein the geo-location recommendation model further comprises: a geographical position coding layer;

the geographical position coding layer codes the text attribute information of the geographical position by adopting a convolutional neural network; coding other attribute information of the geographical position by adopting a feedforward neural network; and splicing the coding results of the same geographic position, and mapping the coding results through a full connection layer to obtain the vector representation of the geographic position.

16. The method of claim 13, wherein the geographic location recommendation model further comprises: a time coding layer and a location coding layer;

the time coding layer fuses the vector representation of the access time corresponding to the positive sample with the time vector representation of the access geographic position in the second duration to obtain a fused vector representation of time;

the place coding layer fuses the vector representation of the place where the positive sample is accessed and the place representation of the geographic position accessed in the second time length to obtain the fused vector representation of the place;

when the geographical position fusion layer performs the splicing, specifically, the fusion vector representation of the geographical position sample, the portrait vector representation of the corresponding user, the fusion vector representation of the time, and the fusion vector representation of the place are spliced.

17. A geographic location recommendation device, comprising:

the trigger unit is used for acquiring a trigger event for recommending the geographic position to the user;

a scoring unit for performing, for each candidate geographic location respectively: fusing the vector representation of the query history of the user with the vector representation of the candidate geographic position to obtain a fused vector representation of the candidate geographic position; at least splicing the fusion vector representation of the candidate geographic position with the portrait vector representation of the user, and processing the vector representation obtained after splicing through a full connection layer to obtain the recommendation score of the candidate geographic position;

and the recommending unit is used for determining the geographical position recommended to the user according to the recommendation scores of the candidate geographical positions.

18. The apparatus of claim 17, wherein the scoring unit comprises: a long-term interest coding unit and/or a short-term interest coding unit,

the long-term interest coding unit is used for counting geographical positions visited by the user within a first time period in advance according to time, and determining probability distribution data of various types or various geographical positions visited by the user in various time periods; counting the geographical positions visited by the user within the first time according to the space in advance, and determining probability distribution data of various types or various geographical positions visited by the user within each space grid; by acquiring the current time and the current place of the trigger event, inquiring probability distribution data of various types or various geographic positions corresponding to the time period to which the current time belongs and probability distribution data of various types or various geographic positions corresponding to the spatial grid to which the current place belongs; obtaining the vector representation of the long-term interest geographical position of the user by utilizing the inquired probability distribution data of various types or various geographical positions;

the short-term interest coding unit is used for processing the vector representation of each geographic position visited by the user in a second time length by a Multi-head orientation mechanism to obtain the vector representation of the short-term interest geographic position of the user;

the first duration is greater than the second duration, and the access comprises a query or a click.

19. The apparatus of claim 17, wherein the scoring unit comprises:

a user portrait coding unit, which is used for coding portrait information of the user by adopting a neural network respectively; and after splicing the vector representations obtained by encoding, obtaining the image vector representation of the user through the mapping of the full connection layer.

20. The apparatus according to claim 17, 18 or 19, wherein the scoring unit comprises:

the geographic position coding unit is used for coding the text attribute information of the geographic position by adopting a convolutional neural network; coding other attribute information of the geographical position by adopting a feedforward neural network; and splicing the coding results of the same geographic position, and mapping the coding results through a full connection layer to obtain the vector representation of the geographic position.

21. The apparatus of claim 17, wherein the scoring unit comprises:

the time coding unit is used for fusing the vector representation of the current time of the acquired trigger event with the time vector representation of the visiting geographic position in the second duration to obtain a fused vector representation of the time;

the place coding unit is used for fusing the vector representation of the current place for acquiring the trigger event with the place vector representation of the visiting geographic position in the second duration to obtain a fused vector representation of the place;

and the splicing unit is used for splicing the fused vector representation of the candidate geographic position, the portrait vector representation of the user, the fused vector representation of the time and the fused vector representation of the place and then providing the spliced fused vector representation of the candidate geographic position, the portrait vector representation of the user, the fused vector representation of the time and the fused vector representation of the place to the full-connection layer.

22. An apparatus for training a geographic location recommendation model, the apparatus comprising:

a training data obtaining unit, configured to obtain training data from the historical query log, where each training data includes: a query history of a user, geographical location samples recommended to the user, the samples comprising positive samples and negative samples;

a recommendation model training unit, configured to train a geographic location recommendation model using each training data, where the geographic location recommendation model at least includes: a geographical position fusion layer and a full connection layer;

the geographic position fusion layer fuses vector representations of the query histories of the users in the training data and the vector representation of one geographic position sample to obtain fusion vector representations of the geographic position samples; splicing at least the fusion vector representation of the geographic position sample with the portrait vector representation of the corresponding user, and processing the vector representation obtained after splicing through a full connection layer to obtain the recommendation score of the geographic position sample;

the training targets are: the difference between the recommendation score for the positive exemplar and the recommendation score for the negative exemplar in the same training data is maximized.

23. The apparatus according to claim 22, wherein the training data obtaining unit is specifically configured to obtain a historical query sequence of a user; and taking the first N-1 geographical positions in the historical query sequence as the query history of the user in the training data, taking the Nth geographical position as the positive sample in the training data, and selecting the geographical position which is not queried by the user as the negative sample in the training data, wherein N is a preset positive integer.

24. The apparatus of claim 23, wherein the geographic location recommendation model further comprises: a long-term interest coding layer and/or a short-term interest coding layer;

the long-term interest coding layer is used for counting geographical positions visited by the user within a first time before the positive sample in advance according to time, and determining probability distribution data of various types or various geographical positions visited by the user in various time periods; counting the geographical positions visited by the user within the first time according to the space in advance, and determining probability distribution data of various types or various geographical positions visited by the user within each space grid; inquiring the probability distribution data of various types or various geographic positions corresponding to the time period to which the current time belongs and the probability distribution data of various types or various geographic positions corresponding to the spatial grid to which the current location belongs by inquiring the current time and the current location of the positive sample; obtaining the vector representation of the long-term interest geographical position of the user by utilizing the inquired probability distribution data of various types or various geographical positions;

the short-term interest coding layer is used for processing a Multi-head orientation mechanism on the vector representation of each geographic position visited by the user in a second time before the positive sample to obtain the vector representation of the short-term interest geographic position of the user;

the first duration is greater than the second duration, and the access comprises a query or a click.

25. The apparatus of claim 22, wherein the geographic location recommendation model further comprises: a user portrait encoding layer;

the user portrait coding layer is used for coding portrait information of a user by adopting a neural network respectively; and after splicing the vector representations obtained by encoding, obtaining the image vector representation of the user through the mapping of the full connection layer.

26. The apparatus of claim 22 or 24, wherein the geographic location recommendation model further comprises: a geographical position coding layer;

the geographic position coding layer is used for coding the text attribute information of the geographic position by adopting a convolutional neural network; coding other attribute information of the geographical position by adopting a feedforward neural network; and splicing the coding results of the same geographic position, and mapping the coding results through a full connection layer to obtain the vector representation of the geographic position.

27. The apparatus of claim 22, wherein the geographic location recommendation model further comprises: a time coding layer and a location coding layer;

the time coding layer is used for fusing the vector representation of the access time corresponding to the positive sample with the time vector representation of the access geographic position in the second duration to obtain a fused vector representation of time;

the place coding layer is used for fusing the vector representation of the place where the positive sample is accessed with the place representation of the geographic position accessed within the second duration to obtain a fused vector representation of the place;

when the geographical position fusion layer performs the splicing, specifically, the fusion vector representation of the geographical position sample, the portrait vector representation of the corresponding user, the fusion vector representation of the time, and the fusion vector representation of the place are spliced.

28. 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-16.

29. 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-16.

Technical Field

The application relates to the technical field of computer application, in particular to the technical field of intelligent search.

Background

When a user intends to query a geographic location in a map-like application, the geographic location to be queried is typically entered in a search box of the map-like application. In order to facilitate user operation, when a cursor of a user is positioned in a retrieval box, before the user inputs a geographical position to be queried, the map application recommends the geographical position to the user, and hopefully, the geographical position which the user wants to query can be guessed, so that the user can realize retrieval by clicking once only the recommended geographical position, obviously, the user can use the method greatly, and the user experience is improved.

However, the existing geographic position recommendation schemes are ranked based on the query heat of each candidate geographic position, and cannot well meet the personalized requirements of users, so that the accuracy of guessing the query requirements of the users of the recommended geographic positions is low.

Disclosure of Invention

In view of this, the present application provides a method, an apparatus, a device and a computer storage medium for recommending a geographic location, so as to improve the accuracy of the recommended geographic location meeting the query requirement of a user.

In a first aspect, the present application provides a method for recommending geographic locations, including:

acquiring a trigger event for recommending a geographic position to a user;

performing for each candidate geographic location: fusing the vector representation of the query history of the user with the vector representation of the candidate geographic position to obtain a fused vector representation of the candidate geographic position; at least splicing the fusion vector representation of the candidate geographic position with the portrait vector representation of the user, and processing the vector representation obtained after splicing through a full connection layer to obtain the recommendation score of the candidate geographic position;

and determining the geographical position recommended to the user according to the recommendation scores of the candidate geographical positions.

In a second aspect, the present application provides a method of training a geographic location recommendation model, the method comprising:

obtaining training data from the historical query log, each training data comprising: a query history of a user, geographical location samples recommended to the user, the samples comprising positive samples and negative samples;

training a geographic position recommendation model by utilizing each training data, wherein the geographic position recommendation model at least comprises: a geographical position fusion layer and a full connection layer;

the geographic position fusion layer fuses vector representations of the query histories of the users in the training data and the vector representation of one geographic position sample to obtain fusion vector representations of the geographic position samples; splicing at least the fusion vector representation of the geographic position sample with the portrait vector representation of the corresponding user, and processing the vector representation obtained after splicing through a full connection layer to obtain the recommendation score of the geographic position sample;

the training targets are: the difference between the recommendation score for the positive exemplar and the recommendation score for the negative exemplar in the same training data is maximized.

In a third aspect, the present application further provides a geographic position recommendation apparatus, including:

the trigger unit is used for acquiring a trigger event for recommending the geographic position to the user;

a scoring unit for performing, for each candidate geographic location respectively: fusing the vector representation of the query history of the user with the vector representation of the candidate geographic position to obtain a fused vector representation of the candidate geographic position; at least splicing the fusion vector representation of the candidate geographic position with the portrait vector representation of the user, and processing the vector representation obtained after splicing through a full connection layer to obtain the recommendation score of the candidate geographic position;

and the recommending unit is used for determining the geographical position recommended to the user according to the recommendation scores of the candidate geographical positions.

In a fourth aspect, the present application provides an apparatus for training a geographic position recommendation model, the apparatus comprising:

a training data obtaining unit, configured to obtain training data from the historical query log, where each training data includes: a query history of a user, geographical location samples recommended to the user, the samples comprising positive samples and negative samples;

a recommendation model training unit, configured to train a geographic location recommendation model using each training data, where the geographic location recommendation model at least includes: a geographical position fusion layer and a full connection layer;

the geographic position fusion layer fuses vector representations of the query histories of the users in the training data and the vector representation of one geographic position sample to obtain fusion vector representations of the geographic position samples; splicing at least the fusion vector representation of the geographic position sample with the portrait vector representation of the corresponding user, and processing the vector representation obtained after splicing through a full connection layer to obtain the recommendation score of the geographic position sample;

the training targets are: the difference between the recommendation score for the positive exemplar and the recommendation score for the negative exemplar in the same training data is maximized.

In a fifth 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 a method as any one of above.

In a sixth aspect, the present application 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 vector representation of the query history of the user and the vector representation of the candidate geographic position are fused, and the image vector representation of the user is further spliced to serve as the recommendation score basis of the candidate geographic position, so that the recommendation score of each candidate geographic position can reflect the query preference of the user, and the recommended geographic position can more accurately guess the query requirement of the user.

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 flowchart of a main method for providing geographic location recommendation according to an embodiment of the present application;

fig. 3 is a schematic diagram of a geographic location recommendation model provided in the second embodiment of the present application;

fig. 4 is a flowchart of a method for training a geographic position recommendation model according to a third embodiment of the present application;

fig. 5 is a block diagram of a geographic position recommendation device according to a fourth embodiment of the present application;

fig. 6 is a block diagram of an apparatus for training a geographic position recommendation model according to a fifth embodiment of the present application;

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

fig. 8 is an interface schematic diagram of an application scenario for recommending POIs according to an embodiment of the present 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 recommending device of the geographical location is set and operated in the server 104, and the server 104 may receive a trigger event from the terminal device 101 or 102, where the trigger event includes the user-related information. The geographic position recommending device recommends the geographic position by using the method provided by the embodiment of the invention, and returns the recommendation 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 relevant behavior of the user using the map-like application, thereby forming a log of historical queries, for example.

For another example, the apparatus for training the geographic position recommendation model is configured and operated in the server 104, and the server 104 trains the geographic position recommendation model by using the historical query logs for making the geographic position recommendation to the user.

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 and apparatus provided by the present application are described in detail below with reference to examples.

26页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种城市勘测数字化管理系统及方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!