Disclosure of Invention
The invention aims to provide an interest point recommendation method, which can solve the technical problem of improving the prediction accuracy of the existing method for predicting user interest points to a certain extent. The invention also provides a point of interest recommendation system, equipment and a computer readable storage medium.
In order to achieve the above purpose, the invention provides the following technical scheme:
a point of interest recommendation method, comprising:
acquiring time information and position information of a group of interest points;
inputting the time information and the position information to a pre-trained LSTM model;
obtaining the operation result of each interest point output by the LSTM model;
determining a target interest point based on the operation result;
the memory unit, the output gate and the hidden state of the LSTM model are controlled by a time gate and a distance gate, wherein the time gate represents the time interval between every two adjacent checked-in interest points, and the distance gate represents the distance interval between every two adjacent checked-in interest points.
Preferably, the update equation of the LSTM model trained in advance includes:
it=σ(Wi[ht-1,xt]+bi);
ft=σ(Wf[ht-1,xt]+bf);
T1t=σ(xtWxt1+σ(ΔttWt1)+bt1),s.t.Wxt1≤0;
T2t=σ(xtWxt2+σ(ΔttWt2)+bt2);
D1t=σ(xtWxd1+σ(ΔdtWd1)+bd1),s.t.Wxd1≤0;
D2t=σ(xtWxd2+σ(ΔdtWd2)+bd2);
ot=σ(Wo[ht-1,xt]+ΔttWto+ΔdtWdo+bo);
wherein i
tAn input gate representing a time t; w represents the corresponding weight; h represents the hidden state; x is the number of
tRepresenting the time information and the position information; b represents the corresponding bias; sigma represents mapping values to a sigmoid layer between (0,1), 1 represents complete retention, and 0 represents complete forgetting; f. of
tDenotes the t-thA forgetting gate at a moment;
representing a state of a short term memory cell of the memory cells; c. C
tRepresenting a state of a long-term memory cell of the memory cells; t is
1tRepresenting a first time gate for controlling the time interval effect of the short term interest; t is
2tRepresenting a second time gate for controlling the time interval effect of long-term interest; d
1tRepresenting a first range gate for controlling the range-interval effect of short-term interest; d
2tRepresenting a second range gate for controlling the range-interval effect of long-term interest; Δ t represents the time interval between the interest points of two adjacent check-ins; Δ d represents the distance interval between the interest points of two adjacent check-ins; o
tRepresenting the output gate.
Preferably, the update equation of the LSTM model trained in advance includes:
it=σ(Wi[ht-1,xt]+bi);
T1t=σ(xtWxt1+σ(ΔttWt1)+bt1),s.t.Wxt1≤0;
T2t=σ(xtWxt2+σ(ΔttWt2)+bt2);
D1t=σ(xtWxd1+σ(ΔdtWd1)+bd1),s.t.Wxd1≤0;
D2t=σ(xtWxd2+σ(ΔdtWd2)+bd2);
ot=σ(Wo[ht-1,xt]+ΔttWto+ΔdtWdo+bo);
wherein i
tAn input gate representing a time t; w represents the corresponding weight; h represents the hidden state; x is the number of
tRepresenting the time information and the position information; b represents the corresponding bias; sigma represents mapping values to a sigmoid layer between (0,1), 1 represents complete retention, and 0 represents complete forgetting;
representing a state of a short term memory cell of the memory cells; c. C
tRepresenting a state of a long-term memory cell of the memory cells; t is
1tRepresenting a first time gate for controlling the time interval effect of the short term interest; t is
2tRepresenting a second time gate for controlling the time interval effect of long-term interest; d
1tRepresenting a first range gate for controlling the range-interval effect of short-term interest; d
2tRepresenting a second range gate for controlling the range-interval effect of long-term interest; Δ t represents the time interval between the interest points of two adjacent check-ins; Δ d represents the distance interval between the interest points of two adjacent check-ins; o
tRepresenting the output gate.
Preferably, the pre-training of the LSTM model includes:
constructing an initial LSTM model;
acquiring a training interest point sample and a testing interest point sample;
inputting the training interest point samples to the initial LSTM model;
judging whether the output interest point of the initial LSTM model is consistent with the test interest point sample, if so, determining that the initial LSTM model is the LSTM model trained in advance, if not, adjusting the parameters of the initial LSTM model, and returning to the step of inputting the training interest point sample to the initial LSTM model;
wherein when Wxt1When > 0, set Wxt10; when W isxd1When > 0, set Wxd1=0。
Preferably, the determining the target interest point based on the operation result includes:
performing softmax operation on the operation result to obtain the probability distribution of each interest point;
determining the target point of interest based on the probability distribution.
Preferably, the determining the target interest point based on the probability distribution includes:
and determining the first N interest points with the maximum probability distribution values as the target interest points.
Preferably, after determining the target interest point based on the operation result, the method further includes:
and sending the target interest point to a user terminal.
A point of interest recommendation system comprising:
the first acquisition module is used for acquiring time information and position information of sign-in of a group of interest points;
the input module is used for inputting the time information and the position information to a pre-trained LSTM model;
the second acquisition module is used for acquiring the operation result of each interest point output by the LSTM model;
the determining module is used for determining a target interest point based on the operation result;
the memory unit, the output gate and the hidden state of the LSTM model are controlled by a time gate and a distance gate, wherein the time gate represents the time interval between every two adjacent checked-in interest points, and the distance gate represents the distance interval between every two adjacent checked-in interest points.
A point of interest recommendation device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the point of interest recommendation method as described in any of the above when executing the computer program.
A computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the point of interest recommendation method according to any one of the preceding claims.
The invention provides an interest point recommendation method, which predicts a target interest point according to time information and position information of sign-in of a group of interest points by means of a pre-trained LSTM model, wherein a memory unit, an output gate and a hidden state of the pre-trained LSTM model all comprise a time gate and a distance gate, the time gate represents a time interval between every two adjacent sign-in interest points, the distance gate represents a distance interval between every two adjacent sign-in interest points, and when the sign-in time of the interest points in a sign-in sequence is earlier and farther than the current sign-in time, the interest points reflect long-term interest of a user in time and distance; when the distance between the user and the current check-in time is closer, the short-term interest of the user in time and distance can be reflected better. Namely, the LSTM model applied by the invention considers the influence of long-term and short-term time and distance on the target interest point, which completely accords with the influence of long-term interest when the user selects the preferred interest point in real life, and meanwhile, the short-term interest makes the preference of the next interest point of the user more definite. Compared with the prior art that the ST-RNN can only predict the next interest point of the user according to the recently visited interest points of the user, the prediction accuracy is higher. In summary, the interest point recommendation method provided by the invention solves the technical problem of how to improve the prediction accuracy of the existing prediction user interest point to a certain extent. The interest point recommendation system, the interest point recommendation equipment and the computer readable storage medium provided by the invention also solve the corresponding technical problems.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The action execution subject of each step in the method for recommending a point of interest provided by the embodiment of the present invention may be a system for recommending a point of interest provided by the embodiment of the present invention, and the system may be embedded in a computer, a server, and the like. For convenience of description, the action execution subject of each step in the method for recommending a point of interest provided by the embodiment of the present invention is set as a point of interest recommendation system, referred to as a recommendation system for short, provided by the embodiment of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a point of interest recommendation method according to an embodiment of the present invention.
The interest point recommendation method provided by the embodiment of the invention can comprise the following steps:
step S101: and acquiring a group of time information and position information of the check-in of the interest points.
The interest points are recorded information of users after checking in on the social network service based on the geographic position, and generally comprise time information and position information. In practical application, the recommendation system can read the check-in sequence of each user interest point from the social network service, including time information and position information, and also can receive externally input time information and position information of a group of interest points transmitted by an uploading port of the recommendation system. The number of the points of interest in the set of points of interest may be determined according to actual needs, and may be all the points of interest that a certain user checked in for a period of time, it should be noted that what the recommendation system predicts may be the next possible point of interest for the user, which may be all the points of interest recorded by the social networking service for a period of time.
Step S102: inputting time information and position information to a pre-trained LSTM (Long Short-Term Memory network) model, wherein a Memory unit, an output gate and a hidden state of the LSTM model are controlled by a time gate and a distance gate, the time gate represents the time interval between every two adjacent signed interest points, and the distance gate represents the distance interval between every two adjacent signed interest points.
After acquiring a group of time information and distance information of interest point check-in, the recommendation system can input the acquired time information and distance information into a pre-trained LSTM model, and the LSTM model outputs an operation result related to each interest point according to the input time information and distance information, wherein the interest points can be a group of vectors related to each interest point, and the like. Because the memory unit, the output gate and the hidden state of the pre-trained LSTM model are all influenced by the control of a time gate and a distance gate, the time gate represents the time interval between every two adjacent checked-in interest points, the distance gate represents the distance interval between every two adjacent checked-in interest points, and when the check-in time of the interest points in the check-in sequence is far away from the current check-in time, the interest points reflect the long-term interest of the user in time and distance; when the distance between the user and the current check-in time is closer, the short-term interest of the user in time and distance can be reflected better. Namely, the LSTM model applied by the invention considers the influence of long-term and short-term time and distance on the target interest point, which completely accords with the influence of long-term interest when the user selects the preferred interest point in real life, and meanwhile, the short-term interest makes the preference of the next interest point of the user more definite.
Step S103: and acquiring the operation result of each interest point output by the LSTM model.
Step S104: and determining the target interest point based on the operation result.
After the recommendation system obtains the operation result, the target interest point can be determined according to the operation result, and specifically, one or some most prominent interest points in the operation result can be determined as the target interest point. Because the memory unit, the output gate and the hidden state of the pre-trained LSTM model all comprise a time gate and a distance gate, the time gate represents the time interval between every two adjacent checked-in interest points, and the distance gate represents the distance interval between every two adjacent checked-in interest points, when the check-in time of the interest points in the check-in sequence is far away from the current check-in time, the interest points reflect the long-term interest of the user in time and distance; when the distance between the user and the current check-in time is closer, the short-term interest of the user in time and distance can be reflected better. Namely, the LSTM model applied by the invention considers the influence of long-term and short-term time and distance on the target interest point, which completely accords with the influence of long-term interest when the user selects the preferred interest point in real life, and meanwhile, the short-term interest makes the preference of the next interest point of the user more definite. The target interest point is also referred to herein as the next interest point to be visited by the user.
The invention provides an interest point recommendation method, which predicts a target interest point according to time information and position information of sign-in of a group of interest points by means of a pre-trained LSTM model, wherein a memory unit, an output gate and a hidden state of the pre-trained LSTM model all comprise a time gate and a distance gate, the time gate represents a time interval between every two adjacent sign-in interest points, the distance gate represents a distance interval between every two adjacent sign-in interest points, and when the sign-in time of the interest points in a sign-in sequence is earlier and farther than the current sign-in time, the interest points reflect long-term interest of a user in time and distance; when the distance between the user and the current check-in time is closer, the short-term interest of the user in time and distance can be reflected better. Namely, the LSTM model applied by the invention considers the influence of long-term and short-term time and distance on the target interest point, which completely accords with the influence of long-term interest when the user selects the preferred interest point in real life, and meanwhile, the short-term interest makes the preference of the next interest point of the user more definite. Compared with the prior art that the ST-RNN can only predict the next interest point of the user according to the recently visited interest points of the user, the prediction accuracy is higher. In summary, the interest point recommendation method provided by the invention solves the technical problem of how to improve the prediction accuracy of the existing prediction user interest point to a certain extent.
In the method for recommending a point of interest provided in an embodiment of the present invention, the updating equation of the pre-trained LSTM model may include:
it=σ(Wi[ht-1,xt]+bi);
ft=σ(Wf[ht-1,xt]+bf);
T1t=σ(xtWxt1+σ(ΔttWt1)+bt1),s.t.Wxt1≤0;
T2t=σ(xtWxt2+σ(ΔttWt2)+bt2);
D1t=σ(xtWxd1+σ(ΔdtWd1)+bd1),s.t.Wxd1≤0;
D2t=σ(xtWxd2+σ(ΔdtWd2)+bd2);
ot=σ(Wo[ht-1,xt]+ΔttWto+ΔdtWdo+bo);
wherein i
tAn input gate representing a time t; w denotes the corresponding weight, W
iRepresents the weight of the input gate, W
fWeight representing forgetting gate, W
cRepresenting the weight, W, of the memory cell
oRepresents the weight of the output gate, W
toWeight, W, of output gate when time information is t
doIndicating distance information as
dThe weight of the time output gate;
hindicates a hidden state, h
t-1Indicates the hidden state at time (t-1), h
tRepresenting a hidden state at time t; x is the number of
tRepresenting interest point feature vectors at t moment in the check-in sequence; b denotes the corresponding offset, b
iIndicating the offset of the input gate, b
fIndicating the offset of a forgetting gate, b
cRepresenting the bias of the memory cell, b
oIndicating the offset of the output gate; sigma represents mapping values to a sigmoid layer between (0,1), 1 represents complete retention, and 0 represents complete forgetting; f. of
tA forgetting gate showing the t-th time;
representing a state of a short term memory cell of the memory cells; c. C
tRepresenting the state of a long-term memory cell of said memory cells, c
t-1Indicating the state of the long-term memory cell at time (t-1); t is
1tAnd T
2tAre the same and all represent time gates at the same time, except T
1tShowing a first time gate for controlling the time interval influence of short-term interest, T
2tRepresenting a second time gate for controlling the time interval effect of long-term interest; w
xt1、W
t1、W
xt2、W
t2、W
xd1、W
d1、W
xd2、W
d2All represent the weight at the t-th moment; d
1tRepresenting a first range gate for controlling the range-interval effect of short-term interest; d
2tRepresenting a second range gate for controlling the range-interval effect of long-term interest; Δ t
tRepresenting the time interval between two adjacent interest points checked in at the time t; Δ d
tRepresenting the distance interval between two adjacent interest points checked in at the time t; o
tAn output gate is shown. Referring to fig. 2, fig. 2 is a first structural diagram of an LSTM model trained in advance in a method for recommending a point of interest according to an embodiment of the present invention.
In practical applications, in order to reduce the number of parameters and improve efficiency, the input gate and the forgetting gate in the previous embodiment may be coupled, and in the method for recommending a point of interest provided in the embodiment of the present invention, the updating equation of the pre-trained LSTM model may include:
it=σ(Wi[ht-1,xt]+bi);
T1t=σ(xtWxt1+σ(ΔttWt1)+bt1),s.t.Wxt1≤0;
T2t=σ(xtWxt2+σ(ΔttWt2)+bt2);
D1t=σ(xtWxd1+σ(ΔdtWd1)+bd1),s.t.Wxd1≤0;
D2t=σ(xtWxd2+σ(ΔdtWd2)+bd2);
ot=σ(Wo[ht-1,xt]+ΔttWto+ΔdtWdo+bo);
wherein i
tAn input gate representing a time t; w denotes the corresponding weight, W
iRepresents the weight of the input gate, W
cRepresenting the weight, W, of the memory cell
oRepresents the weight of the output gate, W
toWeight, W, of output gate when time information is t
doIndicating distance information as
dThe weight of the time output gate;
hindicates a hidden state, h
t-1To represent
(t-1)Hidden state of the moment, h
tRepresenting a hidden state at time t; x is the number of
tRepresenting time information and location information;
brepresenting the corresponding offset, b
iIndicating the offset of the input gate, b
cRepresenting the bias of the memory cell, b
oIndicating the offset of the output gate; sigma represents mapping values to a sigmoid layer between (0,1), 1 represents complete retention, and 0 represents complete forgetting;
represents the aboveA state of a short term memory cell of the memory cells; c. C
tRepresenting the state of a long-term memory cell of said memory cells, c
t-1Indicating the state of the long-term memory cell at time (t-1); t is
1tAnd T
2tAre the same and all represent time gates at the same time, except T
1tShowing a first time gate for controlling the time interval influence of short-term interest, T
2tRepresents a second time gate for controlling the time interval influence of long-term interest, W
xt1、W
t1、W
xt2、W
t2、W
xd1、W
d1、W
xd2、W
d2All represent the weight at the t-th moment; d
1tRepresenting a first range gate for controlling the range-interval effect of short-term interest; d
2tRepresenting a second range gate for controlling the range-interval effect of long-term interest; Δ t
tRepresenting the time interval between two adjacent interest points checked in at the time t; Δ d
tRepresenting the distance interval between two adjacent interest points checked in at the time t; o
tAn output gate is shown. Referring to fig. 3, fig. 3 is a schematic diagram illustrating a second structure of a previously trained LSTM model in a point of interest recommendation method according to an embodiment of the present invention.
In the method for recommending the point of interest provided by the embodiment of the invention, the pre-training of the LSTM model may include the following steps:
constructing an initial LSTM model;
acquiring a training interest point sample and a testing interest point sample;
inputting training interest point samples to an initial LSTM model;
judging whether the output interest point of the initial LSTM model is consistent with the test interest point sample, if so, determining the initial LSTM model to be a pre-trained LSTM model, otherwise, adjusting the parameters of the initial LSTM model, and returning to the step of inputting the training interest point sample to the initial LSTM model;
wherein when Wxt1When > 0, set Wxt10; when W isxd1When > 0, set Wxd1=0。
The training sample of interest sample as referred to herein includes time information and distance information of the point of interest check-in. In practical application, in order to adapt to the next interest point recommendation, in the process of inputting the training interest point sample to the initial LSTM model, the training interest point sample may be converted into the following form:
the transformed training point of interest samples are then input into the initial LSTM model, at which time v
t uCorresponding to x
t,d(l
t+1,l
t) Corresponding to Δ d
tD (,) represents a function that computes the distance of two geographical locations,
corresponding to Δ t
t. In addition, in the process of adjusting parameters, the initial LSTM model outputs h
tAnd v
t uA probability distribution of all interest points is calculated, and then based on the output sum v
t+1 uThe gradient steps are taken to optimize the loss, specifically, a variant of Adam's random gradient descent can be used to optimize the parameters in the initial LSTM model, Adam adapting the learning rate of each parameter by making smaller updates to frequent parameters and larger updates to infrequent parameters.
In the method for recommending an interest point provided in the embodiment of the present invention, the target interest point is determined based on the operation result, which may specifically be:
performing softmax operation on the operation result to obtain the probability distribution of each interest point;
a target point of interest is determined based on the probability distribution.
In practical application, after obtaining the operation result, the recommendation system may perform softmax operation on the operation result to obtain a probability distribution of each interest point, where the probability distribution is the probability that the user goes to each interest point after the current interest point sequence, and then determine the target interest point according to the probability distribution of each interest point.
In the method for recommending an interest point provided in the embodiment of the present invention, the target interest point is determined based on probability distribution, which may specifically be:
and determining the first N interest points with the maximum probability distribution values as target interest points.
In practical applications, the first N interest points with the largest probability distribution value may be determined as target interest points, and the value of N may be determined according to actual needs, such as 1, 5, 10, and the like. Furthermore, the determined N points of interest may be presented in the form of a list or the like.
In the method for recommending an interest point provided in an embodiment of the present invention, after determining a target interest point based on an operation result, the method may further include:
and sending the target interest point to the user terminal.
In practical application, after determining the target interest point, the recommendation system may further send the target interest point to a user terminal for a user to make a decision, where the user terminal includes a mobile phone, a computer, a mailbox, and the like of the user.
The invention also provides an interest point recommendation system which has the corresponding effect of the interest point recommendation method provided by the embodiment of the invention. Referring to fig. 4, fig. 4 is a schematic structural diagram of a point of interest recommendation system according to an embodiment of the present invention.
The interest point recommendation system provided by the embodiment of the invention can comprise:
the first acquisition module 101 is configured to acquire time information and location information of a group of points of interest;
an input module 102, configured to input time information and location information to a pre-trained LSTM model;
a second obtaining module 103, configured to obtain an operation result of each interest point output by the LSTM model;
a determining module 104, configured to determine a target interest point based on the operation result;
the memory unit, the output gate and the hidden state of the LSTM model all comprise a time gate and a distance gate, wherein the time gate represents the time interval between every two adjacent interest points of check-in, and the distance gate represents the distance interval between every two adjacent interest points of check-in.
For more specific working processes of the modules, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not described herein again.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an interest point recommendation device according to an embodiment of the present invention. The point of interest recommendation device comprises a memory 201 and a processor 202, and the processor 202 implements the following steps when executing the computer program stored in the memory 201:
acquiring time information and position information of a group of interest points;
inputting time information and position information to a pre-trained LSTM model;
obtaining the operation result of each interest point output by the LSTM model;
determining a target interest point based on the operation result;
the memory unit, the output gate and the hidden state of the LSTM model are controlled by a time gate and a distance gate, wherein the time gate represents the time interval between every two adjacent interest points of check-in, and the distance gate represents the distance interval between every two adjacent interest points of check-in.
In this embodiment, when the processor 202 executes the computer subprogram stored in the memory 201, the following steps may be specifically implemented: the update equation for the previously trained LSTM model is set as:
it=σ(Wi[ht-1,xt]+bi);
ft=σ(Wf[ht-1,xt]+bf);
T1t=σ(xtWxt1+σ(ΔttWt1)+bt1),s.t.Wxt1≤0;
T2t=σ(xtWxt2+σ(ΔttWt2)+bt2);
D1t=σ(xtWxd1+σ(ΔdtWd1)+bd1),s.t.Wxd1≤0;
D2t=σ(xtWxd2+σ(ΔdtWd2)+bd2);
ot=σ(Wo[ht-1,xt]+ΔttWto+ΔdtWdo+bo);
wherein i
tAn input gate representing a time t; w denotes the corresponding weight, W
iRepresents the weight of the input gate, W
fWeight representing forgetting gate, W
cRepresenting the weight, W, of the memory cell
oRepresents the weight of the output gate, W
toWeight, W, of output gate when time information is t
doRepresenting the weight of the output gate when the distance information is d; h denotes a hidden state, h
t-1Indicates the hidden state at time (t-1), h
tRepresenting a hidden state at time t; x is the number of
tRepresenting interest point feature vectors at t moment in the check-in sequence; b denotes the corresponding offset, b
iIndicating the offset of the input gate, b
fIndicating the offset of a forgetting gate, b
cRepresenting the bias of the memory cell, b
oIndicating the offset of the output gate; sigma represents mapping values to a sigmoid layer between (0,1), 1 represents complete retention, and 0 represents complete forgetting; f. of
tA forgetting gate showing the t-th time;
representing a state of a short term memory cell of the memory cells; c. C
tRepresenting the state of a long-term memory cell of said memory cells, c
t-1Indicating the state of the long-term memory cell at time (t-1); t is
1tAnd T
2tAre the same and all represent time gates at the same time, except T
1tShowing a first time gate for controlling the time interval influence of short-term interest, T
2tRepresenting a second time gate for controlling the time interval effect of long-term interest; w
xt1、W
t1、W
xt2、W
t2、W
xd1、W
d1、W
xd2、W
d2All represent the weight at the t-th moment; d
1tRepresenting a first range gate for controlling the range-interval effect of short-term interest; d
2tRepresenting a second range gate for controlling the range-interval effect of long-term interest; Δ t
tRepresenting the time interval between two adjacent interest points checked in at the time t; Δ d
tRepresenting the distance interval between two adjacent interest points checked in at the time t; o
tAn output gate is shown.
In this embodiment, when the processor 202 executes the computer subprogram stored in the memory 201, the following steps may be specifically implemented: the update equation for the previously trained LSTM model is set as:
it=σ(Wi[ht-1,xt]+bi);
T1t=σ(xtWxt1+σ(ΔttWt1)+bt1),s.t.Wxt1≤0;
T2t=σ(xtWxt2+σ(ΔttWt2)+bt2);
D1t=σ(xtWxd1+σ(ΔdtWd1)+bd1),s.t.Wxd1≤0;
D2t=σ(xtWxd2+σ(ΔdtWd2)+bd2);
ot=σ(Wo[ht-1,xt]+ΔttWto+ΔdtWdo+bo);
wherein i
tAn input gate representing a time t; w denotes the corresponding weight, W
iRepresents the weight of the input gate, W
cRepresenting the weight, W, of the memory cell
oRepresents the weight of the output gate, W
toWeight, W, of output gate when time information is t
doRepresenting the weight of the output gate when the distance information is d; h denotes a hidden state, h
t-1Indicates the hidden state at time (t-1), h
tRepresenting a hidden state at time t; x is the number of
tRepresenting time information and location information; b denotes the corresponding offset, b
iIndicating the offset of the input gate, b
cRepresenting the bias of the memory cell, b
oIndicating the offset of the output gate; sigma represents mapping values to a sigmoid layer between (0,1), 1 represents complete retention, and 0 represents complete forgetting;
representing a state of a short term memory cell of the memory cells; c. C
tRepresenting the state of a long-term memory cell of said memory cells, c
t-1Indicating the state of the long-term memory cell at time (t-1); t is
1tAnd T
2tAre the same in nature and are all shown in the tableShowing time gates at the same time, only T
1tShowing a first time gate for controlling the time interval influence of short-term interest, T
2tRepresents a second time gate for controlling the time interval influence of long-term interest, W
xt1、W
t1、W
xt2、W
t2、W
xd1、W
d1、W
xd2、W
d2All represent the weight at the t-th moment; d
1tRepresenting a first range gate for controlling the range-interval effect of short-term interest; d
2tRepresenting a second range gate for controlling the range-interval effect of long-term interest; Δ t
tRepresenting the time interval between two adjacent interest points checked in at the time t; Δ d
tRepresenting the distance interval between two adjacent interest points checked in at the time t; o
tAn output gate is shown.
In this embodiment, when the processor 202 executes the computer subprogram stored in the memory 201, the following steps may be specifically implemented: constructing an initial LSTM model; acquiring a training interest point sample and a testing interest point sample; inputting training interest point samples to an initial LSTM model; judging whether the output interest point of the initial LSTM model is consistent with the test interest point sample, if so, determining the initial LSTM model to be a pre-trained LSTM model, otherwise, adjusting the parameters of the initial LSTM model, and returning to the step of inputting the training interest point sample to the initial LSTM model; wherein when Wxt1When > 0, set Wxt10; when W isxd1When > 0, set Wxd1=0。
In this embodiment, when the processor 202 executes the computer subprogram stored in the memory 201, the following steps may be specifically implemented: performing softmax operation on the operation result to obtain the probability distribution of each interest point; a target point of interest is determined based on the probability distribution.
In this embodiment, when the processor 202 executes the computer subprogram stored in the memory 201, the following steps may be specifically implemented: and determining the first N interest points with the maximum probability distribution values as target interest points.
In this embodiment, when the processor 202 executes the computer subprogram stored in the memory 201, the following steps may be specifically implemented: and sending the target interest point to the user terminal.
The invention also discloses a computer readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the point of interest recommendation method as described in any of the above embodiments.
For a description of relevant parts in the point of interest recommendation system, the device and the computer-readable storage medium provided by the embodiments of the present invention, reference is made to detailed descriptions of corresponding parts in the point of interest recommendation method provided by the embodiments of the present invention, and details are not repeated herein. In addition, parts of the above technical solutions provided in the embodiments of the present invention that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail, so as to avoid redundant description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.