CN112417260B - Localized recommendation method, device and storage medium - Google Patents

Localized recommendation method, device and storage medium Download PDF

Info

Publication number
CN112417260B
CN112417260B CN201910769750.8A CN201910769750A CN112417260B CN 112417260 B CN112417260 B CN 112417260B CN 201910769750 A CN201910769750 A CN 201910769750A CN 112417260 B CN112417260 B CN 112417260B
Authority
CN
China
Prior art keywords
resource
user
word embedding
recommendation
vector
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
CN201910769750.8A
Other languages
Chinese (zh)
Other versions
CN112417260A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910769750.8A priority Critical patent/CN112417260B/en
Publication of CN112417260A publication Critical patent/CN112417260A/en
Application granted granted Critical
Publication of CN112417260B publication Critical patent/CN112417260B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a localization recommendation method, a localization recommendation device and a storage medium, and belongs to the field of information processing. The method comprises the following steps: obtaining target geographic position information to be vectorized; determining word embedding vectors of the target geographic position information through a first word embedding layer of the recommendation model; the first word embedding layer is used for mapping any geographic position information to a vector space to obtain a word embedding vector, and the recommendation model is used for determining the recommendation probability of any resource based on the user association characteristic of any user and the resource association characteristic of any resource, wherein the user association characteristic and the resource association characteristic at least comprise geographic position information; words of the target geographic location information are embedded into vectors and determined as a vectorized representation of the target geographic location information. The vectorized representation of the geographic position not only can represent the information in the dimension of the geographic position, but also can represent the information in other dimensions such as user interests, and the accuracy of localized recommendation can be improved based on the vectorized representation.

Description

Localized recommendation method, device and storage medium
Technical Field
The present application relates to the field of information processing and the field of artificial intelligence machine learning, and in particular, to a localized recommendation method, apparatus, and storage medium.
Background
In the field of information processing, in order to facilitate a computer to quickly process geographic location information, it is generally required to vectorize the geographic location information, that is, to use a vector to represent the geographic location information.
In the related art, a manner of encoding the geographic location information is generally adopted to obtain a vectorized representation of the geographic location information. For example, for the target geographic location information to be vectorized, an administrative region code corresponding to the target geographic location information is acquired first, then normalization processing is performed on the administrative region code corresponding to the target geographic location information, and the normalization processing result is used as vectorized representation of the target geographic location information.
The vectorized representation of the geographic position information can be determined simply by encoding the geographic position information, so that the vectorization mode of the geographic position is single, and the determined vectorized representation can only represent the information in the dimension of the geographic position and has a certain limitation.
Disclosure of Invention
The application provides a localization recommendation method, a localization recommendation device and a storage medium, which can solve the problems of single vectorization mode of geographic positions and certain limitation of determined vectorization representation in the related technology. The technical scheme is as follows:
In one aspect, a localization recommendation method is provided, the method comprising:
obtaining target geographic position information to be vectorized;
determining word embedding vectors of the target geographic position information through a first word embedding layer of the recommendation model;
the first word embedding layer is used for mapping any geographic position information to a vector space to obtain word embedding vectors, the recommendation model is used for determining recommendation probability of any resource based on user association features of any user and resource association features of any resource, the recommendation probability of any resource is used for indicating probability that the any resource is accepted by the any user after being recommended to the any user, and the user association features and the resource association features at least comprise geographic position information;
embedding the words of the target geographic position information into vectors, and determining the words as vectorized representations of the target geographic position information;
and recommending resources to the user based on the word embedding vector of the target geographic position information.
In another aspect, a localization recommendation apparatus is provided, the apparatus including:
the first acquisition module is used for acquiring target geographic position information to be vectorized;
The first determining module is used for determining word embedding vectors of the target geographic position information through a first word embedding layer of the recommendation model;
the first word embedding layer is used for mapping any geographic position information to a vector space to obtain word embedding vectors, the recommendation model is used for determining recommendation probability of any resource based on user association features of any user and resource association features of any resource, the recommendation probability of any resource is used for indicating probability that the any resource is accepted by the any user after being recommended to the any user, and the user association features and the resource association features at least comprise geographic position information;
a second determining module, configured to embed a word of the target geographic location information into a vector, and determine the word as a vectorized representation of the target geographic location information;
and the recommending module is used for recommending resources to the user based on the word embedding vector of the target geographic position information.
In another aspect, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by the processor to implement the localization recommendation method described above.
In another aspect, a computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions loaded and executed by a processor to implement the localization recommendation method described above is provided.
In another aspect, a computer program product is provided comprising instructions that, when executed on a computer, cause the computer to perform the localization recommendation method described above.
The technical scheme provided by the application has at least the following beneficial effects:
in the embodiment of the application, for the target geographic position information to be vectorized, the word embedding vector of the target geographic position information can be determined through the first word embedding layer of the recommendation model, and then the word embedding vector of the target geographic position information is determined as the vectorized representation of the target geographic position information, so that the vectorizing mode of the geographic position information is expanded. Moreover, the recommendation model is used for determining the recommendation probability of any resource based on the user association feature of any user and the resource association feature of any resource, and the user association feature and the resource association feature at least comprise geographic position information, so that the first word embedding layer of the recommendation model encodes the geographic position information, the output word embedding vector comprises the internal association of different geographic position information, the association can reflect the geographic interest of the user, and the vectorized representation of the determined geographic position information can represent not only the information of geographic position dimensions but also the position information of other dimensions such as the user interest, and therefore, the accuracy of localized recommendation can be improved when the word embedding vector based on the target geographic position information carries out resource recommendation.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a training method of a recommendation model provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a logic algorithm of a second word embedding layer according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a recommendation model to be trained according to an embodiment of the present application;
fig. 4 is a schematic diagram of a splicing process of a splicing layer according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a logic algorithm of a full connection layer according to an embodiment of the present application;
FIG. 6 is a flowchart of a localization recommendation method provided by an embodiment of the present application;
fig. 7 is a schematic structural diagram of a localization recommendation device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
The embodiment of the application provides a method, which relates to the field of machine learning of artificial intelligence, in particular to a localization recommendation method based on deep learning.
Artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use the knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision.
The artificial intelligence technology is a comprehensive subject, and relates to the technology with wide fields, namely the technology with a hardware level and the technology with a software level. Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
Machine Learning (ML) is a multi-domain interdisciplinary, involving multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It is specially studied how a computer simulates or implements learning behavior of a human to acquire new knowledge or skills, and reorganizes existing knowledge structures to continuously improve own performance. Machine learning is the core of artificial intelligence, a fundamental approach to letting computers have intelligence, which is applied throughout various areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, confidence networks, reinforcement learning, transfer learning, induction learning, teaching learning, and the like.
With research and advancement of artificial intelligence technology, research and application of artificial intelligence technology is being developed in various fields, such as common smart home, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned, automatic driving, unmanned aerial vehicles, robots, smart medical treatment, smart customer service, etc., and it is believed that with the development of technology, artificial intelligence technology will be applied in more fields and with increasing importance value.
In addition, before explaining the localization recommendation method provided by the embodiment of the present application in detail, an application scenario provided by the embodiment of the present application is described.
The localization recommendation method provided by the embodiment of the application can be applied to a scene in which the geographic position information is required to be vectorized and encoded, and then the resource recommendation is carried out based on the encoded vector. For example, in a resource recommendation scenario, it is necessary to vectorize geographic location information associated with a user and geographic location information associated with a resource to be recommended, and then analyze a recommendation probability of the resource to be recommended based on the vectorized representations of the two geographic location information and other user features and other resource features, so as to recommend the resource to the user based on the recommendation probability of the resource to be recommended, so that the resource recommendation can be localized. The recommendation probability of the resource to be recommended is used for indicating the probability that the resource to be recommended is accepted by the user after being recommended to the user.
It should be noted that, in the embodiment of the present application, only after vectorizing the geographic location information, the vectorized representation of the geographic location information is used to construct a scene of the localized resource recommendation model, and in other embodiments, the vectorized representation of the geographic location information may also be applied to other scenes, which is not limited in the embodiment of the present application.
Next, an implementation environment related to the localization recommendation method provided by the embodiment of the present application is described. The method can be applied to computer equipment, the computer equipment can be a terminal or a server, the terminal can be a mobile phone, a tablet computer or a computer, the server can be a background server of a resource application, the resource application is used for providing network resources and can be a music application, a video application or a news application, and the like.
It should be noted that, the localization recommendation method provided by the embodiment of the present application is a localization recommendation method based on deep learning, a word embedding layer of a recommendation model is needed when vectorizing geographic location information, the recommendation model is needed to be obtained by training according to sample data, and in order to facilitate understanding, a training process of the recommendation model is introduced first.
Fig. 1 is a flowchart of a training method for a recommendation model according to an embodiment of the present application, where the method may be applied to a computer device, as shown in fig. 1, and the method may include the following steps:
step 101: a plurality of sample data is acquired, the sample data including user-associated features of the sample user, resource-associated features of a recommended resource recommended to the sample user, and a recommendation tag.
The sample user is a selected user that can be used as a training sample, and specifically can be any user on the network, for example, any user in resource application. Moreover, sample users corresponding to different sample data may be the same or different. The recommended resources may be any resources that have been recommended to the sample user, and the recommended resources may be songs, videos, news, or the like.
The recommended label is used for indicating whether the recommended resource is accepted by the sample user, and the mode of accepting the recommended resource by the user can comprise clicking the recommended resource or browsing the recommended resource. The recommendation label can be obtained by labeling according to whether the recommended resource is accepted by the sample user. For example, if the recommendation tag is 1, it indicates that the recommended resource is accepted by the sample user, such as being clicked by the sample user; if the recommendation tag is 0, it indicates that the recommended resource is not accepted by the user, such as that the recommended resource is not clicked on by the sample user.
The user-associated features may include user features indicating the nature of the sample user, and may include other information associated with the sample user. For example, the user-associated features include first geographic location information of the sample user-associated and other user-associated features. The first geographic position information associated with the sample user can be position information of the geographic position of the user, or geographic position information set by the user, and the like. The first geographic location information includes, for example, first address information and/or first point of interest (Point of Interest, POI) information. The address information may be information of province, city, district, county, street, etc. where the location belongs. The point of interest may be a cell, a house, a shop or a sight, etc. For example, other user-associated features may include interest categories, which are categories of resources to which a sample user is interested, and may be obtained statistically based on historical browsing behavior of the user. Further, other user characteristics may also include user characteristics of the sample user, which may include age, gender, income, occupation, or the like. As one example, the user-associated features of the sample user may be obtained from a user representation of the sample user.
The resource association features may include resource features for indicating the content of the recommended resource itself, and may include other information associated with the recommended resource. For example, the resource-associated features include second geographic location information and other resource-associated features that recommend resource association. The second geographic position information associated with the recommended resource can be the position information of the geographic position of the place where the recommended resource occurs, or the position information of the geographic position of the place where the recommended resource is released, or the extracted geographic position information for text content identification or video content manual marking, and the like. The second geographic location information includes, for example, second address information and/or second point of interest information. Other resource association features may include a resource category, which refers to a resource category to which a recommended resource belongs, and may be determined according to a category label, or may be obtained by classification by a resource classification model. Further, other resource characteristics may also include resource characteristics. For example, if the recommended resource is a song, the resource characteristics may include singer, genre of the genre, album of the genre, or release time, etc. As an example, the resource-related characteristics of the recommended resource may be obtained from resource information of the recommended resource.
Referring to table 1, table 1 is an example of a plurality of sample data provided in an embodiment of the present application, and as shown in table 1, the sample data may include the following:
TABLE 1
Wherein each row in table 1 represents a user-associated characteristic of a pair of sample users and a resource-associated characteristic of a corresponding one of the recommended resources. For example, the address information and the interest point information in the user associated feature may be derived from user behavior attributes contained in the user image of the sample user, and the interest category is an interest category obtained according to user click behavior statistics. The address information and the interest point information in the resource association features can be geographical position information extracted by text content identification or video content manual marking, and the resource category is category information extracted by a resource classification model.
As one example, the first and second geographical location information in the sample data may be in the form of one-hot vectors corresponding to the geographical location information.
Step 102: and taking the plurality of sample data as input of a recommendation model to be trained, and mapping the first geographic position information and the second geographic position information in each sample data onto a vector space through a second word embedding layer of the recommendation model to be trained to obtain a user position vector and a resource position vector corresponding to each sample data.
The user position vector corresponding to each sample data refers to a word embedding vector in which the first geographic position information in each sample data is mapped to a vector space, and the resource position vector corresponding to each sample data refers to a word embedding vector in which the second geographic position information in each sample data is mapped to a resource position space.
The recommendation model to be trained may be a deep neural network (Deep Neural Network, DNN) model, a convolutional neural network (Convolutional Neural Network, CNN) model, or a recurrent neural network (Recurrent Neural Network, RNN) model, which is not limited in this embodiment of the present application.
It should be noted that, compared with the existing recommendation model, the recommendation model to be trained is different in that a second word embedding (embedding) layer is added to the model, and the second word embedding layer is used for mapping any geographic position information into a vector space to obtain a word embedding vector of the any geographic position information.
As an example, the second word embedding layer may map any geographic location information into a vector space by performing a nonlinear transformation on the any geographic location information to obtain a word embedding vector of the any geographic location information. Referring to fig. 2, fig. 2 is a schematic diagram of a logic algorithm of a second word embedding layer according to an embodiment of the present application, where, as shown in fig. 2, an input of the second word embedding layer is a one-hot vector of geographical location information, H is a nonlinear transformation function, and W is a weight matrix of input data. The encoding characteristics of the one-hot vector are very sparse, so that the general dimension is higher, and the second word embedding layer can perform dimension-reduced vectorization representation on the one-hot vector of the geographic position information by inputting the one-hot vector of the geographic position information into the second word embedding layer.
In some embodiments, the mapping, by the second word embedding layer of the recommendation model to be trained, the first geographic location information and the second geographic location information in each sample data onto the vector space, to obtain the user location vector and the resource location vector corresponding to each sample data includes: mapping the first geographic position information in each sample data to a vector space through a second word embedding layer to obtain a user position vector corresponding to each sample data; and mapping the second geographic position information in each sample data to a vector space through a second word embedding layer to obtain a resource position vector corresponding to each sample data.
The second word embedding layer may further include two word embedding layers, namely a first sub-embedding layer and a second sub-embedding layer. The first sub-embedding layer is used for processing the address information and mapping the address information to a vector space to obtain a word embedding vector of the address information; the second sub-embedding layer is used for processing the interest point information, and can map the interest point information to a vector space to obtain word embedding vectors corresponding to the interest point information.
As an example, if the first geographic location information includes first address information and first interest point information, and the second word embedding layer includes a first sub-embedding layer and a second sub-embedding layer, the first address information included in each sample data may be input as the first sub-embedding layer of the second word embedding layer, and a word embedding vector of the first address information included in each sample data may be determined through the first word embedding layer of the second word embedding layer; the first interest point information included in each sample data is used as the input of a second sub-embedding layer of the second word embedding layer, and the word embedding vector of the first interest point information included in each sample data is determined through the second sub-embedding layer of the second word embedding layer; and determining the word embedding vector of the first address information and the word embedding vector of the first interest point information included in each sample data as a user position vector corresponding to each sample data.
As an example, if the second geographical location information includes second address information and second interest point information, and the second word embedding layer includes a first sub-embedding layer and a second sub-embedding layer, the second address information included in each sample data may be respectively used as input of the first sub-embedding layer of the second word embedding layer, and the word embedding vector of the second address information included in each sample data may be determined through the first sub-embedding layer of the second word embedding layer; the second interest point information included in each sample data is used as the input of a second sub-embedding layer of a second word embedding layer, and the word embedding vector of the second interest point information included in each sample data is determined through the second sub-embedding layer of the second word embedding layer; and determining the word embedding vector of the second address information and the word embedding vector of the second interest point information included in each sample data as a resource position vector corresponding to each sample data.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a recommendation model to be trained according to an embodiment of the present application, and as shown in fig. 3, a second word embedding layer of the recommendation model to be trained includes two word embedding layers, namely, ebedding 1 and ebedding 2. The input of the recommendation model to be trained comprises user association features of a user side and resource association features of a resource side, wherein the user association features comprise other user association features such as first address information, first interest point information and interest categories, and the resource association features comprise other resource association features such as second address information, second interest point information and resource categories. The input of the embedding1 is first address information and second address information, and the first address information and the second address information can be mapped to a vector space respectively to obtain word embedding vectors of the first address information and the second address information. The input of the embedding2 is first interest point information and second interest point information, and the first interest point information and the second interest point information can be mapped to a vector space respectively to obtain word embedding vectors of the first interest point information and the second interest point information.
Step 103: and processing the user position vector and the resource position vector corresponding to each sample data, and other user associated features, other resource associated features and recommended labels included in each sample data through a network layer after the second word is embedded in the recommendation model to be trained, so as to obtain a prediction error.
The prediction error is used for indicating an error between a predicted value and a true value of the recommendation model to be trained, and the predicted value can be obtained by performing prediction processing on sample data by the recommendation model to be trained.
As an example, the operation of processing, by a network layer after the second word embedding layer in the recommendation model to be trained, the user position vector and the resource position vector corresponding to each sample data, and other user associated features, other resource associated features, and recommendation tags included in each sample data, to obtain the prediction error includes the following steps 1031-1032:
step 1031: and carrying out prediction processing on the user position vector and the resource position vector corresponding to each sample data, and other user associated features and other resource associated features included in each sample data through a network layer after the second word is embedded in the recommendation model to be trained, so as to obtain the prediction recommendation probability corresponding to each sample data.
The prediction recommendation probability is used for indicating the probability that the recommended resources in each sample data are accepted by the sample user after being recommended to the sample user, and the recommendation probability is obtained by performing prediction processing on each sample data by a recommendation model to be trained.
As an example, the network layers after the second word embedding layer in the recommendation model to be trained include a splice (concat) layer, a Full-connected (FC) layer, and a softmax (logistic function) layer. For example, referring to fig. 3, the recommendation model to be trained includes a second word embedding layer, a concat layer, an FC layer, and a softmax layer, and the second word embedding layer includes ebedding 1 and ebedding 2. After the embedding1 layer outputs the word embedding vectors of the first address information and the second address information, the embedding2 outputs the word embedding vectors of the first interest point information and the second interest point information, the word embedding vectors of the first address information and the second address information, the word embedding vectors of the first interest point information and the second interest point information, other user related features and other resource related features can be continuously predicted through the concat layer, the FC layer and the softmax layer, and prediction recommendation probability is obtained.
As an example, if the network layer after the second word embedding layer in the recommendation model to be trained includes a splicing layer, a full connection layer and a softmax layer, the operation of performing prediction processing on the user position vector and the resource position vector corresponding to each sample data and other user related features and other resource related features included in each sample data through the network layer after the second word embedding layer in the recommendation model to be trained may include the following steps:
1) And splicing the user position vector and the resource position vector corresponding to each sample data, and other user associated features and other resource associated features included in each sample data through a splicing layer to obtain splicing features corresponding to each sample data.
Wherein, the splice feature can be expressed in a vector form. For example, other user-related features and other resource-related features may be in a vector form, and by splicing the user position vector and the resource position vector corresponding to each sample data, and the other user-related features and the other resource-related features included in each sample data, the whole user-related features and the other resource-related features are spliced into a long vector, and the long vector obtained by splicing is the spliced feature. That is, word embedding vectors of geographic position information of a user side and a resource side and other features can be spliced, and the whole is spliced into a long vector.
Referring to fig. 4, fig. 4 is a schematic diagram of a splicing process of a splicing layer according to an embodiment of the present application, and as shown in fig. 4, inputs of the splicing layer include "loc_vector_u", "pol_vector_u", "up_vector_u", "loc_vector_c", "pol_vector_c", and "up_vector_c". Where "loc_vector_u" represents a word embedding vector of the first address information of the sample user, "pol_vector_u" represents a word embedding vector of the first interest point information of the sample user, "up_vector_u" represents a feature vector of other user-related features such as interest categories of the sample user, "loc_vector_c" represents a word embedding vector of the second address information of the recommended resource, "pol_vector_c" represents a word embedding vector of the second interest point information of the recommended resource, and "up_vector_c" represents a feature vector of other resource-related features such as resource categories of the recommended resource. The splicing layer can splice the input feature vectors to obtain feature vectors corresponding to splicing features: { loc_vector_u, pol_vector_u, up_vector_u, loc_vector_c, pol_vector_c, up_vector_c }.
2) And carrying out nonlinear transformation on the splicing characteristics corresponding to each sample data through the full-connection layer to obtain full-connection layer output data corresponding to each sample data.
That is, after the splicing layer inputs the spliced characteristics obtained by splicing to the full-connection layer, the full-connection layer can perform nonlinear transformation on the spliced characteristics and output nonlinear transformation results.
By way of example, the nonlinear transformation function employed by the fully connected layer for nonlinear transformation may be: y=f (wx+b), where Y is the nonlinear transformation result, f is the activation function, W is the weight matrix, and c is the paranoid constant. Referring to fig. 5, fig. 5 is a schematic diagram of a logic algorithm of a full connection layer according to an embodiment of the present application, and f is an activation function.
3) And carrying out probability conversion on the output data of the full-connection layer corresponding to each sample data through the softmax layer to obtain the prediction recommendation probability corresponding to each sample data.
That is, the softmax layer may convert the output of the FC layer into a predicted recommendation probability that indicates whether the recommended resources are accepted by the sample user. Illustratively, the predicted recommended probability value range is [0,1].
As an example, the softmax layer may perform probability conversion on the full-connection layer output data corresponding to each sample data by the following formula, to obtain a predicted recommended probability corresponding to each sample data:
Z=Wx+b
Where x is the output data of the fully connected layer, and W and b are the parameters to be trained of the softmax layer.
Step 1032: and determining a prediction error based on the prediction recommendation probability and the recommendation label corresponding to each sample data in the plurality of sample data.
The prediction error may be obtained by comparing a predicted recommendation probability corresponding to each of the plurality of sample data with a recommendation tag.
Step 104: and carrying out back propagation on the prediction error according to a back propagation algorithm to update model parameters of the recommendation model to be trained, determining the recommendation model to be trained after updating the model parameters as a recommendation model, wherein a second word embedding layer in the recommendation model to be trained after updating the model parameters is a first word embedding layer in the recommendation model.
In the embodiment of the application, a plurality of sample data can be input into the recommended model to be trained for training, so that the model parameters of the recommended model to be trained are updated in the training process. And inputting a group of input layer data into the recommended model to be trained for training, and treating the training as a training process. After the training process is finished, judging whether the training process meets the training ending condition, if not, continuing training, and if so, continuing training. Training end conditions include, but are not limited to, the following two cases: 1, the prediction error is smaller than a set threshold. The set threshold is preset by a technician or is adjusted at any time according to the training process. And 2, training times are larger than the set times. Because in some cases, long training may not result in prediction errors less than some set threshold. Therefore, the training ending condition can be set according to the training times, for example, if the training times reach 10000 times, the training is stopped.
In one example, a Back propagation (Back propagation) algorithm based on gradient descent may be employed to Back propagate the prediction error to update the model parameters in the recommended model to be trained. In one example, the loss function employed in the training process may be a cross entropy loss function.
In the process of carrying out back propagation on the prediction error according to the back propagation algorithm, the weight of the second word embedding layer can be updated, and the updated second word embedding layer is the first word embedding layer in the recommendation model after training. That is, after the recommendation model is trained, the first word embedding layer in the recommendation model can map any geographic position information into the space vector to obtain the word embedding vector of any geographic position information.
By training the recommendation model to be trained according to the data of the recommendation behaviors accepted by the user, the internal relation between the geographic position information and the interests of the user can be fully mined, so that the codes of the first word embedding layer generated by training on the geographic position information comprise the internal relations among different geographic position information, and the internal relations can reflect the geographic interests of the user. That is, for the output of the first word embedding layer, the word embedding vector of the geographic position information of the user and the word embedding vector of the geographic position information of the recommended resource which is more easily accepted by the user are more similar in vector space, so that the vectorized representation of the geographic position information output by the first word embedding layer can represent not only the information of the geographic position dimension but also the information of other dimensions such as the user interest, and the content of the vectorized representation of the geographic position information is improved.
In the embodiment of the application, the recommendation model is trained by using the data of the recommendation behaviors accepted by the user, and the second word embedding layer added in the model is trained in the model training process to generate the corresponding geographic position vectorization coding layer, namely the first word embedding layer, so that the fusion of geographic features and user interests is realized, the word embedding vector of the geographic position information output by the first word embedding layer can represent the information of geographic position dimensions, the information of other dimensions such as user interests and the like, and the vectorization representation content of the geographic position information is improved.
After training to obtain the recommendation model, the geographic position information can be vectorized based on the first word embedding layer in the recommendation model to obtain vectorized representation of the geographic position information. Next, a detailed description will be given of a localization recommendation method provided in the embodiment of the present application. Fig. 6 is a flowchart of a localization recommendation method provided in an embodiment of the present application, where the method may be applied to a terminal or a server, as shown in fig. 6, and the method may include the following steps:
step 601: and obtaining the target geographic position information to be vectorized.
The target geographic location information may be any geographic location information that needs to be vectorized. The target geographic location information may include target address information and/or target point of interest information. The target address information may be information of province, city, district, county, street, or the like to which the target location belongs. The target point of interest may be a cell, a house, a shop or a sight, etc.
As one example, the target geographic location information may be a one-hot vector of the target geographic location information.
Step 602: and determining word embedding vectors of the target geographic position information through a first word embedding layer of the recommendation model.
The first word embedding layer is used for mapping any geographic position information to a vector space to obtain a word embedding vector. The first word embedding layer includes, for example, two word embedding layers, namely a first sub-embedding layer and a second sub-embedding layer. The first sub-embedding layer is used for processing the address information and mapping the address information to a vector space to obtain a word embedding vector of the address information; the second sub-embedding layer is used for processing the interest point information, and can map the interest point information to a vector space to obtain word embedding vectors corresponding to the interest point information.
The recommendation model is configured to determine a recommendation probability of any resource based on a user association feature of any user and a resource association feature of any resource, where the recommendation probability of any resource is used to indicate a probability that the any resource is accepted by the any user after being recommended to the any user, and the user association feature and the resource association feature each include at least geographic location information, which is specifically described in the embodiment of fig. 1 and is not described herein.
As one example, the recommendation model may include a first word embedding layer, a stitching layer, a full connection layer, and a softmax layer. The splicing layer is used for splicing input data of the splicing layer, the full-connection layer is used for carrying out nonlinear transformation on output data of the splicing layer, and the softmax layer is used for carrying out probability conversion on the output data of the full-connection layer to obtain recommended probability.
As one example, determining a word embedding vector for target geographic location information by a first word embedding layer of a recommendation model includes: and inputting the target geographic position information as a first word embedding layer of the recommendation model, and mapping the target geographic position to a vector space through the first word embedding layer to obtain a word embedding vector of the target geographic position information.
As an example, if the target geographic location information includes target address information and target point of interest information, the first word embedding layer includes a first sub-embedding layer and a second sub-embedding layer, and determining, by the first word embedding layer of the recommendation model, a word embedding vector of the target geographic location information includes: the method comprises the steps of taking target address information as input of a first sub-embedding layer of a first word embedding layer, and determining word embedding vectors of the target address information through the first sub-embedding layer of the first word embedding layer; the target interest point information is used as the input of a second sub-embedding layer of the first word embedding layer, and the word embedding vector of the target interest point information is determined through the second sub-embedding layer of the first word embedding layer; and determining the word embedding vector of the target address information and the word embedding vector of the target interest point information as the word embedding vector of the target geographic position information.
Step 603: words of the target geographic location information are embedded into vectors and determined as a vectorized representation of the target geographic location information.
That is, the output data of the first word embedding layer of the recommendation model is directly used as the vectorized representation of the target geographic position information, so that the vectorized representation of the target geographic position information can represent not only the information of geographic position dimensions, but also the information of other dimensions such as user interests.
Step 604: and recommending resources to the user based on the word embedding vector of the target geographic position information.
After the vectorized representation of the target geographic position information is obtained, the vectorized representation of the target geographic position information can be applied to any scene according to actual needs, for example, a localization resource recommendation model can be constructed by the vectorized representation of the target geographic position information, and therefore the localization resources of interest are recommended to the user more accurately.
As an example, the target geographic location information is a part of a user associated feature of the target user, the user associated feature of the target user further includes other user associated features, before determining a word embedded vector of the target geographic location information through a first word embedded layer of the recommendation model, the resource associated feature of the recommendable reference resource may be obtained, the resource associated feature includes resource geographic location information associated with the reference resource and other resource associated features, then when determining the word embedded vector of the target geographic location information through the first word embedded layer of the recommendation model, the word embedded vector of the resource geographic location information may be determined through the first word embedded layer of the recommendation model, and then, prediction processing is performed on the word embedded vector of the target geographic location information, the word embedded vector of the resource geographic location information, the other user associated feature of the target user and the other resource associated feature of the reference resource through a network layer after the first word embedded vector in the recommendation model, so as to obtain a recommendation probability of the reference resource; based on the recommendation probability of the reference resource, it is determined whether to recommend the reference resource to the target user.
The recommendation probability of the reference resource is used for indicating the probability that the reference resource is accepted by the target user after being recommended to the target user. If the recommendation probability is high, the target user is more interested in the reference resource, and is more likely to click or browse the reference resource, and if the recommendation probability is low, the target user is less interested in the reference resource, and is more likely not to click or browse the reference resource.
As an example, the recommendation model includes a first word embedding layer, a splicing layer, a full connection layer and a softmax layer, when the word embedding vector of the target geographic position information, the word embedding vector of the resource geographic position information, other user related features of the target user and other resource related features of the reference resource are predicted through the network layer after the first word embedding vector in the recommendation model, the word embedding vector of the target geographic position information, the word embedding vector of the resource geographic position information, the other user related features of the target user and the other resource related features of the reference resource can be spliced through the splicing layer to obtain splicing features, then nonlinear transformation is performed on the splicing features through the full connection layer to obtain full connection layer output data, and probability transformation is performed on the full connection layer output data through the softmax layer to obtain recommendation probability of the reference resource.
As one example, determining whether to recommend the reference resource to the target user based on the recommendation probability of the reference resource includes: if the recommendation probability of the reference resource is larger than or equal to the probability threshold, recommending the reference resource to the target user, and if the recommendation probability of the reference resource is smaller than the probability threshold, not recommending the reference resource to the target user. Alternatively, the recommendation probability of the reference resource and the recommendation probability of other reference resources may be combined to comprehensively evaluate whether to recommend the reference resource to the target user, which is not limited in the embodiment of the present application.
In the embodiment of the application, for the target geographic position information to be vectorized, the word embedding vector of the target geographic position information can be determined through the first word embedding layer of the recommendation model, and then the word embedding vector of the target geographic position information is determined as the vectorized representation of the target geographic position information, so that the vectorizing mode of the geographic position information is expanded. Moreover, the recommendation model is used for determining the recommendation probability of any resource based on the user association feature of any user and the resource association feature of any resource, and the user association feature and the resource association feature at least comprise geographic position information, so that the first word embedding layer of the recommendation model encodes the geographic position information, the output word embedding vector comprises the internal association of different geographic position information, the association can reflect the geographic interest of the user, and the vectorized representation of the determined geographic position information can represent not only the information of geographic position dimensions but also the position information of other dimensions such as the user interest, and therefore, the accuracy of localized recommendation can be improved when the word embedding vector based on the target geographic position information carries out resource recommendation. In addition, the vectorized representation of the geographic position information determined by the method provided by the embodiment of the application can be added to the characteristics in the resource recommendation system as the basis for recalling the localized resources by the resource recommendation system, so that the effect of localized resource recommendation is improved.
Fig. 7 is a schematic structural diagram of a localization recommendation apparatus provided in an embodiment of the present application, where the apparatus may be implemented as part or all of a computer device by software, hardware, or a combination of both. Referring to fig. 7, the apparatus includes: a first acquisition model 701, a first determination module 702, a second determination module 703, and a recommendation module 704.
A first obtaining module 701, configured to obtain target geographic location information to be vectorized;
a first determining module 702, configured to determine a word embedding vector of the target geographic location information through a first word embedding layer of the recommendation model;
the first word embedding layer is used for mapping any geographic position information to a vector space to obtain word embedding vectors, the recommendation model is used for determining recommendation probability of any resource based on user association features of any user and resource association features of any resource, the recommendation probability of any resource is used for indicating probability that the any resource is accepted by any user after being recommended to the any user, and the user association features and the resource association features at least comprise geographic position information;
a second determining module 703, configured to embed the word of the target geographic location information into a vector, and determine the word as a vectorized representation of the target geographic location information;
And the recommending module 704 is used for recommending resources to the user based on the word embedding vector of the target geographic position information.
Optionally, the target geographic location information includes target address information and target interest point information, and the first word embedding layer includes a first sub-embedding layer and a second sub-embedding layer; the first determination model 701 is used for:
the target address information is used as the input of a first sub-embedding layer of the first word embedding layer, and the word embedding vector of the target address information is determined through the first sub-embedding layer of the first word embedding layer;
the target interest point information is used as the input of a second sub-embedding layer of the first word embedding layer, and the word embedding vector of the target interest point information is determined through the second sub-embedding layer of the first word embedding layer;
and determining the word embedding vector of the target address information and the word embedding vector of the target interest point information as the word embedding vector of the target geographic position information.
Optionally, the apparatus further comprises:
a second obtaining module, configured to obtain a plurality of sample data, where the sample data includes a user-associated feature of a sample user, a resource-associated feature of a recommended resource recommended to the sample user, and a recommendation tag, where the recommendation tag is used to indicate whether the recommended resource is accepted by the sample user, and the user-associated feature includes first geographic location information and other user-associated features associated with the sample user, and the resource-associated feature includes second geographic location information and other resource-associated features associated with the recommended resource;
The coding module is used for taking the plurality of sample data as the input of a recommendation model to be trained, and mapping the first geographic position information and the second geographic position information in each sample data onto a vector space through a second word embedding layer of the recommendation model to be trained to obtain a user position vector and a resource position vector corresponding to each sample data;
the training module is used for processing the user position vector and the resource position vector corresponding to each sample data, and other user association features, other resource association features and recommendation tags included in each sample data through a network layer after the second word is embedded into the layer in the recommendation model to be trained, so as to obtain a prediction error; and carrying out back propagation on the prediction error according to a back propagation algorithm to update the model parameters of the recommendation model to be trained, determining the recommendation model to be trained after updating the model parameters as the recommendation model, wherein a second word embedding layer in the recommendation model to be trained after updating the model parameters is a first word embedding layer in the recommendation model.
Optionally, the first geographic location information includes first address information and first interest point information, the second geographic location information includes second address information and second interest point information, and the second word embedding layer includes a first sub-embedding layer and a second sub-embedding layer; the coding module is used for:
Respectively taking the first address information and the second address information included in each sample data as the input of a first sub-embedding layer of the second word embedding layer, and determining word embedding vectors of the first address information and the second address information included in each sample data through the first sub-embedding layer of the second word embedding layer;
respectively taking the first interest point information and the second interest point information included in each sample data as the input of a second sub-embedding layer of the second word embedding layer, and determining word embedding vectors of the first interest point information and the second interest point information included in each sample data through the second sub-embedding layer of the second word embedding layer;
the word embedding vector of the first address information and the first interest point information included in each sample data is determined to be a user position vector corresponding to each sample data, and the word embedding vector of the second address information and the second interest point information included in each sample data is determined to be a resource position vector corresponding to each sample data.
Optionally, the training module is configured to:
through a network layer behind the second word embedding layer in the recommendation model to be trained, predicting the user position vector and the resource position vector corresponding to each sample data, and other user associated features and other resource associated features included in each sample data, so as to obtain a prediction recommendation probability corresponding to each sample data;
The prediction error is determined based on a prediction recommendation probability and a recommendation label corresponding to each of the plurality of sample data.
Optionally, the network layer after the second word embedding layer in the recommendation model to be trained comprises a splicing layer, a full connection layer and a logistic function softmax layer; the training module is used for:
the user position vector and the resource position vector corresponding to each sample data, and other user association features and other resource association features included in each sample data are spliced through the splicing layer, so that splicing features corresponding to each sample data are obtained;
nonlinear transformation is carried out on the splicing characteristics corresponding to each sample data through the full connection layer, so that full connection layer output data corresponding to each sample data is obtained;
and carrying out probability conversion on the full-connection layer output data corresponding to each sample data through the softmax to obtain the prediction recommendation probability corresponding to each sample data.
Optionally, the other user-associated feature comprises a resource category to which the resource of interest to the sample user belongs, and the other resource-associated feature comprises a resource category to which the recommended resource belongs.
Optionally, the target geographic location information is part of a user-associated feature of the target user, where the user-associated feature of the target user further includes other user-associated features, and the recommendation module 704 is configured to:
Acquiring resource association characteristics of a recommendable reference resource, wherein the resource association characteristics comprise resource geographic position information and other resource association characteristics associated with the reference resource;
determining word embedding vectors of the resource geographic position information through a first word embedding layer of the recommendation model;
through a network layer after the first word embedding vector in the recommendation model, predicting word embedding vectors of the target geographic position information, word embedding vectors of the resource geographic position information, other user association features of the target user and other resource association features of the reference resource to obtain recommendation probability of the reference resource;
based on the recommendation probability of the reference resource, it is determined whether to recommend the reference resource to the target user.
In the embodiment of the application, for the target geographic position information to be vectorized, the word embedding vector of the target geographic position information can be determined through the first word embedding layer of the recommendation model, and then the word embedding vector of the target geographic position information is determined as the vectorized representation of the target geographic position information, so that the vectorizing mode of the geographic position information is expanded. Moreover, the recommendation model is used for determining the recommendation probability of any resource based on the user association feature of any user and the resource association feature of any resource, and the user association feature and the resource association feature at least comprise geographic position information, so that the first word embedding layer of the recommendation model encodes the geographic position information, the output word embedding vector comprises the internal association of different geographic position information, the association can reflect the geographic interest of the user, and the vectorized representation of the determined geographic position information can represent not only the information of geographic position dimensions but also the position information of other dimensions such as the user interest, and therefore, the accuracy of localized recommendation can be improved when the word embedding vector based on the target geographic position information carries out resource recommendation.
It should be noted that: in the localization recommendation apparatus provided in the foregoing embodiment, when vectorizing geographic location information, only the division of the functional modules is used to illustrate, in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the localization recommendation device provided in the above embodiment and the localization recommendation method embodiment belong to the same concept, and the specific implementation process of the localization recommendation device is detailed in the method embodiment, which is not described herein again.
Fig. 8 is a schematic structural diagram of a computer device 800 according to an embodiment of the present application, where the computer device 800 may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) 801 and one or more memories 802, where at least one instruction is stored in the memories 802, and the at least one instruction is loaded and executed by the processors 801 to implement the localization recommendation method provided in the foregoing method embodiments. Of course, the computer device 800 may also have a wired or wireless network interface, a keyboard, an input/output interface, and other components for implementing the functions of the device, which are not described herein.
In some embodiments, there is also provided a computer readable storage medium having stored therein at least one instruction, at least one program, code set, or instruction set, the at least one instruction, at least one program, code set, or instruction set being loaded and executed by a processor to implement the localization recommendation method of the above embodiments. For example, the computer readable storage medium may be ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
It is noted that the computer readable storage medium mentioned in the present application may be a non-volatile storage medium, in other words, a non-transitory storage medium.
It should be understood that all or part of the steps to implement the above-described embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions may be stored in the computer-readable storage medium described above.
That is, in some embodiments, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the localization recommendation method described above.
The above embodiments are not intended to limit the present application, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present application should be included in the scope of the present application.

Claims (9)

1. A localized recommendation method, the method comprising:
acquiring user association features of target users to be vectorized and resource association features of recommendable reference resources, wherein the user association features comprise target geographic position information and other user association features, and the resource association features comprise resource geographic position information and other resource association features associated with the reference resources;
determining word embedding vectors of the target geographic position information and the word embedding vectors of the resource geographic position information through a first word embedding layer of a recommendation model;
the first word embedding layer is used for mapping any geographic position information to a vector space to obtain word embedding vectors, the recommendation model is used for determining recommendation probability of any resource based on user association features of any user and resource association features of any resource, the recommendation probability of any resource is used for indicating probability that the any resource is accepted by the any user after being recommended to the any user, and the user association features and the resource association features at least comprise geographic position information;
Embedding the words of the target geographic position information into vectors, and determining the words as vectorized representations of the target geographic position information;
through a network layer after the first word embedding vector in the recommendation model, predicting word embedding vectors of the target geographic position information, word embedding vectors of the resource geographic position information, other user associated features and other resource associated features to obtain recommendation probability of the reference resource;
and determining whether to recommend the reference resource to the target user based on the recommendation probability of the reference resource.
2. The method of claim 1, wherein the target geographic location information comprises target address information and target point of interest information, the first word embedding layer comprising a first sub-embedding layer and a second sub-embedding layer;
the determining, by the first word embedding layer of the recommendation model, a word embedding vector of the target geographic location information includes:
the target address information is used as the input of a first sub-embedding layer of the first word embedding layer, and the word embedding vector of the target address information is determined through the first sub-embedding layer of the first word embedding layer;
The target interest point information is used as the input of a second sub-embedding layer of the first word embedding layer, and the word embedding vector of the target interest point information is determined through the second sub-embedding layer of the first word embedding layer;
and determining the word embedding vector of the target address information and the word embedding vector of the target interest point information as the word embedding vector of the target geographic position information.
3. The method of claim 1, wherein prior to determining the word embedding vector for the target geographic location information by the first word embedding layer of the recommendation model, further comprising:
acquiring a plurality of sample data, wherein the sample data comprises user association characteristics of a sample user, resource association characteristics of one recommended resource recommended to the sample user and a recommendation label, the recommendation label is used for indicating whether the recommended resource is accepted by the sample user, the user association characteristics comprise first geographic position information and other user association characteristics associated with the sample user, and the resource association characteristics comprise second geographic position information and other resource association characteristics associated with the recommended resource;
the plurality of sample data are used as input of a recommendation model to be trained, and the first geographic position information and the second geographic position information in each sample data are respectively mapped onto a vector space through a second word embedding layer of the recommendation model to be trained, so that a user position vector and a resource position vector corresponding to each sample data are obtained;
Processing the user position vector and the resource position vector corresponding to each sample data, and other user association features, other resource association features and recommendation tags included in each sample data through a network layer after the second word embedding layer in the recommendation model to be trained to obtain a prediction error;
and carrying out back propagation on the prediction error according to a back propagation algorithm to update model parameters of the recommendation model to be trained, determining the recommendation model to be trained after updating the model parameters as the recommendation model, wherein a second word embedding layer in the recommendation model to be trained after updating the model parameters is a first word embedding layer in the recommendation model.
4. The method of claim 3, wherein the first geographic location information comprises first address information and first point of interest information, the second geographic location information comprises second address information and second point of interest information, and the second word embedding layer comprises a first sub-embedding layer and a second sub-embedding layer;
the mapping, by the second word embedding layer of the recommendation model to be trained, the first geographic location information and the second geographic location information in each sample data to a vector space to obtain a user location vector and a resource location vector corresponding to each sample data, including:
Respectively taking the first address information and the second address information included in each sample data as the input of a first sub-embedding layer of the second word embedding layer, and determining word embedding vectors of the first address information and the second address information included in each sample data through the first sub-embedding layer of the second word embedding layer;
respectively taking the first interest point information and the second interest point information included in each sample data as the input of a second sub-embedding layer of the second word embedding layer, and determining word embedding vectors of the first interest point information and the second interest point information included in each sample data through the second sub-embedding layer of the second word embedding layer;
the word embedding vector of the first address information and the first interest point information included in each sample data is determined to be a user position vector corresponding to each sample data, and the word embedding vector of the second address information and the second interest point information included in each sample data is determined to be a resource position vector corresponding to each sample data.
5. The method of claim 3, wherein the processing, by a network layer after the second word embedding layer in the recommendation model to be trained, the user location vector and the resource location vector corresponding to each sample data, and other user-related features, other resource-related features, and recommendation tags included in each sample data to obtain the prediction error includes:
Through a network layer after the second word embedding layer in the recommendation model to be trained, predicting the user position vector and the resource position vector corresponding to each sample data, and other user associated features and other resource associated features included in each sample data, so as to obtain a prediction recommendation probability corresponding to each sample data;
and determining the prediction error based on the prediction recommendation probability and the recommendation label corresponding to each sample data in the plurality of sample data.
6. The method of claim 5, wherein the network layer following the second word embedding layer in the recommendation model to be trained comprises a stitching layer, a full-join layer, and a logistic function softmax layer;
the predicting, by the network layer after the second word embedding layer in the recommendation model to be trained, the user position vector and the resource position vector corresponding to each sample data, and other user associated features and other resource associated features included in each sample data, to obtain a prediction recommendation probability corresponding to each sample data, includes:
splicing the user position vector and the resource position vector corresponding to each sample data, and other user association features and other resource association features included in each sample data through the splicing layer to obtain splicing features corresponding to each sample data;
Nonlinear transformation is carried out on the splicing characteristics corresponding to each sample data through the full connection layer, so that full connection layer output data corresponding to each sample data is obtained;
and carrying out probability conversion on the full-connection layer output data corresponding to each sample data through the softmax to obtain the prediction recommendation probability corresponding to each sample data.
7. A localized recommendation device, the device comprising:
the first acquisition module is used for acquiring user association features of a target user to be vectorized and resource association features of recommended reference resources, wherein the user association features comprise target geographic position information and other user association features, and the resource association features comprise resource geographic position information and other resource association features associated with the reference resources;
the first determining module is used for determining word embedding vectors of the target geographic position information and word embedding vectors of the resource geographic position information through a first word embedding layer of the recommendation model;
the first word embedding layer is used for mapping any geographic position information to a vector space to obtain word embedding vectors, the recommendation model is used for determining recommendation probability of any resource based on user association features of any user and resource association features of any resource, the recommendation probability of any resource is used for indicating probability that the any resource is accepted by the any user after being recommended to the any user, and the user association features and the resource association features at least comprise geographic position information;
A second determining module, configured to embed a word of the target geographic location information into a vector, and determine the word as a vectorized representation of the target geographic location information;
the recommendation module is used for carrying out prediction processing on the word embedding vector of the target geographic position information, the word embedding vector of the resource geographic position information, the other user associated features and the other resource associated features through a network layer after the first word embedding vector in the recommendation model to obtain recommendation probability of the reference resource; and determining whether to recommend the reference resource to the target user based on the recommendation probability of the reference resource.
8. A computer device comprising a processor and a memory having stored therein at least one instruction, at least one program, code set, or instruction set, the at least one instruction, at least one program, code set, or instruction set being loaded and executed by the processor to implement a localization recommendation method according to any of claims 1 to 6.
9. A computer readable storage medium having stored therein at least one instruction, at least one program, code set, or instruction set, the at least one instruction, the at least one program, the code set, or the instruction set being loaded and executed by a processor to implement the localization recommendation method of any one of claims 1 to 6.
CN201910769750.8A 2019-08-20 2019-08-20 Localized recommendation method, device and storage medium Active CN112417260B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910769750.8A CN112417260B (en) 2019-08-20 2019-08-20 Localized recommendation method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910769750.8A CN112417260B (en) 2019-08-20 2019-08-20 Localized recommendation method, device and storage medium

Publications (2)

Publication Number Publication Date
CN112417260A CN112417260A (en) 2021-02-26
CN112417260B true CN112417260B (en) 2023-08-18

Family

ID=74779116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910769750.8A Active CN112417260B (en) 2019-08-20 2019-08-20 Localized recommendation method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112417260B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116910372B (en) * 2023-09-11 2024-01-26 腾讯科技(深圳)有限公司 Information push model processing method and device, information push method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834695A (en) * 2015-04-24 2015-08-12 南京邮电大学 Activity recommendation method based on user interest degree and geographic position
CN105183882A (en) * 2015-09-23 2015-12-23 百度在线网络技术(北京)有限公司 Application software recommending method and device
WO2017121244A1 (en) * 2016-01-12 2017-07-20 腾讯科技(深圳)有限公司 Information recommendation method, system and storage medium
CN109063198A (en) * 2018-09-10 2018-12-21 浙江广播电视集团 Melt the multidimensional visual search recommender system of media resource
CN109241431A (en) * 2018-09-07 2019-01-18 腾讯科技(深圳)有限公司 A kind of resource recommendation method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104281622B (en) * 2013-07-11 2017-12-05 华为技术有限公司 Information recommendation method and device in a kind of social media
CN105446972B (en) * 2014-06-17 2022-06-10 阿里巴巴集团控股有限公司 Searching method, device and system based on and fused with user relationship data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834695A (en) * 2015-04-24 2015-08-12 南京邮电大学 Activity recommendation method based on user interest degree and geographic position
CN105183882A (en) * 2015-09-23 2015-12-23 百度在线网络技术(北京)有限公司 Application software recommending method and device
WO2017121244A1 (en) * 2016-01-12 2017-07-20 腾讯科技(深圳)有限公司 Information recommendation method, system and storage medium
CN109241431A (en) * 2018-09-07 2019-01-18 腾讯科技(深圳)有限公司 A kind of resource recommendation method and device
CN109063198A (en) * 2018-09-10 2018-12-21 浙江广播电视集团 Melt the multidimensional visual search recommender system of media resource

Also Published As

Publication number Publication date
CN112417260A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN110851713B (en) Information processing method, recommending method and related equipment
CN111737476B (en) Text processing method and device, computer readable storage medium and electronic equipment
CN107679039B (en) Method and device for determining statement intention
CN111274815B (en) Method and device for mining entity focus point in text
WO2021139191A1 (en) Method for data labeling and apparatus for data labeling
CN113254785B (en) Recommendation model training method, recommendation method and related equipment
CN113627447B (en) Label identification method, label identification device, computer equipment, storage medium and program product
CN111666416B (en) Method and device for generating semantic matching model
CN111104599B (en) Method and device for outputting information
CN112988979A (en) Entity identification method, entity identification device, computer readable medium and electronic equipment
CN113011172B (en) Text processing method, device, computer equipment and storage medium
WO2023213157A1 (en) Data processing method and apparatus, program product, computer device and medium
CN111126422B (en) Method, device, equipment and medium for establishing industry model and determining industry
CN113033707B (en) Video classification method and device, readable medium and electronic equipment
CN112417260B (en) Localized recommendation method, device and storage medium
CN117216393A (en) Information recommendation method, training method and device of information recommendation model and equipment
CN112131884A (en) Method and device for entity classification and method and device for entity presentation
CN116957128A (en) Service index prediction method, device, equipment and storage medium
US20230367972A1 (en) Method and apparatus for processing model data, electronic device, and computer readable medium
CN115129885A (en) Entity chain pointing method, device, equipment and storage medium
CN111615178B (en) Method and device for identifying wireless network type and model training and electronic equipment
CN111444335B (en) Method and device for extracting central word
CN115809313A (en) Text similarity determination method and equipment
CN112182179A (en) Entity question-answer processing method and device, electronic equipment and storage medium
CN111797183A (en) Method and device for mining road attribute of information point and electronic equipment

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
GR01 Patent grant
GR01 Patent grant