Interest point recommendation method

Through the improved spatio-temporal fusion embedding module and Transformer coding model, combined with Poisson distribution and cross-entropy loss function, time interval and spatial distance information are integrated, which solves the shortcomings of spatio-temporal diversity and individual diversity of user preferences in existing recommendation systems. Achieving more accurate and diversified location point of interest recommendations.

CN118535802AActive Publication Date: 2024-08-23HOHAI UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410850987.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-08-23
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

Existing location point of interest recommendation systems fail to effectively integrate time interval and spatial distance information, resulting in insufficient research on the spatiotemporal diversity and individual diversity of user preferences, high computational complexity, and the importance of unvisited points of interest being ignored.

Method used

An improved spatiotemporal fusion embedding module is used to encode the time interval and spatial distance information through the Sin activation function and the semi-vector formula, and the Poisson distribution is combined to predict the user travel probability, and a double-layer position feedforward network and cross-entropy are used in the Transformer encoding module. The loss function replaces the traditional dot product matching function to achieve the fusion of spatiotemporal embedded information and the deep encoding of user trajectories.

Benefits of technology

It improves the research on spatiotemporal diversity of user preferences, deeply explores the individual diversity of user interests, achieves more accurate and diverse recommendation of location points of interest, and solves the problem of lack of individual user diversity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535802A
    Figure CN118535802A
Patent Text Reader

Abstract

The invention discloses an interest point recommendation method which comprises the following steps: acquiring a user set, a position interest point set and a sign-in sequence set of users, and inputting an improved space-time fusion embedding module to obtain fused space-time embedding information; obtaining user basic track embedding information by using the sign-in sequence set of the user, and adding the absolute position embedding matrix to the user basic track embedding information to obtain user track embedding information; and inputting the fused space-time embedded information and the user track embedded information into a Transform coding module at the same time to obtain the prediction probability of the interest point of the next position. According to the method, the appropriate embedding dimension is selected to fuse the time interval information and the spatial distance information, meanwhile, the relation between the user track and the spatio-temporal information is coded, the diversity of user interests is deeply mined, and the interest distribution of the user is perfected on the whole. The problem that in an existing recommendation system, the diversity of user individuals is insufficient, and more accurate and diversified position interest point recommendation cannot be achieved is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for recommending points of interest, and belongs to the technical field of data processing. Background Art

[0002] In personalized recommendation systems, the diversity of user preferences is one of the key indicators for evaluating the quality of recommendations. With the advent of the information age, users' preferences for goods, services, or locations are becoming increasingly diversified, which requires recommendation systems to accurately capture and respond to these diverse needs. For example, in the field of e-commerce, users may be interested in fashion, technology, and healthy food at the same time; in the field of tourism, users may like historical and cultural cities and are eager to explore natural scenery. Therefore, a successful personalized recommendation system needs to be able to understand and utilize the diversity of user preferences and provide users with rich and diverse recommendation results to meet their different needs and interests.

[0003] In the location POI recommendation, in addition to the user's historical visit records and preferences, spatial distance is also a factor that cannot be ignored. Users tend to visit locations that are closer to them because short-distance travel is more convenient and time-saving. For example, when planning a day's travel plan, users may give priority to restaurants, cafes, or attractions that are close and in line with their interests.

[0004] In response to the above requirements, existing methods consider the impact of timing factors on location POI recommendations and input the timing information in the user's check-in sequence into the Transformer model to predict the next location POI that the user may visit. However, these methods often only consider the impact of timing factors on the diversity of POI recommendations and ignore spatial distance factors. However, distance also plays an important role in user travel. At the same time, when predicting the next location POI that the user may visit, existing methods use the traditional dot product matching function. This method is affected by the length of the input vector and is not flexible enough. This leads to insufficient research on the individual diversity of user preferences, increased computational complexity, and neglect of the importance of unvisited POIs.

[0005] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgement or any form of suggestion that the information constitutes the prior art already known to ordinary technicians in this field. Summary of the invention

[0006] The technical problem to be solved by the present invention is: how to integrate time interval and spatial distance information, optimize the spatiotemporal diversity and individual diversity of user preferences, and achieve more accurate and diversified location interest point recommendations.

[0007] In order to solve the above technical problems, the present invention is implemented by adopting the following technical solutions.

[0008] The present invention provides a method for recommending points of interest, comprising:

[0009] Obtain the user set, location interest point set and user check-in sequence set, input them into the improved spatiotemporal fusion embedding module, and obtain the fused spatiotemporal embedding information;

[0010] After arranging the check-in sequences of users in the check-in sequence set in chronological order, in the user trajectory embedding layer of the spatiotemporal fusion embedding module, the user's check-in sequence set is used to obtain the user's basic trajectory embedding information and the absolute position is embedded in the matrix Add to the user basic trajectory embedding information to obtain the user trajectory embedding information;

[0011] The fused spatiotemporal embedding information and the user trajectory embedding information are simultaneously input into the Transformer encoding module to obtain the predicted probability of the next location point of interest;

[0012] Among them, the method for obtaining the improved spatiotemporal fusion embedding module includes:

[0013] Divide the time interval between two locations visited by the user into multiple time slots;

[0014] The time slot interval between two locations of interest points is used as a time embedding element, and the Sin activation function is used to encode the time slot intervals between all locations of interest points to obtain the final time embedding information;

[0015] The spatial distance between any two adjacent embedded elements between two interest points is taken as a spatial embedding element. The spatial distance between all adjacent embedded elements is calculated using the haversine formula to obtain the final spatial embedding information.

[0016] Use Poisson distribution to predict the probability of a user starting from one point of interest to another point of interest, and obtain the prediction expression of the point of interest location probability;

[0017] According to the probability prediction expression of the interest point location, the final spatial embedding information is used to replace the parameters representing the spatial distance information in the probability prediction expression of the interest point location. The final temporal embedding information is used to replace the parameters representing the time interval information in the probability prediction expression of the interest point location, so as to obtain the fused spatiotemporal embedding information.

[0018] Furthermore, the acquired user set, location interest point set and user check-in sequence set are used as initial data and input into the improved spatiotemporal fusion embedding module in batches, and the user's check-in sequence is arranged in chronological order.

[0019] Further, the method of dividing the time interval between two location points of interest visited by the user into a plurality of time slots includes:

[0020] The time interval between two locations visited by the user is divided into time slots, any scalar time value can be projected onto in any of the time slots.

[0021] Furthermore, the time slot interval between two locations of interest points is taken as a time embedding element, and the Sin activation function is used to encode the time slot intervals between all locations of interest points to obtain the final time embedding information, where time embedding elements, represented as:

[0022] ;

[0023] in, Indicates time embedding elements, Indicates A weight vector, Indicates A bias vector, and Respectively represent the time slot to which the user's check-in time at location point i and location point j belongs; Indicates the length of the user's check-in sequence. k has no actual meaning and represents a count.

[0024] Furthermore, the spatial distance between any two adjacent embedded elements between two locations of interest points is taken as a spatial embedding element, and the spatial distance between all adjacent embedded elements is calculated using the haversine formula to obtain the final spatial embedding information, where spatial embedding elements, expressed as:

[0025] ;

[0026] in, Indicates Space embedded elements; Indicates The embedded element and The space between embedded elements.

[0027] Furthermore, the Poisson distribution is used to predict the probability of a user starting from one point of interest to another point of interest, and the prediction expression of the point of interest location probability is obtained, which is expressed as:

[0028] ;

[0029] in, Indicates user Visit two points of interest and The probability of represents the learnable parameters, represents the exponential factor in the Poisson distribution; Indicates that the user visits two points of interest and The time interval information between them, log means taking the logarithm.

[0030] Further, according to the interest point location probability prediction expression, the final spatial embedding information is used to replace the parameters representing the spatial distance information in the interest point location probability prediction expression, and the final time embedding information is used to replace the parameters representing the time interval information in the interest point location probability prediction expression to obtain fused spatiotemporal embedding information, which is expressed as:

[0031] ;

[0032] in, represents the fused spatiotemporal embedding information, represents the final spatial embedding information, represents the final spatial embedding information, Represents the exponential factor in the Poisson distribution.

[0033] Furthermore, the user trajectory embedding information is expressed as:

[0034] ;

[0035] Where E represents the user trajectory embedding information, represents the absolute position embedding matrix, Represents the user basic trajectory embedding information.

[0036] Furthermore, the Transformer encoding module includes a double-layer position feedforward network and an equalizer based on an improved cross entropy loss function; the fused spatiotemporal embedding information and the user trajectory embedding information are simultaneously input into the Transformer encoding module to obtain a predicted probability of the next position point of interest, including:

[0037] Construct a symmetrical masking matrix, embed the user trajectory information, fuse the spatiotemporal embedding information and the masking matrix, input the head self-attention formula, operate with the parameter matrix, obtain the operation result, and linearly project the operation result to In the subspace of time slots, parallel applications The attention functions generate output representations, concatenate and re-project the output representations to obtain a concatenated sequence;

[0038] Input the connection sequence into a two-layer position feedforward network to obtain each element in the connection sequence;

[0039] Apply residual connection, layer normalization and dropout regularization to each element in the connection sequence to obtain the residual connection, layer normalization and dropout regularization elements, arrange all the residual connection, layer normalization and dropout regularization elements in order to obtain the final output sequence;

[0040] Use linear transformation and Softmax function instead of traditional dot product matching function to convert the final output sequence into the probability of location interest points;

[0041] The probability of the point of interest is input into the balanced sampler based on the cross entropy loss function, and the unvisited locations with negative probability of the point of interest are weighted to obtain the predicted probability of the next location point of interest.

[0042] Furthermore, the probability of the point of interest is input into a balanced sampler based on a cross entropy loss function, and a weighted operation is performed on the unvisited locations with negative probability of the point of interest to obtain the predicted probability of the next location point of interest. The cross entropy loss function is expressed as:

[0043] ;

[0044] in, express user , Points of Interest and points of interest All belong to initial data , Indicates to users Visiting Points of Interest The logarithm of the probability is Indicates the length of the user's check-in sequence, Indicates that for a given user Under the moving trajectory, the position The probability of being a negative sample.

[0045] Among them, for a given user Under the moving trajectory, the position The probability of being a negative sample , expressed as:

[0046] ;

[0047] in, Indicates that for a given user Under the moving trajectory, the position The probability of being a negative sample; represents the temperature coefficient, which is used to control the deviation of the probability distribution. Indicates the exponential operation. and Indicates points of interest, and They represent points of interest that have not been visited.

[0048] Compared with the prior art, the present invention has the following beneficial effects:

[0049] The present invention selects appropriate embedding dimensions based on the fusion of time interval information and spatial distance information to improve the spatiotemporal diversity of user preferences. At the same time, an improved Transformer coding model is used to encode the relationship between the trajectory and spatiotemporal information of individual users in the same position subspace, and deeply explore the individual diversity of user interests. The present invention uses an improved cross entropy loss function to combine the spatiotemporal and individual diversity of users to improve the user's interest distribution as a whole. It solves the problem of the lack of individual user diversity in the existing recommendation system and the inability to achieve more accurate and diversified location interest point recommendations. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is a structural diagram of a method for recommending points of interest provided by an embodiment of the present invention;

[0051] Figure 2 It is a structural diagram of an improved Transformer encoding module provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The technical solution of the present invention is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations on the technical solution of the present invention. The embodiments of the present invention and the technical features in the embodiments may be combined with each other unless there is a conflict.

[0053] Example 1

[0054] This embodiment provides a method, comprising the following steps:

[0055] Obtain the user set, location interest point set and user check-in sequence set, input them into the improved spatiotemporal fusion embedding module, and obtain the fused spatiotemporal embedding information;

[0056] The improved spatiotemporal fusion embedding module is used to fuse temporal information and spatial information into a unified embedding vector. By considering both temporal and spatial factors, the description of user mobility behavior is improved, making the prediction probability more accurate.

[0057] After arranging the check-in sequences of users in the check-in sequence set in chronological order, in the user trajectory embedding layer of the spatiotemporal fusion embedding module, the user's check-in sequence set is used to obtain the user's basic trajectory embedding information and the absolute position is embedded in the matrix Add to the user basic trajectory embedding information to obtain the user trajectory embedding information;

[0058] Through the user trajectory embedding layer, the user's check-in sequence is converted into an embedding vector that reflects the user's movement trajectory. The user's basic trajectory embedding information can capture the user's long-term movement patterns and preferences. By adding the absolute position embedding matrix, the user's basic trajectory embedding information is combined with the specific geographic location information. The user trajectory embedding information not only contains the user's movement trajectory, but also contains the specific geographic location information, which can more accurately predict the places that the user may visit in the future.

[0059] The fused spatiotemporal embedding information and the user trajectory embedding information are simultaneously input into the Transformer encoding module to obtain the predicted probability of the next location point of interest;

[0060] The Transformer encoding module is used to combine the fused spatiotemporal embedding information and the user trajectory embedding information to predict the next location point of interest that the user may visit. By comprehensively considering the user's movement trajectory, spatiotemporal information, and specific geographic location information, it can more accurately predict the user's future movement behavior and provide users with more personalized recommendations and services.

[0061] Among them, the method for obtaining the improved spatiotemporal fusion embedding module includes:

[0062] Divide the time interval between two locations visited by the user into multiple time slots;

[0063] The time slot interval between two locations of interest points is used as a time embedding element, and the Sin activation function is used to encode the time slot intervals between all locations of interest points to obtain the final time embedding information;

[0064] The time interval is divided into multiple time slots, and these time slot intervals are encoded to obtain time embedding information. Time embedding information can reflect the user's movement frequency and preference in different time periods, which helps to predict the user's movement behavior in a certain time period in the future.

[0065] The spatial distance between any two adjacent embedded elements between two interest points is taken as a spatial embedding element. The spatial distance between all adjacent embedded elements is calculated using the haversine formula to obtain the final spatial embedding information.

[0066] The spatial distances between location points of interest are calculated and encoded to obtain spatial embedding information. Spatial embedding information can reflect the user's movement patterns and preferences between different locations and help predict the places that users may visit in the future.

[0067] Use Poisson distribution to predict the probability of a user starting from one point of interest to another point of interest, and obtain the prediction expression of the point of interest location probability;

[0068] According to the probability prediction expression of the interest point location, the final spatial embedding information is used to replace the parameters representing the spatial distance information in the probability prediction expression of the interest point location. The final temporal embedding information is used to replace the parameters representing the time interval information in the probability prediction expression of the interest point location, so as to obtain the fused spatiotemporal embedding information.

[0069] Combining the temporal embedding information with the spatial embedding information, the Poisson distribution is used to predict the probability of a user starting from one location point of interest to another location point of interest, and the fused spatiotemporal embedding information is obtained. By fusing temporal and spatial information, a more comprehensive and accurate description of user mobility behavior is obtained.

[0070] Example 2

[0071] like Figure 1 As shown, this embodiment introduces a method for recommending points of interest, including the following steps:

[0072] Step 1: Get the user set , location point of interest set and the user's check-in sequence set as initial data.

[0073] For the acquired user set , location point of interest set and the user's check-in sequence set Perform preprocessing to filter out users and location points of interest with less than 10 check-ins.

[0074] Step 2: Input the initial data into the improved spatiotemporal fusion embedding module in batches to construct spatiotemporal fusion embedding and arrange the user’s check-in sequence in chronological order.

[0075] Step 3: In the spatiotemporal fusion embedding module, the time interval scale strategy is adopted to divide the time interval into multiple time slots, and the Poisson distribution is used to model the user's check-in behavior at the point of interest to obtain the fused spatiotemporal embedding information ,

[0076] The specific steps to build the improved spatiotemporal fusion embedding module are as follows:

[0077] Step 3.1: Divide the time interval between users visiting two locations into time slots and , where any scalar time value can be projected onto in any of the time slots.

[0078] Step 3.2: Take the time slot interval between two locations of interest points as a time embedding element, use the Sin activation function to encode the time slot intervals between all locations of interest points, and obtain the final time embedding information, including:

[0079] User from location point of interest Departure to location point of interest No. The calculation formula of the time embedding element is expressed as:

[0080] (1);

[0081] in, Indicates time embedding elements, Indicates A weight vector, Indicates A bias vector, and Respectively represent the time slot to which the user's check-in time at location point i and location point j belongs; Indicates the length of the user's check-in sequence. k has no actual meaning and represents a count.

[0082] According to The calculation formula of time embedding elements is used to calculate the time embedding elements when k takes 1 to t respectively, and the time slot intervals between all adjacent embedding elements are encoded to obtain the final time embedding information. , where time embeds information , represents the embedding dimension, Indicates the length of the user's check-in sequence, Represents a space vector.

[0083] Step 3.3: Take the time slot interval between two locations of interest points as a time embedding element, use the Sin activation function to encode the time slot intervals between all locations of interest points, and obtain the final time embedding information, including:

[0084] User from location point of interest Departure to location point of interest , get points of interest Latitude and longitude and points of interest Latitude and longitude , input into the haversine formula to get the point of interest and points of interest The calculation formula of the spatial distance is expressed as:

[0085] (2);

[0086] in, , , represents the cosine operation; Points of interest and points of interest longitude; Points of interest and points of interest Latitude.

[0087] According to interest and points of interest The calculation formula of the spatial distance is obtained The embedded element and The spatial distance between the embedded elements is taken as spatial embedding element, The calculation formula of the spatial embedding element is expressed as:

[0088] (3);

[0089] in, Indicates Space embedded elements; Indicates The embedded element and The space between embedded elements.

[0090] According to The calculation formula of spatial embedding elements is used to calculate the spatial embedding elements when k is 1 to t, and the spatial distance between all adjacent embedding elements is obtained to obtain the final spatial embedding information. ,in, , represents the embedding dimension, Indicates the length of the user's check-in sequence, Represents a space vector.

[0091] Step 3.6: Predict users using Poisson distribution From location point of interest Departure to location point of interest The probability is expressed as:

[0092] (4);

[0093] in, Indicates user Visit two points of interest and The probability of represents the learnable parameters, represents the exponential factor in the Poisson distribution, which can be viewed as a trade-off factor between controlling temporal and spatial effects, Indicates the time interval between a user's visits to two points of interest.

[0094] In order to optimize the algorithm complexity, the logarithm of both sides of formula (4) is taken to obtain the probability prediction formula of the point of interest location, which is expressed as:

[0095] (5);

[0096] in, Indicates user Visit two points of interest and The probability of represents the learnable parameters, represents the exponential factor in the Poisson distribution; Indicates that the user visits two points of interest and The time interval information between them, log means taking the logarithm.

[0097] Step 3.7: In order to fully consider the spatial distance factor, the learnable parameters in the probability prediction formula of the point of interest are Replace with spatial distance information to obtain the user after replacing the learnable parameters From location point of interest Departure to location point of interest The probability that follows the Poisson distribution is expressed as:

[0098] (6);

[0099] in, Indicates that the user visits two points of interest and Spatial distance information between them; represents the exponential factor in the Poisson distribution, which can be regarded as a trade-off factor between controlling time and space effects. log represents the logarithm. Indicates that the user visits two points of interest and The time interval information.

[0100] Step 3.7: According to the prediction expression of the probability of the location of the interest point, the final spatial embedding information is used to replace the parameters representing the spatial distance information in the prediction expression of the probability of the location of the interest point, and the final temporal embedding information is used to replace the parameters representing the time interval information in the prediction expression of the probability of the location of the interest point, and the fused spatiotemporal embedding information is obtained:

[0101] The user visits two points of interest in the point of interest location probability prediction formula and Spatial distance information between Replaced with the final spatial embedding information ;

[0102] The user visits two points of interest in the point of interest location probability prediction formula and Time interval information Replaced with the final time embedding information , obtain the fused spatiotemporal embedding information ;

[0103] The fused spatiotemporal embedding information It is expressed as:

[0104] (7);

[0105] in, represents the fused spatiotemporal embedding information, represents the final spatial embedding information, represents the final spatial embedding information, represents the exponential factor in the Poisson distribution, which can be viewed as a trade-off factor controlling the effects of time and space.

[0106] Step 4: Get the user trajectory embedding information based on the user's check-in sequence arranged in chronological order:

[0107] Step 4.1: According to the user The sign-in sequence is input into the user trajectory embedding layer to obtain the user basic trajectory embedding information.

[0108] The user A sign-in is input into the user trajectory embedding layer to obtain the output of the user trajectory embedding layer.

[0109] The output of the user trajectory embedding layer is expressed as and .

[0110] The user Sign-in sequence , input to the user trajectory embedding layer, obtain the user trajectory embedding layer output sequence, and use the obtained user trajectory embedding layer output sequence as the user basic trajectory embedding information.

[0111] The user basic trajectory embedding information is expressed as and ,

[0112] Among them, e r represents the user trajectory embedding, e u represents user embedding, e l represents the embedding of interest points, d represents the embedding dimension, Represents a space vector.

[0113] Step 4.2: Embed the absolute position into the matrix Add to user base track embed information In , the user trajectory embedding information E is obtained as follows:

[0114] (8);

[0115] in, , E represents the user trajectory embedding information, represents the absolute position embedding matrix, Represents the user basic trajectory embedding information.

[0116] Step 5: Embed the fused space-time information The user trajectory embedding information E is input into the Transformer encoding module at the same time to obtain the predicted probability of the next location point of interest. The structure of the Transformer encoding module is as follows: Figure 2 As shown, the specific steps include:

[0117] Step 5.1: Construct a symmetric masking matrix , masking the embedded location information and focusing on the relationship between the current point of interest itself and the unmasked location information, where t represents the length of the user's check-in sequence, Represents a space vector.

[0118] Step 5.2: Embed user trajectories into information , fused spatiotemporal embedding information and the masking matrix , input the self-attention formula of the head, operate with the parameter matrix, obtain the operation result, and linearly project the operation result to In subspaces, parallel applications The attention functions generate output representations, which are concatenated and re-projected to obtain a concatenated sequence , where t is the length of the user's check-in sequence, represents the embedding dimension, Represents a space vector, connecting the sequence It is expressed as:

[0119] (9);

[0120] in, represents the learnable parameter vector, represents the embedding dimension, represents a space vector, represents the number of subspaces, represents h attention functions, and Concat represents concatenation.

[0121] in, yes A self-attention head in is expressed as:

[0122] (10);

[0123] in, denote the query Q of interest point i, the key K of interest point i and the value matrix V of interest point i respectively. represents the fused spatiotemporal embedding information, M represents the symmetric masking matrix, Att() represents the masked attention function, represents the embedding dimension, d h represents the embedding dimension of the subspace, Represents a space vector.

[0124] Step 5.3: Connect the sequence Input the double-layer position feedforward network to obtain the connection sequence Each element in; the output of the two-layer position feedforward network is expressed as:

[0125] (11);

[0126] Among them, FFN( ) represents the output of the two-layer position feedforward network, Represents a connection sequence The elements; , Represent the weights and biases of the inner layer of the position feedforward network respectively; , They represent the weights and biases of the outer layer of the position feedforward network respectively, and ReLU represents the activation function.

[0127] Step 5.4: Connect the sequence Each element in adopts residual connection, layer normalization and drop regularization to obtain the residual connection, layer normalization and drop regularization elements, which are expressed as:

[0128] (12);

[0129] in, represents dropout regularization; represents a two-layer position feed-forward network; Representation layer normalization, Represents a connection sequence The elements;

[0130] The representation layer is normalized, specifically expressed as:

[0131] (13);

[0132] in, Representation layer normalization, Represents a connection sequence The elements, Respectively The mean and variance of denote the learned scale factor and bias term respectively; represents element-wise multiplication, Indicates a minimum value, used to prevent the denominator from being 0.

[0133] Arrange all residual connections, layer normalization, and dropout regularization elements in order to get the final output sequence .

[0134] Step 5.5: Use linear transformation and Softmax function instead of the traditional dot product matching function to convert the final output sequence Converted to the probability of location interest point, expressed as:

[0135] (14);

[0136] in, Indicates user Prediction scores of accessible candidate locations of POI; Indicates position weight matrices, and , represents the embedding dimension, Indicates the length of the user's check-in sequence, represents a space vector, represents the output sequence, and softmax represents the activation function.

[0137] Step 6: Input the probability of the point of interest at the location into the balanced sampler based on the cross entropy loss function, perform weighted operations on the unvisited locations with negative probability of the point of interest, improve the cross entropy loss function, and obtain the predicted probability of the next point of interest at the location:

[0138] The improved cross entropy loss function is expressed as:

[0139] (15);

[0140] in, Indicates user , Points of Interest and points of interest All belong to initial data , Indicates to users Visiting Points of Interest The logarithm of the probability is Indicates the length of the user's check-in sequence, Indicates that for a given user Under the moving trajectory, the position The probability of being a negative sample.

[0141] Among them, for a given user Under the moving trajectory, the position The probability of being a negative sample , expressed as:

[0142] (16);

[0143] in, Indicates that for a given user Under the moving trajectory, the position The probability of being a negative sample; represents the temperature coefficient, which is used to control the deviation of the probability distribution. Indicates the exponential operation. and Indicates points of interest, and They represent the points of interest that have not been visited. This not only avoids neglecting the importance of the unvisited points of interest, but also emphasizes the locations of the points of interest with more information.

[0144] Enterprises and organizations can better understand user needs, optimize resource allocation, and provide better personalized services based on the predicted probability of the next location point of interest.

[0145] Example 3

[0146] A computer-readable storage medium having computer instructions stored thereon, characterized in that when the computer instructions are executed by a processor, the steps of the method of embodiment 1 or 2 above are implemented.

[0147] Example 4

[0148] The present invention also provides a computer program product, including computer instructions, characterized in that when the computer instructions are executed by a processor, the steps of the method in the above-mentioned embodiment 1 or 2 are implemented.

[0149] In summary, the present invention selects appropriate embedding dimensions based on the fusion of time interval information and spatial distance information, thereby improving the spatiotemporal diversity of user preferences. At the same time, an improved Transformer coding model is adopted to encode the relationship between the trajectory and spatiotemporal information of individual users in the same position subspace, and deeply explore the individual diversity of user interests. The present invention uses an improved cross-entropy loss function to combine the spatiotemporal and individual diversity of users to improve the user's interest distribution as a whole. This solves the problem that in existing recommendation systems, individual user diversity is lacking and more accurate and diversified location interest point recommendations cannot be achieved.

[0150] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0151] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0152] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0153] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0154] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.

Claims

1. A method for recommending points of interest, characterized in that: include: Obtain the user set, location interest point set and user check-in sequence set, input them into the improved spatiotemporal fusion embedding module, and obtain the fused spatiotemporal embedding information; After arranging the check-in sequences of users in the check-in sequence set in chronological order, in the user trajectory embedding layer of the spatiotemporal fusion embedding module, the user's check-in sequence set is used to obtain the user's basic trajectory embedding information and the absolute position is embedded in the matrix Add to the user basic trajectory embedding information to obtain the user trajectory embedding information; The fused spatiotemporal embedding information and the user trajectory embedding information are simultaneously input into the Transformer encoding module to obtain the predicted probability of the next location point of interest; Among them, the method for obtaining the improved spatiotemporal fusion embedding module includes: Divide the time interval between two locations visited by the user into multiple time slots; The time slot interval between two locations of interest points is used as a time embedding element, and the Sin activation function is used to encode the time slot intervals between all locations of interest points to obtain the final time embedding information; The spatial distance between any two adjacent embedded elements between two interest points is taken as a spatial embedding element. The spatial distance between all adjacent embedded elements is calculated using the haversine formula to obtain the final spatial embedding information. Use Poisson distribution to predict the probability of a user starting from one point of interest to another point of interest, and obtain the prediction expression of the point of interest location probability; According to the probability prediction expression of the interest point location, the final spatial embedding information is used to replace the parameters representing the spatial distance information in the probability prediction expression of the interest point location. The final temporal embedding information is used to replace the parameters representing the time interval information in the probability prediction expression of the interest point location, so as to obtain the fused spatiotemporal embedding information.

2. The method for recommending points of interest according to claim 1, characterized in that: The acquired user set, location interest point set and user check-in sequence set are used as initial data and input into the improved spatiotemporal fusion embedding module in batches.

3. The method for recommending points of interest according to claim 1, characterized in that: The method of dividing the time interval between two location points of interest visited by a user into a plurality of time slots includes: The time interval between two locations visited by the user is divided into time slots, any scalar time value can be projected onto in any of the time slots.

4. The method for recommending points of interest according to claim 1, characterized in that: The time slot interval between two locations of interest points is used as a time embedding element, and the Sin activation function is used to encode the time slot intervals between all locations of interest points to obtain the final time embedding information, where the first time embedding elements, represented as: ; in, Indicates time embedding elements, Indicates A weight vector, Indicates A bias vector, and Respectively represent the time slot to which the user's check-in time at location point i and location point j belongs; Indicates the length of the user's check-in sequence. k has no actual meaning and represents a count.

5. The method for recommending points of interest according to claim 1, characterized in that: The spatial distance between any two adjacent embedded elements between two locations of interest points is taken as a spatial embedding element. The spatial distance between all adjacent embedded elements is calculated using the haversine formula to obtain the final spatial embedding information, where spatial embedding elements, expressed as: ; in, Indicates Space embedded elements; Indicates The embedded element and The space between embedded elements.

6. The method for recommending points of interest according to claim 1, characterized in that: Poisson distribution is used to predict the probability of a user starting from one point of interest to another point of interest, and the prediction expression of the point of interest location probability is obtained, which is expressed as: ; in, Indicates user Visit two points of interest and probability; represents the learnable parameters, represents the exponential factor in the Poisson distribution; Indicates that the user visits two points of interest and The time interval information between them, log means taking the logarithm.

7. The method for recommending points of interest according to claim 6, characterized in that: According to the probability prediction expression of the position of the interest point, the parameters representing the spatial distance information in the probability prediction expression of the position of the interest point are replaced by the final spatial embedding information, and the parameters representing the time interval information in the probability prediction expression of the position of the interest point are replaced by the final time embedding information to obtain the fused spatiotemporal embedding information. The fused spatiotemporal embedding information is expressed as: ; in, represents the fused spatiotemporal embedding information, represents the final spatial embedding information, represents the final spatial embedding information, Represents the exponential factor in the Poisson distribution.

8. The method for recommending points of interest according to claim 1, characterized in that: The user trajectory embedding information is expressed as: ; Where E represents the user trajectory embedding information, represents the absolute position embedding matrix, Represents the user basic trajectory embedding information.

9. The method for recommending points of interest according to claim 8, characterized in that: The Transformer encoding module includes a double-layer position feedforward network and an equalizer based on an improved cross entropy loss function; the fused spatiotemporal embedding information and the user trajectory embedding information are simultaneously input into the Transformer encoding module to obtain the predicted probability of the next position point of interest, including: Construct a symmetrical masking matrix, embed the user trajectory information, fuse the spatiotemporal embedding information and the masking matrix, input the head self-attention formula, operate with the parameter matrix, obtain the operation result, and linearly project the operation result to In the subspace of time slots, parallel applications The attention functions generate output representations, concatenate and re-project the output representations to obtain a concatenated sequence; Input the connection sequence into a two-layer position feedforward network to obtain each element in the connection sequence; Apply residual connection, layer normalization and dropout regularization to each element in the connection sequence to obtain the residual connection, layer normalization and dropout regularization elements, arrange all the residual connection, layer normalization and dropout regularization elements in order to obtain the final output sequence; Use linear transformation and Softmax function instead of traditional dot product matching function to convert the final output sequence into the probability of location interest points; The probability of the point of interest is input into the balanced sampler based on the cross entropy loss function, and the unvisited locations with negative probability of the point of interest are weighted, the cross entropy loss function is improved, and the predicted probability of the point of interest at the next location is obtained.

10. The method for recommending points of interest according to claim 9, characterized in that: The probability of the point of interest is input into the balanced sampler based on the cross entropy loss function, and the unvisited positions with negative probability of the point of interest are weighted, and the cross entropy loss function is improved to obtain the predicted probability of the next position point of interest. The improved cross entropy loss function is expressed as: ; in, Indicates user , Points of Interest and points of interest All belong to initial data , Indicates to users Visiting Points of Interest The logarithm of the probability is Indicates the length of the user's check-in sequence, Indicates that for a given user Under the moving trajectory, the position The probability of being a negative sample; Among them, for a given user Under the moving trajectory, the position The probability of being a negative sample , expressed as: ; in, Indicates that for a given user Under the moving trajectory, the position The probability of being a negative sample; represents the temperature coefficient, which is used to control the deviation of the probability distribution. Indicates the exponential operation. and Indicates points of interest, and They represent points of interest that have not been visited.

Citation Information

Patent Citations

  • Interest point recommendation method and device based on user sign-in

    CN114625971A

  • Next interest point recommendation system based on spatio-temporal information representation

    CN115827974A

  • Next interest point recommendation method based on spatio-temporal information representation

    CN115982477A

  • Sequence recommendation method based on spatial position and time span

    CN117891999A